acpid crashes X server on Thinkpad X201t

view story

https://bbs.archlinux.org – Here is instruction on how to use a udev rule to run a script when one's laptop is plugged/unplugged.  Using it for your purposes would be quite similar.  Of course you would have to figure out what value is changing in /sys when you flip the screen.  https://wiki.archlinux.org/index.php/La … _udev_ruleThat said, here is some info on how to get started writing udev rules.http://www.reactivated.net/writing_udev_rules.htmlIt is a bit outdated, in that the command is now udevadm.  So to find the necessary parameters to put into your rule, you would do something like$ ud (HowTos)