Skip to content
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

Open
radekjuthner opened this issue Oct 15, 2024 · 9 comments
Open

Raspberry Pi 5 sometimes has no LAN connection after booting #6420

radekjuthner opened this issue Oct 15, 2024 · 9 comments

Comments

@radekjuthner
Copy link

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

@pelwell
Copy link
Contributor

pelwell commented Oct 15, 2024

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.

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.

  1. Can you explain the timeline in the jourmalctl log above - does it end in the "bad" state, or does it get fixed because the Ethernet cable was removed and reconnected sometine around 17:42:09?
  2. When it's in the bad state, what does ifconfig end0 report?
  3. When it's in the bad state, does sudo ifconfig end0 down; sudo ifconfig end0 up change anything?

@radekjuthner
Copy link
Author

sudo ifconfig end0
end0: flags=4163<ENABLED,OMNIDIRECTION,RUNNING,MULTICAST> mtu 1500
inet 192.168.100.180 net_mask 255.255.255.0 omnidirectional 192.168.100.255
ether 2c:cf:67:5a:36:5b outgoing_queue_length 1000 (Ethernet)
RX packets 23 bytes 1819 (1.7 KiB)
RX Errors 0 Dropped 0 Overflow 0 Frames 0
TX packets 130 bytes 14086 (13.7 KiB)
TX errors 0 discarded 0 overflow 0 transmission 0 collisions 0
device interrupt 112

Using sudo ifconfig end0 down and sudo ifconfig end0 up will restore the network connection.

@pelwell
Copy link
Contributor

pelwell commented Oct 15, 2024

And the answer to question 1?

@pelwell
Copy link
Contributor

pelwell commented Oct 15, 2024

  1. Asking it a different way, it would be interesting to see a journalctl log extract for what happens when cable is unplugged and reconnected.

  2. Do the packet counts you get from ifconfig end0 increase while pinging out from the Pi?

@radekjuthner
Copy link
Author

radekjuthner commented Oct 16, 2024

Bad state report
sudo journalctl -e -f -u NetworkManager.service
říj 16 14:14:16 raspi5 systemd[1]: Starting NetworkManager.service - Network Manager...
říj 16 14:14:16 raspi5 NetworkManager[896]: [1729080856.6286] NetworkManager (version 1.42.4) is starting... (boot:01501af1-7305-425a-b0fc-3027e70fcea9)
říj 16 14:14:16 raspi5 NetworkManager[896]: [1729080856.6287] Read config: /etc/NetworkManager/NetworkManager.conf (lib: 20-connectivity-debian.conf, no-mac-addr-change.conf)
říj 16 14:14:16 raspi5 NetworkManager[896]: [1729080856.6324] bus-manager: acquired D-Bus service "org.freedesktop.NetworkManager"
říj 16 14:14:16 raspi5 systemd[1]: Started NetworkManager.service - Network Manager.
říj 16 14:14:16 raspi5 NetworkManager[896]: [1729080856.6524] manager[0x559801a000]: monitoring kernel firmware directory '/lib/firmware'.
říj 16 14:14:16 raspi5 NetworkManager[896]: [1729080856.6525] monitoring ifupdown state file '/run/network/ifstate'.
říj 16 14:14:16 raspi5 NetworkManager[896]: [1729080856.6575] hostname: hostname: using hostnamed
říj 16 14:14:16 raspi5 NetworkManager[896]: [1729080856.6576] hostname: static hostname changed from (none) to "raspi5"
říj 16 14:14:16 raspi5 NetworkManager[896]: [1729080856.6641] dns-mgr: init: dns=default,systemd-resolved rc-manager=symlink (auto)
říj 16 14:14:16 raspi5 NetworkManager[896]: [1729080856.6660] 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 16 14:14:16 raspi5 NetworkManager[896]: [1729080856.6664] manager[0x559801a000]: rfkill: Wi-Fi hardware radio set disabled
říj 16 14:14:16 raspi5 NetworkManager[896]: [1729080856.6664] manager[0x559801a000]: rfkill: WWAN hardware radio set enabled
říj 16 14:14:16 raspi5 NetworkManager[896]: [1729080856.8493] Loaded device plugin: NMAtmManager (/usr/lib/aarch64-linux-gnu/NetworkManager/1.42.4/libnm-device-plugin-adsl.so)
říj 16 14:14:16 raspi5 NetworkManager[896]: [1729080856.8751] Loaded device plugin: NMTeamFactory (/usr/lib/aarch64-linux-gnu/NetworkManager/1.42.4/libnm-device-plugin-team.so)
říj 16 14:14:16 raspi5 NetworkManager[896]: [1729080856.8981] Loaded device plugin: NMWwanFactory (/usr/lib/aarch64-linux-gnu/NetworkManager/1.42.4/libnm-device-plugin-wwan.so)
říj 16 14:14:16 raspi5 NetworkManager[896]: [1729080856.9122] Loaded device plugin: NMBluezManager (/usr/lib/aarch64-linux-gnu/NetworkManager/1.42.4/libnm-device-plugin-bluetooth.so)
říj 16 14:14:16 raspi5 NetworkManager[896]: [1729080856.9337] Loaded device plugin: NMWifiFactory (/usr/lib/aarch64-linux-gnu/NetworkManager/1.42.4/libnm-device-plugin-wifi.so)
říj 16 14:14:16 raspi5 NetworkManager[896]: [1729080856.9341] manager: rfkill: Wi-Fi disabled by radio killswitch; disabled by state file
říj 16 14:14:16 raspi5 NetworkManager[896]: [1729080856.9342] manager: rfkill: WWAN enabled by radio killswitch; enabled by state file
říj 16 14:14:16 raspi5 NetworkManager[896]: [1729080856.9343] manager: Networking is enabled by state file
říj 16 14:14:16 raspi5 NetworkManager[896]: [1729080856.9360] settings: Loaded settings plugin: ifupdown ("/usr/lib/aarch64-linux-gnu/NetworkManager/1.42.4/libnm-settings-plugin-ifupdown.so")
říj 16 14:14:16 raspi5 NetworkManager[896]: [1729080856.9361] settings: Loaded settings plugin: keyfile (internal)
říj 16 14:14:16 raspi5 NetworkManager[896]: [1729080856.9361] ifupdown: management mode: unmanaged
říj 16 14:14:16 raspi5 NetworkManager[896]: [1729080856.9361] ifupdown: interface-parser: parsing file /etc/network/interfaces
říj 16 14:14:16 raspi5 NetworkManager[896]: [1729080856.9362] ifupdown: interface-parser: finished parsing file /etc/network/interfaces
říj 16 14:14:16 raspi5 NetworkManager[896]: [1729080856.9682] dhcp: init: Using DHCP client 'internal'
říj 16 14:14:16 raspi5 NetworkManager[896]: [1729080856.9686] manager: (lo): new Loopback device (/org/freedesktop/NetworkManager/Devices/1)
říj 16 14:14:16 raspi5 NetworkManager[896]: [1729080856.9703] device (lo): state change: unmanaged -> unavailable (reason 'connection-assumed', sys-iface-state: 'external')
říj 16 14:14:16 raspi5 NetworkManager[896]: [1729080856.9709] device (lo): state change: unavailable -> disconnected (reason 'connection-assumed', sys-iface-state: 'external')
říj 16 14:14:16 raspi5 NetworkManager[896]: [1729080856.9719] device (lo): Activation: starting connection 'lo' (54124b4f-73aa-41a8-bbc6-5af0e0c266a0)
říj 16 14:14:16 raspi5 NetworkManager[896]: [1729080856.9741] manager: (end0): new Ethernet device (/org/freedesktop/NetworkManager/Devices/2)
říj 16 14:14:16 raspi5 NetworkManager[896]: [1729080856.9747] device (end0): state change: unmanaged -> unavailable (reason 'managed', sys-iface-state: 'external')
říj 16 14:14:16 raspi5 NetworkManager[896]: [1729080856.9958] device (wlan0): driver supports Access Point (AP) mode
říj 16 14:14:16 raspi5 NetworkManager[896]: [1729080856.9968] manager: (wlan0): new 802.11 Wi-Fi device (/org/freedesktop/NetworkManager/Devices/3)
říj 16 14:14:16 raspi5 NetworkManager[896]: [1729080856.9974] device (wlan0): state change: unmanaged -> unavailable (reason 'managed', sys-iface-state: 'external')
říj 16 14:14:17 raspi5 NetworkManager[896]: [1729080857.0030] device (lo): state change: disconnected -> prepare (reason 'none', sys-iface-state: 'external')
říj 16 14:14:17 raspi5 NetworkManager[896]: [1729080857.0037] device (lo): state change: prepare -> config (reason 'none', sys-iface-state: 'external')
říj 16 14:14:17 raspi5 NetworkManager[896]: [1729080857.0039] device (lo): state change: config -> ip-config (reason 'none', sys-iface-state: 'external')
říj 16 14:14:17 raspi5 NetworkManager[896]: [1729080857.0047] device (lo): state change: ip-config -> ip-check (reason 'none', sys-iface-state: 'external')
říj 16 14:14:17 raspi5 NetworkManager[896]: [1729080857.0120] modem-manager: ModemManager available
říj 16 14:14:17 raspi5 NetworkManager[896]: [1729080857.0238] device (lo): state change: ip-check -> secondaries (reason 'none', sys-iface-state: 'external')
říj 16 14:14:17 raspi5 NetworkManager[896]: [1729080857.0241] device (lo): state change: secondaries -> activated (reason 'none', sys-iface-state: 'external')
říj 16 14:14:17 raspi5 NetworkManager[896]: [1729080857.0247] device (lo): Activation: successful, device activated.
říj 16 14:14:21 raspi5 NetworkManager[896]: [1729080861.0708] device (end0): carrier: link connected
říj 16 14:14:21 raspi5 NetworkManager[896]: [1729080861.0780] device (end0): state change: unavailable -> disconnected (reason 'carrier-changed', sys-iface-state: 'managed')
říj 16 14:14:21 raspi5 NetworkManager[896]: [1729080861.0941] policy: auto-activating connection 'LAN' (2d47b88d-061d-4612-87bb-0bc3164bb538)
říj 16 14:14:21 raspi5 NetworkManager[896]: [1729080861.0988] device (end0): Activation: starting connection 'LAN' (2d47b88d-061d-4612-87bb-0bc3164bb538)
říj 16 14:14:21 raspi5 NetworkManager[896]: [1729080861.1018] device (end0): state change: disconnected -> prepare (reason 'none', sys-iface-state: 'managed')
říj 16 14:14:21 raspi5 NetworkManager[896]: [1729080861.1056] manager: NetworkManager state is now CONNECTING
říj 16 14:14:21 raspi5 NetworkManager[896]: [1729080861.1072] device (end0): state change: prepare -> config (reason 'none', sys-iface-state: 'managed')
říj 16 14:14:21 raspi5 NetworkManager[896]: [1729080861.1138] device (end0): state change: config -> ip-config (reason 'none', sys-iface-state: 'managed')
říj 16 14:14:21 raspi5 NetworkManager[896]: [1729080861.1142] dhcp4 (end0): activation: beginning transaction (timeout in 45 seconds)
říj 16 14:14:21 raspi5 NetworkManager[896]: [1729080861.1156] dhcp4 (end0): state changed new lease, address=192.168.100.180
říj 16 14:14:21 raspi5 NetworkManager[896]: [1729080861.1160] policy: set 'LAN' (end0) as default for IPv4 routing and DNS
říj 16 14:14:21 raspi5 NetworkManager[896]: [1729080861.1314] device (end0): state change: ip-config -> ip-check (reason 'none', sys-iface-state: 'managed')
říj 16 14:14:21 raspi5 NetworkManager[896]: [1729080861.1411] device (end0): state change: ip-check -> secondaries (reason 'none', sys-iface-state: 'managed')
říj 16 14:14:21 raspi5 NetworkManager[896]: [1729080861.1414] device (end0): state change: secondaries -> activated (reason 'none', sys-iface-state: 'managed')
říj 16 14:14:21 raspi5 NetworkManager[896]: [1729080861.1419] manager: NetworkManager state is now CONNECTED_SITE
říj 16 14:14:21 raspi5 NetworkManager[896]: [1729080861.1422] device (end0): Activation: successful, device activated.
říj 16 14:14:21 raspi5 NetworkManager[896]: [1729080861.1455] manager: startup complete
říj 16 14:14:21 raspi5 NetworkManager[896]: [1729080861.1906] manager: NetworkManager state is now CONNECTED_GLOBAL
říj 16 14:14:32 raspi5 NetworkManager[896]: [1729080872.8298] agent-manager: agent[33a2e19a3a467efa,:1.56/org.freedesktop.nm-applet/1000]: agent registered

