Odroid HC4 | USB and Ethernet not working

Creating a bug report/issue

I have searched the existing open and closed issues

Required Information

  • DietPi version | 9.13
  • Distro version | ``
  • Kernel version | Latest branch 25.xx
  • Architecture | arm64
  • SBC model | Odroid HC4

Additional Information (if applicable)

It happens before this version too, when latest kernel update, jump on apt

Steps to reproduce

Updating to latest version and fresh install, tested

Few weeks ago, I was on 9.12 and I saw that there was new versions of (I don’t know what the proper name) packages something like linux-current-image-meson64 version 25.05.0-trunk-dietpi1 and another package with dtb in it, I updated and after a reboot, I had no usb nor ethernet connection, I connected a monitor and it was on terminal login, so it boot right.

I had another SD with the previous packages (24.11.0-trunk-dietpi2) I copied them over the old, and I could recover.

After that until today I saw packages update for armbian-firmware and other maybe related with the kernel and I thought that maybe it was solved, I have updated and same problem again.

I know the kernel is armbian thing, but if you know some fix…

I saw some threads on armbian forum, maybe helpful..

Do you know the right way to go back without ssh, I was going to install and old Dietpi version with 24.11.0 and copy over the boot folder…

Thank you!

1 Like

Thanks for the report and the links. The boot issue on Odroid C2 is unrelated, though thinkable that older DietPi systems are affected as well. New U-Boot builds are not flashed automatically. Maybe we should change that in DietPi, to assure the bootloader is always the latest version tested to work fine with the kernel. E.g. on ROCK Pi S I also needed to flash a new bootloader to boot Linux 6.12, but no idea how old it (the previously flashed U-Boot) was prior to that.

The kernel headers topic is also runrelated.

Not sure whether the C2 USB issue and the HC4 one are the same, but we can test that. It is the same kernel for both boards at least. Let me create a build with this change.

1 Like

I created a branch with the kernel config change applied: meson64: replace CONFIG_USB_OHCI_HCD with CONFIG_USB_EHCI_TT_NEWSCHED · MichaIng/build@99ef3d2 · GitHub
Build is running: Armbian · MichaIng/DietPi@97e9fcf · GitHub
Once done, it will appear here: Index of /downloads/binaries/testing
You can then test then with:

cd /tmp
wget https://dietpi.com/downloads/binaries/testing/linux-{image,dtb}-current-meson64.deb
sudo dpkg -i linux-{image,dtb}-current-meson64.deb
sudo reboot

Let’s see whether it helps. USB issues indeed were very common on all Odroid boards, for whatever reason. Maybe this can help.

However, on my Odroid N2+, which is very similar to the Odroid C4/HC4, USB and Ethernet both works fine. Also I could not find any hint elsewhere that this USB2 setting is not compatible with USB1.1 support enabled. And as this disables USB1.1 support, such devices would probably fallback to USB1.0 (UHCI) or not work at all, not sure.

Until build is done etc, before you test the new kernel, can you show below commands out with a USB device attached:

lsusb
ip a
dmesg -l 0,1,2,3

I know might be difficult without SSH, maybe you have a USB-UART adapter to get the output via serial console.

Thank you @MichaIng for your quickness!

Is there a better way to test it, maybe a new test image? Because if I had to restore again everything the way I do it… it’s so hard..

Makes sense. I triggered a build: DietPi-Build · MichaIng/DietPi@6dd6fd1 · GitHub
When it’s done, it will appear here: Index of /downloads/images/testing

1 Like

@MichaIng it didn’t work..

So it boots but USB port is not working?

Can you show the the kernel logs, and whether/which USB hub and device is detected?

lsusb
dmesg

I have searched the existing open and closed issues

Required Information

  • DietPi version | G_DIETPI_VERSION_CORE=9
    G_DIETPI_VERSION_SUB=13
    G_DIETPI_VERSION_RC=2
    G_GITBRANCH=‘master’
    G_GITOWNER=‘MichaIng’
    G_LIVE_PATCH_STATUS[0]=‘not applicable’
    G_LIVE_PATCH_STATUS[1]=‘applied’
    G_LIVE_PATCH_STATUS[2]=‘applied’
    G_LIVE_PATCH_STATUS[3]=‘applied’
  • Kernel version | Linux DietPi 6.12.27-current-meson64 #1 SMP PREEMPT Mon May 5 09:00:29 UTC 2025 aarch64 GNU/Linux
  • Architecture | arm64
  • SBC model | Odroid HC4
  • Power supply used | 15V/4A
  • SD card used | SanDisk Ultra

Problem

I have issues recognizing the USB 3.0 storage devices on my setup. The devices used are an external HDD (Seagate) and a USB stick. When a device is inserted, dmesg shows usb usb1-port2: connect-debounce failed. Both lsusb and lsblk don’t show anything related to the inserted devices. I’ve tried adding the uas module via modprobe and reinserting the devices to no avail.

The issue persists across 3 different machines of the same kind (Odroid HC4). I’ve also tried another distro - the “official” Ubuntu distribution for the SBC on a separate SD card, and I could see the external devices - this makes me doubt that this is a hardware issue.

I am pretty puzzled, but also not a specialist in Linux drivers and hardware debugging. Some help would be appreciated :slight_smile:

Logs

[yura:~] dmesg | grep usb
[    0.734624] usbcore: registered new interface driver usbfs
[    0.734667] usbcore: registered new interface driver hub
[    0.734718] usbcore: registered new device driver usb
[    1.553013] usbcore: registered new interface driver usb-storage
[    1.567733] usbcore: registered new interface driver usbhid
[    1.567748] usbhid: USB HID core driver
[    1.829987] dwc3-meson-g12a ffe09000.usb: USB2 ports: 2
[    1.830068] dwc3-meson-g12a ffe09000.usb: USB3 ports: 0
[    1.833160] dwc2 ff400000.usb: supply vusb_d not found, using dummy regulator
[    1.833365] dwc2 ff400000.usb: supply vusb_a not found, using dummy regulator
[    1.833871] dwc2 ff400000.usb: EPs: 7, dedicated fifos, 712 entries in SPRAM
[    1.837063] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 6.12
[    1.837121] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    1.837169] usb usb1: Product: xHCI Host Controller
[    1.837203] usb usb1: Manufacturer: Linux 6.12.27-current-meson64 xhci-hcd
[    1.837247] usb usb1: SerialNumber: xhci-hcd.1.auto
[    1.838147] usb usb2: We don't know the algorithms for LPM for this host, disabling LPM.
[    1.838294] usb usb2: New USB device found, idVendor=1d6b, idProduct=0003, bcdDevice= 6.12
[    1.838351] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    1.839598] usb usb2: Product: xHCI Host Controller
[    1.840813] usb usb2: Manufacturer: Linux 6.12.27-current-meson64 xhci-hcd
[    1.842102] usb usb2: SerialNumber: xhci-hcd.1.auto
[    4.538500] usb usb1-port2: connect-debounce failed
[   83.645499] usbcore: registered new interface driver uas
[  460.349117] usbcore: deregistering interface driver uas
[  519.212944] usbcore: registered new interface driver uas



[yura:~] lsusb
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub



