Issue Report: USB4 40Gbps Ports Limited to 20Gbps & Storage Detection Failure in ZimaOS 1.6.1

Subject: Issue Report: USB4 40Gbps Ports Limited to 20Gbps & Storage Detection Failure in Freshly Installed ZimaOS 1.6.1

System Specifications:

  • OS Version: ZimaOS 1.6.1 (Official Release, freshly installed)
  • Hardware: Minisforum N5 NAS / N5 Air
  • CPU/APU: AMD Ryzen™ 7 255 (8 cores/16 threads, Radeon 780M)
  • Memory: 64GB DDR5 SO-DIMM (5600MT/s)
  • Storage Configuration: 5x 3.5/2.5" HDD bays, 3x Internal M.2 NVMe SSD slots (PCIe 4.0), 1x PCIe x16 slot (wired at PCIe 4.0 x4), OCuLink port.
  • Tested External Device: OWC Express 1M2 Enclosure (loaded with Kioxia 7.68TB Enterprise SSD).
  1. Description of the Issue
    The Minisforum N5 NAS is equipped with two full-spec USB4 Type-C ports capable of up to 40Gbps transfers. However, on a freshly installed ZimaOS 1.6.1, the operating system limits these ports to 20Gbps in the system’s sysfs tree (rx_speed and tx_speed report 20.0 Gb/s each), even after trying different ports (Domain0/Domain1).

When connecting the OWC Express 1M2 enclosure, the device fails to establish a PCIe Tunnel, forcing it into a traditional USB transfer mode. Most importantly, ZimaOS Dashboard completely fails to detect or display the OWC external storage device in the Web UI.

  1. Technical Symptoms & In-depth Problems

Problem A: USB4 40Gbps Bandwidth Capped at 20Gbps

  • Symptoms: cat /sys/bus/thunderbolt/devices/0-2/rx_speed and tx_speed report 20.0 Gb/s.
  • Performance Drop: Real-world file transfers (via dd) are capped at a maximum throughput of ~1.1 GB/s, whereas a proper PCIe Tunneling connection should yield between 2.8 GB/s and 3.2 GB/s.

Problem B: ZimaOS Dashboard Fails to Detect the OWC Enclosure

  • Symptoms: Although the underlying Linux kernel identifies the external Kioxia drive (nvme2n1), the ZimaOS Dashboard UI does not list the external drive at all. This prevents users from mounting, formatting, or monitoring the OWC Express 1M2 through the web interface.

Problem C: Device Authorization & Power Management Conflict

  • Symptoms: The system requires continuous manual intervention via CLI. When entering low-power states, the device becomes unresponsive and yields an Invalid argument error upon reset, requiring a physical plug-and-unplug cycle.
  1. Proposed Fix / Request to Zima Team
  • AMD Platform USB4/Thunderbolt Drivers: Ensure the OS correctly initializes full 40Gbps negotiation and PCIe Tunneling on AMD-based Minisforum N5 devices.
  • External Storage Detection: Fix the bug where external NVMe enclosures are not detected in the ZimaOS UI.
  • Hotplug and Power Management Stability: Prevent device authorization drops during NAS sleep or idle periods.

Test Record and Analysis
1. Initial State and Issue Detection

tonylee@turbonas-zimaos:~ ➜ $ echo 1 | sudo tee /sys/bus/pci/rescan
1
tonylee@turbonas-zimaos:~ ➜ $ lsblk | grep nvme3n1
nvme3n1     259:10   0    0B  0 disk 
├─nvme3n1p1 259:11   0  200M  0 part 
└─nvme3n1p2 259:12   0  3.6T  0 part 
tonylee@turbonas-zimaos:~ ➜ $ echo 1 | sudo tee /sys/bus/pci/devices/0000:ca:00.6/remove
1
tonylee@turbonas-zimaos:~ ➜ $ echo 1 | sudo tee /sys/bus/pci/rescan
1
tonylee@turbonas-zimaos:~ ➜ $ sudo modprobe -r nvme
sudo modprobe nvmemodprobe: FATAL: Module nvme is builtin.

2. Thunderbolt and PCI Reset Attempts

tonylee@turbonas-zimaos:~ ➜ $ sudo modprobe -r nvme
sudo modprobe nvmemodprobe: FATAL: Module nvme is builtin.
tonylee@turbonas-zimaos:~ ➜ $ echo 0 | sudo tee /sys/bus/thunderbolt/devices/0-2/authorized
0
tonylee@turbonas-zimaos:~ ➜ $ echo 1 | sudo tee /sys/bus/thunderbolt/devices/0-2/authorized
1
tonylee@turbonas-zimaos:~ ➜ $ sudo sh -c "echo 1 > /sys/bus/pci/devices/0000:ca:00.5/reset"
tonylee@turbonas-zimaos:~ ➜ $ lsblk | grep nvme3n1
nvme3n1     259:10   0    0B  0 disk 
├─nvme3n1p1 259:11   0  200M  0 part 
└─nvme3n1p2 259:12   0  3.6T  0 part 

# Forcing remove and rescan iterations
tonylee@turbonas-zimaos:~ ➜ $ sudo sh -c "echo 1 > /sys/bus/pci/devices/0000:ca:00.5/remove"
tonylee@turbonas-zimaos:~ ➜ $ lsblk | grep nvme3n1
nvme3n1     259:10   0    0B  0 disk 
├─nvme3n1p1 259:11   0  200M  0 part 
└─nvme3n1p2 259:12   0  3.6T  0 part 

3. exFAT and ext4 Formatting Attempts

tonylee@turbonas-zimaos:~ ➜ $ sudo mkfs.exfat -n "OWC" /dev/nvme3n1p2
input string is too long
exFAT format fail!

tonylee@turbonas-zimaos:~ ➜ $ sudo mkfs.exfat -n "OWC" /dev/nvme3n1p2
exfatprogs version : 1.2.5
Creating exFAT filesystem(/dev/nvme3n1p2, cluster size=131072)
Writing volume boot record: done
Writing backup volume boot record: done
Fat table creation: done
Allocation bitmap creation: done
Upcase table creation: done
Writing root directory entry: done
Synchronizing...
exFAT format fail!

tonylee@turbonas-zimaos:~ ➜ $ sudo mkfs.ext4 -L "OWC" /dev/nvme3n1p2
mke2fs 1.47.2 (1-Jan-2025)
Warning: could not erase sector 2: Input/output error
Creating filesystem with 976702976 4k blocks and 244178944 inodes
Filesystem UUID: 50571c38-53e5-4170-b01d-888bf249535c
Warning: could not read block 0: Input/output error
Warning: could not erase sector 0: Input/output error
mkfs.ext4: Input/output error while writing out and closing file system

4. Kernel Messages (dmesg) Verification

[ 3050.657422] Buffer I/O error on dev nvme3n1p2, logical block 17677148, lost async page write
[ 3119.637066] thunderbolt 1-0:2.1: new retimer found, vendor=0x7fea device=0x1033
[ 3119.753708] thunderbolt 1-2: new device found, vendor=0x1e91 device=0xde79
[ 3119.753715] thunderbolt 1-2: Other World Computing Express 1M2

5. Verification Under MacOS
External SSD correctly identified and read by MacOS (containing existing partitions and data folders: Comix, download, eBook, Famiphoto, fizz, Games, mayo, Tony). Confirmed the file system is exFAT and is not corrupted.
6. Final Status Under ZimaOS

tonylee@turbonas-zimaos:~ ➜ $ sudo dd if=/dev/zero of=/dev/nvme3n1 bs=4k count=256 status=progress
dd: error writing '/dev/nvme3n1': No space left on device
tonylee@turbonas-zimaos:~ ➜ $ lsblk | grep nvme3n1
nvme3n1     259:10   0    0B  0 disk 

Analysis Summary

  • Symptom: The NVMe disk node is recognized as 0B in lsblk, and any write or I/O operation returns an Input/output error or No space left on device.

  • Root Cause: The issue is not caused by hardware malfunction or corruption of the exFAT file system itself. It is due to a driver and Kernel-level (6.17.4-2-pve in ZimaOS) incompatibility issue with Thunderbolt / PCIe hotplug handling. When switching devices between macOS and ZimaOS, the PCIe link enters a D3cold/power-saving state or becomes locked due to a bus reset failure.

  • Workaround: Recommend accessing the data via local area network (SMB/NFS) from macOS to bypass the hotplug driver lock until an OS/Kernel update addresses the Thunderbolt/USB4 issue.