No more WIFI access after start/stop of NetworkManager

Networking works fine on my system but as soon as i stop NetworkManager and start it again i can’t access my wifi any longer (cable not tested).

My setup:
openSUSE Tumbleweed 20190219
KDE Plasma Version: 5.15.0
KDE Frameworks Version: 5.55.0
Qt Version: 5.12.0
Kernel Version: 4.20.7-1-default
NetworkManager 1.14.4-3.1
Intel Wireless 8265/8275 driver: iwlwifi
IPv6 disabled
firewalld enabled
IP4-address, DNS address and firewall zone are defined per connection in connection file in “/etc/NetworkManager/system-connections”
my router controls wifi access by MAC addresses

Here is what i did:

1.) Login (after boot)

2.) Check NetworkManager status

> systemctl status NetworkManager.service
● NetworkManager.service - Network Manager
   Loaded: loaded (/usr/lib/systemd/system/NetworkManager.service; enabled; vendor preset: disabled)
  Drop-In: /usr/lib/systemd/system/NetworkManager.service.d
           └─NetworkManager-ovs.conf
   Active: active (running) since Sun 2019-02-24 19:03:24 CET; 1min 18s ago
     Docs: man:NetworkManager(8)
 Main PID: 1641 (NetworkManager)
    Tasks: 3 (limit: 4915)
   Memory: 10.1M
   CGroup: /system.slice/NetworkManager.service
           └─1641 /usr/sbin/NetworkManager --no-daemon

Feb 24 19:03:25 NAMEofHOST NetworkManager[1641]: <info>  [1551031405.2375] bluez: use BlueZ version 5
Feb 24 19:03:25 NAMEofHOST NetworkManager[1641]: <info>  [1551031405.2455] modem-manager: ModemManager available
Feb 24 19:03:25 NAMEofHOST NetworkManager[1641]: <info>  [1551031405.2597] bluez5: NAP: added interface 00:11:22:33:01:01
Feb 24 19:03:25 NAMEofHOST NetworkManager[1641]: <info>  [1551031405.2754] supplicant: wpa_supplicant running
Feb 24 19:03:25 NAMEofHOST NetworkManager[1641]: <info>  [1551031405.2755] device (wlan0): supplicant interface state: init -> starting
Feb 24 19:03:25 NAMEofHOST NetworkManager[1641]: <info>  [1551031405.3603] sup-iface[0x555ae5bca8d0,wlan0]: supports 5 scan SSIDs
Feb 24 19:03:25 NAMEofHOST NetworkManager[1641]: <info>  [1551031405.3612] device (wlan0): supplicant interface state: starting -> ready
Feb 24 19:03:25 NAMEofHOST NetworkManager[1641]: <info>  [1551031405.3613] device (wlan0): state change: unavailable -> disconnected (reason 'supplicant-available', sys-iface-state: 'managed')
Feb 24 19:03:30 NAMEofHOST NetworkManager[1641]: <info>  [1551031410.7694] manager: startup complete
Feb 24 19:03:45 NAMEofHOST NetworkManager[1641]: <info>  [1551031425.3918] agent-manager: req[0x555ae5c57530, :1.26/org.kde.plasma.networkmanagement/1000]: agent registered
>

3.) Check journal

> journalctl -b 0 -p 4 -t NetworkManager
-- Logs begin at Sun 2019-02-24 19:03:17 CET, end at Sun 2019-02-24 19:06:46 CET. --
Feb 24 19:03:24 NAMEofHOST NetworkManager[1641]: <warn>  [1551031404.6360] keyfile: wifi/802-11-wireless.bssid: Ungültige MAC-Adresse wird ignoriert
>

2.) Connect to WIFI network using nm-plasmoid (connection file “/etc/NetworkManager/system-connections/Privat”, SSID = “WLANP”).

5.) Verify that network access is working => OK

6.) Check NetworkManager status

> systemctl status NetworkManager.service
● NetworkManager.service - Network Manager
   Loaded: loaded (/usr/lib/systemd/system/NetworkManager.service; enabled; vendor preset: disabled)
  Drop-In: /usr/lib/systemd/system/NetworkManager.service.d
           └─NetworkManager-ovs.conf
   Active: active (running) since Sun 2019-02-24 19:03:24 CET; 7min ago
     Docs: man:NetworkManager(8)
 Main PID: 1641 (NetworkManager)
    Tasks: 3 (limit: 4915)
   Memory: 11.1M
   CGroup: /system.slice/NetworkManager.service
           └─1641 /usr/sbin/NetworkManager --no-daemon

Feb 24 19:10:18 NAMEofHOST NetworkManager[1641]: <info>  [1551031818.5922] device (wlan0): state change: config -> ip-config (reason 'none', sys-iface-state: 'managed')
Feb 24 19:10:18 NAMEofHOST NetworkManager[1641]: <info>  [1551031818.5942] device (wlan0): state change: ip-config -> ip-check (reason 'none', sys-iface-state: 'managed')
Feb 24 19:10:18 NAMEofHOST NetworkManager[1641]: <info>  [1551031818.5959] device (wlan0): state change: ip-check -> secondaries (reason 'none', sys-iface-state: 'managed')
Feb 24 19:10:18 NAMEofHOST NetworkManager[1641]: <info>  [1551031818.5962] device (wlan0): state change: secondaries -> activated (reason 'none', sys-iface-state: 'managed')
Feb 24 19:10:18 NAMEofHOST NetworkManager[1641]: <info>  [1551031818.5968] manager: NetworkManager state is now CONNECTED_LOCAL
Feb 24 19:10:18 NAMEofHOST NetworkManager[1641]: <info>  [1551031818.6017] manager: NetworkManager state is now CONNECTED_SITE
Feb 24 19:10:18 NAMEofHOST NetworkManager[1641]: <info>  [1551031818.6019] policy: set 'Privat' (wlan0) as default for IPv4 routing and DNS
Feb 24 19:10:18 NAMEofHOST NetworkManager[1641]: nisdomainname: you must be root to change the domain name
Feb 24 19:10:18 NAMEofHOST NetworkManager[1641]: <info>  [1551031818.8201] device (wlan0): Activation: successful, device activated.
Feb 24 19:10:18 NAMEofHOST NetworkManager[1641]: <info>  [1551031818.8210] manager: NetworkManager state is now CONNECTED_GLOBAL
>

7.) Check journal

> journalctl -b 0 -p 4 -t NetworkManager
-- Logs begin at Sun 2019-02-24 19:03:17 CET, end at Sun 2019-02-24 19:10:24 CET. --
Feb 24 19:03:24 NAMEofHOST NetworkManager[1641]: <warn>  [1551031404.6360] keyfile: wifi/802-11-wireless.bssid: Ungültige MAC-Adresse wird ignoriert
>

8.) Stop/start NetworkManager

> su
Password
# systemctl stop NetworkManager.service
# systemctl start NetworkManager.service
# exit
exit
>

9.) After this the NetworkManager-plasmoid-symbol in the KDE taskbar changes from “wireless” to “cable” and it lists only the SSIDs of my home network (like “WLANP”) but not the connections defined in “/etc/NetworkManager/system-connections” (like “Privat”) as it did before. However when i start the connection-editor (from within the plasmoid) it shows all connections defined in “/etc/NetworkManager/system-connections”. And i can create new connections but those won’t work either.

10.) Check NetworkManager status

> systemctl status NetworkManager.service
● NetworkManager.service - Network Manager
   Loaded: loaded (/usr/lib/systemd/system/NetworkManager.service; enabled; vendor preset: disabled)
  Drop-In: /usr/lib/systemd/system/NetworkManager.service.d
           └─NetworkManager-ovs.conf
   Active: active (running) since Sun 2019-02-24 19:16:34 CET; 16s ago
     Docs: man:NetworkManager(8)
 Main PID: 3470 (NetworkManager)
    Tasks: 4 (limit: 4915)
   Memory: 3.0M
   CGroup: /system.slice/NetworkManager.service
           └─3470 /usr/sbin/NetworkManager --no-daemon

