b17a camcontrol standby turning off HDD immediately - The FreeBSD Forums
The FreeBSD Forums  

Go Back   The FreeBSD Forums > Base System > System Hardware

System Hardware Internal storage, motherboards, PCI cards, stuff inside the case.

Reply
 
Thread Tools Display Modes
  #1  
Old December 30th, 2009, 17:16
aragon aragon is offline
Giant Locked
 
Join Date: Nov 2008
Location: Cape Town, South Africa
Posts: 2,031
Thanks: 68
Thanked 253 Times in 203 Posts
Default camcontrol standby turning off HDD immediately

Hi

I use camcontrol(8) to set a standby timeout for my HDD to spindown after a certain time of inactivity. However, when I run the command to set the timeout the hard drive spins down immediately. Based on the source it doesn't look like this should be happening. Does anyone know why it is?

Prior to this I was using ata(4) and atacontrol(8)'s spindown feature which didn't spin the drive down immediately. I've since switched to ahci(4) for the performance gains.
Reply With Quote
  #2  
Old December 30th, 2009, 17:37
crsd crsd is offline
Member
 
Join Date: Nov 2008
Location: Russia, Krasnodar
Posts: 420
Thanks: 8
Thanked 92 Times in 82 Posts
Default

Same here with 9.0-CURRENT r201182 and <WDC WD7501AALS-00J7B0 05.00K05> at scbus2 target 0 lun 0 (pass1,ada0). # camcontrol standby ada0 -t 60 spins down the drive immediately.
Reply With Quote
  #3  
Old December 30th, 2009, 17:46
crsd crsd is offline
Member
 
Join Date: Nov 2008
Location: Russia, Krasnodar
Posts: 420
Thanks: 8
Thanked 92 Times in 82 Posts
Default

Looks like there's black magick involved.
http://lists.freebsd.org/pipermail/f...er/052997.html:
Code:
Denis Shaposhnikov wrote:
> I'm trying to replace sysutils/ataidle which doesn't work with new
> acpi(4). May be somebody could tell me args for
> 
>   camcontrol cmd ada0 -a cmd XX XX XX XX XX XX XX XX
> 
> to disable APM and acoustic management (AAM) for my HDD?

To set APM level:
camcontrol cmd ada0 -a "EF 05 00 00 00 00 00 00 00 00 xx 00"
To disable it:
camcontrol cmd ada0 -a "EF 85 00 00 00 00 00 00 00 00 00 00

To set AAM level:
camcontrol cmd ada0 -a "EF 42 00 00 00 00 00 00 00 00 xx 00"
To disable it:
camcontrol cmd ada0 -a "EF C2 00 00 00 00 00 00 00 00 00 00

You can check result with:
camcontrol identify ada0

-- 
Alexander Motin
Reply With Quote
The Following User Says Thank You to crsd For This Useful Post:
aragon (December 30th, 2009)
  #4  
Old December 30th, 2009, 23:20
aragon aragon is offline
Giant Locked
 
Join Date: Nov 2008
Location: Cape Town, South Africa
Posts: 2,031
Thanks: 68
Thanked 253 Times in 203 Posts
Default

Nice find. I'm not sure what AAM is good for, but with APM it seems as though the drive decides when to spin down. With APM levels below 0x80 on my drive this happens after 30 seconds of inactivity. Levels at or above that disable spin down and don't seem to do much else except increase average current draw by a few milliamps.

I'm guessing with camcontrol's standby command the cam layer decides when to spin the drive down, but still it shouldn't spin down immediately when setting a timeout. Anyhow, I'll use the black magic APM command for now.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[Solved] new hdd hirohitosan System Hardware 1 October 14th, 2009 16:10
[Solved] how to remove second HDD cmc4bsd System Hardware 1 September 29th, 2009 20:49
about my HDD hirohitosan System Hardware 1 March 7th, 2009 00:41
Trying to add a second hdd cipher System Hardware 5 December 27th, 2008 06:54
Geometry of my HDD hirohitosan System Hardware 2 December 23rd, 2008 02:44


All times are GMT +1. The time now is 06:04.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2013, vBulletin Solutions, Inc.
The mark FreeBSD is a registered trademark of The FreeBSD Foundation and is used by The FreeBSD Project with the permission of The FreeBSD Foundation.
Web protection and acceleration provided by CloudFlare
0