3

I am trying to set up a home cloud server on my old Ubuntu laptop However when i leave it running and close the lid of my laptop of course I get logged out and the process stops.

Is there a way to either completely disable the logoff when closing the lid OR a way to make sure the process keeps running even when I am logged off?

Any help is gratefully received.

/Mark

1
  • What's the value for HandleLidSwitch in file /etc/systemd/logind.conf? Nov 12, 2019 at 15:25

3 Answers 3

2

Is there a way to ... completely disable the logoff when closing the lid ...?

Which operation system do you use exactly?
For me with ubuntu 16.04 LTS I could handle the logoff issue with following standard system settings:

  • Turn off the Lock
    system settings > Brightness & Lock > Lock: OFF (Details here)
  • Maybe in addition you need to switch on "Automatic Login" for your user:
    system settings > User Accounts > Automatic Login: On
3
  • this seems to have done the trick...I had missed the Brightness and lock - OFF
    – user123410
    Jan 29, 2018 at 3:18
  • But if I want the lock functionality but not the logoff? Nov 12, 2019 at 15:27
  • Also, the asker asks for the computer to just continue working - not related to related to any lock or not lock. Just continue running on lid closed. Nov 12, 2019 at 15:30
0

On Ubuntu 20.04, and maybe even on previous versions, you can disable logoff going to Preferences -> Power Management and set to "Do nothing" on "When laptop lid is closed".

enter image description here

1
  • I dont have this open in 20.04
    – jonathan
    Jul 26, 2021 at 17:01
0

Using Tweaks how described here helped me:

  1. Open the Activities overview and start typing Tweaks.
  2. Click Tweaks to open the application.
  3. Select the General tab.
  4. Switch the Suspend when laptop lid is closed switch to off.
  5. Close the Tweaks window.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .