Jmicron JMS576 USB to Sata Controller Issues with spin up

I have a number of external USB Storage drives I have plugged into my router (Linksys WRT1900ACS) through a USB Hub to create a NAS setup.

"The Hub and all the drives work properly except if they are connected with some new USB 3.1 to Sata external enclosures I got. These new enclosures use a chip set from Jmicron. (JMS576) The drives when connected with the new enclosure will mount and can be accessed and shared but will either not spin down at all or will not spin up properly if they did actually spin down.

NAS access will fail because the drive can't be accessed though it has actually span up from sleep. Sometimes if I wait long enough it will gain access and start working correctly but most of the time this is not the case and the Network Share will fail to find files.

I have run through a number of trouble shooting CLI options from this page.

https://openwrt.org/docs/guide-user/storage/usb-drives

What's interesting is the output from hdparm. A simple Seagate 500gb test with old enclosures review correct values and outputs. With the new Jmicron enclosures we get failed and missing values:

I think this is all driver related. Gargoyle GUI lists the Jmicron enclosure as generic. It shows differently to the other properly working drives. No exact drive model number for example. Just as with hdparm, this drive isn't being read properly and has missing much information. Amazing that it actually works at all.

Does anyone have any ideas for solving this problem? USB Storage Driver updates maybe? I have the latest v18.06 installed already. Can't use my NAS with this spin up sleep issue. Any help appreciated. Much thanks.

Do you have the UAS driver installed? kmod-usb-storage-uas I think -- though I think its only for USB 3 and I don't know if your device supports USB 3.

Yes I have the UAS driver installed but it is not being used on my device. from what I can see.

The USB 3.0 port gets 110mb/s reads and 90-100mb/s writes so I think that part of things are working properly. The issue is the lack of proper spin down and spin back up from sleep. Not much fun when you click on the drives and they won't power up properly and result in Network time outs or blank folder listings.

do they work fine on regular linux machines?

Would be an interesting venture to find out if they work properly on Linux but I don't have Linux installed. Sleep and everything works as it should when directly connected to a Windows PC.

You might try Debian in a VirtualBox VM. Not conclusive on success, but informative on failure. as suggested by mbo2o below

Live CD/DVD might be a better test in this case

1 Like

Live DVD would be easier for sure. Worth the time. On to it.

Have spent more time on the issue and found a solution. If I use hd-idle to spin down the drives everything seems to work properly with the new Jmicron controllers. They spin down always correctly at the set time by hd-idle and then importantly spin back up again when requested on the network.

hd-idle has a settings file /etc/config/hd-idle. Found I had to setup up multiple drives for Gargoyle by listing each drive separately like so:

config hd-idle
option enabled '1'
option disk 'sda'
option idle_time_unit 'minutes'
option idle_time_interval '10'

config hd-idle
option enabled '1'
option disk 'sdb'
option idle_time_unit 'minutes'
option idle_time_interval '10'

Don't know why hd-idle works and hdparm does not. Both work on my other usb controllers. Anyhow, this solution works with Jmicron and has solved my problem with reliable spin down and spin up.

Since I have solved the problem with Gargoyle (openwrt) I never needed to test the Debian live cd but I assume the same solution would work there as well.

Big thanks to all.