Bug 59368 - [snb rc6] rc6 is not happening reliably
Summary: [snb rc6] rc6 is not happening reliably
Status: CLOSED FIXED
Alias: None
Product: DRI
Classification: Unclassified
Component: DRM/Intel (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Intel GFX Bugs mailing list
QA Contact: Intel GFX Bugs mailing list
URL:
Whiteboard:
Keywords:
: 57677 (view as bug list)
Depends on:
Blocks:
 
Reported: 2013-01-14 17:07 UTC by Andy Lutomirski
Modified: 2017-07-24 22:59 UTC (History)
4 users (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Andy Lutomirski 2013-01-14 17:07:18 UTC
This is probably related to bug 51739 and bug 53393.

On my Lenovo X220s (Sandy bridge, 00:02.0 VGA compatible controller [0300]: Intel Corporation 2nd Generation Core Processor Family Integrated Graphics Controller [8086:0126] (rev 09)), I often end up in full power mode, even when idle at the gnome 3 desktop.  I've seen this on Fedora 17 with various 3.6 and 3.7 kernels.  i915_enable_rc6=7 has no effect.

When the problem is happening, i915_drpc_info looks like:

RC information accurate: yes
Video Turbo Mode: yes
HW control enabled: yes
SW control enabled: no
RC1e Enabled: no
RC6 Enabled: yes
Deep RC6 Enabled: no
Deepest RC6 Enabled: no
Current RC state: on
Core Power Down: no
RC6 "Locked to RPn" residency since boot: 0
RC6 residency since boot: 121924
RC6+ residency since boot: 0
RC6++ residency since boot: 0

sysfs_rc6_residency fails.  The RC6 residency since boot: 121924 number doesn't change at all, so presumably the chip is just stuck at full power instead of flipping in and out of rc6.

The only strange kernel options I have are pcie_aspm=force pcie_aspm.policy=powersave, which are mostly a relic from when the kernel misinterpreted the BIOS lack of support for OS ASPM control.
Comment 1 Daniel Vetter 2013-01-22 11:56:42 UTC
Can you please retest with latest drm-intel-fixes?
Comment 2 Andy Lutomirski 2013-03-06 17:37:53 UTC
Sorry for the absurd delay.  3.8.1 has the same problem.  Is there a git tree I should try?
Comment 3 Daniel Vetter 2013-03-06 17:45:49 UTC
3.9-rc1 has pretty much all drm/i915 patches, so retesting that might be worth a shot. But tbh we haven't really gained any clue at all as to why rc6 doesn't work too well on snb sometimes :(
Comment 4 Andy Lutomirski 2013-03-06 19:50:39 UTC
Is it worth trying to detect the problem and resetting something (the RC6 registers? toggling between SW and HW control?) when it happens?
Comment 5 Daniel Vetter 2013-03-20 12:00:08 UTC
*** Bug 57677 has been marked as a duplicate of this bug. ***
Comment 6 Jesse Barnes 2013-03-28 20:04:19 UTC
When this happens, can you try:
 $ intel_reg_write 0xa094 0xf0000
and then check the RC6 residency counters again?

If idle, that's *supposed* to force us into RC6.
Comment 7 Andy Lutomirski 2013-04-08 17:19:06 UTC
[luto@antithesis tools]$ sudo cat /sys/kernel/debug/dri/0/i915_drpc_info
RC information accurate: yes
Video Turbo Mode: yes
HW control enabled: yes
SW control enabled: no
RC1e Enabled: no
RC6 Enabled: yes
Deep RC6 Enabled: no
Deepest RC6 Enabled: no
Current RC state: on
Core Power Down: no
RC6 "Locked to RPn" residency since boot: 0
RC6 residency since boot: 115522
RC6+ residency since boot: 0
RC6++ residency since boot: 0
RC6   voltage: 450mV
RC6+  voltage: 245mV
RC6++ voltage: 245mV
[luto@antithesis tools]$ sudo intel_reg_read 0xa094
Couldn't map MMIO region: No such file or directory
[luto@antithesis tools]$ ^Cdo intel_reg_read 0xa094
(reverse-i-search)`': ^C
[luto@antithesis tools]$ sudo intel_reg_write 0xa094 0xf0000
Couldn't map MMIO region: No such file or directory
[luto@antithesis tools]$ sudo intel_reg_write 0xa094 0xf000^C
$ sudo ./intel_reg_read 0xa094
0xA094 : 0x0
$ sudo ./intel_reg_write 0xa094 0xf0000
Value before: 0x0
Value after: 0x70000
$ sudo ./intel_reg_read 0xa094
0xA094 : 0x70000
$ sudo cat /sys/kernel/debug/dri/0/i915_drpc_info
RC information accurate: yes
Video Turbo Mode: yes
HW control enabled: yes
SW control enabled: no
RC1e Enabled: no
RC6 Enabled: yes
Deep RC6 Enabled: no
Deepest RC6 Enabled: no
Current RC state: on
Core Power Down: no
RC6 "Locked to RPn" residency since boot: 0
RC6 residency since boot: 115522
RC6+ residency since boot: 0
RC6++ residency since boot: 0
RC6   voltage: 450mV
RC6+  voltage: 245mV
RC6++ voltage: 245mV

Are you sure that's the right register?

(Can you point me to the right section of the programming manual?  I tried awhile ago but I couldn't find it.)
Comment 8 Chris Wilson 2013-06-12 09:31:35 UTC
Can you please try with this patch: https://patchwork.kernel.org/patch/2707341/ as it claims to fix some instability with rc6 on SandyBridge?
Comment 9 Rui Tiago Matos 2013-06-12 16:00:50 UTC
(In reply to comment #8)
> Can you please try with this patch:
> https://patchwork.kernel.org/patch/2707341/ as it claims to fix some
> instability with rc6 on SandyBridge?

Did a local build with this patch on top of fedora's kernel-3.9.5-201.fc18.x86_64 and if anything, this makes it more likely to happen on my laptop, a thinkpad X220.

A possibly interesting data point is that this seems more likely to happen when I do a suspend cycle with the laptop docked.
Comment 10 Chris Wilson 2013-07-16 15:41:58 UTC
We have a lead for rc6 issues after suspend... Hopefully that patch will be ready for stable@ shortly.
Comment 11 Daniel Vetter 2013-07-16 16:07:41 UTC
(In reply to comment #10)
> We have a lead for rc6 issues after suspend... Hopefully that patch will be
> ready for stable@ shortly.

I.e. please test this patch and report what happens:

https://patchwork.kernel.org/patch/2827634/

Thanks, Daniel
Comment 12 Chris Wilson 2013-07-17 11:26:36 UTC
Can you please test with drm-intel-fixes, in particular

commit 7dcd2677ea912573d9ed4bcd629b0023b2d11505
Author: Konstantin Khlebnikov <khlebnikov@openvz.org>
Date:   Wed Jul 17 10:22:58 2013 +0400

    drm/i915: fix long-standing SNB regression in power consumption after resume
Comment 13 Andy Lutomirski 2013-07-17 17:25:27 UTC
I ran https://patchwork.kernel.org/patch/2707341/ for a day without triggering the problem.  I'm building the newer version now.
Comment 14 Daniel Vetter 2013-07-18 10:24:00 UTC
I'll declare this resolved now, please reopen if the latest patch doesn't work for you.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.