Categories: Ubuntu

How to Change Sleep Settings in Ubuntu

When a computer is in a state of inactivity, it can enter into a power saving mode called sleep mode. In sleep mode all superfluous processes are turned down, and just some power is provided to RAM to keep data. We can change the sleep settings of computers in Windows, Mac or Linux. The write-up is focusing on how to change the sleep settings in Ubuntu:

Follow the procedures stated below to successfully change sleep settings in Ubuntu:

Method 1: How to Change Sleep Setting Through Power Setting in Ubuntu

Step 1: Open Settings by going to Activities overview and type settings in the search bar and click on Settings

Sponsored
icon:

Step 2: The Settings window will be opened, click on “Power” from the left list and the Power panel will open on the right side:

Step 3: Under “Power Saving” option click on Automatic Suspend:

Step 4: Select on “Plugged In” or “On Battery Power”, turn on the switch and select Delay time of your choice. Both of these settings can be customized:

I switched on “On Battery Power” and set its delayed time to 20 minutes. You can change your settings accordingly. That means when your laptop is on battery power, it will be suspended after 20 minutes. You can set settings for Plugged In mode as well.

Sponsored

Method 2: How to put PC on Sleep through Terminal

There are no direct approaches to manipulate sleep settings in terminal, but there are couple of methods to suspend all activities of your Ubuntu PC or put it on hibernate mode through terminal:

Suspend your system : Firstly, open the terminal and run the below mentioned command to suspend your System:

$ systemctl suspend

After running the above command your system will be suspended and a black screen will appear.

Hibernate your system : Run the command mentioned below to make your system enter to hibernate mode:

$ systemctl hibernate

After running this command, a black screen will appear, that means your system is now in hibernate state.

By moving the pointer or by pressing some key from the keyboard you will recover from hibernate state.

Conclusion

When your computer is not in use it automatically goes to sleep mode after a set time. We can change the sleep settings and, in this article, we defined easy approaches to change sleep settings in your Linux OS (Ubuntu), one is through power setting and other is through terminal approach. Moreover, you can create custom scripts to modify your sleep settings.

Ubuntu Server Admin

Recent Posts

Canonical Releases Ubuntu 25.04 Plucky Puffin

The latest interim release of Ubuntu introduces “devpacks” for popular frameworks like Spring, along with…

2 days ago

Ubuntu 25.04 (Plucky Puffin) Released

Ubuntu 25.04, codenamed “Plucky Puffin”, is here. This release continues Ubuntu’s proud tradition of integrating…

3 days ago

Extended Security Maintenance for Ubuntu 20.04 (Focal Fossa) begins May 29, 2025

Ubuntu released its 20.04 (Focal Fossa) release 5 years ago, on March 23, 2020. As…

3 days ago

Ubuntu 20.04 LTS End Of Life – activate ESM to keep your fleet of devices secure and operational

Focal Fossa will reach the End of Standard Support in May 2025, also known as…

4 days ago

Ubuntu MATE 25.04 Release Notes

Ubuntu MATE 25.04 is ready to soar! 🪽 Celebrating our 10th anniversary as an official…

4 days ago

Ubuntu Weekly Newsletter Issue 887

Welcome to the Ubuntu Weekly Newsletter, Issue 887 for the week of April 6 –…

5 days ago