# ACPI works in Knoppix but not in Gentoo [SOLVED]

## hgerstung

Hi!

Argh! I hate ACPI! I booted my Acer C100 Tablet with Knoppix 3.8 (2.6.11 kernel) and ACPI worked just fine.

I installed Gentoo on it and all I see is "ACPI: interpreter disabled" when I boot a 2.6.11 or 2.6.12-rc3 kernel. 

I enabled ACPI in the kernel config, used the kernel commandline parameters "acpi=on" and "acpi=force", but nothing helped. 

Is there someone with this Laptop/Tablet and a running ACPI-enabled kernel? Please speak up...

Thank you in advance,

kind regards,

HeikoLast edited by hgerstung on Thu Jun 02, 2005 7:56 pm; edited 1 time in total

----------

## frenkel

Does emerging acpid help?

----------

## hgerstung

 *Frenkel wrote:*   

> Does emerging acpid help?

 

No, when I try to start it, it says "ACPI support has not been compiled into the kernel", but I configured it:

```

#

# Power management options (ACPI, APM)

#

CONFIG_PM=y

CONFIG_PM_DEBUG=y

CONFIG_SOFTWARE_SUSPEND=y

CONFIG_PM_STD_PARTITION=""

#

# ACPI (Advanced Configuration and Power Interface) Support

#

CONFIG_ACPI=y

CONFIG_ACPI_BOOT=y

CONFIG_ACPI_INTERPRETER=y

CONFIG_ACPI_SLEEP=y

CONFIG_ACPI_SLEEP_PROC_FS=y

CONFIG_ACPI_AC=y

CONFIG_ACPI_BATTERY=y

CONFIG_ACPI_BUTTON=y

CONFIG_ACPI_VIDEO=m

CONFIG_ACPI_FAN=y

CONFIG_ACPI_PROCESSOR=y

CONFIG_ACPI_THERMAL=y

CONFIG_ACPI_ASUS=y

CONFIG_ACPI_IBM=y

CONFIG_ACPI_TOSHIBA=y

CONFIG_ACPI_BLACKLIST_YEAR=0

CONFIG_ACPI_DEBUG=y

CONFIG_ACPI_BUS=y

CONFIG_ACPI_EC=y

CONFIG_ACPI_POWER=y

CONFIG_ACPI_PCI=y

CONFIG_ACPI_SYSTEM=y

CONFIG_X86_PM_TIMER=y

CONFIG_ACPI_CONTAINER=y

```

Is there something else I have to turn on?

Regards,

Heiko

----------

## hgerstung

Here's the dmesg output with Knoppix:

```

Linux version 2.6.11 (root@Knoppix) (gcc-Version 3.3.5 (Debian 1:3.3.5-8)) #6 SMP Wed Feb 23 09:15:46 CET 2005

BIOS-provided physical RAM map:

 BIOS-e820: 0000000000000000 - 000000000009fc00 (usable)

 BIOS-e820: 000000000009fc00 - 00000000000a0000 (reserved)

 BIOS-e820: 00000000000f0000 - 0000000000100000 (reserved)

 BIOS-e820: 0000000000100000 - 000000000ffc0000 (usable)

 BIOS-e820: 000000000ffc0000 - 000000000ffe0000 (reserved)

 BIOS-e820: 000000000ffe0000 - 000000000ffe8000 (ACPI data)

 BIOS-e820: 000000000ffe8000 - 0000000010000000 (ACPI NVS)

 BIOS-e820: 00000000ffff0000 - 0000000100000000 (reserved)

0MB HIGHMEM available.

255MB LOWMEM available.

On node 0 totalpages: 65472

  DMA zone: 4096 pages, LIFO batch:1

  Normal zone: 61376 pages, LIFO batch:14

  HighMem zone: 0 pages, LIFO batch:1

DMI 2.3 present.

ACPI: RSDP (v000 Acer                                  ) @ 0x000ec2d0

ACPI: RSDT (v001 Acer   TM100    0x00000001 MSFT 0x00000001) @ 0x0ffe0000

ACPI: FADT (v001 Acer   TM100    0x00000001 MSFT 0x00000001) @ 0x0ffe0054

ACPI: BOOT (v001 Acer   TM100    0x00000001 MSFT 0x00000001) @ 0x0ffe002c

ACPI: DSDT (v001   Acer   AN100  0x00001000 MSFT 0x0100000e) @ 0x00000000

ACPI: PM-Timer IO Port: 0xf008

Built 1 zonelists

Kernel command line: ramdisk_size=100000 init=/etc/init lang=de apm=power-off vga=791 initrd=minirt.gz nomce quiet BOOT_IMAGE=knoppix BOOT_IMAGE=linux 

__iounmap: bad address c00fffd9

Local APIC disabled by BIOS -- you can enable it with "lapic"

...

```

And here with Gentoo:

```

Linux version 2.6.12-rc3 (root@acer-hg) (gcc version 3.3.5 (Gentoo Linux 3.3.5-r1, ssp-3.3.2-3, pie-8.7.7.1)) #3 SMP Sat Apr 30 15:15:53 CEST 2005

BIOS-provided physical RAM map:

 BIOS-e820: 0000000000000000 - 000000000009fc00 (usable)

 BIOS-e820: 000000000009fc00 - 00000000000a0000 (reserved)

 BIOS-e820: 00000000000f0000 - 0000000000100000 (reserved)

 BIOS-e820: 0000000000100000 - 000000000ffc0000 (usable)

 BIOS-e820: 000000000ffc0000 - 000000000ffe0000 (reserved)

 BIOS-e820: 000000000ffe0000 - 000000000ffe8000 (ACPI data)

 BIOS-e820: 000000000ffe8000 - 0000000010000000 (ACPI NVS)

 BIOS-e820: 00000000ffff0000 - 0000000100000000 (reserved)

255MB LOWMEM available.

On node 0 totalpages: 65472

  DMA zone: 4096 pages, LIFO batch:1

  Normal zone: 61376 pages, LIFO batch:14

  HighMem zone: 0 pages, LIFO batch:1

DMI 2.3 present.

ACPI: RSDP (v000 Acer                                  ) @ 0x000ec2d0

  >>> ERROR: Invalid checksum

Allocating PCI resources starting at 10000000 (gap: 10000000:efff0000)

Built 1 zonelists

Kernel command line: BOOT_IMAGE=Gentoo ro root=306 acpi=on apm=off

Local APIC disabled by BIOS -- you can enable it with "lapic"

mapped APIC to ffffd000 (01241000)

Initializing CPU#0

...

```

I'd be happy if I could find out how the Knoppix Kernel is configured, but I did not find a config.gz in /proc ...

I'd appreciate any help, 

regards,

Heiko

----------

## frenkel

You should probably look in this thread https://forums.gentoo.org/viewtopic-t-122145.html, as the output of the knoppix dmesg looks _a lot_ like the one in the thread.

Sorry I can't help you further,

Frank

----------

## hgerstung

 *Frenkel wrote:*   

> You should probably look in this thread https://forums.gentoo.org/viewtopic-t-122145.html, as the output of the knoppix dmesg looks _a lot_ like the one in the thread.
> 
> Sorry I can't help you further,
> 
> Frank

 

Thank you, I already found that thread. What stopped me from trying is the fact that they want me to use /proc/acpi to read out my acpi tables somehow and my problem is that I do not have this (/proc/acpi),... 

Anyway, thanks for your time.

Any further suggestions anyone?

Kind regards,

Heiko

----------

## Raistlin

Hi!

maybe the latest acpi patch helps?

acpi

cheers, r.

----------

## omnicloud

You sure you compiled your kernel correctly?

----------

## hgerstung

Hi!

Sorry for the delay, but I checked out the ACPI patches with a 2.6.11 kernel without success. 

I am not quite sure if I compiled my kernel correctly, but I do not see what I may have missed in the kernel configuration. As you can see in one of my previous posts, I already chose ACPI=y and enabled everything else I found regarding ACPI, but it seems not to work.

Any more hints?

Kind regards,

Heiko

----------

## Cintra

I wonder if you may need this too

```
#

# Protocols

#

CONFIG_ISAPNP=y

CONFIG_PNPBIOS=y

CONFIG_PNPBIOS_PROC_FS=y

CONFIG_PNPACPI=y <<<<<< 
```

mvh

----------

## hgerstung

 *Cintra wrote:*   

> I wonder if you may need this too
> 
> ```
> #
> 
> ...

 

Thanks, I already had PNPACPI enabled. I tried to add ISAPNP just out of desperation, but it did not help either. 

I want Gentoo, I feel this is my distro and I have it on my server, my desktop and now I'd like to use it with my Laptop, too. But I need to now the battery state, that's all. Even enabling APM did not work, I get /proc/apm but it always says  "-1%"  and other generic data. 

Maybe anyone with any laptop (maybe another Acer) and a working (=ACPI ok) kernel config for 2.6.12-rc3 can send me her/his .config file?

I would like to give it a try, I guess I have enabled/disabled something that is related to Power Management, but without being obvious enough  (read: not obvious enough for me).

C'mon guys, you do not really want me to throw Knoppix (=Debian) on this gadget, do you?  :Smile: 

Regards,

Heiko

----------

## Raistlin

 *hgerstung wrote:*   

> 
> 
> ...
> 
> C'mon guys, you do not really want me to throw Knoppix (=Debian) on this gadget, do you? 
> ...

 

 :Twisted Evil:  NEVER!

Ok - could you please post a link (rather than pasting it in here) to the two (complete) dmesgs: knoppix and gentoo

under knoppix: you're sure, that ACPI is enabled (sorry for the question, but the parameter apm=power-off somehow makes me curious)

afaik knoppix has the kernel config made available under 

```
/proc/config.gz
```

 --> save it and compile a new kernel in gentoo

cheers, R.

----------

## hgerstung

Here are the links to the two complete dmesg outputs:

http://www.heiko-gerstung.de/download/dmesg_knoppix.txt

http://www.heiko-gerstung.de/download/dmesg_gentoo.txt

I'll try to use the Knoppix config and come back with the results. In a few hours, I hope..

Kind regards,

Heiko

----------

## Earthwings

 *hgerstung wrote:*   

> 
> 
> #
> 
> # ACPI (Advanced Configuration and Power Interface) Support
> ...

 

Enabling *everything* ACPI related in the kernel can be contraproductive. I think the ones marked red above are not needed on your system.

Which kernel sources are you using on Gentoo? I think you should be able to fix your problem by comparing the Knoppix kernel configuration with the one used in Gentoo as both kernel version are the same. If everything else fails, you can also use the Knoppix kernel in Gentoo.

----------

## Raistlin

 *Earthwings wrote:*   

>  *hgerstung wrote:*   
> 
> #
> 
> # ACPI (Advanced Configuration and Power Interface) Support
> ...

 

1) why should ASUS not be a good idea? Anyways: this only provides some additional features such as FN-keys etc. It therefore should ( :Rolling Eyes:  ) not be harmful IMO. The other features (i.e. IBM and Toshiba) are not necessary, indeed.

2) the kernel versions ar not the same:

```

knoppix:

=======

Linux version 2.6.11 (root@Knoppix) (gcc-Version 3.3.5 (Debian 1:3.3.5-8)) #6 SMP Wed Feb 23 09:15:46 CET 2005

gentoo:

=======

Linux version 2.6.12-rc3 (root@acer-hg) (gcc version 3.3.5 (Gentoo Linux 3.3.5-r1, ssp-3.3.2-3, pie-8.7.7.1)) #3 SMP Sat Apr 30 15:15:53 CEST 2005

```

3) I don't think that using the knoppix kernel in gentoo would be a good idea, because knoppix strongly relies on modules. simply starting the knoppix-kernel may even not boot correctly - and there would be many "module-not-found-errors"

cheers, R.

----------

## Earthwings

 *Raistlin wrote:*   

>  *Earthwings wrote:*   
> 
> Enabling *everything* ACPI related in the kernel can be contraproductive. I think the ones marked red above are not needed on your system.
> 
> Which kernel sources are you using on Gentoo? I think you should be able to fix your problem by comparing the Knoppix kernel configuration with the one used in Gentoo as both kernel version are the same. If everything else fails, you can also use the Knoppix kernel in Gentoo. 
> ...

 

Why should it be a good idea on an acer tablet pc?

 *Quote:*   

> Anyways: this only provides some additional features such as FN-keys etc. It therefore should ( ) not be harmful IMO. 

 

Obviously something does cause harm.

 *Quote:*   

> 2) the kernel versions ar not the same:

 

The OP said he tested on a 2.6.11-gentoo as well.

 *Quote:*   

> 3) I don't think that using the knoppix kernel in gentoo would be a good idea, because knoppix strongly relies on modules. simply starting the knoppix-kernel may even not boot correctly - and there would be many "module-not-found-errors"

 

I didn't say simply copying the kernel bzImage would be the way to go.

----------

## hgerstung

Hi!

Thank you all that you are still with me. I used the Knoppix kernel config with a 2.6.11.7 vanilla kernel (emerge =vanilla-sources-2.6.11.7) and only added built-in support for my NIC (rtl8139) and root file system type (ReiserFS). 

No ACPI, still. So it seems this is not related to the kernel configuration, but could rather be something in the initrd or in the sources of the Knoppix kernel... 

I'll contact Klaus Knopper, but maybe you have a new idea?

Thanks a lot so far,

kind regards,

Heiko

----------

## Raistlin

 *Earthwings wrote:*   

>  *Raistlin wrote:*    *Earthwings wrote:*   
> 
> Enabling *everything* ACPI related in the kernel can be contraproductive. I think the ones marked red above are not needed on your system.
> 
> Which kernel sources are you using on Gentoo? I think you should be able to fix your problem by comparing the Knoppix kernel configuration with the one used in Gentoo as both kernel version are the same. If everything else fails, you can also use the Knoppix kernel in Gentoo. 
> ...

  :Rolling Eyes:  sorry, it's been quite a long day, yesterday  :Wink:  (both name begin with A, though  :Cool:  )

 *Earthwings wrote:*   

> 
> 
>  *Quote:*   2) the kernel versions ar not the same: 
> 
> The OP said he tested on a 2.6.11-gentoo as well.
> ...

  Then I misunderstood you, sorry.

cheers, R.

----------

## Mooses

Well maybe it helps if you at first compile your acpi stuff as a module. Then you load them, one after the other and check dmesg output. 

Thats the way I allways go if some hardware doesn't work.

Have Fun

Mooses

----------

## hgerstung

Hi Mooses,

thanks for your reply. 

 *Mooses wrote:*   

> Well maybe it helps if you at first compile your acpi stuff as a module. Then you load them, one after the other and check dmesg output. 
> 
> Thats the way I allways go if some hardware doesn't work.
> 
> Have Fun
> ...

 

AFAIK I cannot choose to select ACPI support itself as a module, it only can be enabled and/or disabled. The various acpi modules like battery, processor and so on can be used as modules and I tried that, but they just say "FATAL: Error inserting battery (/lib/modules/2.6.12-rc3/kernel/drivers/acpi/battery.ko): No such device"

I think the problem lies in the ACPI tables of my Acer, as dmesg writes:

```

ACPI: RSDP (v000 Acer                                  ) @ 0x000ec2d0

  >>> ERROR: Invalid checksum

...

...

ACPI: Subsystem revision 20050309

ACPI: Interpreter disabled.

...

pnp: PnP ACPI: disabled

```

A Knoppix dmesg output reads like this:

```

ACPI: RSDP (v000 Acer                                  ) @ 0x000ec2d0

ACPI: RSDT (v001 Acer   TM100    0x00000001 MSFT 0x00000001) @ 0x0ffe0000

ACPI: FADT (v001 Acer   TM100    0x00000001 MSFT 0x00000001) @ 0x0ffe0054

ACPI: BOOT (v001 Acer   TM100    0x00000001 MSFT 0x00000001) @ 0x0ffe002c

ACPI: DSDT (v001   Acer   AN100  0x00001000 MSFT 0x0100000e) @ 0x00000000

ACPI: PM-Timer IO Port: 0xf008

...

...

ACPI: setting ELCR to 0200 (from 0c00)

...

ACPI: Subsystem revision 20050211

ACPI: Interpreter enabled

