Skip to contentSkip to conversation

2.6.28 hates my RTC clock - with PM_TRACE set

BUG Jike Song 3 participants 5 messages Jan 5, 2009

lore
Share & tools
lore

Jike Song

author
#0 lore raw
$ zgrep PM_ /proc/config.gz
CONFIG_PM_DEBUG=y
# CONFIG_PM_VERBOSE is not set
CONFIG_CAN_PM_TRACE=y
CONFIG_PM_TRACE=y
CONFIG_PM_TRACE_RTC=y
CONFIG_PM_SLEEP_SMP=y
CONFIG_PM_SLEEP=y
CONFIG_PM_STD_PARTITION="/dev/sda6"
CONFIG_X86_PM_TIMER=y

2.6.28 can't resume from suspend to RAM on my HPC NX6325. I don't know if v2.6.27-v2.6.28-rc9 works, I can only make sure that 2.6.26 works well;-(

So I re-compiled 2.6.28 with CONFIG_PM_DEBUG and CONFIG_PM_TRACE set, and run this script as per Documentation/power/s2ram.txt:

#!/bin/sh
sync
echo 1 > /sys/power/pm_trace
echo mem > /sys/power/state

As usually, it suspended to RAM successfully. But after I press the power button, it won't come back, giving me nothing but a black screen. So I hold the power button done for about 5 seconds, then the computer halted(it's only a hardware feature of the southbridge, right? ;-), silently, without any output on the always-black screen.

So the PM_TRACE code was broken, right?

After rebooting the computer, I found I was in the year 1988! And I do the suspend-hold_power_button-reboot once again, now it is 2040 years A.D.

The .config file was attached.

Signature · 2 lines
Thanks,
Jike
#1 lore raw
Quoted 7 lines · Jike Song

As usually, it suspended to RAM successfully. But after I press the power button, it won't come back, giving me nothing but a black screen. So I hold the power button done for about 5 seconds, then the computer halted(it's only a hardware feature of the southbridge, right? ;-), silently, without any output on the always-black screen.

So the PM_TRACE code was broken, right?

Why do you say that?

Quoted 3 lines

After rebooting the computer, I found I was in the year 1988! And I do the suspend-hold_power_button-reboot once again, now it is 2040 years A.D.

PM_TRACE uses the clock registers to store information about which device the kernel was attempting to resume when it hung. It's expected that your clock will be wrong afterwards.

Signature · 1 line
Matthew Garrett | [email protected]
author
#2 lore raw
Quoted 12 lines · Matthew Garrett
Quoted 7 lines · Jike Song

As usually, it suspended to RAM successfully. But after I press the power button, it won't come back, giving me nothing but a black screen. So I hold the power button done for about 5 seconds, then the computer halted(it's only a hardware feature of the southbridge, right? ;-), silently, without any output on the always-black screen.

So the PM_TRACE code was broken, right?

Why do you say that?

Quoted 8 lines
Quoted 3 lines

After rebooting the computer, I found I was in the year 1988! And I do the suspend-hold_power_button-reboot once again, now it is 2040 years A.D.

PM_TRACE uses the clock registers to store information about which device the kernel was attempting to resume when it hung. It's expected that your clock will be wrong afterwards.

Thanks for you information! I took it for granted that the RTC clock will be restored after resume/reboot.

So it's only an ordinary S2R bug with a black screen? I can't see anything with PM_TRACE.

Quoted 3 lines

--
Matthew Garrett | [email protected]

Signature · 2 lines
Thanks,
Jike
#3 lore raw
Quoted 5 lines · Jike Song

Thanks for you information! I took it for granted that the RTC clock will be restored after resume/reboot.

So it's only an ordinary S2R bug with a black screen? I can't see anything with PM_TRACE.

The PM_TRACE output will be in the dmesg of the kernel when you boot immediately after tha hang.

Signature · 1 line
Matthew Garrett | [email protected]
#4 lore raw
In reply to Jike Song
Quoted 7 lines

So I re-compiled 2.6.28 with CONFIG_PM_DEBUG and CONFIG_PM_TRACE set, and run this script as per Documentation/power/s2ram.txt:

       #!/bin/sh
        sync
        echo 1 > /sys/power/pm_trace
        echo mem > /sys/power/state

Looks like you forgot to read the rest of the s2ram.txt file, especially the bit that starts with "- if it doesn't come back up (which is usually the problem) [...]".

The current version [1] also explains why your system clock changes.

Cheers,
FJP

[1]http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob;f=Documentation/power/s2ram.txt;h=2ebdc6091ce17ff6464aeb4cec35939983045de6;hb=HEAD