You are not logged in.

#201 2012-11-30 04:01:10

the_joker
Member
Registered: 2012-10-12
Posts: 8

Re: Kernel 3.6.2 Power Regressions (Sandy Bridge)

Hi all,

as many of the fellow user's im also not upgrading to the latest stnd ARCH kernel versions.

currently i am running on:

[11:42][*******@******] ~ (10.192.77.46|%0|!2091|21)
$ uname -a
Linux ******** 3.5.6-1-ARCH #1 SMP PREEMPT Sun Oct 7 19:30:49 CEST 2012 x86_64 GNU/Linux

and Im waiting for a solution. the previus mentioned links for this topic on the Kernel mailing list:
https://bugzilla.kernel.org/show_bug.cgi?id=48721#c15

are still not updating anything on this topic, since 21.11.2012.

is there anything going on? that i might have missed? with 3.7 on a "test Laptop" patched i didnt got the problem but I dont want to update all of my notebooks for this with a specifically prepared kernel.

anything new?

thanks in advance.

the_joker

Offline

#202 2012-12-01 08:28:52

ywarlock
Member
Registered: 2012-03-09
Posts: 5

Re: Kernel 3.6.2 Power Regressions (Sandy Bridge)

I have had this issue for a month, and didn't know how to patch a kernel. So at first, I used my X220 with the battery off, so that the CPU keep at 800MHz with a 65W AC adapter. But it was not safe for my data.

Then I downgraded the kernel using "downgrade" in AUR. It's really useful, but you might need to know the package vision wich have a dependence of the kernel(such as tp_smapi, linux-headers).

Then I find that there is a long-time-support vision kernel in the repo, the package name is linux-lts (and linux-headers-lts). In addition, you may want to install tp_smapi-lts if you need. This package will generate  vmlinuz-linux-lts and initramfs-linux-lts.img (correct me if I'm wrong, cos I have removed the "lts" in the name), so you need to change your grub setting( sorry I don't know how, I simply change the name of that two file).

Now I am using the linux-lts, and waiting for the bug being fixed.

This is the output of "uname -a" using linux-lts
Linux X 3.0.51-1-lts #1 SMP Mon Nov 5 11:54:31 CET 2012 x86_64 GNU/Linux

Last edited by ywarlock (2012-12-01 08:31:30)

Offline

#203 2012-12-01 12:03:40

Rolinh
Member
From: Switzerland
Registered: 2011-05-07
Posts: 144
Website

Re: Kernel 3.6.2 Power Regressions (Sandy Bridge)

KaiSforza wrote:

I get similart numbers on a cold boot. I forgot to mention that it takes a suspend-resume cycle for it to all work and get normal temps/power usage.

(And thanks for trying it out.)

Also, might I ask for a powertop output if you try again, to see the cpu frequencies?

So: as you said, after a suspend-resume cycle, temperatures seem OK:

thinkpad-isa-0000
Adapter: ISA adapter
fan1:        1984 RPM

acpitz-virtual-0
Adapter: Virtual device
temp1:        +44.0°C  (crit = +98.0°C)

coretemp-isa-0000
Adapter: ISA adapter
Physical id 0:  +45.0°C  (high = +86.0°C, crit = +100.0°C)
Core 0:         +41.0°C  (high = +86.0°C, crit = +100.0°C)
Core 1:         +43.0°C  (high = +86.0°C, crit = +100.0°C)

jc42-i2c-6-19
Adapter: SMBus I801 adapter at efa0
temp1:        +36.8°C  (low  =  +0.0°C)                  ALARM (HIGH, CRIT)
                       (high =  +0.0°C, hyst =  +0.0°C)
                       (crit =  +0.0°C, hyst =  +0.0°C)

However, this seems not so perfect yet:

Device Power Report

