Summary: | Charging limit is not saved | ||
---|---|---|---|
Product: | [Applications] systemsettings | Reporter: | Iyán Méndez Veiga <me> |
Component: | kcm_powerdevil | Assignee: | Plasma Bugs List <plasma-bugs> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | fabian, kde, nate, selpix, victorr2007 |
Priority: | NOR | ||
Version: | 5.26.90 | ||
Target Milestone: | --- | ||
Platform: | Other | ||
OS: | Other | ||
See Also: | https://bugs.kde.org/show_bug.cgi?id=459081 | ||
Latest Commit: | https://invent.kde.org/plasma/powerdevil/commit/eed8ef2f06f29b1c8983b3af950349b7d603bb7f | Version Fixed In: | 5.27.1 |
Sentry Crash Report: | |||
Attachments: |
There are no settings.
Removed this commit. So good, now it works. |
Description
Iyán Méndez Veiga
2023-01-20 06:30:43 UTC
Reverting this fixes the issue for me: https://invent.kde.org/plasma/powerdevil/-/commit/a002ab4718760dfae156bd8fe8a17c59b0f09182 As additional info, my laptop has a pen with some battery that charges when stored in the laptop. It appears as wacom_battery_0 in /sys/class/power_supply. Maybe after that commit, powerdevil tries to changes the limit on the pen instead of the laptop's battery? *** This bug has been marked as a duplicate of bug 450551 *** I don't think it's the same bug. My mistake, sorry *** Bug 464650 has been marked as a duplicate of this bug. *** As requested in matrix. $ upower -d Device: /org/freedesktop/UPower/devices/line_power_AC native-path: AC power supply: yes updated: Thu 26 Jan 2023 10:45:16 (8045 seconds ago) has history: no has statistics: no line-power warning-level: none online: yes icon-name: 'ac-adapter-symbolic' Device: /org/freedesktop/UPower/devices/battery_BAT0 native-path: BAT0 vendor: Sunwoda model: 5B10W13975 serial: 24869 power supply: yes updated: Thu 26 Jan 2023 12:59:02 (19 seconds ago) has history: yes has statistics: yes battery present: yes rechargeable: yes state: pending-charge warning-level: none energy: 48.72 Wh energy-empty: 0 Wh energy-full: 56.99 Wh energy-full-design: 57 Wh energy-rate: 0 W voltage: 17.402 V charge-cycles: 172 percentage: 85% capacity: 99.9825% technology: lithium-polymer icon-name: 'battery-full-charging-symbolic' Device: /org/freedesktop/UPower/devices/battery_wacom_battery_0 native-path: wacom_battery_0 model: Wacom HID 527A power supply: no updated: Thu 01 Jan 1970 01:00:00 (1674734361 seconds ago) has history: yes has statistics: yes keyboard present: yes rechargeable: yes state: unknown warning-level: none percentage: 0% icon-name: 'battery-missing-symbolic' History (charge): 1674734361 0.000 unknown History (rate): 1674734361 0.000 unknown Device: /org/freedesktop/UPower/devices/line_power_ucsi_source_psy_USBC000o001 native-path: ucsi-source-psy-USBC000:001 power supply: yes updated: Thu 26 Jan 2023 10:45:16 (8045 seconds ago) has history: no has statistics: no line-power warning-level: none online: no icon-name: 'ac-adapter-symbolic' Device: /org/freedesktop/UPower/devices/line_power_ucsi_source_psy_USBC000o002 native-path: ucsi-source-psy-USBC000:002 power supply: yes updated: Thu 26 Jan 2023 10:45:21 (8040 seconds ago) has history: no has statistics: no line-power warning-level: none online: no icon-name: 'ac-adapter-symbolic' Device: /org/freedesktop/UPower/devices/DisplayDevice power supply: yes updated: Thu 26 Jan 2023 12:36:01 (1400 seconds ago) has history: no has statistics: no battery present: yes state: pending-charge warning-level: none energy: 48.72 Wh energy-full: 56.99 Wh energy-rate: 0 W charge-cycles: N/A percentage: 85% icon-name: 'battery-full-charging-symbolic' Daemon: daemon-version: 1.90.0 on-battery: no lid-is-closed: yes lid-is-present: yes critical-action: PowerOff $ cat /sys/class/power_supply/BAT0/type Battery $ cat /sys/class/power_supply/wacom_battery_0/type Battery After using the pen at least once (needs to touch the screen to report battery status) Device: /org/freedesktop/UPower/devices/battery_wacom_battery_0 native-path: wacom_battery_0 model: Wacom HID 527A power supply: no updated: Thu 26 Jan 2023 13:04:36 (11 seconds ago) has history: yes has statistics: yes keyboard present: yes rechargeable: yes state: fully-charged warning-level: none percentage: 100% icon-name: 'battery-full-charged-symbolic' History (charge): 1674734675 100.000 fully-charged FWICT the issue is that the helper stops if it fails to set the threshold on a battery instead of continuing with the other batteries. A possibly relevant merge request was started @ https://invent.kde.org/plasma/powerdevil/-/merge_requests/131 Patch works for me ;) Git commit e0a74cc3bd358abeb64b9a3857c00c1d71802553 by Fabian Vogt. Committed on 26/01/2023 at 13:13. Pushed by fvogt into branch 'master'. chargethresholdhelper: Filter out batteries without thresholds early Previously, getBatteries() returned all batteries, even those without support for thresholds. While getthreshold simply skipped those where reading fails, setthreshold exited early on the first failure, leaving the remaining batteries untouched. By already performing filtering in getBatteries(), this should now behave more consistently and work also if not all batteries support thresholds. M +14 -3 daemon/chargethresholdhelper.cpp https://invent.kde.org/plasma/powerdevil/commit/e0a74cc3bd358abeb64b9a3857c00c1d71802553 Git commit b2e33beeed1a7ba60fb20a784c3209f97b887b8f by Fabian Vogt. Committed on 26/01/2023 at 13:50. Pushed by fvogt into branch 'Plasma/5.27'. chargethresholdhelper: Filter out batteries without thresholds early Previously, getBatteries() returned all batteries, even those without support for thresholds. While getthreshold simply skipped those where reading fails, setthreshold exited early on the first failure, leaving the remaining batteries untouched. By already performing filtering in getBatteries(), this should now behave more consistently and work also if not all batteries support thresholds. (cherry picked from commit e0a74cc3bd358abeb64b9a3857c00c1d71802553) M +14 -3 daemon/chargethresholdhelper.cpp https://invent.kde.org/plasma/powerdevil/commit/b2e33beeed1a7ba60fb20a784c3209f97b887b8f Created attachment 156238 [details]
There are no settings.
This commit disables the battery limit setting.
Operating System: ROSA Fresh Desktop 2021.1
KDE Plasma Version: 5.27.0
KDE Frameworks Version: 5.103.0
Qt Version: 5.15.5
Kernel Version: 6.1.11-generic-4rosa2021.1-x86_64 (64-bit)
Graphics Platform: Wayland
Processors: 16 × 11th Gen Intel® Core™ i7-11800H @ 2.30GHz
Memory: 38.9 ГиБ of RAM
Graphics Processor: Mesa Intel® UHD Graphics
Manufacturer: ASUSTeK COMPUTER INC.
Product Name: ROG Zephyrus M16 GU603HE_GU603HE
System Version: 1.0
Created attachment 156239 [details] Removed this commit. Removed this commit by building the package with the parameter Patch1: https://invent.kde.org/plasma/powerdevil/-/commit/b2e33beeed1a7ba60fb20a784c3209f97b887b8.patch %prep %setup -n %{oname}-%{version} %patch1 -p1 -R What's the output of ls -l /sys/class/power_supply/*/*threshold*? I suspect the battery either has a start or stop threshold, but not both. (In reply to Victor Ryzhykh from comment #13) > Created attachment 156238 [details] > There are no settings. > > This commit disables the battery limit setting. > Settings are not available on this tab. but managed to enable the limit with package asusctl. Package asusctl works correctly in both cases. https://gitlab.com/asus-linux/asusctl (In reply to Fabian Vogt from comment #15) > What's the output of ls -l /sys/class/power_supply/*/*threshold*? > > I suspect the battery either has a start or stop threshold, but not both. victor@asus-rog ~ $ ls -l /sys/class/power_supply/*/*threshold -rw-r--r-- 1 root root 4096 фев 14 21:38 /sys/class/power_supply/BAT0/charge_control_end_threshold victor@asus-rog ~ $ su - Пароль: asus-rog ~ # ls -l /sys/class/power_supply/*/*threshold -rw-r--r-- 1 root root 4096 фев 14 21:38 /sys/class/power_supply/BAT0/charge_control_end_threshold asus-rog ~ # A possibly relevant merge request was started @ https://invent.kde.org/plasma/powerdevil/-/merge_requests/135 (In reply to Victor Ryzhykh from comment #17) > (In reply to Fabian Vogt from comment #15) > > What's the output of ls -l /sys/class/power_supply/*/*threshold*? > > > > I suspect the battery either has a start or stop threshold, but not both. > > victor@asus-rog ~ $ ls -l /sys/class/power_supply/*/*threshold > -rw-r--r-- 1 root root 4096 фев 14 21:38 > /sys/class/power_supply/BAT0/charge_control_end_threshold > victor@asus-rog ~ $ su - > Пароль: > asus-rog ~ # ls -l /sys/class/power_supply/*/*threshold > -rw-r--r-- 1 root root 4096 фев 14 21:38 > /sys/class/power_supply/BAT0/charge_control_end_threshold > asus-rog ~ # Ok, so my suspicion was correct. Please try https://invent.kde.org/plasma/powerdevil/-/merge_requests/135. (In reply to Fabian Vogt from comment #19) > Ok, so my suspicion was correct. Please try > https://invent.kde.org/plasma/powerdevil/-/merge_requests/135. /builddir/build/BUILD/powerdevil-5.27.0/daemon/chargethresholdhelper.cpp:67:16: error: expected identifier before '!' token (In reply to Victor Ryzhykh from comment #20) > (In reply to Fabian Vogt from comment #19) > > Ok, so my suspicion was correct. Please try > > https://invent.kde.org/plasma/powerdevil/-/merge_requests/135. > > /builddir/build/BUILD/powerdevil-5.27.0/daemon/chargethresholdhelper.cpp:67: > 16: error: expected identifier before '!' token Fixed. (In reply to Fabian Vogt from comment #21) > (In reply to Victor Ryzhykh from comment #20) > > (In reply to Fabian Vogt from comment #19) > > > Ok, so my suspicion was correct. Please try > > > https://invent.kde.org/plasma/powerdevil/-/merge_requests/135. > > > > /builddir/build/BUILD/powerdevil-5.27.0/daemon/chargethresholdhelper.cpp:67: > > 16: error: expected identifier before '!' token > > Fixed. So good, now it works. Created attachment 156245 [details]
So good, now it works.
So good, now it works.
Git commit d4fff0747290575705c09a2bfe265390d857d90a by Fabian Vogt. Committed on 15/02/2023 at 16:04. Pushed by fvogt into branch 'master'. Only skip batteries if neither start or stop thresholds are available Previously only those batteries which had both thresholds available were returned. M +4 -7 daemon/chargethresholdhelper.cpp https://invent.kde.org/plasma/powerdevil/commit/d4fff0747290575705c09a2bfe265390d857d90a Git commit eed8ef2f06f29b1c8983b3af950349b7d603bb7f by Fabian Vogt. Committed on 15/02/2023 at 16:09. Pushed by fvogt into branch 'Plasma/5.27'. Only skip batteries if neither start or stop thresholds are available Previously only those batteries which had both thresholds available were returned. (cherry picked from commit d4fff0747290575705c09a2bfe265390d857d90a) (cherry picked from commit 9cc6650a0b2946c80b62950f57ec6b50cb7aaed8) M +3 -6 daemon/chargethresholdhelper.cpp https://invent.kde.org/plasma/powerdevil/commit/eed8ef2f06f29b1c8983b3af950349b7d603bb7f |