Periodic disconnection from certain WiFi APs

Hello. This has been an issue I’ve been trying to resolve on my own for a few months, but it seems I can’t find this exact issue or I don’t know how to word it for search engines. As the title says, my WiFi disconnects periodically from certain access points, in particular my home router. The period is almost always 3 mins exactly, which is odd, but in edge cases can be as long as 4-6 mins. It is usually able to reconnect on its own, but sometimes it doesn’t and I have to use the network-manager applet to do it.

In an attempt to fix it, I replaced wpa_supplicant with iwd. I did this last December, and it seemed to work fine until last week. I updated, thinking that might do something, but it didn’t help. I then got rid of network manager entirely and just relied on iwd + dhcpcd. This caused a different behavior. It now stayed connected for longer (I neglected to do any timing experiments like last time so I don’t quite know how much longer) but when the disconnects happened the reconnect took much longer as well, as long as a minute sometimes. I decided this trade-off wasn’t worth it, so I reverted all the way back to how it was: wpa_supplicant + network manager. As recommended in the many other similar threads elsewhere (none of which quite align with my errors) I ensured the other programs were no longer present and conflicting. iwd and dhcpcd are now uninstalled.

Currently I have connected to my phone’s mobile hotspot, which has yet to disconnect on me.

$ systemctl list-units --type service --no-pager                                                     (base) 
  UNIT                                       LOAD   ACTIVE SUB     DESCRIPTION                                
  alsa-restore.service                       loaded active exited  Save/Restore Sound Card State
  avahi-daemon.service                       loaded active running Avahi mDNS/DNS-SD Stack
  bluetooth.service                          loaded active running Bluetooth service
  colord.service                             loaded active running Manage, Install and Generate Color Profiles
  cups.service                               loaded active running CUPS Scheduler
  dbus-broker.service                        loaded active running D-Bus System Message Bus
  dracut-shutdown.service                    loaded active exited  Restore /run/initramfs on shutdown
  firewalld.service                          loaded active running firewalld - dynamic firewall daemon
  kmod-static-nodes.service                  loaded active exited  Create List of Static Device Nodes
  ldconfig.service                           loaded active exited  Rebuild Dynamic Linker Cache
  lvm2-monitor.service                       loaded active exited  Monitoring of LVM2 mirrors, snapshots etc.…
  lxdm.service                               loaded active running LXDE Display Manager
  NetworkManager.service                     loaded active running Network Manager
  polkit.service                             loaded active running Authorization Manager
  power-profiles-daemon.service              loaded active running Power Profiles daemon
  rtkit-daemon.service                       loaded active running RealtimeKit Scheduling Policy Service
  systemd-backlight@backlight:intel_backlig… loaded active exited  Load/Save Screen Backlight Brightness of b…
  systemd-binfmt.service                     loaded active exited  Set Up Additional Binary Formats
  systemd-fsck@dev-disk-by\x2duuid-EBC3\x2d… loaded active exited  File System Check on /dev/disk/by-uuid/EBC…
  systemd-journal-catalog-update.service     loaded active exited  Rebuild Journal Catalog
  systemd-journal-flush.service              loaded active exited  Flush Journal to Persistent Storage
  systemd-journald.service                   loaded active running Journal Service
  systemd-logind.service                     loaded active running User Login Management
  systemd-modules-load.service               loaded active exited  Load Kernel Modules
  systemd-random-seed.service                loaded active exited  Load/Save OS Random Seed
  systemd-remount-fs.service                 loaded active exited  Remount Root and Kernel File Systems
  systemd-resolved.service                   loaded active running Network Name Resolution
  systemd-sysctl.service                     loaded active exited  Apply Kernel Variables
  systemd-sysusers.service                   loaded active exited  Create System Users
  systemd-timesyncd.service                  loaded active running Network Time Synchronization
  systemd-tmpfiles-setup-dev-early.service   loaded active exited  Create Static Device Nodes in /dev gracefu…
  systemd-tmpfiles-setup-dev.service         loaded active exited  Create Static Device Nodes in /dev
  systemd-tmpfiles-setup.service             loaded active exited  Create System Files and Directories
  systemd-udev-load-credentials.service      loaded active exited  Load udev Rules from Credentials
  systemd-udev-trigger.service               loaded active exited  Coldplug All udev Devices
  systemd-udevd.service                      loaded active running Rule-based Manager for Device Events and F…
  systemd-update-done.service                loaded active exited  Update is Completed
  systemd-update-utmp.service                loaded active exited  Record System Boot/Shutdown in UTMP
  systemd-user-sessions.service              loaded active exited  Permit User Sessions
  systemd-userdb-load-credentials.service    loaded active exited  Load JSON user/group Records from Credenti…
  systemd-userdbd.service                    loaded active running User Database Manager
● systemd-vconsole-setup.service             loaded failed failed  Virtual Console Setup
  udisks2.service                            loaded active running Disk Manager
  upower.service                             loaded active running Daemon for power management
  user-runtime-dir@1000.service              loaded active exited  User Runtime Directory /run/user/1000
  user@1000.service                          loaded active running User Manager for UID 1000
  wpa_supplicant.service                     loaded active running WPA supplicant

Legend: LOAD   → Reflects whether the unit definition was properly loaded.
        ACTIVE → The high-level unit activation state, i.e. generalization of SUB.
        SUB    → The low-level unit activation state, values depend on unit type.

47 loaded units listed. Pass --all to see loaded but inactive units, too.
To show all installed unit files use 'systemctl list-unit-files'.

There’s my units running if you want to confirm that I have no conflicting processes.

Here’s my journalctl around when a disconnect occurred: https://pastebin.com/HqtRbpWD You’ll see that I’ve attempted to censor identifying information. If I’ve gone too far with that please let me know. In particular, I haven’t had luck finding anyone with this particular error:

Ene 16 22:21:22 ************ wpa_supplicant[1017]: wlp4s0: CTRL-EVENT-ASSOC-REJECT bssid=----------------- status_code=11

According to this table, code 11 is “Disassociated because the information in the Supported Channels element is unacceptable.“ which is meaningless to me. I’ve almost always found different codes when researching similar issues.

inxi for good measure:

$ inxi -Fxxc0z                                                                                                        (base) 
System:
  Kernel: 6.18.5-arch1-1 arch: x86_64 bits: 64 compiler: gcc v: 15.2.1
  Desktop: LXDE v: 0.11.1 tk: Gtk v: N/A wm: Openbox dm: LXDM
    Distro: EndeavourOS base: Arch Linux
Machine:
  Type: Laptop System: HP product: Victus by HP Gaming Laptop 15-fa1xxx v: N/A
    serial: <superuser required> Chassis: type: 10 serial: <superuser required>
  Mobo: HP model: 8C2D v: 63.33 serial: <superuser required>
    part-nu: 9Y1W9PA#UUF Firmware: UEFI vendor: AMI v: F.16 date: 03/19/2024
Battery:
  ID-1: BAT0 charge: 55.1 Wh (100%) condition: 55.1/70.1 Wh (78.6%)
    volts: 16.51 min: 15.4 model: HP Primary serial: <filter> charging:
    status: discharging cycles: 90
CPU:
  Info: 8-core (4-mt/4-st) model: 12th Gen Intel Core i5-12450H bits: 64
    type: MST AMCP arch: Alder Lake rev: 3 cache: L1: 704 KiB L2: 7 MiB
    L3: 12 MiB
  Speed (MHz): avg: 478 min/max: 400/4400:3300 cores: 1: 478 2: 478 3: 478
    4: 478 5: 478 6: 478 7: 478 8: 478 9: 478 10: 478 11: 478 12: 478
    bogomips: 59904
  Flags-basic: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx
Graphics:
  Device-1: Intel Alder Lake-P GT1 [UHD Graphics] vendor: Hewlett-Packard
    driver: i915 v: kernel arch: Xe ports: active: eDP-1 empty: DP-1
    bus-ID: 00:02.0 chip-ID: 8086:46a3
  Device-2: NVIDIA AD107M [GeForce RTX 4050 Max-Q / Mobile]
    vendor: Hewlett-Packard driver: nvidia v: 590.48.01 arch: Lovelace pcie:
    speed: 8 GT/s lanes: 8 ports: active: none empty: HDMI-A-1 bus-ID: 01:00.0
    chip-ID: 10de:28a1
  Device-3: Luxvisions Innotech HP Wide Vision HD Camera driver: uvcvideo
    type: USB rev: 2.0 speed: 480 Mb/s lanes: 1 bus-ID: 3-6:5 chip-ID: 30c9:0069
  Display: x11 server: X.Org v: 21.1.21 with: Xwayland v: 24.1.9
    compositor: Picom v: 12.5 driver: X: loaded: modesetting,nvidia
    alternate: fbdev,intel,nouveau,nv,vesa dri: iris gpu: i915
    display-ID: :0.0 screens: 1
  Screen-1: 0 s-res: 1920x1080 s-dpi: 96
  Monitor-1: eDP-1 model: BOE Display 0x0c73 res: 1920x1080 hz: 144 dpi: 142
    diag: 395mm (15.5")
  API: EGL v: 1.5 platforms: device: 0 drv: nvidia device: 1 drv: iris
    device: 3 drv: swrast gbm: drv: iris surfaceless: drv: nvidia x11: drv: iris
    inactive: wayland,device-2
  API: OpenGL v: 4.6.0 compat-v: 4.5 vendor: intel mesa v: 25.3.3-arch1.2
    glx-v: 1.4 direct-render: yes renderer: Mesa Intel Graphics (ADL GT2)
    device-ID: 8086:46a3
  API: Vulkan v: 1.4.335 surfaces: N/A device: 0 type: discrete-gpu
    driver: nvidia device-ID: 10de:28a1
  Info: Tools: api: eglinfo, glxinfo, vulkaninfo
    gpu: nvidia-settings,nvidia-smi x11: xdpyinfo, xprop, xrandr
Audio:
  Device-1: Intel Alder Lake PCH-P High Definition Audio
    vendor: Hewlett-Packard driver: sof-audio-pci-intel-tgl bus-ID: 00:1f.3
    chip-ID: 8086:51c8
  Device-2: NVIDIA AD107 High Definition Audio vendor: Hewlett-Packard
    driver: snd_hda_intel v: kernel pcie: speed: 8 GT/s lanes: 8 bus-ID: 01:00.1
    chip-ID: 10de:22be
  Device-3: ZOOM H1n driver: snd-usb-audio type: USB rev: 1.1 speed: 12 Mb/s
    lanes: 1 bus-ID: 3-2:3 chip-ID: 1686:03f5
  API: ALSA v: k6.18.5-arch1-1 status: kernel-api
  Server-1: PipeWire v: 1.4.9 status: active with: 1: pipewire-pulse
    status: active 2: wireplumber status: active 3: pipewire-alsa type: plugin
    4: pw-jack type: plugin
Network:
  Device-1: MEDIATEK MT7921 802.11ax PCIe Wireless Network Adapter [Filogic
    330] vendor: AzureWave driver: mt7921e v: kernel pcie: speed: 5 GT/s
    lanes: 1 bus-ID: 04:00.0 chip-ID: 14c3:7961
  IF: wlp4s0 state: up mac: <filter>
  Device-2: Realtek RTL8111/8168/8211/8411 PCI Express Gigabit Ethernet
    vendor: Hewlett-Packard driver: r8169 v: kernel pcie: speed: 2.5 GT/s
    lanes: 1 port: 3000 bus-ID: 05:00.0 chip-ID: 10ec:8168
  IF: eno1 state: down mac: <filter>
Bluetooth:
  Device-1: IMC Networks Wireless_Device driver: btusb v: 0.8 type: USB
    rev: 2.1 speed: 480 Mb/s lanes: 1 bus-ID: 3-7:7 chip-ID: 13d3:3567
  Report: btmgmt ID: hci0 rfk-id: 0 state: up address: <filter> bt-v: 5.3
    lmp-v: 12
Drives:
  Local Storage: total: 476.94 GiB used: 470.74 GiB (98.7%)
  ID-1: /dev/nvme0n1 vendor: Micron model: MTFDKBA512QFM-1BD1AABHA
    size: 476.94 GiB speed: 63.2 Gb/s lanes: 4 serial: <filter> temp: 33.9 C
Partition:
  ID-1: / size: 475.93 GiB used: 470.74 GiB (98.9%) fs: btrfs
    dev: /dev/nvme0n1p2
  ID-2: /boot/efi size: 1022 MiB used: 584 KiB (0.1%) fs: vfat
    dev: /dev/nvme0n1p1
  ID-3: /home size: 475.93 GiB used: 470.74 GiB (98.9%) fs: btrfs
    dev: /dev/nvme0n1p2
  ID-4: /var/log size: 475.93 GiB used: 470.74 GiB (98.9%) fs: btrfs
    dev: /dev/nvme0n1p2
Swap:
  Alert: No swap data was found.
Sensors:
  System Temperatures: cpu: 40.0 C mobo: N/A
  Fan Speeds (rpm): cpu: 2216 fan-2: 2032
Info:
  Memory: total: 16 GiB note: est. available: 15.26 GiB used: 5.52 GiB (36.2%)
  Processes: 321 Power: uptime: 3h 32m wakeups: 0 Init: systemd v: 259
    default: graphical
  Packages: 1894 pm: pacman pkgs: 1887 pm: flatpak pkgs: 7 Compilers:
    clang: 21.1.6 gcc: 15.2.1 Shell: fish v: 4.3.3 running-in: lxterminal
    inxi: 3.3.40

Not sure if its a power save issue? You could set power save in NetworkManager.

sudo nano /etc/NetworkManager/conf.d/wifi-powersave.conf

add

[connection]
wifi.powersave = 2

Then restart NetworkManager.

sudo systemctl restart NetworkManager

Edit: An alternate method would be to add it to the driver.

sudo nano /etc/modprobe.d/mt7921e.conf

add

options mt7921e disable_aspm=1

Edit: Maybe this helps? :person_shrugging:

Sorry for getting back to you so late; timezones. I’ve done your suggestion, although I’ve discovered that I already had a powersave conf file in there, just under the name wifi-powersave-off.conf though it had the same contents you suggested. I just renamed it to match your suggestion. Oh ok as I was typing a disconnect happened, so I guess it didn’t work. I’ll try the driver conf next.

I’ve tried the driver conf now. Like clockwork it still disconnected after 3 mins. Do I need to restart anything after making the driver conf? I just rebooted to be sure and it still disconnected.

It may be something else then. You can try this one also for NetworkManager. I would leave the power save file for the driver also.

/etc/NetworkManager/NetworkManager.conf

add

[device]
wifi.scan-rand-mac-address=no

Edit: Then restart NetworkManager

sudo systemctl restart NetworkManager

Since you mentioned certain routers (e.g. Home) the WiFi disconnecting randomly, I think we should target those settings.

There are know issues where a router is setup in a WPA2 and WPA3 hybrid mode allowing a device to switch between the two methods. I had to change my Asus router to not use hybrid, but either use WPA 2 or WPA 3 in personal mode.2 of 8 devices at home (Lenovo Yoga and Moto Android 15 phone) had the issue.

More here in AI summary:

1 Like

Router issues might be possible also. The random mac address issue is also very common with some adapters.

Sorry I took a while to get back to y’all. I’m not sure what happened but it seems like the problem isn’t happening anymore? I’ve been able to stay connected for hours now and I haven’t changed anything since you last heard from me. I won’t say the problem is solved because frankly I haven’t done anything to solve it, but I know the topic will close on its own after a while. This will just have to be a mystery I guess

Did you leave the powersave you set up? Which one the driver or NetworkManager .conf file?

Edit: Just wondering if you had rebooted after those changes before testing it out?

I did reboot and leave the powersave, but that didn’t seem to help initially. The reboot after that one was the one that seems to have fixed it somehow, and even ‘till now it’s still fine

Edit: sorry to take so long, I just wanted to test for a while to make sure

1 Like