caffeine 2.9.4 isn't working on Ubuntu 16.04

Bug #1700419 reported by Greg Sharek on 2017-06-25
22
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Caffeine
Undecided
Unassigned
caffeine (Debian)
New
Undecided
Unassigned
caffeine (Ubuntu)
Undecided
Unassigned

Bug Description

Recently I noticed that caffeine 2.9.4 wasn't working any more on my Ubuntu 16.04 box. In https://bugs.launchpad.net/caffeine/+bug/1642380 they describe something similar.

First, looking at caffeine stdout, I see the following:

INFO:root:caffeine is inhibiting desktop idleness
Protocol error: bad 3 (Window); Sequence Number 13
 Opcode (20, 0) = GetProperty
 Bad resource 0 (0x0)
 at -e line 15.

Does that give you any info?

I also attempted to check xdg-screensaver as mentioned in the previous bug as follows:

Then, in a terminal, run

xdg-screensaver suspend `xwininfo | grep "Window id" | cut -d " " -f 4`

and click on the terminal window background. This should suspend the screensaver. Wait for the screensaver delay to check that the screen does not go off.

The screensaver was still enabled.

Greg Sharek (usnavi) on 2017-06-25
summary: - caffeine isn't working on Ubuntu 10.04
+ caffeine isn't working on Ubuntu 16.04
summary: - caffeine isn't working on Ubuntu 16.04
+ caffeine 2.9.4 isn't working on Ubuntu 16.04
description: updated
Reuben Thomas (rrt) wrote :

Thanks for investigating this.

Unfortunately, I can't reproduce this on my fully updated GNOME Ubuntu 16.04 system; I'll check again next time I log out or reboot, as that may well make a difference.

The "Protocol error: bad 3 (Window)" suggests that an invalid window ID is being given. The only obvious way that can happen is if the full-screen window closes in the interval between caffeine getting its ID, and passing that ID to xdg-screensaver. However, since the error appears after the line

INFO:root:caffeine is inhibiting desktop idleness

which is only printed after xdg-screensaver has returned, it suggests that maybe the inhibition did work after all. Could you check whether the error appears at the same time as the INFO line? (It may just be a question of stderr vs stdout ordering.)

Secondly, can you confirm whether the xdg-screensaver command gives any error? If it doesn't, then it looks like there is at least a bug in xdg-screensaver.

Greg Sharek (usnavi) on 2017-06-26
tags: added: indeed
Changed in caffeine:
status: New → Incomplete
Changed in caffeine (Ubuntu):
status: New → Incomplete
Launchpad Janitor (janitor) wrote :

[Expired for caffeine (Ubuntu) because there has been no activity for 60 days.]

Changed in caffeine (Ubuntu):
status: Incomplete → Expired
Reuben Thomas (rrt) wrote :

Just to confirm (sorry that I didn't do this earlier): Caffeine 2.9.4 continues to work for me on my fully-updated Ubuntu GNOME 16.04 systems.

I'm getting the same protocol error on Debian

:~$ caffeine

 INFO:root:caffeine is inhibiting desktop idleness
 Protocol error: bad 3 (Window); Sequence Number 11
  Opcode (20, 0) = GetProperty
  Bad resource 0 (0x0)
  at -e line 15.
 INFO:root:caffeine is no longer inhibiting desktop idleness

:~$ uname -a
 Linux #hostname 4.15.0-3-amd64 #1 SMP Debian 4.15.17-1 (2018-04-19) x86_64 GNU/Linux

Desktop env: xfce4
 Packagelist: https://pastebin.com/mEtQkU6P

Screensaver: xscreensaver
 Packagelist

 :~$ apt search xscreensaver |grep installed

 xscreensaver/stable,testing,unstable,now 5.36-1 amd64 [installed]
 xscreensaver-data/stable,testing,unstable,now 5.36-1 amd64 [installed]

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers