NetworkManager malfunctioning after computer goes to sleep

Hi everyone!

I'm new to Manjaro and Arch Linux, so I decided to give it a try by making it my main desktop environment for work, but I'm having some problems, specially when the computer goes to sleep.

The main problem I have is related with the NetworkManager, it keeps losing connection and the only "fix" I have right now it's restarting it using

sudo systemctl restart NetworkManager

but I would really appreciate if there is any actual solution for making it work at least for a couple of hours, because I use zoom for work and many times I have to reconnect during a meeting. Any idea will be welcome.

inxi -Fxxx
System:    Host: EAGLE-VR-2 Kernel: 5.3.5-1-MANJARO x86_64 bits: 64 compiler: gcc v: 9.2.0 
           Desktop: KDE Plasma 5.16.5 tk: Qt 5.13.1 wm: kwin_x11 dm: SDDM Distro: Manjaro Linux 
Machine:   Type: Laptop System: Notebook product: N95TP6 v: N/A serial: <root required> Chassis: 
           type: 10 serial: <root required> 
           Mobo: Notebook model: N95TP6 serial: <root required> UEFI: American Megatrends 
           v: 1.05.01 date: 11/28/2017 
Battery:   ID-1: BAT0 charge: 54.5 Wh condition: 54.5/62.1 Wh (88%) volts: 12.4/10.9 
           model: Notebook BAT type: Li-ion serial: 0001 status: Full 
CPU:       Topology: 6-Core model: Intel Core i7-8700K bits: 64 type: MT MCP arch: Kaby Lake rev: A 
           L2 cache: 12.0 MiB 
           flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx bogomips: 88824 
           Speed: 800 MHz min/max: 800/4700 MHz Core speeds (MHz): 1: 800 2: 800 3: 800 4: 800 
           5: 800 6: 800 7: 800 8: 800 9: 800 10: 800 11: 800 12: 800 
Graphics:  Device-1: Intel UHD Graphics 630 vendor: CLEVO/KAPOK driver: i915 v: kernel 
           bus ID: 00:02.0 chip ID: 8086:3e92 
           Device-2: NVIDIA GP106M [GeForce GTX 1060 Mobile] vendor: CLEVO/KAPOK driver: nvidia 
           v: 390.129 bus ID: 01:00.0 chip ID: 10de:1c20 
           Display: x11 server: X.Org 1.20.5 driver: modesetting,nvidia compositor: kwin_x11 
           resolution: 1920x1080~60Hz 
           OpenGL: renderer: GeForce GTX 1060/PCIe/SSE2 v: 4.6.0 NVIDIA 390.129 direct render: Yes 
Audio:     Device-1: Intel 200 Series PCH HD Audio vendor: CLEVO/KAPOK driver: snd_hda_intel 
           v: kernel bus ID: 00:1f.3 chip ID: 8086:a2f0 
           Device-2: NVIDIA GP106 High Definition Audio vendor: CLEVO/KAPOK driver: snd_hda_intel 
           v: kernel bus ID: 01:00.1 chip ID: 10de:10f1 
           Sound Server: ALSA v: k5.3.5-1-MANJARO 
Network:   Device-1: Intel Wireless 8265 / 8275 driver: iwlwifi v: kernel port: e000 
           bus ID: 04:00.0 chip ID: 8086:24fd 
           IF: wlp4s0 state: up mac: 74:e5:f9:3e:6c:9b 
           Device-2: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet vendor: CLEVO/KAPOK 
           driver: r8169 v: kernel port: d000 bus ID: 05:00.1 chip ID: 10ec:8168 
           IF: enp5s0f1 state: down mac: 80:fa:5b:52:bf:25 
           IF-ID-1: tun0 state: unknown speed: 10 Mbps duplex: full mac: N/A 
