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.

1 Answers1

4

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.