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

**URL:** https://dietpi.com/forum/t/how-can-i-stop-my-external-hdd-from-sleeping-micro-buffer-issues/15957
**Category:** Troubleshooting
**Created:** [14 February 2023 21:59 UTC](https://dietpi.com/forum/t/how-can-i-stop-my-external-hdd-from-sleeping-micro-buffer-issues/15957 "2023-02-14T21:59:10Z")
**Posts on this page:** 14
**Page:** 1

<div class="post-metadata">

### Author: ![cdsw](https://dietpi.com/forum/user_avatar/dietpi.com/cdsw/32/6939_2.png) [@cdsw](https://dietpi.com/forum/u/cdsw)
#### Post date: [14 February 2023 21:59 UTC](https://dietpi.com/forum/t/how-can-i-stop-my-external-hdd-from-sleeping-micro-buffer-issues/15957/1 "2023-02-14T21:59:10Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![WarHawk](https://dietpi.com/forum/user_avatar/dietpi.com/warhawk/32/21_2.png) [@WarHawk](https://dietpi.com/forum/u/WarHawk)
#### Post date: [15 February 2023 04:17 UTC](https://dietpi.com/forum/t/how-can-i-stop-my-external-hdd-from-sleeping-micro-buffer-issues/15957/2 "2023-02-15T04:17:57Z")

</div>

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

> **[Linux HDD sleep - how to enable and disable with hdparm](https://linuxconfig.org/change-hard-drive-s-sleep-standby-mode-timer-to-reduce-power-consumption)**
>
> In this linux hdd sleep tutorial, we cover instructions to enable or disable hard drive sleep via command line and GUI in Linux.

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

---

<div class="post-metadata">

### Author: ![cdsw](https://dietpi.com/forum/user_avatar/dietpi.com/cdsw/32/6939_2.png) [@cdsw](https://dietpi.com/forum/u/cdsw)
#### Post date: [15 February 2023 07:58 UTC](https://dietpi.com/forum/t/how-can-i-stop-my-external-hdd-from-sleeping-micro-buffer-issues/15957/3 "2023-02-15T07:58:16Z")

</div>

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?

---

<div class="post-metadata">

### Author: ![Joulinar](https://dietpi.com/forum/user_avatar/dietpi.com/joulinar/32/57_2.png) [@Joulinar](https://dietpi.com/forum/u/Joulinar)
#### Post date: [15 February 2023 08:21 UTC](https://dietpi.com/forum/t/how-can-i-stop-my-external-hdd-from-sleeping-micro-buffer-issues/15957/4 "2023-02-15T08:21:12Z")

</div>

> [@cdsw](#):
>
> If hdparm doesn’t work

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.

---

<div class="post-metadata">

### Author: ![cdsw](https://dietpi.com/forum/user_avatar/dietpi.com/cdsw/32/6939_2.png) [@cdsw](https://dietpi.com/forum/u/cdsw)
#### Post date: [15 February 2023 08:33 UTC](https://dietpi.com/forum/t/how-can-i-stop-my-external-hdd-from-sleeping-micro-buffer-issues/15957/5 "2023-02-15T08:33:54Z")

</div>

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

> **[index, follow](https://www.intenso.de/en)**
>
> (Intenso)® for everyday life! With its practical products, the company offers support in everyday life and helps to design modern life simple and safe

Seems I’m out of luck then?

---

<div class="post-metadata">

### Author: ![Joulinar](https://dietpi.com/forum/user_avatar/dietpi.com/joulinar/32/57_2.png) [@Joulinar](https://dietpi.com/forum/u/Joulinar)
#### Post date: [15 February 2023 08:38 UTC](https://dietpi.com/forum/t/how-can-i-stop-my-external-hdd-from-sleeping-micro-buffer-issues/15957/6 "2023-02-15T08:38:46Z")

</div>

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

---

<div class="post-metadata">

### Author: ![cdsw](https://dietpi.com/forum/user_avatar/dietpi.com/cdsw/32/6939_2.png) [@cdsw](https://dietpi.com/forum/u/cdsw)
#### Post date: [15 February 2023 08:46 UTC](https://dietpi.com/forum/t/how-can-i-stop-my-external-hdd-from-sleeping-micro-buffer-issues/15957/7 "2023-02-15T08:46:17Z")

</div>

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?

---

<div class="post-metadata">

### Author: ![Joulinar](https://dietpi.com/forum/user_avatar/dietpi.com/joulinar/32/57_2.png) [@Joulinar](https://dietpi.com/forum/u/Joulinar)
#### Post date: [15 February 2023 08:56 UTC](https://dietpi.com/forum/t/how-can-i-stop-my-external-hdd-from-sleeping-micro-buffer-issues/15957/8 "2023-02-15T08:56:05Z")

</div>

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

---

<div class="post-metadata">

### Author: ![MichaIng](https://dietpi.com/forum/user_avatar/dietpi.com/michaing/32/7_2.png) [@MichaIng](https://dietpi.com/forum/u/MichaIng)
#### Post date: [19 February 2023 20:22 UTC](https://dietpi.com/forum/t/how-can-i-stop-my-external-hdd-from-sleeping-micro-buffer-issues/15957/9 "2023-02-19T20:22:38Z")

</div>

Is the drive support setting APM?

```plaintext
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.

---

<div class="post-metadata">

### Author: ![cdsw](https://dietpi.com/forum/user_avatar/dietpi.com/cdsw/32/6939_2.png) [@cdsw](https://dietpi.com/forum/u/cdsw)
#### Post date: [24 February 2023 11:17 UTC](https://dietpi.com/forum/t/how-can-i-stop-my-external-hdd-from-sleeping-micro-buffer-issues/15957/10 "2023-02-24T11:17:56Z")

</div>

> [@MichaIng](#):
>
> `hdparm -B 255 /dev/sda`

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

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

/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:

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

/dev/sdd1:
 setting standby to 241 (30 minutes)

```

---

<div class="post-metadata">

### Author: ![cdsw](https://dietpi.com/forum/user_avatar/dietpi.com/cdsw/32/6939_2.png) [@cdsw](https://dietpi.com/forum/u/cdsw)
#### Post date: [25 February 2023 08:50 UTC](https://dietpi.com/forum/t/how-can-i-stop-my-external-hdd-from-sleeping-micro-buffer-issues/15957/11 "2023-02-25T08:50:57Z")

</div>

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

Thank you @MichaIng

---

<div class="post-metadata">

### Author: ![MichaIng](https://dietpi.com/forum/user_avatar/dietpi.com/michaing/32/7_2.png) [@MichaIng](https://dietpi.com/forum/u/MichaIng)
#### Post date: [25 February 2023 18:18 UTC](https://dietpi.com/forum/t/how-can-i-stop-my-external-hdd-from-sleeping-micro-buffer-issues/15957/12 "2023-02-25T18:18:19Z")

</div>

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

---

<div class="post-metadata">

### Author: ![cdsw](https://dietpi.com/forum/user_avatar/dietpi.com/cdsw/32/6939_2.png) [@cdsw](https://dietpi.com/forum/u/cdsw)
#### Post date: [25 February 2023 18:35 UTC](https://dietpi.com/forum/t/how-can-i-stop-my-external-hdd-from-sleeping-micro-buffer-issues/15957/13 "2023-02-25T18:35:41Z")

</div>

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

---

<div class="post-metadata">

### Author: ![Joulinar](https://dietpi.com/forum/user_avatar/dietpi.com/joulinar/32/57_2.png) [@Joulinar](https://dietpi.com/forum/u/Joulinar)
#### Post date: [25 February 2023 18:46 UTC](https://dietpi.com/forum/t/how-can-i-stop-my-external-hdd-from-sleeping-micro-buffer-issues/15957/14 "2023-02-25T18:46:49Z")

</div>

Yes you can use `nano` to edit files.
