The Unwanted Sleep
Power management is crucial for laptops running on battery, but it can be incredibly frustrating on a desktop PC or a laptop plugged into a wall outlet. By default, Ubuntu is often configured to aggressively save power. If you leave your computer idle for 20 or 30 minutes while a long render finishes or a massive file downloads, you might return to find that Ubuntu has automatically suspended the entire system (put it to sleep), severing your network connection and halting your background tasks completely, even though the machine is connected to reliable AC power.
Keeping the System Awake
To ensure your background tasks complete uninterrupted and stop Ubuntu from automatically suspending the system when plugged into the wall, you must adjust the core power settings.
Click on the system menu in the top-right corner of your screen (where the network and volume icons reside) and click on Settings. In the left-hand navigation sidebar, scroll down and click on Power. Look at the right-hand panel. Under the “Power Saving Options” section, you will find a setting labelled Automatic Suspend. Click on this option. A small dialogue box will appear with two distinct sections: “On Battery Power” and “Plugged In.” In the Plugged In section, click the toggle switch to completely turn it Off. You can leave the “On Battery Power” toggle enabled if you are using a laptop. Once disabled for AC power, your Ubuntu machine will remain fully awake and operational indefinitely while plugged into the wall, regardless of how long you leave it idle.