# Weird ACPI related issues after kernel upgrade

## sparc

Hi,

Lately I did a major overhaul on my HP 6930p laptop. After migrating to gcc 4.4.3 and doing an empty tree install world, I updated my kernel to 2.6.35 and installed the new KDE 4.5 from the kde overlay, subsequently erasing my ~/.kde folder and ~/.kderc file.

I put my post in the kernel section because all indication show that the following are more of a kernel problem than anything else.

Also keep in mind that all the problems bellow are eliminated if I boot back to a 2.6.31 kernel (given that I re-emerge hal, which compiles heavily dependent on the current kernel sources).

So the first problem is that I can no longer suspend from inside KDE, but I have absolutely no problem doing so from the console. What happens is that the screen goes blank like it is going to suspend but the system never powers off. If I boot back to 2.6.31, KDE 4.5 has no problem at all to suspend and resume.

Second problem concerns DPMS. If I close the lid then upon reopening there is a delay for the screen to get back on, while it happens in a very strange way that includes some flickering. It resembles how those old TV boxed opened slowly cause they needed to heat up first. Again 2.6.31 solves the issue, without changing anything else on my system. Furthermore, if I keep the lid closed for a couple of hours, xorg 1.8.2 crashes. I know this because I can ssh and restart xdm bringing everything back to normal.

Final problem is that in order for powerdevil to 'see' ACPI and enable the brightness control, amongst others, I need to restart dbus. After doing so everything automatically works. I do not even need to logout and login again. I guess this has more to do with hal which is also restarted by dbus. Also, restarting hal used to restart xdm also, this no longer happens.

So, does anybody have any idea? Going back to a previous kernel is not an option since 2.6.35 is the first that solves other problems which can not be worked around like these. Problems which I cannot live with. Anyhow I'm posting only my kernel ACPI configuration but you are more than welcome to ask for anything else that might shed some light into this.

```

# Power management and ACPI options

#

CONFIG_PM=y

# CONFIG_PM_DEBUG is not set

CONFIG_PM_SLEEP_SMP=y

CONFIG_PM_SLEEP=y

CONFIG_SUSPEND_NVS=y

CONFIG_SUSPEND=y

CONFIG_SUSPEND_FREEZER=y

CONFIG_HIBERNATION=y

CONFIG_PM_STD_PARTITION="/dev/sda2"

CONFIG_PM_RUNTIME=y

CONFIG_PM_OPS=y

CONFIG_ACPI=y

CONFIG_ACPI_SLEEP=y

CONFIG_ACPI_PROCFS=y

CONFIG_ACPI_PROCFS_POWER=y

CONFIG_ACPI_POWER_METER=y

CONFIG_ACPI_SYSFS_POWER=y

CONFIG_ACPI_PROC_EVENT=y

CONFIG_ACPI_AC=y

CONFIG_ACPI_BATTERY=y

CONFIG_ACPI_BUTTON=y

CONFIG_ACPI_VIDEO=y

CONFIG_ACPI_FAN=y

CONFIG_ACPI_DOCK=y

CONFIG_ACPI_PROCESSOR=y

CONFIG_ACPI_HOTPLUG_CPU=y

CONFIG_ACPI_PROCESSOR_AGGREGATOR=m

CONFIG_ACPI_THERMAL=y

# CONFIG_ACPI_CUSTOM_DSDT is not set

CONFIG_ACPI_BLACKLIST_YEAR=0

# CONFIG_ACPI_DEBUG is not set

# CONFIG_ACPI_PCI_SLOT is not set

CONFIG_X86_PM_TIMER=y

CONFIG_ACPI_CONTAINER=y

# CONFIG_ACPI_SBS is not set

CONFIG_ACPI_HED=y

CONFIG_ACPI_APEI=y

CONFIG_ACPI_APEI_GHES=y

CONFIG_SFI=y

# CONFIG_APM is not set

#

# CPU Frequency scaling

#

CONFIG_CPU_FREQ=y

CONFIG_CPU_FREQ_TABLE=y

# CONFIG_CPU_FREQ_DEBUG is not set

CONFIG_CPU_FREQ_STAT=y

CONFIG_CPU_FREQ_STAT_DETAILS=y

# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set

# CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE is not set

CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE=y

# CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set

# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set

CONFIG_CPU_FREQ_GOV_PERFORMANCE=y

CONFIG_CPU_FREQ_GOV_POWERSAVE=y

CONFIG_CPU_FREQ_GOV_USERSPACE=y

CONFIG_CPU_FREQ_GOV_ONDEMAND=y

CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y

#

# CPUFreq processor drivers

#

CONFIG_X86_PCC_CPUFREQ=m

CONFIG_X86_ACPI_CPUFREQ=m

# CONFIG_X86_POWERNOW_K6 is not set

# CONFIG_X86_POWERNOW_K7 is not set

# CONFIG_X86_POWERNOW_K8 is not set

# CONFIG_X86_GX_SUSPMOD is not set

# CONFIG_X86_SPEEDSTEP_CENTRINO is not set

CONFIG_X86_SPEEDSTEP_ICH=y

# CONFIG_X86_SPEEDSTEP_SMI is not set

# CONFIG_X86_P4_CLOCKMOD is not set

# CONFIG_X86_CPUFREQ_NFORCE2 is not set

# CONFIG_X86_LONGRUN is not set

# CONFIG_X86_LONGHAUL is not set

# CONFIG_X86_E_POWERSAVER is not set

#

# shared options

#

CONFIG_X86_SPEEDSTEP_LIB=y

# CONFIG_X86_SPEEDSTEP_RELAXED_CAP_CHECK is not set

CONFIG_CPU_IDLE=y

CONFIG_CPU_IDLE_GOV_LADDER=y

CONFIG_CPU_IDLE_GOV_MENU=y

# CONFIG_INTEL_IDLE is not set

```

Thanks in advance...

----------

## alexandref75

I guess all of your problems are related to HAL. Try restarting HAL before doing a login to KDE and see if the problems reappear. I have similar problems with suspend once in a while and HAL is always the culprit. If you want to test, see if you suspend using pm-suspend works.

I dunno why it works with 2.6.31. In my machine, I have this problems since I've been starting rc scripts in parallel.

----------

## sparc

FYI

https://bbs.archlinux.org/viewtopic.php?pid=803726

There seems to be a bug on kernel-2.6.35 that does not allow pm-utils to work properly. For some reason though, I'm affected on more things than just suspend. KDE DPMS is also handled by pm-utils. On one hand it explains my symptoms. On the other hand 2.6.35 is unusable...

----------

## sparc

I have downgraded my kernel to 2.6.34-r5 and suspend works; I no longer have to restart hal; DPMS still gives me flickering but I haven't tested if X crashes, yet.

If anybody cares about this, I just have to say that 2.6.35 needs to mature a bit before getting back on top of my menulist.

----------

## sparc

Yeap. 2.6.34-r5 has fixed all of the problems. Just to clarify I want to say that I compiled it by using the same config I had for 2.6.35-r1, after running a make oldconfig on it. So it is the exact same configuration minus all the problems. Something must be very wrong with the latest kernel.

----------

## alexandref75

Interesting. In my machine (XPS studio 16 with an ATI 3670) suspend in 2.6.35.2 works fine with KDE (4.5). I am using the ATI open source driver and KMS. Does the problem only happen when using pm-utils (pm-suspend)?

 *sparc wrote:*   

> Yeap. 2.6.34-r5 has fixed all of the problems. Just to clarify I want to say that I compiled it by using the same config I had for 2.6.35-r1, after running a make oldconfig on it. So it is the exact same configuration minus all the problems. Something must be very wrong with the latest kernel.

 

----------

## sparc

Actually yes. directly running hibernate-ram from the console works perfectly. Also, pm-suspend only hangs after running all hooks as you can see at the log below... I guess this is directly connected to my laptop's hardware configuration and probably ACPI implementation...

```

Initial commandline parameters: 

Blacklisting 01grub.

Blacklisting 55NetworkManager.

Blacklisting 90clock.

Wed Aug 18 17:54:54 CEST 2010: Running hooks for suspend.

Running hook /usr/lib/pm-utils/sleep.d/00logging suspend suspend:

Linux AEDCT 2.6.35-gentoo-r1 #1 SMP PREEMPT Wed Aug 11 19:12:48 CEST 2010 i686 Intel(R) Core(TM)2 Duo CPU P8600 @ 2.40GHz GenuineIntel GNU/Linux

Module                  Size  Used by

coretemp                3861  0 

ipv6                  209001  28 

acpi_cpufreq            4253  1 

mperf                    803  1 acpi_cpufreq

snd_hda_codec_analog    45998  1 

pcspkr                  1167  0 

iwlagn                167529  0 

snd_hda_intel          16140  2 

snd_hda_codec          47774  2 snd_hda_codec_analog,snd_hda_intel

snd_hwdep               3974  1 snd_hda_codec

             total       used       free     shared    buffers     cached

Mem:       4042332    1512992    2529340          0       8892     810648

-/+ buffers/cache:     693452    3348880

Swap:      2104508          0    2104508

/usr/lib/pm-utils/sleep.d/00logging suspend suspend: success.

Running hook /usr/lib/pm-utils/sleep.d/00powersave suspend suspend:

Blacklisting 01grub.

Blacklisting 55NetworkManager.

Blacklisting 90clock.

/usr/lib/pm-utils/sleep.d/00powersave suspend suspend: success.

Running hook /usr/lib/pm-utils/sleep.d/01grub suspend suspend:

/usr/lib/pm-utils/sleep.d/01grub suspend suspend: success.

Running hook /usr/lib/pm-utils/sleep.d/49bluetooth suspend suspend:

/usr/lib/pm-utils/sleep.d/49bluetooth suspend suspend: success.

Running hook /usr/lib/pm-utils/sleep.d/55NetworkManager suspend suspend:

/usr/lib/pm-utils/sleep.d/55NetworkManager suspend suspend: success.

Running hook /usr/lib/pm-utils/sleep.d/75modules suspend suspend:

/usr/lib/pm-utils/sleep.d/75modules suspend suspend: success.

Running hook /usr/lib/pm-utils/sleep.d/90clock suspend suspend:

/usr/lib/pm-utils/sleep.d/90clock suspend suspend: success.

Running hook /usr/lib/pm-utils/sleep.d/91wicd suspend suspend:

/usr/lib/pm-utils/sleep.d/91wicd suspend suspend: success.

Running hook /usr/lib/pm-utils/sleep.d/94cpufreq suspend suspend:

/usr/lib/pm-utils/sleep.d/94cpufreq suspend suspend: success.

Running hook /usr/lib/pm-utils/sleep.d/95led suspend suspend:

/usr/lib/pm-utils/sleep.d/95led suspend suspend: success.

Running hook /usr/lib/pm-utils/sleep.d/98video-quirk-db-handler suspend suspend:

Kernel modesetting video driver detected, not using quirks.

/usr/lib/pm-utils/sleep.d/98video-quirk-db-handler suspend suspend: success.

Running hook /usr/lib/pm-utils/sleep.d/99video suspend suspend:

kernel.acpi_video_flags = 0

/usr/lib/pm-utils/sleep.d/99video suspend suspend: success.

Wed Aug 18 17:54:55 CEST 2010: performing suspend

```

