ACPI inconsistent button state

Rohan McGovern rohan.pm at gmail.com
Thu May 12 16:10:31 PDT 2005


Hi all,

I've been using Ivman to hibernate my laptop, and an issue with HAL's ACPI 
support has come to light.  Basically, when I close the lid of my laptop, it 
will hibernate; when I open the lid of my laptop and turn it back on, it will 
resume, and HAL will still think the lid is closed (presumably because it was 
opened while the power was off).  Specifically,  button.state.value = true 
on /org/freedesktop/Hal/devices/acpi_LID, when it should be false.

Luckily this is trivial to work around (just have a hal-set-property command 
after the hibernate script), but a fix in the HAL source would be nice :-)  
The '/proc/acpi/button/lid/LID/state' file gives the correct state for the 
lid no matter what, so this is definitely fixable at HAL's level.  It seems 
to me like this could be fixed by calling acpi_rescan_device (or 
button_refresh) on the lid device at some point, but from looking at the 
output of lshal --monitor while hibernating, there doesn't appear to be any 
obvious event which consistently occurs where it makes sense to do this.  It 
could be done in acpi_poll, but hopefully someone with greater insight and 
knowledge of HAL can think of a more efficient way :-)

This problem probably extends to all ACPI buttons with button.has_state = 
true .  

 -- Rohan McGovern
_______________________________________________
hal mailing list
hal at lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/hal



More information about the Hal mailing list