Bug 98979 - [i915][HSW][PM] Unable to use GFX RC6 on Dell Precision M6800
Summary: [i915][HSW][PM] Unable to use GFX RC6 on Dell Precision M6800
Status: RESOLVED WORKSFORME
Alias: None
Product: DRI
Classification: Unclassified
Component: DRM/iGVT-g (show other bugs)
Version: unspecified
Hardware: x86-64 (AMD64) Linux (All)
: medium major
Assignee: Shawn Starr
QA Contact: Terrence Xu
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-12-03 02:25 UTC by Shawn Starr
Modified: 2017-07-14 02:36 UTC (History)
3 users (show)

See Also:
i915 platform: HSW
i915 features: power/Other


Attachments
Kernel boot with drm debug 0x2 flags (91.68 KB, text/plain)
2016-12-03 02:26 UTC, Shawn Starr
no flags Details

Description Shawn Starr 2016-12-03 02:25:25 UTC
Using the following kernel options:

BOOT_IMAGE=/boot/vmlinuz-4.9.0-rc7+ root=UUID=f834b05c-55f3-407b-9a63-fc6b04d4c845 ro rhgb slub_debug=- cgroup_disable=memory console=tty0 console=ttyUSB0,9600n8 nmi_watchdog=0 audit=0 amdgpu.gartsize=8192 amdgpu.vm_size=16 amdgpu.powerplay=1 amdgpu.exp_hw_support=1 rd.driver.blacklist=radeon [video=eDP-1:d video=VGA-1:e] resume=/dev/sda7 intel_iommu=igfx_off

the driver will not turn on RC6 GFX power saving state(s).

I've attached kernel dmesg with driver debug output.


Tests done:

1) Run w/o any video= options, same result
2) Disable Intel AMT completely, same result
3) Force RC6, does not enable in driver.

Kernel: Dec 1st build, Linux 4.9-rc7 + drm-next-4.10-wip merged in for AMDGPU (hybrid graphics use).

Powertop / turbostat -d show no GFX stats reported.
Comment 1 Shawn Starr 2016-12-03 02:26:40 UTC
Created attachment 128313 [details]
Kernel boot with drm debug 0x2 flags

Kernel boot with drm debug 0x2 flags
Comment 2 Shawn Starr 2016-12-03 05:35:55 UTC
Playing around further, 

I disabled the i915 support for CONFIG_DRM_I915_GVT and rebuilt kernel with today's Dec 3rd code + drm-next-4.10-wip from AMD folks.

I see GFX* stats

Result:

    Core     CPU Avg_MHz   Busy% Bzy_MHz TSC_MHz     IRQ     SMI  CPU%c1  CPU%c3  CPU%c6  CPU%c7 CoreTmp  PkgTmp GFX%rc6  GFXMHz Pkg%pc2 Pkg%pc3 Pkg%pc6 Pkg%pc7 PkgWatt CorWatt GFXWatt                                                                                                                                             
       -       -       4    0.39     960    2893     382       8    0.64    0.00    0.00   98.97      48      49   99.65     450   93.08    0.95    2.49    0.00    3.54    0.02    0.00                                                                                                                                             
       0       0       1    0.15     926    2893      28       1    1.15    0.01    0.00   98.69      44      49   99.65     450   93.08    0.95    2.49    0.00    3.54    0.02    0.00                                                                                                                                                   
       0       4      11    1.07    1054    2893      85       1    0.23                                                                                           
       1       1       1    0.09    1006    2893      41       1    1.57    0.00    0.00   98.35      46                                                           
       1       5       8    0.93     886    2893      93       1    0.72                                                                                           
       2       2       1    0.08    1005    2893       9       1    0.70    0.00    0.00   99.22      46                                                               
       2       6       4    0.44     938    2893      51       1    0.34                                                                                               
       3       3       1    0.12     905    2893      34       1    0.26    0.00    0.00   99.62      48                                                               
       3       7       2    0.21     883    2893      41       1    0.17     


Same for powertop


PowerTOP 2.8      Overview   Idle stats   Frequency stats   Device stats   Tunables                                     


          Package   |             Core    |            CPU 0       CPU 4
                    |                     | C0 active   0.0%        0.2%
                    |                     | POLL        0.0%    0.0 ms  0.0%    0.0 ms
                    |                     | C1E-HSW     0.0%    0.0 ms  0.0%    0.0 ms
