Activating Caffeine instantly wakes up my macbook after suspend

Bug #1683022 reported by Gabriel Zimmermann
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Caffeine
Invalid
Undecided
Unassigned

Bug Description

Hello dear caffeine team,

I installed Ubuntu on my Macbook (Product Name: MacBookPro12,1 Family: Macbook Pro Version: MacBookPro12,1 Model Number is A 1502 EMC 2835) and installed caffeine.

First up, I have no problems with suspend, when I didn't activate caffeine in the first place.
My Problem is, that when I activate Caffeine in the menu bar, it does what it should, so it doesn't suspend automatically, but: when i manually suspend my Macbook, it instantly brings up the login-screen. This also occurs, when i deactivate caffeine after the first activation (it actually bugs out even more).

I hope you can help me and thanks in advance.

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

This is unlikely to be a bug in Caffeine.

Caffeine simply inhibits desktop idleness. It's up to the rest of the system what that means.

There might be at least two separate problems here:

1. Suspend behaviour is affected when desktop idleness is inhibited.

2. Suspend behaviour is not restored when desktop idleness inhibition is switched off again.

This may be a bug in xdg-screensaver (this is responsible for controlling desktop idleness inhibition), or it may be a bug in your desktop environment, or a bad interaction with the hardware (I have a MacBookPro 11,1, and have always had problems with suspend).

Try running, in a terminal:

window_id=`xwininfo | grep "Window id" | cut -d " " -f 4`

Now click on the terminal window, and then run:

xdg-screensaver suspend $window_id
xdg-screensaver resume $window_id

This performs the same steps at a lower level as turning Caffeine on then off again manually. If this gives the same problem as using Caffeine, then the bug is definitely not in Caffeine.

Also, please check you're using the latest version of Caffeine (at this writing, 2.9.3), available from the PPA if it's not in your version of Ubuntu.

Revision history for this message
Gabriel Zimmermann (natschu) wrote :

Hello,

I updated to Version 2.9.4 and it still didn't work.

So I followed your steps in the terminal. And it appeared, that suspend still worked.

Any ideas, what i should try next?

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

Thanks very much for making those tests.

Please can you try the same thing with caffeine-indicator, running it from the terminal, and ensuring that caffeine is not running at the same time?

In other words,

1. Start caffeine-indicator from the terminal.

2. Suspend.

What happens when you resume? Similarly, do the equivalent "low level" steps with xdg-screensaver, that is, run the "suspend" command and then suspend (without first running the "resume" command).

Thanks again!

I'm sorry this is quite fiddly to debug, but so much of the code involved is specific to the hardware and/or desktop environment.

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

Closing due to lack of response from reporter.

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.