Feb 24 19:16:34 NAMEofHOST NetworkManager[3470]: <info>  [1551032194.3365] modem-manager: ModemManager available
Feb 24 19:16:34 NAMEofHOST NetworkManager[3470]: <info>  [1551032194.3404] bluez5: NAP: added interface 00:11:22:33:01:01
Feb 24 19:16:34 NAMEofHOST NetworkManager[3470]: <info>  [1551032194.3405] agent-manager: req[0x5595a104a420, :1.26/org.kde.plasma.networkmanagement/1000]: agent registered
Feb 24 19:16:34 NAMEofHOST NetworkManager[3470]: <info>  [1551032194.3817] supplicant: wpa_supplicant running
Feb 24 19:16:34 NAMEofHOST NetworkManager[3470]: <info>  [1551032194.3818] device (wlan0): supplicant interface state: init -> starting
Feb 24 19:16:34 NAMEofHOST NetworkManager[3470]: <info>  [1551032194.3882] sup-iface[0x5595a0ff38e0,wlan0]: supports 5 scan SSIDs
Feb 24 19:16:34 NAMEofHOST NetworkManager[3470]: <info>  [1551032194.3893] device (wlan0): supplicant interface state: starting -> ready
Feb 24 19:16:34 NAMEofHOST NetworkManager[3470]: <info>  [1551032194.3894] device (wlan0): state change: unavailable -> disconnected (reason 'supplicant-available', sys-iface-state: 'managed')
Feb 24 19:16:36 NAMEofHOST NetworkManager[3470]: <info>  [1551032196.9431] device (wlan0): supplicant interface state: ready -> disconnected
Feb 24 19:16:40 NAMEofHOST NetworkManager[3470]: <info>  [1551032200.3008] manager: startup complete
>

11.) Check journal

> journalctl -b 0 -p 4 -t NetworkManager
-- Logs begin at Sun 2019-02-24 19:03:17 CET, end at Sun 2019-02-24 19:16:40 CET. --
Feb 24 19:03:24 NAMEofHOST NetworkManager[1641]: <warn>  [1551031404.6360] keyfile: wifi/802-11-wireless.bssid: Ungültige MAC-Adresse wird ignoriert
Feb 24 19:16:34 NAMEofHOST NetworkManager[3470]: <warn>  [1551032194.2854] keyfile: wifi/802-11-wireless.bssid: Ungültige MAC-Adresse wird ignoriert
>

On the same machine with openSUSE Leap 15.0 networking works fine (even stop/start of NetworkManager).

Has anyone seen this on Tumbleweed as well?

How can i recover from this situation (i.e. get networking back to normal) without rebooting?

What do i have to change so that in the future i can stop/start NetworkManager without braking it?

Thank you for any hints.

Regards

susejunky

I resolve most networking problems, particularly when set up as a DHCP client by restaring the network service, not NM.

eg

systemctl restart network

TSU

Thanks for your quick response. But i use static IP addresses.

Isn’t “network” not just an alias for “NetworkManager.service”?

However

systemctl restart network

gives the same result (i.e. networking stops working afterwards).

Regards

susejunky

Based on your comparative description of the behaviour between TW and Leap 15, I would say this is a regression. I recommend submitting a bug report for this.

Well, i hesitate to do so before the problem is not confirmed here by at least one other user.

Regards

susejunky

Fair enough.

BTW, what happens if you disable and re-enable wifi?

sudo /usr/sbin/rfkill block wifi
sudo /usr/sbin/rfkill unblock wifi

Does that cause the wifi list (in the plasmoid) to be repopulated?

I tried, but it did not revive networking neither did my connections from “/etc/NetworkManager/system-connections” re-appear in the list of the nm-plasmoid (only the SSIDs of my network are listed).

Can you re-produce my problem?

Regards

susejunky

No, I’m using Leap 15.

Hi
No issues seen here with GNOME, Tumbleweed 20190219, iwlwifi driver (AC 3165), static ip, dns etc, no MAC control used on access point. Connection comes back up with start/stop, connection comes back up with rfkill block/unblock.


03:00.0 Network controller [0280]: Intel Corporation Wireless 3165 [8086:3165] (rev 81)
    DeviceName: Intel WLAN 3165NGWG Stone Peak 1 ac 1x1 + BT 4 LE PCIe+USB+NGFF_2230 WW
    Subsystem: Intel Corporation Dual Band Wireless AC 3165 [8086:4010]
    Kernel driver in use: iwlwifi

Thank you for testing. This is my wifi adapter