So, I'm adding lspci

```

00:00.0 Host bridge: Intel Corporation Mobile 4 Series Chipset Memory Controller Hub (rev 07)

00:02.0 VGA compatible controller: Intel Corporation Mobile 4 Series Chipset Integrated Graphics Controller (rev 07)

00:02.1 Display controller: Intel Corporation Mobile 4 Series Chipset Integrated Graphics Controller (rev 07)

00:19.0 Ethernet controller: Intel Corporation 82567LM Gigabit Network Connection (rev 03)

00:1a.0 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #4 (rev 03)

00:1a.1 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #5 (rev 03)

00:1a.2 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #6 (rev 03)

00:1a.7 USB Controller: Intel Corporation 82801I (ICH9 Family) USB2 EHCI Controller #2 (rev 03)

00:1b.0 Audio device: Intel Corporation 82801I (ICH9 Family) HD Audio Controller (rev 03)

00:1c.0 PCI bridge: Intel Corporation 82801I (ICH9 Family) PCI Express Port 1 (rev 03)

00:1c.1 PCI bridge: Intel Corporation 82801I (ICH9 Family) PCI Express Port 2 (rev 03)

00:1c.2 PCI bridge: Intel Corporation 82801I (ICH9 Family) PCI Express Port 3 (rev 03)

00:1c.4 PCI bridge: Intel Corporation 82801I (ICH9 Family) PCI Express Port 5 (rev 03)

00:1d.0 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #1 (rev 03)

00:1d.1 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #2 (rev 03)

00:1d.2 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #3 (rev 03)

00:1d.7 USB Controller: Intel Corporation 82801I (ICH9 Family) USB2 EHCI Controller #1 (rev 03)

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

00:1f.0 ISA bridge: Intel Corporation ICH9M-E LPC Interface Controller (rev 03)

00:1f.2 SATA controller: Intel Corporation ICH9M/M-E SATA AHCI Controller (rev 03)

02:00.0 Network controller: Intel Corporation Wireless WiFi Link 5300

85:09.0 FireWire (IEEE 1394): Ricoh Co Ltd R5C832 IEEE 1394 Controller (rev 06)

85:09.1 SD Host controller: Ricoh Co Ltd R5C822 SD/SDIO/MMC/MS/MSPro Host Adapter (rev 25)

85:09.2 CardBus bridge: Ricoh Co Ltd RL5c476 II (rev bb)

```

----------

## alexandref75

I would guess something related to your video. Are you using KMS? Did you try to use the quirk options in pm-suspend to see if is able to finish the suspend?

 *Quote:*   

>  portage # pm-suspend --help
> 
> pm-suspend [options]
> 
> Options can change how suspend or hibernate is done.
> ...

 

----------

## sparc

Thanks for the input but the thing here is not how to hack my way around this. It simply cannot be that by booting a different kernel everything works; a kernel which has the exact same configuration!

In any case, I am using modesetting for my intel gfx card and this means that no quirks are necessary, as stated in the pm-utils log also.

On the other hand I solved the need-to-restart-hal issue. It has to be started after acpid while I had them in different runlevels, making rc disregard the dependency.

In any case, maybe I have something wrong with my ACPI configuration in the kernel which for some reason works in 2.6.34-r5. I wouldn't be surprised if this is one of those cases where two wrongs make one correct until they don't! Maybe fixing the rc issue solved everything else too (haven't tested booting back to 2.6.35 yet). So, if anybody knows a few things about kernel ACPI, please take a look... I've posted my configuration above.

----------