Drives:    Local Storage: total: 2.05 TiB used: 142.59 GiB (6.8%) 
           ID-1: /dev/nvme0n1 vendor: Samsung model: SSD 960 EVO 250GB size: 232.89 GiB 
           speed: 31.6 Gb/s lanes: 4 serial: S3ESNX0K173569E rev: 3B7QCXE7 scheme: GPT 
           ID-2: /dev/sda vendor: Seagate model: ST2000LM015-2E8174 size: 1.82 TiB speed: 6.0 Gb/s 
           rotation: 5400 rpm serial: ZDZ0837Z rev: SDM1 scheme: GPT 
Partition: ID-1: / size: 227.54 GiB used: 13.04 GiB (5.7%) fs: ext4 dev: /dev/nvme0n1p2 
           ID-2: /home size: 1.77 TiB used: 129.52 GiB (7.2%) fs: ext4 dev: /dev/sda2 
           ID-3: swap-1 size: 24.00 GiB used: 38.8 MiB (0.2%) fs: swap dev: /dev/sda1 
Sensors:   System Temperatures: cpu: 54.0 C mobo: N/A gpu: nvidia temp: 52 C 
           Fan Speeds (RPM): N/A 
Info:      Processes: 345 Uptime: 7h 39m Memory: 15.51 GiB used: 9.10 GiB (58.7%) Init: systemd 
           v: 242 Compilers: gcc: 9.2.0 Shell: bash v: 5.0.11 running in: konsole inxi: 3.0.36 

See, if this can help:

Wireless power saving
Activate this option to set individual actions for Wi-Fi, Mobile broadband or Bluetooth connections.

Disable IPv6:

Click on Network Manager> Click ‘Edit’ and edit the wireless connection> Click the IPv6 tab> set IPv6 to ignore> click OK> Reboot.

You can also disable IPv6 in your router. Reboot both your computer and router afterwards.

Disable MAC Address Randomization:

Enter this command in the terminal to automatically generate the required conf file:

echo -e "[device]\nwifi.scan-rand-mac-address=no" | sudo tee /etc/NetworkManager/conf.d/disable-random-mac.conf

After creating the new conf file, reboot.

If those fixes don't help much the the next step is to test different iwlwifi driver options.

This script will temporarily set iwlwifi driver options that may help your connectivity. The options are only temporary and they will be erased on a reboot (so there is no risk in running the command):

su -c '/usr/bin/env bash -c echo "unloading network"; nmcli networking off; sleep 1; systemctl stop NetworkManager; sleep 2; DEVICE=$(hwinfo --wlan | grep "Device File" | cut -d " " -f5); sudo ip link set $DEVICE down; echo -e "\n--- unloading network ---\n"; sleep 3; lsmod | grep -o -e ^iwlmvm -e ^iwldvm -e ^iwlwifi | xargs sudo rmmod; sleep 3; echo -e "\n--- restarting network ---\n"; sleep 3; modprobe -v iwlwifi swcrypto=1 11n_disable=8 power_save=0; sleep 3; ip link set $DEVICE up; sleep 2; systemctl start NetworkManager; sleep 2; nmcli networking on; sleep 2; nmcli r wifi off; sleep 2; nmcli r wifi on; echo -e "\n--- process completed ---\n"'

Simply paste the commands in the terminal and run it. Post all input and output of the command.

I have tried all of them but without success. Even when trying to post back the answer, the internet icon changed to color orange and didn't allowed me to post it.

--- unloading network ---

--- restarting network ---

insmod /lib/modules/5.3.6-1-MANJARO/kernel/drivers/net/wireless/intel/iwlwifi/iwlwifi.ko.xz swcrypto=1 11n_disable=8 power_save=0

--- process completed ---

After some thought, I believed that an OpenVPN connection was causing this problem, but even when I just simply turn on my laptop and leave the connection unattended it simply decides to drop it. Any idea if there is any timeout connection or something like that? The only time it has been stable for a long time it's while using VS Code debug option, not sure what it does, but it allows me to use the internet for much longer times than without it.

The iwlwifi firmware has been experiencing a lot of issues lately. You might want to temporarily test out some of the older ilinux-firmware packages.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.

Forum kindly sponsored by