how to make X think that my laptop's lid is always open?

Bruno Dantas dantas at
Thu Nov 14 19:11:06 UTC 2019

I would like graphical applications to always think that my laptop's lid is open (or else always be completely ignorant of the state of the lid).

Strangely, even if I unbind all of the the kernel's "button" driver's devices, like so...

bruno at box:~$ ls /sys/bus/acpi/drivers/button
LNXPWRBN:00  PNP0C0D:00   PNP0C0E:00   bind         uevent       unbind
bruno at box:~$ echo "PNP0C0D:00" | sudo tee /sys/bus/acpi/drivers/button/unbind
bruno at box:~$ echo "PNP0C0E:00" | sudo tee /sys/bus/acpi/drivers/button/unbind
bruno at box:~$ echo "LNXPWRBN:00" | sudo tee /sys/bus/acpi/drivers/button/unbind
bruno at box:~$ ls /sys/bus/acpi/drivers/button
bind    uevent  unbind

...some X applications such as xscreensaver are still somehow aware of the laptop's lid switch (xscreensaver will never start playing its animations while lid is closed--only while lid is open). The xscreensaver developer told me that his application does not query the lid switch status.

This is not a big problem, of course. However, I'm just REALLY curious as to what's going on. Is X capable of directly assessing the state of the lid? Or else my graphics module (i915) can directly assess it?

I've been wondering about this for months now. It would be a relief to finally find the answer. Any help would be appreciated.


Some hardware details:
My computer is pretty vintage: A T400 Thinkpad with intel graphics (i915 kernel module is loaded), Xorg 7.7, linux 4.19.10, Libreboot instead of BIOS. My main OS is TinyCoreLinux 10.1 64-bit, but I have Devuan ASCII (Debian Stretch sans systemd) on a separate partition if we need it.

More information about the xorg mailing list