USB3 to Gigabit Ethernet adapter on Rpi4/5 troubles

  • I need to add a second wired Ethernet interface to my Rpi4s and Rpi5s -- and I'm not having any luck. The same problems occur with the latest LibreELEC 11.0.6 release, and also with the latest LibreELEC 12 nightlies.

    First, I tried a cheap generic USB3 to Gigabit adapter based on the RTL8153 chipset. It works when plugged into the Pi, but the network instance disappears after a boot. I can unplug it from the USB3 port on the Pi, plug it back in, and it works -- until the next boot. I'm encountering the exact problem described here:

    RaspPi 4 & RTL8153 Ethernet USB gadget need to be unplugged - Raspberry Pi Forums

    After a boot, the output from lsusb shows

    Code
    Bus 002 Device 002: ID 0bda:8151 Realtek Semiconductor Corp. RTL8151 Adapteon Business Mobile Networks BV

    ...and the eth1 device does not appear in the output from ifconfig. After unplugging the device and plugging it back in, it shows

    Code
    Bus 002 Device 003: ID 0bda:8153 Realtek Semiconductor Corp. RTL8153 Gigabit Ethernet Adapter

    ...and the eth1 device works. But I'd rather not have to remember to replug the device after each boot.

    I read elsewhere that the Ugreen adapters worked well with LibreELEC and Rpi, so I ordered the Ugreen 20256 model, which uses the AX88`179 chipset. This one does not work at all. Lsusb shows

    Code
    Bus 002 Device 004: ID 0b95:1790 ASIX Electronics Corp. AX88179 Gigabit Ethernet

    But the driver does not seem to be loading. The eth1 interface does not appear in ifconfig, or in the "connections" section of the LibreELEC settings. Rebooting does not make a difference.

    Are there any workarounds to make either of these work? Or are there fixes in the works? Or, is there another model I should order that will work out of the box?

    Any help with this would be much appreciated!

  • Create logs for both adapters:


    Please provide a full debug log.

    How to post a log (wiki)

    1. Enable debugging in Settings>System Settings>Logging
    2. Restart Kodi
    3. Replicate the problem
    4. Generate a log URL (do not post/upload logs to the forum)

    use "Settings > LibreELEC > System > Paste system logs" or run "pastekodi" over SSH, then post the URL link
  • NB: usb_modeswitch is in the LE "system-tools" add-on.

    Thanks very much for that! By adapting the instructions in the link above, I was able to get the RT8153-based adapter to come up across boots.

    For anyone else needing to do this, after installing the LE "system-tools" addon, navigate to ~/.config/system.d and create a file a file named "rpi-usbfix.service" with this content:

    Code
    [Unit]
    Description=Fixes some usb issues
    
    [Service]
    ExecStart=/storage/.kodi/addons/virtual.system-tools/bin/usb_modeswitch -v 0bda -p 8151 -R
    Type=oneshot
    RemainAfterExit=yes
    
    [Install]
    WantedBy=multi-user.target

    The do

    Code
    systemctl enable rpi-usbfix.service

    ...so that the command runs following each boot.

    Not ideal -- but it does work.

    Now...I'll work on getting you the info you requested re: the AX88179 driver not loading....


    Please provide a full debug log.

    How to post a log (wiki)

    1. Enable debugging in Settings>System Settings>Logging
    2. Restart Kodi
    3. Replicate the problem
    4. Generate a log URL (do not post/upload logs to the forum)

    use "Settings > LibreELEC > System > Paste system logs" or run "pastekodi" over SSH, then post the URL link

    New install of LE 11 with the AX88179 adapter plugged into a USB3 port on a Rpi4. Here's the debug log:

    https://paste.libreelec.tv/square-gobbler.log

    Edited 5 times, last by rkershenbaum: Merged a post created by rkershenbaum into this post. (February 3, 2024 at 7:08 PM).

  • The 0b95:1790 device ID doesn't exist in the ASIX driver so the device is visible on the USB bus but the driver doesn't match and load the driver. That's a trivial change so I'm building an image for you to test, and if it works I'll upstream the patch to the kernel.

  • Can't thank you enough, chewitt, for the qukck and expert response! The Ugreen ASIX-based adapters work perfectly (almost -- see below) with the test version. You can feel confident in pushing out the change.

    (I'm assuming that you only made this update to the Rpi4 version. The problem was still there when I tried the 11.80 Rpi5 version.)

    I'm going to return the RT8153-based adapters that require the usb_modeswitch fiddling, and keep the (more expensive) Ugreen 20256 adapters that don't.

    There is a semi-unrelated problem, though. After switching between interfaces (both with static IPs, if it makes any difference), and accessing a local or remote network resource, the UI hangs for periods of 30 seconds to several minutes. Also, many of the icons disappear. The o/s is not hung, since I can still ssh into it and enter commands. I think this is unrelated to the USB adapters, since I saw the same problem when switching between wired and wireless interfaces.

    Here's a debug log that (hopefully) will show the problem:

    https://paste.libreelec.tv/next-turkey.log

    Edited once, last by rkershenbaum (February 4, 2024 at 5:21 PM).

  • Sorry, forgot the share the dmesg | paste. Here it is:

    https://paste.libreelec.tv/relative-hedgehog.log

    Although there's a "failed" indication, the AX88179 adapter does come up and seems to work ok.

    I'm still seeing the 1-5 minute total unresponsiveness from the UI after I switch between eth0 and eth1. This is the debug log showing that:

    https://paste.libreelec.tv/next-turkey.log

    Thanks again for your work on this -- and everything LE-related!

  • The patch I sent upstream adds 0b95:1790 to the "USB_NET_AX8817X" driver but there's a separate "USB_NET_AX88179_178A" driver in the kernel which already has that combo inside, and both drivers are enabled in our kernel config. This means the patch I sent to the list is fundamentally wrong (as it's the wrong driver) but now we need to explain why there's no attempt at probing and loading the correct driver in the logs.

    To ensure I'm looking at the right thing. Please update the RPi5 (not RPi4) to the image in my test share. This 100% doesn't contain any patches, and I want to see output from "dmesg | paste" after booting with the ASIX adapter connected before power-on.

  • I've noticed that the procedure for enabling the RTL8153 adapter, described here in post #4, has to be redone anytime LE is updated. So not an ideal solution.

    I'm hoping the AX88179-based adapters can be made to work.