raspberrypi / firmware

This repository contains pre-compiled binaries of the current Raspberry Pi kernel and modules, userspace libraries, and bootloader/GPU firmware.
5.15k stars 1.68k forks source link

/sys/class/net/eth0/carrier stuck in 0 #1698

Open MPParsley opened 2 years ago

MPParsley commented 2 years ago

Describe the bug /sys/class/net/eth0/carrier stuck in 0

To reproduce Unplug cable and replug it, /sys/class/net/eth0/carrier becomes 1 Reboot, /sys/class/net/eth0/carrier is now stuck in 0 until the cable is unplugged and replugged again

Expected behaviour Once the cable is plugged I expect /sys/class/net/eth0/carrier to be consistently 1

Actual behaviour /sys/class/net/eth0/carrier stuck in 0

System

Additional context The device is running on an original Raspberri Pi 4 power supply. This issue came up after a reboot.

pelwell commented 2 years ago

This works correctly for me on 5.10.63 (the oldstable rpi-firmware branch) and on 5.15.24 (the default rpi-firmware branch).

Do you possibly have some device (HDMI or USB) that might be back-powering the Pi4, preventing it from rebooting correctly? Have you tried with a different Ethernet switch?

MPParsley commented 2 years ago

Same issue with different switch/hdmi.

pelwell commented 2 years ago

Can you confirm the outcome of the following scenarios (some may have been covered already, but I want them all together)?

Possible outcomes are:

Note that it shouldn't be possible for eth0 to have an IP address without a carrier, I'm just being careful. The scenarios are (allow a reasonable interval between each step - a few seconds to detect a cable being unplugged longer for plugging it in, perhaps 10 seconds):

  1. Power up the Pi4 with the ethernet cable attached, reboot.
  2. Power up the Pi4 with the ethernet cable detached, plug in the cable, reboot.
  3. Power up the Pi4 with the ethernet cable attached, unplug the cable, reboot, plug in the cable.
  4. Power up the Pi4 with the ethernet cable attached, unplug the cable, plug the cable back in reboot.
MPParsley commented 2 years ago

Hi @pelwell, thank you for following this up.

I started the tests but results aren’t consistent. I keep getting random carrier 1 or 0. As the carrier signal was erratic I tested several different network cables but this resulted in more random statuses, sometimes a cable worked sometimes it didn’t. At first I thought there was an issue with the cable but then I got a carrier signal and could use the device until network connection drops after a random time. I never had issues with any of the cables before.

There’s definitely a hardware issue here.