Quantcast
Channel: PowerDevil activity
Viewing all articles
Browse latest Browse all 1684

Jakob Petsovits accepted merge request !510: daemon: Fix charge threshold support for Dell laptops, maybe more at Plasma / PowerDevil

$
0
0

Commit message

Some kernel drivers expose charge_types in addition to start/endcharge thresholds for power supply batteries. A prominent exampleis the dell_laptop starting with Linux 6.12, which supports(at least some) Dell Latitude laptops.

This commit will attempt to write a charge type on Linux systemsif the battery's charge_types file exists in sysfs.It will write Standard as charge type if the configuration asksfor fully charging the laptop, and Custom for all other chargethreshold values.

The KAuth helper also now supports writing explicitly providedcharge types, however the settings UI does not make use of this yet.

This commit does not (yet) implement reading current or supportedcharge types, because that's not useful without a settings UI.Note that charge threshold settings are only applied when valuesare changed, so any pre-existing charge type (e.g. Fast) won't betouched without an explicit interaction.

BUG: 497200

Testing

I tested that this doesn't break charge limit settings on my ThinkPad laptop, which has /sys/class/power_supply/BAT0/charge_control_{start,end}_threshold files and no /sys/class/power_supply/BAT0/charge_types.

I do not have a laptop with charge_types available for testing here. Before merging, someone who owns such a laptop should make sure that this MR actually fixes the problem for them. Thanks!


Viewing all articles
Browse latest Browse all 1684

Trending Articles