[i945gm] Video corruption when disabling internal monitor

Bug #377598 reported by Tim Allen
34
This bug affects 6 people
Affects Status Importance Assigned to Milestone
xf86-video-intel
Fix Released
High
linux (Ubuntu)
Fix Released
High
Unassigned

Bug Description

Binary package hint: xserver-xorg-video-intel

I have an Apple MacBook (Model "Macbook2,1") with Intel GM945 integrated graphics. I also have the official proprietary-to-DVI dongle, and a Dell LCD flat-panel with a native resolution of 1600x1200. When I'm at home, my preferred setup is to use the external monitor (and an external USB keyboard and mouse), and turn off the laptop's internal display (so I don't wear out the backlight). Unfortunately, if I disable the internal display and the external display is using a resolution higher than 1024x768, the external display goes nuts.

I have not experimented much with gnome-display-properties, as it has an annoying habit of trying to adjust my xorg.conf, but I spent some time playing with xrandr directly:

With the internal display set to 1280x800 (native resolution) and the external display set to 1600x1200 (native resolution):
 - "xrandr --output LVDS --below TMDS-1" works fine (putting the internal display below the external one, both active)
 - "xrandr --output TMDS-1 --off" works fine (disabling the internal display)
 - "xrandr --output LVDS --off" works as long as the TMDS-1 mode is 1024x768 or lower.

Since I can't disable the internal display, my current workaround is to run "xrandr --auto" (enabling both displays at their native resolution) and then run "xrandr --output LVDS --pos 0x0 --set BACKLIGHT 2" (overlapping the internal and external displays, and disabling the internal display's backlight - the strange value is from https://bugs.launchpad.net/bugs/367309)

I will attach screenshots of the problem and a log-fragment.

ProblemType: Bug
Architecture: amd64
DistroRelease: Ubuntu 9.04
Package: xserver-xorg-video-intel 2:2.7.0-1ubuntu2~xup~1
ProcEnviron:
 PATH=(cuusernameom, user)
 LANG=en_AU.UTF-8
 SHELL=/bin/bash
ProcVersion: Linux version 2.6.28-11-generic (buildd@creusernameed) (gcc version 4.3.3 (Ubuntu 4.3.3-5ubuntu4) ) #42-Ubuntu SMP Fri Apr 17 01:58:03 UTC 2009
SourcePackage: xserver-xorg-video-intel
Uname: Linux 2.6.28-11-generic x86_64
UnreportableReason: This is not a genuine Ubuntu package

[lspci]
00:00.0 Host bridge [0600]: Intel Corporation Mobile 945GM/PM/GMS, 943/940GML and 945GT Express Memory Controller Hub [8086:27a0] (rev 03)
     Subsystem: Intel Corporation Device [8086:7270]
00:02.0 VGA compatible controller [0300]: Intel Corporation Mobile 945GM/GMS, 943/940GML Express Integrated Graphics Controller [8086:27a2] (rev 03)
     Subsystem: Intel Corporation Device [8086:7270]

Revision history for this message
Tim Allen (screwtape) wrote :
Revision history for this message
Tim Allen (screwtape) wrote :

Here is a long-exposure image of the problem in action, after setting the external monitor's resolution to 1152x864 (far short of the native 1600x1200 res, hence the black border). As it's a long exposure, it's a good approximation of the visual chaos, but hard to see what's actually going on.

Revision history for this message
Tim Allen (screwtape) wrote :

Here is a short-exposure image of the problem in action, after setting the external monitor's resolution to 1152x864. Being a short-exposure image, it's harder to see the image, but if you crank the brightness up, you can see the "jaunty-issues.txt" Vim tab in which I was keeping notes about my experimentation, and down the bottom left you can see a few yellow "e/st]$" from my bash prompt.

Revision history for this message
Tim Allen (screwtape) wrote :

Here is a short-exposure image of the problem in action, after setting the external monitor's resolution to 1152x864. Being a short-exposure image, it's harder to see the image, but if you crank the brightness up, you can see the "jaunty-issues.txt" Vim tab in which I was keeping notes about my experimentation, and down the bottom left you can see a few yellow "e/st]$" from my bash prompt.

Revision history for this message
Tim Allen (screwtape) wrote :

I re-enabled the internal display then changed the external monitor's resolution to 1152x864, and since the internal display was enabled this time it worked. This image is mostly interesting so you can see where the previous screens were getting their various garbage.

Revision history for this message
Tim Allen (screwtape) wrote :

Here is a fragment of my Xorg.0.log file, generated as follows:

 - Set the resolution to 1024x768, took a copy of the log.
 - Set the resolution to 1152x864, waited a second for the problem to kick in, took a copy of the log.
 - Diffed the two copies of the log, extracted the extra lines and wrote them to a new file.

Revision history for this message
Tim Allen (screwtape) wrote :

A side note: the closest existing bug seems to be bug 316000, but this bug is distinct because this bug never manifests like that bug's screenshot, and this bug never manifests when both screens are enabled, while that bug only manifests if both screens are enabled.

I guess I should also mention that although I'm running the 2.7.0 Intel driver from the x-updates PPA, I experienced the same behaviour with stock Jaunty and with Intrepid.

Bryce Harrington (bryce)
description: updated
Bryce Harrington (bryce)
Changed in xserver-xorg-video-intel (Ubuntu):
status: New → Confirmed
Bryce Harrington (bryce)
summary: - Video corruption when disabling internal monitor
+ [i945gm] Video corruption when disabling internal monitor
Geir Ove Myhr (gomyhr)
tags: added: 945gm corruption
Revision history for this message
In , Jacob-hart+xorg (jacob-hart+xorg) wrote :
Download full text (5.0 KiB)

Disabling LVDS output causes corruption of the output on TMDS-1. When this occurs the image generated on TMDS-1 looks like it's rolling or tearing, like a CRT does when it's set to a refresh rate it can't handle (see http://www.phoronix.net/image.php?id=intel_uxa&image=intel_uxa_corrupt1 for an example).

Some modes cause the corruption and others don't. To reproduce the problem, I set TMDS-1 to an appropriate mode from the list below and then disable LVDS at the command line using "xrandr --output LVDS --off"

Modes that cause corruption are:

  1920x1200 (0x40) 154.0MHz +HSync -VSync *current +preferred
        h: width 1920 start 1968 end 2000 total 2080 skew 0 clock 74.0KHz
        v: height 1200 start 1203 end 1209 total 1235 clock 60.0Hz
  1600x1200 (0x41) 162.0MHz +HSync +VSync
        h: width 1600 start 1664 end 1856 total 2160 skew 0 clock 75.0KHz
        v: height 1200 start 1201 end 1204 total 1250 clock 60.0Hz
  1680x1050 (0x42) 119.0MHz +HSync -VSync
        h: width 1680 start 1728 end 1760 total 1840 skew 0 clock 64.7KHz
        v: height 1050 start 1053 end 1059 total 1080 clock 59.9Hz
  1280x1024 (0x43) 135.0MHz +HSync +VSync
        h: width 1280 start 1296 end 1440 total 1688 skew 0 clock 80.0KHz
        v: height 1024 start 1025 end 1028 total 1066 clock 75.0Hz
  1280x1024 (0x44) 108.0MHz +HSync +VSync
        h: width 1280 start 1328 end 1440 total 1688 skew 0 clock 64.0KHz
        v: height 1024 start 1025 end 1028 total 1066 clock 60.0Hz
  1152x864 (0x47) 108.0MHz +HSync +VSync
        h: width 1152 start 1216 end 1344 total 1600 skew 0 clock 67.5KHz
        v: height 864 start 865 end 868 total 900 clock 75.0Hz

The remaining modes are ok:

  1440x900 (0x45) 88.8MHz +HSync -VSync
        h: width 1440 start 1488 end 1520 total 1600 skew 0 clock 55.5KHz
        v: height 900 start 903 end 909 total 926 clock 59.9Hz
  1280x800 (0x46) 71.0MHz +HSync -VSync
        h: width 1280 start 1328 end 1360 total 1440 skew 0 clock 49.3KHz
        v: height 800 start 803 end 809 total 823 clock 59.9Hz
  1152x720 (0x48) 67.3MHz -HSync +VSync
        h: width 1152 start 1208 end 1328 total 1504 skew 0 clock 44.8KHz
        v: height 720 start 721 end 724 total 746 clock 60.0Hz
  1024x768 (0x49) 78.8MHz +HSync +VSync
        h: width 1024 start 1040 end 1136 total 1312 skew 0 clock 60.0KHz
        v: height 768 start 769 end 772 total 800 clock 75.0Hz
  1024x768 (0x4a) 65.0MHz -HSync -VSync
        h: width 1024 start 1048 end 1184 total 1344 skew 0 clock 48.4KHz
        v: height 768 s...

Read more...

Revision history for this message
In , Jacob-hart+xorg (jacob-hart+xorg) wrote :

Created an attachment (id=26743)
xorg.conf

Revision history for this message
In , Jacob-hart+xorg (jacob-hart+xorg) wrote :

Created an attachment (id=26744)
full output of xrandr -q --verbose

Revision history for this message
In , Jacob-hart+xorg (jacob-hart+xorg) wrote :

Created an attachment (id=26745)
Log file with underruns

Revision history for this message
In , Jesse Barnes (jbarnes-virtuousgeek) wrote :

Still happen with edgers bits and a more recent kernel from edgers too?

Revision history for this message
Bryce Harrington (bryce) wrote :

[This is an automatic notification.]

A new major version of the -intel driver is now available in Karmic.

This version includes a major reworking of the acceleration
architecture, which resolves a huge number of issues. We do not know
whether it resolves the issue you reported.

Would you mind testing Karmic Alpha-2 and seeing if it is still a
problem? CD ISO images are available here:

  http://cdimages.ubuntu.com/releases/karmic/

If the issue can still be reproduced on karmic, please report here with
your findings, and attach a fresh Xorg.0.log from your test, and we will
be able to forward the bug upstream.

Otherwise, if the bug no longer exists in Karmic, let us know that as
well.

In the off chance you encounter different bugs while attempting to test
Karmic, please report those as new bug reports.

Changed in xserver-xorg-video-intel (Ubuntu):
status: Confirmed → New
status: New → Incomplete
Revision history for this message
Tim Allen (screwtape) wrote :

I burned the Karmic Koala Alpha 2 64-bit desktop image to a CD-RW, booted off it, and tried reproducing the problem using the steps in comment 0. The exact same behaviour described there is still present.

It has occurred to me that the 'safe' resolution of 1024x768 may merely be the largest of the resolution my two displays have in common, rather than a maximum pixel-count limit or something.

I discovered a presumably unrelated problem that if I boot Karmic while the external monitor is connected, X eventually freezes and the computer needs to be hard-booted. Unfortunately, because I was booting off a CD, rebooting erased all the log files and I do not have sufficient information to file a bug.

As requested, I have attached the Xorg.0.log file that was created while I was reproducing the bug.

Revision history for this message
Bryce Harrington (bryce) wrote :

Thanks for testing

Changed in xserver-xorg-video-intel (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
In , Tim Allen (screwtape) wrote :

I reproduced a problem very much like this one in Ubuntu Karmic Alpha 2, which I believe uses kernel 2.6.30 and version 2.7.99 of the Intel driver.

The Ubuntu bug is here, with various logs and screenshots attached: https://bugs.launchpad.net/bugs/377598

Revision history for this message
Tim Allen (screwtape) wrote :

I happened to be looking through bugs.freedesktop.org and I noticed a bug that sounds very much like this one:

    https://bugs.freedesktop.org/show_bug.cgi?id=22264

I added a comment mentioning this bug.

Bryce Harrington (bryce)
tags: added: karmic
Changed in xserver-xorg-video-intel (Ubuntu):
importance: Undecided → Medium
status: Confirmed → Triaged
Changed in xserver-xorg-video-intel:
status: Unknown → Confirmed
Bryce Harrington (bryce)
Changed in xserver-xorg-video-intel (Ubuntu):
importance: Medium → High
Revision history for this message
In , Jesse Barnes (jbarnes-virtuousgeek) wrote :

Hm, if it really is underruns, then it may be fixed by a recent kernel commit (this assumes you're running KMS):

commit dff33cfcefa31c30b72c57f44586754ea9e8f3e2
Author: Jesse Barnes <email address hidden>
Date: Tue Jul 14 10:15:56 2009 -0700

    drm/i915: FIFO watermark calculation fixes

Bryce Harrington (bryce)
tags: added: jaunty
Revision history for this message
In , Jesse Barnes (jbarnes-virtuousgeek) wrote :

Ok, marking as fixed... Please reopen if you see it again.

Changed in xserver-xorg-video-intel:
status: Confirmed → Fix Released
Revision history for this message
Bryce Harrington (bryce) wrote :

According to the upstream bug, this is fixed by a recent kernel commit, so moving over to the linux kernel.

affects: xserver-xorg-video-intel (Ubuntu) → linux (Ubuntu)
tags: added: xorg-needs-kernel-fix
Revision history for this message
Leann Ogasawara (leannogasawara) wrote :

Looks like the patch is already in the Karmic kernel. Marking this Fix Released. Thanks.

ogasawara@emiko:~/ubuntu-karmic$ git log -p dff33cfcefa31c30b72c57f44586754ea9e8f3e2
commit dff33cfcefa31c30b72c57f44586754ea9e8f3e2
Author: Jesse Barnes <email address hidden>
Date: Tue Jul 14 10:15:56 2009 -0700

    drm/i915: FIFO watermark calculation fixes

    I discovered several bugs in the FIFO code that was recently applied.
    Some of them fell into the "how did this ever work" category, since in
    some cases we were using the wrong FIFO size values, and the
    calculations ended up being way off.

    This patch fixes all the bugs I found, and works well on my GM45, 915GM
    and 855GM test machines; but as usual with these sorts of patches
    broader testing is definitely requested (in particular this patch
    affects 830, 845 and 865 for which I don't have test hardware).

    Overall, the patch clarifies the watermark calculation function by
    adding some comments and debug info, and making the variable names a
    bit clearer. The "get FIFO size" portion of the code has also been
    corrected, so we should be able to properly detect the FIFO allocations
    for each pipe, for use in the watermark calculation.

    Signed-off-by: Jesse Barnes <email address hidden>
    Signed-off-by: Eric Anholt <email address hidden>

Changed in linux (Ubuntu):
status: Triaged → Fix Released
Revision history for this message
Tobias Erb (tobixyz) wrote :

With final karmic release (upgraded from jaunty) i still have the problem on my macbook2,1when disabling the internal monitor.

Revision history for this message
tgomas (tgomas) wrote :

With final karmic release (installed from scratch) i still have the problem on my macbook2,1 when disabling the internal monitor.

Revision history for this message
Adam Wolf (adamwolf) wrote :

I still get this periodically on my macbook on Karmic final.

Revision history for this message
Tobias W. Kjeldsen (tobias-wkjeldsen) wrote :

I have found the solution to this tiring problem. I am running the final Ubuntu 9.10 on a MacBook 2,1 and I can successfully fix this issue with a 100% success.

You need to do the following (remember to disable mirrored monitor first):
1. Plug in your external monitor
2. Start your MacBook and start boot into Ubuntu
3. Close the lid of your MacBook
4. You have now booted in and logged in (the flickering is now present)
5. Now, restart your machine and boot into Ubuntu (DO NOT OPEN MACBOOK LID!!)
6. Your now booted into Ubuntu again, the flickering is gone!

This I am able to do with success.

I have an SyncMaster 226BW and my MacBook is a revision 2,1.

I hope this helps others as well as it helped me!

Changed in linux (Ubuntu):
status: Fix Released → Invalid
status: Invalid → Incomplete
status: Incomplete → Invalid
Revision history for this message
Michael Hudson-Doyle (mwhudson) wrote :

I, too, still have the problem with karmic final, upgraded from jaunty. I guess I can try a live cd tonight.

Changed in linux (Ubuntu):
status: Invalid → Confirmed
Changed in xserver-xorg-video-intel:
importance: Unknown → High
Revision history for this message
Tobias Erb (tobixyz) wrote :

Still having the problem with lucid.

Revision history for this message
Michael Hudson-Doyle (mwhudson) wrote :

FWIW, it seems to finally be fixed for me in Maverick (although I had to use the xorg-edgers ppa because of bug 619663).

Revision history for this message
Jeremy Foshee (jeremyfoshee) wrote :

re-marking as Fix Released. Please file a new bug if you feel you have a similar issue.

Thanks!

~JFo

Changed in linux (Ubuntu):
status: Confirmed → Fix Released
Changed in xserver-xorg-video-intel:
importance: High → Unknown
Changed in xserver-xorg-video-intel:
importance: Unknown → High
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.