[Pkg-utopia-maintainers] Bug#555740: Bug#555712: Bug#555712: devicekit-power: wrong status for can-hibernate and lid-is-present
Michael Biebl
biebl at debian.org
Wed Nov 11 15:49:32 UTC 2009
Yves-Alexis Perez wrote:
> On mer., 2009-11-11 at 16:33 +0100, Michael Biebl wrote:
>> DK-power checks if you have an input device (/sys/class/input) and
>> then check if
>> the input device has a sw property and the test if the SW_LID bitmask
>> is set
>> (see /usr/include/linux/input.h).
>>
>> Check if you have such a device (or not) and if the sw property has
>> the correct
>> value (or not). If not, it's imo a kernel bug.
>
> Mhmh, ok, I have quite a number of input devices:
>
> corsac at hidalgo: ls /sys/class/input
> total 0
> lrwxrwxrwx 1 root root 0 nov. 11 16:34 event0 -> ../../devices/virtual/input/input0/event0
> lrwxrwxrwx 1 root root 0 nov. 11 16:34 event1 -> ../../devices/platform/i8042/serio0/input/input1/event1
> lrwxrwxrwx 1 root root 0 nov. 11 16:34 event2 -> ../../devices/LNXSYSTM:00/device:00/PNP0A08:00/device:02/input/input2/event2
> lrwxrwxrwx 1 root root 0 nov. 11 16:34 event3 -> ../../devices/LNXSYSTM:00/LNXPWRBN:00/input/input3/event3
> lrwxrwxrwx 1 root root 0 nov. 11 16:34 event4 -> ../../devices/LNXSYSTM:00/device:00/PNP0C0D:00/input/input4/event4
> lrwxrwxrwx 1 root root 0 nov. 11 16:34 event5 -> ../../devices/LNXSYSTM:00/device:00/PNP0C0E:00/input/input5/event5
> lrwxrwxrwx 1 root root 0 nov. 11 16:34 event6 -> ../../devices/virtual/input/input6/event6
> lrwxrwxrwx 1 root root 0 nov. 11 16:34 event7 -> ../../devices/platform/i8042/serio1/input/input7/event7
> lrwxrwxrwx 1 root root 0 nov. 11 16:34 event8 -> ../../devices/pci0000:00/0000:00:1b.0/input/input8/event8
> lrwxrwxrwx 1 root root 0 nov. 11 16:34 input0 -> ../../devices/virtual/input/input0
> lrwxrwxrwx 1 root root 0 nov. 11 16:34 input1 -> ../../devices/platform/i8042/serio0/input/input1
> lrwxrwxrwx 1 root root 0 nov. 11 16:34 input2 -> ../../devices/LNXSYSTM:00/device:00/PNP0A08:00/device:02/input/input2
> lrwxrwxrwx 1 root root 0 nov. 11 16:34 input3 -> ../../devices/LNXSYSTM:00/LNXPWRBN:00/input/input3
> lrwxrwxrwx 1 root root 0 nov. 11 16:34 input4 -> ../../devices/LNXSYSTM:00/device:00/PNP0C0D:00/input/input4
> lrwxrwxrwx 1 root root 0 nov. 11 16:34 input5 -> ../../devices/LNXSYSTM:00/device:00/PNP0C0E:00/input/input5
> lrwxrwxrwx 1 root root 0 nov. 11 16:34 input6 -> ../../devices/virtual/input/input6
> lrwxrwxrwx 1 root root 0 nov. 11 16:34 input7 -> ../../devices/platform/i8042/serio1/input/input7
> lrwxrwxrwx 1 root root 0 nov. 11 16:34 input8 -> ../../devices/pci0000:00/0000:00:1b.0/input/input8
> lrwxrwxrwx 1 root root 0 nov. 11 16:34 mice -> ../../devices/virtual/input/mice
> lrwxrwxrwx 1 root root 0 nov. 11 16:34 mouse0 -> ../../devices/virtual/input/input0/mouse0
> lrwxrwxrwx 1 root root 0 nov. 11 16:34 mouse1 -> ../../devices/platform/i8042/serio1/input/input7/mouse1
>
> How am I supposed to check for the correct one, and find a “sw
> property”?
I think only the devices named input* are relevant (9 to go). Then test each of
them if it has a capabilities/sw file.
What do you get if you run
cd /sys/class/input
for i in `seq 0 8`; do
cat input$i/capabilites/sw
done
cheers,
Michael
--
Why is it that all of the instruments seeking intelligent life in the
universe are pointed away from Earth?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 262 bytes
Desc: OpenPGP digital signature
URL: <http://lists.alioth.debian.org/pipermail/pkg-utopia-maintainers/attachments/20091111/55c646be/attachment.pgp>
More information about the Pkg-utopia-maintainers
mailing list