I’m on the 12th gen i5-1240P, running Arch Linux (kernel 6.5.6, older ones reproduce this issue too), and sometimes see the battery charge get misreported as 0%. This causes the system to immediately power down, which is extremely inconvenient. Has anyone seen similar behavior?
(the popup is lying, the battery is charging just fine)
dmesg output doesn’t show anything unusual, but a few instances of this EC error are present (I think those are normal though?):
[267610.915734] cros_ec_lpcs cros_ec_lpcs.0: packet too long (4 bytes, expected 0)
Based on the error itself, my first question is what power charger are you using and if it’s FW official, have you tried other outlets? If it’s not one of our chargers, what is the exact model and power provided?
Additionally, what is the output of:
(Should be 1)
and now let’s compare with, provide all output here as well:
I was seeing sort of similar behavior, also Arch 6.5.? x64 kernel Ave Plasma desktop, but on 11th Gen i5. Except my case it wouldn’t pop up 0%, it was a random number around 9%, so it didn’t force a shutdown. By the time I could try to troubleshoot, the battery reading was back to my charge target number. Haven’t seen it do it since my last kernel update a few days ago, but I’ll keep an eye out. I suspect a KDE/Plasma bug…
Using third party USB-PD 2.0 100W chargers and e-marked 5A cables, if it matters.
The error is wrong, the charger is working fine with the laptop. This has also happened to me before while on battery, around the time it discharged just below 70%, shutting down the machine. After turning it back on the battery charge was reported correctly again.
I will keep upower --monitor-detail running in the background in case it happens again. I hope that at least lets me find out what’s shutting down the machine when the battery reports 0% and how to stop it from doing that (KDE is configured to ignore low battery levels, so it must be something else doing it).
I’m not familiar with how exactly battery state is reported to the system, does it go through the EC? If so, could interference by the BIOS cause this, similar to how it causes the Fn key to stop working occasionally?
I’ve disabled and masked upower.service, which apparently is incapable of not shutting down the system when the battery reports 0%. Hopefully this will at least let me read the journal for anything suspicious and also run the commands you posted if this happens again.
+1 for me too! I also see the popup occasionally on my 12th gen i5-1240P. I am running kubuntu, and it would occasionally pop saying battery was at 5%, 9%, and so on. I never got around to finding out where it’s wrong though.
As for my device, I’ve seen it happen on different chargers in different places:
@Matt_Hartley This seems to be an issue in your firmware, so I do hope you are tracking it internally. Disabling the kernel modules can only work around the issue by reducing communication with the EC (so that the race condition is less likely to happen). I will give that a try though.