9

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
3kstc
  • 349
Fat Mind
  • 2,485

4 Answers4

8

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
David Foerster
  • 36,890
  • 56
  • 97
  • 151
Fat Mind
  • 2,485
4

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!

David
  • 141
1

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.

1

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.