By default, Ubuntu is configured with aggressive power-saving measures designed for laptops. If you walk away from your computer for 20 minutes, the system will automatically suspend itself. While this makes perfect sense when you are running on battery power to prevent the laptop from dying, it is incredibly annoying when your computer is securely plugged into an AC wall outlet.
If you leave your desk while downloading a massive game, compiling code, or rendering a video, an automatic suspend will instantly pause your work and disconnect your network. You can configure Ubuntu to remain fully awake indefinitely whenever it is plugged into a power source.
How to Stop Automatic Suspend on AC Power in Ubuntu
You can manage this dual-power profile directly from the main Power settings menu.
- Click the network/battery icon cluster in the top-right corner of the Ubuntu top bar and select Settings (the gear icon).
- In the left-hand navigation sidebar, scroll down and click on Power.
- Look for the section titled Suspend & Power Button (or Automatic Suspend depending on your GNOME version).
- Click on the row labelled Automatic Suspend.
- A small pop-up window will appear presenting two distinct toggles: “On Battery Power” and “Plugged In.”
- Leave the “On Battery Power” toggle turned on to protect your laptop’s charge when travelling.
- Click the toggle switch next to Plugged In to turn it completely Off.
Close the settings window. Moving forward, as long as your Ubuntu laptop or desktop is connected to a wall outlet, it will run indefinitely. You can safely leave large downloads or rendering tasks running overnight without fear of the system putting itself to sleep.