[yura:~] lsmod
Module                  Size  Used by
uas                    24576  0
binfmt_misc            20480  1
zfs                  4079616  3
spl                    86016  1 zfs
snd_soc_hdmi_codec     20480  1
panfrost               73728  0
snd_soc_meson_axg_sound_card    12288  0
snd_soc_meson_card_utils    12288  1 snd_soc_meson_axg_sound_card
snd_soc_meson_axg_tdmout    20480  1
gpu_sched              32768  1 panfrost
snd_soc_meson_g12a_tohdmitx    16384  1
polyval_ce             12288  0
polyval_generic        12288  1 polyval_ce
drm_shmem_helper       20480  1 panfrost
snd_soc_meson_codec_glue    12288  1 snd_soc_meson_g12a_tohdmitx
meson_gxbb_wdt         12288  0
meson_vdec             77824  0
snd_soc_meson_axg_frddr    32768  3
snd_soc_meson_axg_fifo    16384  1 snd_soc_meson_axg_frddr
videobuf2_dma_contig    20480  1 meson_vdec
meson_rng              12288  0
ao_cec_g12a            12288  0
meson_ddr_pmu_g12      24576  0
v4l2_mem2mem           24576  1 meson_vdec
ir_nec_decoder         16384  0
videobuf2_memops       16384  1 videobuf2_dma_contig
videobuf2_v4l2         20480  2 meson_vdec,v4l2_mem2mem
dw_hdmi_i2s_audio      12288  0
videodev              217088  3 meson_vdec,videobuf2_v4l2,v4l2_mem2mem
rc_odroid              12288  0
meson_ir               12288  0
meson_saradc           24576  0
snd_soc_meson_axg_tdm_interface    12288  2 snd_soc_meson_axg_sound_card
rc_core                45056  4 ir_nec_decoder,meson_ir,rc_odroid
videobuf2_common       49152  5 meson_vdec,videobuf2_dma_contig,videobuf2_v4l2,v4l2_mem2mem,videobuf2_memops
mc                     53248  4 videodev,videobuf2_v4l2,videobuf2_common,v4l2_mem2mem
snd_soc_meson_axg_tdm_formatter    12288  2 snd_soc_meson_axg_tdm_interface,snd_soc_meson_axg_tdmout
snd_soc_core          188416  10 snd_soc_meson_axg_tdm_formatter,snd_soc_meson_axg_sound_card,snd_soc_hdmi_codec,snd_soc_meson_g12a_tohdmitx,snd_soc_meson_axg_tdm_interface,snd_soc_meson_axg_fifo,snd_soc_meson_axg_tdmout,snd_soc_meson_axg_frddr,snd_soc_meson_card_utils,snd_soc_meson_codec_glue
pwm_fan                20480  0
snd_compress           24576  1 snd_soc_core
ac97_bus               12288  1 snd_soc_core
snd_pcm_dmaengine      12288  1 snd_soc_core
snd_pcm               106496  7 snd_soc_hdmi_codec,snd_compress,snd_soc_meson_axg_tdm_interface,snd_soc_core,snd_soc_meson_axg_fifo,snd_soc_meson_codec_glue,snd_pcm_dmaengine
snd_timer              36864  1 snd_pcm
snd                    77824  5 snd_soc_hdmi_codec,snd_timer,snd_compress,snd_soc_core,snd_pcm
soundcore              12288  1 snd
nvmem_meson_efuse      12288  0
sg                     28672  0
efi_pstore             12288  0
dm_mod                126976  0
autofs4                45056  2
pata_acpi              12288  0
meson_gxl              16384  0
smsc                   16384  1 meson_gxl
rtc_pcf8563            20480  0
realtek                36864  1
axg_audio              45056  13
sclk_div               12288  1 axg_audio
reset_meson_audio_arb    12288  3
ahci                   49152  2
clk_phase              12288  1 axg_audio
libahci                40960  1 ahci
libata                208896  3 libahci,ahci,pata_acpi
dwmac_generic          12288  0
rtc_meson_vrtc         16384  1
dwmac_meson8b          12288  0

For comparison, here an output for the same hardware, but with the Ubuntu image specified in the original post. The device is correctly recognized, no issues are present.

root@odroid:~# uname -a
Linux odroid 6.6.90-131 #1 SMP PREEMPT Thu May 15 00:25:50 UTC 2025 aarch64 aarch64 aarch64 GNU/Linux



