4

I am using ubuntu 22.04 on my dell laptop with processor intel core i3 4gb and 1tb storage.

I want to make my laptop to not suspend when I close laptop lid. I don't know how to do it.

I have used some methods but failed.

0

1 Answer 1

5

After a lot of search, I have found two methods to do it.

Method 1: Using GNOME Tweaks First we have to install gnome-tweaks-tool.

sudo apt-get install gnome-tweaks

Then open the gnome-tweaks and follow below steps:

  • Go to the General tab in the sidebar
  • And toggle off the 'Suspend when laptop lid is closed’ button change lid close behaviour in ubuntu

Method 2: Change login configuration (for advanced users)

If you look into the content of the file /etc/systemd/logind.conf, you’ll see three different types of default settings for the laptop lid closing.

  • HandleLidSwitch: When the laptop is on battery power
  • HandleLidSwitchExternalPower: When the laptop is plugged into a power outlet
  • HandleLidSwitchDocked: When the laptop is connected to a docking station

Default lid close settings

If you want, you can change the value of those parameters to one of these as per your preference:

  • lock: lock when lid is closed
  • ignore: do nothing
  • poweroff: shutdown
  • hibernate: hibernate when lid is closed

I would suggest going with ignore

Then save the file do a restart.

1
  • This configuration is problematic. If you unplug the dock and plug the dock back in you're unable to connect to the dock, because the laptop is in a "suspended" state. You have to open and close the lid real quick to get the dock to work. This makes using a dock very inconvenient. I have found no good solution yet. On Ubuntu 22. Commented Jul 27, 2023 at 15:27

You must log in to answer this question.

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