Intel iwlwifi tempermental: long ping times during requests

post these* instead

systool -m iwldvm -av
lspci -k

also the firmware it's loading isnt right. get rid of the aur driver packages you installed, linux-firmware includes the iwlwifi driver.

this is the latest firmware from intel but there seems to be something wrong with wireless.kernel.org
check and see if your able to download this
http://wireless.kernel.org/en/users/Drivers/iwlwifi?action=AttachFile&do=get&target=iwlwifi-6000-ucode-9.221.4.1.tgz

systool -m iwldvm -av

Module = "iwldvm"

  Attributes:
    coresize            = "278528"
    initsize            = "0"
    initstate           = "live"
    refcnt              = "0"
    srcversion          = "09BAB36DB5C6655D359AB83"
    taint               = ""
    uevent              = <store method only>

  Parameters:
    force_cam           = "Y"

  Sections:
  • AUR package removed, do I need to reinstall linux-firmware?
  • The download link gives me a 404

what about lspci -k ??

something is up with wireless.kernel.org

I restarted after uninstalling the AUR package. Pings still go up with fast.com running, but it caps below 1000ms.

00:00.0 Host bridge: Intel Corporation 2nd Generation Core Processor Family DRAM Controller (rev 09)
	Subsystem: Dell 2nd Generation Core Processor Family DRAM Controller
	Kernel driver in use: snb_uncore
00:01.0 PCI bridge: Intel Corporation Xeon E3-1200/2nd Generation Core Processor Family PCI Express Root Port (rev 09)
	Kernel driver in use: pcieport
00:16.0 Communication controller: Intel Corporation 6 Series/C200 Series Chipset Family MEI Controller #1 (rev 04)
	Subsystem: Dell 6 Series/C200 Series Chipset Family MEI Controller
	Kernel driver in use: mei_me
	Kernel modules: mei_me
00:16.3 Serial controller: Intel Corporation 6 Series/C200 Series Chipset Family KT Controller (rev 04)
	Subsystem: Dell 6 Series/C200 Series Chipset Family KT Controller
	Kernel driver in use: serial
00:19.0 Ethernet controller: Intel Corporation 82579LM Gigabit Network Connection (Lewisville) (rev 04)
	Subsystem: Dell 82579LM Gigabit Network Connection (Lewisville)
	Kernel driver in use: e1000e
	Kernel modules: e1000e
00:1a.0 USB controller: Intel Corporation 6 Series/C200 Series Chipset Family USB Enhanced Host Controller #2 (rev 04)
	Subsystem: Dell 6 Series/C200 Series Chipset Family USB Enhanced Host Controller
	Kernel driver in use: ehci-pci
	Kernel modules: ehci_pci
00:1b.0 Audio device: Intel Corporation 6 Series/C200 Series Chipset Family High Definition Audio Controller (rev 04)
	DeviceName:  Onboard Audio
	Subsystem: Dell 6 Series/C200 Series Chipset Family High Definition Audio Controller
	Kernel driver in use: snd_hda_intel
	Kernel modules: snd_hda_intel
00:1c.0 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 1 (rev b4)
	Kernel driver in use: pcieport
00:1c.2 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 3 (rev b4)
	Kernel driver in use: pcieport
00:1c.4 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 5 (rev b4)
	Kernel driver in use: pcieport
00:1d.0 USB controller: Intel Corporation 6 Series/C200 Series Chipset Family USB Enhanced Host Controller #1 (rev 04)
	Subsystem: Dell 6 Series/C200 Series Chipset Family USB Enhanced Host Controller
	Kernel driver in use: ehci-pci
	Kernel modules: ehci_pci
00:1e.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev a4)
00:1f.0 ISA bridge: Intel Corporation Q67 Express Chipset LPC Controller (rev 04)
	Subsystem: Dell Q67 Express Chipset LPC Controller
	Kernel driver in use: lpc_ich
	Kernel modules: lpc_ich
00:1f.2 SATA controller: Intel Corporation 6 Series/C200 Series Chipset Family 6 port Desktop SATA AHCI Controller (rev 04)
	Subsystem: Dell 6 Series/C200 Series Chipset Family 6 port Desktop SATA AHCI Controller
	Kernel driver in use: ahci
	Kernel modules: ahci
00:1f.3 SMBus: Intel Corporation 6 Series/C200 Series Chipset Family SMBus Controller (rev 04)
	Subsystem: Dell 6 Series/C200 Series Chipset Family SMBus Controller
	Kernel driver in use: i801_smbus
	Kernel modules: i2c_i801
01:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Juniper XT [Radeon HD 6770]
	Subsystem: ASUSTeK Computer Inc. Juniper XT [Radeon HD 6770]
	Kernel driver in use: radeon
	Kernel modules: radeon
01:00.1 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] Juniper HDMI Audio [Radeon HD 5700 Series]
	Subsystem: ASUSTeK Computer Inc. Juniper HDMI Audio [Radeon HD 5700 Series]
	Kernel driver in use: snd_hda_intel
	Kernel modules: snd_hda_intel
04:00.0 Network controller: Intel Corporation Centrino Ultimate-N 6300 (rev 09)
	Subsystem: Intel Corporation Centrino Ultimate-N 6300 3x3 AGN
	Kernel driver in use: iwlwifi
	Kernel modules: iwlwifi

until a few weeks ago i had to use firmware from earlier this year before the problems with iwlwifi began. you can give that a try.

sudo pacman -S downgrade
DOWNGRADE_FROM_ALA=1 downgrade linux-firmware

select this version

linux-firmware 20190424.4b6cf2b-1

when it asks if you want to add it to IgnorePkg select no for now. if downgrading the firmware doesnt help after a reboot you can just run a sudo pacman -Syu and it will go back to the way it was.

reboot after you install the downgraded linux-firmware

2 Likes

You can temporarily test different iwlwifi driver options to see if your connectivity improves.

You can change the Intel iwlwifi drivers on the fly via rmmoding and modprobing.

Test one choice of options at a time by entering the following commands in the terminal individually.

Start at the top and work your way down the list, testing your connection for improvement after each change.

sudo lsmod | grep -o -e ^iwlmvm -e ^iwldvm -e ^iwlwifi | xargs sudo rmmod && sleep 3 && sudo modprobe iwlwifi swcrypto=1
sudo lsmod | grep -o -e ^iwlmvm -e ^iwldvm -e ^iwlwifi | xargs sudo rmmod && sleep 3 && sudo modprobe iwlwifi 11n_disable=8
sudo lsmod | grep -o -e ^iwlmvm -e ^iwldvm -e ^iwlwifi | xargs sudo rmmod && sleep 3 && sudo modprobe iwlwifi 11n_disable=1
sudo lsmod | grep -o -e ^iwlmvm -e ^iwldvm -e ^iwlwifi | xargs sudo rmmod && sleep 3 && sudo modprobe iwlwifi swcrypto=1 11n_disable=8
sudo lsmod | grep -o -e ^iwlmvm -e ^iwldvm -e ^iwlwifi | xargs sudo rmmod && sleep 3 && sudo modprobe iwlwifi swcrypto=1 11n_disable=1
sudo lsmod | grep -o -e ^iwlmvm -e ^iwldvm -e ^iwlwifi | xargs sudo rmmod && sleep 3 && sudo modprobe iwlwifi swcrypto=1 11n_disable=1 bt_coex_active=0
sudo lsmod | grep -o -e ^iwlmvm -e ^iwldvm -e ^iwlwifi | xargs sudo rmmod && sleep 3 && sudo modprobe iwlwifi swcrypto=1 11n_disable=8 bt_coex_active=0
sudo lsmod | grep -o -e ^iwlmvm -e ^iwldvm -e ^iwlwifi | xargs sudo rmmod && sleep 3 && sudo modprobe iwlwifi swcrypto=1 11n_disable=1 bt_coex_active=0 power_save=0
sudo lsmod | grep -o -e ^iwlmvm -e ^iwldvm -e ^iwlwifi | xargs sudo rmmod && sleep 3 && sudo modprobe iwlwifi swcrypto=1 11n_disable=8 bt_coex_active=0 power_save=0
sudo lsmod | grep -o -e ^iwlmvm -e ^iwldvm -e ^iwlwifi | xargs sudo rmmod && sleep 3 && sudo modprobe iwlwifi bt_coex_active=0 power_save=0 lar_disable=1
sudo lsmod | grep -o -e ^iwlmvm -e ^iwldvm -e ^iwlwifi | xargs sudo rmmod && sleep 3 && sudo modprobe iwlwifi swcrypto=1 11n_disable=8 bt_coex_active=0 power_save=0 lar_disable=1
sudo lsmod | grep -o -e ^iwlmvm -e ^iwldvm -e ^iwlwifi | xargs sudo rmmod && sleep 3 && sudo modprobe iwlwifi bt_coex_active=0 power_save=0 d0i3_disable=0 uapsd_disable=0  lar_disable=1

Those are some of the most commonly used options to improve connectivity with the iwlwifi driver. There are other options as well, but those are are the options that are commonly the most effective. Those options when executed from the terminal are not permanent. The modified driver option only persists until you reboot. The options can be made permanent by creating a configuration file in /etc/modprobe.d.

To permanently change the driver options, create the file:

/etc/modprobe.d/iwlwifi.conf

You can add any of the following lines to the iwlwifi configuration file to make the option(s) persistent::

options iwlwifi bt_coex_active=0
options iwlwifi bt_coex_active=1
options iwlwifi 11n_disable=1
options iwlwifi 11n_disable=8 
options iwlwifi swcrypto=1
options iwlwifi power_save=0
options iwlmvm power_scheme=1 
options iwlwifi d0i3_disable=1 
options iwlwifi uapsd_disable=1 
options iwlwifi lar_disable=1 

1st option: disables Bluetooth compatibility
2nd option: enables Bluetooth compatibility
3rd option: disables wireless N band
4th option enables antenna aggregation
5th option - adds software encryption
6th option - disables adapters power saving
7th option: another way to disable power saving (if also using the iwlmvm module)
8th option: disables the power save mode
9th option: disables the power save mode
10th option disables location aware regulatory

Adding a comment ( "# " pound sign) in front of any option disables it. Try any, or all options in different combinations. Simply comment out, or delete any option that doesn’t improve performance. You can also delete the /etc/modprobe.d/iwlwifi.conf file completely if you find it is of no benefit.

Reboot after making any permanent driver option change in /etc/modprobe.d /iwlwifi.conf for the option to take effect.

Hopefully testing some of the available iwlwifi driver options might help improve your connectivity.



Edit:

If you recieved an error message when running the above commands then you may need to try several different methods to change your options successfully.

If you received the following error:

rmmod: ERROR: missing module name.

Then run the following command:

sudo modprobe iwlwifi

Then execute the list of commands above sequentially to see if modifying your iwlwifi driver options can help improve your WiFi performance.


Revised Commands For Alternate Shells

If you are using a shell other than bash you may have to use a different version of the above commands so they will run successfully.

If you Recieved a list of errors similar to this:

grep: Documents: Is a directory
grep: Downloads: Is a directory
grep: Games: Is a directory

Then you will need to use the modified commands below.

Work your way down the list, running each command individually. Test your connection for improvement after running each command.

