I’m running a 12th Gen Intel FW 13 with Linux Mint 21.1 Cinnamon and kernel 6.1.0-1022-oem. The kernel is probably not a factor.
Whenever the FW is drawing power through one of its USB-C ports, the battery cycles between charge and discharge. NOTE: I’ve only used the stock FW power supply so the behaviour might be different with other power sources.
Whatever the Mint and/or Cinnamon devs are doing to detect whether the FW is on battery or AC power is unreliable. It seems that whenever the battery is discharging, whether connected to an external power source or not, the power management sub-system selects the “on battery” policy set for system state management.
I have (and want) quite aggressive on-battery policies. Consequently the system often puts itself to sleep while in use and connected to a stable external power supply.
I’d like to hack the state detection mechanism used by the power manager so that it can accurately and repeatedly detect when a stable external power supply is connected irrespective of whether the battery is charging or discharging.
Any clues as to where I should be looking are welcome.
I recall reading a post or posts related to this before but my search-fu isn’t able to unearth them. If you can direct me to other relevant threads, that too will be welcomed.
Hello and thanks for your contribution. I have no charge limit set in the firmware (i.e. the battery should recharge to 100%).
I don’t think it’s appropriate for me to engage with FW support. I have chosen to run an unsupported configuration. While this is annoying, it’s far from a show stopper and is most likely to hinge on two valid but subtly different interpretations of a poorly-documented standard or convention.
I’d be surprised if this is very distribution-dependent, since the fundamental information on this would come from the kernel. I have an 11th gen and there with an 80% charge limit configured I see the system toggle between charging and not charging when the battery is at its limit (even though the led remains white, so the embedded controller apparently mainly looks at whether the battery charge is at/near its set limit. It doesn’t affect power profiles, though. If you’re worried about whether the system “forgets” that there’s even a power supply connected, perhaps check the presence of /sys/class/power_supply/ACAD or something similar and/or /sys/class/power_supply/ACAD/online.
If your system is making profile decisions based solely on the value of /sys/class/power_supply/BAT1/status equalling charging or not, then that should probably be fixed, but I don’t think that the currently common linux tools do this.
Hey Matt, I need to manage your expectations. I’ll need several hours of testing spread over multiple days to answer your questions. Since I can’t do my job while running a Live ISO, I expect it might take a week or too before I can complete the observations you want.
I’m grateful for your help but as I said at the get-go, the issue is annoying but far from a show stopper.