You are not logged in.

#1 2013-07-30 18:15:37

alexduf
Member
Registered: 2012-12-16
Posts: 14

Wrong battery info, X1 Carbon, upower and hibernation

Hi,

I'm running archlinux on a Lenovo X1 carbon, and I noticed that since a few days, the battery indicator on my gnome 3 desktop is giving me wrong indications.
I searched on this very forum without finding anything looking alike, and the only "trick" I found is to restart the upower daemon each time I open the lid of my computer.

systemctl restart upower

This is kind of problematic since if I forget to restart the daemon my computer will simply shutdown without notification when it's running out of power.

I don't see anything wrong in dmesg. And the application showing the stats of my battery is completely empty.
I was wondering if any of you had any idea of what is going on here ? Any help would be greatly appreciated !

Offline

#2 2013-08-02 17:35:03

alexduf
Member
Registered: 2012-12-16
Posts: 14

Re: Wrong battery info, X1 Carbon, upower and hibernation

When I read back what I wrote, it turns out I might not have been very clear.

Each time I close the lid of my computer, my computer put itself in an hibernation state.
When I open it again, the battery indicator is wrong : It keeps displaying the last measured value before the hibernation, and does not updates. This eventually leads to a hardware poweroff since the software is not able to tell when the battery will run out of energy (which is quite annoying)

It was working a few weeks ago so I suspect an update to have broken that, but I wasn't able to find which one.
After searching for a while, I saw that restarting the upower daemon would temporarily fix the problem, but I can't find any way to fix that in a proper way.

Does any of you have encountered this problem ?
What kind of information should I post here to help anyone helping me ?

Many thanks !

Offline

#3 2013-08-02 17:39:22

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,529
Website

Re: Wrong battery info, X1 Carbon, upower and hibernation

I don't use hibernation - but I've heard hibernation in linux described as perpetually 'beta'.  The good news is there a wide range of work arounds.  It seems you've already found your work around here: restart upower.  The trick now is to automate that command upon reawakening ("thawing" ?).

Without being a 'hibernator' I don't know off the top of my head where it is, but there are places where you can set pre-hibernate and post-wake 'hooks' which could run the restart upower command.  Perhaps adding terms like those 'post hibernate hook' would aid in your search - or check the documentation for your hibernation method to see if it mentions such things.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#4 2013-08-04 10:28:31

NickHu
Member
Registered: 2011-01-18
Posts: 8

Re: Wrong battery info, X1 Carbon, upower and hibernation

I own the same laptop, and UPower seems broken (and unpollable) to me even upon first boot. This is a regression from about 3 weeks ago.

Offline

Board footer

Powered by FluxBB