How to Stop Ubuntu from Automatically Turning off Wi-Fi

The Dropped Signal

Ubuntu is designed to be highly aggressive with power management on laptops to maximize battery life. One of the ways it does this is by actively monitoring the network interfaces. If Ubuntu detects that you are not actively transferring data, or if the Wi-Fi signal drops momentarily, the operating system might automatically turn off the Wi-Fi adapter entirely to save power. This is disastrous if you are hosting a local server, downloading a massive file over a slow connection, or running an SSH session that requires a persistent, even if occasionally idle, network connection.

Disabling Wi-Fi Power Management

To maintain a rock-solid connection and stop Ubuntu from automatically turning off your Wi-Fi adapter to save power, you must explicitly disable Wi-Fi power management in the NetworkManager configuration.

This setting requires a quick edit via the terminal. Open your terminal by pressing Ctrl+Alt+T. You need to edit the default configuration file for the network manager. Type exactly: sudo nano /etc/NetworkManager/conf.d/default-wifi-powersave-on.conf and press Enter (you will be prompted for your password). Inside this file, you will see a line that reads wifi.powersave = 3. The number 3 tells Ubuntu to aggressively manage power. Use your arrow keys to navigate to the 3, delete it, and replace it with a 2 (so the line reads wifi.powersave = 2). This instructs the system to never suspend the Wi-Fi card. Press Ctrl+O then Enter to save, and Ctrl+X to exit. Reboot your computer to apply the new power rules permanently.

Get the best tech tips delivered straight to your inbox.

Join thousands of readers mastering Apple, Google, Microsoft, and Linux.