Package Details: caffeine 2.9.12-1

Git Clone URL: (read-only, click to copy)
Package Base: caffeine
Description: Keep your computer awake.
Upstream URL:
Licenses: GPL3
Submitter: micwoj92
Maintainer: None
Last Packager: micwoj92
Votes: 2
Popularity: 0.001809
First Submitted: 2022-06-12 03:25 (UTC)
Last Updated: 2022-07-18 01:23 (UTC)

Dependencies (5)

Required by (1)

Sources (1)

Latest Comments

micwoj92 commented on 2022-08-02 07:21 (UTC)

Try searching that error on internet. It seems to have different solutions and I don't know your setup so unfortunately I am not able to help you.

holyArch commented on 2022-08-01 18:16 (UTC) (edited on 2022-08-01 18:20 (UTC) by holyArch)

It crashes.

Traceback (most recent call last):
  File "/usr/bin/caffeine", line 38, in <module>
    ewmh = EWMH()
  File "/usr/lib/python3.10/site-packages/ewmh/", line 70, in __init__
    self.display = _display or display.Display()
  File "/usr/lib/python3.10/site-packages/Xlib/", line 89, in __init__
    self.display = _BaseDisplay(display)
  File "/usr/lib/python3.10/site-packages/Xlib/", line 71, in __init__
    protocol_display.Display.__init__(self, *args, **keys)
  File "/usr/lib/python3.10/site-packages/Xlib/protocol/", line 166, in __init__
    raise error.DisplayConnectionError(self.display_name, r.reason)
Xlib.error.DisplayConnectionError: Can't connect to display ":0.0": b'Invalid MIT-MAGIC-COOKIE-1 key'

Raansu commented on 2022-07-12 14:39 (UTC)

I'm using Gnome and Wayland here but it seems to be down to the use of 'xdg-screensaver'. The 'xdg-utils' Arch Linux package has 'perl-net-dbus' and 'perl-x11-protocol' listed as optdepends for 'xdg-screensaver'. It's only an issue if your system makes use of 'xdg-screensaver'

micwoj92 commented on 2022-07-12 12:10 (UTC) (edited on 2022-07-12 12:12 (UTC) by micwoj92)

I do not have this issue with indicator on my 2 pcs. I don't think that caffeine contains a single line of perl code, so I this this is highly improbable that it needs some perl modules. Maybe you are using some panel/desktop environment that uses perl for that. I have no idea, using lxde and xfce4 here, both on x11.

Also this package states optdependency on libayatana-appindicator, without it i have this error

Traceback (most recent call last):
  File "/usr/bin/caffeine-indicator", line 32, in <module>
    gi.require_version('AyatanaAppIndicator3', '0.1')
  File "/usr/lib/python3.10/site-packages/gi/", line 126, in require_version
    raise ValueError('Namespace %s not available' % namespace)
ValueError: Namespace AyatanaAppIndicator3 not available

Raansu commented on 2022-07-12 11:23 (UTC)

@micwoj92 one more issue. 'caffeine-indicator' will fail to work if 'perl-net-dbus' and 'perl-x11-protocol' are not installed. I get the following error messages without those two packages installed. I suggest they should be added as optdepends for 'caffeine-indicator'.

INFO:root:caffeine-indicator is inhibiting desktop idleness
Can't locate Net/ in @INC (you may need to install the Net::DBus module) (@INC contains: /usr/lib/perl5/5.36/site_perl /usr/share/perl5/site_perl /usr/lib/perl5/5.36/vendor_perl /usr/share/perl5/vendor_perl /usr/lib/perl5/5.36/core_perl /usr/share/perl5/core_perl) at -e line 6.
BEGIN failed--compilation aborted at -e line 6.
INFO:root:caffeine-indicator is inhibiting desktop idleness
Can't locate X11/ in @INC (you may need to install the X11::Protocol module) (@INC contains: /usr/lib/perl5/5.36/site_perl /usr/share/perl5/site_perl /usr/lib/perl5/5.36/vendor_perl /usr/share/perl5/vendor_perl /usr/lib/perl5/5.36/core_perl /usr/share/perl5/core_perl) at -e line 7.
BEGIN failed--compilation aborted at -e line 7.

micwoj92 commented on 2022-07-12 10:02 (UTC)

Disregard previous comment, I'll apply your patch later today.

Raansu commented on 2022-07-12 10:01 (UTC)

I added py_modules=[] to per the suggestions I got out of the bug report I linked to in my previous message and that solved the issue. My patch for it is here:

I also let the caffeine developers know about the issue here:

Raansu commented on 2022-07-12 09:38 (UTC) (edited on 2022-07-12 09:38 (UTC) by Raansu)

The issue seems related to this

Raansu commented on 2022-07-12 08:39 (UTC)

@micrwoj92 I'm seeing the following build error message below on two separate systems. Do you know what might be the issue?

 error: Multiple top-level packages discovered in a flat-layout: ['etc', 'share', 'translations'].

To avoid accidental inclusion of unwanted files or directories,
setuptools will not proceed with this build.

If you are trying to create a single distribution with multiple packages
on purpose, you should not rely on automatic discovery.
Instead, consider the following options:

1. set up custom discovery (`find` directive with `include` or `exclude`)
2. use a `src-layout`
3. explicitly set `py_modules` or `packages` with a list of names

To find more information, look for "package discovery" on setuptools docs.
==> ERROR: A failure occurred in build().