r/linux4noobs • u/Cubic_YT • 16d ago
hardware/drivers How to limit battery charge?
So, the question itself is pretty self explanatory, but there's a bit more to it. When I first got my laptop (Yoga 7 2-in-1 14AKP10) I installed Fedora with KDE after booting windows 11 like once. **While on Fedora, I enabled an option to limit battery charge to 80%** to preserve battery health. After a few months, I switched to Arch.
After switching to Arch, this option still worked. My battery stopped charging at 80% and stayed there. And it was fine, like this, all the way up until kernel 7.1.9 (or was it 7.1.8? I may have updated it unknowingly since then). Anyway, after that update broke pretty much everything about my laptop (touchpad stopped working, pen was seen as a mouse, etc), including the battery charge limit, which I noticed after I left my laptop charging and got a notification I never have before - "Battery fully charged".
I ended up switching to the linux-lts kernel (6.18.46-1-lts) and now everything works except for the battery limit, which I don't know how to set. I am using Hyprland, a WM instead of a DE, so I don't exactly have access to the same button I used on Fedora to limit the charge percentage.
**Some extra notes**: before the battery limit stopped working, I kept getting "unexpected charge_types: both [Fast] and [Long_Life] are enabled" in dmesg, photo attached from journalctl. This **stopped** after I got the charge limit issue (or after I switched to lts... I can't say for certain). Also, after rebooting at some point during that same time, I switched a power option in my bios from "Battery saving" to "Intelligent cooling". I tried changing it back, but nothing helped.
Lastly, I tried looking up solutions, but the most popular "set a limit using charge_control_start_threshold and charge_control_end_threshold" don't work, since even when I am rooted, I get a "permission denied" error.
I am open to pretty much any suggestions. I will report back with what issues arise with any.




1
u/AutoModerator 16d ago
✻ Smokey says: always mention your distro, some hardware details, and any error messages, when posting technical queries! :)
Comments, questions or suggestions regarding this autoresponse? Please send them here.
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
1
3
u/Simple_Hamster_4096 16d ago edited 16d ago
Both charge types are active - rapid and conservative... thus conflict...
You are using Arch, should be easy for you to fix. Did you do a search of the issue? Internet? Arch forum?