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 Gen2ly

<3's linux

Posted on 2009-11-12, in KDE, Linux. Bookmark the permalink. 8 Comments.

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

  2. Thanks!

  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 ;-) )


  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.

  1. Pingback: Fabians Website / Enabling the suspend hotkey in KDE4

Leave a Reply

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

You are commenting using your 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


Get every new post delivered to your Inbox.

Join 58 other followers

%d bloggers like this: