Wi-Fi Speed Cut In Half After Installation Compared To Live-USB

Hi people, I’m new here and couldn’t find some sort of internet/wi-fi category, so feel free to move this, if it fits better somewhere else.

My problem is, that my wi-fi speed always drops after I’ve installed the os. On the live-usb session I get ~40Mbps but with the installed system it’s only ~20Mbps. I had this same issue on manjaro, but didn’t find any help in their forum. I switched to endeavouros because it was faster from the beginning and seems closer to the arch experience I’m interested in. So I’m pretty bummed to find me with the same issue here.
Ethernet seems unaffected, as I’m getting the full 200+Mbps my provider is promising me. I think my Laptop is only capable of 2.4Ghz wifi so ~40Mbps seems fine to me.

Searching the web, I didn’t find much useful. Most people seem to have speed issues in general. I found some talk about duplex and link negotiation but these seem to be ethernet specific, as I can only find those settings in the tab for my wired connections but not in wireless.

Here is some info on my wi-fi card and driver in use:

$ lspci -vs 2:00.0
02:00.0 Network controller: Qualcomm Atheros QCA9565 / AR9565 Wireless Network Adapter (rev 01)
        Subsystem: Lite-On Communications Inc Device 0642
        Flags: bus master, fast devsel, latency 0, IRQ 19
        Memory at c0600000 (64-bit, non-prefetchable) [size=512K]
        Expansion ROM at c0680000 [disabled] [size=64K]
        Capabilities: <access denied>
        Kernel driver in use: ath9k
        Kernel modules: ath9k

I would really appreciate any help in this topic. Thanks in advance.

Hello @pandora
Looks like your WiFi is using the correct module. It may be that your regulatory domain is not set correctly for your Country possibly.

Check what this shows.

sudo dmesg | grep firmware

Edit: Here some info. You may have to set the appropriate region.

https://wiki.archlinux.org/index.php/Network_configuration/Wireless#Respecting_the_regulatory_domain

Edit2: You could also check /etc/modprobe.d/ath9k.conf
Sometimes adding this helps with connection problems and or possibly slow speed.

"options ath9k nohwcrypt=1"
2 Likes

Hi, thanks for the fast reply!

The output to your recommended command is as follows:

$ sudo dmesg | grep firmware
[    0.110400] Spectre V2 : Enabling Restricted Speculation for firmware calls
[    4.235400] psmouse serio1: elantech: assuming hardware version 3 (with firmware version 0x454f00)

Not sure what this means, honestly. I think elantech is the manufacturer of my laptop’s touchpad.

I also added options ath9k nohwcrypt=1 to /etc/modprobe.d/ath9k.conf, which I had to create first. It doesn’t seem to do much, besides my bluetooth mouse is only working after log in now and not directly on start up anymore.

I also took a look into your provided link. crda isn’t installed on my system, but the commands did work anyways.

iw reg get gets me this:

$ iw reg get        
global
country 00: DFS-UNSET
        (2402 - 2472 @ 40), (N/A, 20), (N/A)
        (2457 - 2482 @ 20), (N/A, 20), (N/A), AUTO-BW, PASSIVE-SCAN
        (2474 - 2494 @ 20), (N/A, 20), (N/A), NO-OFDM, PASSIVE-SCAN
        (5170 - 5250 @ 80), (N/A, 20), (N/A), AUTO-BW, PASSIVE-SCAN
        (5250 - 5330 @ 80), (N/A, 20), (0 ms), DFS, AUTO-BW, PASSIVE-SCAN
        (5490 - 5730 @ 160), (N/A, 20), (0 ms), DFS, PASSIVE-SCAN
        (5735 - 5835 @ 80), (N/A, 20), (N/A), PASSIVE-SCAN
        (57240 - 63720 @ 2160), (N/A, 0), (N/A)

phy#0
country 99: DFS-UNSET
        (2402 - 2472 @ 40), (N/A, 20), (N/A)
        (2457 - 2482 @ 40), (N/A, 20), (N/A), PASSIVE-SCAN
        (5140 - 5360 @ 80), (N/A, 30), (N/A), PASSIVE-SCAN
        (5715 - 5860 @ 80), (N/A, 30), (N/A), PASSIVE-SCAN

