Summary: | Support the 'Plugged in but not charging' status for ThinkPad batteries | ||
---|---|---|---|
Product: | plasmashell | Reporter: | Elvis Angelaccio <elvis.angelaccio> |
Component: | Battery Monitor | Assignee: | Kai Uwe Broulik <kde> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | elvis.angelaccio, kde, plasma-bugs |
Priority: | NOR | ||
Version: | 5.7.0 | ||
Target Milestone: | 1.0 | ||
Platform: | Archlinux | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | 5.7.0 | |
Sentry Crash Report: | |||
Attachments: | Support cumulative not charging state |
Description
Elvis Angelaccio
2015-07-09 21:30:17 UTC
Makes sense. I implemented parts of this but haven't finished it yet. Can you please provide the output of upower -d when this state is entered so we can see whether the system knows of it? Also the battery applet itself should say "Not charging" in the popup. Created attachment 93552 [details]
Support cumulative not charging state
upower says
state: charging
so it doesn't know it's not supposed to be charging anymore. Looks like a bug in upower.
Nonetheless this is a patch which makes it work with both battery monitor tooltip and the lock screen.
This might be different for older thinkpads using tp_smapi, but thinkpad_acpi (which is the only option for T430+) only differentiates between charging, discharging and unknown. Upower has some fallback logic in the case of unknown [1] resulting in the incorrect charging state. See upower bugs [2] [3]. If upower would just pass on the unknown state, we could report that as 'nocharge' (tlp does it that way too). I don't know if and for what models or drivers noCharge.patch is effective, but sadly it won't work for any thinkpad model currently being sold. [1] http://cgit.freedesktop.org/upower/tree/src/linux/up-device-supply.c#n692 [2] https://bugs.freedesktop.org/show_bug.cgi?id=90975 [3] https://bugs.freedesktop.org/show_bug.cgi?id=70321 Git commit f21932007092684f8dff10c0813eaa512436b568 by Kai Uwe Broulik. Committed on 26/03/2016 at 14:17. Pushed by broulik into branch 'master'. [Battery Monitor] Support explicit "not charging" state in tooltip The tooltip now goes as follows, if the AC is plugged in and the battery is not full: * Charging -> "charging" * NoCharge -> "plugged in, not charging" * Anything else -> "plugged in" (just not say "charging" when in doubt) M +5 -2 applets/batterymonitor/package/contents/ui/batterymonitor.qml http://commits.kde.org/plasma-workspace/f21932007092684f8dff10c0813eaa512436b568 Git commit 7180925594a16bff552b1cad241c26b4d6fce1a1 by Kai Uwe Broulik. Committed on 26/03/2016 at 14:20. Pushed by broulik into branch 'master'. [Lock Screen] Support "plugged in but not charging" state The icon always reflects the AC adapter state but the battery still might not be charging, so we should be more specific about that M +2 -0 lookandfeel/contents/components/InfoPane.qml http://commits.kde.org/plasma-workspace/7180925594a16bff552b1cad241c26b4d6fce1a1 Git commit 7ff6ef2a88b2d0f8d5b89b8d679b4501114db542 by Kai Uwe Broulik. Committed on 26/03/2016 at 14:13. Pushed by broulik into branch 'master'. [Powermangement Dataengine] Support "NoCharge" state for cumulative battery M +4 -0 dataengines/powermanagement/powermanagementengine.cpp http://commits.kde.org/plasma-workspace/7ff6ef2a88b2d0f8d5b89b8d679b4501114db542 I did a bunch of adjustments to support the "plugged in but not charging" usecase, please try again, if possible with a newer kernel/upower version that actually reports the proper value. Thanks! I upgraded to Plasma 5.7 but I can still reproduce this issue. The applets say just "Charging". Should we reopen this? I think the issue on your device was that upower still reports the battery is charging (ie. check upower -d), there's not a lot I can do about that, unfortunately. This needs to be fixed in the kernel/driver. Yeah, upower claims my battery is 'charging'.(In reply to Kai Uwe Broulik from comment #10) > I think the issue on your device was that upower still reports the battery > is charging (ie. check upower -d), there's not a lot I can do about that, > unfortunately. This needs to be fixed in the kernel/driver. Ah sorry, I misunderstood your comment #3 then. Yeah, upower claims my battery is 'charging'. I guess I will subscribe to upower bug #90975 pointed out by Joris. |