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.
@jschievink Regarding your inability to prevent the shutdown in an orderly fashion, read this for some background:
Be advised: it’s a depressing reading. In short: authoritarian tendencies of some free software developers at full display.
FYI, I’ve had a similar issue on a previous laptop (where the battery was at fault) and I believe I was able to prevent the shutdown by setting PercentageAction to 0 in /etc/UPower/UPower.conf.
Framework 12th gen i5-1240P, 3.04 firmware, Ubuntu/Kubuntu 23.10 and now 24.04.
While whatever is happening in the kernel happens regardless of DE, the alerts only pops up under KDE, not Gnome. What is interesting to me is that when warning appears, KDE seems to think that the battery state of charge is less than 10% (it will report varying numbers) and then within a second it will report the correct state of charge.
I do see the cros_ec_lpcs packet too long errors from dmesg.
My laptop generally stays plugged in, so I have enabled the charge limit at 75%. I have been charging the laptop through a USB-C hub so that I can have one connection to the laptop. Based on this thread I’m trying providing power on a different port that is directly connected to the power supply and not going through the USB-C hub. I use an Anker GaN power supply. I have already tried plugging the hub into different ports on the laptop. My next experiment if the dedicated power line doesn’t resolve it will be to use the OEM Framework charger, and I will also try switching the USB-C cable (one experiment at a time).
Have you ever had this problem with an OEM charger since?
I’ve had the same problem since I got my 12th gen Framework with KDE, regardless of the charger (140W PPS, 65W PPS, 60W PD, 30W PPS Phone charger) but I haven’t bought and tested an OEM charger yet.
It is pretty rare, but still occurring for me. Now on Arch 6.9.x kernel, and i5-13 Mainboard. It never says zero, but I do get random single digit numbers reported for current battery SOC, even if true SOC is 50+%.
No discernible pattern that I have found. Different chargers, different cables, etc and no change really. But it’s really rare when this occurs, maybe once a day at absolute maximum.
I get “low battery” toast warnings here on Arch/KDE with 12th-gen Intel. There are never any problems with charging, and the battery percentage in the tray icon is correct except while the warning is actually on-screen. These warnings appear randomly about once every half hour, with alleged battery values from 0% to 8%. Yes, it does say 0% sometimes.
I remember having this issue in the past, and it resolved itself in a few weeks. We’ll see if that happens again.
Just adding my personal experiences with this issue to the thread…
I have a 2023 Framework 13 (12th Gen Intel) that I initially installed Ubuntu 22.04 on, and later upgraded to Ubuntu 24.04.
I’ve been having a similar issue with the battery charge sporadically reporting a value below 10% for a second or two before going back to 90+%. The graph of the charge (according to the “Power Statistics” application) looks like this.
I see this behavior whether I’m discharging the battery or have my power adapter connected. I have set my battery charge limit in the BIOS to 96%, which is why the graphs never get to 100%.
I changed my battery from the 55Wh unit to the 61Wh unit about 2 months ago, and have continued to see this issue.
I saw the issue when I was running Ubuntu 22, and have continued to see the issue after upgrading to Ubuntu 24.
I’ll have to check and see if I see the cros_ec_lpcs cros_ec_lpcs.0: packet too long error that others have reported seeing in dmesg.
Just want to report I’ve also been seeing this regularly on an 11th gen i5. I very rarely use my laptop without the charger plugged in. Max battery percentage is set to 85% and I use either the Framework charger or a Steam Deck charger which both keep the laptop at 84 or 85%.
Every 20 mins to half an hour I get a random single-digit battery percentage reported, asking me to shut down or hibernate, and the following messages:
[97327.451094] cros_ec_lpcs cros_ec_lpcs.0: bad packet checksum f7
[98371.937386] cros_ec_lpcs cros_ec_lpcs.0: bad packet checksum f7
I’ve had these or the “bad packet length” messages for the memorable past (at least a year, maybe 2) and I’m somewhat surprised it hasn’t been fixed yet.