Caffeine can't connect to display since Ubuntu 15.04 upgrade

Bug #1460226 reported by halfbeing
50
This bug affects 10 people
Affects Status Importance Assigned to Milestone
Caffeine
Confirmed
Undecided
Unassigned
caffeine-developers-ppa (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Today I upgraded from Ubuntu 14.10 to 15.04. Since then I have been unable to launch Caffeine because it can't connect to the display. I get the following error message:

Traceback (most recent call last):
  File "/usr/bin/caffeine", line 36, in <module>
    ewmh = EWMH()
  File "/usr/lib/python3/dist-packages/ewmh.py", line 50, in __init__
    self.display = _display or display.Display()
  File "/usr/lib/python3/dist-packages/Xlib/display.py", line 80, in __init__
    self.display = _BaseDisplay(display)
  File "/usr/lib/python3/dist-packages/Xlib/display.py", line 62, in __init__
    display.Display.__init__(*(self, ) + args, **keys)
  File "/usr/lib/python3/dist-packages/Xlib/protocol/display.py", line 129, in __init__
    raise error.DisplayConnectionError(self.display_name, r.reason)
Xlib.error.DisplayConnectionError: Can't connect to display ":0": b'Invalid MIT-MAGIC-COOKIE-1 key'

Revision history for this message
Reuben Thomas (rrt) wrote :

I'm sorry, I don't have time to test non-LTS versions. If anyone else can help with this I'd be most grateful.

Revision history for this message
rafael_henrique (rhsolive) wrote :

It appears to be a problem with permissions in the Xauthority file. Giving read and write permissions to others into this file may solve the problem, but may decrease the security level.

Revision history for this message
Reuben Thomas (rrt) wrote :

I'm now using the LTS vivid X stack on my 14.04 machine and am getting this error, which appears to be caused by a python3-xlib bug: https://github.com/LiuLang/python3-xlib/issues/6

However, this bug is fixed in 15.04's python3-xlib 0.14+20091101-1ubuntu3. The date (17 Mar 2015) suggests it would have shipped with 15.04 (i.e. not be a later update), but I guess it could be.

Can anyone confirm they see this bug with 15.04 or later with up-to-date packages?

Revision history for this message
Alain Rouet (alain-rouet) wrote :

I can confirm that:
- I never got this error message on Ubuntu 15.04
- it only appeared, on Ubuntu 14.04, after updating to Vivid kernel and X stack
- installing "python3-xlib" from Vivid repository resolved the issue

Revision history for this message
Waz (paviluf) wrote :

I have the same error on Ubuntu 14.04 after updating to Vivid kernel and X.

Waz (paviluf)
Changed in caffeine:
status: New → Confirmed
Revision history for this message
Waz (paviluf) wrote :
Revision history for this message
Ed Guenter (edgue) wrote :

Same here: upgraded to 14.04.4 today; and caffeine stops working with the errors listed above.

Revision history for this message
Waz (paviluf) wrote :

Reuben Thomas do you think you can fix this or it's python-xlib that have to be fixed ?

Revision history for this message
Waz (paviluf) wrote :

It seems that it will be fixed in python-xlib finally.
https://bugs.launchpad.net/ubuntu/+source/python-xlib/+bug/1482844

Revision history for this message
a903user (a903user) wrote :

I can confirm this bug in Ubuntu 14.04 after upgrade to the version 14.04.3 where is kernel 3.19 and x.org 1.17. Will be this bug fix in caffeine?

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in caffeine-developers-ppa (Ubuntu):
status: New → Confirmed
Revision history for this message
Joseph Aczel (jaczel) wrote :

Can confirm that on 14.04, installing the Vivid Vervet python3-xlib package will resolve the bug.

Revision history for this message
a903user (a903user) wrote :

I can also confirm this solution (upgrade python3-xlib). But it is not solution for a common user. They do not know how to do it.

Package python3-xlib in Ubuntu:

Ubuntu 14.04 - version (0.14+20091101-1ubuntu2)
Ubuntu 15.04 - version (0.14+20091101-1ubuntu3)

http://packages.ubuntu.com/search?suite=all&searchon=names&keywords=python3-xlib

Revision history for this message
Peter Maciejko (corsseir) wrote :

I also have this bug, when are you going to fix it?

Revision history for this message
n4rps@outlook.com (n4rps-z) wrote :

Hello!

This only seems to affect those who have upgraded to 14.04.3. It's not THEIR bug, so they're probably not going to 'fix' it.

I couldn't find version (0.14+20091101-1ubuntu3) in 32-bit, but here's a link to the amd64 version:

https://launchpad.net/ubuntu/vivid/amd64/python3-xlib/0.14+20091101-1ubuntu3

For me, going there asked me to download the .deb file. I Installed it using gdebi, rebooted, and caffeine now works as it should.

I consider myself a 'common user', and the whole process was considerably less than rocket science for me. Of course, YMMV...

Revision history for this message
n4rps@outlook.com (n4rps-z) wrote :

Hello!

Oops, wrong link. Don't see any way to delete or edit; perhaps someone who can will fix it to reflect the following:

http://mirrors.kernel.org/ubuntu/pool/universe/p/python-xlib/python3-xlib_0.14+20091101-1ubuntu2_all.deb

My apologies...

Revision history for this message
n4rps@outlook.com (n4rps-z) wrote :
Revision history for this message
oriolpont (oriolpont) wrote :

Even with these upgraded versions I keep getting:

UnicodeDecodeError: 'utf-8' codec can't decode byte 0xc0 in position 0: invalid start byte

Version 0.14+20091101-5 which is currently in debian unstable (https://packages.debian.org/sid/python3-xlib) solved this.

Revision history for this message
kay (kay-diam) wrote :

python3-xlib_0.14+20091101-1ubuntu3_all.deb didn't solve the issue. I receive:

Traceback (most recent call last):
  File "/usr/bin/caffeine", line 36, in <module>
    ewmh = EWMH()
  File "/usr/lib/python3/dist-packages/ewmh.py", line 50, in __init__
    self.display = _display or display.Display()
  File "/usr/lib/python3/dist-packages/Xlib/display.py", line 80, in __init__
    self.display = _BaseDisplay(display)
  File "/usr/lib/python3/dist-packages/Xlib/display.py", line 62, in __init__
    display.Display.__init__(*(self, ) + args, **keys)
  File "/usr/lib/python3/dist-packages/Xlib/protocol/display.py", line 129, in __init__
    raise error.DisplayConnectionError(self.display_name, r.reason)
Xlib.error.DisplayConnectionError: Can't connect to display ":0": b'Invalid MIT-MAGIC-COOKIE-1 key'

Old python3-xlib_0.14+20091101-1ubuntu2_all.deb returns:

Traceback (most recent call last):
  File "/usr/bin/caffeine", line 36, in <module>
    ewmh = EWMH()
  File "/usr/lib/python3/dist-packages/ewmh.py", line 50, in __init__
    self.display = _display or display.Display()
  File "/usr/lib/python3/dist-packages/Xlib/display.py", line 80, in __init__
    self.display = _BaseDisplay(display)
  File "/usr/lib/python3/dist-packages/Xlib/display.py", line 62, in __init__
    display.Display.__init__(*(self, ) + args, **keys)
  File "/usr/lib/python3/dist-packages/Xlib/protocol/display.py", line 129, in __init__
    raise error.DisplayConnectionError(self.display_name, r.reason)
Xlib.error.DisplayConnectionError: Can't connect to display ":0": b'No protocol specified\n'

ubuntu 14.04 lts with 3.19.0-30-generic kernel from vivid and xserver-xorg-lts-vivid 1:7.7+7ubuntu3~trusty1

Revision history for this message
kay (kay-diam) wrote :

python3-xlib_0.14+20091101-5_all.deb doesn't fix the issue too:

Traceback (most recent call last):
  File "/usr/bin/caffeine", line 36, in <module>
    ewmh = EWMH()
  File "/usr/lib/python3/dist-packages/ewmh.py", line 50, in __init__
    self.display = _display or display.Display()
  File "/usr/lib/python3/dist-packages/Xlib/display.py", line 80, in __init__
    self.display = _BaseDisplay(display)
  File "/usr/lib/python3/dist-packages/Xlib/display.py", line 62, in __init__
    display.Display.__init__(*(self, ) + args, **keys)
  File "/usr/lib/python3/dist-packages/Xlib/protocol/display.py", line 129, in __init__
    raise error.DisplayConnectionError(self.display_name, r.reason)
Xlib.error.DisplayConnectionError: Can't connect to display ":0": b'Invalid MIT-MAGIC-COOKIE-1 key'

Revision history for this message
kay (kay-diam) wrote :

rm .Xauthority and relogin has solved the issue.

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

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.