# Intel Pro/Wireless 5100 AGN keeps dropping connections

## blamothe

my wireless connection keeps dropping out. it still has an ip address registered and is still connected to the access point, but i can't ping anything and cannot connect to any websites. when i boot up my machine, wireless works fine, but after a few minutes it drops out. i do net.wlan0 stop and net.wlan0 start, it works again for a few minutes, and then drops out again. is there anything i can do to fix this?

----------

## Logicien

I have been using for years free wireless access points in my city Montréal. A lot where open, some where secure with WEP or WPA. I noted sometimes I had to give the channel of the wireless access point I wanted to connect to my wireless card for it to get the connection. You can use the AP address of wireless access point instead of it's ESSID to associate with it. When I had trouble with the native Linux kernel driver, first I looked with modinfo if I can pass a usefull option to the wireless card module. Then I compared the performance of the Linux kernel driver with the Windows one using the ndiswrapper. Sometimes the Windows one where betters. I think it's better to configure manually a wireless card then use a boot script to do it, specially to make the connexion stable.

Generally, it's a matter of quality link. Under a certain purcentage, let's say 3/5 it become unstable. A close distance between your wireless card and the access point router wireless card can make a big difference. The quality of the link can be disturb with microwaves and cellulars phones. This is not exhaustive. The problem can come from both sides, Gentoo disconnect you, or the other side, I say the access point. If the DNS server address you've got from it are not stable, you've better to use named or openDNS free DNS server.

----------

## blamothe

it definitely isn't that. iwconfig says that i'm still connected to the ap, ifconfig still says that i have an ip address, but i can't ping anything, and i can't visit any web pages, use ssh, etc. the only way i know to fix it is to stop and restart net.wlan0 like this:

```

shameka blamothe # /etc/init.d/net.wlan0 stop

 * Stopping wlan0

 *   Bringing down wlan0

 *     Stopping dhcpcd on wlan0 ...                                                                      [ ok ]

 *     Shutting down wlan0 ...                                                                           [ ok ]

 *     Stopping wpa_cli on wlan0 ...                                                                     [ ok ]

 *     Stopping wpa_supplicant on wlan0 ...                                                              [ ok ]

shameka blamothe # /etc/init.d/net.wlan0 start

 * Starting wlan0

SIOCSIFFLAGS: Unknown error 132

SIOCSIFFLAGS: Unknown error 132

 *   Starting wpa_supplicant on wlan0 ...                                                            [ ok ]

 *   Starting wpa_cli on wlan0 ...                                                                       [ ok ]

 *     Backgrounding ...

shameka blamothe # 

```

i also don't know what that SIOCSIFFLAGS: Unknown error 132 means. could that have something to do with the problem? i don't think it's an issue with the machine being out of range because it always works when i restart, but it dies after a few minutes.

----------

## d2_racing

Hi, can you post this :

```

# cd /usr/src/linux

# cat .config | grep -i kill

```

----------

## blamothe

this is what i got:

```

shameka linux # cat .config | grep -i kill

CONFIG_RFKILL=y

CONFIG_RFKILL_LEDS=y

CONFIG_RFKILL_INPUT=y

```

i disabled RFKILL and did the grep again and got:

```

# CONFIG_RFKILL is not set

```

on reboot, the thing still drops off after a few minutes, so i don't think that fixed it.

----------

## FelixPetzold

which version of iwl5000-ucode are you running? I have a stable system and the stable version works fine with my Intel 5100 AGN card

----------

## blamothe

actually, d2_racing, i think your suggestion worked. when i first rebooted the computer after disabling RFKILL, the connection dropped off like it did before. i restarted net.wlan0 and, since then, i have not had a lost connection. thanks a lot.

----------

## d2_racing

Nice  :Razz: 

----------

## blamothe

well, maybe i spoke too soon. i did not see any dropped connections for a while (about 2-3 days). i then tried to install and use cisco's vpn client so that i can connect to our colo from home. when i tried to start the vpn client, it continuously freezes my machine. i've (temporarily) given up on getting the vpn to work, but now i get consistent dropped connections. the vpn client's install script did need to know where my kernel sources were installed, but RFKILL is still disabled. i'm not sure if the vpn client stuff is a coincidence or not, but it seemed to be going strong before i did the vpn stuff, and now it isn't. has anyone else ever seen this?

----------

## blamothe

after an immense amount of googling, i've found that the issue is with the iwlagn driver, namely, the 802.11n code. after disabling 802.11n from the module, i don't seem to have a problem any more.

```
rmmod iwlagn

modprobe iwlagn 11n_disable50=1 11n_disable=1
```

----------

## d2_racing

Nice  :Razz: 

----------

## cach0rr0

 *blamothe wrote:*   

> after an immense amount of googling, i've found that the issue is with the iwlagn driver, namely, the 802.11n code. after disabling 802.11n from the module, i don't seem to have a problem any more.
> 
> ```
> rmmod iwlagn
> 
> ...

 

You happen to have the relevant link handy still? 

I've had the same on my Atheros card for months, and have long suspected the issue goes deeper than the driver itself, but rather something buggered in the 80211 stack. 

Whenever it connected to 802.11n networks, it would disconnect under load. 

Whenever connected to 802.11g, no issues (though, the pipe itself was too small to really load it)

----------

## d2_racing

Yeah, I would like to know the link too, because that one is pretty nasty.

----------

## cach0rr0

 *d2_racing wrote:*   

> Yeah, I would like to know the link too, because that one is pretty nasty.

 

dunno, I did some extended reading on this last night, and a load of ath9k users are having this problem

however over on the Arch forums they said it was resolved for them with the latest compat-wireless (this was late April, so the latest at that time)

There's an ebuild for compat-wireless in the Pentoo overlay, so no need to try patching by hand. All sorts of other goodies in that overlay too  :Wink: 

```

layman -a pentoo

```

Those guys do some solid work, worth adding for sure.

----------

