Monday, September 8, 2014

Having frequent WiFi disconnection in your Linux?

I've been lately using Fedora 20 as my development environment and it's really fascinating. It is one of the best OS's for a developer with extensive support for development no matter what technology you are focused into (Of course if it's Windows or MAC specific, then it's not)

A major issue I have been experiencing in Fedora 20 in my laptop (Lenovo T530), is the frequent WiFi disconnection. It was very embarrassing, although the WiFi signal strength is good. At times the WiFi goes off and never gets connected back. The following was few useful commands I came to know that can force the WiFi adapter to initiate the connection (possibly). I hope this may be useful to some of you as well.
[shazni@shazniInWSO2 Disk1]$ nmcli -p con

=============================================================================================================
                                       List of configured connections
=============================================================================================================
NAME                 UUID                                  TYPE             TIMESTAMP-REAL                  
-------------------------------------------------------------------------------------------------------------
TriXNet              bd504b18-be5f-4d2d-9ea6-6bff40f29cca  802-11-wireless  Mon 08 Sep 2014 01:55:20 PM IST 
NAUMI LIORA HOTEL    dc5a4e03-69f0-4f0b-80a4-b5c6f2755ace  802-11-wireless  Thu 21 Aug 2014 10:20:16 PM IST 
TriXNet_Groud_Floor  6142855d-7845-4f6a-88fb-068b15cbd029  802-11-wireless  Thu 14 Aug 2014 11:30:43 PM IST 
em1                  32a2ab29-73af-477a-888c-ab9cf2a489b2  802-3-ethernet   never                           
Dialog 4G            3b96c186-012a-43eb-bdb8-72679f318472  802-11-wireless  Sun 31 Aug 2014 11:01:30 PM IST 
PROLiNK_PRN3001      cb54a35f-e459-44cf-a2b3-32071e77460b  802-11-wireless  Mon 07 Jul 2014 08:57:24 PM IST 
ZTE                  d57d20b1-c556-4706-8849-acafdee1fc88  802-11-wireless  Sat 09 Aug 2014 05:50:02 PM IST 
WSO2                 15da72d9-07f9-47bd-9a0a-f055399a6339  802-11-wireless  Fri 05 Sep 2014 06:20:15 PM IST 
AMB                  0a521533-22f4-4adc-89c3-8f1b9118743e  802-11-wireless  Fri 22 Aug 2014 05:01:37 PM IST 

[shazni@shazniInWSO2 Disk1]$ nmcli con up uuid bd504b18-be5f-4d2d-9ea6-6bff40f29cca
Connection successfully activated (D-Bus active path: /org/freedesktop/NetworkManager/ActiveConnection/3)
The first command shows the available connections together with device UUIDs. The second command initiates the connection given the UUID. This might result in prompting you for a password.

Well I have been doing this for sometime whenever my connection goes off and never re-connects. I found an easy solution ( or rather a workaround ) for frequent disconnection. The workaround was to disable IPv6 in my Linux box. I can't assure the solution would work if you are encountering the same issue. Anyway, that worked for me. Ever since disconnections have been rare.

To disable IPv6 in your machine, do the following.
[shazni@shazniInWSO2 shazni]$ sudo vi /etc/sysctl.conf
3) Add the following line at the end of the file (or where its convenient for you):
net.ipv6.conf.all.disable_ipv6 = 1
Restart your machine for the changes to take effect.

No comments:

Post a Comment