GNOME Bugzilla – Bug 664005
keyboard suspend and hibernate buttons don't work
Last modified: 2011-11-14 14:10:54 UTC
The suspend and hibernate buttons on my keyboard do not have any effect with gnome shell. Suspend works just fine from the menu though, as well as via the lid event. Something is catching the buttons though as I cannot see them with xev.
Do they work when you're using something else than GNOME Shell? (BTW, what distribution are you using, and what's your computer model?) Maybe xev doesn't see the presses because the keys are not configured properly in the kernel - I think some kind of redirection must be done, which doesn't work on all laptops.
This is Fedora 16 on a Thinkpad R61. I have not tried any other DE, but the buttons worked just fine with Gnome 2 on Fedora 14 (which I recently upgraded from).
So you upgraded all of your packages, something stops working, and you suspect the Shell? ;-) Anything can break when you upgrade your distribution. Please switch to fallback mode (System settings->System information->Graphics), and try again.
I think the shell was a likely suspect given: a) The machine suspends just fine using one of the other activation methods. b) I find it highly unlikely that of all the buttons on the keyboard, only the "suspend" and "hibernate" ones would stop working after an upgrade. c) AFAIK, it's gnome-shell that's supposed to catch these buttons and trigger the suspend. Still, I did some tests. The suspend button doesn't work with the fallback, nor fallback with compiz. I did have IceWM on this machine for some odd reason though, and it does not grab these buttons. This allowed me to run xev and see that I get a XF86Sleep and a XF86Suspend from these buttons.
(In reply to comment #4) > I think the shell was a likely suspect given: > > a) The machine suspends just fine using one of the other activation methods. So what? If the key press isn't detected, the action won't happen. > b) I find it highly unlikely that of all the buttons on the keyboard, only the > "suspend" and "hibernate" ones would stop working after an upgrade. These are special keys, like media keys (do they work BTW if you have such keys?). Most keys work differently and are much more reliable. > c) AFAIK, it's gnome-shell that's supposed to catch these buttons and trigger > the suspend. Except that it's false: the Shell doesn't handle them, they are passed to gnome-settings-daemon AFAIK. But first, X has to receive correct key presses events, and send them to it. > Still, I did some tests. The suspend button doesn't work with the fallback, nor > fallback with compiz. So, what I said. ;-) > I did have IceWM on this machine for some odd reason though, and it does not > grab these buttons. This allowed me to run xev and see that I get a XF86Sleep > and a XF86Suspend from these buttons. So xev reports the key presses under IceWM, but not GNOME Shell or GNOME fallback? Please post the relevant output here.
Thanks for the bug report. This particular bug has already been reported into our bug tracking system, but please feel free to report any further bugs you find. *** This bug has been marked as a duplicate of bug 660267 ***