ACPI: Using PIC for interrupt routing

ACPI: PCI Interrupt Link [PILA] (IRQs *10 15)

ACPI: PCI Interrupt Link [PILB] (IRQs *11 15)

ACPI: PCI Interrupt Link [PILD] (IRQs *10 15)

ACPI: PCI Root Bridge [PCI0] (00:00)

PCI: Probing PCI hardware (bus 00)

ACPI: PCI Interrupt Routing Table [\_SB_.PCI0._PRT]

ACPI: Embedded Controller [EC0] (gpe 24)

...

pnp: PnP ACPI init

pnp: PnP ACPI: found 9 devices

PnPBIOS: Disabled by ACPI PNP

...

PCI: Using ACPI for IRQ routing

```

Klaus Knopper (the creator of Knoppix, for all who did not know) told me that he is using a vanilla kernel without any patches or modifications. Interestingly I compiled my vanilla kernel using his settings (only adding ReiserFS support and my NIC driver) with the same kernel configuration settings he uses with Knoppix and even this Kernel did not provide ACPI support.

I'm really puzzled. I will go on and try to download exactly the same kernel version from kernel.org that was used with Knoppix and try it again. 

Any ideas what on earth can alter the way the kernel is dealing with the ACPI data? I heard about including something in the initrd (Knoppix is using one), but I could not find out which file I would have to look at..

Kind regards,

Heiko

----------

## Mooses

Well maybe it helps if you at first compile your acpi stuff as a module. Then you load them, one after the other and check dmesg output. 

Thats the way I allways go if some hardware doesn't work.

Have Fun

Mooses

----------

## frenkel

Are you sure you're copying the kernel to your boot partition/directory? It's very strange that the same kernel config and sources don't work with gentoo and do with knoppix. The only possible explanation for this is not copying the kernel, or forgetting to mount your boot partition. What are the commands you type when you recompile a kernel?

Frank

----------

## hgerstung

 *Frenkel wrote:*   

> Are you sure you're copying the kernel to your boot partition/directory? It's very strange that the same kernel config and sources don't work with gentoo and do with knoppix. The only possible explanation for this is not copying the kernel, or forgetting to mount your boot partition. What are the commands you type when you recompile a kernel?
> 
> Frank

 

Yes, I'm sure... And I agree that this really is something strange ...

We need to find out what is the difference between Knoppix and Gentoo and at the moment I have no idea, because the ACPI messages start to differ at a very early point in kernel initialization, which leaves me clueless right now .. But I'll keep on trying...

Kind regards,

Heiko

----------

## Mooses

Why don't you try to boot knoppix's kernel in gentoo as a first step?

----------

## frenkel

 *hgerstung wrote:*   

>  *Frenkel wrote:*   Are you sure you're copying the kernel to your boot partition/directory? It's very strange that the same kernel config and sources don't work with gentoo and do with knoppix. The only possible explanation for this is not copying the kernel, or forgetting to mount your boot partition. What are the commands you type when you recompile a kernel?
> 
> Frank 
> 
> Yes, I'm sure... And I agree that this really is something strange ...
> ...

 

What are the commands you type when you recompile a kernel?

----------

## hgerstung

 *Frenkel wrote:*   

> 
> 
> What are the commands you type when you recompile a kernel?

 

```

# make menuconfig

(applying all sorts of changes I think could help)

# make && make modules && make modules_install

# cp arch/i386/boot/bzImage /boot/bzImage_test

# lilo

Added Gentoo *

Added GentooTest

Added Windows

# reboot

