# apm kernel module not activated



## borish (Jun 8, 2009)

Hi,

ACPI doesn't work on my Thinkpad, but APM does. Therefore, I want to enable APM on my system.

I have a kernel without APM, but there's an apm kernel module. To make it work, I put

```
acpi_load="NO"
apm_load="YES"
```
in /boot/loader.conf and

```
hint.acpi.0.disabled="1"
hint.apm.0.disabled="0"
hint.apm.0.flags="0x20"
```
in /boot/device.hints and

```
apm_enable="YES"
```
in /etc/rc.conf.

After booting however, apm doesn't show up in kldstat -v and /dev/apm doesn't exist. Hence, invoking apm fails. kldload apm gives an error "file exists".

What is wrong here?

-Boris


----------



## graudeejs (Jun 8, 2009)

comment out your hints (are you sure they are right)


----------



## SirDice (Jun 8, 2009)

borish said:
			
		

> apm doesn't show up in kldstat -v
> {snip}
> kldload apm gives an error "file exists".


This usually means it's in the kernel config. Did you compile a custom kernel?


----------



## tangram (Jun 8, 2009)

SirDice is right. APM needs to be enabled in the kernel config, the kernel compiled and finally installed.


----------



## borish (Jun 8, 2009)

Strange... today it works. Maybe I made a typo somewhere. Sorry for bothering you!

Anyway, this shows that apm doesn't have to be compiled in the kernel. It can be loaded as a module.

I don't know it the hints are necessary. It seems redundant to me as I have that info in loader.conf alredy.


----------



## tangram (Jun 9, 2009)

Weird because in my system:


```
% cd /usr/src/sys/i386/conf ; grep -i apm GENERIC                         
#device         apm
```

And the Handbook on http://www.freebsd.org/doc/en/books/handbook/book.html#KERNELCONFIG-CONFIG states _"Advanced Power Management support. Useful for laptops, although this is disabled in GENERIC by default"_.

Are you using a custom kernel conf?


----------



## borish (Jun 9, 2009)

Yes, I have a custom kernel but without apm. As in the GENERIC kernel, device apm is commented out. This doesn't matter because there's apm.ko:

```
~% kldstat
Id Refs Address    Size     Name
 1   11 0xc0400000 445fec   kernel
 2    1 0xc0846000 6da4     apm.ko
```


----------

