1

When I use wireless network,the network status icon show up wireless connection icon.WIFI connection status icon

But when I use command ifconfig wlan2 down to disconnect wifi,the network status icon still show up connection status.

The network status has not changed to disconnect icon.WIFI has already disconnected network,but the status icon still show up connection.

How can I to fix the status icon sync problem?

My ubuntu version is Ubuntu 14.04.1 LTS

  • I can confirm the same behavior with ubuntu-mate 16.04. – Thanos Apostolou Jun 03 '16 at 08:41
  • Is that ubuntu bug? Have any way to fix it? – william_h Jun 03 '16 at 08:59
  • If you would like to disable a certain card, you should remove the kernel module. – mchid Jun 03 '16 at 09:17
  • What kernel module does wlan2 use? I can give you an answer that will disable this card and will automatically show in network-manager the moment it is disconnected with this information. – mchid Jun 03 '16 at 09:19
  • 1
    A temporary workaround is after the ifconfig wlan2 down run the command killall nm-applet; nohup nm-applet & (this will restart nm-applet, not the whole netowrk-manager so that your ifconfig wlan2 down command still has effect). – Thanos Apostolou Jun 03 '16 at 09:28
  • Dear @mchid ,thanks for your help,but my point is all wireless has the same problem like this in the ubuntu. You could try this at your ubuntu system. I think the problm is the same as mine. I would like to fix the icon status sync with wireless status.(If wireless disable,network icon show up disable;If wireless enable,network icon show up enable.) – william_h Jun 04 '16 at 08:09
  • @william_h If you want the icon status to sync with disabling that device, you need to use a different command. The problem is not Ubuntu. The problem is that you are using a command that will not work that way and is not designed to. Like I said, if you will post the card type or driver for this device, I can give you a command that will disable the device and will also immediately update and sync with the icon. – mchid Jun 04 '16 at 08:23
  • Dear @ThanosApostolou , I have tried the way you provide me. After key in 'ifconfig wlan2 down' and type 'killall nm-applet' commands. The network status icon is disappear. I hope the network status icon still appear and show status correctly. thank you. – william_h Jun 04 '16 at 09:12
  • @william_h Apparently the network status icon doesn't understand the change when you use the ifconfig ... down command. So, the only way is to restart it. The killall nm-applet command will make the network status icon disappear but then the nohup nm-applet & command will make it reappear and send the task to background so that you can close your terminal (I don't think there is another way except if you want to change the nm-applet code). – Thanos Apostolou Jun 04 '16 at 17:28
  • @mchid ,I use intel 3160 module. – william_h Jun 06 '16 at 06:11
  • @ThanosApostolou , I have tried the way you provide step by step.It does not work to me.When I type 'killall nm-applet' and 'nohup nm-applet &'.It shows the message 'nohup: ignoring input and appending output to nohup.out'.After I type 'nohup nm-applet &' in the terminal,the network icon does not reappear. – william_h Jun 06 '16 at 07:15
  • @william_h That's strange... it works fine on me even if it shows me the same message. Try without nohup (meaning after you kill nm-applet run just nm-applet &). – Thanos Apostolou Jun 06 '16 at 09:13
  • @ThanosApostolou, I have tried without nohup,only key in nm-applet &.The network status icon still disappear. It does not reappear . I have no idea to fix this problem.That works fine on your system.Does your network status icon reappear after you typed nm-applet & or nohup nm-applet &? – william_h Jun 07 '16 at 09:05
  • @william_h Yeah the icon reappears on my system (even without nohup) but I use ubuntu-mate 16.04 (mate, gnome and unity should manage similar the icons on the panel) so I don't know what's wrong.... Try after you kill nm-applet to run just nm-applet command to see if you get there any errors. – Thanos Apostolou Jun 07 '16 at 10:09
  • @ThanosApostolou, The result is still same as before : ( . – william_h Jun 08 '16 at 03:56
  • What messages are you getting on the terminal after nm-applet command? – Thanos Apostolou Jun 08 '16 at 08:16
  • @ThanosApostolou, The message is nm-applet-Message: using fallback from indicator to GtkStatusIcon ! I have installed ubuntu 16.04 version in another computer,and try the procedure you provide step by step. The network status icon does not reappear. Have you installed other tools for nm-applet or network? – william_h Jun 08 '16 at 09:42
  • Try some solutions from here: http://askubuntu.com/questions/506824/nm-applet-does-not-work-ubuntu-14-04 it seems the same message... – Thanos Apostolou Jun 08 '16 at 09:56
  • @ThanosApostolou ,thanks for your help. I try the solutions of the site.It does not work for me. I think I will search key word "network manager" to find the answer out. How do you think this problem? Is that default bug of ubuntu network manager? – william_h Jun 17 '16 at 04:01

1 Answers1

0

Okay, here is an answer that should work. To disable the wifi card, you can disable the kernel module by running the following command:

sudo modprobe -r iwlwifi

If this works, the icon will usually update immediately.

To re-enable the kernel module to bring the device back up, run the following command:

 sudo modprobe iwlwifi
mchid
  • 43,546
  • 8
  • 97
  • 150
  • I have tried the answer you provide. The network manager icon appear correctly. But the wifi status is incorrectly.After I use command sudo modprobe iwlwifi to re-enable the module. The network manager Icon displays disconnection status of wifi.But my wifi status is online. I think this problem is ubuntu bug because when I use command ifconfig eth3 down or ifconfig eth3 up to disable or enable the wire. The network manager icon of wire show up correctly.Wire network status show up correctly,too. – william_h Jun 17 '16 at 03:55
  • When I use ifconfig wlan2 down or ifconfig wlan2 up command to enable or disable wireless,the wireless network icon status is incorrectly.It is strange. The ifconfig command can work correctly for wire icon status ,but it can't work correctly for wireless icon status. Is that bug in ubuntu network manager? – william_h Jun 17 '16 at 03:55
  • @william_h That is not a bug. Network-manager is designed to be used instead of ifconfig commands. Use one or the other. You can use nmcli commands if you prefer to use command line and still want to use network-manager. – mchid Jun 23 '16 at 05:51