Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Debian User (http://www.linux-archive.org/debian-user/)
-   -   How to make suspend/hibernate buttons work (http://www.linux-archive.org/debian-user/247902-how-make-suspend-hibernate-buttons-work.html)

Aneurin Price 02-18-2009 12:44 PM

How to make suspend/hibernate buttons work
 
On Wed, Feb 18, 2009 at 12:49 PM, David Jarvie <software@astrojar.org.uk> wrote:
> On my Lenovo 3000 N200 laptop, the suspend and hibernate functions work when I
> invoke them from the KDE4 logout dialog. However, the Sleep and Hibernate keys
> (Fn-F4 and Fn-F12) do nothing when pressed. They don't seem to generate ACPI
> events - the system log shows nothing when they are pressed. How can I set up
> these keys to work? I'm running lenny.
>

I'm not currently at a machine where I can check this, but assuming they
generate the correct keypress events you should be able to set up global
shortcuts in systemsettings to do this. (Under 'Keyboard and Mouse'>'Global
Keyboard Shortcuts', IIRC)

Or possibly you've already tried that and there are no power management
functions there after all...

Nye


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

David Jarvie 02-18-2009 04:27 PM

How to make suspend/hibernate buttons work
 
On Wednesday 18 February 2009 13:44:31 Aneurin Price wrote:
> On Wed, Feb 18, 2009 at 12:49 PM, David Jarvie <software@astrojar.org.uk>
wrote:
> > On my Lenovo 3000 N200 laptop, the suspend and hibernate functions work
> > when I invoke them from the KDE4 logout dialog. However, the Sleep and
> > Hibernate keys (Fn-F4 and Fn-F12) do nothing when pressed. They don't
> > seem to generate ACPI events - the system log shows nothing when they are
> > pressed. How can I set up these keys to work? I'm running lenny.
>
> I'm not currently at a machine where I can check this, but assuming they
> generate the correct keypress events you should be able to set up global
> shortcuts in systemsettings to do this. (Under 'Keyboard and Mouse'>'Global
> Keyboard Shortcuts', IIRC)
>
> Or possibly you've already tried that and there are no power management
> functions there after all...

Unfortunately I can't find any power management functions in the global
shortcuts in System Settings. Are there any alternative ways of setting up
hotkeys?

--
David Jarvie.
KAlarm author and maintainer.
http://www.astrojar.org.uk/kalarm


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

David Jarvie 02-18-2009 05:48 PM

How to make suspend/hibernate buttons work
 
On Wednesday 18 February 2009 18:26:09 you wrote:
> On Wednesday 18 February 2009 10:27:32 am David Jarvie wrote:
> > Unfortunately I can't find any power management functions in the global
> > shortcuts in System Settings. Are there any alternative ways of setting
> > up hotkeys?
>
> Are you using KPowersave? If so, you can set the key events in the General
> Settings tab of the configuration. If those options are set, you also need
> to make sure that your user is a member of the powerdev group. I ran into
> this problem with my Lenovo and all I needed to do was add myself to the
> powerdev group.

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.

--
David Jarvie.
KAlarm author and maintainer.
http://www.astrojar.org.uk/kalarm


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

David Jarvie 02-18-2009 09:46 PM

How to make suspend/hibernate buttons work
 
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).

--
David Jarvie


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

Aneurin Price 02-19-2009 10:28 AM

How to make suspend/hibernate buttons work
 
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)


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

David Jarvie 02-19-2009 12:00 PM

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


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org


All times are GMT. The time now is 09:25 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.