How to Easily Turn Off and On Auto-Suspend in Ubuntu 22.04

Enable/Disable Auto-Suspend in Ubuntu 22.04: A Simple and Fun Guide! 🌟

Hello, friends! Today, we’re diving into a handy feature on your Ubuntu computer called auto-suspend. This feature makes your computer take a nap when you’re not using it. While it’s great for saving battery life, it can sometimes be a bit annoying. So, let’s explore how to control this feature and make your computing experience smoother!

What is Auto-Suspend? 🤔

Auto-suspend is like a little sleep button for your computer. When you don’t touch it for a while, it goes to sleep to save energy. It’s fantastic for saving battery on laptops, but if you’re watching a movie or working on something important, it can be a bother!

Fun Fact! 🎉

Did you know that auto-suspend can help extend the lifespan of your laptop battery? By reducing power consumption when not in use, you can keep your device running longer!

Why Would You Want to Turn It Off? 🚫

Here are some reasons you might want to turn off auto-suspend:

  • Working on Projects: If you’re busy with homework or a fun project, you don’t want your computer to fall asleep!
  • Watching Videos: If you’re watching your favorite show, you don’t want it to stop just because you took a snack break.
  • Remote Access: If you’re using your computer from another place, you want it to stay awake.

How to Turn Off Auto-Suspend in Ubuntu 22.04

Let’s learn how to turn off auto-suspend! You can do it in three fun ways:

Method 1: Using the Settings App 🛠️

  1. Open Settings: Click on the little gear icon at the top right of your screen.
  2. Go to Power Settings: Find the “Power” option on the left side.
  3. Turn Off Auto-Suspend: Look for “Automatic Suspend” and switch it to Off for both “On Battery” and “Plugged In”.

Ubuntu 22.04 settings for auto-suspend feature.

Method 2: Using the Terminal (Command Line) 💻

If you like typing commands, this is for you!

  1. Open Terminal: Press Ctrl + Alt + T to open a black window where you can type.

  2. Type This Command: Copy and paste this:

    gsettings set org.gnome.settings-daemon.plugins.power sleep-inactive-ac-timeout 0
    gsettings set org.gnome.settings-daemon.plugins.power sleep-inactive-battery-timeout 0
    
  3. Check Your Work: You can see if it worked by typing:

    gsettings get org.gnome.settings-daemon.plugins.power sleep-inactive-ac-timeout
    gsettings get org.gnome.settings-daemon.plugins.power sleep-inactive-battery-timeout
    

Method 3: Using the Dconf Editor 🎨

This is a cool tool that lets you change lots of settings!

  1. Install Dconf Editor: Type this in the terminal to get it:

    sudo apt install dconf-editor
    
  2. Open Dconf Editor: Find it in your applications.

  3. Navigate to Power Settings: Go to org > gnome > settings-daemon > plugins > power.

  4. Turn Off Auto-Suspend: Change the sleep-inactive-ac-timeout and sleep-inactive-battery-timeout to 0.

How to Turn On Auto-Suspend Again 🌙

If you want your computer to take naps again, here’s how to turn auto-suspend back on!

Method 1: Using the Settings App 🛠️

  1. Open Settings: Click on the gear icon again.
  2. Go to Power Settings: Click on “Power.”
  3. Turn On Auto-Suspend: Switch “Automatic Suspend” to On for both “On Battery” and “Plugged In.”

Method 2: Using the Terminal (Command Line) 💻

  1. Open Terminal: Press Ctrl + Alt + T.

  2. Type This Command: Replace TIMEOUT with how many minutes you want (like 300 for 5 minutes):

    gsettings set org.gnome.settings-daemon.plugins.power sleep-inactive-ac-timeout TIMEOUT
    gsettings set org.gnome.settings-daemon.plugins.power sleep-inactive-battery-timeout TIMEOUT
    
  3. Check Your Work: Use the same check command as before!

Method 3: Using the Dconf Editor 🎨

  1. Open Dconf Editor: Find it in your applications.
  2. Navigate to Power Settings: Go to org > gnome > settings-daemon > plugins > power.
  3. Turn On Auto-Suspend: Set the sleep-inactive-ac-timeout and sleep-inactive-battery-timeout to your desired time in seconds.

What If It Doesn’t Work? 🤷‍♂️

If your computer still doesn’t listen, try these tips:

  • Settings Not Saving: Make sure you have permission to change settings. You might need to use sudo in the terminal.
  • Auto-Suspend Still Active: Check if any other programs are trying to control power settings.
  • Ensure there are no background processes preventing suspension; check System Settings -> Power -> Automatic Suspend settings.

Troubleshooting Tips! 🔧

If you encounter issues, consider restarting your computer after making changes. Sometimes, a simple reboot can resolve lingering settings that don’t take effect immediately.

Conclusion 🎉

Now you know how to turn off and on auto-suspend in Ubuntu 22.04! Whether you’re working, watching videos, or just having fun, you can control when your computer sleeps.

Vishnu Damwala
Vishnu Damwala

A web geek, an industry experienced web developer & tutor/instructor residing in India 🇮🇳