I have tried to disabled power management for my wifi card using $sudo iwconfig wlan0 power off But keep getting SET failed for "invalid argument"! Any thoughts?
Thx
-
- Posts: 1
- Joined: Wed Jul 10, 2013 4:18 am
Re: Disable power management for Ralink RT5370
Hi Babak,
Please try using the following solution:
1. Turn off wireless power management from /etc/network/interfaces.
2. Add the following line of code (may be inserted anywhere in file):
3. Exit and save the file
--> CTRL+X
-->Save modified buffer (ANSWERING "No" WILL DESTROY CHANGES) ?
(Type Y for yes)
--> File Name to Write: /etc/network/interfaces (Press Enter)
4. Restart networking
5. Confirm Power Mangement is off:
You should see something like this:
wlan0 IEEE 802.11bgn ESSID:"publicwifi"
Mode:Managed Frequency:2.437 GHz Access Point: 00:21:69:61:A1:1C
Bit Rate=54 Mb/s Tx-Power=20 dBm
Retry long limit:7 RTS thr:off Fragment thr:off
Encryption key:off
Power Management:off
Link Quality=70/70 Signal level=-39 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:2 Invalid misc:19 Missed beacon:0
lo no wireless extensions.
eth0 no wireless extensions.
Please try using the following solution:
1. Turn off wireless power management from /etc/network/interfaces.
Code: Select all
sudo /etc/network/interfaces
Code: Select all
wireless-power off
--> CTRL+X
-->Save modified buffer (ANSWERING "No" WILL DESTROY CHANGES) ?
(Type Y for yes)
--> File Name to Write: /etc/network/interfaces (Press Enter)
4. Restart networking
Code: Select all
/etc/init.d/networking restart
Code: Select all
iwconfig
wlan0 IEEE 802.11bgn ESSID:"publicwifi"
Mode:Managed Frequency:2.437 GHz Access Point: 00:21:69:61:A1:1C
Bit Rate=54 Mb/s Tx-Power=20 dBm
Retry long limit:7 RTS thr:off Fragment thr:off
Encryption key:off
Power Management:off
Link Quality=70/70 Signal level=-39 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:2 Invalid misc:19 Missed beacon:0
lo no wireless extensions.
eth0 no wireless extensions.
Re: Disable power management for Ralink RT5370
I am experiencing the same problem of my wifi dongle with RT5370 chipset turning itself off whenever it feels like it! Your solution doesn't help much.
If the modem goes off, I either need to unplug and replug it (that sometimes works) or power down and then power up again. If the modem is then active (little blue light flashing), iwconfig shows power management off.##However, when the modem turns itself off and you run iwconfig, it shows power management as now on!
At the moment, it makes the Pi unusable as you never know when the internet will disappear, so as a router it is useless!
Any further suggestions please?
Thanks
If the modem goes off, I either need to unplug and replug it (that sometimes works) or power down and then power up again. If the modem is then active (little blue light flashing), iwconfig shows power management off.##However, when the modem turns itself off and you run iwconfig, it shows power management as now on!
At the moment, it makes the Pi unusable as you never know when the internet will disappear, so as a router it is useless!
Any further suggestions please?
Thanks
Re: Disable power management for Ralink RT5370
I have the latest driver, according to the Realtek website (v4.0.2_9000.20130911)
I started with a fresh NOOBS install. I didn't install or change anything related to WiFi. I used the WiFi GUI included by default on the desktop.
I use a commercial router that handles all the devices and traffic I ever throw at it just fine.
When I use it on the Pi, connect speeds are DOG SLOW and the connection unreliable.
Also, iwconfig only shows this as a 802.11bg adapter, not 'N', which it certainly is...
I'm not sure whether this particular hardware piece is bad or is the model itself bad?
When I send it back to adafruit, do I ask for a refund or a replacement. Any suggestions on the performance or the cause?
I started with a fresh NOOBS install. I didn't install or change anything related to WiFi. I used the WiFi GUI included by default on the desktop.
I use a commercial router that handles all the devices and traffic I ever throw at it just fine.
When I use it on the Pi, connect speeds are DOG SLOW and the connection unreliable.
Also, iwconfig only shows this as a 802.11bg adapter, not 'N', which it certainly is...
I'm not sure whether this particular hardware piece is bad or is the model itself bad?
When I send it back to adafruit, do I ask for a refund or a replacement. Any suggestions on the performance or the cause?
- Richard-TX
- Posts: 1549
- Joined: Tue May 28, 2013 3:24 pm
- Location: North Texas
Re: Disable power management for Ralink RT5370
where in the interfaces file the power off statement is makes a difference.
Here is where it works for me.
------------------------------------------------
auto lo
iface lo inet loopback
iface eth0 inet static
address 10.232.1.92
netmask 255.255.255.0
gateway 10.232.1.1
wireless-power off
auto wlan0
allow-hotplug wlan0
iface wlan0 inet static
.
.
.
----------------------------------------------------
Here is where it works for me.
------------------------------------------------
auto lo
iface lo inet loopback
iface eth0 inet static
address 10.232.1.92
netmask 255.255.255.0
gateway 10.232.1.1
wireless-power off
auto wlan0
allow-hotplug wlan0
iface wlan0 inet static
.
.
.
----------------------------------------------------
Richard
Doing Unix since 1985.
The 9-25-2013 image of Wheezy can be found at:
http://downloads.raspberrypi.org/raspbian/images/raspbian-2013-09-27/2013-09-25-wheezy-raspbian.zip
Doing Unix since 1985.
The 9-25-2013 image of Wheezy can be found at:
http://downloads.raspberrypi.org/raspbian/images/raspbian-2013-09-27/2013-09-25-wheezy-raspbian.zip
-
- Posts: 1
- Joined: Sun Jan 05, 2014 5:19 am
Re: Disable power management for Ralink RT5370
unfortunately I am having the same problem, I added the command in the proper location, yet it does nothing. I am using wipi dongle (which is great plug and play) but so far the power management function will not turn off.
-
- Posts: 7542
- Joined: Sat Jan 12, 2013 3:01 am
- Location: Grants Pass, OR, USA
- Contact: Website
Re: Disable power management for Ralink RT5370
Did you reboot after making changes?
I have WIPI which has been up for more than 48 hours now after adding the wireless-power off command. Before could not get it to stay on overnight. I previously had the command as the last line but it did not do anything. Now I have it like shown below.
I won't be totally convinced unless I can have it stay on for more than a week.
sudo nano /etc/network/interfaces
---------------------------------------
I have WIPI which has been up for more than 48 hours now after adding the wireless-power off command. Before could not get it to stay on overnight. I previously had the command as the last line but it did not do anything. Now I have it like shown below.
I won't be totally convinced unless I can have it stay on for more than a week.
sudo nano /etc/network/interfaces
---------------------------------------
Code: Select all
auto lo
iface lo inet loopback
iface eth0 inet dhcp
wireless-power off
allow-hotplug wlan0
iface wlan0 inet manual
wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
iface default inet dhcp
Unless specified otherwise my response is based on the latest and fully updated RPiOS Buster w/ Desktop OS.
Re: Disable power management for Ralink RT5370
I too was having difficulty turning off power management in the interfaces file. However, this was what worked for me.
auto lo
iface lo inet loopback
iface eth0 inet dhcp
auto wlan0
allow-hotplug wlan0
iface wlan0 inet dhcp
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
wireless-power off
iface default inet dhcp
auto lo
iface lo inet loopback
iface eth0 inet dhcp
auto wlan0
allow-hotplug wlan0
iface wlan0 inet dhcp
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
wireless-power off
iface default inet dhcp
Re: Disable power management for Ralink RT5370
This worked great:
rsenio wrote: auto lo
iface lo inet loopback
iface eth0 inet dhcp
auto wlan0
allow-hotplug wlan0
iface wlan0 inet dhcp
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
wireless-power off
iface default inet dhcp
Re: Disable power management for Ralink RT5370
I have all of this done and iwconfig shows
Power Management:off
However, after a relatively short period of time the ssh session and all other networking becomes sluggish. Often it will disconnect when you type in the ssh session.
If I have another computer on the local network ping it every 15 seconds this doesn't happen.
ping -i 15 <ipaddr>
So, I am thinking that there is some sort of timeout that is way too short on the wifi driver or adapter.
Any idea what that could be?
If I can't figure this out soon I'll try a different wifi adapter hoping that is the problem.
Power Management:off
However, after a relatively short period of time the ssh session and all other networking becomes sluggish. Often it will disconnect when you type in the ssh session.
If I have another computer on the local network ping it every 15 seconds this doesn't happen.
ping -i 15 <ipaddr>
So, I am thinking that there is some sort of timeout that is way too short on the wifi driver or adapter.
Any idea what that could be?
If I can't figure this out soon I'll try a different wifi adapter hoping that is the problem.
Re: Disable power management for Ralink RT5370
This seems works for me. My connection to my RPi as AP is much stable than before.
Re: Disable power management for Ralink RT5370
I know this is an old thread, but thought I'd mention that adding wireless-power off to the very end of my /etc/network/interfaces file solved my issues with the model A+ and an RT5370 wireless dongle. With power management on, I was getting dropped connections after a few hours, and even when it worked, it was slow, with very long and irregular ping times and choppy SSH sessions.
Simply typing "iwconfig wlan0 power off" immediately improved everything - and turning power management back on immediately made everything worse. Editing the interfaces file made the change permanent, but apparently the order of commands does matter.
Simply typing "iwconfig wlan0 power off" immediately improved everything - and turning power management back on immediately made everything worse. Editing the interfaces file made the change permanent, but apparently the order of commands does matter.
Re: Disable power management for Ralink RT5370
IME, at the very least, it needs to appear after this line: wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf.
Re: Disable power management for Ralink RT5370
Thank you very much to everyone for the information in this thread. I was having similar issues with the Raspberry Pi 3's on board wi-fi and the edit to the /etc/network fixed the problem. I thought it worth adding a post here in case any other raspi3 users wanted confirmation that it works in this environment too.
Here's my /etc/network/interfaces edit, with the wireless-power off line added. Presumably this will only change the setting for wlan0, which is just fine for the basic system.
Rebooting after the change and then issuing iwconfig shows Power Managerment:off as desired and putty sessions no longer drop.
Here's my /etc/network/interfaces edit, with the wireless-power off line added. Presumably this will only change the setting for wlan0, which is just fine for the basic system.
Rebooting after the change and then issuing iwconfig shows Power Managerment:off as desired and putty sessions no longer drop.
Code: Select all
auto lo
iface lo inet loopback
iface eth0 inet manual
allow-hotplug wlan0
iface wlan0 inet manual
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
wireless-power off
allow-hotplug wlan1
iface wlan1 inet manual
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
Re: Disable power management for Ralink RT5370
It's possible to switch of power management with post connection script.
Create script file
Open to edit. You can use another editor, i'm using vim
Type i to enter insert mode and copy pase next two lines
Type :wq to save and exit vim
Create script file
Code: Select all
sudo touch /etc/network/if-up.d/off-power-manager
Code: Select all
sudo vim /etc/network/if-up.d/off-power-manager
Code: Select all
#!/bin/sh
/sbin/iwconfig wlan0 power off
Re: Disable power management for Ralink RT5370
If it helps anyone, I experienced similar WiFi connectivity issues with two brand new RPi 3's running Jessie headless (no Pixel). The first one came up fine and had stable WiFi and Bluetooth (after installing BlueZ). The second I brought up a few weeks later and it experienced intermittent WiFi connections, dropping link a few times an hour even 3 feet from the access point. It would also not identify BLE devices in hcidump.
I tried every remedy on the boards I could find, including disabling roaming and power management. For what it's worth, the working unit had both these enabled. I updated the kernel and the Bluetooth stack to the latest versions to no avail. Finally, I ran "uname -r" and discovered that the kernel version on the broken Pi (4.4.35-v7+) was more recent than the working one (4.4.21-v7+).
At this point, I cloned the SD card from the working Pi and now both of them are working.
I tried every remedy on the boards I could find, including disabling roaming and power management. For what it's worth, the working unit had both these enabled. I updated the kernel and the Bluetooth stack to the latest versions to no avail. Finally, I ran "uname -r" and discovered that the kernel version on the broken Pi (4.4.35-v7+) was more recent than the working one (4.4.21-v7+).
At this point, I cloned the SD card from the working Pi and now both of them are working.