How to disable the systemd lid close event on linux
How to disable the systemd lid close event on linux has been tough to find a working solution for me. I have a faulty lid switch on my ZaReason Ultralap 440 laptop running Ubuntu 15.04 and when I adjust the lid back it would fire off a lid close event and the machine would power off.
I changed /etc/systemd.logind.conf to ignore HandlePowerKey and HandleLidSwitch. That by itself didn’t fix the issue.
I created an alias command:
and execute that when I startup my terminal session after logging into the system. Now under i3wm I no longer have my computer shutting down when the screen gets bumped by one of my cats or when I adjust the angle.