lid is present detection

Florian Lohoff f at
Tue Jan 5 06:34:05 PST 2010

i am looking for a bug in which i am not anylonger possible to suspend
by closing the lid. This is caused by gnome-power-manager not using hal
but devkit-power. See debian bug #563776

Output is like this:

flo at lifebook:~$ devkit-power -d
Device: /org/freedesktop/DeviceKit/Power/devices/line_power_AC
  native-path:          /sys/devices/LNXSYSTM:00/device:00/ACPI0003:00/power_supply/AC
  power supply:         yes
  updated:              Tue Jan  5 14:01:32 2010 (5320 seconds ago)
  has history:          no
  has statistics:       no
    online:             yes

Device: /org/freedesktop/DeviceKit/Power/devices/battery_CMB1
  native-path:          /sys/devices/LNXSYSTM:00/device:00/PNP0C0A:00/power_supply/CMB1
  vendor:               Fujitsu
  model:                CP279034
  serial:               1
  power supply:         yes
  updated:              Tue Jan  5 15:30:07 2010 (5 seconds ago)
  has history:          yes
  has statistics:       yes
    present:             yes
    rechargeable:        yes
    state:               fully-charged
    energy:              60.624 Wh
    energy-empty:        0 Wh
    energy-full:         67.392 Wh
    energy-full-design:  74.88 Wh
    energy-rate:         0 W
    voltage:             16.16 V
    percentage:          89.9573%
    capacity:            89.8462%
    technology:          lithium-ion

  daemon-version:  013
  can-suspend:     yes
  can-hibernate    yes
  on-battery:      no
  on-low-battery:  no
  lid-is-closed:   no
  lid-is-present:   no

devkit-power -m Does not show any events - lshal -m does:

flo at lifebook:~$ lshal -m

Start monitoring devicelist:
15:30:56.505: computer_logicaldev_input_6 property button.state.value = true
15:30:56.506: computer_logicaldev_input_6 condition ButtonPressed = lid
15:30:57.995: computer_logicaldev_input_6 property button.state.value = false
15:30:57.997: computer_logicaldev_input_6 condition ButtonPressed = lid

Input names look like this:

flo at lifebook:~$ grep . /sys/devices/LNXSYSTM:00/device:00/*/input/input*/name
/sys/devices/LNXSYSTM:00/device:00/FUJ02E3:00/input/input8/name:Fujitsu FUJ02E3
/sys/devices/LNXSYSTM:00/device:00/PNP0C0C:00/input/input5/name:Power Button
/sys/devices/LNXSYSTM:00/device:00/PNP0C0D:00/input/input4/name:Lid Switch
/sys/devices/LNXSYSTM:00/device:00/PNP0C0E:00/input/input6/name:Sleep Button

I am completely lost in the DeviceKit code as i fail to find the source of the 
knowledge about the lid switch and events ... From what i guess is that 
its coming from udev - but i am clueless on how to debug this ...

Florian Lohoff                                                 f at
"Es ist ein grobes Missverständnis und eine Fehlwahrnehmung, dem Staat
im Internet Zensur- und Überwachungsabsichten zu unterstellen."
- - Bundesminister Dr. Wolfgang Schäuble -- 10. Juli in Berlin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 827 bytes
Desc: Digital signature
Url : 

More information about the devkit-devel mailing list