After cable replug:
sudo journalctl -e -f -u NetworkManager.service
říj 16 14:14:16 raspi5 systemd[1]: Starting NetworkManager.service - Network Manager...
říj 16 14:14:16 raspi5 NetworkManager[896]: [1729080856.6286] NetworkManager (version 1.42.4) is starting... (boot:01501af1-7305-425a-b0fc-3027e70fcea9)
říj 16 14:14:16 raspi5 NetworkManager[896]: [1729080856.6287] Read config: /etc/NetworkManager/NetworkManager.conf (lib: 20-connectivity-debian.conf, no-mac-addr-change.conf)
říj 16 14:14:16 raspi5 NetworkManager[896]: [1729080856.6324] bus-manager: acquired D-Bus service "org.freedesktop.NetworkManager"
říj 16 14:14:16 raspi5 systemd[1]: Started NetworkManager.service - Network Manager.
říj 16 14:14:16 raspi5 NetworkManager[896]: [1729080856.6524] manager[0x559801a000]: monitoring kernel firmware directory '/lib/firmware'.
říj 16 14:14:16 raspi5 NetworkManager[896]: [1729080856.6525] monitoring ifupdown state file '/run/network/ifstate'.
říj 16 14:14:16 raspi5 NetworkManager[896]: [1729080856.6575] hostname: hostname: using hostnamed
říj 16 14:14:16 raspi5 NetworkManager[896]: [1729080856.6576] hostname: static hostname changed from (none) to "raspi5"
říj 16 14:14:16 raspi5 NetworkManager[896]: [1729080856.6641] dns-mgr: init: dns=default,systemd-resolved rc-manager=symlink (auto)
říj 16 14:14:16 raspi5 NetworkManager[896]: [1729080856.6660] 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 16 14:14:16 raspi5 NetworkManager[896]: [1729080856.6664] manager[0x559801a000]: rfkill: Wi-Fi hardware radio set disabled
říj 16 14:14:16 raspi5 NetworkManager[896]: [1729080856.6664] manager[0x559801a000]: rfkill: WWAN hardware radio set enabled
říj 16 14:14:16 raspi5 NetworkManager[896]: [1729080856.8493] Loaded device plugin: NMAtmManager (/usr/lib/aarch64-linux-gnu/NetworkManager/1.42.4/libnm-device-plugin-adsl.so)
říj 16 14:14:16 raspi5 NetworkManager[896]: [1729080856.8751] Loaded device plugin: NMTeamFactory (/usr/lib/aarch64-linux-gnu/NetworkManager/1.42.4/libnm-device-plugin-team.so)
říj 16 14:14:16 raspi5 NetworkManager[896]: [1729080856.8981] Loaded device plugin: NMWwanFactory (/usr/lib/aarch64-linux-gnu/NetworkManager/1.42.4/libnm-device-plugin-wwan.so)
říj 16 14:14:16 raspi5 NetworkManager[896]: [1729080856.9122] Loaded device plugin: NMBluezManager (/usr/lib/aarch64-linux-gnu/NetworkManager/1.42.4/libnm-device-plugin-bluetooth.so)
říj 16 14:14:16 raspi5 NetworkManager[896]: [1729080856.9337] Loaded device plugin: NMWifiFactory (/usr/lib/aarch64-linux-gnu/NetworkManager/1.42.4/libnm-device-plugin-wifi.so)
říj 16 14:14:16 raspi5 NetworkManager[896]: [1729080856.9341] manager: rfkill: Wi-Fi disabled by radio killswitch; disabled by state file
říj 16 14:14:16 raspi5 NetworkManager[896]: [1729080856.9342] manager: rfkill: WWAN enabled by radio killswitch; enabled by state file
říj 16 14:14:16 raspi5 NetworkManager[896]: [1729080856.9343] manager: Networking is enabled by state file
říj 16 14:14:16 raspi5 NetworkManager[896]: [1729080856.9360] settings: Loaded settings plugin: ifupdown ("/usr/lib/aarch64-linux-gnu/NetworkManager/1.42.4/libnm-settings-plugin-ifupdown.so")
říj 16 14:14:16 raspi5 NetworkManager[896]: [1729080856.9361] settings: Loaded settings plugin: keyfile (internal)
říj 16 14:14:16 raspi5 NetworkManager[896]: [1729080856.9361] ifupdown: management mode: unmanaged
říj 16 14:14:16 raspi5 NetworkManager[896]: [1729080856.9361] ifupdown: interface-parser: parsing file /etc/network/interfaces
říj 16 14:14:16 raspi5 NetworkManager[896]: [1729080856.9362] ifupdown: interface-parser: finished parsing file /etc/network/interfaces
říj 16 14:14:16 raspi5 NetworkManager[896]: [1729080856.9682] dhcp: init: Using DHCP client 'internal'
říj 16 14:14:16 raspi5 NetworkManager[896]: [1729080856.9686] manager: (lo): new Loopback device (/org/freedesktop/NetworkManager/Devices/1)
říj 16 14:14:16 raspi5 NetworkManager[896]: [1729080856.9703] device (lo): state change: unmanaged -> unavailable (reason 'connection-assumed', sys-iface-state: 'external')
říj 16 14:14:16 raspi5 NetworkManager[896]: [1729080856.9709] device (lo): state change: unavailable -> disconnected (reason 'connection-assumed', sys-iface-state: 'external')
říj 16 14:14:16 raspi5 NetworkManager[896]: [1729080856.9719] device (lo): Activation: starting connection 'lo' (54124b4f-73aa-41a8-bbc6-5af0e0c266a0)
říj 16 14:14:16 raspi5 NetworkManager[896]: [1729080856.9741] manager: (end0): new Ethernet device (/org/freedesktop/NetworkManager/Devices/2)
říj 16 14:14:16 raspi5 NetworkManager[896]: [1729080856.9747] device (end0): state change: unmanaged -> unavailable (reason 'managed', sys-iface-state: 'external')
říj 16 14:14:16 raspi5 NetworkManager[896]: [1729080856.9958] device (wlan0): driver supports Access Point (AP) mode
říj 16 14:14:16 raspi5 NetworkManager[896]: [1729080856.9968] manager: (wlan0): new 802.11 Wi-Fi device (/org/freedesktop/NetworkManager/Devices/3)
říj 16 14:14:16 raspi5 NetworkManager[896]: [1729080856.9974] device (wlan0): state change: unmanaged -> unavailable (reason 'managed', sys-iface-state: 'external')
říj 16 14:14:17 raspi5 NetworkManager[896]: [1729080857.0030] device (lo): state change: disconnected -> prepare (reason 'none', sys-iface-state: 'external')
říj 16 14:14:17 raspi5 NetworkManager[896]: [1729080857.0037] device (lo): state change: prepare -> config (reason 'none', sys-iface-state: 'external')
říj 16 14:14:17 raspi5 NetworkManager[896]: [1729080857.0039] device (lo): state change: config -> ip-config (reason 'none', sys-iface-state: 'external')
říj 16 14:14:17 raspi5 NetworkManager[896]: [1729080857.0047] device (lo): state change: ip-config -> ip-check (reason 'none', sys-iface-state: 'external')
říj 16 14:14:17 raspi5 NetworkManager[896]: [1729080857.0120] modem-manager: ModemManager available
říj 16 14:14:17 raspi5 NetworkManager[896]: [1729080857.0238] device (lo): state change: ip-check -> secondaries (reason 'none', sys-iface-state: 'external')
říj 16 14:14:17 raspi5 NetworkManager[896]: [1729080857.0241] device (lo): state change: secondaries -> activated (reason 'none', sys-iface-state: 'external')
říj 16 14:14:17 raspi5 NetworkManager[896]: [1729080857.0247] device (lo): Activation: successful, device activated.
říj 16 14:14:21 raspi5 NetworkManager[896]: [1729080861.0708] device (end0): carrier: link connected
říj 16 14:14:21 raspi5 NetworkManager[896]: [1729080861.0780] device (end0): state change: unavailable -> disconnected (reason 'carrier-changed', sys-iface-state: 'managed')
říj 16 14:14:21 raspi5 NetworkManager[896]: [1729080861.0941] policy: auto-activating connection 'LAN' (2d47b88d-061d-4612-87bb-0bc3164bb538)
říj 16 14:14:21 raspi5 NetworkManager[896]: [1729080861.0988] device (end0): Activation: starting connection 'LAN' (2d47b88d-061d-4612-87bb-0bc3164bb538)
říj 16 14:14:21 raspi5 NetworkManager[896]: [1729080861.1018] device (end0): state change: disconnected -> prepare (reason 'none', sys-iface-state: 'managed')
říj 16 14:14:21 raspi5 NetworkManager[896]: [1729080861.1056] manager: NetworkManager state is now CONNECTING
říj 16 14:14:21 raspi5 NetworkManager[896]: [1729080861.1072] device (end0): state change: prepare -> config (reason 'none', sys-iface-state: 'managed')
říj 16 14:14:21 raspi5 NetworkManager[896]: [1729080861.1138] device (end0): state change: config -> ip-config (reason 'none', sys-iface-state: 'managed')
říj 16 14:14:21 raspi5 NetworkManager[896]: [1729080861.1142] dhcp4 (end0): activation: beginning transaction (timeout in 45 seconds)
říj 16 14:14:21 raspi5 NetworkManager[896]: [1729080861.1156] dhcp4 (end0): state changed new lease, address=192.168.100.180
říj 16 14:14:21 raspi5 NetworkManager[896]: [1729080861.1160] policy: set 'LAN' (end0) as default for IPv4 routing and DNS
říj 16 14:14:21 raspi5 NetworkManager[896]: [1729080861.1314] device (end0): state change: ip-config -> ip-check (reason 'none', sys-iface-state: 'managed')
říj 16 14:14:21 raspi5 NetworkManager[896]: [1729080861.1411] device (end0): state change: ip-check -> secondaries (reason 'none', sys-iface-state: 'managed')
říj 16 14:14:21 raspi5 NetworkManager[896]: [1729080861.1414] device (end0): state change: secondaries -> activated (reason 'none', sys-iface-state: 'managed')
říj 16 14:14:21 raspi5 NetworkManager[896]: [1729080861.1419] manager: NetworkManager state is now CONNECTED_SITE
říj 16 14:14:21 raspi5 NetworkManager[896]: [1729080861.1422] device (end0): Activation: successful, device activated.
říj 16 14:14:21 raspi5 NetworkManager[896]: [1729080861.1455] manager: startup complete
říj 16 14:14:21 raspi5 NetworkManager[896]: [1729080861.1906] manager: NetworkManager state is now CONNECTED_GLOBAL
říj 16 14:14:32 raspi5 NetworkManager[896]: [1729080872.8298] agent-manager: agent[33a2e19a3a467efa,:1.56/org.freedesktop.nm-applet/1000]: agent registered
říj 16 14:19:20 raspi5 NetworkManager[896]: [1729081160.9644] device (end0): state change: activated -> unavailable (reason 'carrier-changed', sys-iface-state: 'managed')
říj 16 14:19:20 raspi5 NetworkManager[896]: [1729081160.9769] dhcp4 (end0): canceled DHCP transaction
říj 16 14:19:20 raspi5 NetworkManager[896]: [1729081160.9770] dhcp4 (end0): activation: beginning transaction (timeout in 45 seconds)
říj 16 14:19:20 raspi5 NetworkManager[896]: [1729081160.9770] dhcp4 (end0): state changed no lease
říj 16 14:19:21 raspi5 NetworkManager[896]: [1729081161.0174] manager: NetworkManager state is now DISCONNECTED
říj 16 14:19:24 raspi5 NetworkManager[896]: [1729081164.1741] device (end0): carrier: link connected
říj 16 14:19:24 raspi5 NetworkManager[896]: [1729081164.1743] device (end0): state change: unavailable -> disconnected (reason 'carrier-changed', sys-iface-state: 'managed')
říj 16 14:19:24 raspi5 NetworkManager[896]: [1729081164.1747] policy: auto-activating connection 'LAN' (2d47b88d-061d-4612-87bb-0bc3164bb538)
říj 16 14:19:24 raspi5 NetworkManager[896]: [1729081164.1751] device (end0): Activation: starting connection 'LAN' (2d47b88d-061d-4612-87bb-0bc3164bb538)
říj 16 14:19:24 raspi5 NetworkManager[896]: [1729081164.1751] device (end0): state change: disconnected -> prepare (reason 'none', sys-iface-state: 'managed')
říj 16 14:19:24 raspi5 NetworkManager[896]: [1729081164.1753] manager: NetworkManager state is now CONNECTING
říj 16 14:19:24 raspi5 NetworkManager[896]: [1729081164.1754] device (end0): state change: prepare -> config (reason 'none', sys-iface-state: 'managed')
říj 16 14:19:24 raspi5 NetworkManager[896]: [1729081164.1757] device (end0): state change: config -> ip-config (reason 'none', sys-iface-state: 'managed')
říj 16 14:19:24 raspi5 NetworkManager[896]: [1729081164.1758] dhcp4 (end0): activation: beginning transaction (timeout in 45 seconds)
říj 16 14:19:24 raspi5 NetworkManager[896]: [1729081164.1768] dhcp4 (end0): state changed new lease, address=192.168.100.180
říj 16 14:19:24 raspi5 NetworkManager[896]: [1729081164.1771] policy: set 'LAN' (end0) as default for IPv4 routing and DNS
říj 16 14:19:24 raspi5 NetworkManager[896]: [1729081164.1895] device (end0): state change: ip-config -> ip-check (reason 'none', sys-iface-state: 'managed')
říj 16 14:19:24 raspi5 NetworkManager[896]: [1729081164.1926] device (end0): state change: ip-check -> secondaries (reason 'none', sys-iface-state: 'managed')
říj 16 14:19:24 raspi5 NetworkManager[896]: [1729081164.1928] device (end0): state change: secondaries -> activated (reason 'none', sys-iface-state: 'managed')
říj 16 14:19:24 raspi5 NetworkManager[896]: [1729081164.1932] manager: NetworkManager state is now CONNECTED_SITE
říj 16 14:19:24 raspi5 NetworkManager[896]: [1729081164.1934] device (end0): Activation: successful, device activated.
říj 16 14:19:24 raspi5 NetworkManager[896]: [1729081164.2321] manager: NetworkManager state is now CONNECTED_GLOBAL