Usage	Device name
12.5%	CPU use
1993 rpm	Laptop fan
237.6 ops/s	GPU
100.0%	Audio codec alsa:hwC0D0: thinkpad (Conexant)
100.0%	USB device: usb-device-8087-0024
100.0%	USB device: EHCI Host Controller
100.0%	USB device: Integrated Camera (Chicony Electronics Co., Ltd.)
100.0%	Radio device: iwlwifi
93.3%	Display backlight
80.4%	Display backlight
26.6 pkts/s	Network interface: wlan0 (iwlwifi)
100.0%	PCI Device: Intel Corporation 6 Series/C200 Series Chipset Family High Definition Audio Controller
100.0%	PCI Device: Ricoh Co Ltd PCIe SDXC/MMC Host Controller
100.0%	PCI Device: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 2
100.0%	PCI Device: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 5
100.0%	PCI Device: Intel Corporation 6 Series/C200 Series Chipset Family USB Enhanced Host Controller #1
100.0%	PCI Device: Intel Corporation QM67 Express Chipset Family LPC Controller
100.0%	PCI Device: Intel Corporation 6 Series/C200 Series Chipset Family 6 port SATA AHCI Controller
100.0%	PCI Device: Intel Corporation 6 Series/C200 Series Chipset Family SMBus Controller
100.0%	PCI Device: Intel Corporation Centrino Advanced-N 6205 [Taylor Peak]
100.0%	PCI Device: Intel Corporation 6 Series/C200 Series Chipset Family USB Enhanced Host Controller #2
100.0%	PCI Device: Intel Corporation 6 Series/C200 Series Chipset Family KT Controller
100.0%	PCI Device: Intel Corporation 6 Series/C200 Series Chipset Family MEI Controller #1
100.0%	PCI Device: Intel Corporation 2nd Generation Core Processor Family Integrated Graphics Controller
100.0%	USB device: EHCI Host Controller
100.0%	USB device: usb-device-8087-0024
0.0%	PCI Device: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 1
0.0%	PCI Device: Intel Corporation 82579LM Gigabit Network Connection
0.0 pkts/s	Network interface: eth0 (e1000e)
0.0%	Thinkpad light

And here for the CPU frequencies:

Processor frequency report

Package	 	 Core	 	 CPU 0	 CPU 1
 			 	Actual	 853 MHz	 910 MHz
Turbo Mode	 2.7%	 	Turbo Mode	 2.7%	 	Turbo Mode	 2.7%	 0.3%
2.71 GHz	 0.0%	 	2.71 GHz	 0.0%	 	2.71 GHz	 0.0%	 0.0%
2.40 GHz	 0.0%	 	2.40 GHz	 0.0%	 	2.40 GHz	 0.0%	 0.0%
2.21 GHz	 0.0%	 	2.21 GHz	 0.0%	 	2.21 GHz	 0.0%	 0.0%
2.00 GHz	 0.0%	 	2.00 GHz	 0.0%	 	2.00 GHz	 0.0%	 0.0%
1.80 GHz	 0.0%	 	1.80 GHz	 0.0%	 	1.80 GHz	 0.0%	 0.0%
1.60 GHz	 0.0%	 	1.60 GHz	 0.0%	 	1.60 GHz	 0.0%	 0.0%
1400 MHz	 0.0%	 	1400 MHz	 0.0%	 	1400 MHz	 0.0%	 0.0%
1200 MHz	 0.1%	 	1200 MHz	 0.1%	 	1200 MHz	 0.1%	 0.0%
1000 MHz	 0.1%	 	1000 MHz	 0.1%	 	1000 MHz	 0.1%	 0.0%
800 MHz	 51.1%	 	 800 MHz	 51.1%	 	 800 MHz	 50.5%	 2.4%
Idle	 46.0%	 	Idle	 46.0%	 	Idle	 46.6%	 97.3%
 	 	 Core	 	 CPU 2	 CPU 3
 	 			 	Actual	 851 MHz	 869 MHz
 	 	Turbo Mode	 1.8%	 	Turbo Mode	 1.7%	 0.2%
 	 	2.71 GHz	 0.0%	 	2.71 GHz	 0.0%	 0.0%
 	 	2.40 GHz	 0.0%	 	2.40 GHz	 0.0%	 0.0%
 	 	2.21 GHz	 0.0%	 	2.21 GHz	 0.0%	 0.0%
 	 	2.00 GHz	 0.0%	 	2.00 GHz	 0.0%	 0.0%
 	 	1.80 GHz	 0.0%	 	1.80 GHz	 0.0%	 0.0%
 	 	1.60 GHz	 0.0%	 	1.60 GHz	 0.0%	 0.0%
 	 	1400 MHz	 0.0%	 	1400 MHz	 0.0%	 0.0%
 	 	1200 MHz	 0.0%	 	1200 MHz	 0.0%	 0.0%
 	 	1000 MHz	 0.0%	 	1000 MHz	 0.0%	 0.0%
 	 	 800 MHz	 15.3%	 	 800 MHz	 14.3%	 1.6%
 	 	Idle	 82.9%	 	Idle	 84.0%	 98.2%

