-
-
Notifications
You must be signed in to change notification settings - Fork 503
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
NanoPi M1 Plus Image using modern Kernel that breaks ethernet #6974
Comments
Any update on this issue :) |
You should in the meantime have Linux 6.6, and there were much newer kernel versions which had no issues. Since you just pasted a 3 years old quote, could you instead fill the bug report template and add the exact errors/issues/symptoms you face on your system? And please add the following, to get an overview over the network interfaces: ip l
ip a
ip r |
@MichaIng Same issue still persists in my NanoPi M1Plus hardware. Armbian and DietPi images prior to 2021 seemed to work. In 2021 I thought my hardware was faulty when I tried to reinstall and moved on to other SBCs, but now I know for sure that the hardware is not faulty because if I flash only the uboot sectors, it can negotiate an IP over DHCP and asks for TFTP. Following is the network interface overview you asked for Images from vendor with kernel 4.14 does not boot for me either |
Update: image from vendor boots but only if I use a smaller SD card. My default 128GB SD card does not boot with any vendor bootable images but works fine with DietPi/Armbian. Using a smaller 32GB card allowed me to get Debian bookworm with all hardware working, albeit not DietPi |
I would love to see a working DietPi Image for this platform. I am experiencing the same issues with the network. I can get WiFi to work but not the wired ethernet to grab a DHCP address or work with a static one. |
So Please show also the following: journalctl -u ifup@eth0
dmesg -l 0,1,2,3 |
correct, eth0 is up but cannot get a dhcp reservation and even when set to static IP address, it doesn't work.
dmesg command returns empty |
Is this the full sudo systemctl restart ifup@eth0
sleep 5
journalctl -u ifup@eth0 And can you show the list of loaded kernel modules on DietPi and the vendor image (or legacy kernel)? lsmod Generally the kernel build uses a moreless unmodified mainline Linux device tree, just some CPU thermal points and LED nodes added, but nothing changed regarding Ethernet: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/arch/arm/boot/dts/allwinner/sun8i-h3-nanopi-m1-plus.dts |
Here is the full log. I also did wlan0 `
|
Sorry for the late reply. So yeah, DHCP times out for whatever reason. I pushed a new kernel package to our APT server. Can you try to upgrade it: apt update
apt upgrade And above list of loaded modules is from vendor/legacy image or our image? And can you show the list from the other respective image, just to see whether different Ethernet drivers are loaded? |
I did the update, but still no address for eth0. I only used the DietPi image. I don't have any other ones installed. here is the log file
|
Which Ethernet chip does the M1 Plus actually have? And can you provide the full kernel log, to see which driver and in case firmware is loaded? dmesg Information is very difficult to find for this board. I see the device tree with Ethernet enabled in the Linux sources: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/arch/arm/boot/dts/allwinner/sun8i-h3-nanopi-m1-plus.dts?h=linux-6.6.y#n94 However, let's also test whether the legacy kernel works. It is not 5.4.88 anymore but 6.1.104 in the meantime. And at some point in #4712 a newer kernel solved the Ethernet issues that exists already. I am currently doing a build of the package: https://github.com/MichaIng/DietPi/actions/runs/11366428649 EDIT: I pushed it to our APT server. Please test like this: sudo apt install linux-{image,dtb}-legacy-sunxi
sudo reboot |
This is the dmesg output The last working Kernel that I tested was 5.4.88. Everything after that didn't seem to work.
|
I updated but still no ethernet.
this is the output for wlan0
|
Okay so it is the RTL8211E chip. SoC docs actually contain the relevant info: https://linux-sunxi.org/Ethernet Checking the EMAC driver, it is builtin into the kernel, which is what we see: https://github.com/armbian/build/blob/main/config/kernel/linux-sunxi-current.config
The Can you show the full |
Here is the full dmesg log
|
to test whether this fixes onboard Ethernet on NanoPi M1 Plus: MichaIng/DietPi#6974 Signed-off-by: MichaIng <micha@dietpi.com>
Here a test build of Linux 6.6 without Armbian patches: cd /tmp
wget https://dietpi.com/downloads/binaries/testing/linux-{image,dtb}-current-sunxi.deb
sudo dpkg -i linux-{image,dtb}-current-sunxi.deb
reboot |
I do want to thank you for revisiting this older hardware. I know you're a very busy person. Unfortunately, still no dhcp address for eth0. I do have another image installed on another M1 Plus. The ethernet works. Here are the dmesg and distribution information in case it helps.
|
vs
However, most likely just because of larger changes between Linux 5.4 and 6.6. I checked for changes in the driver between Linux 5.4.88 and 6.6.y, and this commit happened, though it was done by Realtek staff themselves: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit?id=bbc4d71 The same was present in 5.10.y as well, the first kernel which had Ethernet broken. It fixes this rt/tx delay config, which was not added yet in the Linux version used by FriendlyELEC for their (functional) kernel: https://github.com/friendlyarm/linux/blob/sunxi-4.14.y/drivers/net/phy/realtek.c Lacking a better idea, let me try to revert this particular patch: https://github.com/MichaIng/DietPi/actions/runs/11369302068 EDIT: Build ready to test: cd /tmp
wget https://dietpi.com/downloads/binaries/testing/linux-{image,dtb}-current-sunxi.deb
sudo dpkg -i linux-{image,dtb}-current-sunxi.deb
reboot |
success! Is this a patch that needs to be applied to existing systems? What about new systems, will there be a "fixed" image ? Again, I am very thankful for your hard work. |
Wow, I gave this a 10% chance at best. So Realtek broke their own driver for this particular SBC at least. Let me think about how to deal with this. I am not keen to ship this kernel for all Allwinner H3 SBCs, as there is a chance it is not fixing but breaking it in other cases. Thankfully we have dedicated APT components for each SBC, so I can ship it via APT for the M1 Plus only, and ... maybe write to the Linux development mailing list, adding the particular Realtek guy into CC. Maybe him or one of the Linux devs have an idea why it may break the M1 Plus, and maybe it can be narrowed down to a single variable, instead of the whole commit. At least they understand the meaning of the code, compared to me. |
10% in this case was just the right amount of hope :) If there is an image or patch just for the M1 Plus that would be a "good enough" solution to get these boards usable again with DietPi. |
I pushed the package to our APT server already, so it is just: apt update
apt upgrade And future images will have the new kernel OOTB. |
Amazing! Thank you. |
This is an old issue and since it was closed, I used it to reopen a new issue. Hopefully this was the correct thing to do. I have a couple of these devices. I installed a new 9.2 dietpi image on the device which uses a later kernel and I am having the ethernet / wifi issue again. Is it possible to lock the M1Plus builds to kernel 5.4.88 as it is the only one that works for this device? Or if not, how do I roll back to t5.4.88 Kernel and prevent future dietpi updates from updating the Kernel ?
Originally posted by @InnovoMagicCube in #4712 (comment)
The text was updated successfully, but these errors were encountered: