WLAN powersave mode in Ubuntu and performance

I noticed over the past weeks that the system log files on my Kubuntu 12.04 were flooded with NetworkManager entries related to the WLAN connections, suggesting a very high activity from NetworkManager, as if the connection was reset several times per second. This does not happen when the computer is connected with an ethernet cable. The visible effect was a slow connection through the WIFI network, despite the adapter reporting to run at 85 Mbits/sec.

After much googling, I found the answer in the comments of this Debian bug report. It seems the wlan adapter on my Sony Vaio, in this case an Atheros Communications Inc. AR9485, would switch the powersaving mode on and off all the time. The kernel thusly reports the change to NetworkManager, which in turn tries to reconfigure the network stack accordingly several times per second.  I launched in a terminal window to disable power management on the WLAN interface:

iwconfig wlan0 power off

NetworkManager went back to ‘normal’ mode. No more entries in the  log files, short of a message every 10 minutes, which is probably due to the IPv6 router advertisements sent by the CPE. In order to make this automatic in the future, I created a file called /etc/NetworkManager/dispatcher.d/02-wlan-powersave-off with this content:

if [ "${IF}" = "wlan0" ] && [ "${STATUS}" = "up" ]; then
   iwconfig ${IF} power off
   logger "${IF}: turning off powersave mode to prevent constant reconnections"

Save the file
make it executable:  sudo chmod 775 /etc/NetworkManager/dispatcher.d/02-wlan-powersave-off
restart Nework Manager:  sudo restart network-manager

From now on, forget about it.

Your WLAN interface may have a different name. You can identify by typing ‘iwconfig’ from the command prompt.

  1. permissions should be 755 to on ubuntu 14.04

  2. works perfect for me !
    Thanks!! 🙂

  3. doesnt work for me.
    i did these steps. but after a reboot its still on.

  4. Disable WiFi Powersave on Linux | Emcity Blog - pingback on 31 January 2014 at 19:32

Leave a Comment

NOTE - You can use these HTML tags and attributes:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

Trackbacks and Pingbacks:

  • Disable WiFi Powersave on Linux | Emcity Blog - Pingback on 2014/01/31/ 19:32