Offline

#204 2012-12-02 22:13:18

thesofty
Member
From: Nuremberg, Germany
Registered: 2011-05-09
Posts: 46

Re: Kernel 3.6.2 Power Regressions (Sandy Bridge)

As previously mentioned, the msleep-patch, shown in this thread does not solve the 20W-problem completely. After suspend-resume, the GPU seems to switch into the rc6-mode correctly. but after reboot, the GPU often keeps 100% in the active mode.
Well, I've played around with the msleep-patch a little bit and did a slight modification:
Additionally to the msleep in the file i915_suspend.c I found a similar code snippet in the module intel_pm.c which is apparently responsible for the power management initialization of the i915 driver.
I made a patched kernel, based on 3.6.7 on my lenovo X1. And what should I say: it seems that I don't have the 20W-problem anymore. Up to now, I tried it with around 10 boots of my system wink.

Here is the modified patch for anybody how wants to test it.

diff -aur linux-3.6.pristine/drivers/gpu/drm/i915/i915_suspend.c linux-3.6.new/drivers/gpu/drm/i915/i915_suspend.c
--- linux-3.6.pristine/drivers/gpu/drm/i915/i915_suspend.c	2012-10-01 01:47:46.000000000 +0200
+++ linux-3.6.new/drivers/gpu/drm/i915/i915_suspend.c	2012-11-26 16:44:40.706766499 +0100
@@ -877,6 +877,8 @@
 		I915_WRITE(IMR, dev_priv->saveIMR);
 	}
 
+	msleep(10);
+
 	/* Cache mode state */
 	I915_WRITE(CACHE_MODE_0, dev_priv->saveCACHE_MODE_0 | 0xffff0000);
 
Only in linux-3.6.new/drivers/gpu/drm/i915: .i915_suspend.c.swp
diff -aur linux-3.6.pristine/drivers/gpu/drm/i915/intel_pm.c linux-3.6.new/drivers/gpu/drm/i915/intel_pm.c
--- linux-3.6.pristine/drivers/gpu/drm/i915/intel_pm.c	2012-10-01 01:47:46.000000000 +0200
+++ linux-3.6.new/drivers/gpu/drm/i915/intel_pm.c	2012-11-26 16:54:48.340168250 +0100
@@ -3328,6 +3328,8 @@
 	I915_WRITE(WM2_LP_ILK, 0);
 	I915_WRITE(WM1_LP_ILK, 0);
 
+	msleep(10);
+
 	I915_WRITE(CACHE_MODE_0,
 		   _MASKED_BIT_DISABLE(CM0_STC_EVICT_DISABLE_LRA_SNB));

Last edited by thesofty (2012-12-02 22:19:15)

Offline

#205 2012-12-03 01:58:15

hendry
Member
From: Singapore
Registered: 2009-09-08
Posts: 157
Website

Re: Kernel 3.6.2 Power Regressions (Sandy Bridge)

Stupid question: How does a micro sleep stop my Sandy Bridge burning up?

Offline

#206 2012-12-03 05:23:53

The Compiler
Member
From: Switzerland
Registered: 2011-05-01
Posts: 214
Website

Re: Kernel 3.6.2 Power Regressions (Sandy Bridge)

@hendry: It's probably some kind of race condition. Just sleeping for a bit is a hack to solve these, but not a very elegant one.

Some nicer hack will be included in 3.7: Freedesktop bug


>>> from __future__ import braces
  File "<stdin>", line 1
SyntaxError: not a chance

Offline

#207 2012-12-03 20:34:43

donniezazen
Member
From: Salt Lake City
Registered: 2011-06-24
Posts: 671
Website

Re: Kernel 3.6.2 Power Regressions (Sandy Bridge)

