Lagging RPi Clients on 2.4 GHz

I've been chasing down strange lag / disconnect behavior observed over SSH with Raspberry Pi Zero W connecting to an OpenWRT AP on an IPQ4019. The symptoms are that the session seems non-responsive for several seconds, than comes back to life. It then "falls asleep" for a while.

Some articles have suggested setting IPQoS 0x00 in either or both the sshd config of the RPi, or the ssh config of the connecting client. In my case, this did not resolve the issue.

Running with two, different Zero Ws, a Zero 2, or a Pi 4 did not change the behavior, so it doesn't seem to be a hardware-compatibility issue.

I have only seen this on 2.4 GHz. The Pi3B+ and Pi4 both connect robustly on 5 GHz.

So far, turning off WMM on this one, specific VAP seems to have improved things. I can't say "resolved" as I think there is still a bit of hesitation, though a fraction of a second is far from the "Hello? Anyone there?" of before.

It may be related to power-save or QoS features of WMM. I have not determined.

As WMM has benefits in many situations, I have only disabled it on the single VAP where it seems problematic. Most of my other devices are on other VAPs (with WMM enabled).

I was recently able to resolve this, at least for RPi clients. It appears to impact 64-bit builds. These now include both Debian and Raspbian builds. The issue seems to be the power-control management by the RPi. There are several posts in various corners of the Internet that suggest that it is an SSH QoS issue, but it impacts pings as well.

You can try disabling power management with

iwconfig wlan0  # Can confirm that it is on
sudo iwconfig wlan0 power off 

There are several ways to resolve this "permanently". As I configure my network with Debian-style descriptions, I use:


# To enable wireless networking, uncomment the following lines and -naturally-
# replace with your network's details.
allow-hotplug wlan0
iface wlan0 inet manual
iface wlan0 inet6 manual
    wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
    wireless-power off

The key line there is wireless-power off

Your interface description may look different, depending on how you associate SSID selection and credentials with the interface and where you keep your definitions.

1 Like