Skip to content

Instantly share code, notes, and snippets.

Last active August 29, 2023 17:46
Star You must be signed in to star a gist
What would you like to do?
NetworkManager Wi-Fi powersaving configuration

NetworkManager WiFi Power Saving

NetworkManager supports WiFi powersaving but the function is rather undocumented.

From the source code: wifi.powersave can have the following value:

  • NM_SETTING_WIRELESS_POWERSAVE_DEFAULT (0): use the default value
  • NM_SETTING_WIRELESS_POWERSAVE_IGNORE (1): don't touch existing setting

Then I propose 2 files, only one of them needs to be put under /etc/NetworkManager/conf.d/.
One is forcing to disable powersaving, while the other one enable it.

Once you have put the file in the right folder, simply restart NetworkManager:

sudo systemctl restart NetworkManager
# File to be place under /etc/NetworkManager/conf.d
# Values are 0 (use default), 1 (ignore/don't touch), 2 (disable) or 3 (enable).
wifi.powersave = 2
# File to be place under /etc/NetworkManager/conf.d
# Values are 0 (use default), 1 (ignore/don't touch), 2 (disable) or 3 (enable).
wifi.powersave = 3
Copy link

alanngo commented Feb 14, 2023

Saved me a headache in having to reinstall ubuntu Thanks!

Copy link

e219 commented Feb 19, 2023

My wifi connection is often interrupted when using battery power, while using AC power, the connection is stable. It is solved after I modify the wifi.powersave to 2. Thank you very much!

Copy link

Spelling correction in comment: "File to be placed under", with a d after place

In any case, interesting and long-lasting bug...

Copy link

Copy link

Check with

iwconfig <interface> | grep "Power Management"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment