Linux on the Dell XPS: Fixing AX201 Wi-Fi performance

Jonathan Bowman Created: April 06, 2022 Updated: June 24, 2023 [Linux] #config #wifi #linux 📶 💤

I am very happy with Linux on my Dell XPS 13 9310. I use the latest version of Fedora (38 at the time of this writing).

However, the Wi-Fi connection gave me great difficulty for months before I learned that performance is much better with the power saving functionality turned off. With power saving on, I would often lose packets right and left. Here are the steps to fix this.

Prior to the fix, this was a typical ping session:

[bowmanjd@lappy386 ~]$ ping
PING ( 56(84) bytes of data.
64 bytes from icmp_seq=3 ttl=64 time=223 ms
64 bytes from icmp_seq=4 ttl=64 time=1.15 ms
64 bytes from icmp_seq=5 ttl=64 time=15.3 ms
64 bytes from icmp_seq=6 ttl=64 time=1.56 ms
--- ping statistics ---
6 packets transmitted, 4 received, 33.3333% packet loss, time 5075ms
rtt min/avg/max/mdev = 1.147/60.182/222.714/94.010 ms

Note the first two dropped packets. Sometimes more, sometimes less. At first, I blamed our wireless access point, yet no other client device had this problem. Finally, I booted into Windows on the XPS and noticed much better wireless performance. Clearly, this is a driver issue of some sort.

There may be a variety of solutions for this, and I suspect this will one day be fixed in the kernel, but here is how I solved it for now.

🔗The NetworkManager solution

For Linux distros using NetworkManager, add a new configuration file to the /etc/NetworkManager/conf.d/ directory. Name it something like disable_power_save.conf with the contents:

wifi.powersave = 2

Elevate to root first using sudo or similar.

One command can do it all:

printf "[connection]\nwifi.powersave = 2\n" | sudo tee /etc/NetworkManager/conf.d/disable_power_save.conf

Then restart NetworkManager with:

sudo systemctl restart NetworkManager

Test the performance with ping, and there should be a marked improvement.

🔗wifi.powersave config options

NetworkManager has several configurable options for wireless adapter settings, including powersave. You can read about them in the API documentation. There, we discover the following powersave options:

In this case, I want to disable Wi-Fi power saving, thus the value of 2 in the config file, set with

wifi.powersave = 2

🔗Detecting and setting the power-save setting on the wireless card

With or without NetworkManager, the power save setting of the AX201 and other Wi-Fi cards can be read with the iw command.

First, find the name of your wireless adapter with iw dev or to get just the name:

iw dev | grep -o 'Interface.*'

The wireless adapter likely starts with “wl”. Mine is wlp0s20f3, so the following works to get the current powersave setting:

iw dev wlp0s20f3 get power_save

If you have already made the NetworkManager config changes and restarted NetworkManager, then the result should be Power save: off.

A similar command can be used to turn power_save back on:

iw dev wlp0s20f3 set power_save on

🔗Awaiting other solutions…

Of course, I hope that a driver solution comes soon with new kernel releases. Likely the above solution will not be necessary long term. If you have encountered other ways to solve this problem, please feel free to contact me.

🔗Other resources

Back to top