Documentsenhancing-raspberry-pi-wi-fi-stability-by-turning-off-power-management

Enhancing Raspberry Pi Wi-Fi Stability by Turning Off Power Management

Switch off Wi-Fi power saving on the Pi so your player stays connected.

Wi-Fi power management saves power by turning off the Wi-Fi module when it is not transmitting data. That helps battery powered devices, but on a Raspberry Pi player a stable connection matters more than saving power.

Turn power management off

Either of these commands works.

/sbin/iwconfig wlan0 power off
sudo iw dev wlan0 set power_save off

To check the status run the command below. The output should show power management as off.

sudo iwconfig
Power Management:off

Make it persist after a reboot

Run this command so that the setting survives a reboot.

sudo nmcli connection modify "$(nmcli -t -f DEVICE,CONNECTION device | awk -F: '$1=="wlan0"{print $2}')" 802-11-wireless.powersave 2

More details are in this article.

For other network problems see How to troubleshoot network connectivity.