Background
There is really not much need to keep a laptop’s lid opened when connected to an external monitor.
OS
Linux
Outline
- Launch terminal
- sudo to root
- edit /etc/systemd/logind.conf
- Change folder to /etc/systemd
- Backup current logind.conf
- Launch editor ( vi) and pass along file name ( logind.conf )
- Keep current HandleLidSwitch=suspend commented out
- Add HandleLidSwitch=lock
- Save Changes
- Exit Editor
- Restart Services
- Restart systemd-logind.service
- Command :- systemctl restart systemd-logind.service
- Restart systemd-logind.service
Images
logind.conf
logind.conf – Original
logind.conf – Revised
Windows
Outline
- Access Control Panel \ Power Options\ System Settings
- Select “Choose what the Power Buttons do”
- The “Control Panel\All Control Panel Items\Power Options\System Settings” window appears
- Access the “Power and sleep buttons and lid settings” group box
- Focus on “when I close the lid” area
- There are two options
- The first been “On Battery” and the other “When plugged in”
Images
Control Panel \ All Control Panel Items \ Power Options \ System Settings
Original
Revised
Validation
The steps above were validated on the OSes listed below:
- Linux
- Cent OS
- MS Windows
- Version 10
References
- Redhat
- Products & Services > Product Documentation > Red Hat Enterprise Linux > 7 > Desktop Migration and Administration Guide
- 13.10. Preventing the Computer from Suspending when Closing the Lid
Link
- 13.10. Preventing the Computer from Suspending when Closing the Lid
- Products & Services > Product Documentation > Red Hat Enterprise Linux > 7 > Desktop Migration and Administration Guide