Holger Macht wrote:
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=Conditionstring "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.
Well, I'm not sure if X events are the right choice for a console application? I mean, isn't the whole point of powersaved to be a power management policy daemon without X dependencies. For X we have kpowersave and gnome-power-manager.
But maybe I'm just misundertanding you. Cheers, Michael -- Why is it that all of the instruments seeking intelligent life in the universe are pointed away from Earth?
signature.asc
Description: OpenPGP digital signature
_______________________________________________ powersave-devel mailing list [email protected] http://forge.novell.com/mailman/listinfo/powersave-devel
