Wifi stops working RPi 4

Forgive me if this is a newbie question, but I just got a new RPi 4, and flashed an SD with Volumio on it. I had no problem going through the initial setup, and playing songs off my file server. I even got it to work with one of my USB DACs. Very happy with the overall performance.

However, I seem to be plagued with an issue where the wifi goes to sleep? I’m not sure. I can’t reach it via the webpage anymore, nor ping its IP. If I hook up a KVM to the RPi I can still interact with it. If I type “reboot” everything comes back up and works again. But it’s only a matter of time until the wifi stops working. Sometimes it’s an hour or two, sometimes it’s 15 minutes.

Is this a known bug with RPi 4, or with Volumio? I do have a RPi 3b around here somewhere, if you think that would resolve the issue. (Although I’d prefer the additional horsepower of the 4 model if possible)

I’m far from a Linux whiz, but if you know any CLI commands I can run to troubleshoot I’m all ears.

Not convinced it’s a Pi 4B issue as I have the same problem with a Sony 3B and at one point I could not wake it up at all so remade the SD card!

This afternoon it took close to 5 minutes to wake up.

Not sure if it’s a power issue - I have a 2.5" HDD and Logitech mouse / keyboard adapter in the USB ports but am running an official power supplier and not seen any issues under Raspbian with this set up. In fact, for the last week I’ve been running Raspbian and not seen any response issue to SSH enquires at random times.

Next thoughts are to try:

  • Move some music over to the SD card and drop the HDD to see if that changes anything.
  • Try the WD PiDrive I have
  • Put a ping job on the music box to keep it doing something
  • Put a ping task on another machine to keep the link up
  • Swap to Ethernet
  • Stop joining the home WiFi and use the Access Point mode

I know I have WiFi issues caused by flakey broadband (I live in the country miles away from the exchange) but I cannot say 100% the issues are connected (e.g. today’s slow wake was after a day of fine WiFi and it’s a new install).

Hi Paul,

I’m currently running Volumio on an RPi 4, and leave it (and the amp) on overnight without networking issues the next morning, so I don’t think its a problem with the Volumio/RPi4 combo. When it drops the network connection and you get on the console, try typing “ifconfig wlan0” and comparing the output to this:

[code]volumio@volume:~$ ifconfig wlan0
wlan0 Link encap:Ethernet HWaddr dc:a6:32:2a:f1:ce
inet addr:192.168.86.30 Bcast:192.168.86.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:617090 errors:0 dropped:87 overruns:0 frame:0
TX packets:413018 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:679549860 (648.0 MiB) TX bytes:42397519 (40.4 MiB)

[/code]

It should have an IP address that is legit for your home network and it should have “UP” in the line below the IP address line, otherwise the interface somehow lost its configuration.

There are some old messages about network power management biting users, but those are some a long time ago. We’re running comparable configs, so if network power management isn’t hitting my setup, it shouldn’t hit yours.

improvements-for-wireless-t1555.html

I don't suppose you've done a manual linux package update on your volumio server? I read somewhere that the volumio environment is a little brittle and manual package updates may break the config.

I want to eventually try the REW plugin, and maybe mess around with the software crossovers feeding into a multi-channel DAC, so I want to stick with the RPi4 or Asus Tinkerboard, but an RPi3b may be perfectly adequate for running Volumio if you need to downgrade. I don't think its the RPi 4 though.

ps.

I found this thread: wifi-connect-t9165.html
In it, the main dev, Michaelangelo says that volumio automatically attempts to reconnect to your AP, but you have to disable the fallback to Hotspot in your wireless settings. Maybe when your Volumio disappears, it has fallen back to the internal “Volumio” hotspot. Might check your list of available SSIDs next time your server goes off the air.

I know in my case no updates have been done.
The image is the latest downloadable image and I have not had the app even check for updates.

If I run

sudo iwconfig wlan0

(Note the sudo) then I get:

wlan0 IEEE 802.11 ESSID:"redacted" Mode:Managed Frequency:2.462 GHz Access Point: redacted Bit Rate=72.2 Mb/s Tx-Power=31 dBm Retry short limit:7 RTS thr:off Fragment thr:off Encryption key:off Power Management:off Link Quality=57/70 Signal level=-53 dBm Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0 Tx excessive retries:39 Invalid misc:0 Missed beacon:

Key thing being power management is off so it’s not dropping down during quiet periods.
The excessive retries are so low they really do not bother me and are stable today.

The signal level is not great but the AP is not in a brilliant position (neither is the Pi) but again it’s OK for the amount of traffic to this box.

One change I have done, I just noticed now, is that I have connected the Pi to my 2.4Ghz network and not the 5Ghz one this time. Given the slow response today then I’m not convinced that’s the fix.

The other thing I have ruled out is something odd happening with DHCP leases. My Pi has been issued a permanent lease by the router and nothing else can get that address here.

The box has been stable with the new build so far with the HDD plugged in.

One change I have noticed is that I have not added the max power line to the user config file as that is in the system file. I cannot believe that having the same entry twice would cause an issue though.

I do have the older image on my Mac - I’ll get that set up and check if it dies again.

Wonder if it’s a power down issue - I know I pulled the wrong plug :blush: once when going to reset the Amazon stick (it was using a Pi PSU at the time) though the box was at rest (i.e. not playing anything)?

Well I cannot break it again - other than pulling the plug I’ve now tried most things I can think of to reproduce the error.

I know my image was downloaded and written fine, the disk and Pi are the same so I’m stuck.