Stop network disconnecting in Ubuntu

MAKE A COPY OF THE FILE: avahi-daemon.conf before you continue for that just in case scenario!.

To stop your network from disconnecting, you just need to edit two files as "root", follow the next few steps.

Press Alt + F2 and enter the following command:

gksudo caja

File System > etc:

avahi:

avahi-daemon.conf:

and edit line 23 to this: (you just need to add ".a" in front of local so you get ".alocal")

Click on Save!.

Now go to: File System > etc > default > avahi-daemon and save a copy of the file, then on line 4, change the 1 to a 0 so it looks like this:

AVAHI_DAEMON_DETECT_LOCAL=0

Save and close all windows and restart and you should now have no connection fallout!.

I hope it helps!. :smiley:

This is a combination of the suggestions from the source of info link below!.

Source of info:

Network troubleshooting tips and tricks:

https://help.ubuntu.com/community/NetworkDevices

https://help.ubuntu.com/community/InternetAndNetworking

Make sure you also keep your system "up-to-date":

5 Likes

Thank you for making this post and awareness! I have been frustrated with disconnects and hope this is the permanent solution.

1 Like

I haven’t had any problems with connection fall-out since I did this !, let’s hope it does the job. :smiley:

1 Like

That didn’t solve my problem on Ubuntu 16.04 and RT2561/RT61 802.11g PCI, with rt61pc driver.
What solved was:

Make sure that power management is turned off.

iwconfig wlan0

Should display a line with Power Management: Off. If it says On, you have to run:

sudo iwconfig wlan0 power off

To make it permanent, run command as follows:

sudo gedit /etc/rc.local

And copy this before exit 0

sleep 30
iwconfig wlan0 power off

Note that instead of wlan0 it can be wlan1 or so for you depending on the situation.
Source here.

1 Like

Thanks for the added input @yannpaulo. :thumbsup:

1 Like

Thank you, this solution still works in 16.04.2

1 Like

Thanks so much!!!

This solution fixed the issue for me and my work laptop running 17.04. (Both the onboard NIC and the docking station NIC had this issue prior this this fix.)