, To make Ubuntu do nothing when laptop lid is closed: , , Open the /etc/systemd/logind.conf file in a text editor as root, for example, , , sudo -H gedit /etc/systemd/logind.conf , Add a line HandleLidSwitch=ignore (make sure its not commented out!), , Restart the systemd daemon with this command: , sudo restart systemd-logind , or, from 15.04 onwards: , , sudo service systemd-logind restart , , In addition, you need to configure xfce4-power-manager to handle the lid switch. , I found that the reliable way was to Quit it from the power manager icon menu before configuring it with , , xfconf-query -c xfce4-power-manager -p /xfce4-power-manager/logind-handle-lid-switch -s true , , sudo restart systemd-logind , or, from 15.04 onwards: , , sudo service systemd-logind restart ,