General TC > General TC Talk
how to completely disable lid switch?
GNUser:
My monitor stays on while lid is closed. I like it that way.
When I give the laptop some long-running job, I turn the brightness all the way down then close the lid just to keep my toddlers and baby from accidentally pressing any keys. I want the screensaver to kick in while the lid is closed, same as it would if the lid were open.
jazzbiker:
Hi, Core guys!
Sorry for interrupting your essential talk.
GNUser, why not to move towards allowing acpi power off your monitor while lid closed? And no matter, what screensaver has on its (his?) mind.
I use notebook in the same manner, put some task to work, and close lid. Monitor is powered off by acpi and things roll on.
Not trying to advice, as you are much more experienced, but do you remember about "xset dpmi a b c"?
GNUser:
Thank you, jazzbiker. That's perfectly sensible advice and would yield a great result. However, this is more about control at this point: I don't like the lid switch, so am on a war path to disable it >:(
(I'd do it mechanically, except that on my T400 the lid switch is actually a little magnet just below the display and above the Bluetooth icon. In the past I've "disabled" it by taping a small magnet in that area, but found that it was actually keeping the switch in the "lid closed" position, causing a wakeup-suspend loop when running some distros.)
P.S. xset is a great tip. I'm aware of it, and one of my startup jobs is actually xset s off; xset -dpms; xset s noblank to disable any interference from X.
GNUser:
It seems that opening and closing the laptop lid don't generate any libinput events?! Very strange.
--- Code: ---bruno@box:~$ cat /proc/bus/input/devices
---snip---
I: Bus=0019 Vendor=0000 Product=0005 Version=0000
N: Name="Lid Switch"
P: Phys=PNP0C0D/button/input0
S: Sysfs=/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:2a/PNP0C09:00/PNP0C0D:00/input/input1
U: Uniq=
H: Handlers=event1
B: PROP=0
B: EV=21
B: SW=1
# notice my laptop's lid switch is supposedly "event 1"
bruno@box:~$ tce-load -wi libinput
bruno@box:~$ sudo libinput debug-events
event6 POINTER_MOTION +2.02s 0.79/ 0.00 ( +1.00/ +0.00)
event6 POINTER_MOTION +2.04s 1.40/ 2.79 ( +1.00/ +2.00)
event6 POINTER_MOTION +2.05s 2.52/ 10.09 ( +1.00/ +4.00)
event6 POINTER_MOTION +2.08s 1.10/ 3.31 ( +1.00/ +3.00)
event6 POINTER_MOTION +2.09s 1.61/ 3.21 ( +1.00/ +2.00)
event6 POINTER_MOTION +2.12s 0.00/ 0.56 ( +0.00/ +1.00)
### in here I close and open the laptop lid. nothing related to event1 is logged as you can see.
event3 KEYBOARD_KEY +9.93s *** (-1) pressed
event3 KEYBOARD_KEY +10.05s *** (-1) pressed
--- End code ---
If opening and closing the laptop lid doesn't cause any input device events to fire, how come xscreensaver knows when lid is closed? Something is aware that the lid is closed, because the xscreensaver's animations never start as long as laptop lid is closed.
GNUser:
This just in from xscreensaver's developer, Jamie Zawinski:
--- Code: ---Q (GNUser): How does xscreensaver detect laptop lid switch state?
A (Zawinski): Basically, "it doesn't." It's all terrible. Everything about power management on Linux is laughable.
--- End code ---
Oops. It seems I hit a nerve. Maybe I'm just going to leave this voodoo alone and settle for a workaround similar to what jazzbiker suggests. I feel defeated. You'd think it would be trivial to disable an input device.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version