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

I have tried everything that i can find on this site as well as the internet to turn off power management for the wireless card.

My current conf

user1@user1-Q500A:~$ iwconfig
eth0      no wireless extensions.

wlan0     IEEE 802.11bgn  ESSID:"AJ_Home"  
          Mode:Managed  Frequency:2.412 GHz  Access Point: 00:26:F2:FD:92:F4   
          Bit Rate=65 Mb/s   Tx-Power=16 dBm   
          Retry short limit:7   RTS thr:off   Fragment thr:off
          Power Management:on
          Link Quality=55/70  Signal level=-55 dBm  
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:53   Missed beacon:0

lo        no wireless extensions.

These are the steps ive used in the past to disable the "wifi" power management during the installation of Ubuntu and it has always worked.

iwconfig to check power management ON for wlan0

  1. sudo touch /etc/pm/power.d/wireless

  2. sudo chmod 755 /etc/pm/power.d/wireless OR sudo chmod +x /etc/pm/power.d/wireless

  3. sudo gedit /etc/pm/power.d/wireless

    Copy/paste the following text into the empty text file "wireless":

    #!/bin/sh
    /sbin/iwconfig wlan0 power off
    
  4. Close and Save the text file.

  5. Reboot

  6. Type iwconfig at term to verify wireless power management is off.

Unless something has changed with 15.04 i'm thinking this may be a bug.

I have tried this on 3 newly installed Xubuntu 15.04 computers and its the same on all.

Thanks

John


Solution 1:

Check the file /etc/NetworkManager/conf.d/default-wifi-powersave-on.conf if the system uses NetworkManager. It contains wifi.powersave = 3. This configuration file came after 14.04 LTS.

To switch off the WLAN power save do:

  1. Create a new configuration file with

     sudo nano /etc/NetworkManager/conf.d/system-wifi-powersave.conf
    
  2. Put the following code in the file

     # File to be placed under /etc/NetworkManager/conf.d
     # File name lexically later than 'default…'
     [connection]
     # Values for wifi.powersave are 
     # 0 (use default), 1 (ignore/don't touch), 2 (disable) or 3 (enable).
     wifi.powersave = 2
    
  3. Save the file with CTRL+O, leave nano with CTRL+X, restart NetworkManager with sudo systemctl restart NetworkManager and check with iwconfig.

Further hints

  • The name of the new file is important. It needs to be later in the alphabet than default-wifi-powersave-on.

  • All WLAN connections are affected by this system-wide change.

  • Each WLAN connection still can have individual power management settings. See the answer from AHAN in this thread.

Source: NetworkManager WiFi Power Saving

Solution 2:

Adding to the answer by Alan. It might be a bit late, but after struggling with this for a while I might as well write it down here.

The solution by Alan works fine, but after sleep/resume my wlan power management was always turned on again. Hooks in /etc/pm/ are not working. So additionally to modifying rc.local I did the following, which now seems to work. See systemd on ArchWiki.

Go to /etc/systemd/system/.

Create a file called root-resume.service and put the following text inside:

[Unit]
Description=Turn of wlan power management
After=suspend.target

[Service]
Type=simple
ExecStartPre= /bin/sleep 10
ExecStart= /sbin/iwconfig wlan0 power off

[Install]
WantedBy=suspend.target

Enable the root-resume service to be started at boot:

sudo systemctl enable root-resume

Maybe reboot now.

This in combination with the modification of the rc.local file described by Alan now seems to work fine. My wlan power management is always turned of, even after sleep.

I hope this helps someone

Solution 3:

Add powersave=0 to your Wifi profile at /etc/NetworkManager/system-connections/your wifi profile

[wifi]
ssid=xxxx
mode=infrastructure
bssid=xxxxxxxxx
mac-address=xxxxxxxx
seen-bssids=xxxxx
security=802-11-wireless-security
hidden=true
powersave=0