9

One of the common solutions for improving WiFi signal is to use this command

options iwlwifi 11n_disable=1

in

/etc/modprobe.d/iwlwifi.conf

And the number can be 0, 1, 2, 8.

I was unable to find a manual for this command. What do these numbers do? And how should we choose among the available options?

2 Answers 2

8

From the terminal command:

modinfo iwlwifi

parm: 11n_disable:disable 11n functionality, bitmap: 1: full, 2: disable agg TX, 4: disable agg RX, 8 enable agg TX (uint)

I am unaware of and have been unable to locate further documentation.

And how should we choose among the available options?

In most cases, if the router is set up optimally, that is, WPA2-AES and not any mixed mode, and set to a fixed channel, not auto-channel select, we need none of them.

However, if we are connecting at work, university or a library where we have no option to reconfigure the router to suit our preferences, it is sometimes helpful to try each in turn until we connect reliably. Generally =8 is most helpful, followed by =1. I have never encountered a case helped by any other of the other options.

6

My problem was terrible upload speeds on just some WiFi networks, on Ubuntu 19.04. Neither 11n_disable=1 nor 11n_disable=8, the two settings I've seen recommended, worked for me; the former improved upload speeds but cut download speeds in half, and the latter did nothing. I experimented and found that 11n_disable=2 boosted my upload speed by 700%, but at the price of decreasing my download speed by 12%. That's a reasonable tradeoff when otherwise the upload speed is unusable, but I didn't want to take the decreased download speed on WiFi networks whose upload speed was fine without changing the setting. So I wrote a script to check with WiFi network I'm using and adjust the setting accordingly. I published it on my blog (https://blog.kamens.us/2019/08/03/mitigating-wifi-upload-speed-issues-on-lenovo-ideapad-s340-running-linux/) with more details in case it might be useful to others.

However, I know Stack Exchange doesn't like answers to depend on external links, so here's the script. It needs to be installed as root, mode 0755, in /etc/NetworkManager/dispatcher.d.

#!/bin/bash -e

WHOAMI=$(basename $0)
IFACE="$1"; shift
ACTION="$1"; shift

log() {
    level="$1"; shift

    logger -p daemon.$level -t "$WHOAMI" $@
}

if [ "$ACTION" != "up" ]; then
    log debug ignoring action $ACTION
    exit 0
fi

state=$(cat /sys/module/iwlwifi/parameters/11n_disable)

log notice previous 11n_disable state is $state

if [ "$CONNECTION_ID" = "bad-wifi-network-name" ]; then
    want_state=2
else
    want_state=0
fi

if [ "$state" != "$want_state" ]; then
    log notice reloading iwlwifi with 11n_disable=$want_state
    if ! rmmod iwlmvm iwlwifi; then
        log err rmmod iwlmvm iwlwifi failed
        exit 1
    fi
    if ! modprobe iwlwifi 11n_disable=$want_state; then
        log err modprobe iwlwifi 11n_disable=$want_state failed
        exit 1
    fi
    if ! modprobe iwlmvm; then
        log err modprobe iwlmvm failed
        exit 1
    fi
    log notice finished reloading iwlwifi with 11n_disable=$want_state
else
    log notice 11n_disable is correct, taking no action
fi
1
  • in my case, no value other than 1 works for me. the Wifi adapter simply fails to connect to the Wifi. dmesg output indicates association with <MAC> timed out
    – asgs
    Feb 8 at 15:12

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .