Ubuntu Linux is configured to automatically suspend when the laptop lid is closed to save power. This feature has always been part of the Ubuntu Linux platform but is quite easy to disable so that when you close the laptop screen or lid, it doesn’t go to sleep. When Ubuntu Linux goes to suspend mode, it’s not turned off – just go to sleep. You can resume by opening the lid and your session will continue from where you left off. When the action is set to do ignore, you can simply close the lid without putting the laptop to sleep while work is still being done.
How to keep the laptop on when the screen is closed in Ubuntu Linux
As described above, Ubuntu Linux will automatically suspend when you close the laptop lid to save power. You can change that so it doesn’t sleep, and below is how to do that. To stop Ubuntu Linux from suspending when the lid is closed, follow these steps: These instructions will only work if you are using systemd. Press the CTRL + ALT + T keyboard shortcut to open the command console terminal. Run the commands below: Once the file opens, search for the line below: Then change the line to: Save the file and exit. Next, run the commands below to apply your changes. You can restart your computer and test it to see if it works. If not, continue below. Alternatively, install Gnome Tweaks to help you control laptop lid close behavior in Ubuntu Linux. Run the commands below to install. After installing the app, go to the Activities overview and search for Tweaks. In the app, under General, toggle the switch to Off for Suspend when the laptop lid is closed. That should do it! Conclusion: This post showed you how to configure Ubuntu Linux so that it doesn’t go to sleep when the laptop lid or screen is closed. If you find any error above or have something to add, please use the comment form below to report.