[Bug 230056] Re: Lock screen happens on Lid open, not Lid closed

awen awen at awen.dk
Tue May 13 22:18:40 UTC 2008


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.

** Also affects: hal (Ubuntu)
   Importance: Undecided
       Status: New

** Changed in: kde-guidance (Ubuntu)
       Status: Incomplete => Invalid

** Summary changed:

- Lock screen happens on Lid open, not Lid closed
+ button.state.value switched for lid event

** Description changed:

- Binary package hint: kde-guidance-powermanager
+ Laptop model: HP nx7400 notebook
+ Release: Kubuntu 8.04
  
- I have hp nx7400 notebook with Kubuntu 8.04 installed. kde-guidance-powermanager is configured to "Lock screen" "When Laptop Lid Closed". But the screen is locked a few seconds after I open the lid.
- Further investigation showed, that it's all because PowerManage.getLidClosedState() returns 1 if lid is pen and 0 if it's closed. But in guidance-power-manager it's assumed, that 1 means that lid is closed. After I edited guidance-power-manager.py in this way:
- 722:        # Lid stuff
-         if self.powermanager.hasLid:
-             if not self.powermanager.getLidClosedState():
-                 if self.powermanager.lidClosedState:
-                     self.powermanager.lidClosedState = False
- 
-                     action = self._getRB(self.LaptopLidRadios, self.lid_act)
-                     if not self.act_name.has_key(action):
-                         action = self.act_name[self.lid_act_def]
- 
-                     if self.act_call[action] != None:
-                         note = i18n("Laptop lid is closed, %1 now.").arg(self.act_notify[action])
-                         self.notify(note, self.act_icon[action])
-                         QTimer.singleShot(2000, self.act_call[action])
-             else:
-                 self.powermanager.lidClosedState = True
- 
- everything begam to work perfectly. I don't know if this problem applies only for my laptop or not.
- Version of kde-guidance-powermanager is 0.8.0svn20080103-0ubuntu16
- I already deleted the original file so I can't make a patch now
- The edited version of guidance-power-manager.py is also attached
+ 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)

** Tags removed: guidance-powermanager

-- 
button.state.value switched for lid event
https://bugs.launchpad.net/bugs/230056
You received this bug notification because you are a member of Kubuntu
Team, which is subscribed to kde-guidance in ubuntu.




More information about the kubuntu-bugs mailing list