Still, I couldn't get the adapter to honour the kernel option to switch power management off, so I did that with the following entry in /etc/rc.local
Code: Select all
sleep 5 ; /sbin/iw wlan0 set power_save off
Two comments on this approach :
I think it is not
a good practice to add any kind of delay in /etc/rc.local file, as executing this script is part of the booting process, and adding delays will also delay all those processes that take place after executing this script. Some of these processes may not tolerate the delay and may fail or otherwise cause unexpected results. A better approach would be to create an executable script containing the sleep time and the command(s), then add a line like -
..in the /etc/rc.local file. The "&" at the end of the line will cause the script to run as a background process and the rc.local script itself will quickly move on to the next line in it.
Turning off power management by adding a command in the rc.local file helps ONLY when you need to run it only once, which is not always the case. Sometimes some external scripts (like pm-util ones) or one of the drivers will cause the power management to turn back on.
In such cases, if you are using pm-utils
, the correct approach is to add the command to turn power management off into /etc/pm/power.d/wireless
file, and make it executable (sometimes just creating a blank file would be sufficient).
The iwlwifi driver in newer kernels also uses 'iwldvm
' or 'iwlmvm
' driver as a dependency. If it happens to be "iwlmvm
" driver, it has a parameter called "power_scheme" that offers three power saving modes - 1: Always Active, 2: Balanced, 3: low-power. Default is '2' (balanced). I personally believe that the default 'balanced' mode is one of the major causes that keep turning power-management "on". A solution that I have tested successfully many times with this driver, is to set the "power_scheme" mode to '1' (Active). This can be applied permanently by creating a conf file in /etc/modprobe.d directory -
Code: Select all
sudo tee /etc/modprobe.d/iwlmvm.conf <<< "options iwlmvm power_scheme=1"
Hope it adds some value to the thread.