# ACPI disabled every other reboot? Windows fixes it; I cry.

## aysther

I have a rather odd and perplexing problem.

Recently, I purchased an HP nc6400 laptop.

Intel Core Duo 1.83Ghz

2 GB Ram

I have a dual boot set up with windows.

The following scenarios can be repeated in any order. (I know they overlap  :Smile: )

Scenario 1:

1. Boot/Reboot/Power(off-on) computer into windows.

2. Reboot/Power(off-on) computer into gentoo.

-ACPI works fine, and I can push F10 at boot to enter the BIOS setup menu.

3. Reboot/Power(off-on) computer into gentoo.

-Now in this last step, a few things happen (or don't happen)

-a. Nothing happens when I push F10 at boot to try to get into the setup screen.

-b. The ACPI state is read once on bootup, then no more updates occur. The battery stays the way it was when it first booted and doesn't change, for example.

ACPI will not work until I boot into windows again.

Scenario 2: (Takes place after scenario 1)

1. Boot/Reboot/Power(off-on) computer into windows.

2. Reboot/Poweroff-on computer into Gentoo

-F10 button functions again; I can get into setup, and ACPI is also working. Battery updates and reports states.

Sometimes the keyboard will refuse to work until the system has booted into the OS. I won't be able to select which OS to boot (it just times out and picks the default), and I'll have to do a soft reboot in order to get it back. (A shutdown won't fix the problem, that I can tell.)

Does anyone have any reasons why this might be happening? Here is some potentially relevant information.

It's really aggravating to have to switch to windows every other time I boot, just so that I can check the battery status and get back into the setup menu (I wouldn't mind so much if it were just the menu.) Any help figuring this out would be greatly appreciated!!! Thank you in advance!!

```
laptop /usr/src/linux # uname -a

Linux laptop 2.6.18-gentoo-r4 #17 SMP PREEMPT Mon Dec 11 21:12:31 EST 2006 i686 Genuine Intel(R) CPU           T2400  @ 1.83GHz GenuineIntel GNU/Linux
```

```
laptop /usr/src/linux # cat .config | grep ACPI

# Power management options (ACPI, APM)

# ACPI (Advanced Configuration and Power Interface) Support

CONFIG_ACPI=y

CONFIG_ACPI_AC=y

CONFIG_ACPI_BATTERY=y

CONFIG_ACPI_BUTTON=y

CONFIG_ACPI_VIDEO=y

CONFIG_ACPI_HOTKEY=y

CONFIG_ACPI_FAN=y

CONFIG_ACPI_DOCK=y

CONFIG_ACPI_PROCESSOR=y

CONFIG_ACPI_THERMAL=y

# CONFIG_ACPI_ASUS is not set

# CONFIG_ACPI_IBM is not set

# CONFIG_ACPI_TOSHIBA is not set

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 is not set

# CONFIG_X86_ACPI_CPUFREQ is not set

CONFIG_X86_SPEEDSTEP_CENTRINO_ACPI=y

# CONFIG_X86_ACPI_CPUFREQ_PROC_INTF is not set

CONFIG_HOTPLUG_PCI_ACPI=m

# CONFIG_HOTPLUG_PCI_ACPI_IBM is not set

CONFIG_PNPACPI=y
```

```
laptop /usr/src/linux # lspci

00:00.0 Host bridge: Intel Corporation Mobile 945GM/PM/GMS/940GML and 945GT Express Memory Controller Hub (rev 03)

00:02.0 VGA compatible controller: Intel Corporation Mobile 945GM/GMS/940GML Express Integrated Graphics Controller (rev 03)

00:02.1 Display controller: Intel Corporation Mobile 945GM/GMS/940GML Express Integrated Graphics Controller (rev 03)

00:1b.0 Audio device: Intel Corporation 82801G (ICH7 Family) High Definition Audio Controller (rev 01)

00:1c.0 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 1 (rev 01)

00:1c.1 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 2 (rev 01)

00:1c.3 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 4 (rev 01)

00:1d.0 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI #1 (rev 01)

00:1d.1 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI #2 (rev 01)

00:1d.2 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI #3 (rev 01)

00:1d.3 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI #4 (rev 01)

00:1d.7 USB Controller: Intel Corporation 82801G (ICH7 Family) USB2 EHCI Controller (rev 01)

00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev e1)

00:1f.0 ISA bridge: Intel Corporation 82801GBM (ICH7-M) LPC Interface Bridge (rev 01)

00:1f.1 IDE interface: Intel Corporation 82801G (ICH7 Family) IDE Controller (rev 01)

00:1f.2 SATA controller: Intel Corporation 82801GBM/GHM (ICH7 Family) Serial ATA Storage Controller AHCI (rev 01)

02:06.0 CardBus bridge: Texas Instruments PCIxx12 Cardbus Controller

02:06.2 Mass storage controller: Texas Instruments 5-in-1 Multimedia Card Reader (SD/MMC/MS/MS PRO/xD)

02:06.3 Class 0805: Texas Instruments PCIxx12 SDA Standard Compliant SD Host Controller

02:06.4 Communication controller: Texas Instruments PCIxx12 GemCore based SmartCard controller

08:00.0 Ethernet controller: Broadcom Corporation NetXtreme BCM5753M Gigabit Ethernet PCI Express (rev 21)

10:00.0 Network controller: Intel Corporation PRO/Wireless 3945ABG Network Connection (rev 02)
```

----------

## aysther

Ok. So I figured out the problem thanks to a very helpful subscriber of the acpi-linux development list. (see solution below)

But I need to know how to submit a bug report to the psmouse module kernel development group... I'll mark this post [solved] if someone could please tell me how to do that! Thanks much! 

Solution:

The issue is related to the psmouse kernel driver or module.

If the computer shuts down while the psmouse driver is loaded, the BIOS is temporarily corrupted somehow.

If you rmmod pdmouse before shutting down, the BIOS works fine, ACPI battery monitoring works great, and you can once again press F10 at boot to get to the setup options screen.

Create an init script to do this automatically, until the bug causing this error is fixed.

```
#!/sbin/runscript

# Copyright 1999-2006 Gentoo Foundation

# Distributed under the terms of the GNU General Public License v2

# $Header: $

depend() {

        need localmount

}

start() {

        ebegin "Loading module: psmouse"

        modprobe psmouse || return 1

        eend $? 

}

stop() {

        ebegin "Unloading module: psmouse"

        rmmod psmouse || return 1

        eend $? 

}

restart() {

        if service_started "${myservice}" ; then

                svc_stop ${myservice}

        fi 

        svc_start ${myservice}

}

```

then:

```
rc-update add psmouse default
```

Problem solved!

----------

## RaffoPazzo

Hi aysther,

i had same problem and i fixed it thanks to your post.

 *Quote:*   

>  I'll mark this post [solved] if someone could please tell me how to do that 

 

Try this:

```
 grep AUTHOR /usr/src/linux/drivers/input/mouse/psmouse-base.c 
```

The output should show you that he is Vojtech Pavlik and him mail address is vojtech@suse.cz.

So sign him, the bug and then mark this post as solved, please.

Thanks again,

RaffoPazzo

----------

## Raistlin

 *aysther wrote:*   

> Ok. So I figured out the problem thanks to a very helpful subscriber of the acpi-linux development list....

 

Hi,

could you please provide a link to the thread in the dev-list?

Thx.

R.

----------

## aysther

 *Quote:*   

> Hi,
> 
> could you please provide a link to the thread in the dev-list?
> 
> Thx.
> ...

 

Here you go. Although there's a new problem that I've discovered, which is almost as annoying.

http://marc.theaimsgroup.com/?l=linux-acpi&m=116596566705690&w=2

It seems that when the computer boots while on battery power, and ACPI enabled, there is an audible hum or buzz that comes from the CPU while it is idle. When ACPI is disabled on boot (specifically the processor driver) the sound is gone.

It seems to me that ACPI must not be properly handling the power state of the CPU while throttling. Speedstep driver may need to be tweaked.

Here's the kicker:

If the laptop is powered up while running on AC, and then disconnected from AC power, the buzz does not occur.

The buzz does not ever occur in windows, even while the processor is stepped down to a lower frequency.

Anyone ever found a solution to this problem? Any ideas?

----------

## aysther

Update:

Kernel 2.6.18-r4

I've done some more testing, and I've narrowed the problem down to the "processor" cpu driver.

I disabled all power management features in the kernel, and compiled ACPI as modules so that they would not be loaded until I wanted them to be.

APM is off.

CPU Frequency Scaling is off.

ACPI is compiled entirely as modules to be loaded by the user.

While running on the battery:

As soon as I "modprobe processor" the humming begins, and as soon as I "rmmod processor" the humming stops.

While running on AC, if I "modprobe processor" there is no buzzing. I can remove the AC adapter and the computer remains silent.

It seems to be something related to the way that the processor driver is handling power to the CPU.

----------

## afa_guru

As for your CPU making strange noises when idling, see http://www.thinkwiki.org/wiki/Problem_with_high_pitch_noises.

"There are four ACPI CPU power states, called C1 through C4. Often only the extreme power saving modes C4 or C3 produce the noise, so the noise can be stopped by insructing the Linux ACPI code to use only lower modes."

Disabling C4 helped with my laptop.

----------

## aysther

My laptop does make these noises when idling, but I only have access to C1, C2, and C3 when running on the battery, and only C1 and C2 when on AC. I have no access to C0, C4, or C5.... How can I enable these other states? They work in windows. The CPU does not even allow itself to be clocked at its max speed w/Gentoo (C0).

----------

