Comment 8 for bug 64173

Revision history for this message
Fionn (fbe) wrote : Re: Root cause: reconnection consideration code error

I had a look at the source, now.

The reconnection is apparently caused by a temporary loss of the wireless link while the network detection code finds out that the AP is still online. It appears like some combinations of cards/APs are especially prone to temporary link outages, if you google for reports. Intel drivers in particular.

To me it looks like there are two possible solutions for this:

1) Never let the code decide to reconnect to an AP to which it already IS connected! (link or not). Because the idea is just silly. If the link is gone then the situation will probably not improve by resetting everything. Or, at least, introduce a very, very generous timeout of about 20 to 30 seconds and wait for the link to get up again by itself (which usually happens in this situation):

2) Just increase the timeout for link losses generally (this is the easier way). Ideally this should be adjustable at least via gconf but like with most things that should be adjustable in network-manager a stone-age-style hard coded constant is being used.

For the time being, I changed src/nm-device-802-11-wireless.c, line 2318

from
        self->priv->link_timeout = g_timeout_source_new (8000);
to
        self->priv->link_timeout = g_timeout_source_new (20000);

which basically is a shot at method 2).
To try method 1) I would need to dig and understand more code so I left that one alone for now.

The timeout extension seems to fix the problems for me, it seems. I am going to let this settle for some days and if I get no more nagging reconnects, I'll make up a patch (probably including a gconf key because the current solution just sucks).