6e:00.0 Network controller: Intel Corporation Wireless 8265 / 8275 (rev 78)
        Subsystem: Intel Corporation Device 1010
        Flags: bus master, fast devsel, latency 0, IRQ 136
        Memory at dc200000 (64-bit, non-prefetchable) [size=8]
        Capabilities: [c8] Power Management version 3
        Capabilities: [d0] MSI: Enable+ Count=1/1 Maskable- 64bit+
        Capabilities: [40] Express Endpoint, MSI 00
        Capabilities: [100] Advanced Error Reporting
        Capabilities: [140] Device Serial Number 00-28-f8-ff-ff-77-97-55
        Capabilities: [14c] Latency Tolerance Reporting
        Capabilities: [154] L1 PM Substates
        Kernel driver in use: iwlwifi
        Kernel modules: iwlwifi]

At the moment i’m lost:

Networking works fine before the stop/start of NetworkManager (and with openSUSE Leap 15.0 anyway). So “externals” (like router, repeater, switch, …) shouldn’t be involved? But where to look in the Tumbleweed config (which works fine before the stop/start)?

I will try my desktop system tomorrow.

Regards

susejunky[/size]

My desktop system shows the same “misbehavior” although it uses a different WLAN-card.

At the moment i do not even have the slightest idea what to look for.

What is so different between the very first start of NetworkManager and the second?

Regards

susejunky

  1. If you’re using Network Manager to manage your networking (not Wicked) you can still configure static addresses in NM.
    But, if you’re using Wicked to manage your networking, you should not be doing anything with NM, that would at best do nothing and at worse cause conflicts in your machine which might be what you are describing.
  2. No, the network manager service is nothing like the network service. The NM service is the management application and would be effective if you are configured (typically in YaST) to use NM for your networking management. On the other hand, the network service is more basic and will effective restart your networking processes including doing a query to your DHCP server to retrieve valid DHCP settings and this will work regardless how your networking is managed.

To me, it sounds like it’s likely that you have Wicked configured to manage your networking in YaST, but have been starting up the NM service, a poor combination.

First reboot so you can start with a “clean” configuration, whatever it is, then
Do what I described, hopefully your problem will be fixed.

If you still have problems, set your networkmanager.service to “disabled” and stopped, then go into YaST to verify that you have Wicked configured to manage your networking. Reboot and see if that fixes your problem.

TSU

Indeed. That is what i do and what i tried to explain by saying

IP4-address, DNS address and firewall zone are defined per connection in connection files in "/etc/NetworkManager/system-connections …

in my very first post.

I am aware of this.

Well,…

> systemctl status wicked
● wicked.service - wicked managed network interfaces
   Loaded: loaded (/usr/lib/systemd/system/wicked.service; disabled; vendor preset: disabled)
   Active: inactive (dead)

> systemctl status wickedd
● wickedd.service - wicked network management service daemon
   Loaded: loaded (/usr/lib/systemd/system/wickedd.service; indirect; vendor preset: disabled)
   Active: inactive (dead)

> ps -lA | grep wick
>

… i would say wicked isn’t running nor is it configured to be run on startup.

Regards

susejunky

A few hours ago i downloaded

http://download.opensuse.org/tumbleweed/iso/openSUSE-Tumbleweed-KDE-Live-x86_64-Current.iso

and it shows the same “misbehavior” (as detailed in my very first post) on both my machines (notebook and desktop).

Can someone else confirm this?

Regards

susejunky

Booted openSUSE-Tumbleweed-KDE-Live-x86_64-Snapshot20190224-Media.iso, configured wicked, switched to NetworkManager and got a fully functional wireless connection, which readily connects and disconnects.

Thank you very much for testing.

Did you try with setting one or even all your connections to NOT autoconnect (i.e. in connection file “autoconnect=false”)?

I did some more testing and found that connections set to

  • “autoconnect=false” will disappear from the list of nm-plasmoid after stop/start of NetworkManager.
  • “autoconnect=true” (true is the default => omitted or empty “autoconnect=”) will be listed by nm-plasmoid even after stop/start of NetworkManager .

All my connections (even the ones i created while searching for a solution) were set to “autoconnect=false” so i never got them displayed in the nm-plasmoid-list after stop/start of NetworkManager.

So who is the culprit? nm-plasmoid? NetworkManager?

Regards

susejunky

Does nmcli show the available connections? That will help show where the issue might be…

nmcli c
nmcli g

I don’t know. Trial and error can be daunting with networking. I checked for changes made by comparing the stick’s ro versions with the rw versions:

erlangen:~ # find /mnt/rw/etc/sysconfig/network/ /mnt/rw/etc/NetworkManager/ -type f
/mnt/rw/etc/sysconfig/network/dhcp
/mnt/rw/etc/sysconfig/network/config
/mnt/rw/etc/sysconfig/network/ifcfg-wlp3s0
/mnt/rw/etc/NetworkManager/system-connections/FRITZ!Box Karl Mistelberger.nmconnection
/mnt/rw/etc/NetworkManager/system-connections/FRITZ!Box Karl Mistelberger-89ada74d-f324-4a32-a5dc-3c7a36299865.nmconnection
erlangen:~ # 
erlangen:~ # diff /mnt0/etc/sysconfig/network/config /mnt/rw/etc/sysconfig/network/config
182c182
< NETCONFIG_DNS_STATIC_SEARCHLIST=""
---
> NETCONFIG_DNS_STATIC_SEARCHLIST="fritz.box"
erlangen:~ # 
erlangen:~ # diff /mnt0/etc/sysconfig/network/dhcp /mnt/rw/etc/sysconfig/network/dhcp 
410a411
> WRITE_HOSTNAME_TO_HOSTS="no"
erlangen:~ # 

New files:

erlangen:~ # grep -v \'\'$ /mnt/rw/etc/sysconfig/network/ifcfg-wlp3s0
BOOTPROTO='dhcp'
DHCLIENT_SET_DEFAULT_ROUTE='yes'
NAME='AR9287 Wireless Network Adapter (PCI-Express)'
STARTMODE='auto'
WIRELESS_AP_SCANMODE='1'
WIRELESS_AUTH_MODE='psk'
WIRELESS_BITRATE='auto'
WIRELESS_DEFAULT_KEY='0'
WIRELESS_EAP_AUTH='MSCHAPV2'
WIRELESS_EAP_MODE='PEAP'
WIRELESS_ESSID='FRITZ!Box Karl Mistelberger'
WIRELESS_KEY_LENGTH='128'
WIRELESS_MODE='Managed'
WIRELESS_POWER='no'
WIRELESS_WPA_PSK='........................'
erlangen:~ # 
erlangen:~ # cat /mnt/rw/etc/NetworkManager/system-connections/FRITZ\!Box\ Karl\ Mistelberger.nmconnection
[connection]
id=FRITZ!Box Karl Mistelberger
uuid=fd8c75a8-8a6e-4802-b671-af4f7588d224
type=wifi
permissions=

[wifi]
mac-address=...........................
mac-address-blacklist=
mode=infrastructure
ssid=FRITZ!Box Karl Mistelberger

[wifi-security]
key-mgmt=wpa-psk
psk=...................................

[ipv4]
dns-search=
method=auto

[ipv6]
addr-gen-mode=stable-privacy
dns-search=
method=auto
erlangen:~ # 

I stick to the basics and go with defaults whenever possible. See: How to Set Up a Home Network- Beginners Guide

Good point.

However on a device that i use quite frequently in public environments i consider autoconnecting WLAN an avoidable security threat. Therefore all my NetworkManager connections are set to “autoconnect=false”. I even do not allow cable connections to autoconnect.

Regards

susejunky

I have to admit that i found nmcli quite “uncomfortable” to use and avoided it so far. Nevertheless i gave it a try and

nmcli c

will ALWAYS (even after several stop/starts of NetworkManager) show ALL connections (even the ones that have set “autoconnect=false”). And as i can tell from my tests so far nmcli will allow me to use all available connections (e.g. start one, stop one, start another one, …).

However during that testing i discovered another problem with NetworkManager:

When i stop/start NetworkManager a second time the connection set to “autoconnect=true” stops working (i.e. it does not connect to my router anymore). Looking into my router logfile i can see, that it attempts to connect by using a MAC-address which is no valid MAC of any of my network devices. Therefor it gets blocked by the routers MAC-filter.

Things are getting worse …

Regards

susejunky