Edit /etc/systemd/logind.conf and make sure you have,
HandleLidSwitch=ignore |
which will make it ignore the lid being closed. (You may need to also undo the other changes you’ve made).
Full details over at the archlinux Wiki.
The man page for logind.conf also has the relevant information,
HandlePowerKey=, HandleSuspendKey=, HandleHibernateKey=, HandleLidSwitch= Controls whether logind shall handle the system power and sleep keys and the lid switch to trigger actions such as system power-off or suspend. Can be one of ignore, poweroff, reboot, halt, kexec, suspend, hibernate, hybrid-sleep and lock. If ignore logind will never handle these keys. If lock all running sessions will be screen locked. Otherwise the specified action will be taken in the respective event. Only input devices with the power-switch udev tag will be watched for key/lid switch events. HandlePowerKey= defaults to poweroff. HandleSuspendKey= and HandleLidSwitch= default to suspend. HandleHibernateKey= defaults to hibernate. |
Over!