Wifi randomly disconnects, thus the VPN drops, and loooooots of wpa_supplicant messages: CTRL-EVENT-BEACON-LOSS

Hello everyone! :slight_smile:

For a couple of days now, I keep having weird issues with my wifi, where it would get randomly disconnected and thus my VPN is also disconnected along with the wifi. Strangely enough this happens most often at work, using my work’s wifi, but I’ve had it happen at home once or twice already, too.

I feel like this happens ever since I replaced power-profiles-daemon with tlp, however, disabling tlp yielded no positive results, so I was quick with ruling it out as the culprit.

Instead I tried looking up what journalctl had to say and for some reason the wpa_supplicant is very aggressive with its messaging, though I have no idea whether I should be worried about that or not. As you can see in the following snippet of journalctl -f, wpa_supplicant gives me one CTRL-EVENT-BEACON-LOSS per second, which seems excessive to me, but I don’t really have any experience fixing problems like this:

journalctl -f
$ journalctl -f
Dez 03 12:22:46 IdeaPad5 wpa_supplicant[851]: wlan0: CTRL-EVENT-BEACON-LOSS
Dez 03 12:22:47 IdeaPad5 wpa_supplicant[851]: wlan0: CTRL-EVENT-BEACON-LOSS
Dez 03 12:22:48 IdeaPad5 wpa_supplicant[851]: wlan0: CTRL-EVENT-BEACON-LOSS
Dez 03 12:22:49 IdeaPad5 mullvad-daemon[626]: [mullvad_daemon::management_interface][DEBUG] get_tunnel_state
Dez 03 12:22:49 IdeaPad5 wpa_supplicant[851]: wlan0: CTRL-EVENT-BEACON-LOSS
Dez 03 12:22:50 IdeaPad5 wpa_supplicant[851]: wlan0: CTRL-EVENT-BEACON-LOSS
Dez 03 12:22:51 IdeaPad5 wpa_supplicant[851]: wlan0: CTRL-EVENT-BEACON-LOSS
Dez 03 12:22:52 IdeaPad5 wpa_supplicant[851]: wlan0: CTRL-EVENT-BEACON-LOSS
Dez 03 12:22:53 IdeaPad5 wpa_supplicant[851]: wlan0: CTRL-EVENT-BEACON-LOSS
Dez 03 12:22:54 IdeaPad5 wpa_supplicant[851]: wlan0: CTRL-EVENT-BEACON-LOSS
Dez 03 12:22:55 IdeaPad5 wpa_supplicant[851]: wlan0: CTRL-EVENT-BEACON-LOSS
Dez 03 12:22:56 IdeaPad5 wpa_supplicant[851]: wlan0: CTRL-EVENT-BEACON-LOSS
Dez 03 12:22:57 IdeaPad5 wpa_supplicant[851]: wlan0: CTRL-EVENT-BEACON-LOSS
Dez 03 12:22:58 IdeaPad5 wpa_supplicant[851]: wlan0: CTRL-EVENT-BEACON-LOSS
Dez 03 12:22:59 IdeaPad5 wpa_supplicant[851]: wlan0: CTRL-EVENT-BEACON-LOSS
Dez 03 12:23:00 IdeaPad5 wpa_supplicant[851]: wlan0: CTRL-EVENT-BEACON-LOSS
Dez 03 12:23:01 IdeaPad5 wpa_supplicant[851]: wlan0: CTRL-EVENT-BEACON-LOSS
Dez 03 12:23:02 IdeaPad5 wpa_supplicant[851]: wlan0: CTRL-EVENT-BEACON-LOSS
Dez 03 12:23:03 IdeaPad5 wpa_supplicant[851]: wlan0: CTRL-EVENT-BEACON-LOSS
Dez 03 12:23:04 IdeaPad5 mullvad-daemon[626]: [mullvad_daemon::management_interface][DEBUG] get_tunnel_state
Dez 03 12:23:04 IdeaPad5 wpa_supplicant[851]: wlan0: CTRL-EVENT-BEACON-LOSS
Dez 03 12:23:05 IdeaPad5 wpa_supplicant[851]: wlan0: CTRL-EVENT-BEACON-LOSS
Dez 03 12:23:06 IdeaPad5 wpa_supplicant[851]: wlan0: CTRL-EVENT-BEACON-LOSS
Dez 03 12:23:07 IdeaPad5 wpa_supplicant[851]: wlan0: CTRL-EVENT-BEACON-LOSS
Dez 03 12:23:08 IdeaPad5 wpa_supplicant[851]: wlan0: CTRL-EVENT-BEACON-LOSS
Dez 03 12:23:09 IdeaPad5 wpa_supplicant[851]: wlan0: CTRL-EVENT-BEACON-LOSS
Dez 03 12:23:10 IdeaPad5 wpa_supplicant[851]: wlan0: CTRL-EVENT-BEACON-LOSS
Dez 03 12:23:11 IdeaPad5 wpa_supplicant[851]: wlan0: CTRL-EVENT-BEACON-LOSS
Dez 03 12:23:12 IdeaPad5 wpa_supplicant[851]: wlan0: CTRL-EVENT-BEACON-LOSS
Dez 03 12:23:13 IdeaPad5 wpa_supplicant[851]: wlan0: CTRL-EVENT-BEACON-LOSS
Dez 03 12:23:14 IdeaPad5 wpa_supplicant[851]: wlan0: CTRL-EVENT-BEACON-LOSS
Dez 03 12:23:15 IdeaPad5 wpa_supplicant[851]: wlan0: CTRL-EVENT-BEACON-LOSS
Dez 03 12:23:16 IdeaPad5 wpa_supplicant[851]: wlan0: CTRL-EVENT-BEACON-LOSS
Dez 03 12:23:17 IdeaPad5 wpa_supplicant[851]: wlan0: CTRL-EVENT-BEACON-LOSS
Dez 03 12:23:18 IdeaPad5 wpa_supplicant[851]: wlan0: CTRL-EVENT-BEACON-LOSS
Dez 03 12:23:19 IdeaPad5 mullvad-daemon[626]: [mullvad_daemon::management_interface][DEBUG] get_tunnel_state
Dez 03 12:23:19 IdeaPad5 wpa_supplicant[851]: wlan0: CTRL-EVENT-BEACON-LOSS
Dez 03 12:23:20 IdeaPad5 wpa_supplicant[851]: wlan0: CTRL-EVENT-BEACON-LOSS
Dez 03 12:23:21 IdeaPad5 wpa_supplicant[851]: wlan0: CTRL-EVENT-BEACON-LOSS
Dez 03 12:23:22 IdeaPad5 wpa_supplicant[851]: wlan0: CTRL-EVENT-BEACON-LOSS
^C

Now, weirdly enough, my wifi is working pretty well right now, with tlp.service enabled and with wpa_supplicant throwing all of these messages per second. Then again, I’m connected to my home network at the moment and can’t test how it’s going at work until Monday.

I’d appreciate if someone could help me out here, because I’m really stumped by this issue:

  • What are these wpa_supplicant messages?
  • Why is my wifi randomly dropping?
  • How can I check for specific error or system messages about this issue?
  • What can I do about it?
System info:
$ systeminfo
System:
  Kernel: 6.0.10-arch2-1 arch: x86_64 bits: 64 compiler: gcc v: 12.2.0
    parameters: BOOT_IMAGE=/boot/vmlinuz-linux
    root=UUID=7f670695-4701-44f7-ae63-99376d20b5ce rw quiet loglevel=3
    nowatchdog nvme_load=YES
  Desktop: i3 v: 4.21.1 info: polybar vt: 1 dm: SDDM Distro: EndeavourOS
    base: Arch Linux
Machine:
  Type: Laptop System: LENOVO product: 82LM v: IdeaPad 5 14ALC05
    serial: <superuser required> Chassis: type: 10 v: IdeaPad 5 14ALC05
    serial: <superuser required>
  Mobo: LENOVO model: LNVNB161216 v: SDK0J40709 WIN
    serial: <superuser required> UEFI: LENOVO v: G5CN20WW(V1.08) date: 06/30/2021
