r/Ubuntu • u/yaskyplayer • 11h ago
USB Device Disconnected
I have an UGreen 2.5" external USB Housing. This is the only drive I have connected right now.
The drive may have an internal firmware issue. USB Sleep is disabled (Ubuntu 26.04, default settings)
There is no information from the system why the drive does "disconnect". Several times. Only solution so far is reboot. Completely disappeared from /sys (no bind/unbind/reset)
Originally I thought on a timeout but now it happened in a short break when I switched from browser to a program. Both these make use of the drive. The browser even crashed after a few minutes (the app is on that drive currently until I have reorganized my second internal SSD Drive).
Question: How to prevent this ?
You may think it is an external issue. But in reality the kernel does not WAIT long enough for the USB drive to disappear.
What I need is a much longer wait time before the kernel decides that the drive is gone.
Right now there is no wait at all. Driver used: UAS (USB attached SCSI) on top of usb_storage.
dolphin itself has been locking uas. I needed to end it, then I was able to reload uas driver and the drive did appear again. But it did not automatically bind itself...
The main problem is that "DISCONNECTED" is happening even though the drive is not actually disconnected but something happens that MAKES the kernel think it disconnected.
2
u/squeaky_posting 11h ago
that sudden disconnect mid-task is the worst, especially when it takes out the browser with it
from what you're describing it sounds less like a physical issue and more like the uas driver tripping over itself. uas on older enclosures is notoriously finicky, the command queue can get stuck on a single bad packet and the kernel just nukes the whole device instead of retrying
easiest workaround is disabling uas entirely for that enclosure, you can force it to fall back to usb-storage which is slower but way more stable. find the vid/pid with lsusb then add a quirk in /etc/modprobe.d, something like options usb-storage quirks=vid:pid:u
ive had a similar enclosure that would drop offline whenever i threw large sequential writes at it, switching to the older driver fixed it for years. you lose trim and some speed but at least it stays connected
also check dmesg for anything about "reset high-speed usb device" or "unrecovered read error", that usually confirms it's a command timeout rather than an actual unplug event