Bug 11122

Summary: less power consumption after suspend to ram (HP Laptops)
Product: Power Management Reporter: Daniel Würfel (daniel.wuerfel)
Component: Hibernation/SuspendAssignee: Zhang Rui (rui.zhang)
Status: CLOSED PATCH_ALREADY_AVAILABLE    
Severity: normal CC: acpi-bugzilla, lenb, mithrandir, rjw
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: 2.6.25 (2.6.25-gentoo-r6) Subsystem:
Regression: Yes Bisected commit-id:

Description Daniel Würfel 2008-07-19 03:28:59 UTC
Latest working kernel version:2.6.25 (2.6.25-gentoo-r6)
Earliest failing kernel version:2.6.23
Distribution:gentoo
Hardware Environment:HP 6715b (AMD Turion(tm) 64 X2 TL-58, ATI X1250)
Software Environment:2.6.25-gentoo-r6, gnome 2.20, ATI 8.50.3
Problem Description: The 6715b i use consumes 18 W power in idle with lowest display backlight. After suspend-to-ram it consumes only 14-15 W.
I checked the module list (lsmod), the available of both cpu cores, the files in /proc and /sys before and after s2r, but i can't find differences.
The low power usage is real, because powertop shows it, a power analyzer i plugged between laptop and power socket shows it, the cpu fan doesn't turn on so frequently and the laptop runs 0,75 hour longer, if i initialize a s2r after i plugged in a full battery.
The problem is not the low power consumption after s2r, it is the high power consumption after a reboot or suspend-to-disk. 
The problem could be the HP BIOS (version F.07) or the apic interpretion of the kernel, but there is no newer bios available for the 6715b.
Yes, the messages 

APIC error on CPU0: 40(40)
APIC error on CPU1: 40(40)

i can see very often in the log (after s2r too), without any problems.
With boot parameter "noapic" and "nolapic" after a boot the power consumption fall to 14-15 W too, but then only one CPU Core is working (after s2r really both cpu cores are working)    
I use the kernel native suspend-to-ram and suspend-to-disk procedure, which are available since 2.6.23.

Another guy i met in a forum said, he have the same problem with a HP 2510p running Ubuntu. This laptop have a complete other hardware then the 6715b.

Steps to reproduce:
1. boot linux on a 6715b -> high power
2. initialize s2r
3. resume from s2r -> low power usage
4. initialize s2d and resume -> high power usage
Comment 1 Andrew Morton 2008-07-19 04:16:25 UTC
> Latest working kernel version:2.6.25 (2.6.25-gentoo-r6)
> Earliest failing kernel version:2.6.23

I will assume that you accidentally reversed these and I'll mark it
as a regression.

I'll reassign the bug to  acpi_power-sleep-wake@kernel-bugs.osdl.org
also.  Thanks for the report.
Comment 2 Rafael J. Wysocki 2008-07-19 04:34:19 UTC
On Saturday, 19 of July 2008, bugme-daemon@bugzilla.kernel.org wrote:
> http://bugzilla.kernel.org/show_bug.cgi?id=11122
> 
> 
> akpm@osdl.org changed:
> 
>            What    |Removed                     |Added
> ----------------------------------------------------------------------------
>          AssignedTo|power-                      |acpi_power-sleep-
>                    |management_other@kernel-    |wake@kernel-bugs.osdl.org
>                    |bugs.osdl.org               |
>           Component|Hibernation/Suspend         |Power-Sleep-Wake
>             Product|Power Management            |ACPI
>          Regression|0                           |1
> 
> 
> 
> 
> ------- Comment #1 from akpm@osdl.org  2008-07-19 04:16 -------
> > Latest working kernel version:2.6.25 (2.6.25-gentoo-r6)
> > Earliest failing kernel version:2.6.23
> 
> I will assume that you accidentally reversed these and I'll mark it
> as a regression.
> 
> I'll reassign the bug to  acpi_power-sleep-wake@kernel-bugs.osdl.org
> also.  Thanks for the report.

Well, unfortunately I have no idea what to do to debug this.

Daniel, what exactly do you do to measure the power usage?
Comment 3 Daniel Würfel 2008-07-19 04:58:47 UTC
Am Samstag, den 19.07.2008, 04:34 -0700 schrieb
bugme-daemon@bugzilla.kernel.org:
> http://bugzilla.kernel.org/show_bug.cgi?id=11122
> 
> 
> 
> 
> 
> ------- Comment #2 from rjw@sisk.pl  2008-07-19 04:34 -------
> On Saturday, 19 of July 2008, bugme-daemon@bugzilla.kernel.org wrote:
> > http://bugzilla.kernel.org/show_bug.cgi?id=11122
> > 
> > 
> > akpm@osdl.org changed:
> > 
> >            What    |Removed                     |Added
> >
> ----------------------------------------------------------------------------
> >          AssignedTo|power-                      |acpi_power-sleep-
> >                    |management_other@kernel-    |wake@kernel-bugs.osdl.org
> >                    |bugs.osdl.org               |
> >           Component|Hibernation/Suspend         |Power-Sleep-Wake
> >             Product|Power Management            |ACPI
> >          Regression|0                           |1
> > 
> > 
> > 
> > 
> > ------- Comment #1 from akpm@osdl.org  2008-07-19 04:16 -------
> > > Latest working kernel version:2.6.25 (2.6.25-gentoo-r6)
> > > Earliest failing kernel version:2.6.23
> > 
> > I will assume that you accidentally reversed these and I'll mark it
> > as a regression.
> > 
> > I'll reassign the bug to  acpi_power-sleep-wake@kernel-bugs.osdl.org
> > also.  Thanks for the report.
> 
> Well, unfortunately I have no idea what to do to debug this.
> 
> Daniel, what exactly do you do to measure the power usage?
> 
> 

Hi, thanks for your very fast reaction. Respect.
Well, you can measure the power usage with powertop (you know the intel
tool? -> http://www.lesswatts.org/projects/powertop/).
This tool shows the power usage only if the laptop runs in the battery
mode.
Or you take a standard power analyzer (i dont know the exact name in
english, it cost 10 €, you can plug it between an electrical device an
the power socket) 
Comment 4 Andrew Morton 2008-07-19 11:28:29 UTC
*** Bug 11124 has been marked as a duplicate of this bug. ***
Comment 5 Zhang Rui 2008-07-20 19:45:38 UTC
Well, I have a power analyzer, but unfortunately I can not reproduce it on
1. a HP 6530 laptop, which is Core 2 Duo + ICH9.
2. another GM965/ICH8 laptop, which is similar to HP 2510P.
Comment 6 Daniel Würfel 2008-07-21 10:31:03 UTC
Thanks for your reply and tests.
First i did a wrong entry filling out the bug report form. 
"Latest working kernel version" is not the kernel 2.6.25. The problem, i have
discribed, you can find in this kernel(2.6.25) too. I apologize for this mistake. I wrote this in the duplicated  "Bug 11124".
What power usage you measure if you run your laptop in AC mode with the power analyzer (darkest backlight, idle desktop)? I measure 23 W after reboot or suspend to disk. After a suspend to ram the power usage reduce to 18 W (Yes,I know, you cannot compare an intel core2 duo laptop with an amd turion x2, but i'm interesting in.)
Have you the possibility to test another laptop from an older series like 6530b (for example a 6510b or even a 6515b). I see, the 6530b seems to be a very new laptop. The 6515b and the 2510p seems to have an older BIOS.
Pherhaps it is not a linux than a BIOS problem. I think, if i resume from s2r the BIOS will not be loaded. Only while resuming from suspend to disk or while rebooting the BIOS is loaded.   
Comment 7 Adrian Bunk 2008-07-21 12:36:00 UTC
*** Bug 11124 has been marked as a duplicate of this bug. ***
Comment 8 Shaohua 2008-07-22 23:35:24 UTC
Is there any difference about C-state/P-state time in powertop before/after a resume?
Comment 9 Daniel Würfel 2008-07-23 23:26:19 UTC
No differences.
Powertop tells me that C-States are not available (because powertop is an intel tool and i have an AMD Turion X2?) The P-States(frequences) are equal before/after S2R:
800 MHz        100%
1600 MHz         0%
1800 MHz         0%
1900 MHz         0%
Comment 10 Daniel Würfel 2008-11-09 10:57:25 UTC
Good news. 
Today i tired the new kernel 2.6.27. 
With this kernel the laptops runs with the same low power usage after reboot or suspend2disk like after a suspend2ram. The tickless timer works too.
For me the problem is fixed.
What is the reason for the high power usage in 2.6.25 and the low usage in 2.6.27?
Comment 11 Zhang Rui 2008-11-09 18:36:55 UTC
i have no idea.

>1. boot linux on a 6715b -> high power
>2. initialize s2r
>3. resume from s2r -> low power usage
>4. initialize s2d and resume -> high power usage
this is really weird.

good news is that we have fixed this issue in 2.6.27.
in order to get the root cause of this issue, you can run git-bisect to see which commit fixes this problem.

cc rafael.
Comment 12 mithrandir 2009-10-08 21:39:05 UTC
I am experiencing the same problem with a Dell Precision M65 and 2.6.31 kernel. There is nothing strange in dmesg output. Since I use s2ram frequently I don´t know with which kernel version this happened the first time for me.

Jürgen