Battery:
  ID-1: BAT1 charge: 27.4 Wh (52.9%) condition: 51.8/56.5 Wh (91.6%)
    volts: 11.3 min: 11.5 model: 0x53 0x4D 0x50 0x00 0x32 0x30 0x 0x4C 0x31
    0x39 0x4D 0x33 0x50 0x5650 type: Li-ion serial: <filter>
    status: discharging cycles: 98
Memory:
  RAM: total: 14.97 GiB used: 2.95 GiB (19.7%)
  RAM Report: permissions: Unable to run dmidecode. Root privileges required.
CPU:
  Info: model: AMD Ryzen 5 5500U with Radeon Graphics bits: 64 type: MT MCP
    arch: Zen 2 gen: 3 level: v3 note: check built: 2020-22
    process: TSMC n7 (7nm) family: 0x17 (23) model-id: 0x68 (104) stepping: 1
    microcode: 0x8608103
  Topology: cpus: 1x cores: 6 tpc: 2 threads: 12 smt: enabled cache:
    L1: 384 KiB desc: d-6x32 KiB; i-6x32 KiB L2: 3 MiB desc: 6x512 KiB L3: 8 MiB
    desc: 2x4 MiB
  Speed (MHz): avg: 1564 high: 2544 min/max: 1400/4056 boost: enabled
    scaling: driver: acpi-cpufreq governor: schedutil cores: 1: 1397 2: 1397
    3: 1400 4: 1397 5: 1397 6: 1400 7: 1565 8: 1416 9: 1400 10: 2544 11: 1869
    12: 1597 bogomips: 50322
  Flags: 3dnowprefetch abm adx aes aperfmperf apic arat avic avx avx2 bmi1
    bmi2 bpext cat_l3 cdp_l3 clflush clflushopt clwb clzero cmov cmp_legacy
    constant_tsc cpb cppc cpuid cqm cqm_llc cqm_mbm_local cqm_mbm_total
    cqm_occup_llc cr8_legacy cx16 cx8 de decodeassists extapic extd_apicid
    f16c flushbyasid fma fpu fsgsbase fxsr fxsr_opt ht hw_pstate ibpb ibrs ibs
    irperf lahf_lm lbrv lm mba mca mce misalignsse mmx mmxext monitor movbe
    msr mtrr mwaitx nonstop_tsc nopl npt nrip_save nx osvw overflow_recov pae
    pat pausefilter pclmulqdq pdpe1gb perfctr_core perfctr_llc perfctr_nb
    pfthreshold pge pni popcnt pse pse36 rapl rdpid rdpru rdrand rdseed rdt_a
    rdtscp rep_good sep sha_ni skinit smap smca smep ssbd sse sse2 sse4_1
    sse4_2 sse4a ssse3 stibp succor svm svm_lock syscall tce topoext tsc
    tsc_scale umip v_spec_ctrl v_vmsave_vmload vgif vmcb_clean vme vmmcall
    wbnoinvd wdt xgetbv1 xsave xsavec xsaveerptr xsaveopt xsaves
  Vulnerabilities:
  Type: itlb_multihit status: Not affected
  Type: l1tf status: Not affected
  Type: mds status: Not affected
  Type: meltdown status: Not affected
  Type: mmio_stale_data status: Not affected
  Type: retbleed mitigation: untrained return thunk; SMT enabled with STIBP
    protection
  Type: spec_store_bypass mitigation: Speculative Store Bypass disabled via
    prctl
  Type: spectre_v1 mitigation: usercopy/swapgs barriers and __user pointer
    sanitization
  Type: spectre_v2 mitigation: Retpolines, IBPB: conditional, STIBP:
    always-on, RSB filling, PBRSB-eIBRS: Not affected
  Type: srbds status: Not affected
  Type: tsx_async_abort status: Not affected
