Bug 186368

Summary: powerdevil does not support sleep, hibernate etc buttons (D-Bus events)
Product: [Frameworks and Libraries] solid Reporter: Andrey Borzenkov <arvidjaar>
Component: powermanagement-daemonAssignee: Dario Freddi <drf>
Status: RESOLVED DUPLICATE    
Severity: normal CC: glua
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Mandriva RPMs   
OS: Linux   
Latest Commit: Version Fixed In:

Description Andrey Borzenkov 2009-03-06 19:01:40 UTC
Version:            (using KDE 4.2.1)
OS:                Linux
Installed from:    Mandriva RPMs

I understand that it sounds more like a wish, but it did work in KDE3 with kpowersave, so it is regression (if not technical, then behavioural) from user's point of view.

In KDE3 with kpowersave I could suspend/hibernate and change display brightness level using hardware key. This does not work anymore in powerdevil not do I see any way to enable it.

The key events are broadcast by HAL (HALhas some magic to synthesize those events even if system does not directly support them in input layer). E.g.:

signal sender=:1.175 -> dest=(null destination) serial=1245 path=/org/freedesktop/Hal/devices/computer_logicaldev_input_1; interface=org.freedesktop.Hal.Device; member=Condition
   string "ButtonPressed"
   string "sleep"
signal sender=:1.175 -> dest=(null destination) serial=1248 path=/org/freedesktop/Hal/devices/computer_logicaldev_input_1; interface=org.freedesktop.Hal.Device; member=Condition
   string "ButtonPressed"
   string "hibernate"
signal sender=:1.175 -> dest=(null destination) serial=1251 path=/org/freedesktop/Hal/devices/computer_logicaldev_input_1; interface=org.freedesktop.Hal.Device; member=Condition
   string "ButtonPressed"
   string "brightness-down"
signal sender=:1.175 -> dest=(null destination) serial=1254 path=/org/freedesktop/Hal/devices/computer_logicaldev_input_1; interface=org.freedesktop.Hal.Device; member=Condition
   string "ButtonPressed"
   string "brightness-up"

Any chance to implement it? Doing this in 4.2.x would be excellent.
Comment 1 Dario Freddi 2009-03-06 19:25:09 UTC
The sleep button is already implemented, for other buttons, we need to implement support for this in solid, but afaik there is already some work in progress on this.
Comment 2 Andrey Borzenkov 2009-03-06 19:35:03 UTC
(In reply to comment #1)
> The sleep button is already implemented

Does not work here. Any magic to enable it?
Comment 3 Dario Freddi 2009-03-06 19:39:07 UTC
In profile configuration, you can define behavior for the suspend button, but maybe your laptop has separate suspend/sleep buttons (mine has just one), in that case it's still not implemented
Comment 4 Andrey Borzenkov 2009-03-22 01:48:27 UTC
(In reply to comment #3)
> In profile configuration, you can define behavior for the suspend button

All profiles define sleep button action as suspend. May be there is some misunderstanfing here.

Button events cam come from to sources: they can come from Xorg (as regular key events); or they can come via D-Bus and emitted by HAL. Which one do you mean? Does powerdevil support D-Bus button press events at all? I have feelling it does not which is quite a regression for KDE3 users - there is still hardware out there which does not have kernel support for special keys.

Because

- it does not work when I use standard HAL add-on to emit "suspend" button press event

- it does not work when I use experimental kernel patch to emit SLEEP button press either
Comment 5 Dario Freddi 2009-12-01 18:19:24 UTC

*** This bug has been marked as a duplicate of bug 181444 ***