value "-nan" of type 'gdouble' is invalid or out of range for property 'percentage' of type 'gdouble'
Since a couple of days, my laptop doesn't read the battery percentage correctly and subsequently shuts down. It does seem to notice it is charging (doesn't shut down when plugged it), but the GNOME power manager says it's not charging when it actually is.
"Not reading correctly" means that first, the percentage was stuck at wrong levels (seemingly random, like 59% or 10%), now it's stuck at 0% which means it will immediately attempt to shut down when not plugged in. At first, a rebott fixed it for a few minutes, now this isn't the case any more.
System:
- ThinkPad X1 Yoga Gen 4
- NixOS / GNOME 44.3 / Wayland
Linux <hostname> 6.4.10 #1-NixOS SMP PREEMPT_DYNAMIC Fri Aug 11 10:14:29 UTC 2023 x86_64 GNU/Linux
systemctl status upower.service
● upower.service - Daemon for power management
Loaded: loaded (/etc/systemd/system/upower.service; linked; preset: enabled)
Active: active (running) since Sat 2023-08-19 11:32:08 CEST; 35min ago
Docs: man:upowerd(8)
Main PID: 9815 (upowerd)
IP: 0B in, 0B out
Tasks: 4 (limit: 18903)
Memory: 2.7M
CPU: 113ms
CGroup: /system.slice/upower.service
└─9815 /nix/store/4iprsqd20gnbrzp9mdw695sba5gicgvl-upower-1.90.2/libexec/upowerd
Aug 19 12:03:10 <hostname> upowerd[9815]: value "-nan" of type 'gdouble' is invalid or out of range for property 'percentage' of type 'gdouble'
Aug 19 12:03:40 <hostname> upowerd[9815]: value "-nan" of type 'gdouble' is invalid or out of range for property 'percentage' of type 'gdouble'
Aug 19 12:04:10 <hostname> upowerd[9815]: value "-nan" of type 'gdouble' is invalid or out of range for property 'percentage' of type 'gdouble'
Aug 19 12:04:40 <hostname> upowerd[9815]: value "-nan" of type 'gdouble' is invalid or out of range for property 'percentage' of type 'gdouble'
Aug 19 12:05:10 <hostname> upowerd[9815]: value "-nan" of type 'gdouble' is invalid or out of range for property 'percentage' of type 'gdouble'
Aug 19 12:05:40 <hostname> upowerd[9815]: value "-nan" of type 'gdouble' is invalid or out of range for property 'percentage' of type 'gdouble'
Aug 19 12:06:10 <hostname> upowerd[9815]: value "-nan" of type 'gdouble' is invalid or out of range for property 'percentage' of type 'gdouble'
Aug 19 12:06:40 <hostname> upowerd[9815]: value "-nan" of type 'gdouble' is invalid or out of range for property 'percentage' of type 'gdouble'
Aug 19 12:07:10 <hostname> upowerd[9815]: value "-nan" of type 'gdouble' is invalid or out of range for property 'percentage' of type 'gdouble'
Aug 19 12:07:40 <hostname> upowerd[9815]: value "-nan" of type 'gdouble' is invalid or out of range for property 'percentage' of type 'gdouble'
upower --version
UPower client version 1.90.2
UPower daemon version 1.90.2
If you need any more information, please let me know. I'm happy to provide it! And thanks for your work on this software!