# camcontrol: error sending command



## lockdoc (Nov 4, 2012)

I wanted to disable power management and apm on my wd caviar black, but somehow the camcontrol command does not work


```
/sbin/camcontrol cmd ada5 -a "EF C2 00 00 00 00 00 00 00 00 00 00" -v
camcontrol: error sending command
(pass5:ahcich2:0:0:0): SETFEATURES. ACB: ef c2 00 00 00 00 00 00 00 00 00 00
(pass5:ahcich2:0:0:0): CAM status: ATA Status Error
(pass5:ahcich2:0:0:0): ATA status: 51 (DRDY SERV ERR), error: 04 (ABRT )
(pass5:ahcich2:0:0:0): RES: 51 04 00 00 00 00 00 00 00 00 00
```

I have tried this on FreeBSD9 amd64. Afterwards I have upgraded to RC3, but the problem remains the same.

Any suggestions on this one?


----------



## felix (Nov 4, 2012)

To disable APM:

```
camcontrol cmd ada5 -a "EF 85 00 00 00 00 00 00 00 00 00 00"
```


----------



## lockdoc (Nov 4, 2012)

Sorry I forgot to mention, I did try both commands.
This one as well:

```
camcontrol cmd ada4 -a "EF 85 00 00 00 00 00 00 00 00 00 00" -v
camcontrol: error sending command
(pass4:mvsch3:0:0:0): SETFEATURES. ACB: ef 85 00 00 00 00 00 00 00 00 00 00
(pass4:mvsch3:0:0:0): CAM status: ATA Status Error
(pass4:mvsch3:0:0:0): ATA status: 51 (DRDY SERV ERR), error: 04 (ABRT )
(pass4:mvsch3:0:0:0): RES: 51 04 00 00 00 00 00 00 00 00 00
```

I tried both commands with two wd caviar black, each on different controllers.


```
camcontrol identify ada4
pass4: <WDC WD2002FAEX-007BA0 05.01D05> ATA-8 SATA 3.x device
pass4: 300.000MB/s transfers (SATA 2.x, UDMA6, PIO 8192bytes)

protocol              ATA/ATAPI-8 SATA 3.x
device model          WDC WD2002FAEX-007BA0
firmware revision     05.01D05
serial number         WD-WCAY00278223
WWN                   50014ee25c67c6a8
cylinders             16383
heads                 16
sectors/track         63
sector size           logical 512, physical 512, offset 0
LBA supported         268435455 sectors
LBA48 supported       3907029168 sectors
PIO supported         PIO4
DMA supported         WDMA2 UDMA6

Feature                      Support  Enabled   Value           Vendor
read ahead                     yes      yes
write cache                    yes      yes
flush cache                    yes      yes
overlap                        no
Tagged Command Queuing (TCQ)   no       no
Native Command Queuing (NCQ)   yes              32 tags
SMART                          yes      yes
microcode download             yes      yes
security                       yes      no
power management               yes      yes
advanced power management      no       no
automatic acoustic management  no       no
media status notification      no       no
power-up in Standby            yes      no
write-read-verify              no       no
unload                         no       no
free-fall                      no       no
data set management (TRIM)     no
```


```
camcontrol identify ada5
pass5: <WDC WD2002FAEX-007BA0 05.01D05> ATA-8 SATA 3.x device
pass5: 600.000MB/s transfers (SATA 3.x, UDMA6, PIO 8192bytes)

protocol              ATA/ATAPI-8 SATA 3.x
device model          WDC WD2002FAEX-007BA0
firmware revision     05.01D05
serial number         WD-WCAY00215529
WWN                   50014ee25c5d2ed8
cylinders             16383
heads                 16
sectors/track         63
sector size           logical 512, physical 512, offset 0
LBA supported         268435455 sectors
LBA48 supported       3907029168 sectors
PIO supported         PIO4
DMA supported         WDMA2 UDMA6

Feature                      Support  Enabled   Value           Vendor
read ahead                     yes      yes
write cache                    yes      yes
flush cache                    yes      yes
overlap                        no
Tagged Command Queuing (TCQ)   no       no
Native Command Queuing (NCQ)   yes              32 tags
SMART                          yes      yes
microcode download             yes      yes
security                       yes      no
power management               yes      yes
advanced power management      no       no
automatic acoustic management  no       no
media status notification      no       no
power-up in Standby            yes      no
write-read-verify              no       no
unload                         no       no
free-fall                      no       no
data set management (TRIM)     no
```


----------



## mav@ (Nov 5, 2012)

The answer is here:

```
advanced power management      no       no
automatic acoustic management  no       no
```

You can't disable feature that is not supported.


----------



## lockdoc (Nov 5, 2012)

Thanks to clear that out.
So then I got the command wrong as I actually want to turn off

```
power management               yes      yes
```

So where can I find the hexadecimal command to turn this off?


----------



## donduq (Dec 9, 2012)

I'm wondering about the same thing: I'd like to know the commands to enable/disable:
* advanced power management;
* automatic acoustic management.

Much obliged.


----------



## donduq (Dec 9, 2012)

HRM, it's becoming a clichÃ©: I found the answer shortly after asking the question. 



			
				crsd said:
			
		

> > I'm trying to replace sysutils/ataidle which doesn't work with new
> > acpi(4). May be somebody could tell me args for
> >
> >
> ...



So there you have it.

_Aside question for the mods:_ I had to use {code} tags because it seems that {cmd} tags do not work within {quote} tags. Is this correct and ok for me to do?


----------

