The NetworkManager service doesn't start during boot after upgrading the kernel to versions higher than Linux 6.8.9-300.fc40.x86_64

After updating the os from version F39 to F40, during the first month with regular module updates, the system functioned normally until the kernel was updated to version Linux 6.8.10-300.fc40.x86_64. After updating the kernel to version Linux 6.8.10-300.fc40.x86_64, when the system was loaded, the NetworkManager service didn’t start.
Assuming a bug in the kernel version Linux 6.8.10-300.fc40.x86_64, I tried to update the kernel from version Linux 6.8.9-300.fc40.x86_64 to version Linux 6.8.11-300.fc40.x86_64 in early June, but the problem didn’t go away. Moreover, when the system is loaded with kernel version Linux 6.8.9-300.fc40.x86_64, it continues to function normally. How can I solve my problem?
System characteristics:
Model: ASUSTeK COMPUTER INC. VivoBook_ASUSLaptop X513IA_D513IA
Memory: 16.0 GiB
Processor: AMD Ryzen™ 7 4700U with Radeon™ Graphics × 8
Graphics: AMD Radeon™ Graphics
Disk Capacity: 512.1 GB
Firmware Version: X513IA.308
OS Name: Fedora Linux 40 (Workstation Edition)
OS Type: 64-bit
GNOME Version: 46
Windowing Version: Wayland
Network controller:
01:00.0 Network controller: Realtek Semiconductor Co., Ltd. RTL8821CE 802.11ac PCIe Wireless Network Adapter
Subsystem: AzureWave Device 3041
Kernel driver in use: rtw_8821ce
Kernel modules: rtw88_8821ce

When booting with kernel version 6.8.9-300.fc40.x86_64, the journalctl logs look like this:

Jun 07 00:48:27 art-fedora-nbook systemd[1]: Starting NetworkManager.service - Network Manager...
Jun 07 00:48:27 art-fedora-nbook NetworkManager[1464]: <info>  [1717706907.4861] NetworkManager (version 1.46.0-2.fc40) is starting... (boot:21aeb9a0-aced-4847-a8d2-f76a500463ba)
Jun 07 00:48:27 art-fedora-nbook NetworkManager[1464]: <info>  [1717706907.4865] Read config: /etc/NetworkManager/NetworkManager.conf (lib: 00-server.conf, 20-connectivity-fedora.conf, 22-wifi-mac-addr.conf) (run: 15-carrier-timeout.conf)
Jun 07 00:48:27 art-fedora-nbook NetworkManager[1464]: <info>  [1717706907.4908] manager[0x55b5ccc9c750]: monitoring kernel firmware directory '/lib/firmware'.
Jun 07 00:48:27 art-fedora-nbook NetworkManager[1464]: <info>  [1717706907.4935] hostname: hostname: using hostnamed
Jun 07 00:48:27 art-fedora-nbook NetworkManager[1464]: <info>  [1717706907.4935] hostname: static hostname changed from (none) to "art-fedora-nbook"
Jun 07 00:48:27 art-fedora-nbook NetworkManager[1464]: <info>  [1717706907.4938] dns-mgr: init: dns=systemd-resolved rc-manager=unmanaged (auto), plugin=systemd-resolved
Jun 07 00:48:27 art-fedora-nbook NetworkManager[1464]: <info>  [1717706907.4955] rfkill3: found Wi-Fi radio killswitch (at /sys/devices/pci0000:00/0000:00:02.2/0000:01:00.0/ieee80211/phy0/rfkill3) (driver rtw_8821ce)
Jun 07 00:48:27 art-fedora-nbook NetworkManager[1464]: <info>  [1717706907.4958] rfkill0: found Wi-Fi radio killswitch (at /sys/devices/platform/asus-nb-wmi/rfkill/rfkill0) (platform driver asus-nb-wmi)
Jun 07 00:48:27 art-fedora-nbook NetworkManager[1464]: <info>  [1717706907.4963] manager[0x55b5ccc9c750]: rfkill: Wi-Fi hardware radio set enabled
Jun 07 00:48:27 art-fedora-nbook NetworkManager[1464]: <info>  [1717706907.4963] manager[0x55b5ccc9c750]: rfkill: WWAN hardware radio set enabled
Jun 07 00:48:27 art-fedora-nbook NetworkManager[1464]: <info>  [1717706907.4994] Loaded device plugin: NMAtmManager (/usr/lib64/NetworkManager/1.46.0-2.fc40/libnm-device-plugin-adsl.so)
Jun 07 00:48:27 art-fedora-nbook NetworkManager[1464]: <info>  [1717706907.5037] Loaded device plugin: NMBluezManager (/usr/lib64/NetworkManager/1.46.0-2.fc40/libnm-device-plugin-bluetooth.so)
Jun 07 00:48:27 art-fedora-nbook NetworkManager[1464]: <info>  [1717706907.5055] Loaded device plugin: NMWifiFactory (/usr/lib64/NetworkManager/1.46.0-2.fc40/libnm-device-plugin-wifi.so)
Jun 07 00:48:27 art-fedora-nbook NetworkManager[1464]: <info>  [1717706907.5076] Loaded device plugin: NMTeamFactory (/usr/lib64/NetworkManager/1.46.0-2.fc40/libnm-device-plugin-team.so)
Jun 07 00:48:27 art-fedora-nbook NetworkManager[1464]: <info>  [1717706907.5086] Loaded device plugin: NMWwanFactory (/usr/lib64/NetworkManager/1.46.0-2.fc40/libnm-device-plugin-wwan.so)
Jun 07 00:48:27 art-fedora-nbook NetworkManager[1464]: <info>  [1717706907.5089] manager: rfkill: Wi-Fi enabled by radio killswitch; enabled by state file
Jun 07 00:48:27 art-fedora-nbook NetworkManager[1464]: <info>  [1717706907.5089] manager: rfkill: WWAN enabled by radio killswitch; enabled by state file
Jun 07 00:48:27 art-fedora-nbook NetworkManager[1464]: <info>  [1717706907.5089] manager: Networking is enabled by state file
Jun 07 00:48:27 art-fedora-nbook NetworkManager[1464]: <info>  [1717706907.5095] settings: Loaded settings plugin: keyfile (internal)
Jun 07 00:48:27 art-fedora-nbook NetworkManager[1464]: <info>  [1717706907.5117] dhcp: init: Using DHCP client 'internal'
Jun 07 00:48:27 art-fedora-nbook NetworkManager[1464]: <info>  [1717706907.5119] manager: (lo): new Loopback device (/org/freedesktop/NetworkManager/Devices/1)
Jun 07 00:48:27 art-fedora-nbook NetworkManager[1464]: <info>  [1717706907.5129] device (lo): state change: unmanaged -> unavailable (reason 'connection-assumed', sys-iface-state: 'external')
Jun 07 00:48:27 art-fedora-nbook NetworkManager[1464]: <info>  [1717706907.5132] device (lo): state change: unavailable -> disconnected (reason 'connection-assumed', sys-iface-state: 'external')
Jun 07 00:48:27 art-fedora-nbook NetworkManager[1464]: <info>  [1717706907.5137] device (lo): Activation: starting connection 'lo' (2f78c99d-934f-4643-875d-407caee668fc)
Jun 07 00:48:27 art-fedora-nbook NetworkManager[1464]: <info>  [1717706907.5140] device (wlp1s0): driver supports Access Point (AP) mode
Jun 07 00:48:27 art-fedora-nbook NetworkManager[1464]: <info>  [1717706907.5145] manager: (wlp1s0): new 802.11 Wi-Fi device (/org/freedesktop/NetworkManager/Devices/2)
Jun 07 00:48:27 art-fedora-nbook NetworkManager[1464]: <info>  [1717706907.5147] device (wlp1s0): state change: unmanaged -> unavailable (reason 'managed', sys-iface-state: 'external')
Jun 07 00:48:27 art-fedora-nbook NetworkManager[1464]: <info>  [1717706907.9664] device (wlp1s0): set-hw-addr: set MAC address to 26:CC:67:81:6A:47 (scanning)
Jun 07 00:48:28 art-fedora-nbook NetworkManager[1464]: <info>  [1717706908.4154] bus-manager: acquired D-Bus service "org.freedesktop.NetworkManager"
Jun 07 00:48:28 art-fedora-nbook NetworkManager[1464]: <info>  [1717706908.4170] device (lo): state change: disconnected -> prepare (reason 'none', sys-iface-state: 'external')
Jun 07 00:48:28 art-fedora-nbook NetworkManager[1464]: <info>  [1717706908.4174] device (lo): state change: prepare -> config (reason 'none', sys-iface-state: 'external')
Jun 07 00:48:28 art-fedora-nbook NetworkManager[1464]: <info>  [1717706908.4178] device (lo): state change: config -> ip-config (reason 'none', sys-iface-state: 'external')
Jun 07 00:48:28 art-fedora-nbook systemd[1]: Started NetworkManager.service - Network Manager.
Jun 07 00:48:28 art-fedora-nbook NetworkManager[1464]: <info>  [1717706908.4189] device (lo): state change: ip-config -> ip-check (reason 'none', sys-iface-state: 'external')
Jun 07 00:48:28 art-fedora-nbook NetworkManager[1464]: <info>  [1717706908.4223] modem-manager: ModemManager available
Jun 07 00:48:28 art-fedora-nbook NetworkManager[1464]: <info>  [1717706908.4232] device (lo): state change: ip-check -> secondaries (reason 'none', sys-iface-state: 'external')
Jun 07 00:48:28 art-fedora-nbook NetworkManager[1464]: <info>  [1717706908.4235] device (lo): state change: secondaries -> activated (reason 'none', sys-iface-state: 'external')
Jun 07 00:48:28 art-fedora-nbook NetworkManager[1464]: <info>  [1717706908.4243] device (lo): Activation: successful, device activated.
Jun 07 00:48:28 art-fedora-nbook NetworkManager[1464]: <info>  [1717706908.4972] device (wlp1s0): supplicant interface state: internal-starting -> disconnected
Jun 07 00:48:28 art-fedora-nbook NetworkManager[1464]: <info>  [1717706908.4973] device (wlp1s0): state change: unavailable -> disconnected (reason 'supplicant-available', sys-iface-state: 'managed')
Jun 07 00:48:30 art-fedora-nbook NetworkManager[1464]: <info>  [1717706910.4831] policy: auto-activating connection 'SSID' (5f28dcfb-6916-430a-aba1-1325c5199ebf)
Jun 07 00:48:30 art-fedora-nbook NetworkManager[1464]: <info>  [1717706910.4841] device (wlp1s0): Activation: starting connection 'SSID' (5f28dcfb-6916-430a-aba1-1325c5199ebf)
Jun 07 00:48:30 art-fedora-nbook NetworkManager[1464]: <info>  [1717706910.4842] device (wlp1s0): state change: disconnected -> prepare (reason 'none', sys-iface-state: 'managed')
Jun 07 00:48:30 art-fedora-nbook NetworkManager[1464]: <info>  [1717706910.4846] manager: NetworkManager state is now CONNECTING
Jun 07 00:48:30 art-fedora-nbook NetworkManager[1464]: <info>  [1717706910.4945] device (wlp1s0): set-hw-addr: set-cloned MAC address to 1E:BE:A8:A5:80:F4 (stable-ssid)
Jun 07 00:48:30 art-fedora-nbook NetworkManager[1464]: <info>  [1717706910.9423] device (wlp1s0): state change: prepare -> config (reason 'none', sys-iface-state: 'managed')
Jun 07 00:48:30 art-fedora-nbook NetworkManager[1464]: <info>  [1717706910.9426] device (wlp1s0): Activation: (wifi) access point 'SSID' has security, but secrets are required.
Jun 07 00:48:30 art-fedora-nbook NetworkManager[1464]: <info>  [1717706910.9426] device (wlp1s0): state change: config -> need-auth (reason 'none', sys-iface-state: 'managed')
Jun 07 00:48:30 art-fedora-nbook NetworkManager[1464]: <info>  [1717706910.9428] sup-iface[ffec85d50f4da0fc,0,wlp1s0]: wps: type pbc start...
Jun 07 00:48:30 art-fedora-nbook NetworkManager[1464]: <info>  [1717706910.9431] device (wlp1s0): supplicant interface state: disconnected -> interface_disabled
Jun 07 00:48:30 art-fedora-nbook NetworkManager[1464]: <info>  [1717706910.9440] device (wlp1s0): state change: need-auth -> prepare (reason 'none', sys-iface-state: 'managed')
Jun 07 00:48:30 art-fedora-nbook NetworkManager[1464]: <info>  [1717706910.9442] device (wlp1s0): state change: prepare -> config (reason 'none', sys-iface-state: 'managed')
Jun 07 00:48:30 art-fedora-nbook NetworkManager[1464]: <info>  [1717706910.9445] device (wlp1s0): Activation: (wifi) connection 'SSID' has security, and secrets exist.  No new secrets needed.
Jun 07 00:48:30 art-fedora-nbook NetworkManager[1464]: <info>  [1717706910.9445] Config: added 'ssid' value 'SSID'
Jun 07 00:48:30 art-fedora-nbook NetworkManager[1464]: <info>  [1717706910.9445] Config: added 'scan_ssid' value '1'
Jun 07 00:48:30 art-fedora-nbook NetworkManager[1464]: <info>  [1717706910.9445] Config: added 'bgscan' value 'simple:30:-70:86400'
Jun 07 00:48:30 art-fedora-nbook NetworkManager[1464]: <info>  [1717706910.9445] Config: added 'key_mgmt' value 'WPA-PSK WPA-PSK-SHA256 FT-PSK SAE FT-SAE'
Jun 07 00:48:30 art-fedora-nbook NetworkManager[1464]: <info>  [1717706910.9445] Config: added 'auth_alg' value 'OPEN'
Jun 07 00:48:30 art-fedora-nbook NetworkManager[1464]: <info>  [1717706910.9446] Config: added 'psk' value '<hidden>'
Jun 07 00:48:30 art-fedora-nbook NetworkManager[1464]: <info>  [1717706910.9525] device (wlp1s0): supplicant interface state: interface_disabled -> inactive
Jun 07 00:48:31 art-fedora-nbook NetworkManager[1464]: <info>  [1717706911.4340] device (wlp1s0): supplicant interface state: inactive -> authenticating
Jun 07 00:48:31 art-fedora-nbook NetworkManager[1464]: <info>  [1717706911.4463] device (wlp1s0): supplicant interface state: authenticating -> associating
Jun 07 00:48:31 art-fedora-nbook NetworkManager[1464]: <info>  [1717706911.4648] device (wlp1s0): supplicant interface state: associating -> associated
Jun 07 00:48:31 art-fedora-nbook NetworkManager[1464]: <info>  [1717706911.6121] device (wlp1s0): supplicant interface state: associated -> completed
Jun 07 00:48:31 art-fedora-nbook NetworkManager[1464]: <info>  [1717706911.6122] device (wlp1s0): Activation: (wifi) Stage 2 of 5 (Device Configure) successful. Connected to wireless network "SSID"
Jun 07 00:48:31 art-fedora-nbook NetworkManager[1464]: <info>  [1717706911.7133] device (wlp1s0): state change: config -> ip-config (reason 'none', sys-iface-state: 'managed')
Jun 07 00:48:31 art-fedora-nbook NetworkManager[1464]: <info>  [1717706911.7140] dhcp4 (wlp1s0): activation: beginning transaction (timeout in 45 seconds)
Jun 07 00:48:31 art-fedora-nbook NetworkManager[1464]: <info>  [1717706911.7220] dhcp4 (wlp1s0): state changed new lease, address=192.168.10.14, acd pending
Jun 07 00:48:31 art-fedora-nbook NetworkManager[1464]: <info>  [1717706911.8437] dhcp4 (wlp1s0): state changed new lease, address=192.168.10.14
Jun 07 00:48:31 art-fedora-nbook NetworkManager[1464]: <info>  [1717706911.8444] policy: set 'SSID' (wlp1s0) as default for IPv4 routing and DNS
Jun 07 00:48:31 art-fedora-nbook NetworkManager[1464]: <info>  [1717706911.8642] device (wlp1s0): state change: ip-config -> ip-check (reason 'none', sys-iface-state: 'managed')
Jun 07 00:48:31 art-fedora-nbook NetworkManager[1464]: <info>  [1717706911.8672] device (wlp1s0): state change: ip-check -> secondaries (reason 'none', sys-iface-state: 'managed')
Jun 07 00:48:31 art-fedora-nbook NetworkManager[1464]: <info>  [1717706911.8675] device (wlp1s0): state change: secondaries -> activated (reason 'none', sys-iface-state: 'managed')
Jun 07 00:48:31 art-fedora-nbook NetworkManager[1464]: <info>  [1717706911.8680] manager: NetworkManager state is now CONNECTED_SITE
Jun 07 00:48:31 art-fedora-nbook NetworkManager[1464]: <info>  [1717706911.8687] device (wlp1s0): Activation: successful, device activated.
Jun 07 00:48:31 art-fedora-nbook NetworkManager[1464]: <info>  [1717706911.8696] manager: startup complete
Jun 07 00:48:32 art-fedora-nbook NetworkManager[1464]: <info>  [1717706912.0156] manager: NetworkManager state is now CONNECTED_GLOBAL
Jun 07 00:48:34 art-fedora-nbook NetworkManager[1464]: <info>  [1717706914.6377] agent-manager: agent[f57a229380cbdb4f,:1.36/org.gnome.Shell.NetworkAgent/42]: agent registered
Jun 07 00:48:34 art-fedora-nbook NetworkManager[1464]: <info>  [1717706914.7738] dhcp6 (wlp1s0): activation: beginning transaction (timeout in 45 seconds)
Jun 07 00:48:34 art-fedora-nbook NetworkManager[1464]: <info>  [1717706914.7747] policy: set 'SSID' (wlp1s0) as default for IPv6 routing and DNS
Jun 07 00:48:35 art-fedora-nbook NetworkManager[1464]: <info>  [1717706915.8137] dhcp6 (wlp1s0): state changed new lease, address=2a00:cc47:20d7:2401::6ce1
Jun 07 00:48:45 art-fedora-nbook NetworkManager[1464]: <info>  [1717706925.1264] agent-manager: agent[fbd2f73ad773c4f2,:1.85/org.gnome.Shell.NetworkAgent/1000]: agent registered
Jun 07 01:03:24 art-fedora-nbook NetworkManager[1464]: <info>  [1717707804.7994] dhcp6 (wlp1s0): state changed new lease, address=2a00:cc47:20d7:2401::6ce1

