Hdd always spins down

Hi,
I have a Vero4k+ and a Toshiba MG08ACA16TE 16TB enterprise drive in an Inateck 3.5" USB3.0 enclosure with UASP.
These kinds of drives dislike spinning up and down repeatedly, it’s best to keep them running permanently for sake of longevity.
If the drive, in that enclosure, is connected to a PC with “sleep drives after x minutes” disabled (Windows or linux), it will obey and keep spinning.
But connected to the Vero, if you open a movie, the drive will have spun down by the time you finish.
To open the next one the drive will have to spin up again.
I already had that problem a while back with a WD red 8TB He but couldn’t solve it.
Also, when I shut OSMC down (menu or ssh), the disk keeps spinning indefinitely, leading to an emergency-head-retract when power is cut (not great).

I even reflashed the ASmedia 1153E USB-to-SATA bridge in the enclosure with a newer firmware, making sure to disable automatic spindown timer of that bridge IC, but on the Vero it’s always spinning up and down and forgets to on shutdown.

What I want is to power everything on, the hdd spins up and stays on, until osmc shuts down, then it should stop spinning.
Can you please help me achieve that?

Hi,

just for a first test you can try to change a line in /etc/udisks-glue.conf.

Here you find at the end a line

sudo /sbin/hdparm -S 240 %device_file

and change that to

sudo /sbin/hdparm -S 0 %device_file

(Values 1…240 are multiples of 5 seconds, so actual the drives should spin down after 20 mins if this code path was hit. 0 means to disable automatic spin down for the drive)

Reboot, wait 25 and more minutes … and let us know whether the behaviour changed at all.

thank you for responding and trying to help!

I already tried solving the issue over a year ago, so line 95 already contained -S 0
which should disable spindown but somehow doesn’t

What is the output of ?

journalctl --no-pager|grep -i "setting standby"

Have you tried another enclosure?

A lot of enclosures (USB) don’t send hibernation signals correctly. Sometimes there is more joy with hd-idle.

I’ve always assumed there was something in the caddy that causes a spin-down and that wasn’t user-adjustable.

A hacky method of keeping it spinning would be to cause a disk read every X minutes, but would need to be a big enough read that it wasn’t just handled by the cache.

As for staying on after shutdown, my cheapo Atolla caddy used to do that but my Seagate Backup Plus does spin down. Does yours spin down if you unmount it? Maybe the OSMC shutdown sequence needs looking at.

Hi, so I ran the grep for “setting standby” and this is the result:

Mar 05 23:20:10 osmc udisks-glue[2440]:  setting standby to 0 (off)
Mar 08 09:12:27 osmc udisks-glue[7128]:  setting standby to 240 (20 minutes)
Mar 08 09:19:58 osmc udisks-glue[3079]:  setting standby to 240 (20 minutes)
Mar 08 09:55:21 osmc udisks-glue[3705]:  setting standby to 240 (20 minutes)
Mar 09 07:24:08 osmc udisks-glue[3101]:  setting standby to 0 (off)
Mar 09 07:24:33 osmc udisks-glue[3018]:  setting standby to 0 (off)
Mar 09 07:26:18 osmc udisks-glue[3096]:  setting standby to 0 (off)
Mar 11 02:25:27 osmc udisks-glue[3017]:  setting standby to 0 (off)
Mar 12 00:13:57 osmc udisks-glue[2990]:  setting standby to 0 (off)
Mar 13 00:53:42 osmc udisks-glue[2987]:  setting standby to 0 (off)
Mar 13 21:35:36 osmc udisks-glue[2985]:  setting standby to 0 (off)
Mar 14 20:49:05 osmc udisks-glue[2982]:  setting standby to 0 (off)
Mar 15 21:41:56 osmc udisks-glue[2983]:  setting standby to 0 (off)
Mar 17 00:13:39 osmc udisks-glue[2988]:  setting standby to 0 (off)
Mar 17 23:22:22 osmc udisks-glue[2994]:  setting standby to 0 (off)
Mar 18 22:42:43 osmc udisks-glue[2984]:  setting standby to 0 (off)
Mar 20 21:45:07 osmc udisks-glue[2992]:  setting standby to 0 (off)
Mar 23 22:57:22 osmc udisks-glue[2976]:  setting standby to 0 (off)
Mar 28 22:57:54 osmc udisks-glue[2985]:  setting standby to 0 (off)
Mar 29 22:04:51 osmc udisks-glue[2988]:  setting standby to 0 (off)
Mar 30 22:05:46 osmc udisks-glue[2986]:  setting standby to 0 (off)
Mar 31 21:28:49 osmc udisks-glue[2984]:  setting standby to 0 (off)
Apr 02 03:24:02 osmc udisks-glue[2984]:  setting standby to 0 (off)
Apr 02 23:57:32 osmc udisks-glue[2989]:  setting standby to 0 (off)
Apr 03 23:04:09 osmc udisks-glue[2983]:  setting standby to 0 (off)
Apr 05 00:43:02 osmc udisks-glue[2988]:  setting standby to 0 (off)
Apr 05 19:55:53 osmc udisks-glue[2989]:  setting standby to 0 (off)
Apr 05 22:29:05 osmc udisks-glue[2989]:  setting standby to 0 (off)
Apr 06 22:32:47 osmc udisks-glue[2985]:  setting standby to 0 (off)
Apr 07 23:01:32 osmc udisks-glue[2984]:  setting standby to 0 (off)
Apr 08 21:04:04 osmc udisks-glue[2991]:  setting standby to 0 (off)
Apr 10 23:29:51 osmc udisks-glue[2989]:  setting standby to 0 (off)
Apr 11 23:49:38 osmc udisks-glue[2990]:  setting standby to 0 (off)
Apr 12 20:25:07 osmc udisks-glue[2992]:  setting standby to 0 (off)
Apr 13 21:56:47 osmc udisks-glue[2990]:  setting standby to 0 (off)
Apr 14 20:26:35 osmc udisks-glue[2987]:  setting standby to 0 (off)
Apr 15 16:55:29 osmc udisks-glue[3099]:  setting standby to 0 (off)
Apr 16 00:06:04 osmc udisks-glue[3016]:  setting standby to 0 (off)
Apr 16 22:25:58 osmc udisks-glue[2982]:  setting standby to 0 (off)
Apr 17 20:43:06 osmc udisks-glue[2990]:  setting standby to 0 (off)
Apr 18 22:34:36 osmc udisks-glue[2978]:  setting standby to 0 (off)
Apr 19 21:40:08 osmc udisks-glue[2994]:  setting standby to 0 (off)
Apr 20 22:05:33 osmc udisks-glue[2985]:  setting standby to 0 (off)
Apr 21 23:11:27 osmc udisks-glue[2985]:  setting standby to 0 (off)
Apr 22 22:45:28 osmc udisks-glue[2986]:  setting standby to 0 (off)
Apr 23 22:06:24 osmc udisks-glue[2993]:  setting standby to 0 (off)
Apr 24 21:37:05 osmc udisks-glue[2987]:  setting standby to 0 (off)
Apr 25 22:58:19 osmc udisks-glue[2971]:  setting standby to 0 (off)
Apr 26 22:14:44 osmc udisks-glue[2983]:  setting standby to 0 (off)
Apr 27 21:29:18 osmc udisks-glue[2990]:  setting standby to 0 (off)
Apr 29 22:35:47 osmc udisks-glue[2987]:  setting standby to 0 (off)
Apr 30 21:38:33 osmc udisks-glue[2980]:  setting standby to 0 (off)
May 01 23:28:33 osmc udisks-glue[2990]:  setting standby to 0 (off)
May 02 21:42:01 osmc udisks-glue[2986]:  setting standby to 0 (off)
May 03 18:59:33 osmc udisks-glue[2984]:  setting standby to 0 (off)
May 03 23:35:17 osmc udisks-glue[2987]:  setting standby to 0 (off)
May 05 01:12:11 osmc udisks-glue[2977]:  setting standby to 0 (off)
May 05 22:00:45 osmc udisks-glue[2981]:  setting standby to 0 (off)
May 06 23:39:24 osmc udisks-glue[2964]:  setting standby to 0 (off)
May 06 23:39:25 osmc udisks-glue[2985]:  setting standby to 0 (off)
May 08 21:36:15 osmc udisks-glue[2978]:  setting standby to 0 (off)
May 10 00:59:16 osmc udisks-glue[2997]:  setting standby to 0 (off)
May 11 01:30:27 osmc udisks-glue[2986]:  setting standby to 0 (off)
May 11 22:01:34 osmc udisks-glue[2985]:  setting standby to 0 (off)
May 12 21:52:43 osmc udisks-glue[2984]:  setting standby to 0 (off)
May 12 23:20:01 osmc udisks-glue[2992]:  setting standby to 0 (off)
May 13 17:11:36 osmc udisks-glue[2990]:  setting standby to 0 (off)
May 13 21:03:29 osmc udisks-glue[2991]:  setting standby to 0 (off)
May 13 22:43:06 osmc udisks-glue[2989]:  setting standby to 0 (off)
May 14 22:49:27 osmc udisks-glue[2981]:  setting standby to 0 (off)
May 15 23:42:04 osmc udisks-glue[2994]:  setting standby to 0 (off)
May 16 21:47:10 osmc udisks-glue[2989]:  setting standby to 0 (off)
May 18 15:48:10 osmc udisks-glue[2987]:  setting standby to 0 (off)
May 18 22:41:19 osmc udisks-glue[2991]:  setting standby to 0 (off)
May 19 22:55:36 osmc udisks-glue[2975]:  setting standby to 0 (off)
May 21 01:07:51 osmc udisks-glue[2989]:  setting standby to 0 (off)
May 21 20:38:28 osmc udisks-glue[2996]:  setting standby to 0 (off)
May 22 21:49:54 osmc udisks-glue[2987]:  setting standby to 0 (off)
May 24 00:51:49 osmc udisks-glue[2984]:  setting standby to 0 (off)
May 24 20:41:07 osmc udisks-glue[2978]:  setting standby to 0 (off)
May 24 22:37:23 osmc udisks-glue[2986]:  setting standby to 0 (off)
May 25 14:03:36 osmc udisks-glue[2989]:  setting standby to 0 (off)
May 25 23:03:31 osmc udisks-glue[2990]:  setting standby to 0 (off)
May 26 20:37:37 osmc udisks-glue[2995]:  setting standby to 0 (off)
May 27 21:37:45 osmc udisks-glue[2989]:  setting standby to 0 (off)
May 29 02:45:37 osmc udisks-glue[2985]:  setting standby to 0 (off)
May 29 22:23:28 osmc udisks-glue[2969]:  setting standby to 0 (off)
May 31 01:18:28 osmc udisks-glue[2986]:  setting standby to 0 (off)
Jun 01 00:27:28 osmc udisks-glue[2974]:  setting standby to 0 (off)
Jun 01 21:38:16 osmc udisks-glue[2984]:  setting standby to 0 (off)
Jun 03 02:22:34 osmc udisks-glue[2973]:  setting standby to 0 (off)
Jun 03 21:04:28 osmc udisks-glue[2995]:  setting standby to 0 (off)
Jun 04 22:20:58 osmc udisks-glue[2987]:  setting standby to 0 (off)
Jun 05 16:28:36 osmc udisks-glue[2993]:  setting standby to 0 (off)
Jun 05 22:24:46 osmc udisks-glue[2981]:  setting standby to 0 (off)
Jun 06 21:53:02 osmc udisks-glue[2970]:  setting standby to 0 (off)
Jun 08 02:19:38 osmc udisks-glue[2994]:  setting standby to 0 (off)
Jun 08 23:39:33 osmc udisks-glue[2986]:  setting standby to 0 (off)
Jun 10 02:15:53 osmc udisks-glue[2990]:  setting standby to 0 (off)
Jun 10 21:43:56 osmc udisks-glue[2982]:  setting standby to 0 (off)
Jun 12 00:45:12 osmc udisks-glue[2991]:  setting standby to 0 (off)
Jun 13 02:59:35 osmc udisks-glue[2985]:  setting standby to 0 (off)
Jun 13 22:13:25 osmc udisks-glue[2973]:  setting standby to 0 (off)
Jun 15 00:14:04 osmc udisks-glue[2990]:  setting standby to 0 (off)
Jun 15 21:18:49 osmc udisks-glue[2982]:  setting standby to 0 (off)
Jun 17 03:40:49 osmc udisks-glue[2992]:  setting standby to 0 (off)
Jun 17 23:50:52 osmc udisks-glue[2987]:  setting standby to 0 (off)
Jun 18 22:34:56 osmc udisks-glue[3124]:  setting standby to 0 (off)
Jun 19 21:27:19 osmc udisks-glue[3045]:  setting standby to 0 (off)
Jun 20 22:17:36 osmc udisks-glue[2985]:  setting standby to 0 (off)
Jun 20 22:56:16 osmc udisks-glue[2969]:  setting standby to 0 (off)
Jun 21 22:37:03 osmc udisks-glue[2984]:  setting standby to 0 (off)
Jun 23 04:13:24 osmc udisks-glue[2987]:  setting standby to 0 (off)
Jun 23 22:04:31 osmc udisks-glue[2985]:  setting standby to 0 (off)
Jun 25 00:56:18 osmc udisks-glue[2992]:  setting standby to 0 (off)
Jun 25 23:31:18 osmc udisks-glue[2979]:  setting standby to 0 (off)
Jun 25 23:31:19 osmc udisks-glue[2985]:  setting standby to 0 (off)
Jun 27 20:50:44 osmc udisks-glue[2991]:  setting standby to 0 (off)
Jun 28 22:52:39 osmc udisks-glue[2985]:  setting standby to 0 (off)
Jun 29 23:51:25 osmc udisks-glue[2994]:  setting standby to 0 (off)
Jun 30 13:13:34 osmc udisks-glue[3092]:  setting standby to 0 (off)
Jun 30 22:39:53 osmc udisks-glue[3022]:  setting standby to 0 (off)
Jul 01 22:41:30 osmc udisks-glue[2971]:  setting standby to 0 (off)
Jul 02 21:02:41 osmc udisks-glue[3105]:  setting standby to 0 (off)

So it had been set fine…
As for the enclosure, it behaves exactly the way I tell it to on 2 PCs, one on Win10 and another one on Manjaro, so that shouldn’t be it…
I put the latest ASmedia firmware on the USB-SATA-bridge, from that site but on the PC it worked before the firmware update.
Like I said, in the flasher I made sure to disable the auto-spindown feature, so the enclosure isn’t telling the drive to spin down, and this is confirmed by the fact that after OSMC shutdown (red cross on the front of the Vero comes on), it keeps spinning indefinitely.
And that few-month-old Tosiba drive itself also behaves as expected on a PC…
Spindown command also work with USB2, right? The Vero 4k+ only seems to have those?
30MB/s for reading movies is more than enough, I’m not complaining but maybe spindown is configured differently over USB2?
Always writing to the disk periodically, while it might work is a hacky route I’d rather avoid because it would only solve the issue for me and require the heads to fly constantly, there must be something else going on here…
I tried manually unmounting with sudo umount /media/TO16, unmounts but keeps spinning indefinitely, but when I run sudo udisks --detach /dev/sda (lsblk told me) it immediately spins down just fine like you’d expect.
Or is there a different way I’m supposed to unmount it?

And it doesn’t matter whether I attach it directly to the Vero4k+ or through a usb 2.0 hub.
Always the same behavior.

The automatic spin-down while in OSMC happens quite quickly, <= 5 minutes after the last disk access.
Also, hd-idle is not installed, so it can’t be that.

hd-idle as in it may be worth a try to install it and try running hd-idle -i 0