Disable wlan0 power management
Hi everybody. Since wlan0 power management causes malfunctions to my Atheros wireless device, I need to disable power management in order to get a good internet connection even when the computer is battery powered. Power management is set "off" when I plug in wall power and is set "on" when I unplug it. I want to set it always "off". I can do it by using:
Code:
sudo iwconfig wlan0 power off
But when I reboot, I have to do it again! I've tried adding that command to rc.locale, before exit 0, but nothing happens. Then I've tried adding the following lines to /etc/network/interfaces
Code:
auto wlan0
iface wlan0 inet dhcp
wireless-power off
but nothing. What else can I do? Thank you in advance!
Re: Disable wlan0 power management
I can't give you the source where I read this from (can't bloody well remember) but I just did this same thing two days ago and this is what I did.
Code:
gksu gedit /etc/pm/power.d/wireless
and then I just put
Quote:
#!/bin/sh
/sbin/iwconfig wlan0 power off
In the file.
Lastly,
Code:
sudo chmod +x /etc/pm/power.d/wireless
According to the thread that works, and my connection seems significantly more stable now when I try and get on the campus wifi.
Hope that helps!
Re: Disable wlan0 power management
Quote:
Originally Posted by
Zookalicious
I can't give you the source where I read this from (can't bloody well remember) but I just did this same thing two days ago and this is what I did.
...
Hope that helps!
Hi Zookalicious. Thank you, I'll try your solution, but I must admit that I've found another one while I was waiting for an answer. I'm writing it here, maybe someone will need it. In my first post, I've written that I have also edited /etc/rc.local and added
Code:
/sbin/iwconfig wlan0 power off
But I did not consider that I have to make that command run AFTER the association of the wlan0 connection. So, before the above-mentioned command, I also added
Of course, everything before "exit 0". Well, it seems to work fine! :)
I'll try Zook's solution and I will write about it later! Thank you anyway!
Re: Disable wlan0 power management
Quote:
Originally Posted by
Zookalicious
I can't give you the source where I read this from (can't bloody well remember) but I just did this same thing two days ago and this is what I did.
Code:
gksu gedit /etc/pm/power.d/wireless
and then I just put
In the file.
Lastly,
Code:
sudo chmod +x /etc/pm/power.d/wireless
According to the thread that works, and my connection seems significantly more stable now when I try and get on the campus wifi.
Hope that helps!
This solution works, too, and works better then the first I've used. rc.local solution worked, too, but there was a problem. as I plugged in and then plugged out again AC power, power management was set to "on" again. But with the solution suggested by Zook, power management for wlan0 will ALWAYS be switched off... Thank you Zook!
Re: Disable wlan0 power management
Excellent! Glad that worked for you :)
Re: Disable wlan0 power management
I have a clean install of 11.04. When I try to copy and paste Zook's commands into terminal the file opens but it's blank. I close it without saving and "no such file or directory errors" appears in terminal. What am I doing wrong? This is what appears in terminal. john@john-WIM2180:~$ gksu gedit /etc/pm/power.d/wireless
(gedit:2856): Gtk-WARNING **: Attempting to set the permissions of `/root/.local/share/recently-used.xbel', but failed: No such file or directory
(gedit:2856): Gtk-WARNING **: Attempting to store changes into `/root/.local/share/recently-used.xbel', but failed: Failed to create file '/root/.local/share/recently-used.xbel.Y738UV': No such file or directory
(gedit:2856): Gtk-WARNING **: Attempting to set the permissions of `/root/.local/share/recently-used.xbel', but failed: No such file or directory
john@john-WIM2180:~$
Re: Disable wlan0 power management
Quote:
Originally Posted by
J Caffrey
I have a clean install of 11.04. When I try to copy and paste Zook's commands into terminal the file opens but it's blank. I close it without saving and "no such file or directory errors" appears in terminal. What am I doing wrong?:confused
If you're talking about /etc/pm/power.d/wireless , it doesn't exist, you must create it from scratch and add
Code:
#!/bin/sh
/sbin/iwconfig wlan0 power off
then save.
Re: Disable wlan0 power management
Thanks for that its working perfectly. I'm a bit rusty having made a comeback to ubuntu.
Re: Disable wlan0 power management
Quote:
Originally Posted by
J Caffrey
Thanks for that its working perfectly. I'm a bit rusty having made a comeback to ubuntu.
I'm happy I could help you like Zook helped me... ):P
Re: Disable wlan0 power management
thank you , i solved this problem. it was kill me