Increasing performace of rt3090 wifi by removing power save

Write tutorials for Linux Mint here
More tutorials on https://github.com/orgs/linuxmint/discu ... /tutorials and (archive) on https://community.linuxmint.com/tutorial
Forum rules
Don't add support questions to tutorials; start your own topic in the appropriate sub-forum instead. Before you post read forum rules
Post Reply
honzee

Increasing performace of rt3090 wifi by removing power save

Post by honzee »

Hi,
my girlfriend has an asus eee 1001HA netbook with Ralink rt3090 wifi. In previous Ubuntu and Mint distros it was quite simple to make it work. There was also a lot of topics about it. But it took me ages to make it work in Ubuntu 12.10/Mint 14. The wifi actually worked out of box, but connection was slow with frequent drop outs.

rt3090-dkms is not included for ubuntu 12.10 in ppa:markus-tisoft/rt3090...
rt2860sta is not included in 3.x kernel...
ndiswrapper has some weird issues when using Ralink windows drivers...
turning off the wifi power management also did not work...

Code: Select all

sudo iwconfig wlan0 power off
After spending hours of googling I finally found working solution. Tim Felgate on launchpad wrote:
I have applied a solution recommended at http://askubuntu.com/questions/84959/ra ... ot-working which involved changing the settings in /usr/lib/pm-utils/power.d/wireless to disable power management of the wireless card. My network card is rt3090 and the driver is rt2800 as installed from the 12.04 LTS desktop CD (64-bit). This has stopped the drop outs.
In my view, this solution should have very similar effect as "sudo iwconfig wlan0 power off", but iwconfing did not do the trick in my case.

Summary:

Code: Select all

gksudo gedit /usr/lib/pm-utils/power.d/wireless
Change this part:

Code: Select all

case $driver in
ipw2100) iwpriv_ac="set_power 0"
iwpriv_batt="set_power 5"
iwconfig_ac="power on"
iwconfig_batt="power on";;
ipw3945)
iwpriv_ac="set_power 6"
iwpriv_batt="set_power 7";;
iwl*) if [ -f "/sys/class/net/$1/device/power_level" ]; then
iwlevel_ac=0
iwlevel_batt=3
else
iwconfig_ac="power off"
iwconfig_batt="power on"
fi;;
*) iwconfig_ac="power off"
iwconfig_batt="power on";;
esac
to:

Code: Select all

case $driver in
        ipw2100) iwpriv_ac="set_power 0"
            iwpriv_batt="set_power 0"
            iwconfig_ac="power on"
            iwconfig_batt="power on";;
        ipw3945)
            iwpriv_ac="set_power 6"
            iwpriv_batt="set_power 6";;
        iwl*) if [ -f "/sys/class/net/$1/device/power_level" ]; then
                 iwlevel_ac=0
                 iwlevel_batt=0
              else
                 iwconfig_ac="power off"
                 iwconfig_batt="power off"
              fi;;
        *) iwconfig_ac="power off"
           iwconfig_batt="power off";;
    esac
Tested on Asus EEE 1001HA.

EDIT: Connection is much better but still not reliable enough. Scroll to my next post in this topic :arrow:

Useful sources:
https://bugs.launchpad.net/ubuntu/+sour ... bug/888227
https://answers.launchpad.net/ubuntu/+s ... ion/214342
http://www.tech-juice.org/2011/10/02/fi ... -on-linux/
Last edited by honzee on Sun Apr 28, 2013 11:24 am, edited 2 times in total.
User avatar
catweazel
Level 19
Level 19
Posts: 9763
Joined: Fri Oct 12, 2012 9:44 pm
Location: Australian Antarctic Territory

Re: rt3090 wifi

Post by catweazel »

Great write-up. Thanks. It'll come in handy for a few users.
"There is, ultimately, only one truth -- cogito, ergo sum -- everything else is an assumption." - Me, my swansong.
viking777

Re: rt3090 wifi

Post by viking777 »

sudo iwconfig wlan0 power off", but iwconfing did not do the trick in my case.
iwconfig has been superseded by iw, so the relevant command now is probably:

Code: Select all

sudo iw wlan0 power_save off
BTW I have moved your topic to the 'How to' section and altered the title a little to make it clearer what it is about.
honzee

Re: Setting rt3090 wifi power save mode

Post by honzee »

rt2800 with power save mode off is much better then with psm on, but connection i still not as reliable as before. After other research i have to say that the best way is to compile original driver from Ralink - no problems with connection strenght and speed. It has only one disadvantage - driver MUST BE REBUILT after every kernel update.

Steps to build original driver:

1) Blacklist default rt2800 drivers
in terminal run:

Code: Select all

gksudo gedit /etc/modprobe.d/blacklist.conf
and add these lines to the end of file:

Code: Select all

blacklist rt2800pci
blacklist rt2800lib
blacklist rt2x00usb
blacklist rt2x00pci
blacklist rt2x00lib
save and close file

2) Download RT3090PCIe linux driver from Ralink
http://www.mediatek.com/_en/07_download ... php?sn=501

3) Unpack the drive and modify following files (post #71 from rodhull http://ubuntuforums.org/showthread.php?t=1849602&page=8)
in the file ../common/cmm_wpa.c :

Code: Select all

UCHAR PrimaryRsnie;
  BOOLEAN bMixCipher = FALSE; // indicate the pairwise and group cipher are different
  UCHAR p_offset;
- WPA_MIX_PAIR_CIPHER FlexibleCipher = MIX_CIPHER_NOTUSE; // it provide the more flexible cipher combination in WPA-WPA2 and TKIPAES mode
+ WPA_MIX_PAIR_CIPHER FlexibleCipher = WPA_TKIPAES_WPA2_TKIPAES; // it provide the more flexible cipher combination in WPA-WPA2 and TKIPAES mode
in the file ../os/linux/config.mk :

Code: Select all

HAS_GREENAP_SUPPORT=n
 #Support MAC80211 LINUX-only function
-HAS_CFG80211_SUPPORT=y
+HAS_CFG80211_SUPPORT=n

 #Support RFKILL hardware block/unblock LINUX-only function
 HAS_RFKILL_HW_SUPPORT=y
Modifications are required because driver is designed for old kernel 2.6.x...

4) Open terminal in driver root folder and run:
sudo make clean; sudo make; sudo make install
5) Restart computer and enjoy reliable wifi with full speed :wink:

Ubuntu team unfortunately does not have reliable working solution these days...

Resources:
http://ubuntuforums.org/showthread.php?t=1849602&page=8
https://bugs.launchpad.net/ubuntu/+sour ... bug/896582
Last edited by honzee on Sun Apr 28, 2013 11:20 am, edited 3 times in total.
honzee

Re: rt3090 wifi

Post by honzee »

viking777 wrote:
sudo iwconfig wlan0 power off", but iwconfing did not do the trick in my case.
iwconfig has been superseded by iw, so the relevant command now is probably:

Code: Select all

sudo iw wlan0 power_save off
BTW I have moved your topic to the 'How to' section and altered the title a little to make it clearer what it is about.
Thanks for moving the topic. The title is unfortunately inexact, because its about increasing the performance of rt3090 wifi. It should be something like "Increasing performace of rt3090 wifi" or "Better performance rt3090 wifi". Sorry for my english :)
viking777

Re: Increasing performace of rt3090 wifi by removing power s

Post by viking777 »

The title is unfortunately inexact
OK I changed it again, hope that is better.

BTW it is your thread, you can alter the title yourself if you want to - I won't be offended :D
ar3700
Level 1
Level 1
Posts: 36
Joined: Wed Dec 19, 2012 2:19 am

Re: Increasing performace of rt3090 wifi by removing power s

Post by ar3700 »

Great thread, very useful. I wish I had known all this stuff 7 months ago. I have been struggling with horrible wifi on my RT3090 since November 2012 when I loaded Mint on my Acer Nettop. I also tried Lubuntu but it also doesn't work with the RT3090. It was so frustrating I almost gave up on Linux but I finally just replaced the wifi card with a ThinkPenguin wifi card which works perfectly.
maio

Re: Increasing performace of rt3090 wifi by removing power s

Post by maio »

I'm the same situation of honzee,
but my network manager doesn't see any networks,

I'll try installing the orignial drivers like you suggest ......
reddot

Re: Increasing performace of rt3090 wifi by removing power s

Post by reddot »

honzee wrote:

Code: Select all

Using honzee code
Hardware:
Dell Inspiron 17 5758
Intel 3160 1x1
Asus RT-AC68U

Thanks, the setting you provided gave me twice the speed when sending large files from my laptop to my file server, EXXELENT :mrgreen: :mrgreen: :mrgreen:
JohnBobSmith

Re: Increasing performace of rt3090 wifi by removing power s

Post by JohnBobSmith »

On a relevant note,

My HP Laptop has a Ralink RT3290 wifi adapter. In Linux Mint 17.2 XFCE, the adapter works 98% flawlessly. The other 2% is the odd connection drop, likely completely unrelated to the card (I have a lot of wireless phones, a microwave, etc. causing interference). Here are my specs:

Code: Select all

System:    Host: johnbobsmith-laptop Kernel: 3.16.0-38-generic x86_64 (64 bit) 
           Desktop: Xfce 4.12.2 Distro: Linux Mint 17.2 Rafaela
CPU:       Dual core AMD A4-4300M APU with Radeon HD Graphics (-MCP-) cache: 2048 KB flags: (lm nx sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm) 
           Clock Speeds: 1: 1400.00 MHz 2: 2200.00 MHz
Network:   Card-1: Ralink RT3290 Wireless 802.11n 1T/1R PCIe driver: rt2800pci 
           Card-2: Realtek RTL8101E/RTL8102E PCI Express Fast Ethernet controller driver: r8169 
Most links regarding compiling the driver from mediatek are dead or have other flaws (kernel panics when I tried it in Mint 17 that I never solved). I can for sure say that, for at least my wifi card, everything is running smoothly at high speeds. :)
Post Reply

Return to “Tutorials”