Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I am affected by this bug: 869502.

A workaround which seems to stop the kernel panics for me is to disable wlan0 power management:

sudo iwconfig wlan0 power off

However it seems to automatically turn power management back on when I unplug the power cable and I think at many other times, too.

Is there something that might be causing this? Does anyone know how I can prevent it?

share|improve this question
1  
askubuntu.com/questions/285434/… –  Qasim Jun 14 '13 at 15:04

4 Answers 4

up vote 8 down vote accepted

Wireless powermanagement is run by a hook in pm-utils. You can turn it off in any of the following way:

Create a file in /etc/pm/config.d . I have named it blacklist:

gksu gedit /etc/pm/config.d/blacklist and inside the file keep:

HOOK_BLACKLIST="wireless"

If you want to disable any other hooks, default hooks are located at /usr/lib/pm-utils/power.d/

OR

You can just create an empty hook in either /etc/pm/sleep.d or /etc/pm/power.d See which one works for you. i.e.

Just do

sudo touch /etc/pm/sleep.d/wireless OR sudo touch /etc/pm/power.d/wireless

share|improve this answer
    
I used the first method. It's working. Thanks! –  Alex Dec 5 '11 at 5:57
    
None of the methods work for me. –  Mihai Capotă Jan 5 '12 at 14:05

If turning off power management for your wireless interface speeds up internet like this:

sudo iwconfig wlan0 power off

Than to make it permanent run command as follows:

  1. cd /etc/pm/power.d

  2. sudo gedit wifi_pwr_off

    This will open an empty file, copy the code below into it:

    #!/bin/sh 
    /sbin/iwconfig wlan0 power off
    
  3. Save the file, remember to

    sudo chmod +x wifi_pwr_off
    

    and restart.

share|improve this answer
    
When i write sudo iwconfig wlan0 power off i get this message : Error for wireless request "Set Power Management" (8B2C) : SET failed on device wlan0 ; No such device. –  Murhaf Sousli Feb 16 at 10:41
    
Run iwconfig without any agrument sudo iwconfig and check which interface has wireless extension. Sometimes it is eth1. –  Dilawar Mar 26 at 7:14

Great advice. 'sudo iwconfig wlan0 power off' seems the only way to get my ath9k module stabily working (with kernel 3.2 - curiously in kernel > 3.5 there seems to be no problem, but that kernels because of their suspend-to-ram/disk problems with amd64 seem to be a no go, unfortunately . . . :-( )

share|improve this answer

My preferred way is to add the following line in /etc/network/interfaces to my wireless interface's settings:

post-up iwconfig wlan0 power off

Here's a complete example:

auto wlan0
iface wlan0 inet static
 address 192.168.1.2
 network 192.168.1.0
 netmask 255.255.255.0
 broadcast 192.168.1.255
 gateway 192.168.1.254
 post-up iwconfig wlan0 power off
 wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf

Note that man interfaces says the behaviour of post-up may change in the future.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.