Ubuntu – Disable wifi power management

networkingpower-managementrebootsuspendwireless

Problems:

1) Power management makes Wifi connection unstable. I need to disable it completely
2) My wifi doesn't automatically turns on after sleep. I should do it myself

Info

Laptop: Dell vostro 14-5480
OS: Ubuntu 15.04
kernel: 3.19.0-30
Wifi-card: Intel 7265
Wifi-driver: iwlwifi

What i've tried

"iwconfig wlan0 power off" helps but I should do it every time my Laptop turns on. I tried to play with /etc/pm. Nothing helped. The only solution was adding

sleep 10
iwconfig wlan0 poweroff
exit 0

to /etc/rc.local. Now power management turns off, as I need, but only when I reboot/switch on laptop. If I turn my wifi on manually after suspend, I should also manually turn off power management.

I thought maybe 13.10 suspend kills wifi connection solution might help, I made a file wakenet.sh, but it doesn't work and it shouldn't as ubuntu 15.04 doesn't have nmcli nm, so it's impossible to use

nmcli nm sleep flase

At least I haven't found how to do it with new nmcli.

Maybe someone can help me at least in finding the proper alternative command instead of nmcli nm sleep false?

Best Answer

The best solution that worked for me (in Ubuntu 16.04LTS) is to change the value of wifi.powersave located in /etc/NetworkManager/conf.d/default-wifi-powersave-on.conf from 3 (enabled) to 2 (disabled).

This effectively makes the effects of sudo iwconfig <interface> power off permanent.

Source: Power management for wireless unable to turn off in Xubunu 15.04 Vivid