Earlier Raspberry Pis had issues with the wireless power management. Other answers have covered this. The power management can be turned off (until reboot) with iwconfig wlan0 power off
or iw wlan0 set power_save off
to check whether this helps.
Old Raspberry Pis that use ifupdown configure the wlan0
interface in /etc/network/interfaces
. In those machines the setting can be made permanent by
adding wireless-power off
under the wlan0
definition. In newer machines you may be able to disable it by configuring the kernel module in /etc/modprobe.d/
. Note that there are several different Realtek wireless drivers that your system may use: 8192cu, rtl8192cu, rtl8xxxu. You can alternatively type crontab -e
and add the following line, making the command to be called at reboot:
@reboot sudo iw wlan0 set power_save off
Raspberry Pi 4 shouldn't have the same problem with power management, but there's another issue with dhcpcd that recent Pis use for configuring network interfaces. If you can connect a keyboard and a monitor, check whether dhcpcd is running (systemctl status dhcpcd
). It may happend that dhcpcd is killed wtih SIGSEGV when running Docker containers that define virtual networks. In this case you should see the following message when you type grep dhcpcd /var/log/daemon.log
:
systemd[1]: dhcpcd.service: Main process exited, code=killed, status=11/SEGV
The solution is to disable dhcpcd for virtual networks. Add the following line to /etc/dhcpcd.conf
:
denyinterfaces veth*
dmesg
? How is RPI connected to the network? Via a router? What's in the router's logs? If you re-plug the ethernet cable to RPI, will it bring it back to the network? – abolotnov Feb 25 '13 at 16:00