Page 1 of 2 12 LastLast
Results 1 to 10 of 19

Thread: Disable wlan0 power management

  1. #1
    Join Date
    May 2008
    Beans
    31

    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!
    Ubuntu 11.04... not a great idea!

  2. #2
    Join Date
    Feb 2010
    Location
    Ontario
    Beans
    155
    Distro
    Ubuntu 10.10 Maverick Meerkat

    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
    #!/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!
    i5-650 Dual-Core 3.2GHz, 4GB DDR3, 1TB, eVGA GTX 460 *Running Ubuntu, Arch, Win7, Snow Leopard
    Aluminum Unibody, 5,1 Macbook *Running Snow Leopard, Ubuntu, Jolicloud

  3. #3
    Join Date
    May 2008
    Beans
    31

    Re: Disable wlan0 power management

    Quote Originally Posted by Zookalicious View Post
    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

    Code:
    sleep 30
    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!
    Ubuntu 11.04... not a great idea!

  4. #4
    Join Date
    May 2008
    Beans
    31

    Re: Disable wlan0 power management

    Quote Originally Posted by Zookalicious View Post
    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!
    Ubuntu 11.04... not a great idea!

  5. #5
    Join Date
    Feb 2010
    Location
    Ontario
    Beans
    155
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: Disable wlan0 power management

    Excellent! Glad that worked for you
    i5-650 Dual-Core 3.2GHz, 4GB DDR3, 1TB, eVGA GTX 460 *Running Ubuntu, Arch, Win7, Snow Leopard
    Aluminum Unibody, 5,1 Macbook *Running Snow Leopard, Ubuntu, Jolicloud

  6. #6
    Join Date
    Jan 2008
    Location
    Ireland
    Beans
    36
    Distro
    Ubuntu Karmic Koala (testing)

    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:~$
    Last edited by J Caffrey; May 3rd, 2011 at 10:48 PM.

  7. #7
    Join Date
    May 2008
    Beans
    31

    Re: Disable wlan0 power management

    Quote Originally Posted by J Caffrey View Post
    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.
    Ubuntu 11.04... not a great idea!

  8. #8
    Join Date
    Jan 2008
    Location
    Ireland
    Beans
    36
    Distro
    Ubuntu Karmic Koala (testing)

    Smile Re: Disable wlan0 power management

    Thanks for that its working perfectly. I'm a bit rusty having made a comeback to ubuntu.

  9. #9
    Join Date
    May 2008
    Beans
    31

    Re: Disable wlan0 power management

    Quote Originally Posted by J Caffrey View Post
    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...
    Ubuntu 11.04... not a great idea!

  10. #10
    Join Date
    Feb 2006
    Beans
    2

    Re: Disable wlan0 power management

    thank you , i solved this problem. it was kill me

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •