You are not logged in.

#1 2021-06-06 11:16:33

zxip
Member
Registered: 2019-11-08
Posts: 10

Wifi periodically disconnects

Hi all,

a few weeks ago my wifi connection started periodically disconnecting. I did not change any configs, this might have started after an update.
I'm using the interface specific wpa_supplicant and dhcpcd services for network connectivity.
According to the wpa_suppcliant logs, it keeps disconnecting with reason code 4, which is Disassociated due to inactivity.
I'm dual booting windows for games and on my windows install this does not happen, so it's probably not the AP.

I would appreciate any help, thanks in advance.

=== EDIT
Also, the systemd-networkd-wait-online service fails on boot

× systemd-networkd-wait-online.service - Wait for Network to be Configured
     Loaded: loaded (/usr/lib/systemd/system/systemd-networkd-wait-online.service; enabled; vendor preset: disabled)
     Active: failed (Result: exit-code) since Sun 2021-06-06 10:55:49 CEST; 2h 25min ago
       Docs: man:systemd-networkd-wait-online.service(8)
    Process: 370 ExecStart=/usr/lib/systemd/systemd-networkd-wait-online (code=exited, status=1/FAILURE)
   Main PID: 370 (code=exited, status=1/FAILURE)
        CPU: 7ms

Jun 06 10:53:48 desktop systemd[1]: Starting Wait for Network to be Configured...
Jun 06 10:55:49 desktop systemd-networkd-wait-online[370]: Event loop failed: Connection timed out
Jun 06 10:55:49 desktop systemd[1]: systemd-networkd-wait-online.service: Main process exited, code=exited, status=1/FAILURE
Jun 06 10:55:49 desktop systemd[1]: systemd-networkd-wait-online.service: Failed with result 'exit-code'.
Jun 06 10:55:49 desktop systemd[1]: Failed to start Wait for Network to be Configured.

===

wpa_supplicant logs

Jun 06 10:53:50 desktop wpa_supplicant[517]: Successfully initialized wpa_supplicant
Jun 06 10:53:51 desktop wpa_supplicant[517]: wlo1: SME: Trying to authenticate with XX:XX:XX:XX:XX:XX (SSID='YYYYYYY' freq=2462 MHz)
Jun 06 10:53:51 desktop wpa_supplicant[517]: wlo1: Trying to associate with XX:XX:XX:XX:XX:XX (SSID='YYYYYYY' freq=2462 MHz)
Jun 06 10:53:51 desktop wpa_supplicant[517]: wlo1: Associated with XX:XX:XX:XX:XX:XX
Jun 06 10:53:51 desktop wpa_supplicant[517]: wlo1: CTRL-EVENT-SUBNET-STATUS-UPDATE status=0
Jun 06 10:53:51 desktop wpa_supplicant[517]: wlo1: WPA: Key negotiation completed with XX:XX:XX:XX:XX:XX [PTK=CCMP GTK=CCMP]
Jun 06 10:53:51 desktop wpa_supplicant[517]: wlo1: CTRL-EVENT-CONNECTED - Connection to XX:XX:XX:XX:XX:XX completed [id=2 id_str=]
Jun 06 11:45:10 desktop wpa_supplicant[517]: wlo1: CTRL-EVENT-BEACON-LOSS
Jun 06 11:45:11 desktop wpa_supplicant[517]: wlo1: CTRL-EVENT-DISCONNECTED bssid=XX:XX:XX:XX:XX:XX reason=4 locally_generated=1
Jun 06 11:45:11 desktop wpa_supplicant[517]: wlo1: CTRL-EVENT-REGDOM-CHANGE init=CORE type=WORLD
Jun 06 11:45:12 desktop wpa_supplicant[517]: wlo1: SME: Trying to authenticate with XX:XX:XX:XX:XX:XX (SSID='YYYYYYY' freq=2462 MHz)
Jun 06 11:45:12 desktop wpa_supplicant[517]: wlo1: Trying to associate with XX:XX:XX:XX:XX:XX (SSID='YYYYYYY' freq=2462 MHz)
Jun 06 11:45:12 desktop wpa_supplicant[517]: wlo1: Associated with XX:XX:XX:XX:XX:XX
Jun 06 11:45:12 desktop wpa_supplicant[517]: wlo1: CTRL-EVENT-SUBNET-STATUS-UPDATE status=0
Jun 06 11:45:12 desktop wpa_supplicant[517]: wlo1: WPA: Key negotiation completed with XX:XX:XX:XX:XX:XX [PTK=CCMP GTK=CCMP]
Jun 06 11:45:12 desktop wpa_supplicant[517]: wlo1: CTRL-EVENT-CONNECTED - Connection to XX:XX:XX:XX:XX:XX completed [id=2 id_str=]
Jun 06 12:10:09 desktop wpa_supplicant[517]: wlo1: CTRL-EVENT-BEACON-LOSS
Jun 06 12:10:10 desktop wpa_supplicant[517]: wlo1: CTRL-EVENT-DISCONNECTED bssid=XX:XX:XX:XX:XX:XX reason=4 locally_generated=1
Jun 06 12:10:10 desktop wpa_supplicant[517]: wlo1: CTRL-EVENT-REGDOM-CHANGE init=CORE type=WORLD
Jun 06 12:10:11 desktop wpa_supplicant[517]: wlo1: SME: Trying to authenticate with XX:XX:XX:XX:XX:XX (SSID='YYYYYYY' freq=2462 MHz)
Jun 06 12:10:11 desktop wpa_supplicant[517]: wlo1: Trying to associate with XX:XX:XX:XX:XX:XX (SSID='YYYYYYY' freq=2462 MHz)
Jun 06 12:10:11 desktop wpa_supplicant[517]: wlo1: Associated with XX:XX:XX:XX:XX:XX
Jun 06 12:10:11 desktop wpa_supplicant[517]: wlo1: CTRL-EVENT-SUBNET-STATUS-UPDATE status=0
Jun 06 12:10:11 desktop wpa_supplicant[517]: wlo1: WPA: Key negotiation completed with XX:XX:XX:XX:XX:XX [PTK=CCMP GTK=CCMP]
Jun 06 12:10:11 desktop wpa_supplicant[517]: wlo1: CTRL-EVENT-CONNECTED - Connection to XX:XX:XX:XX:XX:XX completed [id=2 id_str=]
Jun 06 12:12:45 desktop wpa_supplicant[517]: wlo1: CTRL-EVENT-BEACON-LOSS
Jun 06 12:21:09 desktop wpa_supplicant[517]: wlo1: CTRL-EVENT-BEACON-LOSS
Jun 06 12:21:10 desktop wpa_supplicant[517]: wlo1: CTRL-EVENT-DISCONNECTED bssid=XX:XX:XX:XX:XX:XX reason=4 locally_generated=1
Jun 06 12:21:10 desktop wpa_supplicant[517]: wlo1: CTRL-EVENT-REGDOM-CHANGE init=CORE type=WORLD
Jun 06 12:21:11 desktop wpa_supplicant[517]: wlo1: SME: Trying to authenticate with XX:XX:XX:XX:XX:XX (SSID='YYYYYYY' freq=2462 MHz)
Jun 06 12:21:11 desktop wpa_supplicant[517]: wlo1: Trying to associate with XX:XX:XX:XX:XX:XX (SSID='YYYYYYY' freq=2462 MHz)
Jun 06 12:21:11 desktop wpa_supplicant[517]: wlo1: Associated with XX:XX:XX:XX:XX:XX
Jun 06 12:21:11 desktop wpa_supplicant[517]: wlo1: CTRL-EVENT-SUBNET-STATUS-UPDATE status=0
Jun 06 12:21:11 desktop wpa_supplicant[517]: wlo1: WPA: Key negotiation completed with XX:XX:XX:XX:XX:XX [PTK=CCMP GTK=CCMP]
Jun 06 12:21:11 desktop wpa_supplicant[517]: wlo1: CTRL-EVENT-CONNECTED - Connection to XX:XX:XX:XX:XX:XX completed [id=2 id_str=]

Kernel logs

Jun 06 12:22:07 desktop kernel: wlo1: AP XX:XX:XX:XX:XX:XX changed bandwidth, new config is 2462.000 MHz, width 1 (2462.000/0 MHz)
Jun 06 12:22:10 desktop kernel: wlo1: AP XX:XX:XX:XX:XX:XX changed bandwidth, new config is 2462.000 MHz, width 2 (2452.000/0 MHz)
Jun 06 12:23:07 desktop kernel: wlo1: AP XX:XX:XX:XX:XX:XX changed bandwidth, new config is 2462.000 MHz, width 1 (2462.000/0 MHz)
Jun 06 12:23:08 desktop kernel: wlo1: AP XX:XX:XX:XX:XX:XX changed bandwidth, new config is 2462.000 MHz, width 2 (2452.000/0 MHz)
Jun 06 12:24:07 desktop kernel: wlo1: AP XX:XX:XX:XX:XX:XX changed bandwidth, new config is 2462.000 MHz, width 1 (2462.000/0 MHz)
Jun 06 12:24:08 desktop kernel: wlo1: AP XX:XX:XX:XX:XX:XX changed bandwidth, new config is 2462.000 MHz, width 2 (2452.000/0 MHz)
Jun 06 12:25:07 desktop kernel: wlo1: AP XX:XX:XX:XX:XX:XX changed bandwidth, new config is 2462.000 MHz, width 1 (2462.000/0 MHz)
Jun 06 12:25:08 desktop kernel: wlo1: AP XX:XX:XX:XX:XX:XX changed bandwidth, new config is 2462.000 MHz, width 2 (2452.000/0 MHz)
Jun 06 12:26:07 desktop kernel: wlo1: AP XX:XX:XX:XX:XX:XX changed bandwidth, new config is 2462.000 MHz, width 1 (2462.000/0 MHz)
Jun 06 12:26:09 desktop kernel: wlo1: AP XX:XX:XX:XX:XX:XX changed bandwidth, new config is 2462.000 MHz, width 2 (2452.000/0 MHz)

Network Adapter

