Bug 57501 - [BISECTED] i915: power regression when display is off
Summary: [BISECTED] i915: power regression when display is off
Status: RESOLVED INSUFFICIENT_DATA
Alias: None
Product: Drivers
Classification: Unclassified
Component: Video(DRI - Intel) (show other bugs)
Hardware: All Linux
: P1 low
Assignee: Ville Syrjala
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-05-03 11:37 UTC by Matthias
Modified: 2014-08-14 08:20 UTC (History)
5 users (show)

See Also:
Kernel Version: 3.7.3+
Subsystem:
Regression: Yes
Bisected commit-id:


Attachments
Xorg.0.log running linux 3.9 (logs are the same with 3.7.2) (24.59 KB, text/x-log)
2013-05-03 12:14 UTC, Matthias
Details
rendering issue in Chromium with SNA (4.38 KB, image/png)
2013-05-03 14:27 UTC, Matthias
Details
the close button always looks a bit different; SNA on the left and UXA on the right (1.61 KB, image/png)
2013-05-03 14:47 UTC, Matthias
Details
intel_reg_dump with Linux 3.7.2 (low power) (13.47 KB, text/plain)
2013-06-16 20:33 UTC, Matthias
Details
intel_reg_dump with Linux 3.9.6 (higher power) (13.49 KB, text/plain)
2013-06-16 20:34 UTC, Matthias
Details
Thinkpad X200 with drm.debug on (136.24 KB, application/x-gzip)
2013-06-24 17:04 UTC, Mike Qin
Details

Description Matthias 2013-05-03 11:37:25 UTC
Starting with Linux 3.7.3 the power usage of my laptop does not drop as low as before when the display is switched off (~2W difference on AC). With the display being on, power usage is normal.

I bisected from v3.7.2 (good) to v3.7.3 (bad) and found the responsible commit cf787fa284598caea41c63d10cff91ff3ecb9671

I'm currently running Linux 3.9 and the problem is still there.

Hardware info:
00:02.0 VGA compatible controller: Intel Corporation Mobile GM965/GL960 Integrated Graphics Controller (primary) (rev 0c)
00:02.1 Display controller: Intel Corporation Mobile GM965/GL960 Integrated Graphics Controller (secondary) (rev 0c)

Please tell me what additional information you need for resolving this bug.

Thanks!
Comment 1 Chris Wilson 2013-05-03 11:43:18 UTC
Xorg.0.log?
Comment 2 Matthias 2013-05-03 12:14:34 UTC
Created attachment 100591 [details]
Xorg.0.log running linux 3.9 (logs are the same with 3.7.2)
Comment 3 Chris Wilson 2013-05-03 13:06:53 UTC
Thanks, can you try Option "AccelMethod" "SNA" as that actually turns the pipe off as well as the display?
Comment 4 Matthias 2013-05-03 13:58:42 UTC
SNA does not change power uasge.

$ grep -i sna /var/log/Xorg.0.log
[    26.667] (**) intel(0): Option "AccelMethod" "sna"
[    27.327] (II) intel(0): SNA initialized with Broadwater/Crestline backend

I already tried SNA in the last time but 3D performance (tested with Neverball) is bad with xf86-video-intel 2.21.6.
Version 2.21.5 had even better performance with SNA than with UXA but the versions before also decrease the performance with SNA.
Except all this SNA has minor rendering problems and UXA is default so I sticked with that.
Comment 5 Chris Wilson 2013-05-03 14:01:34 UTC
"Except all this SNA has minor rendering problems" example?

Ok, that rules out a theory I had that maybe the crtc->active was not being cleared with DPMS off.
Comment 6 Matthias 2013-05-03 14:27:04 UTC
"in the last time" was no good english, I meant "recently".

In Chromium the text on the tabs does flicker, when the page is loading or when hovering with the cursor, the "url overlays" are sometimes missing pieces of the boarder (see attachment) and sometimes the titlebars in Gnome get wrong colors which only goes away when reloading gnome-shell (a black X in the close button instead of a white one, for inactive windows the whole titlebar does not fit in brightness). There are probably more issues I'm not aware of.

And to complete all my issues, since Linux 3.9 I get these messages all the time, if framebuffer compression is enabled (i915_enable_fbc=1):
[ 2115.042671] [drm] not enough stolen space for compressed buffer (need 4096000 bytes), disabling
[ 2115.042677] [drm] hint: you may be able to increase stolen memory size in the BIOS to avoid this
[ 2121.041058] [drm] not enough stolen space for compressed buffer (need 4096000 bytes), disabling
[ 2121.041065] [drm] hint: you may be able to increase stolen memory size in the BIOS to avoid this

[    0.635741] agpgart-intel 0000:00:00.0: detected 8192K stolen memory
There is no option to change this in the BIOS.
Comment 7 Matthias 2013-05-03 14:27:55 UTC
Created attachment 100621 [details]
rendering issue in Chromium with SNA
Comment 8 Matthias 2013-05-03 14:47:03 UTC
Created attachment 100631 [details]
the close button always looks a bit different; SNA on the left and UXA on the right
Comment 9 Chris Wilson 2013-05-03 15:57:58 UTC
The close button is intentional, by the toolkit's own request.(The only issue is that UXA doesn't have a faster less precise mode and so always ignores the application's request in that regard.)

The chromium issue looks to be the gen4 GPU bug -- something is very wrong inside the GPU regarding stale VUEs. UXA doesn't trip over this, as it uses a much, much larger hammer to workaround an even more critical gen4 GPU bug. For SNA, I found a smaller hammer which gets past the first problem of sending more than one rectangle to processed by the GPU at one time, but then exposes us to the fact that the GPU sometimes misrenders when it has multiple rectangles. It's a pita.
Comment 10 Daniel Vetter 2013-06-16 11:42:33 UTC
Sorry for the long delay in locking at this bug. The SNA issues are unrelated (and already tracked I think), so let's just track the regression introduced in

commit cf787fa284598caea41c63d10cff91ff3ecb9671
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Mon Jan 7 10:11:40 2013 +0000

    drm/i915: Treat crtc->mode.clock == 0 as disabled

Can you please install intel-gpu-tools (git is available at http://cgit.freedesktop.org/xorg/app/intel-gpu-tools/ ) and grap the output of intel_reg_dumper for both a working configuration and a broken one.
Comment 11 Matthias 2013-06-16 20:33:37 UTC
Created attachment 104861 [details]
intel_reg_dump with Linux 3.7.2 (low power)
Comment 12 Matthias 2013-06-16 20:34:24 UTC
Created attachment 104871 [details]
intel_reg_dump with Linux 3.9.6 (higher power)
Comment 13 Mike Qin 2013-06-20 21:29:31 UTC
I'm running Intel GM45 and UXA (not SNA), and I got the same syslog output.

2013-06-20T17:26:07.827440-04:00 mike-laptop kernel: [ 1320.857209] [drm] not enough stolen space for compressed buffer (need 4194304 bytes), disabling
2013-06-20T17:26:07.827462-04:00 mike-laptop kernel: [ 1320.857214] [drm] hint: you may be able to increase stolen memory size in the BIOS to avoid this

During boot, however, stolen memory size is sufficiently large.

2013-06-20T12:45:04.526539-04:00 mike-laptop kernel: [    0.724618] agpgart-intel 0000:00:00.0: detected 32768K stolen memory
2013-06-20T12:45:04.526545-04:00 mike-laptop kernel: [    0.724749] agpgart-intel 0000:00:00.0: AGP aperture is 256M @ 0xd0000000

mike@mike-laptop% uname -a
Linux mike-laptop 3.9.6-13.g8ead728-desktop #1 SMP PREEMPT Thu Jun 13 19:23:10 UTC 2013 (8ead728) x86_64 x86_64 x86_64 GNU/Linux

Any ideas what's happening?

Thanks
Comment 14 Daniel Vetter 2013-06-24 16:44:00 UTC
We seem to disable fbc here. Can you please boot with drm.debug=0xe added to your kernel cmdline, reproduce the issue and then attach the complete dmesg?
Comment 15 Mike Qin 2013-06-24 17:04:36 UTC
Created attachment 105891 [details]
Thinkpad X200 with drm.debug on
Comment 16 Mike Qin 2013-06-24 17:08:25 UTC
(In reply to comment #14)
> We seem to disable fbc here. Can you please boot with drm.debug=0xe added to
> your kernel cmdline, reproduce the issue and then attach the complete dmesg?

Hi. I've attached the log with drm.debug=0xe. Hope this can help.

BTW, I don't think I explicitly specified i915_enable_fbc boot parameter in grub. I think it's trying to turn that on by default.
Comment 17 Daniel Vetter 2013-12-04 10:10:31 UTC
fbc/watermark issues - one for Ville.

Also can you please retest on latest drm-intel-nightly - we've improved the watermark quite a bit recently.
Comment 18 Jani Nikula 2014-08-14 08:20:39 UTC
Timeout. Please reopen if the problem persists with recent kernels.

Note You need to log in before you can comment on or make changes to this bug.