Monday, October 11, 2010

Linux iwlagn problems

This isn't really a content-full post, but if any of you are trying to install linux on a new computer and are finding that your internet connection drops after a couple minutes and a bit of traffic, it was a really annoying problem for me that existed for essentially the entire life I've had this computer. I only found the solution a couple days ago.

Right now, the iwlagn driver does not have full support for 802.11n. In fact, having 802.11n enabled will oftentimes screw up your internet connection in a very strange way. You retain your IP address, everything says you're still connected, but no transmission is really happening. You might notice a drop in bitrate from the output of iwconfig, but setting it to be higher again doesn't fix the issue. The issue is 802.11n.

The fix is to initiate the module with the option 11n_disable=1 or 11n_disable50=1. I had to use the latter. I am not sure, but I think it depends on which version of the driver you have (iwl4965 vs iwl5000). So make sure that you are compiling the driver as a module (do not build it into the kernel) and the fix is below.

If you have already booted and want to fix the issue, run the following commands as root

rmmod iwlagn
modprobe iwlagn 11n_disable=1
(or modprobe iwlagn 11n_disable50=1)

If you want the module to be loaded properly on boot, edit the file /etc/modprobe.conf (on gentoo; on other distributions this file might be somewhere else) and append the following line:

options iwlagn 11n_disable=1
(or options iwlagn 11n_disable50=1)

You might also have to use both options. I had to use 11n_disable50 and not 11n_disable. Regardless, one of these two should work and leave you with a perfectly reliable wireless card (without n mode, though).

Hopefully I helped someone with this post! This is a really really difficult bug to google.

12 comments:

  1. I'm seeing this problem too with iwl6000.
    Your fix seems to work. Thanks.

    ReplyDelete
  2. Running on hardware that doesn't implement the final spec sure is a pain. Also I was not aware that the spec was finalized and released on Oct 09. In any case I'll be happily cruising on wireless-G until my laptop dies (or I upgrade my card)!

    ReplyDelete
  3. Thank you! Your post helped me a lot.

    I have issues with Intel 5100 on Fedora 14.

    [octix@localhost ~]$ cat /etc/modprobe.d/iwlan_11n_disable.conf
    options iwlagn 11n_disable=1

    ReplyDelete
  4. thanks for the info!
    this is what I needed =)

    ReplyDelete
  5. WOW!

    I have not been able to connect to my University network reliably for 2 years. I saw this post, and it fixed the problem immediately. I'll have to add this to my init scripts.

    ReplyDelete
  6. I had exactly those problems (Archlinux, kernel 3.1.0-4-ARCH), now trying with the proposed workaround.

    ReplyDelete
  7. wonderfull !!! Fighting with this issue since one week

    ReplyDelete
  8. Love you mate, this has been annoying me for months!

    ReplyDelete
  9. 2 years later people are still suffering from this.. me included. Thanks for pointing this out.
    A not fully implemented standard means that there is no hope for a future fix.
    I wonder how they made it work on Windows thought.

    ReplyDelete
  10. Wow thanks for this! It helped me a lot, but /etc/modprobe.conf does not solve my problem automatically on startup. I tried a startup script which turns off the wlan and then turns it on again with the 11n disable option, but it does not work too.

    ReplyDelete