I would like to react to the lid open/close events on my custom device, but it seems that the driver for the lid button is not loaded/bound correctly.

The system I use is a custom hardware with a TQMxE39M module (Intel CPU) at its core. The lid button input is currently connected to a simple switch on the base board. As for the software, I use a custom yocto image using the 'sumo' branch of the 'poky' and 'meta-intel' layers. Machine is set to "genericx86-64". The kernel used is Linux-yocto 4.14.30 with two minor changes only (not connected with acpi). The ACPI driver 'button' is compiled into the kernel, AFAIK this is the driver that should handle the lid button.

After boot, I can see the lid device under /sys/bus/acpi/devices as "PNP0C0D:00". At least I believe that would be the correct device as the acpi/button.c driver source file references the name "PNP0C0D" as lid button, but the device has no driver bound to it.

My question is: Why does linux not detect this device as lid button and binds the correct driver to it?

My observations so far:

  1. I have dumped and decompiled the ACPI data of my device, and I can see that a device called 'LID0' is defined using the EisaId "PNP0C0D". The device is defined inside the scope "_SB.PCI0.LPCB".

  2. The power button, which is handled by the same driver, does work! It is defined in the ACPI data inside scope "_SB" using the EisaId "PNP0C0C". What I find strange is the fact that I can see two such devices under /sys/bus/acpi/devices: "PNP0C0C:00" and "PNP0C0C:01" where only the latter is bound to the acpi/button driver.

  3. I have booted the device with a standard xUbuntu 18.04.1 too. This has exactly the same effect. The power button works as described in point 2 and the lid device is shown but not bound.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.