C2 (pc2)   72.5%    |                     |
C3 (pc3)    0.8%    | C3 (cc3)    0.0%    | C3-HSW      0.0%    0.0 ms  0.0%    0.0 ms
C6 (pc6)    1.9%    | C6 (cc6)    0.0%    | C6-HSW      0.0%    0.0 ms  0.0%    0.0 ms
C7 (pc7)    0.0%    | C7 (cc7)   76.6%    | C7s-HSW    76.7%   64.5 ms 99.1%  166.8 ms

                    |             Core    |            CPU 1       CPU 5
                    |                     | C0 active   0.0%        0.9%
                    |                     | POLL        0.0%    0.0 ms  0.0%    0.0 ms
                    |                     | C1E-HSW     0.0%    0.0 ms  0.0%    0.0 ms
                    |                     |
                    | C3 (cc3)    0.4%    | C3-HSW      0.0%    0.0 ms  0.4%    2.0 ms
                    | C6 (cc6)    0.0%    | C6-HSW      0.0%    0.0 ms  0.0%    0.0 ms
                    | C7 (cc7)   97.9%    | C7s-HSW    99.2%   55.7 ms 98.7%   31.2 ms

                    |             Core    |            CPU 2       CPU 6
                    |                     | C0 active   0.0%        0.2%
                    |                     | POLL        0.0%    0.0 ms  0.0%    0.0 ms
                    |                     | C1E-HSW     0.0%    0.0 ms  0.0%    0.0 ms
                    |                     |
                    | C3 (cc3)    0.0%    | C3-HSW      0.0%    0.0 ms  0.0%    0.0 ms
                    | C6 (cc6)    0.0%    | C6-HSW      0.0%    0.0 ms  0.0%    0.0 ms
                    | C7 (cc7)   99.3%    | C7s-HSW    99.5%   47.9 ms 99.4%   43.7 ms

                    |             Core    |            CPU 3       CPU 7
                    |                     | C0 active   0.1%        0.0%
                    |                     | POLL        0.0%    0.0 ms  0.0%    0.0 ms
                    |                     | C1E-HSW     0.0%    0.0 ms  0.0%    0.0 ms
                    |                     |
                    | C3 (cc3)    0.0%    | C3-HSW      0.0%    0.0 ms  0.0%    0.0 ms
                    | C6 (cc6)    0.0%    | C6-HSW      0.0%    0.0 ms  0.0%    0.0 ms
                    | C7 (cc7)   99.0%    | C7s-HSW    99.1%   62.6 ms 99.1%  100.3 ms

                    |             GPU     |
                    |                     |
                    | Powered On  0.3%    |
                    | RC6        99.7%    |
                    | RC6p        0.0%    |


                                
Still unsure however, if it is GVT's fault or not, i do not need to boot with i915.enable_rc6 option.
Comment 3 Chris Wilson 2016-12-03 19:48:16 UTC
The dmesg shows it is using rc6, at least.

"Powertop / turbostat -d show no GFX stats reported."

Literally, as in no page showing the GFXWatt and rc6 residency? Or just that they don't vary. If the former, that is the /sys/class/drm/cardN/power directory not being exposed. Shouldn't be affected by gvt at all (but yes, it is pointless to build it - but it should just not even initialise on your hw and not impact runtime at all).

However, the final figures still show no pc7 even though cpu + gpu is idle. That usually takes i915.enable_fbc=1 as well.
Comment 4 Shawn Starr 2016-12-03 21:34:05 UTC
Correct, turbostat -d would not show 'GFX%rc6  GFXMHz' fields

and Powertop would not show:


                    |             GPU     |
                    |                     |
                    | Powered On  0.0%    |
                    | RC6       100.0%    |
                    | RC6p        0.0%    |
                    | RC6pp       0.0%    |


Disabling GVT might be cause, unsure, I will rebuild with this module enabled - even though Haswell has no GVT support (unimplemented).

As for i915.enable_fbc=1, shouldn't this be all detected by the driver? It should have turned it on if I am able to get PC7, I have seen PC7 before, but there is inconsistent power usage.


Right now I do not have FBC turned on explicitly and the laptop is at PC6, but upon waking up it will return to PC2 99% of time, it is unable to go lower when disabling Hybrid/Switchable graphics, I can get to PC6 even at idle w/o display being shut off.

So some inconsistencies in that just turning on the HSW iGPU kills power performance when idle but not display disabled. I'm curious as to why...
Comment 5 Shawn Starr 2016-12-03 21:35:34 UTC
Correction, is *IS* able to go lower PC state if I disable Hybrid/Switchable graphics
Comment 6 Shawn Starr 2016-12-18 08:57:45 UTC
Oddly, I confirm if I disable in .config CONFIG_DRM_I915_GVT_KVMGT but keep CONFIG_DRM_I915_GVT=y.

The system can reach PC6 fine.
Comment 7 Shawn Starr 2016-12-18 08:59:19 UTC
But I cannot get RC6 GFX power savings with CONFIG_DRM_I915_GVT=y enabled.
Comment 8 Shawn Starr 2016-12-19 08:33:04 UTC
Recant this: But I cannot get RC6 GFX power savings with CONFIG_DRM_I915_GVT=y enabled. 


With .config using this:

CONFIG_DRM_I915_GVT=y
# CONFIG_DRM_I915_GVT_KVMGT is not set


I get:

PkgTmp GFX%rc6  GFXMHz Pkg%pc2 Pkg%pc3 Pkg%pc6 Pkg%pc7 PkgWatt CorWatt GFXWatt
52   99.73     200    2.88    0.44   92.09    0.00    0.32    0.01    0.00

So, mearly enabing just the GVT part which won't load anyway
[   13.376558] [drm:intel_gvt_init [i915]] Unsupported device. GVT-g is disabled


Does not impact i915.ko power savings
Comment 9 Terrence Xu 2017-03-29 12:05:05 UTC
I changed the component to iGVT-g, and our developer will investigate whether it is GVT-g configuration related.
Comment 10 Chuanxiao Dong 2017-03-30 02:11:07 UTC
GVT source code has been updated a lot, Can this issue still exist with latest GVT?
Comment 11 Weinan Li 2017-07-14 02:36:10 UTC
Long time no response, request to close. if you still have this issue, please reopen it and help to share update information. thanks.


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.