root@odroid:~# dmesg | grep usb
[    0.276530] usbcore: registered new interface driver usbfs
[    0.276698] usbcore: registered new interface driver hub
[    0.276841] usbcore: registered new device driver usb
[    1.733339] usbcore: registered new interface driver usb-storage
[    1.814615] usbcore: registered new interface driver usbhid
[    1.814675] usbhid: USB HID core driver
[    2.192373] dwc3-meson-g12a ffe09000.usb: USB2 ports: 2
[    2.194164] dwc3-meson-g12a ffe09000.usb: USB3 ports: 0
[    2.203161] dwc2 ff400000.usb: supply vusb_d not found, using dummy regulator
[    2.206680] dwc2 ff400000.usb: supply vusb_a not found, using dummy regulator
[    2.213811] dwc2 ff400000.usb: Controller does not support host mode.
[    2.219993] dwc2: probe of ff400000.usb failed with error -22
[    2.274195] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 6.06
[    2.281873] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    2.289979] usb usb1: Product: xHCI Host Controller
[    2.293881] usb usb1: Manufacturer: Linux 6.6.90-131 xhci-hcd
[    2.299638] usb usb1: SerialNumber: xhci-hcd.2.auto
[    2.313056] usb usb2: We don't know the algorithms for LPM for this host, disabling LPM.
[    2.320460] usb usb2: New USB device found, idVendor=1d6b, idProduct=0003, bcdDevice= 6.06
[    2.328484] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    2.335888] usb usb2: Product: xHCI Host Controller
[    2.340521] usb usb2: Manufacturer: Linux 6.6.90-131 xhci-hcd
[    2.346272] usb usb2: SerialNumber: xhci-hcd.2.auto
[    2.575769] usb 1-2: new high-speed USB device number 2 using xhci-hcd
[    2.739692] usb 1-2: New USB device found, idVendor=8564, idProduct=1000, bcdDevice=11.00
[    2.742367] usb 1-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[    2.749435] usb 1-2: Product: Mass Storage Device
[    2.754115] usb 1-2: Manufacturer: JetFlash
[    2.758368] usb 1-2: SerialNumber: 058N4DCJZ4AP6T1Z
[    2.768072] usb-storage 1-2:1.0: USB Mass Storage device detected
[    2.769879] scsi host0: usb-storage 1-2:1.0
[    3.914928] usbcore: registered new interface driver uas



root@odroid:~# lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 8564:1000 Transcend Information, Inc. JetFlash
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub



root@odroid:~# lsmod
Module                  Size  Used by
qrtr                   28672  2
rfkill                 28672  1
ir_nec_decoder         16384  0
meson_vdec             77824  0
videobuf2_dma_contig    20480  1 meson_vdec
rc_odroid              12288  0
v4l2_mem2mem           32768  1 meson_vdec
meson_ir               12288  0
videobuf2_memops       16384  1 videobuf2_dma_contig
videobuf2_v4l2         28672  2 meson_vdec,v4l2_mem2mem
videodev              253952  3 meson_vdec,videobuf2_v4l2,v4l2_mem2mem
videobuf2_common       49152  5 meson_vdec,videobuf2_dma_contig,videobuf2_v4l2,v4l2_mem2mem,videobuf2_memops
pwm_fan                20480  0
sch_fq_codel           16384  2
fuse                  131072  1
dm_mod                135168  0
nfnetlink              20480  1
ip_tables              32768  0
x_tables               49152  1 ip_tables
ipv6                  622592  24
uas                    28672  0
rtc_pcf8563            24576  0
ahci                   36864  0
spidev                 28672  0
libahci                49152  1 ahci
libata                241664  2 libahci,ahci
rtc_meson_vrtc         16384  1

I’ve noticed that the kernel is compiled with the CONFIG_USB_GADGET parameter enabled:

[yura:~] zcat /proc/config.gz | grep CONFIG_USB_GADGET
CONFIG_USB_GADGET=y
# CONFIG_USB_GADGET_DEBUG is not set
# CONFIG_USB_GADGET_DEBUG_FILES is not set
# CONFIG_USB_GADGET_DEBUG_FS is not set
CONFIG_USB_GADGET_VBUS_DRAW=2
CONFIG_USB_GADGET_STORAGE_NUM_BUFFERS=2
# CONFIG_USB_GADGET_XILINX is not set
CONFIG_USB_GADGETFS=m
CONFIG_USB_GADGET_TARGET=m

According to the documentation, enabling this parameter makes the device running the Linux kernel act as a USB peripheral rather than a host. Since USB peripherals cannot host other USB devices, the behavior above seems pretty reasonable! The “official” Ubuntu image for the HC4 has this parameter disabled.

I wonder now, why is this parameter enabled for the DietPi image in the first place?

@MichaIng for sure you know if we create kernel for Odroid HC4 ourselves or if it is vendor/mainline kernel

