0

I can't get the SSH connection to stay live when I close the lid of my laptop. I'm running Ubuntu 20.04 on a Dell Latitude E6420 and connect to it from Win10 with PuTTY.

I've already tried turning this off by editing /etc/systemd/logind.conf:

#HandleSuspendKey=ignore
#HandleHibernateKey=ignore
#HandleLidSwitch=ignore
#HandleLidSwitchExternalPower=ignore
#HandleLidSwitchDocked=ignore

(Initially I only changed the #HandleSuspendKey but when that didn't work after service restart I changed the others to see if that would change anything.)

I've also changed /etc/default/acpi-support to `SUSPEND_METHODS="none", but that didn't work.

I've even installed UPower and tried to add IgnoreLid=true, but that hasn't worked either.

This setting can't be turned off in the BIOS.

One thing I noticed is that when I initially setup the server it would disconnect from everything if I shut the lid, includig my router. However, once I edited logind.conf the server remained listed under the "wired devices" section of my router's login page. Could this mean that is has something to do with PuTTY or Windows (I don't have an Linux desktop to test this on right now)?

2
  • 1
    Do you realise that lines in that config file that start with a hash (#) are comments and will be ignored? So you need to remove the # from any line you want to modify. Also you could try downloading the Tweaks app from Ubuntu software store which has a Suspend when laptop lid is closed toggle option under General settings.
    – codlord
    Jul 5, 2020 at 8:57
  • 1
    I can't believe I didn't see that! Thanks so much for your help, this has fixed it for me.
    – Sebr
    Jul 6, 2020 at 2:31

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.