Bad state ping:
From 192.168.100.180 icmp_seq=31 Destination Host Unreachable
ping: sendmsg: There is no path to the computer

and

sudo ifconfig end0
end0: flags=4163<ENABLED,OMNIDIRECTION,RUNNING,MULTICAST> mtu 1500
ether 2c:cf:67:5a:36:5b outgoing_queue_length 1000 (Ethernet)
RX packets 41 bytes 2647 (2.5 KiB)
RX Errors 0 Dropped 0 Overflow 0 Frames 0
TX packets 925 bytes 68361 (66.7 KiB)
TX errors 0 discarded 0 overflow 0 transmission 0 collisions 0
device interrupt 112

Network manager restart and sudo dhclient -v do not work on RPI

@radekjuthner
Copy link
Author

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.
After booting bad state, the already mentioned problem occurs. Ping from RPI to router doesn't work, but router to RPI does. Some pings do not end with "Destination Host Unrecheable".

IMG_20241017_193402

@HovnovoD
Copy link

HovnovoD commented Nov 7, 2024

Hi,
I have exactly the same problem.
I tried the official Raspberry OS, Raspberry OS Light and Ubuntu.
The problem is for both systems.
Therefore, I also think that the problem is already booting firmware.
I always update to the new firmware and I am always disappointed that the problem has not been solved.
Unfortunately, I did not find any threads in the Internet discussions to describe this problem.
Is it just a unique problem?

Did you find any solution to this problem?

I apologize for my English language.

@radekjuthner
Copy link
Author

radekjuthner commented Nov 8, 2024

Hi.
I have added to the boot sequence for now

ifconfig eth0 down
ifconfig eth0 up.

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]
Description=Restart Ethernet interface at boot
After=network.target

[Service]
Type=oneshot
ExecStart=/sbin/ifconfig eth0 down
ExecStartPost=/sbin/ifconfig eth0 up
RemainAfterExit=true

[Install]
WantedBy=multi-user.target

then
sudo systemctl enable network-restart.service
sudo systemctl start network-restart.service

@HovnovoD
Copy link

HovnovoD commented Nov 8, 2024

Hi Radek,

Thank you for your advice.
It seems that it works this way. I wanted to use these commands in this way as well, but unfortunately, I didn’t know how to run them during system boot. When I ran them as "autostart" after the system started, these commands didn't work this way.

I’ll let you know more, probably in about a month, to see if it continues to work like this.

Unfortunately, this solution does not work either.
The internet connection is once again sporadic, with the probability of connecting to the internet being approximately 2/10.
I also tried a different router, but the issue was not resolved.

OS: Ubuntu noble 24.04 aarch64
Host: Raspberry Pi 5 Model B Rev 1.0
Kernel: Linux 6.8.0-1014-raspi

Thank you Radek
Díky Radku : )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants