Month: May 2011

Ralink rt5390 wi-fi driver on ubuntu 11.04

UPDATE (7-Feb-2012): Marko has created a PPA for the Ralink drivers. I should make our live much easier. Take a look at his blog (http://www.techytalk.info/ralink-wireless/).

I have HP pavilion dm1z laptop and it took me quite some time to install the linux wi-fi driver on ubuntu. In this post I tell how to install the Ralink’s RT5390 wi-fi driver on Ubuntu Natty Narwhal. The main source of the post is Ubuntu forums. So here it goes.

  1. Download the linux driver (RT5390PCIe) from Ralink.
  2. Extract it.  The files will be extracted to 2010_1216_RT5390_LinuxSTA_V2.4.0.4_WiFiBTCombo_DPO folder.
  3. Download all the patches except the x64_86 patch, assuming you have a 32-bit system, from opensuse website.
  4. Copy the patches to the folder – 2010_1216_RT5390_LinuxSTA_V2.4.0.4_WiFiBTCombo_DPO
  5. Goto the folder.
  6. Make the following change in  /os/linux/config.mk file – HAS_ANTENNA_DIVERSITY_SUPPORT=y (originally was n)
  7. Now run the following commands in terminal:
    patch -p0 < rt5390sta-2.4.0.4-config.patch
    patch -p0 < rt5390sta-2.4.0.4-convert-devicename-to-wlanX.patch
    patch -p0 < rt5390sta-2.4.0.4-reduce_debug_output.patch
    patch -p0 < rt5390sta-2.4.0.4-remove-potential-conflicts-with-rt2860sta.patch
    patch -p0 < rt5390sta-2.4.0.4-return_nonvoid_function.patch
    patch -p0 < rt5390sta-2.4.0.4-WPA-mixed.patch
    sudo su
    cp RT2860STA.dat RT5390STA.dat
    mkdir -p /etc/Wireless/RT5390STA
    cp RT5390STA.dat /etc/Wireless/RT5390STA
    make clean
    make
    make install
    modprobe rt5390sta
    exit

Link to the original posts on ubuntu forum: Points 3 and 7 are from Chilli555’s post #24, while others are from Akshay’s post.

UPDATE: It has been pointed out by Weldon in the comment section that the above method does not work for Kernels >=2.6.39. To know your kernel version you can type the following in terminal:
uname -r

UPDATE (5-Aug-2011):

  1. kpbotbot has confirmed that he can run wireless on kernel >=2.6.39 using an arch Linux fix available here.
  2. Ralink has changed the driver available. I old driver can got from here.
  3. The opensuse link above now points to new set patches. The old ones can be downloaded from here. You can try using the new version but I have not used it so cannot say much about it.

UPDATE (2-Sep-2011):

  1. kpbobot has pointed out in the comment section that the drivers are already a part of Linux 3.x kernel.