I have two batteries for my laptop of differing capacities. I took out the larger battery today and hot swapped it for the smaller battery as I had not used it in a while an I wanted to make sure it didn't discharge too far. (Note: Technically it is probably more accurate to call it a "warm" swap. I basically went to suspend, but mainly for convenience because I have to shut the lid to flip the unit over to swap batteries, and my system is set to suspend when the lid closes.)
But after swapping the battery, the Xfce Power Manager reports strange values. For instance, it said it would take about 60 hours to charge the battery. After a couple of hours it has charged up to 80% and is still saying close to 6 hours are left to charge. Under devices it says that fully charged the battery is 66.2Wh. But if I swap back to the larger battery the battery name (e.g. LG 45NXXXX) doesn't change, and the battery size doesn't change either. This is making me wonder if it thinks the smaller battery is still the larger battery and might try to overcharge it thinking it has the higher capacity.
Is this something I need to worry about? Is there some command I can run to "reset" things so it properly recognizes the new battery?
The command
xfce4-power-manager --restart
will restart the running power manager instance. You may also use the commandxfce4-power-manager --no-daemon
which may be useful in debugging to possibly determine if/why power manager is picking up erroneous values.xfce4-power-manager
gets support for devices from the upowerd daemon.In order to pick up changes to reported device IDs and capacity, you may need to also restart that service. This can be done with the command
sudo systemctl restart upower
.To see the device details directly from upower, use the command
upower -d
.Your output will be something like this: