I have a Raspberry Pi4 that had been operating with no problems for months hosting several services (including WireGuard and Jellyfin (with an attached USB drive)) via an Ethernet connection to the router. However, a few days ago, it became unresponsive - ssh
and ping
acted as if the device was non-existent, and the services were unresponsive.
While debugging, I was able to enable WiFi and connect to the Pi via the Wifi-associated IP address. However, if I connect the Pi to the router via Ethernet cable (which was the previously-working sole internet connection), either while the Pi is running or before starting up, not only is the Pi not accessible via Ethernet, but it also becomes inaccessible via WiFi too - ping
s timeout, ssh
cannot connect, etc. The Pi itself also entirely loses the ability to connect to external sites while the Ethernet cable is plugged in.
I would like to restore the Pi's ability to connect to the Internet via Ethernet. Being able to do so while also offering WiFi connectivity would be a bonus, but not absolutely necessary - Ethernet is the priority.
Various log files (where appropriate, truncated to immediately after plugging in the Ethernet cable), which seem to show an exception (that is far beyond my ability to interpret):
- dmesg
- /var/log/kern.log
- /var/log/syslog
/etc/dhcpcd.conf
before and after connecting the Ethernet cableip route
output before and after connecting the Ethernet
More info:
- /etc/network/interfaces - note that
ls -a /etc/network/interfaces.d
shows no files - ifconfig before and after Ethernet cable is connected
Other debugging information:
sudo apt update -y && sudo apt full-upgrade -y
gives0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded
- content of/etc/os-release
is here- I've tried using different Ethernet Cables and different power cables - same behaviour. All this testing was done without the USB drive plugged in, to discount power-related issues (though, to be clear, the Pi had been successfully running with the USB drive connected for months)
- The router is a Sonic-provided Pace Plc 5268AC. It has a DHCP server that is configured to give out address
192.168.42.111
to the Pi via an Ethernet connection, and192.168.42.110
to the Pi via a Wifi connection avahi
mDNS is running on the Raspberry Pi, allowing me (when the Pi has connectivity) to pingrasxi.local
[sic -hostname
israsxi
] successfully- If I disable Wifi (
sudo ifconfig wlan0 down
) and plug in the Ethernet cable, I still have no connectivity to or from the Pi - There is another device (in fact, another Raspberry Pi - running HomeAssistantOS) connected via Ethernet to the router, with no issues.
Other research I've done:
- This question describes WiFi dropping when Ethernet cable is plugged in, but differs in that, in that case, the Pi is then accessible via Ethernet (in my case, the Pi is entirely inaccessible on either interface when Ethernet is connected)
- More interface dependency - but, here, Wifi only works when Ethernet is plugged in, whereas in my case Wifi only works when Ethernet is not plugged in.
- The answer to this question suggests a power issue - however, I suspect this is not the case, because:
- the Pi remains up and usable (albeit only via directly connected keyboard/monitor, not via network) when Ethernet is connected
- the original problem was that the Pi's sole Ethernet connection became unavailable, before I even introduced a new
- and, the dependencies are the wrong way around - in this case, connecting to WiFi disconnects the Ethernet connection, whereas in my case connecting Ethernet disconnects the Wifi (and, even if I disable Wifi, connecting Ethernet directly still results in no connectivity)
- Most of the above are referencing
/etc/network/interfaces
, which I see from here is considered obsolete
UPDATE (2022-02-01): thanks for the tips in comments!
- "which model pi is it" - This is a Raspberry Pi 4 (I've also updated the content above to clarify this).
- "you've configured a static address in dhcpcd.conf anyway" - I've not intentionally changed
dhcpcd.conf
- any content there arose as an unexpected and unknown outcome of other operations. - "I honestly wonder if the Ethernet controller in this particular Pi was a QC escapee. Another thought, if the other Pi you have running HomeAssistantOS is equivalent, what happens if you swap the SD cards?" - the HomeAssistantOS is on a Raspberry Pi 3 so that wouldn't be a like-for-like swap, but thankfully I did have another RPi4 lying around (you can never have too many :P ) - I swapped the SD cards, and on this new hardware the system started up and listened on Ethernet as expected. Hopefully, this will stay up for good - but, if the Ethernet connection degrades over time on this new hardware, I'll loop back here, and investigate the LED subsystem.
/etc/dhcpcd.conf
- also ouptut ofip route
- before and after – Bravo Jan 17 '22 at 06:53It has a DHCP server that is configured to give out address 192.168.42.111 to the Pi via an Ethernet connection
but you've configured a static address in dhcpcd.conf anyway - shouldn't be an issue though – Bravo Jan 18 '22 at 02:50rmmod
the Ethernet driver chain (so,bcmgenet
, whatever depends on it, and maybe for good measure whatever other network-looking things you can think of) and reload everything reliably? Likely not;rmmod
will likely require-f
, and you may want a USB UART cable on the serial pins to grab the probably-ensuing kernel panics. I honestly wonder if the Ethernet controller in this particular Pi was a QC escapee. Another thought, if the other Pi you have running HomeAssistantOS is equivalent, what happens if you swap the SD cards? – i336_ Jan 30 '22 at 05:33