On Mon 21. Apr - 03:31:40, Michael Biebl wrote: > Hi, > > while investigating, why pressing the sleep button on my laptop works with > kpowersave (0.7.3) but not with powersave (0.15.20), I noticed, that the > powersave code (acpi.cpp), reads directly from the acpi socket instead of > relying on hal. > In my case (hp nx7000), I don't get an "old-style" acpi hardware button > event button/sleep, but a newer keyboard button event. > Running dbus-monitor --system, this looks like: > > signal sender=:1.3 -> dest=(null destination) > path=/org/freedesktop/Hal/devices/platform_i8042_i8042_KBD_port_logicaldev_input; > > interface=org.freedesktop.Hal.Device; member=Condition > string "ButtonPressed" > string "sleep" > > > Imho, powersave should use the same approach as kpowersave > (src/hardware.cpp), and listen for ButtonPressed events from hal, then > match on the value of the message instead of reading from the acpi socket > directly. > > Comments welcome.
This would definitely be the better approach, however, not the ideal one. Also kpowersave (or any other desktop application) should get the sleep buttons through usual X events. That's currently not possible due to kernel driver and X infrastructure. Currently I'm too busy with other things, so I won't be able to do this. Patches welcome, like always ;-) Regards, Holger _______________________________________________ powersave-devel mailing list powersave-devel@forge.novell.com http://forge.novell.com/mailman/listinfo/powersave-devel