So for global I’m set to some sort of generic (country 00), if I got this right. Setting it to DE with iw reg set DE did work but phy#0 keeps being country 99 which I don’t understand:

$ iw reg get
global
country DE: DFS-ETSI
        (2400 - 2483 @ 40), (N/A, 20), (N/A)
        (5150 - 5250 @ 80), (N/A, 23), (N/A), NO-OUTDOOR, AUTO-BW
        (5250 - 5350 @ 80), (N/A, 20), (0 ms), NO-OUTDOOR, DFS, AUTO-BW
        (5470 - 5725 @ 160), (N/A, 26), (0 ms), DFS
        (5725 - 5875 @ 80), (N/A, 13), (N/A)
        (57000 - 66000 @ 2160), (N/A, 40), (N/A)

phy#0
country 99: DFS-UNSET
        (2402 - 2472 @ 40), (N/A, 20), (N/A)
        (2457 - 2482 @ 40), (N/A, 20), (N/A), PASSIVE-SCAN
        (5140 - 5360 @ 80), (N/A, 30), (N/A), PASSIVE-SCAN
        (5715 - 5860 @ 80), (N/A, 30), (N/A), PASSIVE-SCAN

Also on reboot it’s set back to generic again, which seems be done by my atheros card on start up:

$ sudo dmesg | grep ath:
[    4.549607] ath: phy0: WB335 2-ANT card detected
[    4.549612] ath: phy0: Set BT/WLAN RX diversity capability
[    4.558625] ath: phy0: Enable LNA combining
[    4.559736] ath: phy0: ASPM enabled: 0x42
[    4.559740] ath: EEPROM regdomain: 0x65
[    4.559742] ath: EEPROM indicates we should expect a direct regpair map
[    4.559744] ath: Country alpha2 being used: 00
[    4.559746] ath: Regpair used: 0x65

I tried editing /etc/conf.d/wireless-regdom and uncommenting my region, but this didn’t work. After restart I’m at the generic setting again. Also 00 was commented all along. So maybe this file isn’t taken into affect? Do I need to install crda to get this to work?

However, my wi-fi speed hasn’t changed yet. I tested it after every step.

I think you do have to install cdra. The info is there on the page.

Edit: Here is my output.

[ricklinux@eos-plasma ~]$ iw reg get
global
country CA: DFS-FCC
        (2402 - 2472 @ 40), (N/A, 30), (N/A)
        (5150 - 5250 @ 80), (N/A, 23), (N/A), NO-OUTDOOR, AUTO-BW
        (5250 - 5350 @ 80), (N/A, 24), (0 ms), DFS, AUTO-BW
        (5470 - 5600 @ 80), (N/A, 24), (0 ms), DFS
        (5650 - 5730 @ 80), (N/A, 24), (0 ms), DFS
        (5735 - 5835 @ 80), (N/A, 30), (N/A)

[ricklinux@eos-plasma ~]$ 

Okay, I installed crda and rebooted as noted on the page, but CRDA isn’t being called by cfg80211 on start up:

$ sudo dmesg | grep cfg80211
[    3.417731] cfg80211: Loading compiled-in X.509 certificates for regulatory database
[    3.429070] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'

I’m not sure what you mean? But it look okay here.

Edit: I don’t have cdra installed. But this is just what mine shows.

[ricklinux@eos-plasma ~]$ iw reg get
global
country CA: DFS-FCC
        (2402 - 2472 @ 40), (N/A, 30), (N/A)
        (5150 - 5250 @ 80), (N/A, 23), (N/A), NO-OUTDOOR, AUTO-BW
        (5250 - 5350 @ 80), (N/A, 24), (0 ms), DFS, AUTO-BW
        (5470 - 5600 @ 80), (N/A, 24), (0 ms), DFS
        (5650 - 5730 @ 80), (N/A, 24), (0 ms), DFS
        (5735 - 5835 @ 80), (N/A, 30), (N/A)

