Battery indicator has disappeared from Gnome panel

41,415

Solution 1

Note: Try steps 4/5 first, it may be fixed with 1st hit.

Below the extended instruction to debug the problem with the indicator.

  1. Check if indicator-power-service is running:

    ps ax | grep indicator-power
    
  2. If it's running, try reset its settings then restart it:

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

    No success, locate it then try it from terminal (looking for any errors in output):

    sudo updatedb; locate -r indicator-power-service$
    

    My system is 64bit, So:

    /usr/lib/x86_64-linux-gnu/indicator-power/indicator-power-service
    

    If it works with command, then some thing wrong with its autostart.

  3. As it was checked, it isn't running on start up. Verify the existence of:

    /usr/share/upstart/sessions/indicator-power.conf

    description "Indicator Power Backend"
    
    # Want to move to indicator-services-[start|end], but that's not all
    # there yet.  Use the signals that exist today for now.
    
    start on indicators-loaded or indicator-services-start
    stop on desktop-end or indicator-services-end
    
    respawn
    
    exec /usr/lib/x86_64-linux-gnu/indicator-power/indicator-power-service
    

    /etc/xdg/autostart/indicator-power.desktop

    [Desktop Entry]
    Type=Application
    Name=Indicator Power
    Exec=/usr/lib/x86_64-linux-gnu/indicator-power/indicator-power-service
    NotShowIn=Unity;
    NoDisplay=true
    StartupNotify=false
    Terminal=false
    
  4. This works for me with a fresh Ubuntu 14.04, Modifing indicator-power.desktop for autostart conditions similar to the other indicators. (Submitted bug report lp#1330302)

    sudo nano /etc/xdg/autostart/indicator-power.desktop

    Remove:

    NotShowIn=Unity;
    

    Replace it with:

    OnlyShowIn=Unity;XFCE;GNOME;
    AutostartCondition=GNOME3 unless-session gnome
    
  5. Logout/Login


Well if it didn't work:

  1. Try purge it then reinstall it:

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

    Reboot, Check again

  2. No success, as workaround you can run it this way (you may close terminal after this):

    /usr/lib/x86_64-linux-gnu/indicator-power/indicator-power-service & disown $!
    

    & run it in background
    disown $! command to detach a process for current terminal, $! variable that hold PID of last process run in background

    Or better if add it to user startup applications, see How do I start applications automatically on login?

Solution 2

(1)

sudo apt-get install indicator-applet-complete
sudo apt-get install dconf-editor

change icon-policy to present. This might help you.

enter image description here

(2)

If first one do not work you can try to install indicator-power by sudo apt-get install indicator-power. If indicator-power is already install then uninstall it and then reinstall. This might get the power indicator back on the panel. Have fun.

Share:
41,415

Related videos on Youtube

Questioner
Author by

Questioner

Updated on September 18, 2022

Comments

  • Questioner
    Questioner over 1 year

    I'm using Gnome Flashback (still the best!) on Ubuntu 14.04. In the Indicator app, it used to always show the battery level indicator. Now, it's missing entirely:

    no battery indicator

    I've looked in the power settings to make sure it's set to show no matter what:

    power settings

    I assume "When battery is present" means "show the battery indicator whether charging or plugged in or whatever, just as long as the physical battery is in the laptop." I also tried the other option, "When battery is charging or in use", but that doesn:t make a difference.

    The battery indicator was there consistently since upgrading to 14.04 a month ago, and has only started to be shy about appearing within maybe the last few days. So far as I know, I haven't done anything to alter any settings regarding power or indicators or applets that would have any impact on this.

    Why is my power indicator missing, and how do I get it back?

  • Questioner
    Questioner almost 10 years
    Thank you for this response. icon-policy was already set to present. I also have show-percentage and show-time checked on.
  • Questioner
    Questioner almost 10 years
    I tried the second suggestion of reinstalling the package, but it does not seem to have changed anything.
  • Questioner
    Questioner almost 10 years
    Thank you for this answer. I have both the files you mention in point 3, and they have the exact same contents as you. I can successfully run the command you offer and close a terminal window, but after I reboot, the power indicator is not there. I'd like to not have to run that command every time I restart. I seem to have all the power indicator components, but it does not automatically start. Is there a way I can get it to be there every time I start my computer?
  • Questioner
    Questioner almost 10 years
    I tried the cp command, and rebooted, but, unfortunately, my battery indicator did not appear after logging in.
  • Questioner
    Questioner almost 10 years
    Logging in as a guest session, the battery indicator is not there. I could add the command to the startup commands list, but is that a workaround? It seems that the battery indicator should already be displaying without having to explcitly run it in the startup applications.
  • Questioner
    Questioner almost 10 years
    Okay, I've added the command to my list of startup applications for now, though I hesitate to consider the matter closed. It would be nice to have a solution that addressed the issue of why it was my battery indicator disappeared in the first place.
  • RCF
    RCF almost 10 years
    You may have already tried or checked this, but if you are running the Unity Tweak Tool there is a selection for Panel that includes power indicator visiblility.
  • user.dz
    user.dz almost 10 years
    @DaveMG, any error in ~/.cache/upstart/unity-panel-service.log ?
  • Questioner
    Questioner almost 10 years
    Thank you for your continued help. I looked for that log, but No such file or directory. Also, I'm not sure if it makes a difference, but, as mentioned in the question, I'm not using Unity, I'm on Gnome Flashback.
  • user.dz
    user.dz almost 10 years
    @DaveMG, Yep, I forgot that. I have updated answer with mod to .desktop file, which works for me in Ubuntu 14.04
  • Questioner
    Questioner almost 10 years
    The updated .desktop edit that you suggest in step 4 solved it. Nice work! Thanks for your help.
  • Ad Infinitum
    Ad Infinitum about 7 years
    You are great. After the first two steps, my power indicator came back :)
  • user2342558
    user2342558 over 5 years
    Thanks, for me it's enough to run pkill -f indicator-power-service to make it reappear.