1

Problem: WiFi is much slower on Ubuntu 22.04 LTS than on Windows 10. The connection has download speed around 21-26 Mb/s and similar upload, while on Windows and on iOS the download is 330-360 Mb/s.

Potential solution for Intel WNA: First thing You have to check in solving this problem is the Wireless Network Adapter(WNA) You have in your computer, second is the relevant Ubuntu driver for this WNA. If it's Intel's the solution may be to add line options iwlwifi 11n_disable=8 to the file /etc/modprobe.d/iwlwifi.conf or change the value of this parameter to 8 if the line's already there. This value allows 'aggressive TX'. In my case the hardware is Qualcomm Atheros QCA9377 802.11ac, so the above solution isn't suitable. The relevant driver is ath10k.

Informative commands:

$ iwconfig

$ lsmod | grep ath10k(=name of the wireless network adapter driver)

$ sudo dmesg | grep -e ath -e wl

$ sudo lshw -C network

$ nmcli device wifi list

$ sudo dmesg | grep ath | egrep "regdomain|Country"

$ sudo dmesg| grep beacon

$ iw reg get

Potential solutions:

  • sudo apt install firmware-atheros
  • sudo apt install linux-generic
  • sudo iwconfig wlp3s0 power off
  • sudo apt install --reinstall linux-firmware
  • Ipv6 method in the settings of currently used network entered via Gnome interface: automatic changed to disabled
  • Adding line: options cfg80211 ieee80211_regdom=XX (my country alpha2 code) to etc/modprobe.d/cfg80211.conf
  • Setting wifi.powersave = 2 (from 3) in etc/NetworkManager/conf.d/default-wifi-powersave-on.conf
  • Removing # before precedence ::ffff:0:0/96 100 in /etc/gai.conf
  • Checking for Additional drivers(that's the name of Ubuntu app)
  • Splitting the network into two separate 1 for each band (I did this by changing fiber optic modem mode from open to router in operator's web-app interface)
  • Trying 2.4Ghz band (also worse than on other systems)
  • Somebody solved the problem by up/down-grading to different version of kernel, but I prefer not to mess with it. My kernel is the latest currently available (6.2.0-37-generic).
  • Switching the backend component controlling wireless connectivity from wpa_supplicant to iwd setting it up manually.

None of the tried methods brought a significant change to the Wifi speed.

For solution, check the accepted answer.

Sources:


silver2
  • 31
  • Please check: modinfo iwlwifi | grep parm You will see, among others: parm: 11n_disable:disable 11n functionality, bitmap: 1: full, 2: disable agg TX, 4: disable agg RX, 8 enable agg TX (uint). So the parameter is certainly available. May we see: sudo dmesg | grep iwl – chili555 Dec 07 '23 at 23:00
  • "I don't know why it didn't work." Those are three different commands and are intended to be run one at a time. – chili555 Dec 08 '23 at 00:48
  • "My hardware is QCA9377 802.11ac Wireless Network Adapter from Qualcomm Atheros." Then why are you manipulating an Intel driver parameter if you are using an Atheros wireless device??? None of your 11n_disable parameters work because you have no Intel wireless. – chili555 Dec 08 '23 at 16:53
  • The driver is ath10k_pci. I suggest that you search for clues: sudo dmesg | grep -e ath -e wl Also, check my troubleshooting steps here: https://askubuntu.com/questions/1453583/intel-ax201-wifi-adapter-disconnecting-frequently/1453593#1453593 – chili555 Dec 08 '23 at 20:11
  • In addition to my new answer below, let's also see: sudo dmesg | grep -e wlp -e ath After the reboot I requested in my new answer, please. – chili555 Dec 11 '23 at 16:09
  • Nope. You are already running a more recent kernel version. May I see: nmcli device wifi list Only show your router and redact the MAC addresses with XX:XX. – chili555 Dec 12 '23 at 22:35
  • Please see: https://unix.stackexchange.com/questions/595116/wi-fi-powersaving-in-networkmanager I think you want 2 and not 0 in that file. – chili555 Dec 13 '23 at 16:11
  • I rewrited the post and added some info, a new output. After sudo apt update, when running sudo apt install firmware-atheros I get E: Unable to locate package firmware-atheros. I have working ath10k, but maybe that would help? I'm trying all what's possible. Should I go to the vendor site and download&install it manually or there's no sense in this? – silver2 Dec 13 '23 at 20:03
  • I may have found the solution, but need a confirmation and somebody to walk me through this step by step. START QUOTE: i have patched the ath driver and set the eeprom to germany and additionally i have applied an openwrt patch

    then I have rebuild the module with the option "Do not enforce EEPROM regulatory restrictions"

    link to the patch (must be adjusted depending on kernel version)

    https://github.com/openwrt/openwrt/blob/master/package/kernel/mac80211/patches/ath/402-ath_regd_optional.patch END QUOTE

    – silver2 Dec 13 '23 at 20:20
  • Your readings show: country PL: DFS-ETSI" i.e. the same as you set in the cfg80211.conf file. I doubt that you need to do anything further about the regulatory domain. I haven't any other suggestions. – chili555 Dec 13 '23 at 21:35
  • Cordial thanks for Your assistance, friend. – silver2 Dec 14 '23 at 06:25
  • The suggested Potential solution for Intel WNA works on my Intel WIFI card in Ubuntu 22.04 LTS.

    My Intel WIFI card has the following characteristics: *-network description: Wireless interface product: Wireless 7265 vendor: Intel Corporation

    These characteristics are just brief part of a more detailed output I got by using the command: sudo lshw -C network

    – Curiousone Dec 15 '23 at 10:27

2 Answers2

2

What worked in my case was to eject and inject the driver.

sudo modprobe -r ath10k_pci && modprobe ath10k_pci

These two commands have to be executed after each boot of the system, so if that's your solution, automatize it by creating a service that will be loaded by kernel at systen startup. Here's how to do it:

  1. Open a new file in nano

sudo nano /etc/systemd/system/ath10k-reload.service

  1. Add the content below and save (Ctrl+o Enter Ctrl+x)
[Unit]
Description=Reload ath10k_pci module to speed up Wifi
After=network-online.target
Wants=network-online.target

[Service] Type=simple ExecStart= modprobe -r ath10k_pci ExecStart= modprobe ath10k_pci

[Install] WantedBy=default.target

  1. Reload systemd Configuration Manager:

sudo systemctl daemon-reload

  1. Check if the service works properly:

sudo systemctl start ath10k-reload.service

  1. b) If not, look for the clues in logs:

cat /var/log/syslog | grep NetworkManager

  1. Enable the service at the startup:

sudo systemctl enable ath10k-reload.service

You're welcome.

Credits to @chilli555 for helping me throughout this process.

silver2
  • 31
1

We see this in your settings:

EEPROM indicates we should expect a direct regpair map

Find your regulatory domain here: http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2

Let's add the parameter the quick and easy way from the terminal:

sudo -i
echo "options cfg80211 ieee80211_regdom=IS" >> /etc/modprobe.d/cfg80211.conf
exit

Of course, substitute the two-letter code for your country for IS I used in the example. Also, remember these are three separate commands to be run once each in succession, each followed by Enter.

Reboot.

Is there any improvement?

chili555
  • 60,188