sudo -u $USER /bin/sh -lc 'lsmod | grep -o -e ^iwlmvm -e ^iwldvm -e ^iwlwifi | xargs sudo rmmod && sleep 3 && sudo modprobe iwlwifi swcrypto=1' 
sudo -u $USER /bin/sh -lc 'lsmod | grep -o -e ^iwlmvm -e ^iwldvm -e ^iwlwifi | xargs sudo rmmod && sleep 3 && sudo modprobe iwlwifi 11n_disable=8' 
sudo -u $USER /bin/sh -lc 'lsmod | grep -o -e ^iwlmvm -e ^iwldvm -e ^iwlwifi | xargs sudo rmmod && sleep 3 && sudo modprobe iwlwifi 11n_disable=1' 
sudo -u $USER /bin/sh -lc 'lsmod | grep -o -e ^iwlmvm -e ^iwldvm -e ^iwlwifi | xargs sudo rmmod && sleep 3 && sudo modprobe iwlwifi swcrypto=1 11n_disable=8' 
sudo -u $USER /bin/sh -lc 'lsmod | grep -o -e ^iwlmvm -e ^iwldvm -e ^iwlwifi | xargs sudo rmmod && sleep 3 && sudo modprobe iwlwifi swcrypto=1 11n_disable=1' 
sudo -u $USER /bin/sh -lc 'lsmod | grep -o -e ^iwlmvm -e ^iwldvm -e ^iwlwifi | xargs sudo rmmod && sleep 3 && sudo modprobe iwlwifi swcrypto=1 11n_disable=1 bt_coex_active=0' 
sudo -u $USER /bin/sh -lc 'lsmod | grep -o -e ^iwlmvm -e ^iwldvm -e ^iwlwifi | xargs sudo rmmod && sleep 3 && sudo modprobe iwlwifi swcrypto=1 11n_disable=8 bt_coex_active=0' 
sudo -u $USER /bin/sh -lc 'lsmod | grep -o -e ^iwlmvm -e ^iwldvm -e ^iwlwifi | xargs sudo rmmod && sleep 3 && sudo modprobe iwlwifi swcrypto=1 11n_disable=1 bt_coex_active=0 power_save=0' 
sudo -u $USER /bin/sh -lc 'lsmod | grep -o -e ^iwlmvm -e ^iwldvm -e ^iwlwifi | xargs sudo rmmod && sleep 3 && sudo modprobe iwlwifi swcrypto=1 11n_disable=8 bt_coex_active=0 power_save=0' 


4 Likes

Downgraded, rebooted, same problem unfortunately. Will upgrade to restore the kernel, reboot, and then try @tbg's suggestions next.

1 Like

Some other things you might want to consider checking/doing:

Is your bios up to date.

Is your router firmware up to date.

Have you tested your computer with another router.

Have you tested your computer on another network.

Have you tested out other Manjaro spins from a live boot disk. I would suggest the Manjaro Wayfire spin for troubleshooting purposes.

I would backup your routers config then reset your router back to the factory defaults.

Backup your bios config and reset your bios to the factory defaults.

Test at least these kernels 4.14, 4.19, 5.3, 5.4.

Please report on all my suggestions.

1 Like

I tested the twelve options. The best option seemed to be the last one; lowest ping overall (max was around 850ms with only one spike over 1200ms, compared to others that had lots of spikes around 1200+ms). However, I noticed it "skipped" pings quite a lot (icmp_seq skips by twos very, very often) - is it dropping packets?

Here's my raw data:

slowest ping saw while fast.com
baseline:		2400
1	3200
2	2400
3	1300
4	1800
5	1200
6	1200
7*	1200
8	1800
9	1350
10	953		drops lots of packets in ping (icmp_seq skips)	
11	1300
12	1300*	next-best was 850. lowest average overall but lots of icmp_seq skips

BIOS/Firmware are up-to-date. I don't have another router/network to test against. I am very wary of resetting my BIOS config, because it took me a couple of days to finally get dual-boot working correctly with all the UEFI configuration (I still don't quite understand how it works or how I fixed it).

I can reasonably try:

a) making options from #12 permanent via the config file (done)
b) reboot router
c) try another PC on the same router

I will report back once I collect the data.

2 Likes

Also, be sure to test the Wayfire edition for any improvements. It does not use network manager and may help troubleshoot your issue if performance is different.

You can also mix'n match different options in the following manner:

# iwlwifi driver configuration file location:
# /etc/modprobe.d/iwlwifi.conf
options iwlwifi bt_coex_active=0
#options iwlwifi bt_coex_active=1
#options iwlwifi 11n_disable=1
options iwlwifi 11n_disable=8 
options iwlwifi swcrypto=1
options iwlwifi power_save=0
options iwlmvm power_scheme=1 
options iwlwifi d0i3_disable=1 
options iwlwifi uapsd_disable=1 
options iwlwifi lar_disable=1 

Simply add a pound sign in front to cause any following text to be ignored.

1 Like
  • Rebooted after updating config file, max is now 1100ms
  • Another computer on the same network: ~600ms max
  • My USB drive gives me an error on format so I can't use it for Wayfire