Graphics:
  Device-1: AMD Lucienne vendor: Lenovo driver: amdgpu v: kernel arch: GCN-5.1
    code: Vega-2 process: TSMC n7 (7nm) built: 2018-21 pcie: gen: 3 speed: 8 GT/s
    lanes: 16 link-max: gen: 4 speed: 16 GT/s ports: active: eDP-1
    empty: DP-1,HDMI-A-1 bus-ID: 04:00.0 chip-ID: 1002:164c class-ID: 0300
    temp: 40.0 C
  Device-2: Syntek Integrated Camera type: USB driver: uvcvideo bus-ID: 1-3:2
    chip-ID: 174f:2459 class-ID: fe01 serial: <filter>
  Display: x11 server: X.Org v: 21.1.4 compositor: Picom v: git-e3c19 driver:
    X: loaded: amdgpu unloaded: modesetting alternate: fbdev,vesa dri: radeonsi
    gpu: amdgpu display-ID: :0 screens: 1
  Screen-1: 0 s-res: 1920x1080 s-dpi: 96 s-size: 508x285mm (20.00x11.22")
    s-diag: 582mm (22.93")
  Monitor-1: eDP-1 mapped: eDP model: AU Optronics 0x408d built: 2019
    res: 1920x1080 hz: 60 dpi: 158 gamma: 1.2 size: 309x174mm (12.17x6.85")
    diag: 355mm (14") ratio: 16:9 modes: max: 1920x1080 min: 640x480
  API: OpenGL v: 4.6 Mesa 22.2.3 renderer: AMD Radeon Graphics (renoir LLVM
    14.0.6 DRM 3.48 6.0.10-arch2-1) direct render: Yes
Audio:
  Device-1: AMD Renoir Radeon High Definition Audio vendor: Lenovo
    driver: snd_hda_intel v: kernel pcie: gen: 3 speed: 8 GT/s lanes: 16
    link-max: gen: 4 speed: 16 GT/s bus-ID: 04:00.1 chip-ID: 1002:1637
    class-ID: 0403
  Device-2: AMD ACP/ACP3X/ACP6x Audio Coprocessor vendor: Lenovo
    driver: snd_rn_pci_acp3x v: kernel
    alternate: snd_pci_acp3x,snd_pci_acp5x,snd_pci_acp6x,snd_acp_pci,snd_rpl_pci_acp6x,snd_sof_amd_renoir
    pcie: gen: 3 speed: 8 GT/s lanes: 16 link-max: gen: 4 speed: 16 GT/s
    bus-ID: 04:00.5 chip-ID: 1022:15e2 class-ID: 0480
  Device-3: AMD Family 17h/19h HD Audio vendor: Lenovo driver: snd_hda_intel
    v: kernel pcie: gen: 3 speed: 8 GT/s lanes: 16 link-max: gen: 4
    speed: 16 GT/s bus-ID: 04:00.6 chip-ID: 1022:15e3 class-ID: 0403
  Sound API: ALSA v: k6.0.10-arch2-1 running: yes
  Sound Server-1: PulseAudio v: 16.1 running: no
  Sound Server-2: PipeWire v: 0.3.61 running: yes
Network:
  Device-1: Realtek RTL8852AE 802.11ax PCIe Wireless Network Adapter
    vendor: Lenovo driver: rtw89_8852ae v: kernel pcie: gen: 1 speed: 2.5 GT/s
    lanes: 1 port: 2000 bus-ID: 03:00.0 chip-ID: 10ec:8852 class-ID: 0280
  IF: wlan0 state: up mac: <filter>
  IP v4: <filter> type: dynamic noprefixroute scope: global
    broadcast: <filter>
  IP v6: <filter> type: dynamic noprefixroute scope: global
  IP v6: <filter> type: noprefixroute scope: link
  IF-ID-1: wg-mullvad state: unknown speed: N/A duplex: N/A mac: N/A
  IP v4: <filter> scope: global
  IP v6: <filter> scope: global
  WAN IP: <filter>
Bluetooth:
  Device-1: Realtek Bluetooth Radio type: USB driver: btusb v: 0.8
    bus-ID: 3-4:3 chip-ID: 0bda:4852 class-ID: e001 serial: <filter>
  Report: rfkill ID: hci0 rfk-id: 3 state: up address: see --recommends
Logical:
  Message: No logical block device data found.
RAID:
  Message: No RAID data found.
Drives:
  Local Storage: total: 476.94 GiB used: 179.99 GiB (37.7%)
  SMART Message: Unable to run smartctl. Root privileges required.
  ID-1: /dev/nvme0n1 maj-min: 259:0 vendor: Western Digital model: PC SN730
    SDBPNTY-512G-1101 size: 476.94 GiB block-size: physical: 512 B
    logical: 512 B speed: 31.6 Gb/s lanes: 4 type: SSD serial: <filter>
    rev: 11190001 temp: 38.9 C scheme: GPT
  Message: No optical or floppy data found.
Partition:
  ID-1: / raw-size: 390.62 GiB size: 383.43 GiB (98.16%)
    used: 179.96 GiB (46.9%) fs: ext4 dev: /dev/nvme0n1p5 maj-min: 259:5
    label: N/A uuid: 7f670695-4701-44f7-ae63-99376d20b5ce
  ID-2: /boot/efi raw-size: 260 MiB size: 256 MiB (98.46%)
    used: 28.8 MiB (11.2%) fs: vfat dev: /dev/nvme0n1p1 maj-min: 259:1
    label: SYSTEM_DRV uuid: 3828-0EFF
Swap:
  Kernel: swappiness: 60 (default) cache-pressure: 100 (default)
  ID-1: swap-1 type: file size: 16 GiB used: 0 KiB (0.0%) priority: -2
    file: /swapfile
Unmounted:
  ID-1: /dev/nvme0n1p2 maj-min: 259:2 size: 16 MiB fs: <superuser required>
    label: N/A uuid: N/A
  ID-2: /dev/nvme0n1p3 maj-min: 259:3 size: 85.07 GiB fs: ntfs
    label: Windows-SSD uuid: 6828297728294602
  ID-3: /dev/nvme0n1p4 maj-min: 259:4 size: 1000 MiB fs: ntfs
    label: WINRE_DRV uuid: 1C2229E72229C69C
USB:
  Hub-1: 1-0:1 info: Hi-speed hub with single TT ports: 4 rev: 2.0
    speed: 480 Mb/s chip-ID: 1d6b:0002 class-ID: 0900
  Device-1: 1-3:2 info: Syntek Integrated Camera type: Video driver: uvcvideo
    interfaces: 3 rev: 2.0 speed: 480 Mb/s power: 500mA chip-ID: 174f:2459
    class-ID: fe01 serial: <filter>
  Hub-2: 2-0:1 info: Super-speed hub ports: 2 rev: 3.1 speed: 10 Gb/s
    chip-ID: 1d6b:0003 class-ID: 0900
  Hub-3: 3-0:1 info: Hi-speed hub with single TT ports: 4 rev: 2.0
    speed: 480 Mb/s chip-ID: 1d6b:0002 class-ID: 0900
  Device-1: 3-3:2 info: Shenzhen Goodix FingerPrint Device
    type: <vendor specific> driver: N/A interfaces: 1 rev: 2.0 speed: 480 Mb/s
    power: 100mA chip-ID: 27c6:55a2 class-ID: ef00
  Device-2: 3-4:3 info: Realtek Bluetooth Radio type: Bluetooth driver: btusb
    interfaces: 2 rev: 1.0 speed: 12 Mb/s power: 500mA chip-ID: 0bda:4852
    class-ID: e001 serial: <filter>
  Hub-4: 4-0:1 info: Super-speed hub ports: 2 rev: 3.1 speed: 10 Gb/s
    chip-ID: 1d6b:0003 class-ID: 0900
Sensors:
  System Temperatures: cpu: 44.1 C mobo: N/A gpu: amdgpu temp: 40.0 C
  Fan Speeds (RPM): N/A
Info:
  Processes: 275 Uptime: 17m wakeups: 3983 Init: systemd v: 252
  default: graphical tool: systemctl Compilers: gcc: 12.2.0 clang: 14.0.6
  Packages: pm: pacman pkgs: 1519 libs: 352 tools: paru,yay Shell: Bash
  v: 5.1.16 running-in: alacritty inxi: 3.3.23

Did you reinstall power-profiles-daemon and start/enable it as a service again, after uninstalling TLP? According to the Arch Linux TLP installation guide, there may be more steps than the one mentioned by me, that need to be reverted whan uninstalling TLP: Unmask systemd-rfkill.service and systemd-rfkill.socket, potentially… (see the documentation).