21:00.0 Network controller: Qualcomm Atheros AR9287 Wireless Network Adapter (PCI-Express) (rev 01)
	DeviceName: Broadcom 5762
	Subsystem: Qualcomm Atheros Device 30a4
	Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
	Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
	Latency: 0, Cache Line Size: 64 bytes
	Interrupt: pin A routed to IRQ 34
	IOMMU group: 15
	Region 0: Memory at f7600000 (64-bit, non-prefetchable) [size=64K]
	Capabilities: [40] Power Management version 3
		Flags: PMEClk- DSI- D1+ D2- AuxCurrent=375mA PME(D0+,D1+,D2-,D3hot+,D3cold-)
		Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-
	Capabilities: [50] MSI: Enable- Count=1/1 Maskable- 64bit-
		Address: 00000000  Data: 0000
	Capabilities: [60] Express (v2) Legacy Endpoint, MSI 00
		DevCap:	MaxPayload 128 bytes, PhantFunc 0, Latency L0s <512ns, L1 <64us
			ExtTag- AttnBtn- AttnInd- PwrInd- RBE+ FLReset-
		DevCtl:	CorrErr- NonFatalErr- FatalErr- UnsupReq-
			RlxdOrd+ ExtTag- PhantFunc- AuxPwr- NoSnoop-
			MaxPayload 128 bytes, MaxReadReq 512 bytes
		DevSta:	CorrErr- NonFatalErr- FatalErr- UnsupReq- AuxPwr- TransPend-
		LnkCap:	Port #0, Speed 2.5GT/s, Width x1, ASPM L0s L1, Exit Latency L0s <512ns, L1 <64us
			ClockPM- Surprise- LLActRep- BwNot- ASPMOptComp-
		LnkCtl:	ASPM Disabled; RCB 64 bytes, Disabled- CommClk+
			ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
		LnkSta:	Speed 2.5GT/s (ok), Width x1 (ok)
			TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt-
		DevCap2: Completion Timeout: Not Supported, TimeoutDis+ NROPrPrP- LTR-
			 10BitTagComp- 10BitTagReq- OBFF Not Supported, ExtFmt- EETLPPrefix-
			 EmergencyPowerReduction Not Supported, EmergencyPowerReductionInit-
			 FRS-
			 AtomicOpsCap: 32bit- 64bit- 128bitCAS-
		DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis- LTR- OBFF Disabled,
			 AtomicOpsCtl: ReqEn-
		LnkCtl2: Target Link Speed: 2.5GT/s, EnterCompliance- SpeedDis-
			 Transmit Margin: Normal Operating Range, EnterModifiedCompliance- ComplianceSOS-
			 Compliance De-emphasis: -6dB
		LnkSta2: Current De-emphasis Level: -6dB, EqualizationComplete- EqualizationPhase1-
			 EqualizationPhase2- EqualizationPhase3- LinkEqualizationRequest-
			 Retimer- 2Retimers- CrosslinkRes: unsupported
	Capabilities: [100 v1] Advanced Error Reporting
		UESta:	DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
		UEMsk:	DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
		UESvrt:	DLP+ SDES+ TLP- FCP+ CmpltTO- CmpltAbrt- UnxCmplt- RxOF+ MalfTLP+ ECRC- UnsupReq- ACSViol-
		CESta:	RxErr- BadTLP- BadDLLP- Rollover- Timeout- AdvNonFatalErr-
		CEMsk:	RxErr- BadTLP- BadDLLP- Rollover- Timeout- AdvNonFatalErr+
		AERCap:	First Error Pointer: 00, ECRCGenCap+ ECRCGenEn- ECRCChkCap+ ECRCChkEn-
			MultHdrRecCap- MultHdrRecEn- TLPPfxPres- HdrLogCap-
		HeaderLog: 00000000 00000000 00000000 00000000
	Capabilities: [140 v1] Virtual Channel
		Caps:	LPEVC=0 RefClk=100ns PATEntryBits=1
		Arb:	Fixed- WRR32- WRR64- WRR128-
		Ctrl:	ArbSelect=Fixed
		Status:	InProgress-
		VC0:	Caps:	PATOffset=00 MaxTimeSlots=1 RejSnoopTrans-
			Arb:	Fixed- WRR32- WRR64- WRR128- TWRR128- WRR256-
			Ctrl:	Enable+ ID=0 ArbSelect=Fixed TC/VC=01
			Status:	NegoPending- InProgress-
	Capabilities: [160 v1] Device Serial Number 00-15-17-ff-ff-24-14-12
	Capabilities: [170 v1] Power Budgeting <?>
	Kernel driver in use: ath9k
	Kernel modules: ath9k

wpa_supplicant config

ctrl_interface=/run/wpa_supplicant
update_config=1

country=DE

network={
        ssid="YYYYYYY"
        #psk="XXXXXXXXXXXXX"
        psk=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
}

Last edited by zxip (2021-06-06 11:22:13)

Offline

#2 2021-06-06 12:48:21

seth
Member
Registered: 2012-09-03
Posts: 51,460

Re: Wifi periodically disconnects

using the interface specific wpa_supplicant and dhcpcd services

systemd-networkd-wait-online

Network controller: Qualcomm Atheros AR9287 Wireless Network Adapter (PCI-Express) (rev 01)
…?

Sanity check:

find /etc/systemd -type l -exec test -f {} \; -print | awk -F'/' '{ printf ("%-40s | %s\n", $(NF-0), $(NF-1)) }' | sort -f

I'm dual booting windows

See the 3rd link below.

Online

#3 2021-06-06 12:53:36

zxip
Member
Registered: 2019-11-08
Posts: 10

Re: Wifi periodically disconnects

Command output

 ~ > find /etc/systemd -type l -exec test -f {} \; -print | awk -F'/' '{ printf ("%-40s | %s\n", $(NF-0), $(NF-1)) }' | sort -f
dbus-org.freedesktop.network1.service    | system
dbus-org.freedesktop.resolve1.service    | system
dhcpcd@wlo1.service                      | multi-user.target.wants
dirmngr.socket                           | sockets.target.wants
getty@tty1.service                       | getty.target.wants
gpg-agent-browser.socket                 | sockets.target.wants
gpg-agent-extra.socket                   | sockets.target.wants
gpg-agent.socket                         | sockets.target.wants
gpg-agent-ssh.socket                     | sockets.target.wants
lm_sensors.service                       | multi-user.target.wants
lxd.service                              | multi-user.target.wants
p11-kit-server.socket                    | sockets.target.wants
pipewire.socket                          | sockets.target.wants
pulseaudio.socket                        | sockets.target.wants
remote-fs.target                         | multi-user.target.wants
systemd-networkd.service                 | multi-user.target.wants
systemd-networkd.socket                  | sockets.target.wants
systemd-networkd-wait-online.service     | network-online.target.wants
systemd-resolved.service                 | multi-user.target.wants
var-lib-snapd-snap-core18-1668.mount     | multi-user.target.wants
var-lib-snapd-snap-core-8268.mount       | multi-user.target.wants
var-lib-snapd-snap-core-8689.mount       | multi-user.target.wants
wpa_supplicant@wlo1.service              | multi-user.target.wants

Offline

#4 2021-06-06 13:00:43

seth
Member
Registered: 2012-09-03
Posts: 51,460

Re: Wifi periodically disconnects

dhcpcd@wlo1.service                      | multi-user.target.wants
systemd-networkd.service                 | multi-user.target.wants
wpa_supplicant@wlo1.service              | multi-user.target.wants

WYj7DH.gif

Drop systemd-networkd and replace the wpa_supplicant service w/ a dhcpcd hook, https://wiki.archlinux.org/title/Dhcpcd … supplicant

Online

#5 2021-06-06 13:22:48

zxip
Member
Registered: 2019-11-08
Posts: 10

Re: Wifi periodically disconnects

seth wrote:

Drop systemd-networkd and replace the wpa_supplicant service w/ a dhcpcd hook, https://wiki.archlinux.org/title/Dhcpcd … supplicant

Just did this.
Unless it's default, I didn't enable systemd-networkd. Maybe it's LXD. I just noticed that LXD also seems to start dnsmasq.

seth wrote:

See the 3rd link below.

The setting to disable fast boot was missing in my power options, but i disabled it via a registry key. And via powercfg \h off in poweshell. I'm hoping that did something.

I'll report back after a while to check wether my wifi still drops.

EDIT:
Connection just dropped again

Now that wpa_supplicant is started via dhcpcd I don't know where to find the log.

dhcpcd log:

Jun 06 15:14:08 desktop systemd[1]: Starting dhcpcd on wlo1...
Jun 06 15:14:08 desktop dhcpcd[9275]: dhcpcd-9.4.0 starting
Jun 06 15:14:08 desktop dhcpcd[9278]: DUID XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX
Jun 06 15:14:08 desktop dhcpcd[9275]: wlo1: starting wpa_supplicant
Jun 06 15:14:08 desktop dhcpcd[9278]: wlo1: waiting for carrier
Jun 06 15:14:09 desktop dhcpcd[9278]: wlo1: carrier acquired
Jun 06 15:14:09 desktop dhcpcd[9278]: wlo1: connected to Access Point: YYYYYYY
Jun 06 15:14:09 desktop dhcpcd[9278]: wlo1: IAID XX:XX:XX:XX
Jun 06 15:14:09 desktop dhcpcd[9278]: wlo1: adding address fe80::311d:6bb8:d666:538a
Jun 06 15:14:10 desktop dhcpcd[9278]: wlo1: soliciting an IPv6 router
Jun 06 15:14:10 desktop dhcpcd[9278]: wlo1: rebinding lease of 192.168.0.231
Jun 06 15:14:10 desktop dhcpcd[9278]: wlo1: probing address 192.168.0.231/24
Jun 06 15:14:15 desktop dhcpcd[9278]: wlo1: leased 192.168.0.231 for 604800 seconds
Jun 06 15:14:15 desktop dhcpcd[9278]: wlo1: adding route to 192.168.0.0/24
Jun 06 15:14:15 desktop dhcpcd[9278]: wlo1: adding default route via 192.168.0.1
Jun 06 15:14:15 desktop systemd[1]: Started dhcpcd on wlo1.
Jun 06 15:14:23 desktop dhcpcd[9278]: wlo1: no IPv6 Routers available
Jun 06 15:41:15 desktop dhcpcd[9278]: wlo1: carrier lost
Jun 06 15:41:15 desktop dhcpcd[9278]: wlo1: deleting address fe80::311d:6bb8:d666:538a
Jun 06 15:41:15 desktop dhcpcd[9278]: wlo1: deleting route to 192.168.0.0/24
Jun 06 15:41:15 desktop dhcpcd[9278]: wlo1: deleting default route via 192.168.0.1
Jun 06 15:41:16 desktop dhcpcd[9278]: wlo1: carrier acquired
Jun 06 15:41:16 desktop dhcpcd[9278]: wlo1: IAID XX:XX:XX:XX
Jun 06 15:41:16 desktop dhcpcd[9278]: wlo1: adding address fe80::311d:6bb8:d666:538a
Jun 06 15:41:16 desktop dhcpcd[9278]: wlo1: rebinding lease of 192.168.0.231
Jun 06 15:41:16 desktop dhcpcd[9278]: wlo1: probing address 192.168.0.231/24
Jun 06 15:41:16 desktop dhcpcd[9278]: wlo1: soliciting an IPv6 router
Jun 06 15:41:21 desktop dhcpcd[9278]: wlo1: leased 192.168.0.231 for 604800 seconds
Jun 06 15:41:21 desktop dhcpcd[9278]: wlo1: adding route to 192.168.0.0/24
Jun 06 15:41:21 desktop dhcpcd[9278]: wlo1: adding default route via 192.168.0.1
Jun 06 15:41:30 desktop dhcpcd[9278]: wlo1: no IPv6 Routers available

Last edited by zxip (2021-06-06 13:52:33)

Offline

#6 2021-06-06 13:51:16

buzzwallard
Banned
Registered: 2021-05-29
Posts: 53

Re: Wifi periodically disconnects

And there's iwd

https://wiki.archlinux.org/title/Iwd

https://www.reddit.com/r/archlinux/comm … t_already/

I find it the simplest of all the wifi solutions. A bit wet behind the ears perhaps.. but it works well for my simple needs.

Last edited by buzzwallard (2021-06-06 14:23:57)

Offline

#7 2021-06-06 13:58:33

seth
Member
Registered: 2012-09-03
Posts: 51,460

Re: Wifi periodically disconnects

Please post the complete system journal. The MACs are not "private" unless you worry that someone might try to spoof them and you have a mac filter somewhere.
There should™ be no passwords (unless you did "sudo somethingsomething <use this password>" or similar.

Online

#8 2021-06-06 14:17:22

zxip
Member
Registered: 2019-11-08
Posts: 10

Re: Wifi periodically disconnects

seth wrote:

Please post the complete system journal.

username replaced with '<USERNAME>'
https://termbin.com/0ve1

Offline

Board footer

Powered by FluxBB