Bug 63383 - [i915 vga output] glitchy output when attaching external monitor
Summary: [i915 vga output] glitchy output when attaching external monitor
Status: RESOLVED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: Driver/intel (show other bugs)
Version: git
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Chris Wilson
QA Contact: Intel GFX Bugs mailing list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-04-10 14:24 UTC by christopherarges
Modified: 2013-04-16 07:39 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
Glitchy Output (38.46 KB, image/jpeg)
2013-04-10 14:24 UTC, christopherarges
no flags Details
dmesg (drm.debug=6) (123.01 KB, text/plain)
2013-04-10 21:45 UTC, christopherarges
no flags Details
Xorg.0.log (38.88 KB, text/plain)
2013-04-10 21:46 UTC, christopherarges
no flags Details
intel_reg_dump (14.39 KB, text/plain)
2013-04-10 21:46 UTC, christopherarges
no flags Details
i915_gem_framebuffer (704 bytes, text/plain)
2013-04-10 22:36 UTC, christopherarges
no flags Details

Description christopherarges 2013-04-10 14:24:03 UTC
Created attachment 77747 [details]
Glitchy Output

If I attach an external monitor to my Lenovo Thinkpad T420 and type the following command:
    xrandr --output VGA1 --auto --primary --output LVDS1 --off
I get glitchy output as shown in the attached picture.

I have tested with a pre-built Ubuntu kernel here:
http://kernel.ubuntu.com/~kernel-ppa/mainline/drm-intel-next/current/
This should be commit bae3699182027525d92b97d904578a533264b242 from the drm-intel tree next branch.

The related launchpad bug is here:
https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-video-intel/+bug/1157678

While https://bugs.freedesktop.org/show_bug.cgi?id=57160 is linked in the bug, I believe this is another issue. I've tested with a kernel that contains the patch and it did not fix the issue.

My graphics card is:
2nd Generation Core Processor Family Integrated Graphics Controller [8086:116]
Comment 1 Daniel Vetter 2013-04-10 14:33:43 UTC
Ah, a victim for testing a few patches of mine!

Please test the pll-limits-mess branch from http://cgit.freedesktop.org/~danvet/drm
Comment 2 christopherarges 2013-04-10 19:11:59 UTC
Daniel,
I've tested with the pll-limits-mess branch, and it resulted in the same output.
Comment 3 Chris Wilson 2013-04-10 20:44:39 UTC
Can you please attach a drm.debug=6 dmesg and Xorg.log from the latest run? Also the output of intel_reg_dumper would be useful.
Comment 4 christopherarges 2013-04-10 21:45:48 UTC
Created attachment 77782 [details]
dmesg (drm.debug=6)
Comment 5 christopherarges 2013-04-10 21:46:09 UTC
Created attachment 77783 [details]
Xorg.0.log
Comment 6 christopherarges 2013-04-10 21:46:35 UTC
Created attachment 77784 [details]
intel_reg_dump
Comment 7 Chris Wilson 2013-04-10 22:12:26 UTC
And the other one is 'cat /sys/kernel/debug/dri/0/i915_gem_framebuffers'
Comment 8 christopherarges 2013-04-10 22:36:11 UTC
Created attachment 77787 [details]
i915_gem_framebuffer
Comment 9 Chris Wilson 2013-04-12 10:42:40 UTC
So what I thought might have been happening was that we reused an incorrectly sized cached framebuffer. Not so sure after reading i915_gem_framebuffer. However, I've implemented a defense against using the wrong framebuffer size:

commit 9dae6f9f1f169c228929185a8bd94e82afe92574
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Fri Apr 12 11:01:08 2013 +0100

    sna: Flush the scanout cache after resizing the display
    
    And ensure that any new scanout allocations make the requested size.

It will be worth updating xf86-video-intel.git and seeing if that makes any difference (will be in ppa:xorg-edgers in a few hours).
Comment 10 christopherarges 2013-04-15 16:55:09 UTC
Building and installing latest xf86-video-intel.git with HEAD:  http://cgit.freedesktop.org/xorg/driver/xf86-video-intel/commit/?id=f0b6ae2cfb811a8c234634c878800ca1fb95703f

Seems to resolve the issue, I've tested the original issue of unplugging and plugging in an external monitor, suspending and resuming, and also the xrandr trigger. So far no screen corruption!


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.