But when booting with kernel version 6.8.10-300.fc40.x86_64 or 6.8.11-300.fc40.x86_64, the Journalctl logs look like this:

Jun 07 00:24:59 art-fedora-nbook systemd[1]: Starting NetworkManager.service - Network Manager...
Jun 07 00:25:00 art-fedora-nbook NetworkManager[1386]: Cannot create '/run/NetworkManager/devices': Permission denied
Jun 07 00:25:00 art-fedora-nbook systemd[1]: NetworkManager.service: Main process exited, code=exited, status=1/FAILURE
Jun 07 00:25:00 art-fedora-nbook systemd[1]: NetworkManager.service: Failed with result 'exit-code'.
Jun 07 00:25:00 art-fedora-nbook systemd[1]: Failed to start NetworkManager.service - Network Manager.
Jun 07 00:25:00 art-fedora-nbook systemd[1]: NetworkManager.service: Scheduled restart job, restart counter is at 1.
Jun 07 00:25:00 art-fedora-nbook systemd[1]: Starting NetworkManager.service - Network Manager...
Jun 07 00:25:00 art-fedora-nbook NetworkManager[1426]: Cannot create '/run/NetworkManager/devices': Permission denied
Jun 07 00:25:00 art-fedora-nbook systemd[1]: NetworkManager.service: Main process exited, code=exited, status=1/FAILURE
Jun 07 00:25:00 art-fedora-nbook systemd[1]: NetworkManager.service: Failed with result 'exit-code'.
Jun 07 00:25:00 art-fedora-nbook systemd[1]: Failed to start NetworkManager.service - Network Manager.
Jun 07 00:25:00 art-fedora-nbook systemd[1]: NetworkManager.service: Scheduled restart job, restart counter is at 2.
Jun 07 00:25:00 art-fedora-nbook systemd[1]: Starting NetworkManager.service - Network Manager...
Jun 07 00:25:00 art-fedora-nbook NetworkManager[1493]: Cannot create '/run/NetworkManager/devices': Permission denied
Jun 07 00:25:00 art-fedora-nbook systemd[1]: NetworkManager.service: Main process exited, code=exited, status=1/FAILURE
Jun 07 00:25:00 art-fedora-nbook systemd[1]: NetworkManager.service: Failed with result 'exit-code'.
Jun 07 00:25:00 art-fedora-nbook systemd[1]: Failed to start NetworkManager.service - Network Manager.
Jun 07 00:25:00 art-fedora-nbook systemd[1]: NetworkManager.service: Scheduled restart job, restart counter is at 3.
Jun 07 00:25:00 art-fedora-nbook systemd[1]: Starting NetworkManager.service - Network Manager...
Jun 07 00:25:00 art-fedora-nbook NetworkManager[1537]: Cannot create '/run/NetworkManager/devices': Permission denied
Jun 07 00:25:00 art-fedora-nbook systemd[1]: NetworkManager.service: Main process exited, code=exited, status=1/FAILURE
Jun 07 00:25:00 art-fedora-nbook systemd[1]: NetworkManager.service: Failed with result 'exit-code'.
Jun 07 00:25:00 art-fedora-nbook systemd[1]: Failed to start NetworkManager.service - Network Manager.
Jun 07 00:25:00 art-fedora-nbook systemd[1]: NetworkManager.service: Scheduled restart job, restart counter is at 4.
Jun 07 00:25:00 art-fedora-nbook systemd[1]: Starting NetworkManager.service - Network Manager...
Jun 07 00:25:00 art-fedora-nbook NetworkManager[1539]: Cannot create '/run/NetworkManager/devices': Permission denied
Jun 07 00:25:00 art-fedora-nbook systemd[1]: NetworkManager.service: Main process exited, code=exited, status=1/FAILURE
Jun 07 00:25:00 art-fedora-nbook systemd[1]: NetworkManager.service: Failed with result 'exit-code'.
Jun 07 00:25:00 art-fedora-nbook systemd[1]: Failed to start NetworkManager.service - Network Manager.
Jun 07 00:25:00 art-fedora-nbook systemd[1]: NetworkManager.service: Scheduled restart job, restart counter is at 5.
Jun 07 00:25:00 art-fedora-nbook systemd[1]: NetworkManager.service: Start request repeated too quickly.
Jun 07 00:25:00 art-fedora-nbook systemd[1]: NetworkManager.service: Failed with result 'exit-code'.
Jun 07 00:25:00 art-fedora-nbook systemd[1]: Failed to start NetworkManager.service - Network Manager.

