Indicator-power stuck on the first value after logining

7,429

Solution 1

It's really disappointing to seek the help for a problem then even there is no reply, but also down voting for a problem affects my work. However I will leave the workaround in case some one else had the same issue:

The issue is in the GUI. It freezes, so killing it every 10 minutes will force it to update, so I made a cron job to do that:

crontab -e

Add this line to the end of the file witch will do the job every 10 minutes:

*/10 * * * * pkill -f indicator-power-service

Solution 2

I tried the above solutions, and they didn't work properly for me.

I also did a bunch of other things and I think the trick was:

    dconf reset -f /com/canonical/indicator/power/
    pkill -f indicator-power-service

After I fully restarted, the indicator seemed to work without issue, no need for the cron job!

BTW, on a side note, "acpi -V | grep Battery" was giving me the battery status, but "upower -d" was not. After the fix, both are working.

Also, be careful with Mindaugas's solution, because removing upower takes a bunch of packages with it, many essential for logging in (namely ubuntu-desktop). Make sure to keep a list of the packages removed and reinstall them or you could break your system! (I had to save myself with the Ctrl-Alt-F1 terminal and /var/log/dpkg.log)

Hope this helps someone!

UPDATE:

The issue actually came back after my fix, but re-running:

    dconf reset -f /com/canonical/indicator/power/
    pkill -f indicator-power-service

fixed the problem again.

Maybe both commands in a cron job would be the way to go!

Solution 3

I also had this problem. To solve this I did:

sudo apt-get remove upower
sudo apt-get install upower
sudo apt-get install indicator-power

Log out and log in to test if it is working.

Solution 4

For me the issue got fixed after uninstalling any gnome-related software.

All I had to do was to follow that tutorial:

How to revert unity and remove gnome desktop?

Hope that this answer is of any value for you.

Share:
7,429

Related videos on Youtube

Fat Mind
Author by

Fat Mind

Updated on September 18, 2022

Comments

  • Fat Mind
    Fat Mind over 1 year

    After removing the gnome shell the battery indicator stuck on the first value it shows when I log in i.e. if at start it was 100% it is still like that till the battery dies. Can you please help me to solve this issue?

    Update: tried the following command with no effect

    apt-get install indicator-power --reinstall

    UPDATE2 :

    # upower -d Device: /org/freedesktop/UPower/devices/line_power_AC   native-path:          AC   power supply:         yes   updated:        30 أكت, 2014 EET 09:13:30 م (1949 seconds ago)   has history:          no   has statistics:       no   line-power
        warning-level:       none
        online:              yes
        icon-name:          'ac-adapter-symbolic'
    
    Device: /org/freedesktop/UPower/devices/battery_BAT0   native-path:    BAT0   vendor:               SMP   model:                DELL MKD6223  serial:               2093   power supply:         yes   updated:      30 أكت, 2014 EET 09:45:30 م (29 seconds ago)   has history:          yes   has statistics:       yes   battery
        present:             yes
        rechargeable:        yes
        state:               charging
        warning-level:       none
        energy:              18.4704 Wh
        energy-empty:        0 Wh
        energy-full:         33.2667 Wh
        energy-full-design:  62.16 Wh
        energy-rate:         20.0355 W
        voltage:             12.404 V
        time to full:        44.3 minutes
        percentage:          55%
        capacity:            53.5179%
        technology:          lithium-ion
        icon-name:          'battery-good-charging-symbolic'   History (charge):
        1414698330  55.000  charging
    
    Device: /org/freedesktop/UPower/devices/DisplayDevice   power supply:  yes   updated:              01 ينا, 1970 EET 02:00:00 ص (1414698359 seconds ago)   has history:          no   has statistics:       no   battery
        present:             yes
        state:               charging
        warning-level:       none
        energy:              18.4704 Wh
        energy-full:         33.2667 Wh
        energy-rate:         20.0355 W
        time to full:        44.3 minutes
        percentage:          55%
        icon-name:          'battery-good-charging-symbolic'
    
    Daemon:   daemon-version:  0.99.1   on-battery:      no   lid-is-closed:   no   lid-is-present:  yes   critical-action: PowerOff
    
    • Elder Geek
      Elder Geek about 9 years
      I'm not certain if this is relevant to your problem as I'm on a desktop but I have daemon-version: 0.9.23 Running default unity on 14.04
    • fermat4214
      fermat4214 almost 7 years
      After I updated nautilus on Ubuntu 14.04, I experienced the same issue, thx for the workaround, it solved/patched the problem (pls check the comments section: askubuntu.com/questions/553419/…)
  • Harendra Singh
    Harendra Singh over 8 years
    After I did the above I couldn't login. It was giving error 'Failed Session'. To resolve that press ctrl + alt + F1 at login and the sudo apt-get install ubuntu-session
  • fermat4214
    fermat4214 almost 7 years
    So does it solve the problem?
  • Cédric Girard
    Cédric Girard almost 7 years
    It does for me, even if it seem dangerous to uninstall packages with dependances to upower, everything run fine. Thanks !
  • Andrés Parada
    Andrés Parada over 5 years
    This is dangerous after I put the first line of code I was locked out of the current session, I couldn't login even after several reboots. I had to reinstall the desktop and reconfigure gdm3 to login again..