[ricklinux@eos-plasma ~]$ 

Edit2:

[ricklinux@eos-plasma ~]$ sudo dmesg | grep cfg80211
[sudo] password for ricklinux: 
[    2.772166] cfg80211: Loading compiled-in X.509 certificates for regulatory database
[    2.783807] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
[ricklinux@eos-plasma ~]$ 

Did you try setting it with: iw reg set US to whatever your country?

Welcome to the forum! :smile:

Too low wifi speed may be caused by quite many reasons. @ricklinux has provided useful info already, and I hope it helps.

I’d just like to know some more about your case:

  • How exactly do you measure the speed? With an app, or downloading some large file, or something else?
  • If updating packages is slow, then changing mirrorlist (e.g. with command reflector-simple) may help.
  • Have you checked your router settings? And updated router software?

These are just some pointers that might help to get to the right direction.

On the arch wiki page you provided it says:

Check the boot log to make sure that CRDA is being called by cfg80211

So I did just this and the output of $ dmesg | grep cfg80211 looks just the same as before the installation. So I assume it’s not being called as it should.

That’s just what I meant at some point before. These commands seem to work quite fine even without having crda installed.

Do you have installed crda now? If not, this proves again it is not called on boot for my system as our outputs are identical.

Yes, I did. Look here:

Hi @manuel, thanks for joining in.

I’m using https://speed.cloudflare.com/ to measure my speeds.

Updating is rather slow, but I already updated my mirror list.

Actually, I didn’t. It’s just the regular device my provider ships and I didn’t mess with it yet.

I don’t think the problem would be outside my laptop, because everything is just fine on the live-usb session. So, I think there has to be some difference between the live-usb session and my installed system but I couldn’t find anything yet. The regulatory domain settings also seem to be identical. The only difference I could find was that the live-usb session also provides the wl kernel module in addition to the ath9k module. The one in use still is the ath9k, though, which makes sense, since my wireless card is an atheros and no broadcom.

So which differences can there be between the live system and my installed one, that would cut my wi-fi’s download speed?

About mirrors: to get a more detailed view on mirrors, you could use command

reflector -c "your country" --verbose --latest 10 -p https --sort rate

Note that this command does not save the mirrorlist (option --save is missing). Also, the value for option --latest depends on which countries you add to the command, but 10 is not bad either.

With the listing you should see what are the best mirrors in your case, and compare the listing to what you have in /etc/pacman.d/mirrorlist.

But as you said, you are not using mirrors for the speed measurement, so this does not help with the original question. Only helps finding the best mirrors.

Hopefully @ricklinux and/or others can help you more.

Out here in left field (:grin:) - I speculate about what might change between a live session and a running-on-metal system…

No chance that a VPN or similar is getting in the middle of your metal measurements? On my setup that knocks dload speeds hard (900 - 480), although uload only drops from 900 to 800 range… (as per speedtest.net)

@manuel, thanks for your advice, appreciate it. I used the command you provided and played around with the arguments a little. I think my mirrorlist is quiet nice now. Is also enabled the weekly automatic update like discribed here: https://discovery.endeavouros.com/pacman/automatically-ranking-the-mirror-list/2021/03/

I also noticed that there is an endeavouros repo listed when calling pacman -Syy. I guessed this isn’t included in the arch-mirrors and therefor not affected by my newly organized mirrorlist. So I looked it up online and found the eos-rankmirrors command, but it’s not working. Bash can’t find the command as it appears. Do I need to install a separate package for this or something?

@freebird54, yeah, that’s exactly the question. I have absolutely no idea what it could be…
I’m not using a VPN-Servie, or manually configured proxy or something like this. So if my laptop and router aren’t setting things like this up automatically without me noticing, that’s probably not the cause of my problem. Also if that was the case, it should apply to the live-session and my installed system likewise I guess. But thanks for your reply.

@pandora
You can also use the Welcome app to set your mirrors using the update mirrors box in case you haven’t noticed it.

