Bug 9194 - computer power will not turn off at (init 0) shutdown - 2.6.23 regression
Summary: computer power will not turn off at (init 0) shutdown - 2.6.23 regression
Status: CLOSED CODE_FIX
Alias: None
Product: ACPI
Classification: Unclassified
Component: Power-Off (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: Len Brown
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-10-19 20:15 UTC by Stan Senuta Jr.
Modified: 2008-01-13 23:40 UTC (History)
1 user (show)

See Also:
Kernel Version: 2.6,23.1
Subsystem:
Regression: Yes
Bisected commit-id:


Attachments
Output displayed by acpiddump command (85.69 KB, application/octet-stream)
2007-10-24 19:33 UTC, Stan Senuta Jr.
Details
Output from dmesg command (14.61 KB, application/octet-stream)
2007-10-24 19:37 UTC, Stan Senuta Jr.
Details
Output of the lspci command (non-verbose) (2.10 KB, application/octet-stream)
2007-10-24 19:39 UTC, Stan Senuta Jr.
Details
patch vs 2.6.24 (4.17 KB, text/x-diff)
2008-01-06 20:45 UTC, Len Brown
Details
patch vs 2.6.23 (4.26 KB, patch)
2008-01-13 23:40 UTC, Len Brown
Details | Diff

Description Stan Senuta Jr. 2007-10-19 20:15:12 UTC
Most recent kernel where this bug did not occur:2.6.22.1
Distribution: Mandriva Discovery 2006
Hardware Environment: Desktop computer with Asus A8v-MX board & both a Sata & Pata drive installed
Software Environment: Lilo boot loader; vesa_fb console; KDE-3.4.2
Problem Description:I just upgraded to kernel-2.6.23.1 from kernel-2.6.22.1 and now my computer power will not turn off at (init 0) shutdown. It just freezes up forcing me to use the reset button However, if I choose (init 6) reboot, the computer will reboot

To avoid this problem I have to disable (operating system controlled) ACPI in my lilo.conf with the acpi=off option. This allows Linux to substitute the older (bios controlled) APM technology of power management & my computer will then poweroff.

Kernel-2.6.23.1 was compiled with my existing 2.6.22.1 .config file & their ACPI modules folders show the same drivers except for video.ko which is only present in kernel-2.6.23.1  Also, a check of my /var/log/messages shows this: ACPI Warning (tbutils-0217): Incorrect checksum in table [OEMB] -  E2, should be D5 [20070126]. This warning doesn't mean anything to me but it may be important to you. 



Steps to reproduce:Type the command shutdown -h now
Comment 1 Stan Senuta Jr. 2007-10-23 04:21:24 UTC
Since my initial report I tried these ACPI boot options with the following results:

	acpi=off:	boot=ok		poweroff=ok
	acpi=ht:	boot=ok		poweroff=ok
	acpi=noirq	boot=ok		poweroff=FAILS

I also re-compiled kernel-2.6.23.1 & disabled the following ACPI options but this didn't make any poweroff difference:

	[ ] Depreciated /proc/acpi  support
	[ ] Depreciated /proc/acpi/event  support 
Comment 2 Fu Michael 2007-10-23 22:39:27 UTC
we would need log of:
1) dmesg
2) acpidump 
3) lspci 
Comment 3 Stan Senuta Jr. 2007-10-24 19:33:04 UTC
Created attachment 13267 [details]
Output displayed by acpiddump command

This message was displayed on my console by the acpidump command:

[root@localhost Download]# acpidump > /home/stan/Desktop/acpidump
Wrong checksum for generic table!
[root@localhost Download]# echo $?
0
Comment 4 Stan Senuta Jr. 2007-10-24 19:37:03 UTC
Created attachment 13268 [details]
Output from dmesg command
Comment 5 Fu Michael 2007-10-24 19:37:38 UTC
bug# 6712 may give you some hint. could you please help do some testing as suggested in that bug?
Comment 6 Stan Senuta Jr. 2007-10-24 19:39:22 UTC
Created attachment 13269 [details]
Output of the lspci command (non-verbose)
Comment 7 Stan Senuta Jr. 2007-10-24 20:13:43 UTC
(In reply to comment #5)
> bug# 6712 may give you some hint. could you please help do some testing as
> suggested in that bug?
> 
Yes, I would be happy to help anyway I can. I just glanced at bug# 6712 & printed it to a .ps file so I can read it in more detail tomorrow when my mind is fresh.

For now, I can tell you that my kernel-2.6.23.1 has config_acpi_sleep=Y & my system will just freeze using the shutdown -h now cmd. Also, shutdown -r now will reboot without problem
Comment 8 Stan Senuta Jr. 2007-10-24 22:37:20 UTC
(In reply to comment #5)
> bug# 6712 may give you some hint. could you please help do some testing as
> suggested in that bug?
> 

(In reply to comment #7)
> (In reply to comment #5)
> > bug# 6712 may give you some hint. could you please help do some testing as
> > suggested in that bug?
> > 
> Yes, I would be happy to help anyway I can. I just glanced at bug# 6712 &
> printed it to a .ps file so I can read it in more detail tomorrow when my
> mind
> is fresh.
> 
> For now, I can tell you that my kernel-2.6.23.1 has config_acpi_sleep=Y & my
> system will just freeze using the shutdown -h now cmd. Also, shutdown -r now
> will reboot without problem
> 

Thanks for steering me to bug# 6712. I may have found a solution to the poweroff problem. 

By comparing my .config files for kernels-2.6.19.1, 2.6.20.11. 2.6.21.1 & 2.6.22.1, I noted that kernel-2.2.23.1 was the only one with a config_pm_sleep=<y> option in addition to the config_acpi_sleep=<y> option. Could these two sleep options be confusing the system at poweroff ? 

SHORT TEST:
I assumed the config_pm_sleep option was associated with APM & disabled APM at boot with the apm=off parameter. This enabled me to run ACPI & actually poweroff at shutdown.

Here is the boot command I used:
[stan@localhost ~]$ cat /proc/cmdline
BOOT_IMAGE=sata-2.6.23 ro root=801 hdd=ide-cd resume=/dev/sda5 splash=silent         apm=off
 
Tomorrow, I will re-build kernel-2.6.23.1 with both APM & ACPI but w/o the config_pm_sleep option & see if the system will still poweroff at shutdown. I'll let you know what happens.
Comment 9 Stan Senuta Jr. 2007-10-25 06:23:36 UTC
I rebuilt kernel-2,6,23.1 as promised but could not find a seperate config option for config_pm_sleep so...I disabled APM using:
 
 Power management options--->
  < > APM (Adv Power Mgt) bios support

This resulted in .config entry:
  
  config_APM is not set 

My system will now shutdown & reboot properly. 

The above is equivlent to typing apm=off as a kernel boot parameter. Also, I was wrong in assuming that config_pm_sleep was associated with APM because this config entry still remains in my new kernel-2.6.23.1 .config file. However you may still want to investigate why "only" kernel-2.6.23.1 shows both config_pm_sleep & config_acpi_sleep in the .config file.
Comment 10 Len Brown 2008-01-06 20:43:17 UTC
It is a bug that Linux can think that ACPI and APM
are simultaneously active.

Please search for CONFIG_PM_LEGACY in your .config.
If it is not present with the failing kernel, please
enable it and look for differences in the dmesg -s64000
output, as well as the ability of init 0 to poweroff.
Comment 11 Len Brown 2008-01-06 20:45:17 UTC
Created attachment 14318 [details]
patch vs 2.6.24

please verify that this patch will disable APM when
ACPI is active, even when the kernel is built without
PM_LEGACY, and verify that poweroff works.
Comment 12 Len Brown 2008-01-13 23:12:19 UTC
patch in comment #11
shipped in linux-2.6.24-rc7-git5

closed.
Comment 13 Len Brown 2008-01-13 23:40:24 UTC
Created attachment 14448 [details]
patch vs 2.6.23

Note You need to log in before you can comment on or make changes to this bug.