Dietpi doesn't put my disk to sleep when not used - "bad/missing sense data"

Having issues with your DietPi installation or found a bug? Post it here.
Post Reply
LeVraiRoiDHyrule
Posts: 62
Joined: Tue Apr 28, 2020 3:00 pm

Dietpi doesn't put my disk to sleep when not used - "bad/missing sense data"

Post by LeVraiRoiDHyrule »

Hi,

I have a Western Digital USB3.0 6To HDD. It works quite well, but when it runs it's a bit noisy (and it gets more and more noisy every month. I guess it's normal over time).

But I noticed that it never goes to sleep. My Raspberry Pi 4 never puts the disk to sleep. I first looked if there was apps always using the disk and preventing it from going to sleep, so I installed iotop and looked for writes/reads. It appears there is no special app using the disk constantly.

So the problem is elsewhere. I tried again setting up the sleep timer in dietpi-drivemanager. I notice that the output is this :

Code: Select all

[ INFO ] DietPi-Drive_Manager | Applying spindown timeout to all drives now...

/dev/sda:
 setting Advanced Power Management level to 0x7f (127)
SG_IO: bad/missing sense data, sb[]:  70 00 0b 00 00 00 00 0a 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 setting standby to 36 (3 minutes)
SG_IO: bad/missing sense data, sb[]:  f0 00 01 00 50 40 24 0a 00 00 00 00 00 1d 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 APM_level      = not supported
[ INFO ] DietPi-Drive_Manager | Applying spindown timeout to /etc/hdparm.conf to be effective from next boot on...
Looks like there is an issue here. I don't know what is causing it. I can't find infos on this. Could someone help me to understand it ?

Thanks in advance for any answer. Any reply is welcome.
Have a great day !
User avatar
MichaIng
Site Admin
Posts: 3349
Joined: Sat Nov 18, 2017 6:21 pm

Re: Dietpi doesn't put my disk to sleep when not used - "bad/missing sense data"

Post by MichaIng »

It is normal that not all drives support APM, but they should support spindown. But the two errors are indeed not something I've seen yet. Could you try to run hdparm manually so that it applies the spindown timeout only:

Code: Select all

hdparm -S 36 /dev/sda
This should also immediately spindown of the drive.
LeVraiRoiDHyrule
Posts: 62
Joined: Tue Apr 28, 2020 3:00 pm

Re: Dietpi doesn't put my disk to sleep when not used - "bad/missing sense data"

Post by LeVraiRoiDHyrule »

MichaIng wrote: Tue Sep 28, 2021 5:27 pm It is normal that not all drives support APM, but they should support spindown. But the two errors are indeed not something I've seen yet. Could you try to run hdparm manually so that it applies the spindown timeout only:

Code: Select all

hdparm -S 36 /dev/sda
This should also immediately spindown of the drive.
Thanks a lot for your answer !

I tried this command, and it still throws the same error. But the problem is also that it doesn't put the drive to sleep. It looks like it does for half of a second though. It's like a very brief stutter. But then it makes as much noise as before and doesn't spindown.

What could be the cause of this ? I'm really worried that it could use my disk too much and damage it at the end. I found no solution so far and this forum is my only way out of this.

Thanks in advance for any answer, have a great day.
User avatar
Joulinar
Posts: 5927
Joined: Sat Nov 16, 2019 12:49 am

Re: Dietpi doesn't put my disk to sleep when not used - "bad/missing sense data"

Post by Joulinar »

we had a couple of cases in past where it was needed to connect HDD to a Windows computer and use vendor tool to update HDD or to set timing for the disk to go into sleep mode.
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
Post Reply