There is no reason it would apply to the live session - but if you have no such service running then that is not the problem.

As for the mirrorlists - there is no reason you cannot modify them directly yourself if necessary. They reside in the ***/etc/pacman.d *** directory. The first uncommented line (no #) will be the first to be used - so feel free to try simple strategies such as ‘closest geographically’ to see if that improves things.

A comparison of the results of speedtest.net in the 2 environments might also be informative…

Edit: Is there some way to check what band you are connecting on? 2.4 or 5? That makes quite a difference in speed too…

I did notice and used it right away, but thanks for the hint. I think that’s a great feature, especially for beginner-level users. I’m sure this helps many a lot. Messing around in the terminal is just a little more fun and an important experience for a linux user-to-be.

How would it not apply to the live session? If I didn’t set up something manually it must haven been set up automatically either by the os or my router and therefore affect both systems, or am I wrong?

I mentioned earlier I use speed.cloudflare.com. Would you recommend speedtest.net for a reason? It seems rather bloated and pumped with ads. I can easily provide some data of both systems, if you wanna look into it.

I took a look and found this: https://unix.stackexchange.com/questions/137894/how-do-i-find-out-if-my-wireless-card-supports-5-ghz
My outputs on this are as follows:

$ iwconfig
lo        no wireless extensions.

enp1s0f0  no wireless extensions.

wlan0     IEEE 802.11  ESSID:"UPC9395534"  
          Mode:Managed  Frequency:2.462 GHz  Access Point: 34:2C:C4:58:45:50   
          Bit Rate=72.2 Mb/s   Tx-Power=16 dBm   
          Retry short limit:7   RTS thr:off   Fragment thr:off
          Power Management:off
          Link Quality=67/70  Signal level=-43 dBm  
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:36   Missed beacon:0
$ iwlist wlan0 freq
wlan0     13 channels in total; available frequencies :
          Channel 01 : 2.412 GHz
          Channel 02 : 2.417 GHz
          Channel 03 : 2.422 GHz
          Channel 04 : 2.427 GHz
          Channel 05 : 2.432 GHz
          Channel 06 : 2.437 GHz
          Channel 07 : 2.442 GHz
          Channel 08 : 2.447 GHz
          Channel 09 : 2.452 GHz
          Channel 10 : 2.457 GHz
          Channel 11 : 2.462 GHz
          Channel 12 : 2.467 GHz
          Channel 13 : 2.472 GHz
          Current Frequency:2.462 GHz (Channel 11)

So, I think this shows my card is only capable of 2.4GHz and also should be capable of 72.2Mbps. Also I found this: https://www.qualcomm.com/products/qca9565
Which should be my card as mentioned earlier:

So I’m pretty sure 5GHz is not supported by my card.

Running out of ideas here! Something must differ - but I have no idea what it could be. Apart from checking config files between the 2 setups for diffs…

BTW - I use speedtest.net because of more repeatable and understandable results, that seem to be reflected by actual performance on the net. For example:

             VPN on          VPN off
Cloudflare   245 / 839      682 / 732
OOkla        878 / 891      038 / 934
OOkla
alt server   489 / 882      892 / 904

Being able to switch servers makes a difference, and is probably the reason I put up with the ads :grin:

Good luck - hopefully somebody runs on wireless enough to have an idea!

So, I took some screenshots to visualize the situation. As you see the live sessions download speed varies between 35…40Mbps most of the time, with an overall average of 35Mbps. My installed system barely reaches 20Mbps in download speeds most of the time, with an overall average of 17Mbps. The upload speeds are quiet similar, but seem more stable on the live-session.

Live-Session Download

Live-Session Upload

Installed System Download

Installed System Upload

Any advice how to do this? Are you thinking of specific config files? Or some war to compare them easily?

Does the live ISO show the same module being used for the WiFi … ath9k?

Yes, it does, as I mentioned earlier:

Did you add in /etc/modprobe.d/ath9k.conf

options ath9k ps_enable=0
options ath9k nohwcrypt=1

You’ll have to reboot or reload the module.