I would definitely reset your router to the factory defaults at this point. You can backup your routers settings before resetting if you have a complex router configuration. I have experienced situations where only one computer on the network was experiencing problems and resetting the router fixed things up. It is a very common misconception that if other devices are working properly then the router could not be part of the issue. This is totally untrue as different devices can react very differently with the same router.

To reset your router to the factory default:

Unplug your routers power source for at least 30 seconds.

Press down and hold the recessed router reset button with a paperclip.

Plug in the routers power source while still holding down the reset button. Hold down the routers reset button for at least 30 seconds while the router powers up.

Release the reset button after 30 seconds and allow the router several minutes to complete its boot process.

This is a very important step that you really need to perform.

1 Like

What's interesting is that - while downloading the kernels - even though it's a big download, my ping times remain under 100ms. I suspect it could be uploading that causes the ping times to drop, but I don't know.

I reset the router to factory settings and it seems to have no discernible effect on the problem. I saw both fast ping times and an order of magnitude slower (10,000-13,000ms), but the average seems to be around the same (1000-1200ms when downloading via fast.com).

Installing additional kernels (5.x) seems detrimental. 4.14 or 4.19 seem to give the lowest ping times. I don't know if I did this correctly; I expected only one kernel to be installed at a time, but Manjaro Settings shows them all concurrently installed:

image

It occurred to me when you mentioned the router - that is one thing that is constant through all this (despite switching OSes). Another constant is the wireless card itself; perhaps it has some stateful information (goes into a bad state) which affects subsequent experiments.

The thing that bothers me is if the router is not the problem and the card is the problem, why does going back to my original USB card + Windows replicate the problem? The problem never existed there before.

Anyway, I'm back to ~600ms pings under load from fast.com. I don't think I will notice the problem. It does report that my speed is only 20mbps, which is on par with my previous (dysfunctional) USB device.

watch your ping times to the router itself while doing a speed test so you can see if it's the connection between your device and the router, or if it's from the router to the internet.

your router's ip is probably 192.168.0.1 or 192.168.1.1 . only you know which one it is so edit accordingly

ping 192.168.1.1

leave that running, you should see really low ping times <5ms . then watch that ping time while running speed tests. you might also try using meter.net instead of fast.com as it's more informative.

Well, this is interesting. I see the same problem when pinging the router. The problem doesn't reproduce as easily with meter.net, but it does reproduce, and appears to be during the download phase.

I also noticed that the RSSI of my PC is around -83dBm. Other devices are in the -60dBm range, which is reasonable. Other than jiggling the antannae at the back of the card (which doesn't seem to affect the RSSI), how can I improve it? Perhaps this is the root cause of my problem.

My USB wifi seems to get a signal of -73dBm, which is just within tolerance - but I still see the same issue of ping times.

you see big ping time increases from device to router while downloading? a slight increase of less than 5ms wouldnt be that important but more than that you should go in to your routers settings and change the channel and width on the band your using. if you have neighbors nearby with wifi and your both set to auto which most routers/gateways are then all of those routers end up playing a never ending game of finding the least congested channel.

for example, lets say your router sees the least amount of congestion on channel 1, then your neighbors router sees 1 also, once they both use channel 1 it then becomes more congested than the other channels and that cat and mouse game goes on forever. this is where "smart" devices become stupid. so try setting ch.3 @ 40mhz width on the 2.4ghz and try ch.36@40-80 on 5ghz if you have it.

also check the router settings to see if there are transmitting power settings and put them to highest available. if your neighbors wifi always see ch.1 and ch.36 always being used they will likely auto-find a different one to use.

also: if you want to confirm that the problem is between device/router you can plug the ethernet cable right from the modem into your machine if possible and see if those ping issues are there over lan.

2 Likes

@dglt yes, my ping time from device to router, while downloading (intially) increases from 5-50ms to a range of 1100-2300ms. Changing the channel from auto/6 to 3@40mhz seems to stabilize the pings around 800ms max.

It's quite a long route from router to machine, I will work on the cabling now and report back.

might be time for a router upgrade, especially if your in an area where there are a lot of other access points. if this behavior is new and it happens on other devices as well i would start looking for a replacement router. the further away devices are from the router, the more ping times suffer and since you mentioned

those are not good numbers, i get better numbers from neighbors down the street :sweat_smile:

Forum kindly sponsored by