Which Linux distro are you using?Gentoo
Which kernel are you using? 6.14.7, plasma 6.3.90 ( aka plasma 6.4 beta 1)
Which BIOS version are you using? BIOS 03.03 03/10/2025
Which Framework Laptop 13 model are you using? AMD Ryzen AI 9 HX 370
Powerdevil reports org.kde.powerdevil.chargethresholdhelper.getthreshold failed "Charge thresholds are not supported by the kernel for this hardware"
Will charge levels be added to the/a kernel driver? I understand framewrok-system exists, but integration into desktop features through standard APIs would be nice.
I kinda wish it was adjustable down in the tray icon but I have systemd timers set up to change it anyway and that works for me. While I’m working, plugged in all day, it’s at 80%. Then an hour before I get off work I have a timer to set it to 100% for gaming or moving around the house on battery. This method works great for me.
This is what adds the sysfs location on mine. I assume you have probably installed it as well but it just doesn’t work for you yet:
It adds the /sys/class/power_supply/BAT1/charge_control_end_threshold which seems to be used by the kde settings app. When I unload this kernel module, that charge limit option completely disappears.
You should still be able to use the ectool command to set the levels. That’s what I use in my systemd timers and testing a moment ago shows it still works whether this additional kernel module is loaded or not.
If you are on 6.14, you should have access to the cros_charge_control module already. You may need to configure it ti enable probe_with_fwk_charge_control.
If your distributor is not packaging that module, file a bug on them.
Here in 2025, you no longer need my framework-laptop-kmod driver.
This is not working for me on 6.15.0-rc4. And I can not find any documentation anywhere that mentiones how to set probe_with_fwk_charge_control. I tried “true” and “1” and neither did anything to enable charge control. Your kernel module is the only one that works.
Hey DHowett, I just got off work and have more time to look in to this (and reboot). When I checked, dmesg had some errors about being unable to get the device because of the “framework_laptop” module taking it. Even after unloading “framework_laptop” module it still failed to work. So I commented out the load, blacklisted it, and rebooted.
Works now!
# ls -l /sys/class/power_supply/BAT1/*thre*
-rw-r--r-- 1 root root 4096 May 19 17:59 /sys/class/power_supply/BAT1/charge_control_end_threshold
-rw-r--r-- 1 root root 4096 May 19 17:58 /sys/class/power_supply/BAT1/charge_control_start_threshold
Thanks for the pointer. Can the github readme for that module be updated to inform of its obsolescence?
Also, looks like it probably doesn’t work for serafean as is.
EDIT: And for any who try this out. Setting this is required for it to work:
/etc/modprobe.d/cros_charge_control.conf
When using cros_charge_control, don’t use the BIOS settings or ectool. They are not compatible.
This is the whole reason the module parameter is needed.
I haven’t yet managed to convince the laptop to limit the charge.
The bios options are set, but don’t appear to do anything. cros_charge_control module doesn’t load automatically at boot, loading it manually with or without probe_with_fwk_charge_control doesn’t do anything. Not even a line in dmesg. lsmod output shows it as loaded though.
The only idea I have now is if the battery management somehow falls into a default ACPI handler, but I’m out of my depth here…
cros-charge-control cros-charge-control.6.auto: Framework charge control detected, preventing load
then reloading with probe_with_fwk_charge_control, and I have the threshold sysfs files, and UI in powerdevil.
Now I’ll test whether it actually works.
EC supported features:
1 : Flash support
2 : Direct Fan power management support
3 : Keyboard backlight support
5 : LED support
7 : Keyboard support
9 : BIOS Port 80h access support
10 : Thermal management support
13 : Host event support
14 : GPIO support
15 : I2C controller support
16 : Charger support
17 : Simple Battery support
18 : Smart Battery support
25 : Temporary secure vstore support
32 : Unified wake masks for LPC/eSPI support
33 : 64-bit host events support
34 : Execute code in RAM support
41 : TCPMv2 Type-C commands support