Currently we have an option to set the battery charge limit in BIOS. However, that setting is not propagated to the kernel and thus is not visible to the userspace.
For example my KDE battery applet still shows the battery as charging even when upper limit is reached. Also, it incorrectly calculates the battery wear.
I suppose this happens because kernel does not provide the information in sysfs:
Note the missing thresholds and charge limit (90%) mistakenly treated as actual capacity.
Any ideas on what needs to be done to support that in the kernel? My understanding is thath it could be supported, since overall battery info is detected and is more or less accurate.
So, exposing the charge threshold in sysfs is something Iâm working on. The limit is mediated by the EC, and exposing it in sysfs requires the installation of a battery âextensionâ (itâs a kernel interface that allows one driver to add sysfs entries to an ACPI battery node owned by another driver.)
Iâm planning on seeking upstream approval for this patch soon. For now, though, some teasers:
Does charge_full/charge_full_design represent true battery wear? Iâve been using an 11th-gen laptop for 5 months and have battery charge capped at 80%. 10% wear seems too high.
Been wondering about it as well. My old-ish huawei laptop exposed those entries just fine, but the AMD framework does not - a pity. I actually used to change those depending on my use case, rebooting to BIOS is rather inconvenient, not to mention only the max charge can be changed.
Thanks for the heads up, but thatâs still a workaround for me. I do use the console, but Iâd like to make use of Plasmaâs powerdevil / activity profiles, which means GUI. Sadly, that only works if charge_control_start_threshold and charge_control_end_threshold are exposedâŚ
Hello @Loell_Framework , any chance that this feature request can be taken into consideration by the DEV team?
I have the same request and several other forum users as well. Only problem is that these requests are a bit scattered around in the forum.
Given its open nature, I would totally expect FW to expose this bit via sysfs eventually.
As another user mentioned, keeping a value of 80% is great for extending battery lifespan, but being able to ramp up to 100% before a long flight/trip would be a great usability improvement, without the need to fiddle with the BIOS.
@DHowett tagging you as you kindly started working on this as well
From the README however my understanding is that Iâd need to compile my own kernel, not just the module, is that still the case?
Iâm not familiar with that process at all, and of course when compared to compiling just a module, I think that it would be a different league of DIY
Hence my interest for this being upstreamed eventually. Are your upstream efforts still ongoing, and if so, is there an issue/URL I can monitor for progress?
Same here. I am happy compiling and installing a kernel module. A little less compiling a full kernel, especially since that means having to redo it on every (security or other) fedora supplied kernel update.
On Arch Linux, I installed linux-mainline-6.11rc4-1 from the chaotic-aur repo. I see that the keyboard backlight control and fan/temp sensors are working now, but /sys/class/power_supply/BAT1/charge_control_end_threshold is still missing, and I donât see the option to control it in KDE. According to the pull request, this should be provided by the cros_charge_control driver, and I do see that the driver is present and loaded
filename: /lib/modules/6.11.0-rc4-1-mainline/kernel/drivers/power/supply/cros_charge-control.ko.zst
license: GPL
author: Thomas WeiĂschuh <linux@weissschuh.net>
description: ChromeOS EC charge control
srcversion: 92B77CD0EA61B7EE89557CE
alias: platform:cros-charge-control
depends:
retpoline: Y
intree: Y
name: cros_charge_control
vermagic: 6.11.0-rc4-1-mainline SMP preempt mod_unload
sig_id: PKCS#7
signer: Build time autogenerated kernel key
sig_key: 32:D4:0F:FB:42:23:18:F3:60:32:42:67:82:C8:52:B0:40:99:F6:17
sig_hashalgo: sha512
signature: 30:66:02:31:00:97:7D:A2:59:7B:20:22:BF:F4:C0:38:81:0E:3C:0C:
00:D6:82:8C:69:9B:5E:F3:4C:FA:E9:7B:A8:A1:DA:B6:62:1F:AF:88:
90:53:3E:CA:95:1C:8D:FE:D0:90:1D:B1:A8:02:31:00:94:1A:B6:41:
6D:FE:1A:1E:F7:6C:6C:1D:B6:12:E0:0F:08:C3:96:ED:BD:0C:95:1C:
11:6F:FB:EF:6D:5D:DD:DC:FC:C5:D8:C3:68:9B:09:C2:1E:3C:10:D2:
9D:0A:12:24
parm: probe_with_fwk_charge_control:Probe the driver in the presence of the custom Framework EC charge control (bool)
Is this just something that will work once the final 6.11 release is out?