Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Slow/unstable Wi-Fi
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
BaltazarGabka
n00b
n00b


Joined: 07 Dec 2021
Posts: 10
Location: Poland

PostPosted: Thu Dec 09, 2021 8:14 pm    Post subject: Slow/unstable Wi-Fi Reply with quote

Hi,

I have a problem with slow/unstable Wi-Fi on Gentoo. Usually speed is about 1 - 2 Mbps, sometimes it gets higher, sometimes it drops to 0, but it doesn't disconnect. I've checked if it's a problem with my computer, or with router. Every other device I've checked works fine. My computer gets normal Wi-Fi speeds under Windows 8.1, I also tried some other Linux distros (Pop!_OS, EndeavourOS and Fedora - all LiveDVDs) and it works fine as well.

My Wi-Fi adapter is Atheros AR9485, I use NetworkManager, my kernel is 5.10.78-gentoo-dist (however this problem occurred some kernels ago...).

Code:
ifconfig wlp3s0

wlp3s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.50.106  netmask 255.255.255.0  broadcast 192.168.50.255
        inet6 fe80::6c22:59e1:8fa8:8eb1  prefixlen 64  scopeid 0x20<link>
        ether 24:0a:64:91:9f:79  txqueuelen 1000  (Ethernet)
        RX packets 1119426  bytes 1563764542 (1.4 GiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 499039  bytes 71181851 (67.8 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0


Code:
iwconfig wlp3s0

wlp3s0    IEEE 802.11  ESSID:"***** ***" 
          Mode:Managed  Frequency:2.442 GHz  Access Point: ***** ***   
          Bit Rate=57.8 Mb/s   Tx-Power=15 dBm   
          Retry short limit:7   RTS thr:off   Fragment thr:off
          Power Management:off
          Link Quality=58/70  Signal level=-52 dBm 
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:23104   Missed beacon:0


Code:
lsmod | grep ath

ath9k                 139264  0
ath9k_common           24576  1 ath9k
ath3k                  24576  0
ath9k_hw              466944  2 ath9k_common,ath9k
bluetooth             581632  46 btrtl,btintel,btbcm,bnep,ath3k,btusb,rfcomm
mac80211              925696  1 ath9k
ath                    32768  3 ath9k_common,ath9k,ath9k_hw
cfg80211              774144  4 ath9k_common,ath9k,ath,mac80211


The only difference I see between Gentoo and Pop!_OS, EndeavourOS and Fedora is the number of "Invalid misc" (iwconfig) - in Gentoo it's much higher. I tried some solutions found on this forum and somewhere else, and they didn't work (like nohwcrypt=1). I also tried to connect to Wi-Fi using wpa_supplicant and there was no difference (doesn't NetworkManager use wpa_supplicant?). Now I don't know what to look for, and where might be the problem. Maybe there are some options missing in the kernel, but i thought that gentoo-dist kernel uses Fedora's config, so if there's something wrong, Fedora should behave the same, but it's fine.

I'd appreciate any help.
Back to top
View user's profile Send private message
alamahant
Advocate
Advocate


Joined: 23 Mar 2019
Posts: 3879

PostPosted: Thu Dec 09, 2021 8:30 pm    Post subject: Reply with quote

Do you have
linux-firmware
emerged?
_________________
:)
Back to top
View user's profile Send private message
BaltazarGabka
n00b
n00b


Joined: 07 Dec 2021
Posts: 10
Location: Poland

PostPosted: Thu Dec 09, 2021 9:07 pm    Post subject: Reply with quote

alamahant wrote:
Do you have
linux-firmware
emerged?


Yes, I have it emerged. I assume, that I wouldn't be able to load ath9k module without this package.

Code:
emerge --search linux-firmware

*  sys-kernel/linux-firmware
      Latest version available: 20211027
      Latest version installed: 20211027
      Size of files: 179 045 KiB
      Homepage:      https://git.kernel.org/?p=linux/kernel/git/firmware/linux-firmware.git
Back to top
View user's profile Send private message
Jaglover
Watchman
Watchman


Joined: 29 May 2005
Posts: 8291
Location: Saint Amant, Acadiana

PostPosted: Thu Dec 09, 2021 10:01 pm    Post subject: Reply with quote

What driver wpa_supplicant is using?
_________________
My Gentoo installation notes.
Please learn how to denote units correctly!
Back to top
View user's profile Send private message
alamahant
Advocate
Advocate


Joined: 23 Mar 2019
Posts: 3879

PostPosted: Thu Dec 09, 2021 10:58 pm    Post subject: Reply with quote

Plz Disable wpa_supplicant and/or iwd and any net.<wifi> service and just let NM handle wifi.
_________________
:)
Back to top
View user's profile Send private message
BaltazarGabka
n00b
n00b


Joined: 07 Dec 2021
Posts: 10
Location: Poland

PostPosted: Fri Dec 10, 2021 4:00 pm    Post subject: Reply with quote

Jaglover wrote:
What driver wpa_supplicant is using?


wpa_supplicant uses nl80211, wext didn't work at all.


alamahant wrote:
Plz Disable wpa_supplicant and/or iwd and any net.<wifi> service and just let NM handle wifi.


Actually the only enabled service responsible for managing networks is NetworkManager. Anything else is disabled.
Back to top
View user's profile Send private message
Jaglover
Watchman
Watchman


Joined: 29 May 2005
Posts: 8291
Location: Saint Amant, Acadiana

PostPosted: Fri Dec 10, 2021 5:49 pm    Post subject: Reply with quote

Anything in kernel log?
_________________
My Gentoo installation notes.
Please learn how to denote units correctly!
Back to top
View user's profile Send private message
BaltazarGabka
n00b
n00b


Joined: 07 Dec 2021
Posts: 10
Location: Poland

PostPosted: Fri Dec 10, 2021 6:33 pm    Post subject: Reply with quote

Jaglover wrote:
Anything in kernel log?


Do you mean something specific?

This part is the same on all four LInux distributions I tried (Gentoo, Pop!_OS, EndeavourOS, Fedora):

Code:
dmesg | grep ath

[    5.973787] usbcore: registered new interface driver ath3k
[    5.991480] ath: phy0: Disable PLL PowerSave
[    5.999197] ath: phy0: ASPM enabled: 0x42
[    5.999202] ath: EEPROM regdomain: 0x60
[    5.999203] ath: EEPROM indicates we should expect a direct regpair map
[    5.999206] ath: Country alpha2 being used: 00
[    5.999208] ath: Regpair used: 0x60
[    6.025356] ath9k 0000:03:00.0 wlp3s0: renamed from wlan0
[   30.484924] ath: EEPROM regdomain: 0x80fa
[   30.484925] ath: EEPROM indicates we should expect a country code
[   30.484926] ath: doing EEPROM country->regdmn map search
[   30.484927] ath: country maps to regdmn code: 0x37
[   30.484929] ath: Country alpha2 being used: FR
[   30.484929] ath: Regpair used: 0x37
[   30.484931] ath: regdomain 0x80fa dynamically updated by country element


Code:
dmesg | grep wlp3s0

[    6.025356] ath9k 0000:03:00.0 wlp3s0: renamed from wlan0
[   30.454136] wlp3s0: authenticate with ***** ***
[   30.473412] wlp3s0: send auth to ***** *** (try 1/3)
[   30.475316] wlp3s0: authenticated
[   30.478134] wlp3s0: associate with ***** *** (try 1/3)
[   30.484642] wlp3s0: RX AssocResp from ***** *** (capab=0xc11 status=0 aid=1)
[   30.484819] wlp3s0: associated
[   30.600893] IPv6: ADDRCONF(NETDEV_CHANGE): wlp3s0: link becomes ready


For me nothing out of ordinary...
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54216
Location: 56N 3W

PostPosted: Fri Dec 10, 2021 7:14 pm    Post subject: Reply with quote

BaltazarGabka,

Code:
[   30.484929] ath: Country alpha2 being used: FR

This is used to determine which WiFi operating parameters are permitted in your region.

Did the crda database load?
Check dmesg, there will be an error if it failed.

Are you using the correct country code for your region?
You may be restricting your Transmit power and permitted channels if not.

WiFi will often work but badly if that setup is not correct.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
BaltazarGabka
n00b
n00b


Joined: 07 Dec 2021
Posts: 10
Location: Poland

PostPosted: Sat Dec 11, 2021 8:43 pm    Post subject: Reply with quote

NeddySeagoon wrote:
BaltazarGabka,

Code:
[   30.484929] ath: Country alpha2 being used: FR

This is used to determine which WiFi operating parameters are permitted in your region.

Did the crda database load?
Check dmesg, there will be an error if it failed.

Are you using the correct country code for your region?
You may be restricting your Transmit power and permitted channels if not.

WiFi will often work but badly if that setup is not correct.


I checked dmesg, and there aren't any errors. Other Linux distros I've tested used the same regulatory domain and Wi-Fi worked fine. I tried to change it, bu it didn't help.

When I installed Gentoo Wi-Fi also worked fine, but it changed probably after some update. Unfortunately I don't remember when it happened, so now it's more difficult to find where might be the problem. I thought that some interferences from other networks may cause my Wi-Fi to work so slowly and unstable, but after making some tests I found out, that there must be a problem in my Gentoo system...
Back to top
View user's profile Send private message
BaltazarGabka
n00b
n00b


Joined: 07 Dec 2021
Posts: 10
Location: Poland

PostPosted: Sun Jan 09, 2022 8:11 pm    Post subject: Reply with quote

I haven't found a solution yet, but I've found some strange behavior: when I suspend my computer, and then I resume it, Wi-Fi works fine, it gets normal speeds. I don't see any difference in dmesg, only iwconfig shows lower "Invalid misc". Can anybody tell me where can I look for a reason of that behavior?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum