# no ACPI with gentoo-sources on amd64

## subterraneus

I have installed Gentoo on my Compaq Presario v560US laptop many times, as well as other distros (kubuntu, sabayon fedora) and Windows XP (dual booting currently) and have never gotten acpi working. That is, it is not even an option with genkernel. I run a genkernel --menuconfig all and:

```

Power management options  ---> 

    --- Power Management support

    ACPI (Advanced Configuration and Power Interface) Support  --->

        --- ACPI Support 

```

it's not even an option to select acpi in any way when I try to compile my kernel. Any ideas?

(also, APM has the same problem)

----------

## swimmer

Hmm - not really an idea ... I just can tell you that it works for me on *any* gentoo-sources kernel since at least 2.6.13 on multiple machines with 'cd /usr/src/linux && make menuconfig' ...

I hope this is some valuable information anyway.

Greetz

swimmer

----------

## subterraneus

No help, thanks anyways. It seems to work for everyone else...but never me in Gentoo.

Kernel is 2.6.19-gentoo-r5 by the way.

----------

## swimmer

And you tried that with 'make menuconfig' as well?

----------

## subterraneus

Yes.

----------

## mudrii

Could you post the output of the 

cat /usr/src/linux/.config | grep ACPI

----------

## JeliJami

what CPU type did you choose?

----------

## subterraneus

what CPU type did I choose where? *(it should be x86_64 everywhere unless I made a mistake..)

cat /usr/src/linux/.config | grep ACPI:

```

CONFIG_X86_64_ACPI_NUMA=y

# ACPI (Advanced Configuration and Power Interface) Support

CONFIG_ACPI=y

CONFIG_ACPI_AC=m

CONFIG_ACPI_BATTERY=m

CONFIG_ACPI_BUTTON=m

CONFIG_ACPI_VIDEO=m

CONFIG_ACPI_HOTKEY=m

CONFIG_ACPI_FAN=m

# CONFIG_ACPI_DOCK is not set

CONFIG_ACPI_PROCESSOR=m

CONFIG_ACPI_THERMAL=m

CONFIG_ACPI_NUMA=y

CONFIG_ACPI_ASUS=m

CONFIG_ACPI_IBM=m

# CONFIG_ACPI_IBM_DOCK is not set

CONFIG_ACPI_TOSHIBA=m

CONFIG_ACPI_BLACKLIST_YEAR=0

# CONFIG_ACPI_DEBUG is not set

CONFIG_ACPI_EC=y

CONFIG_ACPI_POWER=y

CONFIG_ACPI_SYSTEM=y

CONFIG_ACPI_CONTAINER=m

# CONFIG_ACPI_SBS is not set

CONFIG_X86_POWERNOW_K8_ACPI=y

CONFIG_X86_SPEEDSTEP_CENTRINO_ACPI=y

CONFIG_X86_ACPI_CPUFREQ=m

# CONFIG_X86_ACPI_CPUFREQ_PROC_INTF is not set

CONFIG_PNPACPI=y

```

I'd guess some of that stuff is commented out for a reason, so I'll wait for a response from someone knowledgeable as to what to do now.

----------

## twb1270

According to the config file you posted, ACPI is already enabled. It is selected (and cann't be changed) because you've activated X86_64_ACPI_NUMA:

Look at the menuconfig help:

Symbol: X86_64_ACPI_NUMA [=n] 

Prompt: ACPI NUMA detection

Defined at arch/x86_64/Kconfig:253

Depends on: NUMA

Location:

    -> Processor type and features

         -> Non Uniform Memory Access (NUMA) Support (NUMA [=n])

Selects: ACPI && ACPI_NUMA

----------

## subterraneus

Really? well

```

Compy runlevels # /etc/init.d/acpid start

 * Starting acpid ...                                                     [ ok ]

Compy runlevels # on_ac_power && echo AC available || echo Running on batteries            # plugged in

Running on batteries

Compy runlevels # on_ac_power && echo AC available || echo Running on batteries              #unplugged

Running on batteries

Compy runlevels # 

```

seems to say otherwise....

----------

## twb1270

I think that's a different issue...

I encountered the same thing with my Compaq nx6125 AMD Turion64 machine. 

As I understand it, there's something about the ACPI implementation  on my machine that causes ACPI events to get stuck and not processed correctly. It has something do with the handling of multitheading in the DSDT (http://lwn.net/Articles/182400/).

I haven't been following the status of the patch recently, but I believe it was included in the vanilla kernel at one point and then removed later.

In any event, I'm able to unblock the event queue by reading from it with acpitool. When I do my battery icon switches state properly.

----------

## subterraneus

Thank you very much for the response, but I have no idea how to implement your help, mind giving me some pointers? or a straight up guide?

----------

## twb1270

Your case might be different than mine, but all I had to do was make sure acpitool was installed (emerge acpitool). Then, each time I boot I need to run the acpitool command-line program (with no parameters). You can automate this by adding the command to your /etc/conf.d/local.start file. After doing this, things seem to run ok for me: fan powers on and off as necessary and the ac/battery indicator works as expected. 

If you want to explore more about the kernel bug and status see: http://bugzilla.kernel.org/show_bug.cgi?id=5534

Good luck.

----------

## subterraneus

sadly, acpitool just yields

```

Compy ~ # acpitool 

  Battery status : <not available>

  AC adapter     : <not available>

  Thermal info   : <not available>

Compy ~ # 

```

----------

## twb1270

Do you have the modules loaded? When I remove the battery module and run acpitool I get the same output as you. When I reinsert it, I it works as expected:

```
laptop ~ # rmmod battery

laptop ~ # acpitool

  Battery status : <not available>

  AC adapter     : on-line

  Thermal zone 1 : activ, 37 C

  Thermal zone 2 : ok, 40 C

  Thermal zone 3 : ok, 25 C

laptop ~ # modprobe battery

laptop ~ # acpitool

  Battery #2     : charged, 99.10%

  AC adapter     : on-line

  Thermal zone 1 : activ, 37 C

  Thermal zone 2 : ok, 40 C

  Thermal zone 3 : ok, 25 C

laptop ~ #
```

I load the following modules:

```

ac

battery

button

fan

processor

thermal

video

[/cod
```

e]

----------

## subterraneus

```

Compy ~ # modprobe ac                       

Compy ~ # modprobe battery

Compy ~ # modprobe button

Compy ~ # modprobe fan

Compy ~ # modprobe processor

Compy ~ # modprobe thermal

Compy ~ # modprobe video

Compy ~ # acpitool 

  Battery #1     : charged, 100.0%

  AC adapter     : on-line

  Thermal zone 1 : ok, 0 C

Compy ~ # 

```

Holy shit, thank you, I've been trying to get this to work for ages, I can't believe I didn't think to do that. Great help  :Smile: 

----------

