January 16, 2009

Fixing Wireless Transmission Rate in Ubuntu Intrepid Ibex

Yet another problem I had with Intrepid was extremely bad performance from my wireless PCI card. Confusingly, the wireless card is recognized by default and no special handling seems to be necessary to use it. It connects to my router perfectly fine and I can browse the web. However, the performance is terrible. The same card, when dualbooted into XP, gives me excellent signal reception and maximum browsing speeds. In Intrepid, browsing is a real PIA most of the time.

Apparently, the problem is a faulty transmission rate assignment by iwconfig. If you observe extremely bad browsing performance, open the terminal and type
iwconfig

You will most probably see something very similar to the following:
wlan0 IEEE 802.11bg ESSID:"Burkay"
Mode:Managed Frequency:2.437 GHz Access Point: 00:12:BF:67:8C:75
Bit Rate=1 Mb/s Tx-Power=27 dBm
Retry min limit:7 RTS thr:off Fragment thr=2352 B
Power Management:off
Link Quality=69/100 Signal level:-63 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0
Here, wlan0 is the name of your wireless device, and Bit Rate is the maximum transmission speed your card can realize. However, unless you have an ancient system and a prehistoric network, your card can support at least 54 Mb/s. You can see that at the moment the card seems to support only 1 Mb/s, an obvious trouble. In order to fix this problem, you simply have to force iwconfig to use 54 Mb/s as the bit rate. To do this, first open /etc/network/interfaces in gedit:
sudo gedit /etc/network/interfaces

Now add the following line to the end of the file:
pre-up iwconfig wlan0 rate 54M

If your card has a different name than wlan0 then don't forget to fix the above line by using the proper name. This makes sure that after the next restart your wireless interface will be forced to run at 54 Mb/s. At least this fixed my card and now, once again, I can browse at full speed.

No comments: