# APM dangerous for Hard Drives?



## donald1000 (Apr 15, 2009)

Hi everybody,

i have two western digital 250GB Hard Drives and activated the "device apm" option in the kernel config. (7.2-PRERELEASE)

After a shutdown the disk make a very loud "klack" sound before power off the system. When i make a power off shutdown from a WinXP OS the sound does not appear that loud. 

Is it possible that the APM Feature damage the hardware? Why is it not activated in the kernel by default? (i do also not have a /usr/sbin/apm binary in the 7.1 Distibution)

Thanks.


----------



## nikobordx (Apr 15, 2009)

Hi donald1000,

My hardrive make this noise too, i don't use apm.

I asked an engineer if it was serious, he replied me that not a real problem when nothing writes to the disk.

I think freebsd should first turn off hard drive before shutting down the computer.

Nicolas.


----------



## donald1000 (Apr 15, 2009)

Hi nikobordx,

thank you very much for your answer. Good to know that my drive is not the only one which sounds like that  

I don't know anything about programming of the APM system, but Windows first shutdown the hard drive, and 1-2 seconds later it powers off the whole system. Linux and BSD does it not that way. (at least in my case) They turn of the whole system immediately. But when i think about it, this should not be dangerous for the hardware, because when you use a system that does not have APM support (as you said), you switch off the system exactly like that, isn't it?


----------



## nikobordx (Apr 16, 2009)

Hi Donald1000,

Yes this is the same for apm and acpi.
But if you use apm than acpi, your computer seem to be old 

I tried NetBSD, and when i shutdown the computer, it off hard drive, then the computer.

I'm not sure, but i think we need to implement a new fonction called before "acpi_wake_prep_walk(ACPI_STATE_S5)" in acpi.c to switch off hard drive, then entering state 5.

But i'm not a developper ! 

Nicolas.


----------



## User23 (Apr 21, 2009)

nikobordx said:
			
		

> Hi Donald1000,
> 
> Yes this is the same for apm and acpi.
> But if you use apm than acpi, your computer seem to be old
> ...



I think so too.
I would never use the "old" APM if ACPI is working.

APM:
http://en.wikipedia.org/wiki/Advanced_Power_Management

ACPI:
http://en.wikipedia.org/wiki/Advanced_Configuration_and_Power_Interface

And btw. spinning the harddisk unnessecary up and down may result in a shorter lifetime.


----------



## donald1000 (Apr 21, 2009)

Hi !
Hmmm, ok, i have a current AMD64 system. So ACPI should exist. But without "device apm" in the Kernel config i have no power off after shutdown. With the APM option it works with an "init 0" or "halt -p"

So how can i make a power off (halt) with ACPI and without APM? Or do i misunderstand somthing now?


----------



## nikobordx (Apr 22, 2009)

Hi Donald1000,

I had this problem with my old computer (February 2007), when hardware are connected, it does not halt computer, when all devices are disconnected, it works !

Can you try (without apm) to halt computer with all devices disconnected (mouse, printer, etc...) ?

What say "acpiconf -s 5" ?

Nicolas.


----------



## donald1000 (Apr 25, 2009)

hmmmm, with acpiconf -s 5 i get:

acpiconf: invalid sleep type (5)


----------



## nikobordx (Apr 25, 2009)

What say:


```
sysctl -a | grep hw.acpi.supported_sleep_state
```


----------



## nikobordx (Apr 25, 2009)

You're obviously not alone in this case, look at this:

http://www.freebsd.org/cgi/query-pr.cgi?pr=129563

You can download some patches here:

http://people.freebsd.org/~jkim/

Nicolas.


----------



## richardpl (Apr 25, 2009)

nikobordx said:
			
		

> You're obviously not alone in this case, look at this:
> 
> http://www.freebsd.org/cgi/query-pr.cgi?pr=129563
> 
> ...



amd64 on CURRENT have working suspend/resume,
i386 only works with UP on most systems.


----------



## donald1000 (Apr 26, 2009)

```
sysctl -a | grep hw.acpi.supported_sleep_state
```
says:

```
hw.acpi.supported_sleep_state: S1 S3 S4 S5
```

I am on prerelease:
FreeBSD 7.2-PRERELEASE 

Thanks for the links. I will give it a try with the patch.


----------



## nikobordx (Apr 27, 2009)

You can try a livefs of FreeBSD 8-Current.

Download here:

```
http://pub.allbsd.org/FreeBSD-snapshots/i386/8.0-HEAD-20090427-JPSNAP/cdrom/8.0-HEAD-20090427-JPSNAP-i386-livefs.iso
```

Nicolas.


----------



## nikobordx (Apr 28, 2009)

Sorry, for your architecture you need this version:

```
http://pub.allbsd.org/FreeBSD-snapshots/amd64/8.0-HEAD-20090428-JPSNAP/cdrom/8.0-HEAD-20090428-JPSNAP-amd64-livefs.iso
```

Nicolas.


----------

