Network Manager bug

Hi chaps,

try the following terminal command (Ctrl + Alt + t) if it happens again and let me know if it works, as I also had a problem with my notebook yesterday!:

sudo service network-manager restart

Thanks Wolfman! - by far the best bandaid for the problem that I have come across in months of searching for a solution to this problem (both in Mint based on Trusty and Mint based on Xenial). The wifi has remained connected and the icon hasn’t gone wrong for over two hours now - close to a new record!

1 Like

Unfortunately, it disconnected and wouldn’t restart using the Wolfman technique, so I had to go back to connecting with WICD.

The disconnect problem affects WICD as well as Network Manager, although the WICD interface is more reliable. Maybe the source of the problem lies with some component that both Network Manager and WICD use. For example do they both rely on WPA Supplicant?

Had this happened to my mothers laptop in the last couple of days. Created a launcher with the instructions @al_chemia posted, and she clicks it every couple of hours or so. Also, she told me that when she watches some videos her internet speed gets slower til she reconnects the wifi.

Hi @Cold,

could you please post a link to the solution you referred to; thanks!. :smiley:

Hi @drwho,

did you change your software sources download location as I suggested above?. :smiley:

@wolfman is post 17 from this topic. :stuck_out_tongue:

Its only a temporally fix though.

1 Like

Thanks @Cold, I didn’t think to look up there!. :thumbsup:

I have been using the network restart services for a while now, but I just would prefer if this step didn’t have to happen. I am still running 16.04 though. Maybe they have fixed it in 16.10

Just making sure I understand what’s up here. Is the internet of yours getting disconnected over time often?

Press F12 for the Tilda terminal or CTRL+ALT+T for terminal and copy+paste this: (CTRL+SHIFT+V in terminal)

gksudo pluma /etc/NetworkManager/NetworkManager.conf

You should see managed=false , change it to managed=true and save.

Go back to terminal and type:

sudo service network-manager restart

Worked wonders for me, hope it does for you aswell :slight_smile:

1 Like

Wolfman/Cold Yes, I’m pointed to the xenial main repo - did apt-get upgrade and apt-get dist-upgrade; didn’t help. It’s wierd, sometimes after doing service network-manager restart it works fine for a long period, but other times it constantly disconnects, there are no networks showing when the network-manager icon is cllicked and it shows disconnected state, service network-manager restart command seems to have no effect, and the only way I can reconnect is by using WICD, and sometimes also closing and reopening the lid. Sometimes it takes a lot of coaxing and I have to try with WICD and closing/reopening the lid several times. Sometimes even after rebooting it comes up disconnected and I have to do this procedure because service network-manager-restart fails. . I do have managed set to “true” - seems to have no effect. The problem occurrence seems to be random. I have tried all manner of fixes from reinstalling the driver, to custom scripts - I even upgraded the operating system from Trusty-based to Xenial-based. None of this has had any effect on the problem. Another wierd thing is that sometimes it will actually be connected (without WICD running) but the Network Manager icon will show as disconnected. Sometimes the icon will show connected with bars, but actually be disconnected. The same wifi connection I have now worked fine with Ubuntu based Mint 14 from 3 or 4 years ago.

1 Like

I just tried that on two machines and while I won’t be convinced for a while that it fixed the problem, it did seem to have an immediate effect - all nets are now showing up.
May I ask where you got that information?
Can you also tell us why in the hell that parameter is set to ‘false’?

Source:

Alternative:

I’m not sure why it isn’t set to true by default.

Given the age of those posts, I think this might be a change introduced in systemd.

Edit: I was wrong, this was pre-systemd.
Also I asked about that on IRC and people tell me this change to the config file should have zero effect on the problem, given that it only concerns network interfaces that are defined in /etc/network/interfaces.

1 Like

As a better bandaid, click on the network manager icon while it is in the disconnected state. Then click the link to “Disable wifi”, wait 10 seconds (not sure this is necessary), then click on the link again to reenable wifi. Then do sudo service network-manager restart. So far this seems to be a reliable means of bringing the wifi up.

1 Like

Think this news might be related?

1 Like

Interesting article, thanks @Cold!. :thumbsup:

@everyone else, I have not had a drop out since updating in the last couple of days on my notebook!. :wink:

Ho provato a modificare il comando di avvio nella lista di avvio nm-applet in nm-applet-nogo e salvare e successivamente a rimodificarlo in nm-applet … dopo il riavvio l’applet appare … al successivo riavvio non riappare … funziona una volta sola ! Ripetendo la procedura si riottiene il funzionamento una sola volta … !

I’ll try to change the start command in the starting list from “nm-applet” in “nm-applet-nogo” and save then I re-change the command from “nm-applet-nogo” to the right command “nm-applet” and save … at the first reboot it seems to work but at 2nd reboot it stop working … If I repeat the process I can obtain newly such behavior!

Here’s my workaround to this icon problem:-

Write a bash script called “fixnm” and place it inside /usr/sbin (you may have to use sudo for this is you’re not running as root)

#!/bin/bash

wlan=/sbin/ifconfig wlp58s0 | grep inet\ addr | wc -l

while [ $wlan -eq 0 ]; do
sleep 1
wlan=/sbin/ifconfig wlp58s0 | grep inet\ addr | wc -l
done

sudo /etc/init.d/network-manager restart

So you now have a script /usr/sbin/fixnm that you can run. Do remember to enable the executable bit:-

chmod +x /usr/sbin/fixnm

What this script actually does is that it waits until the network interface wlp58s0 is up and when it is up, it will execute the network-manager restart command. For your application, you will want to insert into the above script your own interface name which you can determine using:-

ifconfig -a

The next part of this solution comes by using upstart to execute this script at the right time. You need to create a file called my-upstart-script.conf and place it inside the ~/.config/upstart/ directory.

start on desktop-start
stop on desktop-end

script
/usr/sbin/fixnm
end script

Like before, you need to enable the executable bit using:-

chmod +x ~/.config/upstart/my-upstart-config.conf

At this point - once the desktop is up and running, upstart will run this conf script, which will invoke /usr/sbin/fixnm which will make sure the connection is up and then restart the network-manager.

This solution is working on Ubuntu 16.04 running on my XPS 13 laptop.

Thanks, that worked for me.

There also a workaround : create script in pluma with somename.sh
> #!/bin/sh
> # Restart nm-applet
> killall nm-applet
> nm-applet

Then save to your home directory or any else and make it executable. Next just make a launcher on the panel( Add to Panel > Custom Application Launcher ) and browse your script.

p.s. hope it’s understandable, my english is no so good.