You are not logged in.

#1 2018-02-10 11:54:53

markus21
Member
Registered: 2015-08-28
Posts: 26

[solved] Putting USB HDD to sleep, when PC shuts down

I've got a question regarding USB HDDs' power management.

I've got a USB 3.0 drive on my KODI NUC. However the drive is rarely used, while I stream media from another source.

For power management in general I set the APM to 128, to allow the drive to spin down.

 hdparm -B 128 /dev/sdX

The "-S" command however seems unsupported.

This works OK, for me. Only problem is that doesn't compeltely stop spinning, when I turn of the NUC. I tried to sync and unmount the HDD and then issue the

hdparm -y /dev/sdX

command, but while shutting down the NUC, the HDD starts spinning again and continues to do so after the NUC is off.

So how can I manage to issue the "-y" command in a way the drive won't start spinning again after / while shutting down?

Last edited by markus21 (2018-02-13 12:48:13)

Offline

#2 2018-02-10 12:18:32

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,731
Website

Re: [solved] Putting USB HDD to sleep, when PC shuts down

What about using community/hd-idle?  On my RPi3 NAS, I set it up with the following and it works great:

HD_IDLE_OPTS="-i 0 -a sda -i 900 -l /var/log/hd-idle.log"

Offline

#3 2018-02-10 12:32:03

markus21
Member
Registered: 2015-08-28
Posts: 26

Re: [solved] Putting USB HDD to sleep, when PC shuts down

Thanks for your input graysky! I wasn't aware of this tool as of now.

But the manpage to this tool always speaks of a "spin-down". This – as far as I know – means it reduces the rotation speed of the platter. And this already works with the hdparm -B 128 command. However the disk never stops spinning completely.

So my question is: does the hd-idle tool really stops the drive completely / put to sleep and let it be like that after shutting down the NUC?

Offline

#4 2018-02-10 12:44:10

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,731
Website

Re: [solved] Putting USB HDD to sleep, when PC shuts down

To me "spin-down" means to 0 , ie sleep, and is what happens on my system.

Last edited by graysky (2018-02-10 12:44:42)

Offline

#5 2018-02-10 20:12:31

markus21
Member
Registered: 2015-08-28
Posts: 26

Re: [solved] Putting USB HDD to sleep, when PC shuts down

This tool semms not to work for my HDD

sudo hd-idle -a sdb -t sdb # should spin down disk immediately
error: SCSI command failed with status 0x01
sense buffer:
00000000 70 00 05 00 00 00 00 0a-00 00 00 00 20 000000 p...................

And the -i 9000 command semms to do nothing at all. No return message.

Last edited by markus21 (2018-02-10 20:13:18)

Offline

#6 2018-02-10 22:42:51

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,224

Re: [solved] Putting USB HDD to sleep, when PC shuts down

Do you need usb wakeup?
Otherwise try to disable it using /proc/acpi/wakeup

Offline

#7 2018-02-13 12:47:53

markus21
Member
Registered: 2015-08-28
Posts: 26

Re: [solved] Putting USB HDD to sleep, when PC shuts down

seth wrote:

Do you need usb wakeup?
Otherwise try to disable it using /proc/acpi/wakeup

Thanks for further input. I don't hink that I will need usb wakeup, except for maybe CEC integration later on, but we'll gonna see by then.
https://www.pulse-eight.com/p/154/intel … ec-adapter

However the problem seems to be the hdd case and the USB adapter integrated in it. The HDD powers off fine, while in standby or on shutdown with another HDD case.

Offline

Board footer

Powered by FluxBB