Bug 464650

Summary: Power management - "Stop charging at" option not being saved
Product: [Plasma] Powerdevil Reporter: selpix
Component: generalAssignee: Plasma Bugs List <plasma-bugs>
Status: RESOLVED DUPLICATE    
Severity: normal CC: fabian, me
Priority: NOR    
Version: 5.26.5   
Target Milestone: ---   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description selpix 2023-01-22 14:26:49 UTC
SUMMARY
Adjusting power manager "Stop charging at" doesn't save while "Start charging only once below" option saves correctly.
Journal reports warnings as follows:

Jan 22 15:13:55 localhost.localdomain systemsettings[2967]: Warning from helper: Failed to open "/sys/class/power_supply/wacom_battery_0/charge_control_start_threshold" for writing
Jan 22 15:13:55 localhost.localdomain org_kde_powerdevil[2622]: Warning from helper: Failed to open "/sys/class/power_supply/wacom_battery_0/charge_control_start_threshold" for writing
Jan 22 15:13:55 localhost.localdomain org_kde_powerdevil[2622]: Warning from helper: Failed to open "/sys/class/power_supply/wacom_battery_0/charge_start_threshold" for writing
Jan 22 15:13:55 localhost.localdomain systemsettings[2967]: Warning from helper: Failed to open "/sys/class/power_supply/wacom_battery_0/charge_start_threshold" for writing

Note that main battery is actually at BAT0 not wacom_battery.
Laptop model is "Lenovo Yoga L13 Gen 2" with integrated wacom stylus.

STEPS TO REPRODUCE
1. Open settings -> power -> advanced power settings
2. Try to change "Stop charging at" option
3. Click apply.

OBSERVED RESULT
"Stop charging at" option resets to default which is 100%.

EXPECTED RESULT
"Stop charging at" should be saved and display your selected percentage.

SOFTWARE/OS VERSIONS
Windows: N/A
macOS: N/A
Linux/KDE Plasma: OpenSUSE TW kernel 6.1.7
(available in About System)
KDE Plasma Version: 5.26.5
KDE Frameworks Version: 5.102.0
Qt Version: 5.15.8

ADDITIONAL INFORMATION
Comment 1 selpix 2023-01-22 15:05:15 UTC
Also forgot to mention that it should save to `/sys/class/power_supply/BAT0/charge_end_threshold`
Comment 2 Fabian Vogt 2023-01-26 12:00:24 UTC

*** This bug has been marked as a duplicate of bug 464535 ***