Home » Questions » Computers [ Ask a new question ]

DPMS, keep screen off when lid shut

DPMS, keep screen off when lid shut

I have a laptop running linux. In my xorg configuration, I have DPMS setup so that the screen automatically turns off during several events. In addition to that I have to the following script tied to ACPI lid open/close events:

Asked by: Guest | Views: 16
Total answers/comments: 2
Guest [Entry]

"Add the following lines to the /etc/acpi/lid.sh file:

#open screenon chvt 7
#close chvt 12 screenoff

This will switch to console when the lid is closed and avoid X detecting mouse movements."
Guest [Entry]

"Following the idea of disabling the mouse, you can do it in a more selective and secure manner with xinput:

# open
DISPLAY=:0.0 xinput set-int-prop 12 ""Device Enabled"" 8 1
# close
DISPLAY=:0.0 xinput set-int-prop 12 ""Device Enabled"" 8 0

You find the ID (12 here) with: xinput --list"