radxa-build / rock-5b

ROCK 5B
https://radxa-build.github.io/rock-5b/
Other
82 stars 9 forks source link

Kernel update breaks the ethernet connectivity #22

Open grinco opened 3 weeks ago

grinco commented 3 weeks ago

root@rock-5b ~ # uname -r 6.1.43-15-rk2312

If I do an apt dist-upgrade linux-image-6.1.43-19-rk2312 gets installed which breaks network connectivity. Here's a list of modules that is build by dkms for both:

root@rock-5b ~ # find /lib/modules/6.1.43-*-rk2312/ | grep dkms
/lib/modules/6.1.43-15-rk2312/updates/dkms
/lib/modules/6.1.43-15-rk2312/updates/dkms/rtw89pci.ko.xz
/lib/modules/6.1.43-15-rk2312/updates/dkms/rtw_8852ce.ko.xz
/lib/modules/6.1.43-15-rk2312/updates/dkms/radxa-overlays.ko.xz
/lib/modules/6.1.43-15-rk2312/updates/dkms/rtw_8852c.ko.xz
/lib/modules/6.1.43-15-rk2312/updates/dkms/rtw_8851be.ko.xz
/lib/modules/6.1.43-15-rk2312/updates/dkms/rtw89core.ko.xz
/lib/modules/6.1.43-15-rk2312/updates/dkms/8852bu.ko.xz
/lib/modules/6.1.43-15-rk2312/updates/dkms/rtw_8852be.ko.xz
/lib/modules/6.1.43-15-rk2312/updates/dkms/rtw_8852a.ko.xz
/lib/modules/6.1.43-15-rk2312/updates/dkms/rtw_8851b.ko.xz
/lib/modules/6.1.43-15-rk2312/updates/dkms/rtk_btusb.ko.xz
/lib/modules/6.1.43-15-rk2312/updates/dkms/rtw_8852ae.ko.xz
/lib/modules/6.1.43-15-rk2312/updates/dkms/rtw_8852b.ko.xz
/lib/modules/6.1.43-19-rk2312/updates/dkms
/lib/modules/6.1.43-19-rk2312/updates/dkms/rtw89pci.ko.xz
/lib/modules/6.1.43-19-rk2312/updates/dkms/rtw_8852ce.ko.xz
/lib/modules/6.1.43-19-rk2312/updates/dkms/radxa-overlays.ko.xz
/lib/modules/6.1.43-19-rk2312/updates/dkms/rtw_8852c.ko.xz
/lib/modules/6.1.43-19-rk2312/updates/dkms/rtw_8851be.ko.xz
/lib/modules/6.1.43-19-rk2312/updates/dkms/rtw89core.ko.xz
/lib/modules/6.1.43-19-rk2312/updates/dkms/8852bu.ko.xz
/lib/modules/6.1.43-19-rk2312/updates/dkms/rtw_8852be.ko.xz
/lib/modules/6.1.43-19-rk2312/updates/dkms/rtw_8852a.ko.xz
/lib/modules/6.1.43-19-rk2312/updates/dkms/rtw_8851b.ko.xz
/lib/modules/6.1.43-19-rk2312/updates/dkms/rtk_btusb.ko.xz
/lib/modules/6.1.43-19-rk2312/updates/dkms/rtw_8852ae.ko.xz
/lib/modules/6.1.43-19-rk2312/updates/dkms/rtw_8852b.ko.xz
grinco commented 3 weeks ago

FYI, the issue is resolved by installing r8125-dkms and radxa-system-config-r8125-dkms. They should probably be added as dependencies for linux-image-rock-5b. I hope this helps.

RadxaYuntian commented 2 weeks ago

It should use r8169 driver for ethernet. @RadxaMitchell please check.

grinco commented 2 weeks ago
# readlink /sys/class/net/enP4p65s0/device/driver/module
../../../../module/r8125

So looks like it's using r8125, not r8169. Maybe I have an older version of the board?

RadxaYuntian commented 2 weeks ago

Try sudo rmmod r8125 && sudo modprobe r8169.

Goetterfunke87 commented 23 hours ago

Hi There, any updates on this? I can use kernelversion 14 and 15 with network. After that it's not working anymore. I have tried using r8125 and r8169 driver but both not working. Could you create a new release for 5b and 5b+? I have also noticed that updating breaks it.. Thank you

CodeChenL commented 10 hours ago

Hi There, any updates on this? I can use kernelversion 14 and 15 with network. After that it's not working anymore. I have tried using r8125 and r8169 driver but both not working. Could you create a new release for 5b and 5b+? I have also noticed that updating breaks it.. Thank you

Hi @Goetterfunke87 , Can you please provide the kernel log after using the command: sudo rmmod r8125 && sudo modprobe r8169?

grinco commented 5 hours ago

Hi There, any updates on this? I can use kernelversion 14 and 15 with network. After that it's not working anymore. I have tried using r8125 and r8169 driver but both not working. Could you create a new release for 5b and 5b+? I have also noticed that updating breaks it.. Thank you

Hi @Goetterfunke87 , Can you please provide the kernel log after using the command: sudo rmmod r8125 && sudo modprobe r8169?

Just install r8125-dkms and radxa-system-config-r8125-dkms packages after the update:

apt -y install  r8125-dkms radxa-system-config-r8125-dkms
Goetterfunke87 commented 2 hours ago

Hi There, Thank you for your answers. I have already tried both. For the rmmod one I'll get the following:

rmmod: ERROR: Module r8125 is not currently loaded [ 39.311803] rk_hdmirx fdee0000.hdmirx-controller: hdmirx_cancel_cpu_limit_freq freq qos nod add [ 39.790244] rk-pcie fe170000.pcie: PCIe Link Fail, LTSSM is 0x3, hw_retries=0 [ 39.796799] rk-pcie fe150000.pcie: PCIe Link Fail, LTSSM is 0x0, hw_retries=0 [ 39.796825] rk-pcie fe150000.pcie: failed to initialize host [ 43.696849] rk-pcie fe170000.pcie: PCIe Link Fail, LTSSM is 0x3, hw_retries=1 [ 44.713527] rk-pcie fe170000.pcie: failed to initialize host ipconfig: no devices to configure ipconfig: no devices to configure ipconfig: no devices to configure ipconfig: no devices to configure ipconfig: no devices to configure ipconfig: no devices to configure ipconfig: no devices to configure ipconfig: no devices to configure ipconfig: no devices to configure ipconfig: no devices to configure /scripts/local-premount/micha_pxe_init_hook.sh: 384: .: Can't open /run/net-*.conf

When I chroot into the image and install the mentioned packages for r8125 and rebuild the kernel, nothing changes, its still not working but I also have no error message except "no devices to configure" but I know the device is there because the kernel was just loaded from it... I know it's not a standard setup but it was working with 14 and 15 and broke after that for me... I'm waiting for some month now to try a new image to see if it's somehow related to update process.. but I really don't know...

This is my script if you want to test it yourself:

!/bin/sh

PREREQ="" prereqs() { echo "$PREREQ" }

case $1 in prereqs) prereqs exit 0 ;; esac . /scripts/functions

log_begin_msg "Starting pxe overlay script on Host: {{nfshostip}}. Creating required paths" rmmod r8125 modprobe r8169

configure_networking log_end_msg