How can i stop my external HDD from sleeping (micro buffer issues)?

the headline says it all. I built my own home media server (with *arr tools on a dietpi). Only issue is that my external USB3.0 HDD (brand is intenso) goes super fast into sleeping mode and spins down. therefore whenever new data needs to be transfered for continous playback, it first needs wake up and that causes the 1-2 seconds micro buffers, which occur every few minutes.

thats obviously super annoying… is there anyway i can tell my HDD to not spin down so fast?

i tried already to increase the “idle spindown” in the dietpi_drive_manager. without success. its still spinning down and goes into deep sleep.

I wonder if you could disable or set longer with hdparm (unless the dietpi script itself is doing that)

Might also be built into the firmware of the USB device to save power…

I think dietpi uses HDparm for idle shutdown. It did not work.

If hdparm doesn’t work, does this mean Incan basically throw away my 5tb HDD?

Not every HDD supports hdparm. Depends on model and vendor. You could try to connect your HDD to a local computer and use a vendor tool check/adjust spin down settings.

1 Like

The vendor does not provide any tool. It’s a cheap brand i guess?

Seems I’m out of luck then?

they still have a support hotline for technical questions. You can ask them how setting spin down times is possible.

Will do. But if that doesn’t help, it seems I’m out of luck or? Last chance would be to try to crack open the case and remove the hdd in another case?

probably @MichaIng has further ideas how to tweak spin down times.

Is the drive support setting APM?

hdparm -B 255 /dev/sda

I have one HDD attached via docking station which spins down also very fast with the default APM level 127. I need to set it to 128 for it to stay awake until either hdparm spindown timeout or 10 minutes docking station internal timeout make it sleep again.

Hi @MichaIng and @Joulinar

Thanks both for getting back to me.

i assume i should make above command to the drive which spins down very fast.

Here is what i get

root@DietPi:~# hdparm -B 255 /dev/sdd1

 setting Advanced Power Management level to disabled
 APM_level      = off

thats what i got. could i do the same thing as you did to prevent sleep? what commands do i need to use

i did now the following:

root@DietPi:~# hdparm -B 127 /dev/sdd1
 setting Advanced Power Management level to 0x7f (127)
 APM_level      = 127
root@DietPi:~# hdparm -S 241 /dev/sdd1

 setting standby to 241 (30 minutes)

127 wasn’t working for me neither. 128 was Working!

Thank you @MichaIng

Okay great, you can make this persistent in /etc/hdparm.conf.

1 Like

Ohh I need to make that persistent? I think it’s already. Or will it disappear after reboot?

How do I do that? With nano?

I’m a super noob in linux/Debian

Yes you can use nano to edit files.