8

I recently updated from Ubuntu 18.04.4 to 20.04.1. Although Caffeine Indicator is listed in the Startup Applications ...

Screenshot of Startup Applications

... it does not automatically appear in the top status bar after I log-in. This worked in the former Ubuntu version.
Is there something I can do about it?

Environment

  • Caffeine Indicator version: 2.9.4
  • Window manager: Gnome 3.36.3
  • Desktop environment: ubuntu-wayland
  • Linux distribution: Ubuntu 20.04.1

Analysis

Starting the application from the shell produces the following output:

$ caffeine-indicator 
/usr/bin/caffeine-indicator:184: PyGIDeprecationWarning: Since version 3.11,
    calling threads_init is no longer needed. 
    See: https://wiki.gnome.org/PyGObject/Threading
  GObject.threads_init()
/usr/bin/caffeine-indicator:106: DeprecationWarning: 
    AyatanaAppIndicator3.Indicator.set_icon is deprecated
  self.AppInd.set_icon(icon_name)

When I activate it then this is output:

INFO:root:caffeine-indicator is inhibiting desktop idleness

Related

JJD
  • 832
  • 4
  • 19
  • 46

2 Answers2

5

The caffeine package includes three commands: caffeine,caffeinate and caffeine-indicator.

The caffeine is what is responsible for preventing idle, but it only runs in the background. You need to run the caffeine-indicator to control it form topbar.

Having both of those in the startup apps (one entry for /usr/bin/caffeine and one for /usr/bin/caffeine-indicator) works for me.


I'm on 20.04 and I've installed caffeine 2.9.4-2 using sudo apt install caffeine (the same as apt-get, btw)

Petr Doležal
  • 311
  • 1
  • 9
  • I manually added an entry for `/usr/bin/caffeine-indicator` to the startup applications, restarted, then the entry for `/usr/bin/caffeine` was gone. I manually added it back, restarted, both entries stayed. - Both times the caffeine-indicator did **not** show up in the topbar. – JJD Nov 11 '20 at 15:59
  • 2
    check if the processes for caffeine are present even though the indicator is not visible. Something such as `pstree | grep -C 500 caffeine` shows the full tree with the processes highlighted. This should help identify whether it's the caffeine malfunctioning, or if it's the "run on startup" malfunctioning. – Petr Doležal Nov 16 '20 at 11:30
  • 1
    There is no output from `pstree | grep -C 500 caffeine` or `pstree | grep caffeine`. – JJD Nov 16 '20 at 21:51
  • Ok, so it's not a problem of the version of caffeine you have. Something is blocking it from launching or is killing it. Try running it from a terminal (and sending it to the background) `caffeine & caffeine-indiator&` Does it appear on the pstree then? – Petr Doležal Nov 17 '20 at 22:09
  • Yes, it does. - Meanwhile, the indicator appeared by itself at some of the startups of the machine. On other times it did not. – JJD Nov 20 '20 at 13:54
  • None of those commands work on Ubuntu 20.04 for me. Like op said, the problem seems to be that the icon isn't showing, not that it isn't running. – Cerin Sep 09 '21 at 15:03
2

press Super and type extensions, then find caffeine there and go to its setting and enable show on top panel

Parag Katoch
  • 1,103
  • 2
  • 9
  • 34