button.state.value switched for lid event

Bug #230056 reported by Aleks Krsch
4
Affects Status Importance Assigned to Milestone
hal (Ubuntu)
Invalid
Undecided
Unassigned
kde-guidance (Ubuntu)
Invalid
Undecided
Andreas Wenning

Bug Description

Laptop model: HP nx7400 notebook
Release: Kubuntu 8.04

when lid is open:
 $ hal-device `hal-find-by-property --key button.type --string lid`
 udi = '/org/freedesktop/Hal/devices/computer_logicaldev_input_3'
   input.product = 'Lid Switch' (string)
   info.addons.singleton = { 'hald-addon-input' } (string list)
   linux.sysfs_path = '/sys/devices/virtual/input/input5/event5' (string)
   info.parent = '/org/freedesktop/Hal/devices/computer' (string)
   info.product = 'Lid Switch' (string)
   info.udi = '/org/freedesktop/Hal/devices/computer_logicaldev_input_3' (string)
   button.has_state = true (bool)
   button.type = 'lid' (string)
   linux.hotplug_type = 2 (0x2) (int)
   button.state.value = true (bool)
   linux.subsystem = 'input' (string)
   linux.device_file = '/dev/input/event5' (string)
   info.capabilities = { 'input', 'input.switch', 'button' } (string list)
   info.category = 'input' (string)
   input.device = '/dev/input/event5' (string)
when lid is closed:
 $ sleep 10; hal-device `hal-find-by-property --key button.type --string lid`
 udi = '/org/freedesktop/Hal/devices/computer_logicaldev_input_3'
   input.product = 'Lid Switch' (string)
   info.addons.singleton = { 'hald-addon-input' } (string list)
   linux.sysfs_path = '/sys/devices/virtual/input/input5/event5' (string)
   info.parent = '/org/freedesktop/Hal/devices/computer' (string)
   info.product = 'Lid Switch' (string)
   info.udi = '/org/freedesktop/Hal/devices/computer_logicaldev_input_3' (string)
   button.has_state = true (bool)
   button.type = 'lid' (string)
   linux.hotplug_type = 2 (0x2) (int)
   button.state.value = false (bool)
   linux.subsystem = 'input' (string)
   linux.device_file = '/dev/input/event5' (string)
   info.capabilities = { 'input', 'input.switch', 'button' } (string list)
   info.category = 'input' (string)
   input.device = '/dev/input/event5' (string)

Revision history for this message
Aleks Krsch (akrsch) wrote :
Revision history for this message
Andreas Wenning (andreas-wenning) wrote :

@Aleks
Please provide the output of the following command while the lid is open:
hal-device `hal-find-by-property --key button.type --string lid`

And if in any way possible also the output when the lid is closed; one option is to log in remotely using ssh.

Changed in kde-guidance:
assignee: nobody → andreas-wenning
status: New → Incomplete
Revision history for this message
Aleks Krsch (akrsch) wrote :

when lid is open:
$ hal-device `hal-find-by-property --key button.type --string lid`
udi = '/org/freedesktop/Hal/devices/computer_logicaldev_input_3'
  input.product = 'Lid Switch' (string)
  info.addons.singleton = { 'hald-addon-input' } (string list)
  linux.sysfs_path = '/sys/devices/virtual/input/input5/event5' (string)
  info.parent = '/org/freedesktop/Hal/devices/computer' (string)
  info.product = 'Lid Switch' (string)
  info.udi = '/org/freedesktop/Hal/devices/computer_logicaldev_input_3' (string)
  button.has_state = true (bool)
  button.type = 'lid' (string)
  linux.hotplug_type = 2 (0x2) (int)
  button.state.value = true (bool)
  linux.subsystem = 'input' (string)
  linux.device_file = '/dev/input/event5' (string)
  info.capabilities = { 'input', 'input.switch', 'button' } (string list)
  info.category = 'input' (string)
  input.device = '/dev/input/event5' (string)

when lid is closed:
$ sleep 10; hal-device `hal-find-by-property --key button.type --string lid`
udi = '/org/freedesktop/Hal/devices/computer_logicaldev_input_3'
  input.product = 'Lid Switch' (string)
  info.addons.singleton = { 'hald-addon-input' } (string list)
  linux.sysfs_path = '/sys/devices/virtual/input/input5/event5' (string)
  info.parent = '/org/freedesktop/Hal/devices/computer' (string)
  info.product = 'Lid Switch' (string)
  info.udi = '/org/freedesktop/Hal/devices/computer_logicaldev_input_3' (string)
  button.has_state = true (bool)
  button.type = 'lid' (string)
  linux.hotplug_type = 2 (0x2) (int)
  button.state.value = false (bool)
  linux.subsystem = 'input' (string)
  linux.device_file = '/dev/input/event5' (string)
  info.capabilities = { 'input', 'input.switch', 'button' } (string list)
  info.category = 'input' (string)
  input.device = '/dev/input/event5' (string)

Revision history for this message
Andreas Wenning (andreas-wenning) wrote :

The problem is, that HAL reports the opposite for your lid. "button.state.value" should be false when the lid is open, but for your laptop it reports true.

The bug might not actually be a HAL issue, but could be connected to a lower layer (eg. kernel issue), but I'm not capable of determining that. At least it is at the HAL layer or lower, so I'm associating the bug with the hal package.

Changed in kde-guidance:
status: Incomplete → Invalid
description: updated
Revision history for this message
Andreas Wenning (andreas-wenning) wrote :

@Aleks
Btw. i would advice you to provide info on your current installed version of 'hal', and your kernel version.

See https://wiki.ubuntu.com/DebuggingHal for some debugging information you can provide to help.

Revision history for this message
Aleks Krsch (akrsch) wrote :

Hal is 0.5.11~rc2-1ubuntu8.1
Kernel is 2.6.24-17.31

And some more info:
when lid is open:
$ cat /proc/acpi/button/lid/C23C/state
state: open
when lid is closed:
$ sleep 5; cat /proc/acpi/button/lid/C23C/state
state: closed

Revision history for this message
Aleks Krsch (akrsch) wrote :

It's strange, I didn't update kde-guidance-powermanager, kernel or hal, but the bug disappeared. Now "button.state.value = false (bool)" is when the lid is open and true when it's closed. And after I reverted the changes in guidance-power-manager everything worked fine

Revision history for this message
Andreas Wenning (andreas-wenning) wrote :

Could be a bios that has gotten confused at some point. I'll close this.

Revision history for this message
Andreas Wenning (andreas-wenning) wrote :

Feel free to report any other bugs you find.

Changed in hal:
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.