Hardware Environment: Intel 865PE chipset Prescott CPU Software Environment: Wake on RTC is disabled in BIOS. RTC wakeup time is unset, still at default 00:00. Problem Description: After ACPI shutdown in Linux, computer turns itself back on at the RTC wakeup time (00:00) even though RTC wakeup is disabled in BIOS and not otherwise requested. Previously it appeared that enabling the kernel config option "Enhanced Real Time Clock Support" solved this problem. However, since upgrading to mainline kernel 2.6.24.2, the problem occurs even though this option is enabled. Steps to reproduce: 1. Install kernel using the attached config. 2. hwclock --set --date="2/17/2008 23:58" 3. shutdown -t 1 -h now 4. Wait 2 minutes Workaround 1: Disable ACPI. Workaround 2: Revert to kernel 2.6.23.9 and ensure that the kernel option "Enhanced Real Time Clock Support" is enabled. History: bug 4835, bug 4896, bug 5694.
Created attachment 14875 [details] 2.6.24.2 config to reproduce problem
Will you please attach the output of acpidump? It will be great if you can add the boot option of "acpi.debug_layer=0x04 acpi.debug_level=0x08000017" and attach the output of dmesg.
what do you get if you cat /proc/acpi/alarm?
Created attachment 14886 [details] Requested info #1 Requested info attached in debug.tar.bz2. /proc/acpi/alarm is incriminating. I thought the 00:00 alarm time was coming from the BIOS, but it's not. See BIOS.jpg in debug.tar.bz2.
Hi, David Thanks for the info. According to the description there are two issues about your laptop. 1. Although Wake on RTC is disabled in BIOS and RTC wakeup time is unset, the /proc/acpi/alarm still display at default 00:00. This problem won't break anything. After the system is booted with acpi enabled, OS will create the file of /proc/acpi/alarm . Catting /proc/acpi/alarm will read the alarm info from RTC port. If RTC wakeup time is unset, /proc/acpi/alarm will display the default value stored in RTC alarm region.(hour, minute, second will be zero). 2. After ACPI shutdown in Linux, computer turns itself back on at the RTC wakeup time (00:00) even though RTC wakeup is disabled in BIOS and not otherwise requested. It seems that this is a regression.Will you please enable the kernel configuration of "enhanced RTC" and do the following test ? a. boot the system with the option of "acpi.debug_laeyr=0x04 acpi.debug_level=0x08000017" b. cat /proc/acpi/alarm and cat /proc/driver/rtc c. hwclock --set --date="2/17/2008 23:58" d. shutdown -t 1 -h now Both the failing kernel(2.6.24.2) and working kernel(2.6.23.12) are required. Thanks.
Created attachment 14908 [details] Requested info #2 Requested info attached. The working version is 2.6.23.9. The affected computer is ATX not laptop.
Could you narrow down the problem to a specific kernel release please? As this is a regression, it would be much easier for us to debug if we can find out which kernel version this regression appears.
2.6.23.17 is good. 2.6.24 is bad. 2.6.24.3 is still bad. FWIW, I verified that enabling Device Drivers -> Real Time Clock -> PC-style 'CMOS' in 2.6.24.3 does not help. Diff of dmesg (before and after) shows: > ACPI: RTC can wake from S4 > rtc_cmos: probe of 00:04 failed with error -16 > drivers/rtc/hctosys.c: unable to open rtc device (rtc0)
Does it still happen if you override the value in /proc/acpi/wakeup? run "echo +0000-00-00 00:00:20 > /proc/acpi/wakeup", what do you see in /proc/acpi/wakeup? you should receive an ACPI interrupt after 20 seconds, and the laptop should not wakeup at 00:00
sh-3.1# cat /proc/acpi/wakeup Device S-state Status Sysfs node USB1 S3 disabled pci:0000:00:1d.0 USB2 S3 disabled pci:0000:00:1d.1 USB3 S3 disabled pci:0000:00:1d.2 USB4 S3 disabled pci:0000:00:1d.3 EHCI S3 disabled pci:0000:00:1d.7 ICHB S4 disabled pci:0000:00:1e.0 PS2K S4 disabled pnp:00:07 MC9 S4 disabled sh-3.1# echo +0000-00-00 00:00:20 > /proc/acpi/wakeup sh-3.1# cat /proc/acpi/wakeup Device S-state Status Sysfs node USB1 S3 disabled pci:0000:00:1d.0 USB2 S3 disabled pci:0000:00:1d.1 USB3 S3 disabled pci:0000:00:1d.2 USB4 S3 disabled pci:0000:00:1d.3 EHCI S3 disabled pci:0000:00:1d.7 ICHB S4 disabled pci:0000:00:1e.0 PS2K S4 disabled pnp:00:07 MC9 S4 disabled Nothing noticeable happened after 20 seconds (no log messages). Computer woke up at 00:00 same as before.
Created attachment 15947 [details] try the debug patch Will you please try the debug patch and see whether the problem still exists? Thanks.
The patch worked. Built mainline linux-2.6.25.3 with gcc 4.3.0. Wakeup problem reproduced. Applied the debug patch and retried. Wakeup problem would not reproduce.
Created attachment 16119 [details] try the update patch Thanks for the test. It seems that the desktop can work well after applying the patch in comment #11. Will you please try the updated patch and see whether the system can work well. Thanks.
The updated patch also works.
patch applied to acpi-test tree
fix is now in Linus' tree as commit e1094bfa26e5e94af2fea79e004614dbce42b008