```

(then choose GentooTest in my lilo boot menu, which uses the /boot/bzImage_test kernel image)

Anything wrong with that? After rebooting I check if something happened with dmesg and check that the first line (showing date and time of compilation) is correctly stating my last compile.

Thanks for all your help,

kind regards,

Heiko

----------

## frenkel

Seems good to me... Very weird this  :Confused: 

----------

## ScoTch

 *Quote:*   

> 
> 
> ACPI: RSDP (v000 Acer                                  ) @ 0x000ec2d0 
> 
>    >>> ERROR: Invalid checksum 
> ...

 

This error says it all : The RSDP(Root System Description Pointer) contains a pointer to the

RSDT(Root System Description Table) which contains pointers to all other  needed ACPI resources.

So if this fails, your system will never no anything about it's ACPI-resources. If you want to know more

search the acpi-spec-3.0 for RSDP (www.acpi.info). 

Regarding to this error, there are 2 ways to fix it: BIOS update or Kernel fix / hack

If you can't do it with an BIOS update, turn on ACPI debug messages :

You do this by adding these kernel parameters (for example, you can play arround with the values to get a 

more / less detailed bunch of messages)

 acpi_dbg_level=0x0020001F acpi_dbg_layer=0xFFFF0000

For a simple fix, just try to disable the checksumchek in the kernel (for this you need a little C knowledge)

By the way either your or the knopix sources are patched

Have fun

    ScoTch

----------

## hgerstung

Hi Guys,

I tried to fix my ACPI data tables (DSDT) by following this howto : http://gentoo-wiki.com/HOWTO_Fix_Common_ACPI_Problems

When I tried to compile the Acer DSDT with iasl, it showed 47 errors, but fortunately I only needed to fix a handful problems and managed to get a 0 errors/0 warnings version of the file, which I then compiled into the kernel. 

Unfortunately that did not improve anything, the kernel still complaints about an Invalid Checksum. 

I then hacked the kernel a little bit (drivers/acpi/tables.c) and commented out the Checksum check. This does not abort the routine responsible for reading in the ACPI tables. Now it fails in the next step, which is trying to find the System Description Table (RSDT). The error now showing up reads

"ACPI: No System Description Table (RSDT/XSDT) specified in RSDP"

Bad luck so far. I am trying to get an exact copy of the source tree Knoppix is using and I hope to be able to find out what's different. There must be something wrong with the routines reading in the ACPI data, as the same data can be read without problems by the Knoppix kernel and I am sure that there is no special DSDT compiled in that kernel for exactly this Laptop model. So, the ACER ACPI tables can be read by the kernel, but not with the routines in the standard kernels.

More to come, stay tuned  :Wink: 

Kind regards,

Heiko

----------

## hgerstung

BANZAI!

Thanks to Dean Townsley from the ACPI-Devel mailing list I finally got ACPI to work on my Acer C100 tablet. He provided a nice small patch which simply prevents the kernel from disabling ACPI due to the RSDP checksum error my Acer seems to come with. This is done in arch/i386/kernel/boot.c, just search for the line disable_acpi() and comment it out. 

Here is the patch, for a 2.6.11 kernel. It also works like a charm with my 2.6.12-rc3 ... 

```

diff -ur linux-2.6.11-orig/arch/i386/kernel/acpi/boot.c linux-2.6.11/arch/i386/kernel/acpi/boot.c

--- linux-2.6.11-orig/arch/i386/kernel/acpi/boot.c   Wed Mar  2 01:38:25 2005

+++ linux-2.6.11/arch/i386/kernel/acpi/boot.c   Sun May  8 17:01:44 2005

@@ -849,7 +849,7 @@

     */

    error = acpi_table_init();

    if (error) {

-      disable_acpi();

+      /* disable_acpi(); */ 

       return error;

    }

 

diff -ur linux-2.6.11-orig/arch/i386/kernel/setup.c linux-2.6.11/arch/i386/kernel/setup.c

--- linux-2.6.11-orig/arch/i386/kernel/setup.c   Wed Mar  2 01:38:08 2005

+++ linux-2.6.11/arch/i386/kernel/setup.c   Sun May  8 17:04:32 2005

@@ -1461,8 +1461,8 @@

    /*

     * Parse the ACPI tables for possible boot-time SMP configuration.

     */

-   acpi_boot_table_init();

-   acpi_boot_init();

+   if (acpi_boot_table_init()==0)

+      acpi_boot_init();

 

 #ifdef CONFIG_X86_LOCAL_APIC

    if (smp_found_config)

```

Thanks to all who joined me in this thread. I stay here to answer any further questions, of course. 

Kind regards,

Heiko

----------

## frenkel

Glad you finally fixed this, hope you enjoy your stay with gentoo  :Smile: 

Frank

----------

