Caffeine not working in Ubuntu 16.04

Bug #1699898 reported by Sharan Duggirala
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Caffeine
Invalid
Undecided
Unassigned

Bug Description

Trying to make caffeine run on my Ubuntu 16.04, and it doesn't seem to work.

`lsb_release -a` gives me:

Distributor ID: Ubuntu
Description: Ubuntu 16.04.1 LTS
Release: 16.04
Codename: xenial

When I invoke the command `caffeine`:

/usr/bin/caffeine:25: PyGIWarning: Gtk was imported without specifying a version first. Use gi.require_version('Gtk', '3.0') before import to ensure that the right version gets loaded.
  from gi.repository import GObject, Gtk, GLib

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

Please can you try the latest version from the PPA (2.9.4) if you're not using it already?

If you are, which flavour/desktop are you using?

Revision history for this message
Sharan Duggirala (sd12832) wrote :

Could you please guide me on how to get the latest version from PPA 2.9.4?

I am currently using gnome on Ubuntu?

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

You can find instructions on the PPA page: https://launchpad.net/~caffeine-developers/+archive/ubuntu/ppa

I'm using Caffeine 2.9.4 with Ubuntu GNOME, so it should be OK!

Revision history for this message
Sharan Duggirala (sd12832) wrote :
Download full text (4.0 KiB)

I get the error below:

Traceback (most recent call last):
  File "/usr/lib/python3.5/urllib/request.py", line 1254, in do_open
    h.request(req.get_method(), req.selector, req.data, headers)
  File "/usr/lib/python3.5/http/client.py", line 1106, in request
    self._send_request(method, url, body, headers)
  File "/usr/lib/python3.5/http/client.py", line 1151, in _send_request
    self.endheaders(body)
  File "/usr/lib/python3.5/http/client.py", line 1102, in endheaders
    self._send_output(message_body)
  File "/usr/lib/python3.5/http/client.py", line 934, in _send_output
    self.send(msg)
  File "/usr/lib/python3.5/http/client.py", line 877, in send
    self.connect()
  File "/usr/lib/python3.5/http/client.py", line 1252, in connect
    super().connect()
  File "/usr/lib/python3.5/http/client.py", line 849, in connect
    (self.host,self.port), self.timeout, self.source_address)
  File "/usr/lib/python3.5/socket.py", line 693, in create_connection
    for res in getaddrinfo(host, port, 0, SOCK_STREAM):
  File "/usr/lib/python3.5/socket.py", line 732, in getaddrinfo
    for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -3] Temporary failure in name resolution

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/softwareproperties/ppa.py", line 102, in _get_https_content_py3
    lp_page = urllib.request.urlopen(request, cafile=LAUNCHPAD_PPA_CERT)
  File "/usr/lib/python3.5/urllib/request.py", line 163, in urlopen
    return opener.open(url, data, timeout)
  File "/usr/lib/python3.5/urllib/request.py", line 466, in open
    response = self._open(req, data)
  File "/usr/lib/python3.5/urllib/request.py", line 484, in _open
    '_open', req)
  File "/usr/lib/python3.5/urllib/request.py", line 444, in _call_chain
    result = func(*args)
  File "/usr/lib/python3.5/urllib/request.py", line 1297, in https_open
    context=self._context, check_hostname=self._check_hostname)
  File "/usr/lib/python3.5/urllib/request.py", line 1256, in do_open
    raise URLError(err)
urllib.error.URLError: <urlopen error [Errno -3] Temporary failure in name resolution>

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/softwareproperties/ppa.py", line 327, in get_ppa_info
    ret = get_ppa_info_from_lp(user, ppa)
  File "/usr/lib/python3/dist-packages/softwareproperties/ppa.py", line 92, in get_ppa_info_from_lp
    return get_info_from_lp(lp_url)
  File "/usr/lib/python3/dist-packages/softwareproperties/ppa.py", line 88, in get_info_from_lp
    return _get_https_content_py3(lp_url)
  File "/usr/lib/python3/dist-packages/softwareproperties/ppa.py", line 108, in _get_https_content_py3
    raise PPAException("Error reading %s: %s" % (lp_url, reason), e)
softwareproperties.ppa.PPAException: 'Error reading https://launchpad.net/api/1.0/~caffeine-developers/+archive/ubuntu/ppa: [Errno -3] Temporary failure in name resolution'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/li...

Read more...

Revision history for this message
Sharan Duggirala (sd12832) wrote :

Should I go about manually adding the deb package?

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

Or, given the temporary DNS failure, you could simply try again.

Revision history for this message
Sharan Duggirala (sd12832) wrote :

Okay, I have the latest caffeine installed. However, it doesn't work now either. This time I don't get any errors on the command line either!

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

Thanks. Can you next, 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 whether the screen goes off.

Note that the message you got before was just a warning, in any case.

Revision history for this message
Sharan Duggirala (sd12832) wrote :

I get:

Protocol error: bad 3 (Window); Sequence Number 13
 Opcode (20, 0) = GetProperty
 Bad resource 0 (0x0)
 at -e line 15.

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

It looks like the bug is not in Caffeine.

Please could you just run the command:

xwininfo | grep "Window id" | cut -d " " -f 4

and paste its output here?

Revision history for this message
Ed B (kde35) wrote :

I had the same issue (with TDE as desktop environment), and solved as follows,

Step 1. I purged gnome-screensaver (that was the only screen saver package installed
other than xscreensaver). This step alone wasn't enough.

Step 2. I rebooted. (Maybe restarting xserver would have been enough, but I didn't think
about it). Now caffeine works.

This is a bit strange because the screensaver running was the one from xscreensaver package,
so I don't see why purging gnome-screensaver should have any incidence, but it solved the problem for me.

Revision history for this message
Ed B (kde35) wrote :

Actually the above was a little hasty. For some reason the screen saver got deactivated,
and it had nothing to do with caffeine.

So here is what happens: when I issue the command

xdg-screensaver suspend anexistingwindownumber

I get the following error

org.freedesktop.DBus.Error.ServiceUnknown: The name org.gnome.SessionManager wa
s not provided by any .service files

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

Thanks very much for these tests. As you can see, the problem is at the xdg-screensaver level, so please follow it up with xdg-utils.

Reuben Thomas (rrt)
Changed in caffeine:
status: New → Invalid
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.