On Tue 06. May - 16:03:21, Michael Biebl wrote:
> 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=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.
>
> 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.
No, I misunderstood you ;-)
You're right, listening to the HAL signals would be the way to go
here. However, I'm not sure if users are needing this at all? If you don't
use X, do you expect working sleep/hibernate buttons? If you need this,
run X. However, I would accept a patch ;-)
Regards,
Holger
_______________________________________________
powersave-devel mailing list
[email protected]
http://forge.novell.com/mailman/listinfo/powersave-devel