-
Notifications
You must be signed in to change notification settings - Fork 5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Raspberry Pi 5 sometimes has no LAN connection after booting #6420
Comments
There's an obvious contradiction in those statements - getting an IP address from the DHCP server requires traffic in both directions - but I'm not doubting the truth of what you say.
|
sudo ifconfig end0 Using sudo ifconfig end0 down and sudo ifconfig end0 up will restore the network connection. |
And the answer to question 1? |
|
Bad state report After cable replug: Bad state ping: and sudo ifconfig end0 Network manager restart and sudo dhclient -v do not work on RPI |
I have one more clue. The loss of network connection seems to occur already in the bootloader. I started RPI5, pressed SHIFT. RPI loaded Network installer and then lost network connection. Could not use Network installer. Replugging the network cable solved the problem. All of this means that the network connection problem will occur even before Linux is booted. |
Hi, Did you find any solution to this problem? I apologize for my English language. |
Hi. ifconfig eth0 down This will ensure that the LAN disconnects on boot and connects immediately. So far it seems to be working. Instructions: find out LAN port names using ifconfig. Mine is called eth0. It was also called end0. then: sudo nano /etc/systemd/system/network-restart.service insert content: [Unit] [Service] [Install] then |
Hi Radek, Thank you for your advice.
Unfortunately, this solution does not work either. OS: Ubuntu noble 24.04 aarch64 Thank you Radek |
Describe the bug
My raspberry Pi 5 sometimes (about one in seven) boots has no network connection. The Rpi receives an IP address from the DHCP server, but cannot ping any IP address from it. Interestingly, it is possible to ping the Rpi's IP address. The problem will be solved by disconnecting and then connecting the LAN cable or sudo ip link set end0 down and sudo ip link set end0 up. It's totally frustrating. I'm using Raspbian Bookworm with the latest update with Network manager. I know a similar problem was solved with Raspberry Pi 4 by adding genet.force_reneg=n to cmdline.txt. Unfortunately this doesn't work. Can anyone advise how to resolve this?
Steps to reproduce the behaviour
I turn on or reboot the RPI5.
Sometimes the RPI does not have LAN access.
If this happens, the RPI will receive an IP address from the DHCP server and can be pinged from the router. It is not possible to ping any IP address from the RPI5.
Disconnecting and reconnecting the LAN cable will solve the problem. Or using sudo ip link set end0 down and sudo ip link set end0 up.
Device (s)
Raspberry Pi 5
System
cat /etc/rpi-issue
Raspberry Pi reference 2024-03-15
Generated using pi-gen, https://github.com/RPi-Distro/pi-gen, f19ee211ddafcae300827f953d143de92a5c6624, stage2
vcgencmd version
2024/10/10 00:36:47
Copyright (c) 2012 Broadcom
version 0e63dd5e (release) (embedded)
uname -a
Linux raspi5 6.6.44-v8+ #1789 SMP PREEMPT Mon Aug 5 15:22:52 BST 2024 aarch64 GNU/Linux
Logs
ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host noprefixroute
valid_lft forever preferred_lft forever
2: end0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether 2c:cf:67:5a:36:5b brd ff:ff:ff:ff:ff:ff
inet 192.168.100.180/24 brd 192.168.100.255 scope global dynamic noprefixroute end0
valid_lft 42914sec preferred_lft 42914sec
3: wlan0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
link/ether 2c:cf:67:5a:36:5c brd ff:ff:ff:ff:ff:ff
ping 192.168.100.1
PING 192.168.100.1 (192.168.100.1) 56(84) bytes of data.
From 192.168.100.180 icmp_seq=10 Destination Host Unreachable
ip route
default via 192.168.100.1 dev end0 proto dhcp src 192.168.100.180 metric 20100
192.168.100.0/24 dev end0 proto kernel scope link src 192.168.100.180 metric 100
dmesg | grep end0
[ 1.047081] macb 1f00100000.ethernet end0: renamed from eth0
[ 5.046914] macb 1f00100000.ethernet end0: PHY [1f00100000.ethernet-ffffffff:01] driver [Broadcom BCM54213PE] (irq=POLL)
[ 5.046925] macb 1f00100000.ethernet end0: configuring for phy/rgmii-id link mode
[ 9.150906] macb 1f00100000.ethernet end0: Link is Up - 1Gbps/Full - flow control tx
dmesg | grep eth0
[ 0.698702] macb 1f00100000.ethernet eth0: Cadence GEM rev 0x00070109 at 0x1f00100000 irq 112 (2c:cf:67:5a:36:5b)
[ 1.047081] macb 1f00100000.ethernet end0: renamed from eth0
sudo journalctl -e -f -u NetworkManager.service
říj 15 17:42:07 raspi5 systemd[1]: Starting NetworkManager.service - Network Manager...
říj 15 17:42:07 raspi5 NetworkManager[896]: [1729006927.8410] NetworkManager (version 1.42.4) is starting... (boot:4edd5f59-d5c3-4290-9682-c5fcf3adc2ba)
říj 15 17:42:07 raspi5 NetworkManager[896]: [1729006927.8411] Read config: /etc/NetworkManager/NetworkManager.conf (lib: 20-connectivity-debian.conf, no-mac-addr-change.conf)
říj 15 17:42:07 raspi5 NetworkManager[896]: [1729006927.8454] bus-manager: acquired D-Bus service "org.freedesktop.NetworkManager"
říj 15 17:42:07 raspi5 systemd[1]: Started NetworkManager.service - Network Manager.
říj 15 17:42:07 raspi5 NetworkManager[896]: [1729006927.8701] manager[0x55b29b5000]: monitoring kernel firmware directory '/lib/firmware'.
říj 15 17:42:07 raspi5 NetworkManager[896]: [1729006927.8701] monitoring ifupdown state file '/run/network/ifstate'.
říj 15 17:42:07 raspi5 NetworkManager[896]: [1729006927.8910] hostname: hostname: using hostnamed
říj 15 17:42:07 raspi5 NetworkManager[896]: [1729006927.8911] hostname: static hostname changed from (none) to "raspi5"
říj 15 17:42:07 raspi5 NetworkManager[896]: [1729006927.8966] dns-mgr: init: dns=default,systemd-resolved rc-manager=symlink (auto)
říj 15 17:42:07 raspi5 NetworkManager[896]: [1729006927.8981] rfkill1: found Wi-Fi radio killswitch (at /sys/devices/platform/axi/1001100000.mmc/mmc_host/mmc1/mmc1:0001/mmc1:0001:1/ieee80211/phy0/rfkill1) (driver brcmfmac)
říj 15 17:42:07 raspi5 NetworkManager[896]: [1729006927.8984] manager[0x55b29b5000]: rfkill: Wi-Fi hardware radio set disabled
říj 15 17:42:07 raspi5 NetworkManager[896]: [1729006927.8984] manager[0x55b29b5000]: rfkill: WWAN hardware radio set enabled
říj 15 17:42:08 raspi5 NetworkManager[896]: [1729006928.0543] Loaded device plugin: NMAtmManager (/usr/lib/aarch64-linux-gnu/NetworkManager/1.42.4/libnm-device-plugin-adsl.so)
říj 15 17:42:08 raspi5 NetworkManager[896]: [1729006928.0701] Loaded device plugin: NMTeamFactory (/usr/lib/aarch64-linux-gnu/NetworkManager/1.42.4/libnm-device-plugin-team.so)
říj 15 17:42:08 raspi5 NetworkManager[896]: [1729006928.0748] Loaded device plugin: NMWwanFactory (/usr/lib/aarch64-linux-gnu/NetworkManager/1.42.4/libnm-device-plugin-wwan.so)
říj 15 17:42:08 raspi5 NetworkManager[896]: [1729006928.0839] Loaded device plugin: NMBluezManager (/usr/lib/aarch64-linux-gnu/NetworkManager/1.42.4/libnm-device-plugin-bluetooth.so)
říj 15 17:42:08 raspi5 NetworkManager[896]: [1729006928.0920] Loaded device plugin: NMWifiFactory (/usr/lib/aarch64-linux-gnu/NetworkManager/1.42.4/libnm-device-plugin-wifi.so)
říj 15 17:42:08 raspi5 NetworkManager[896]: [1729006928.0925] manager: rfkill: Wi-Fi disabled by radio killswitch; disabled by state file
říj 15 17:42:08 raspi5 NetworkManager[896]: [1729006928.0926] manager: rfkill: WWAN enabled by radio killswitch; enabled by state file
říj 15 17:42:08 raspi5 NetworkManager[896]: [1729006928.0927] manager: Networking is enabled by state file
říj 15 17:42:08 raspi5 NetworkManager[896]: [1729006928.1042] settings: Loaded settings plugin: ifupdown ("/usr/lib/aarch64-linux-gnu/NetworkManager/1.42.4/libnm-settings-plugin-ifupdown.so")
říj 15 17:42:08 raspi5 NetworkManager[896]: [1729006928.1043] settings: Loaded settings plugin: keyfile (internal)
říj 15 17:42:08 raspi5 NetworkManager[896]: [1729006928.1044] ifupdown: management mode: unmanaged
říj 15 17:42:08 raspi5 NetworkManager[896]: [1729006928.1044] ifupdown: interface-parser: parsing file /etc/network/interfaces
říj 15 17:42:08 raspi5 NetworkManager[896]: [1729006928.1044] ifupdown: interface-parser: finished parsing file /etc/network/interfaces
říj 15 17:42:08 raspi5 NetworkManager[896]: [1729006928.1423] dhcp: init: Using DHCP client 'internal'
říj 15 17:42:08 raspi5 NetworkManager[896]: [1729006928.1434] manager: (lo): new Loopback device (/org/freedesktop/NetworkManager/Devices/1)
říj 15 17:42:08 raspi5 NetworkManager[896]: [1729006928.1470] device (lo): state change: unmanaged -> unavailable (reason 'connection-assumed', sys-iface-state: 'external')
říj 15 17:42:08 raspi5 NetworkManager[896]: [1729006928.1476] device (lo): state change: unavailable -> disconnected (reason 'connection-assumed', sys-iface-state: 'external')
říj 15 17:42:08 raspi5 NetworkManager[896]: [1729006928.1485] device (lo): Activation: starting connection 'lo' (fa31e53f-7d8c-4a5a-8223-623068cd7bea)
říj 15 17:42:08 raspi5 NetworkManager[896]: [1729006928.1500] manager: (end0): new Ethernet device (/org/freedesktop/NetworkManager/Devices/2)
říj 15 17:42:08 raspi5 NetworkManager[896]: [1729006928.1504] device (end0): state change: unmanaged -> unavailable (reason 'managed', sys-iface-state: 'external')
říj 15 17:42:08 raspi5 NetworkManager[896]: [1729006928.1672] device (wlan0): driver supports Access Point (AP) mode
říj 15 17:42:08 raspi5 NetworkManager[896]: [1729006928.1680] manager: (wlan0): new 802.11 Wi-Fi device (/org/freedesktop/NetworkManager/Devices/3)
říj 15 17:42:08 raspi5 NetworkManager[896]: [1729006928.1683] device (wlan0): state change: unmanaged -> unavailable (reason 'managed', sys-iface-state: 'external')
říj 15 17:42:08 raspi5 NetworkManager[896]: [1729006928.1780] device (lo): state change: disconnected -> prepare (reason 'none', sys-iface-state: 'external')
říj 15 17:42:08 raspi5 NetworkManager[896]: [1729006928.1783] device (lo): state change: prepare -> config (reason 'none', sys-iface-state: 'external')
říj 15 17:42:08 raspi5 NetworkManager[896]: [1729006928.1785] device (lo): state change: config -> ip-config (reason 'none', sys-iface-state: 'external')
říj 15 17:42:08 raspi5 NetworkManager[896]: [1729006928.1793] device (lo): state change: ip-config -> ip-check (reason 'none', sys-iface-state: 'external')
říj 15 17:42:08 raspi5 NetworkManager[896]: [1729006928.1853] modem-manager: ModemManager available
říj 15 17:42:08 raspi5 NetworkManager[896]: [1729006928.1956] device (lo): state change: ip-check -> secondaries (reason 'none', sys-iface-state: 'external')
říj 15 17:42:08 raspi5 NetworkManager[896]: [1729006928.1959] device (lo): state change: secondaries -> activated (reason 'none', sys-iface-state: 'external')
říj 15 17:42:08 raspi5 NetworkManager[896]: [1729006928.1965] device (lo): Activation: successful, device activated.
říj 15 17:42:12 raspi5 NetworkManager[896]: [1729006932.2622] device (end0): carrier: link connected
říj 15 17:42:12 raspi5 NetworkManager[896]: [1729006932.2626] device (end0): state change: unavailable -> disconnected (reason 'carrier-changed', sys-iface-state: 'managed')
říj 15 17:42:12 raspi5 NetworkManager[896]: [1729006932.2633] policy: auto-activating connection 'LAN' (2d47b88d-061d-4612-87bb-0bc3164bb538)
říj 15 17:42:12 raspi5 NetworkManager[896]: [1729006932.2639] device (end0): Activation: starting connection 'LAN' (2d47b88d-061d-4612-87bb-0bc3164bb538)
říj 15 17:42:12 raspi5 NetworkManager[896]: [1729006932.2639] device (end0): state change: disconnected -> prepare (reason 'none', sys-iface-state: 'managed')
říj 15 17:42:12 raspi5 NetworkManager[896]: [1729006932.2641] manager: NetworkManager state is now CONNECTING
říj 15 17:42:12 raspi5 NetworkManager[896]: [1729006932.2643] device (end0): state change: prepare -> config (reason 'none', sys-iface-state: 'managed')
říj 15 17:42:12 raspi5 NetworkManager[896]: [1729006932.2695] device (end0): state change: config -> ip-config (reason 'none', sys-iface-state: 'managed')
říj 15 17:42:12 raspi5 NetworkManager[896]: [1729006932.2700] dhcp4 (end0): activation: beginning transaction (timeout in 45 seconds)
říj 15 17:42:12 raspi5 NetworkManager[896]: [1729006932.2961] dhcp4 (end0): state changed new lease, address=192.168.100.180
říj 15 17:42:12 raspi5 NetworkManager[896]: [1729006932.2969] policy: set 'LAN' (end0) as default for IPv4 routing and DNS
říj 15 17:42:12 raspi5 NetworkManager[896]: [1729006932.3175] device (end0): state change: ip-config -> ip-check (reason 'none', sys-iface-state: 'managed')
říj 15 17:42:12 raspi5 NetworkManager[896]: [1729006932.3485] device (end0): state change: ip-check -> secondaries (reason 'none', sys-iface-state: 'managed')
říj 15 17:42:12 raspi5 NetworkManager[896]: [1729006932.3488] device (end0): state change: secondaries -> activated (reason 'none', sys-iface-state: 'managed')
říj 15 17:42:12 raspi5 NetworkManager[896]: [1729006932.3492] manager: NetworkManager state is now CONNECTED_SITE
říj 15 17:42:12 raspi5 NetworkManager[896]: [1729006932.3495] device (end0): Activation: successful, device activated.
říj 15 17:42:12 raspi5 NetworkManager[896]: [1729006932.3607] manager: startup complete
říj 15 17:42:12 raspi5 NetworkManager[896]: [1729006932.4731] manager: NetworkManager state is now CONNECTED_GLOBAL
říj 15 17:42:19 raspi5 NetworkManager[896]: [1729006939.7174] agent-manager: agent[795c5166a532d1cc,:1.56/org.freedesktop.nm-applet/1000]: agent registered
Additional context
No response
The text was updated successfully, but these errors were encountered: