How to make Ubuntu not hang when you lower the laptop lid

Who I am
Philippe Gloaguen
Author and references

Taking care of your laptop is something that cannot get out of hand. These teams are so important in today's daily work that failure is a headache.

So, for your well-being and that of your computer, it's best to learn how to handle certain tricks. Here's why you should know how to make Ubuntu not hang when you lower the laptop lid.

Go ahead and go through this interesting and nourishing read with one of the simplest and most interesting Linux tricks. You will want to share it with everyone!

The Ubuntu Linux system

Tackling the world's most popular and used operating systems isn't something that happens overnight. Linux is an operating system released in 1991, its main feature? Things free software.

This, however, did not attract the attention of many people at the time. However, in recent years it has seen a steady and considerable growth in the number of users. Its progress has been such that it is classified as the third most used operating system on desktop or laptop computers.

Its Ubuntu distribution was released in 2004. This is, in turn, the favorite distribution of many. This is due to its versatility and, of course, its own Customization.

Energy saving

And it is precisely the ability to personalize that we continue to talk about for this article. Can you imagine the extent it can have? Here's a tip: You can change the way your laptop save energy.

That's right, if you want to know how to easily speed up Ubuntu system startup or boot time, this article will serve as a starting point! All this thanks to a simple and very frequent action: lower the lid of the laptop.

What happens when you lower the lid?

Usually this action has an immediate consequence. Whenever you lower the lid of your laptop, it goes into "sleep" or "hibernate" mode. If you still don't know what these modes are, you may want to review what the difference is between suspend and hibernate.

The truth is, not all laptops support these features. And although they are usually harmless, they can cause some instability in older computers. Reason enough to know how to optimize and clean up your Ubuntu Linux system.

Learning how to put my laptop into hibernation or sleep mode when I close the lid is extremely simple… you just do it! But… you didn't accidentally do it and you wish that Ubuntu didn't stop when you lower the laptop lid?

It's time for a change

As you can see, this is a function not entirely intuitive. Sometimes lowering the computer cover doesn't mean it should go into “sleep” or “hibernate” mode. Normally, it would be advisable to learn how to schedule an automatic power on and off in Ubuntu Linux. However, this trick will save you a lot more time.

  1. Use your system terminal to enter the following command: sudo nano /etc/systemd/logind.conf
  2. Find the section that contains: # HandleLidSwitch = suspend.
  3. You can simply uncomment it (pause) or edit it with hibernate (so that it goes into 'hibernate' mode when you close the lid).

You can also change the behavior of your laptop closing the lid in a different way. From your computer desktop, enter system settings and:

  1. Access the "Energy" section.
  2. Then, go to the section "When you close the lid".
  3. In the options bar, the alternatives “Suspend” and “Do nothing” are shown.

Easy, fast and useful

What Ubuntu is not suspended when the laptop lid is lowered it is highly recommended if you are constantly on the go. Since, many times, to change the table or room, it is necessary to lower the lid without it hanging.

Despite you don't save a lot of energy as you normally would with the active option, you save inconvenience when you work. If you want to know more tricks, surely you are interested in how to enable or disable the touchpad while writing in Ubuntu Linux.

add a comment of How to make Ubuntu not hang when you lower the laptop lid
Comment sent successfully! We will review it in the next few hours.