8 Comments

Sleep Button in KDE 4 Workaround

If you noticed that pushing the sleep button does nothing in KDE 4 (as of this writing <=4.3.3), this is because of a bug in KDEs’ power management tool Powerdevil. It appears that in most cases Powerdevil does not recognize the Xorg servers’ XF86Sleep key. To fix this, you may be able to rebind the sleep key in the KDE control panel.

Add a New Input Action

Open System Settings then Input Actions. Then add a new Global Shortcut:

Name it ‘Sleep’ or whatever you like. Add a Comment if you wish and in the Trigger tab select your hotkey. Try setting the sleep key first. For me, setting the hotkey to the sleep key didn’t work because I believe that Powerdevil already has it bound. There have been others though that look to have sucessfully done so.

Note: If someone knows of a way to decouple the Powerdevil sleep key please let me know.

I bound mine to Scroll Lock (hope I don’t need it anytime soon) then in the Action tab entere the dbus command to suspend to ram:

qdbus org.kde.kded /modules/powerdevil suspend 2

If this doesn’t work, try ‘suspend 1′. If you would like to suspend to disk:

qdbus org.kde.kded /modules/powerdevil suspend 4
About these ads

About Gen2ly

<3's linux

8 comments on “Sleep Button in KDE 4 Workaround

  1. [...] are several reports of problems with the suspend hotkey on KDE4 [1] [2]. And there is even a bug report on that issue. Naturally, I wouldn’t write about this if [...]

  2. Nice workaround; it there a way to wake the system?

  3. Searched for that a long time. Thanks

  4. Thank you very much :-)

  5. Still as relevant as in 2009… guess not a lot of people get ‘suspend to ram/disk’ working on their machine. (Or just a few people have a ‘Sleep’ button, which could also be because Linux people rarely ever have a Microsoft keyboard ;-) )

    Thanks!

  6. in opensuse 11.4 this workaround is no longer working. I did it in 11.3 but in 11.4 qdbus says it cannot find .suspend in /modules/powerdevil at org.kde.kded I also tried org.kde.Solid.PowerManagement to no avail.

  7. Hi, I do think this is an excellent web site.

    I stumbledupon it ;) I am going to return yet again since I
    book marked it. Money and freedom is the greatest way to change,
    may you be rich and continue to guide other people.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 52 other followers

%d bloggers like this: