How to keep laptop running when lid is closed (20.04.3 LTS)
Bo Berglund
bo.berglund at gmail.com
Fri Oct 8 06:48:56 UTC 2021
On Thu, 7 Oct 2021 23:57:44 +0200, Liam Proven <lproven at gmail.com> wrote:
>On Thu, 7 Oct 2021 at 23:44, Bo Berglund <bo.berglund at gmail.com> wrote:
>>
>> If I close the lid it goes into sleep mode, which I do not want, because I want
>> to have it running and interact with it using SSH and VNC.
>
>Well here's how to do it with GNOME:
>
>https://help.ubuntu.com/stable/ubuntu-help/power-closelid.html.en
>
>I don't think MATE Tweaks has anything relevant, but the MATE power
>settings might.
I could not find any Tweaks/General tab in Tweaks on Mate... :(
But I found these in Menu/Preferences/PowerManagement:
- On_AC_Power/When_laptop_lid_is_closed
- On_Battery_Power/When_laptop_lid_is_closed
These could be set to "Do nothing"
And now my laptop continues running with the lid closed!
Before I posted I had tested this, which I found on-line:
sudo nano /etc/systemd/logind.conf
#Edit these:
[Login]
#These keys are set to be ignored:
HandlePowerKey=ignore
HandleSuspendKey=ignore
HandleHibernateKey=ignore
HandleLidSwitch=ignore
HandleLidSwitchDocked=ignore
sudo systemctl restart systemd-logind
But this did nothing at all, laptop still suspends when lid closes...
NEXT question:
--------------
Why is WiFi not switched on when the laptop starts if the lid is closed?
I need the laptop to be accessible when I start it with the lid closed and I
don't want to pull out an ethernet cable just for that purpose.
When I start it this way it stops on the login screen with no networking
running, not until I log in on the start screen does it start WiFi.
I will use this laptop in these two ways (with the lapto stuffed on a shelf):
1) With SSH using PuTTY to a command prompt
2) With VNC to the graphics desktop when I need to do some GUI related stuff
Both of these require networking to be running and for some reason it is not
started until I log in on the GUI start screen!
--
Bo Berglund
Developer in Sweden
More information about the ubuntu-users
mailing list