Ubuntu includes an automatic suspend feature to save power, especially useful for laptops running on battery. This feature activates after a period of inactivity or when the laptop lid is closed. However, it can be disruptive for users who require continuous operation for ongoing processes.

The automatic suspend, also known as sleep mode, reduces power consumption by putting the system into a low-power state. While beneficial for energy savings, it can interfere with long-running tasks or network operations, making it necessary to disable it for uninterrupted performance.

Disabling suspend involves configuring Ubuntu's power management settings. Users can turn off automatic suspend through system settings and modify configuration files like logind.conf to prevent suspend actions when the laptop lid is closed. These adjustments ensure the laptop remains operational, allowing critical processes to run without interruption.

How to disable Ubuntu from suspending the machine

  1. Open the system settings window.
  2. Click on “Power” in the left side menu.
  3. Turn off “Automatic Suspend” under “Power Saving Options”.
  4. Open the logind.conf file with your preferred text editor.
    $ sudo vim /etc/systemd/logind.conf
  5. Uncomment the necessary lines to disable suspend actions.
  6. Save the changes and close the text editor.
  7. Reboot the system to apply the changes.

This guide is tested on Ubuntu:

Version Code Name
22.04 LTS Jammy Jellyfish
23.10 Mantic Minotaur
24.04 LTS Noble Numbat
Discuss the article:

Comment anonymously. Login not required.