How turn off External Display, on closing lid in Ubuntu 20.04
I believe that there are a lot of questions asking the other way around. However for me, on closing my laptop's lid the external monitor is still running which I would like it to stop continuing to run,when I close my laptop lid.
Ubuntu Version: 20.04.1
I did the following things, However none of them seem to work:
- Edited
/etc/systemd/logind.conf
to the following:
HandleLidSwitch=suspend
HandleLidSwitchExternalPower=suspend
HandleLidSwitchDocked=suspend
- Changed the
lid-close-ac-action
option in dconf-editor under/org/gnome/settings-daemon/plugins/power
tosuspend
EDIT: - Changed the
lid-close-suspend-with-external-monitor
option in dconf-editor totrue
.
You need three configurations:
- in
dconf-editor
org.gnome.settings-daemon.plugins.power
the settinglid-close-suspend-with-external-monitor
enabled - in file
/etc/UPower/UPower.conf
change the parameterIgnoreLid
totrue
(ending up withIgnoreLid=true
) - in file
/etc/systemd/logind.conf
you needHandleLidSwitchDocked=suspend