Linux WiFi DPM Latency: Diagnosing and Fixing Delays
If you're seeing intermittent ping spikes over WiFi on Linux — consistent latency of 1–5ms most of the time, punctuated by periodic spikes of 50–300ms — and the same hardware performs fine on Windows or without the latency pattern on Ethernet, Dynamic Power Management in the WiFi driver is almost certainly the cause. DPM allows the WiFi radio to enter a low-power sleep state during idle periods. Waking it up costs time, and that wakeup latency appears as a spike on the first packet after any brief idle period. This page covers how to confirm DPM is the cause, which commands disable it at runtime, and how to make the change persist across reboots and network manager reconnections. The context is primarily Intel iwlwifi, which is the most common Linux WiFi driver after replacing Broadcom hardware. See the technote section for related hardware notes, and replacing Broadcom WiFi with Intel for the hardware upgrade that often precedes this configuration step.
How DPM causes latency
WiFi Dynamic Power Management (also called Power Save Mode, PSM) allows the WiFi adapter to enter a sleep state when no data is pending. In sleep mode, the adapter periodically wakes to check for buffered frames at the access point — this interval is called the DTIM (Delivery Traffic Indication Message) interval. A packet arriving just after the adapter sleeps must wait until the next DTIM wakeup before it's delivered. At a DTIM interval of 100ms (a common AP default), worst-case latency for an otherwise unloaded WiFi connection becomes 100ms just from power management wakeup delay.
The pattern is highly characteristic: ping output shows consistent baseline latency (perhaps 2–4ms) broken by periodic spikes, often every 100ms or every 1–2 seconds, depending on the DTIM interval. The spikes are regular enough that they look almost like clockwork in a ping log — because they are.
Running a continuous low-frequency ping at 5-second intervals will often not show the DPM spikes, because the radio wakes fully during the inter-probe interval. Running at 0.1-second intervals consistently shows them. The most diagnostic command is ping -i 0.05 <gateway> — a 50ms interval ping to the local gateway. If results cluster into two latency bands (2–3ms and 50–200ms), DPM is the cause. If all results are consistently 2–3ms, DPM is disabled or the radio is not sleeping.
Diagnosing DPM status
Before changing anything, confirm that power management is currently enabled:
# Check power save state via iw (modern method):
iw dev wlan0 get power_save
# Output: "Power save: on" or "Power save: off"
# Alternative via iwconfig (older method, still works):
iwconfig wlan0 | grep 'Power Management'
# Output: "Power Management:on" or "Power Management:off"
# Replace wlan0 with your interface name if different:
ip link show | grep -E 'wlan|wlp'
# High-frequency ping to local gateway — watch for bimodal distribution:
ping -i 0.05 192.168.1.1
# Replace with your gateway IP: ip route | grep default
Disabling DPM at runtime
The runtime change takes effect immediately and persists only until the next reconnect or reboot:
# Via iw (preferred):
sudo iw dev wlan0 set power_save off
# Via iwconfig (alternative):
sudo iwconfig wlan0 power off
# Verify the change:
iw dev wlan0 get power_save
# Should now show: Power save: off
After disabling, re-run the diagnostic ping. Latency should flatten to the baseline without spikes. If spikes persist after disabling DPM, they have a different cause — check for DHCP lease renewals, DNS timeouts, or access point firmware issues.
Making the change persistent
NetworkManager resets power management settings on each reconnect, which means runtime iw changes are overwritten when WiFi reconnects after sleep, network change, or reboot.
# Create a NetworkManager configuration file:
sudo tee /etc/NetworkManager/conf.d/wifi-powersave.conf << 'EOF'
[connection]
wifi.powersave = 2
EOF
# Value 2 = disabled. Value 3 = enabled. Default is controlled by NM.
# Restart NetworkManager to apply:
sudo systemctl restart NetworkManager
For systems not using NetworkManager (systemd-networkd, connman, manual wpa_supplicant), the approach differs:
# For iwlwifi — set in kernel module configuration:
echo 'options iwlwifi power_save=0' | sudo tee /etc/modprobe.d/iwlwifi-powersave.conf
# Rebuild initramfs to include the change:
sudo update-initramfs -u # Debian/Ubuntu
# or:
sudo dracut --force # Fedora/RHEL
# Reload the driver (or reboot):
sudo modprobe -r iwlwifi && sudo modprobe iwlwifi
The iwlwifi power_save=0 module option and the NetworkManager wifi.powersave = 2 option operate at different layers. The module option affects the driver-level default; the NetworkManager option overrides it per-connection after the driver loads. Setting both is redundant but not harmful. For systems where NetworkManager is present, the NM configuration file is sufficient and the module option is unnecessary.
Battery impact
Disabling DPM increases WiFi power consumption. The practical impact on battery life depends on usage pattern: a machine running video conferencing all day loses almost nothing, because the radio is continuously active regardless of DPM. A machine in light browsing use where the radio frequently goes idle may see 30–60 minutes less battery life on a full charge.
Some users disable DPM and then report that battery life degraded significantly — sometimes several hours. This usually indicates they have a driver or firmware issue causing the radio to consume abnormal power when DPM is disabled, not that the DPM tradeoff is inherently poor. Cross-check with powertop to see per-device power consumption before concluding that DPM is responsible for the drain.
Practical expectation
For machines used for video calls, SSH sessions, remote desktop, or any latency-sensitive application, disabling DPM is a clear-cut improvement. The latency improvement is large (eliminating 100–300ms spikes) and consistent. For machines used primarily for large file transfers or background sync, DPM's impact is negligible and leaving it enabled for battery life is reasonable.