Wifi connection unstable

Kernels, Network, and Services configuration
Post Reply
Message
Author
dorcas_gustine
Posts: 3
Joined: 2021-08-01 17:10

Wifi connection unstable

#1 Post by dorcas_gustine »

Hello everyone,
I just moved from Buster to Bullseye updating the repos in sources.list / apt dist-upgrade / apt full-upgrade.
I don't know if it's the correct way to do that (I'm not very expertienced), but everything's seems to work just fine except for the wifi connection (eth connection works perfectly).
It seems that I can make small data exchange but nothing more.
Even with an apt update, the connection starts and, after a few seconds, it slows down and stops.
After it stops, sometimes I lost the connection, other times it starts to work (bad) again.

I've tried to:
disable ipv6 from /etc/sysctl.conf;
set country region with

Code: Select all

iw reg set
;
add

Code: Select all

options ath9k nohwcrypt=1 ps_enable=1 btcoex_enable=0
to /etc/modbrope.d/ath9k.conf.

Here are some system information
My machine is an Asus N550JK

uname -r

Code: Select all

5.10.0-8-amd64
lshw

Code: Select all

*-network
                description: Wireless interface
                product: AR9485 Wireless Network Adapter
                vendor: Qualcomm Atheros
                physical id: 0
                bus info: pci@0000:04:00.0
                logical name: wlp4s0
                version: 01
                serial: 54:27:1e:1f:b3:99
                width: 64 bits
                clock: 33MHz
                capabilities: pm msi pciexpress bus_master cap_list rom ethernet physical wireless
                configuration: broadcast=yes driver=ath9k driverversion=5.10.0-8-amd64 firmware=N/A ip=192.168.1.11 latency=0 link=yes multicast=yes wireless=IEEE 802.11
                resources: irq:18 memory:f7900000-f797ffff memory:f7980000-f798ffff
                
lsmod | grep wmi

Code: Select all

asus_nb_wmi            	32768  0
asus_wmi               		45056  1 asus_nb_wmi
sparse_keymap          	16384  1 asus_wmi
rfkill                 		28672  8 asus_wmi,bluetooth,cfg80211
mxm_wmi                	16384  1 nouveau
wmi                    		36864  3 asus_wmi,mxm_wmi,nouveau
video                  		53248  3 asus_wmi,i915,nouveau
battery                		20480  1 asus_wmi
And some log from dmesg relating to ath and wlp4s0

Code: Select all

[ 7435.932307] ath: phy0: DMA failed to stop in 10 ms AR_CR=0x00000024 AR_DIAG_SW=0x02000020 DMADBG_7=0x00006100
[ 7437.078003] wlp4s0: authenticate with e4:8f:34:d1:62:1c
[ 7437.097913] wlp4s0: send auth to e4:8f:34:d1:62:1c (try 1/3)
[ 7437.100478] wlp4s0: authenticated
[ 7437.104207] wlp4s0: associate with e4:8f:34:d1:62:1c (try 1/3)
[ 7437.108314] wlp4s0: RX AssocResp from e4:8f:34:d1:62:1c (capab=0x1411 status=0 aid=1)
[ 7437.108475] wlp4s0: associated
[ 7437.108772] ath: EEPROM regdomain: 0x817c
[ 7437.108777] ath: EEPROM indicates we should expect a country code
[ 7437.108780] ath: doing EEPROM country->regdmn map search
[ 7437.108783] ath: country maps to regdmn code: 0x37
[ 7437.108787] ath: Country alpha2 being used: IT
[ 7437.108791] ath: Regpair used: 0x37
[ 7437.108795] ath: regdomain 0x817c dynamically updated by country element
[ 7437.176174] wlp4s0: Limiting TX power to 20 (20 - 0) dBm as advertised by e4:8f:34:d1:62:1c
Thank you very much for your time.

User avatar
Hallvor
Posts: 1263
Joined: 2009-04-16 18:35
Location: Kristiansand, Norway
Has thanked: 7 times
Been thanked: 16 times

Re: Wifi connection unstable

#2 Post by Hallvor »

Maybe go over the logs again. It is very strange if it doesn't give you any clue:

Code: Select all

$ journalctl -b
I assume your router is working fine.
Lenovo ThinkPad T440S, Intel Core i7-4600U CPU @ 2.10GHz, 8 GB RAM, 256 GB SSD, Debian Bullseye (KDE)
Lenovo ThinkPad X240, Intel Core i5-4300U CPU @ 2.90GHz, 8 GB RAM, 120 GB SSD, Debian Bullseye (KDE)

dorcas_gustine
Posts: 3
Joined: 2021-08-01 17:10

Re: Wifi connection unstable

#3 Post by dorcas_gustine »

Thank you @Hallvor.
This is the output of my journalctl -b.

Code: Select all

Aug 02 09:37:23 NetworkManager[683]: <info>  [1627889843.6547] device (p2p-dev-wlp4s0): supplicant management interface state: associating -> 4way_handshake
Aug 02 09:37:23 NetworkManager[683]: <info>  [1627889843.6547] device (wlp4s0): DHCPv4 lease renewal requested
Aug 02 09:37:23 wpa_supplicant[569]: wlp4s0: WPA: Key negotiation completed with e4:8f:34:d1:62:1c [PTK=CCMP GTK=CCMP]
Aug 02 09:37:23 wpa_supplicant[569]: wlp4s0: CTRL-EVENT-CONNECTED - Connection to e4:8f:34:d1:62:1c completed [id=0 id_str=]
Aug 02 09:37:23 NetworkManager[683]: <info>  [1627889843.6877] dhcp4 (wlp4s0): canceled DHCP transaction
Aug 02 09:37:23 NetworkManager[683]: <info>  [1627889843.6878] dhcp4 (wlp4s0): state changed bound -> done
Aug 02 09:37:23 NetworkManager[683]: <info>  [1627889843.6891] dhcp4 (wlp4s0): activation: beginning transaction (timeout in 45 seconds)
Aug 02 09:37:23 NetworkManager[683]: <info>  [1627889843.6894] device (wlp4s0): DHCPv6 lease renewal requested
Aug 02 09:37:23 NetworkManager[683]: <info>  [1627889843.6895] dhcp6 (wlp4s0): canceled DHCP transaction
Aug 02 09:37:23 NetworkManager[683]: <info>  [1627889843.6896] dhcp6 (wlp4s0): state changed bound -> done
Aug 02 09:37:23 NetworkManager[683]: <info>  [1627889843.6908] dhcp6 (wlp4s0): activation: beginning transaction (timeout in 45 seconds)
Aug 02 09:37:23 NetworkManager[683]: <info>  [1627889843.6944] device (wlp4s0): supplicant interface state: 4way_handshake -> completed
Aug 02 09:37:23 NetworkManager[683]: <info>  [1627889843.6951] device (p2p-dev-wlp4s0): supplicant management interface state: 4way_handshake -> completed
Aug 02 09:37:23 gnome-shell[1604]: An active wireless connection, in infrastructure mode, involves no access point?
Aug 02 09:37:23 gnome-shell[1604]: An active wireless connection, in infrastructure mode, involves no access point?
Aug 02 09:37:23 gnome-shell[1604]: An active wireless connection, in infrastructure mode, involves no access point?
Aug 02 09:37:23 kernel: wlp4s0: Limiting TX power to 20 (20 - 0) dBm as advertised by e4:8f:34:d1:62:1c
Aug 02 09:37:23 NetworkManager[683]: <info>  [1627889843.7381] dhcp4 (wlp4s0): state changed unknown -> bound, address=192.168.1.11
Aug 02 09:37:23 NetworkManager[683]: <info>  [1627889843.7423] dhcp6 (wlp4s0): state changed unknown -> bound
Aug 02 09:37:23 dbus-daemon[561]: [system] Activating via systemd: service name='org.freedesktop.nm_dispatcher' unit='dbus-org.freedesktop.nm-dispatcher.service' requested by ':1.11' (uid=0 pid=683 comm="/usr/sbin/NetworkManager --no-daemon ")
Aug 02 09:37:23 systemd[1]: Starting Network Manager Script Dispatcher Service...
Aug 02 09:37:23 dbus-daemon[561]: [system] Successfully activated service 'org.freedesktop.nm_dispatcher'
Aug 02 09:37:23 systemd[1]: Started Network Manager Script Dispatcher Service.
Aug 02 09:37:24 wpa_supplicant[569]: wlp4s0: CTRL-EVENT-SIGNAL-CHANGE above=1 signal=-37 noise=-92 txrate=26000
Aug 02 09:37:34 systemd[1]: NetworkManager-dispatcher.service: Succeeded.
Aug 02 09:37:37 wpa_supplicant[569]: wlp4s0: CTRL-EVENT-BEACON-LOSS
Aug 02 09:37:38 wpa_supplicant[569]: wlp4s0: CTRL-EVENT-BEACON-LOSS
Aug 02 09:37:39 wpa_supplicant[569]: wlp4s0: CTRL-EVENT-BEACON-LOSS
Aug 02 09:37:40 wpa_supplicant[569]: wlp4s0: CTRL-EVENT-BEACON-LOSS
Aug 02 09:37:41 wpa_supplicant[569]: wlp4s0: CTRL-EVENT-BEACON-LOSS
Aug 02 09:37:42 wpa_supplicant[569]: wlp4s0: CTRL-EVENT-BEACON-LOSS
Aug 02 09:37:43 wpa_supplicant[569]: wlp4s0: CTRL-EVENT-BEACON-LOSS
Aug 02 09:37:44 wpa_supplicant[569]: wlp4s0: CTRL-EVENT-BEACON-LOSS
Aug 02 09:37:45 wpa_supplicant[569]: wlp4s0: CTRL-EVENT-BEACON-LOSS
Aug 02 09:37:46 wpa_supplicant[569]: wlp4s0: CTRL-EVENT-BEACON-LOSS
Aug 02 09:37:47 wpa_supplicant[569]: wlp4s0: CTRL-EVENT-BEACON-LOSS
Aug 02 09:37:47 kernel: ath: phy0: DMA failed to stop in 10 ms AR_CR=0x00000024 AR_DIAG_SW=0x02000020 DMADBG_7=0x00006100
Aug 02 09:37:47 wpa_supplicant[569]: wlp4s0: CTRL-EVENT-DISCONNECTED bssid=e4:8f:34:d1:62:1c reason=4 locally_generated=1
Aug 02 09:37:47 wpa_supplicant[569]: wlp4s0: CTRL-EVENT-REGDOM-CHANGE init=CORE type=WORLD
Aug 02 09:37:47 NetworkManager[683]: <info>  [1627889867.5015] device (wlp4s0): supplicant interface state: completed -> disconnected
Aug 02 09:37:47 NetworkManager[683]: <info>  [1627889867.5015] device (p2p-dev-wlp4s0): supplicant management interface state: completed -> disconnected
Aug 02 09:37:47 NetworkManager[683]: <info>  [1627889867.5907] device (wlp4s0): supplicant interface state: disconnected -> scanning
Aug 02 09:37:47 NetworkManager[683]: <info>  [1627889867.5907] device (p2p-dev-wlp4s0): supplicant management interface state: disconnected -> scanning
Aug 02 09:37:48 wpa_supplicant[569]: wlp4s0: CTRL-EVENT-REGDOM-CHANGE init=BEACON_HINT type=UNKNOWN
Aug 02 09:37:48 wpa_supplicant[569]: wlp4s0: SME: Trying to authenticate with e4:8f:34:d1:62:1c (SSID='Vodafone-87408253' freq=2437 MHz)
Aug 02 09:37:48 kernel: wlp4s0: authenticate with e4:8f:34:d1:62:1c
Aug 02 09:37:48 NetworkManager[683]: <info>  [1627889868.6146] device (wlp4s0): supplicant interface state: scanning -> authenticating
Aug 02 09:37:48 kernel: wlp4s0: send auth to e4:8f:34:d1:62:1c (try 1/3)
Aug 02 09:37:48 kernel: wlp4s0: authenticated
Aug 02 09:37:48 NetworkManager[683]: <info>  [1627889868.6147] device (p2p-dev-wlp4s0): supplicant management interface state: scanning -> authenticating
Aug 02 09:37:48 wpa_supplicant[569]: wlp4s0: Trying to associate with e4:8f:34:d1:62:1c (SSID='Vodafone-87408253' freq=2437 MHz)
Aug 02 09:37:48 NetworkManager[683]: <info>  [1627889868.6249] device (wlp4s0): supplicant interface state: authenticating -> associating
Aug 02 09:37:48 NetworkManager[683]: <info>  [1627889868.6250] device (p2p-dev-wlp4s0): supplicant management interface state: authenticating -> associating
Aug 02 09:37:48 kernel: wlp4s0: associate with e4:8f:34:d1:62:1c (try 1/3)
Aug 02 09:37:48 kernel: wlp4s0: RX AssocResp from e4:8f:34:d1:62:1c (capab=0x1411 status=0 aid=2)
Aug 02 09:37:48 wpa_supplicant[569]: wlp4s0: Associated with e4:8f:34:d1:62:1c
Aug 02 09:37:48 wpa_supplicant[569]: wlp4s0: CTRL-EVENT-SUBNET-STATUS-UPDATE status=0
Aug 02 09:37:48 wpa_supplicant[569]: wlp4s0: CTRL-EVENT-REGDOM-CHANGE init=COUNTRY_IE type=COUNTRY alpha2=IT
Aug 02 09:37:48 kernel: wlp4s0: associated
Aug 02 09:37:48 kernel: ath: EEPROM regdomain: 0x817c
Aug 02 09:37:48 kernel: ath: EEPROM indicates we should expect a country code
Aug 02 09:37:48 kernel: ath: doing EEPROM country->regdmn map search
Aug 02 09:37:48 kernel: ath: country maps to regdmn code: 0x37
Aug 02 09:37:48 kernel: ath: Country alpha2 being used: IT
Aug 02 09:37:48 kernel: ath: Regpair used: 0x37
Aug 02 09:37:48 kernel: ath: regdomain 0x817c dynamically updated by country element
Aug 02 09:37:48 NetworkManager[683]: <info>  [1627889868.6334] device (wlp4s0): supplicant interface state: associating -> associated
Aug 02 09:37:48 NetworkManager[683]: <info>  [1627889868.6334] device (p2p-dev-wlp4s0): supplicant management interface state: associating -> associated
Aug 02 09:37:48 NetworkManager[683]: <info>  [1627889868.6334] device (wlp4s0): DHCPv4 lease renewal requested
Aug 02 09:37:48 wpa_supplicant[569]: wlp4s0: WPA: Key negotiation completed with e4:8f:34:d1:62:1c [PTK=CCMP GTK=CCMP]
Aug 02 09:37:48 wpa_supplicant[569]: wlp4s0: CTRL-EVENT-CONNECTED - Connection to e4:8f:34:d1:62:1c completed [id=0 id_str=]
Aug 02 09:37:48 NetworkManager[683]: <info>  [1627889868.6637] dhcp4 (wlp4s0): canceled DHCP transaction
Aug 02 09:37:48 NetworkManager[683]: <info>  [1627889868.6638] dhcp4 (wlp4s0): state changed bound -> done
Aug 02 09:37:48 NetworkManager[683]: <info>  [1627889868.6648] dhcp4 (wlp4s0): activation: beginning transaction (timeout in 45 seconds)
Aug 02 09:37:48 NetworkManager[683]: <info>  [1627889868.6652] device (wlp4s0): DHCPv6 lease renewal requested
Aug 02 09:37:48 NetworkManager[683]: <info>  [1627889868.6653] dhcp6 (wlp4s0): canceled DHCP transaction
Aug 02 09:37:48 NetworkManager[683]: <info>  [1627889868.6653] dhcp6 (wlp4s0): state changed bound -> done
Aug 02 09:37:48 NetworkManager[683]: <info>  [1627889868.6665] dhcp6 (wlp4s0): activation: beginning transaction (timeout in 45 seconds)
Aug 02 09:37:48 NetworkManager[683]: <info>  [1627889868.6694] device (wlp4s0): supplicant interface state: associated -> 4way_handshake
Aug 02 09:37:48 NetworkManager[683]: <info>  [1627889868.6695] device (p2p-dev-wlp4s0): supplicant management interface state: associated -> 4way_handshake
Aug 02 09:37:48 NetworkManager[683]: <info>  [1627889868.6697] device (wlp4s0): supplicant interface state: 4way_handshake -> completed
Aug 02 09:37:48 NetworkManager[683]: <info>  [1627889868.6703] device (p2p-dev-wlp4s0): supplicant management interface state: 4way_handshake -> completed
Aug 02 09:37:48 gnome-shell[1604]: An active wireless connection, in infrastructure mode, involves no access point?
Aug 02 09:37:48 gnome-shell[1604]: An active wireless connection, in infrastructure mode, involves no access point?
Aug 02 09:37:48 gnome-shell[1604]: An active wireless connection, in infrastructure mode, involves no access point?
Aug 02 09:37:48 kernel: wlp4s0: Limiting TX power to 20 (20 - 0) dBm as advertised by e4:8f:34:d1:62:1c
Aug 02 09:37:48 NetworkManager[683]: <info>  [1627889868.7138] dhcp4 (wlp4s0): state changed unknown -> bound, address=192.168.1.11
Aug 02 09:37:48 dbus-daemon[561]: [system] Activating via systemd: service name='org.freedesktop.nm_dispatcher' unit='dbus-org.freedesktop.nm-dispatcher.service' requested by ':1.11' (uid=0 pid=683 comm="/usr/sbin/NetworkManager --no-daemon ")
Aug 02 09:37:48 systemd[1]: Starting Network Manager Script Dispatcher Service...
Aug 02 09:37:48 dbus-daemon[561]: [system] Successfully activated service 'org.freedesktop.nm_dispatcher'
Aug 02 09:37:48 systemd[1]: Started Network Manager Script Dispatcher Service.
Aug 02 09:37:48 wpa_supplicant[569]: wlp4s0: CTRL-EVENT-SIGNAL-CHANGE above=1 signal=-43 noise=-92 txrate=21700
Aug 02 09:37:49 NetworkManager[683]: <info>  [1627889869.1997] dhcp6 (wlp4s0): state changed unknown -> bound
Aug 02 09:37:59 systemd[1]: NetworkManager-dispatcher.service: Succeeded.
Aug 02 09:38:10 wpa_supplicant[569]: wlp4s0: CTRL-EVENT-BEACON-LOSS
Aug 02 09:38:11 wpa_supplicant[569]: wlp4s0: CTRL-EVENT-BEACON-LOSS
Aug 02 09:38:12 wpa_supplicant[569]: wlp4s0: CTRL-EVENT-BEACON-LOSS
Aug 02 09:38:14 wpa_supplicant[569]: wlp4s0: CTRL-EVENT-BEACON-LOSS
Aug 02 09:38:15 wpa_supplicant[569]: wlp4s0: CTRL-EVENT-BEACON-LOSS
Aug 02 09:38:16 wpa_supplicant[569]: wlp4s0: CTRL-EVENT-BEACON-LOSS
And yes, my router is working fine with other devices and with this one with an ethernet cable.


[EDIT]
I don't know if this could be useful, but here is my iwconfig wlp4s0

Code: Select all

wlp4s0    IEEE 802.11  ESSID:"xxxxxxxxxxxxxxxx"  
          Mode:Managed  Frequency:2.437 GHz  Access Point: E4:8F:34:D1:62:1C   
          Bit Rate=26 Mb/s   Tx-Power=15 dBm   
          Retry short limit:7   RTS thr:off   Fragment thr:off
          Encryption key:off
          Power Management:off
          Link Quality=65/70  Signal level=-45 dBm  
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:12   Missed beacon:0

User avatar
Hallvor
Posts: 1263
Joined: 2009-04-16 18:35
Location: Kristiansand, Norway
Has thanked: 7 times
Been thanked: 16 times

Re: Wifi connection unstable

#4 Post by Hallvor »

CTRL-EVENT-BEACON-LOSS
This looks like a weak signal. Do you have WiFi power savings enabled? Try to turn them off.

Does it also slow down when you are sitting next to the router?

You can try a live-cd/live-usb with a different distro and see if you get different results to isolate the problem.
Lenovo ThinkPad T440S, Intel Core i7-4600U CPU @ 2.10GHz, 8 GB RAM, 256 GB SSD, Debian Bullseye (KDE)
Lenovo ThinkPad X240, Intel Core i5-4300U CPU @ 2.90GHz, 8 GB RAM, 120 GB SSD, Debian Bullseye (KDE)

dorcas_gustine
Posts: 3
Joined: 2021-08-01 17:10

Re: Wifi connection unstable

#5 Post by dorcas_gustine »

Hello Hallvor,
after a few tries, I've tried to restore a snapshot made before moving from Buster to Bullseye but it didn't go well.
Luckily I had a root partition and a user partition, so I made a fresh installation of Bullseye on the root partition and now everything works fine.
Sorry if I wasted your time. Thank you very much for your patience.

User avatar
Hallvor
Posts: 1263
Joined: 2009-04-16 18:35
Location: Kristiansand, Norway
Has thanked: 7 times
Been thanked: 16 times

Re: Wifi connection unstable

#6 Post by Hallvor »

I am glad you sorted it out and that it was so easy to fix. :)
Lenovo ThinkPad T440S, Intel Core i7-4600U CPU @ 2.10GHz, 8 GB RAM, 256 GB SSD, Debian Bullseye (KDE)
Lenovo ThinkPad X240, Intel Core i5-4300U CPU @ 2.90GHz, 8 GB RAM, 120 GB SSD, Debian Bullseye (KDE)

Post Reply