Battery charge control #23
Labels
No labels
???
bug
docs
enhancement
help wanted
indev
question
research
tbr
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: NG-SD-Plugins/PowerTools#23
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Describe what you'd like to be able to do
Control battery charge rate
Describe alternatives you've considered
Live with the battery charging settings as-is. Not great for power users, though.
Additional context
as root, write to /sys/class/hwmon/hwmon5/maximum_battery_charge_rate (max input current in mA). Range is 250 to 2500, default is 2500. If you write 250 here the battery will charge really slowly while still allowing you to play on AC power
to check input current to the battery right now: /sys/class/power_supply/BAT1/current_now (check input current in uA)
(from https://discord.com/channels/865611969661632521/865651345083203644/1003509877915795507 )
I've discussed this with a couple of people before as well, but this is the first time I decided to actually write it down lol
Disassembly of the Deck's DSDT ACPI table with the
CHGR
method: https://gist.github.com/coolbho3k/47e4eeb37c8927ff703c40fab2bb4e11#file-steam_deck_dsdt-dsl-L5270Writing to
maximum_battery_charge_rate
callsCHGR
with the specified argument.The disassembly is how I know that only 250 <= x <= 2500 works.
Also see
drivers/platform/x86/jupiter.c
in the kernel tree, wheremaximum_battery_charge_rate
device is defined.Thanks again for the work to figure out this API. It's currently working on the main branch, and will be in the next release version.