We build the kernel ourselves for all SBCs but RPi and x86_64 systems. They are build with the Armbian build system, which provides the configs, as well as several patches to whichever sources are used: mainline Linux in case of Odroid HC4 and 64-bit Amlogic meson SoCs in general. We maintain an Armbian fork with some additional fixes/enhancements/additions, so we can do config changes as well, if needed.

There is another matching report where we tries a few things already, let me merge this: Odroid HC4 | USB and Ethernet not working

Enabling USB gadget mode support does not mean that USB ports do run in this mode, same like enabling a certain driver does not mean it is used (for every device). The mode for onboard USB ports is defined in the device tree, and sometimes there are overlays to switch it for some ports (usually USB-C ports if available), hence the kernel reasonably ships with the neede drivers/support for that. My Odroid N2+ uses the same kernel, and all it’s USB ports are functional.

Let me check the device tree for the HC4, maybe the USB mode is not correctly defined there.

Something else we did not check yet: Maybe the wrong device tree is loaded. Can you please check this:

cat /proc/device-tree/model

Thanks for looking into this. Here’s the output that I get:

[yura:~] cat /proc/device-tree/model
Hardkernel ODROID-HC4

Let me know if I can provide more info for debugging.

UPD. To add some more info since my post was merged, I don’t seem to have any Ethernet issues. I am plugging my HC4 into the router and connecting to it via ssh on the local network.

I’ve just tried this (my Linux version is Linux DietPi 6.12.30-current-meson64 now), the problem persists - no new devices are visible from lsusb, dmesg gives me usb usb1-port2: connect-debounce failed.

Here are the device trees from both installations. Obtained via
dtc -I fs /sys/firmware/devicetree/base

devicetree_dietpi.txt (93.9 KB)
devicetree_official.txt (94.8 KB)

Thanks for the info, also that Ethernet is working for you. So the correct device tree is loaded.

Also the device tree comparison is helpful, so I do not need to loop through the includes.

The USB nodes look identical:

  • 1 parent node usb@ffe09000 which has OTG mode assigned.
  • 1 child node usb@ff500000 which has host mode assigned, which will be the USB port exposed on the board.
  • 1 child node usb@ff400000, which is probably the micro USB 2.0 OTG port on the Odroid C4, irrelevant for the HC4. The logs of your Ubuntu image also show it loaded with the info that it does not support host mode.
  • Here they are: Making sure you're not a bot!
  • The 2 related phy nodes are identical as well.

Generally the device trees are pretty identical. Some nodes are defined in a more flat fashion in mainline Linux, but that does not make a difference, and nothing related to USB anyway.

Probably something changed in U-Boot and broke USB initialisation somehow. We use the Odroid C4 bootloader, which was identical when building with Armbian, since they used the C4 config for both. Coincidence or not, this changed 2 weeks ago: odroidhc4: u-boot: 2025.04; use hc4 defconfig for sd as well as mtd · armbian/build@faac261 · GitHub

Possible that a change in U-Boot made this necessary, even that nothing such is documented in commit message or PR. I’ll trigger a U-Boot build: Armbian · MichaIng/DietPi@5245e64 · GitHub

cd /tmp
wget https://dietpi.com/downloads/binaries/testing/linux-u-boot-odroidhc4-current.deb
sudo dpkg -i linux-u-boot-odroidhc4-current.deb
sudo /boot/dietpi/func/dietpi-set_hardware flash-uboot-mmc
sudo reboot

Generally the step is good, since this also adds an SPI bootloader image. Many users will have erased the SPI bootloader since it does not support Armbian, and it did not support DietPi either until DietPi v8.14, and new images only from that point on. Flashing a functional bootloader to SPI potentially enables USB and SATA boot support.

EDIT: The debounce has been reported a long time ago already: Dietpi usb1-port2: connect-debounce failed
Probably depends on the USB device as well. I mean Odroids and USB is an old old old story :smile:.
Same was reported for Hardkernel image: https://www.reddit.com/r/ODroid/comments/wcrdeq/usb_port_not_working_on_hc4/

Updating U-Boot helped! I can see the storage device from lsblk right after rebooting. So the core of the issue is that the faulty DietPi image used a new config for U-Boot on HC4, but the old version of U-Boot itself?

In any case, thank you for the work and the explanations! I learned something in the process :slight_smile: .