Why does the message “Permission denied” appear in the logs when creating a path, if everything functioned normally with the kernel version Linux 6.8.9-300.fc40.x86_64?

Jun 07 00:25:00 art-fedora-nbook NetworkManager[1386]: Cannot create ‘/run/NetworkManager/devices’: Permission denied
Jun 07 00:25:00 art-fedora-nbook systemd[1]: NetworkManager.service: Main process exited, code=exited, status=1/FAILURE

There is an open bug report about SELinux blocking access to /run/NetworkManager.

https://bugzilla.redhat.com/show_bug.cgi?id=2284171

Does restorecon -vr /run/NetworkManager work around the problem temporarily as reported in Bugzilla?

I don’t know why the kernel version would matter, unless some script or service has a conditional set to depend on kernels greater than some specific value.

2 Likes

Тhanks for the response.
As indicated in the bugzilla report, relabeling with “restorecon” temporarily solves the problem, but until the next reboot.
In my case, there are 3 relabels, in contrast to 8 in the bugzilla report.

Relabeled /run/NetworkManager from system_u:object_r:init_var_run_t:s0 to system_u:object_r:NetworkManager_var_run_t:s0
Relabeled /run/NetworkManager/conf.d from system_u:object_r:init_var_run_t:s0 to system_u:object_r:NetworkManager_var_run_t:s0
Relabeled /run/NetworkManager/conf.d/10-globally-managed-devices.conf from system_u:object_r:init_var_run_t:s0 to system_u:object_r:NetworkManager_var_run_t:s0

Considering the above, what is the best thing to do?

  1. create a bash script and run it manually every time reboot
sudo restorecon -vr /run/NetworkManager
sudo systemctl start NetworkManager

or
2. supplement the GRUB loader with the appropriate command lines?

Оr is there a more competent solution?

It is possible that some other file is mislabeled, so to fix that run

touch /.autorelabel

and then reboot. This will make sure all files are labeled correctly according to the current configuration.

2 Likes

I use both these commands and the NetworkManager works fine, until the reboot of course!

but the command

Didn’t permanently solve the issue.

Any suggestions?