As someone who regularly experiments with homelab setups, I wanted to expand my storage by attaching a 2TB SATA drive in an externally powered AXAGON USB 3.0 enclosure to my Odroid H4 Ultra Pro (an x86 mini-PC), running Proxmox VE. On paper, with external power and a quality enclosure, I expected flawless operation—however, I encountered a range of classic USB storage issues. Here’s my real-world troubleshooting journey and the persistent solutions I adopted.

1. Initial Setup and First Hurdles#

Hardware#

  • Host: Odroid H4 Ultra Pro (Intel/Core i3-N305, x86)
  • OS: Proxmox VE 8 (kernel 6.8.12-9-pve)
  • Drive: Seagate 2TB HDD inside an AXAGON USB 3.0 box (with its own power supply)

Connection#

I simply plugged the AXAGON box into a USB 3.0 port and powered up both devices. The drive spun up and was detected:

dmesg | tail -50

Sample output:

[3070521.423100] usb 2-2: Product: AXAGON USB BOX
[3070525.080366]  sda: sda1
[3070525.080612] sd 4:0:0:0: [sda] Attached SCSI disk

So far, so good.

2. Power Surprises: Externally Powered Still Needs Quality#

Despite external power, problems soon appeared:

  • Sometimes the disk would not show with lsblk or lsusb
  • Occasional disconnects or error messages in dmesg (e.g., “USB disconnect, device number X”)
  • Disk vanishing after periods of inactivity

3. Suspicious Suspend: The Hidden Culprit#

Most annoyingly, after the system was idle, the drive would sometimes disappear, requiring a physical unplug/replug.

Checking the logs:

dmesg | grep usb | tail -30

I noticed messages referencing power states or failed transitions. This pointed to Linux’s USB autosuspend feature, which intends to save energy but often disrupts external hard drives.

4. Disabling Autosuspend the Persistently Smart Way (udev Rule)#

Why udev?#

I wanted a fix that:

  • Targeted only this drive (not every USB device).
  • Survived reboots and kernel upgrades.

Gathering Device Info#

First, I found the AXAGON’s serial:

lsusb -v | grep -A3 AXAGON
# Output may show: iSerial                  1 AAAABBBBCCCC0003

Crafting the udev Rule#

I created /etc/udev/rules.d/50-usb-power.rules:

ACTION=="add", SUBSYSTEM=="usb", ATTR{serial}=="AAAABBBBCCCC0003", TEST=="power/control", ATTR{power/control}="on"

This forces power management to stay “on” for my AXAGON disk, disabling problematic autosuspend.

Reloading Without Reboot#

Applied immediately with:

sudo udevadm control --reload-rules
sudo udevadm trigger

After this, disconnects after idle periods vanished completely.

5. Disk Vanishes? Fast Recovery Without Reboot#

On rare occasions (such as after a power blip or kernel module update), the disk still disappeared. Instead of physically unplugging it, I hot-reloaded the USB controller driver.

How to Find the Correct USB Controller PCI Address#

Before unbinding and rebinding the USB driver, you need the PCI address of your USB controller. Here’s how I found mine:

  1. Check the kernel log for xHCI messages right after connecting a USB device:
dmesg | grep xhci_hcd | tail -20

Example output snippet:

[3021219.994085] usb usb1: Product: xHCI Host Controller
[3021219.994088] usb usb1: SerialNumber: 0000:00:14.0
[3070520.979474] xhci_hcd 0000:00:14.0: USB bus 2 deregistered
[3070521.082899] hub 2-0:1.0: USB hub found

Here you see the PCI address is 0000:00:14.0.

Alternatively, query PCI devices directly:

lspci | grep USB

Example output:

00:14.0 USB controller: Intel Corporation Device XXXX (rev 31)

For completeness, prefix with 0000: for full PCI address: 0000:00:14.0

Rebinding the USB Driver#

Once you know the PCI address (replace 0000:00:14.0 with yours):

echo -n "0000:00:14.0" | sudo tee /sys/bus/pci/drivers/xhci_hcd/unbind
sleep 1
echo -n "0000:00:14.0" | sudo tee /sys/bus/pci/drivers/xhci_hcd/bind

Within seconds, the USB controller resets, and your USB disks should be detected again without rebooting.

Check status with:

dmesg | tail -20
lsblk

6. Key Lessons & Takeaways#

  • USB autosuspend regularly messes with external drives. Targeted udev rules are a robust fix.
  • Persistent udev rules (per serial number) are better than global sysfs changes or kernel boot flags, as they don’t affect mice, keyboards, etc.
  • Controller rebind is a great last-resort recovery tool when devices won’t reappear.

Example Rule for Your Setup#

For anyone with a similar setup:

lsusb -v | grep -A3 AXAGON
# Use the serial number found here

Create:

/etc/udev/rules.d/50-usb-power.rules
ACTION=="add", SUBSYSTEM=="usb", ATTR{serial}=="[your_serial]", TEST=="power/control", ATTR{power/control}="on"

Then:

sudo udevadm control --reload-rules
sudo udevadm trigger

Conclusion#

The workflow above is applicable to almost any external USB storage on Linux—and these small configuration changes can make your USB storage as reliable as internal disks.

If you want, I can also provide ready-to-use scripts or detailed steps for discovering device attributes in your system. Just ask!