@Rolinh Wow!! your system temperature is 45C. My system runs around 55C. What is your setup - system config and DE/WM?

Offline

#208 2012-12-03 21:39:24

Rolinh
Member
From: Switzerland
Registered: 2011-05-07
Posts: 144
Website

Re: Kernel 3.6.2 Power Regressions (Sandy Bridge)

@donniezazen
This is my setup:

Kernel Version	Linux version 3.7.0-2-rc7-mainline (wgiokas@WST420) (gcc version 4.7.2 (GCC) ) #1 SMP PREEMPT Wed Nov 28 13:18:11 CST 2012
System Name	LENOVO 4238A71 ThinkPad T420
CPU Information	4x Intel(R) Core(TM) i7-2620M CPU @ 2.70GHz

So those temperatures were measured using kernel 3.7.0-rc7 with the patch. They're pretty similar to those I can get while running kernel 3.5.6.
Those are the temperatures I get using KDE. Using Awesome WM, it is usually around 38-42°C. Apart from that, my setup has nothing special.

Offline

#209 2012-12-03 22:33:53

donniezazen
Member
From: Salt Lake City
Registered: 2011-06-24
Posts: 671
Website

Re: Kernel 3.6.2 Power Regressions (Sandy Bridge)

@Rolinh I have got the same system but for some reason my system lingers around 50C even when I ran Awesome WM. It's around 55-60C on Gnome.

Offline

#210 2012-12-03 23:49:51

KaiSforza
Member
Registered: 2012-04-22
Posts: 133
Website

Re: Kernel 3.6.2 Power Regressions (Sandy Bridge)

I just updated my repository with rc8, and I just booted twice with no power issues. This is using thesofty's modified patch. My pkgbuild is in my git repository if you want to customize your kernel.

Thanks

Last edited by KaiSforza (2012-12-03 23:50:44)


Thinkpad T420 | Intel 3000 | systemd {,--user}
PKGBUILDs I use | pywer AUR helper

Offline

#211 2012-12-04 22:12:25

hurrrtin
Member
From: USA, Ohio
Registered: 2006-12-13
Posts: 17

Re: Kernel 3.6.2 Power Regressions (Sandy Bridge)

thesofty wrote:

As previously mentioned, the msleep-patch, shown in this thread does not solve the 20W-problem completely. After suspend-resume, the GPU seems to switch into the rc6-mode correctly. but after reboot, the GPU often keeps 100% in the active mode.
Well, I've played around with the msleep-patch a little bit and did a slight modification:
Additionally to the msleep in the file i915_suspend.c I found a similar code snippet in the module intel_pm.c which is apparently responsible for the power management initialization of the i915 driver.
I made a patched kernel, based on 3.6.7 on my lenovo X1. And what should I say: it seems that I don't have the 20W-problem anymore. Up to now, I tried it with around 10 boots of my system wink.

Here is the modified patch for anybody how wants to test it.

diff -aur linux-3.6.pristine/drivers/gpu/drm/i915/i915_suspend.c linux-3.6.new/drivers/gpu/drm/i915/i915_suspend.c
--- linux-3.6.pristine/drivers/gpu/drm/i915/i915_suspend.c	2012-10-01 01:47:46.000000000 +0200
+++ linux-3.6.new/drivers/gpu/drm/i915/i915_suspend.c	2012-11-26 16:44:40.706766499 +0100
@@ -877,6 +877,8 @@
 		I915_WRITE(IMR, dev_priv->saveIMR);
 	}
 
+	msleep(10);
+
 	/* Cache mode state */
 	I915_WRITE(CACHE_MODE_0, dev_priv->saveCACHE_MODE_0 | 0xffff0000);
 
Only in linux-3.6.new/drivers/gpu/drm/i915: .i915_suspend.c.swp
diff -aur linux-3.6.pristine/drivers/gpu/drm/i915/intel_pm.c linux-3.6.new/drivers/gpu/drm/i915/intel_pm.c
--- linux-3.6.pristine/drivers/gpu/drm/i915/intel_pm.c	2012-10-01 01:47:46.000000000 +0200
+++ linux-3.6.new/drivers/gpu/drm/i915/intel_pm.c	2012-11-26 16:54:48.340168250 +0100
@@ -3328,6 +3328,8 @@
 	I915_WRITE(WM2_LP_ILK, 0);
 	I915_WRITE(WM1_LP_ILK, 0);
 
+	msleep(10);
+
 	I915_WRITE(CACHE_MODE_0,
 		   _MASKED_BIT_DISABLE(CM0_STC_EVICT_DISABLE_LRA_SNB));


I can confirm this patch worked for me using 3.6.8 x86_64 on my Dell L702X XPS 17 laptop. Thanks!!

Offline

#212 2012-12-05 01:18:21

Hspasta
Member
Registered: 2011-12-24
Posts: 189
Website

Re: Kernel 3.6.2 Power Regressions (Sandy Bridge)

KaiSforza wrote:

I just updated my repository with rc8, and I just booted twice with no power issues. This is using thesofty's modified patch. My pkgbuild is in my git repository if you want to customize your kernel.

Thanks

Really appreciate your efforts. Trying out your linux-mainline package. Seems fine after a suspend. Looks really promising!

Offline

#213 2012-12-09 20:54:38

Schrottfresse
Member
Registered: 2012-04-04
Posts: 14

Re: Kernel 3.6.2 Power Regressions (Sandy Bridge)

Has anyone tested kernel 3.6.9-1? Any change?

Offline

#214 2012-12-10 12:09:06

Rolinh
Member
From: Switzerland
Registered: 2011-05-07
Posts: 144
Website

Re: Kernel 3.6.2 Power Regressions (Sandy Bridge)

Phoronix is mentioning this power regression in a recent article.

Offline

#215 2012-12-10 13:22:51

pyropirat
Member
From: Germany
Registered: 2012-10-22
Posts: 7

Re: Kernel 3.6.2 Power Regressions (Sandy Bridge)

Tried 3.6.9-1 yesterday, sill no changes. Reboot and back to 25W.
ATM im compiling actual 3.7 rc8 mainline kernel. I will report the result.

Offline

#216 2012-12-10 18:03:11

KaiSforza
Member
Registered: 2012-04-22
Posts: 133
Website

Re: Kernel 3.6.2 Power Regressions (Sandy Bridge)

pyropirat wrote:

Tried 3.6.9-1 yesterday, sill no changes. Reboot and back to 25W.
ATM im compiling actual 3.7 rc8 mainline kernel. I will report the result.

If you have the time, try it with and without the patch mentioned here. My repo (mentioned below) has a patched version if you want to test that out without compiling.


Thinkpad T420 | Intel 3000 | systemd {,--user}
PKGBUILDs I use | pywer AUR helper

Offline

#217 2012-12-10 18:42:22

donniezazen
Member
From: Salt Lake City
Registered: 2011-06-24
Posts: 671
Website

Re: Kernel 3.6.2 Power Regressions (Sandy Bridge)

@Kaiforza the mainline package in AUR doesn't have uvcvidoe module. Do you have uvcvideo module for camera support in you package? Thanks.

Offline

#218 2012-12-10 18:51:34

pyropirat
Member
From: Germany
Registered: 2012-10-22
Posts: 7

Re: Kernel 3.6.2 Power Regressions (Sandy Bridge)

@donniezazen Cant answer your question for Kaiforza's package, but when the new kernel fixes our issue, i think i will provide a build tarball. ATM still compiling, battery got empty earlier

Last edited by pyropirat (2012-12-10 18:52:10)

Offline

#219 2012-12-10 19:28:14

KaiSforza
Member
Registered: 2012-04-22
Posts: 133
Website

Re: Kernel 3.6.2 Power Regressions (Sandy Bridge)

donniezazen wrote:

@Kaiforza the mainline package in AUR doesn't have uvcvidoe module. Do you have uvcvideo module for camera support in you package? Thanks.

Ah. I'll recompile it soon for the next release. Thanks.

EDIT: I just tested out my webcam and it doesn't work. recompiling now. I'll upload it asap.

Last edited by KaiSforza (2012-12-10 19:41:35)


Thinkpad T420 | Intel 3000 | systemd {,--user}
PKGBUILDs I use | pywer AUR helper

Offline

#220 2012-12-10 19:59:13

pyropirat
Member
From: Germany
Registered: 2012-10-22
Posts: 7

Re: Kernel 3.6.2 Power Regressions (Sandy Bridge)

Sill no luck with 3.7 rc8 mainline so far. Now i'm compiling the patched version. lets see what the future brings

Offline

#221 2012-12-10 21:14:50

donniezazen
Member
From: Salt Lake City
Registered: 2011-06-24
Posts: 671
Website

Re: Kernel 3.6.2 Power Regressions (Sandy Bridge)

KaiSforza wrote:
donniezazen wrote:

@Kaiforza the mainline package in AUR doesn't have uvcvidoe module. Do you have uvcvideo module for camera support in you package? Thanks.

Ah. I'll recompile it soon for the next release. Thanks.

EDIT: I just tested out my webcam and it doesn't work. recompiling now. I'll upload it asap.

Thanks, your repo seems to be down.

Just wanted to confirm once its online it will be accessible using following

[wgiokad]
Server = http://sakuscans.com/pacmanpkg/x86_64/

Offline

#222 2012-12-10 21:27:17

pyropirat
Member
From: Germany
Registered: 2012-10-22
Posts: 7

Re: Kernel 3.6.2 Power Regressions (Sandy Bridge)

So the kernel is patched and working for 4 reboots with 5 suspend each. i also enabled the uvc modules in the kernel config.
I made a build tarball from this (LINK)

Last edited by pyropirat (2012-12-10 21:39:47)

Offline

#223 2012-12-11 05:12:37

KaiSforza
Member
Registered: 2012-04-22
Posts: 133
Website

Re: Kernel 3.6.2 Power Regressions (Sandy Bridge)

donniezazen wrote:
KaiSforza wrote:
donniezazen wrote:

@Kaiforza the mainline package in AUR doesn't have uvcvidoe module. Do you have uvcvideo module for camera support in you package? Thanks.

Ah. I'll recompile it soon for the next release. Thanks.

EDIT: I just tested out my webcam and it doesn't work. recompiling now. I'll upload it asap.

Thanks, your repo seems to be down.

Just wanted to confirm once its online it will be accessible using following

[wgiokad]
Server = http://sakuscans.com/pacmanpkg/x86_64/

[wgiokas]. :)


Thinkpad T420 | Intel 3000 | systemd {,--user}
PKGBUILDs I use | pywer AUR helper

Offline

#224 2012-12-11 06:21:48

KaiSforza
Member
Registered: 2012-04-22
Posts: 133
Website

Re: Kernel 3.6.2 Power Regressions (Sandy Bridge)

So for the new -mainline package (till 3.8-rc1 is released), if you're using my repo, you'll have to 'downgrade,' because 3.7 is less than 3.7.rc8. Sorry for the inconvenience. (I'll edit this once I've uploaded.)

EDIT: Going to wait to upload 3.8-rc1. Probably next Monday. The patch and everything are in my git repo if you want to grab that. People with non-intel graphics and cpu's will need to tweak the configs, but other than that it should be ready to go.

Last edited by KaiSforza (2012-12-11 07:37:12)


Thinkpad T420 | Intel 3000 | systemd {,--user}
PKGBUILDs I use | pywer AUR helper

Offline

#225 2012-12-13 19:11:58

foxxx0
Package Maintainer (PM)
From: libera#archlinux-de
Registered: 2012-12-13
Posts: 4

Re: Kernel 3.6.2 Power Regressions (Sandy Bridge)

Hey guys,

just tried out arch linux for the first time and i'm quite happy so far. Quite soon I got really annoyed by that power regression bug in the current core repo kernel so I tried different things with laptop-mode-tools, tlp, cpupower, etc.
At one point I got the cpu scaling to work and got the idle power consumption down to ~9W. But after resuming from suspend that wasn't working anymore.

Just some moments away from compiling my own kernel I discovered this thread and your linux-mainline repo KaiSforza. Right now I want to thank you for your great work. Your kernel is running really smooth, even if I can't get the power consumption to below 11W, but it's way better than the core repo one.

If I got some spare time this weekend I'll try using the mentioned patch myself and compile some different kernel-versions. I'll let you know about my results wink

Last edited by foxxx0 (2012-12-13 19:14:24)


There are 10 types of people, those who understand binary and those who don't.

Offline

Board footer

Powered by FluxBB