[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: How to make suspend/hibernate buttons work



On Thursday 19 February 2009 11:28:49 Aneurin Price wrote:
> On Wed, Feb 18, 2009 at 10:46 PM, David Jarvie <software@astrojar.org.uk> 
wrote:
> > On Wednesday 18 February 2009 22:37:56 you wrote:
> >> On Wednesday 18 February 2009 11:48:38 am David Jarvie wrote:
> >> > No - PowerDevil is the replacement in KDE4 for KPowerSave. It looks as
> >> > if global shortcuts to control it is something which still needs to be
> >> > implemented.
> >>
> >> Did you try adding yourself to the powerdev group though? You will need
> >> to logout and login to get the change recognized.
> >
> > I am already in the powerdev group. I can use the KDE4 menu options to
> > suspend or hibernate - it's just the buttons which don't work. There is a
> > KDE bug requesting global shortcuts to be added to PowerDevil
> > (https://bugs.kde.org/show_bug.cgi?id=182538).
>
> Is there a command line to suspend or hibernate? Does PowerDevil have a
> dbus interface for those actions? If either of those is yes, then you
> could use KHotkeys, which allows you to create global shortcuts for
> arbitrary commands. In systemsettings, go to 'Input Actions', then
> right-click in the blank space on the left-hand pane (yes, the area that
> doesn't look interactive in any way), and create a new global shortcut. If
> PowerDevil does expose those actions via dbus then that's probably the
> best route, in case it doesn't like something else hibernating the
> machine. There's a dbus browser which seems alright.
>
> Nye
>
> (PS. Thanks for motivating me to figure out WTH the Input Actions control
> module is for, and how to wrestle with its dire UI)

Thank you. I too once looked at KHotkeys and couldn't figure out how it was 
supposed to be used. I managed to configure a suspend D-Bus action set up as 
follows:

Remote application: org.kde.powerdevilsystem
Remote object: /modules/powerdevil
Function: suspend
Arguments: 2

Hibernate is set up exactly the same but the argument is 4 instead of 2. There 
are also other options available (shutdown, etc.) - see the enum IdleAction in 
PowerDevil's source code 
kdebase/workspace/powerdevil/daemon/PowerDevilDaemon.h

-- 
David Jarvie


Reply to: