[i945gm] Screen Corruption with new Xorg stack with terminal programs

Bug #717114 reported by Stefano Rivera on 2011-02-11
106
This bug affects 20 people
Affects Status Importance Assigned to Milestone
X.Org X server
Fix Released
Critical
linux (Ubuntu)
High
Andy Whitcroft
Natty
High
Andy Whitcroft
xserver-xorg-video-intel (Ubuntu)
Medium
Unassigned
Natty
Medium
Unassigned

Bug Description

Binary package hint: xserver-xorg-video-intel

Continuing from LP: #710961

ProblemType: Bug
DistroRelease: Ubuntu 11.04
Package: xserver-xorg-video-intel 2:2.14.0-1ubuntu6
ProcVersionSignature: Ubuntu 2.6.38-3.30-generic 2.6.38-rc4
Uname: Linux 2.6.38-3-generic x86_64
Architecture: amd64
CompizPlugins: [core,bailer,detection,composite,opengl,decor,mousepoll,vpswitch,regex,animation,snap,expo,move,compiztoolbox,place,gnomecompat,wall,ezoom,workarounds,staticswitcher,resize,fade,scale,session,unityshell]
CompositorRunning: compiz
DRM.card0.DVI.D.1:
 status: disconnected
 enabled: disabled
 dpms: Off
 modes:
 edid-base64:
DRM.card0.LVDS.1:
 status: connected
 enabled: enabled
 dpms: On
 modes: 1280x800
 edid-base64: AP///////wAGEF+cAAAAAAgQAQOAHRJ4Ci8wl1hTiyklUFQAAAABAQEBAQEBAQEBAQEBAQEBvBsAoFAgFzAwIDYAHrMQAAAYAAAAAQAGECAAAAAAAAAAAAogAAAA/gBMUDEzM1dYMS1UTEExAAAA/gBDb2xvciBMQ0QKICAgAMI=
DRM.card0.VGA.1:
 status: disconnected
 enabled: disabled
 dpms: Off
 modes:
 edid-base64:
Date: Fri Feb 11 15:30:32 2011
DistUpgraded: Yes, recently upgraded Log time: 2009-12-11 10:51:59.838477
DistroCodename: natty
DistroVariant: ubuntu
DkmsStatus:

GraphicsCard:
 Subsystem: Intel Corporation Device [8086:7270]
   Subsystem: Intel Corporation Device [8086:7270]
MachineType: Apple Inc. MacBook2,1
ProcEnviron:
 LANGUAGE=en_ZA:en
 PATH=(custom, user)
 LANG=en_ZA.UTF-8
 LC_MESSAGES=en_ZA.utf8
 SHELL=/bin/bash
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-2.6.38-3-generic root=UUID=3345fa7f-d2c4-456f-8d0d-8fdb515433f7 ro quiet splash vt.handoff=7
Renderer: Hardware acceleration
SourcePackage: xserver-xorg-video-intel
dmi.bios.date: 06/27/07
dmi.bios.vendor: Apple Inc.
dmi.bios.version: MB21.88Z.00A5.B07.0706270922
dmi.board.asset.tag: Base Board Asset Tag
dmi.board.name: Mac-F4208CAA
dmi.board.vendor: Apple Inc.
dmi.board.version: PVT
dmi.chassis.asset.tag: Asset Tag
dmi.chassis.type: 10
dmi.chassis.vendor: Apple Inc.
dmi.chassis.version: Mac-F4208CAA
dmi.modalias: dmi:bvnAppleInc.:bvrMB21.88Z.00A5.B07.0706270922:bd06/27/07:svnAppleInc.:pnMacBook2,1:pvr1.0:rvnAppleInc.:rnMac-F4208CAA:rvrPVT:cvnAppleInc.:ct10:cvrMac-F4208CAA:
dmi.product.name: MacBook2,1
dmi.product.version: 1.0
dmi.sys.vendor: Apple Inc.
version.compiz: compiz 1:0.9.2.1+glibmainloop4-0ubuntu10
version.libdrm2: libdrm2 2.4.23-1ubuntu3
version.libgl1-mesa-glx: libgl1-mesa-glx 7.10-1ubuntu1
version.xserver-xorg: xserver-xorg 1:7.6~3ubuntu4
version.xserver-xorg-video-ati: xserver-xorg-video-ati 1:6.13.2+git20110124.fadee040-0ubuntu4
version.xserver-xorg-video-intel: xserver-xorg-video-intel 2:2.14.0-1ubuntu6
version.xserver-xorg-video-nouveau: xserver-xorg-video-nouveau 1:0.0.16+git20110107+b795ca6e-0ubuntu4

Stefano Rivera (stefanor) wrote :
Stefano Rivera (stefanor) wrote :

Also worth noting, I can't use XV in the new stack. Mplayer's window just never opens

Bryce Harrington (bryce) wrote :
Changed in xserver-xorg-video-intel (Ubuntu):
importance: Undecided → Medium
status: New → Triaged
Stefano Rivera (stefanor) wrote :

> I can't use XV in the new stack

Working again today.

Eric Appleman (erappleman) wrote :

My machine is affected.

00:02.0 VGA compatible controller: Intel Corporation Mobile 945GM/GMS, 943/940GML Express Integrated Graphics Controller (rev 03) (prog-if 00 [VGA controller])

I'll do an apport-collect soon.

Kees Cook (kees) wrote :

I see this too. It does not always happen, but when it does, that terminal will remain affected. Doing a visual bell (terminal flash) will clean up the corruption, but then I can trigger it again by having something write a lot to the terminal, and the scrolling will get corrupted. If I close that terminal and open a new one, it generally stays gone. Not sure what initially triggers it.

Bryce Harrington (bryce) on 2011-02-17
summary: - [i945gm] Screen Corruption with new Xorg stack
+ [i945gm] Screen Corruption with new Xorg stack with xterm

Anyone have any ideas on what reproduces the behavior? I've not seen it at all myself using gnome-terminal.

Since it sounds like an intermittent issue, it would help to have some sort of test case or workload that tends to cause the corruption.

> - [i945gm] Screen Corruption with new Xorg stack
> + [i945gm] Screen Corruption with new Xorg stack with xterm

And gnome-terminal. And also seen in the chromium tab-bar.

SR

Eric Appleman (erappleman) wrote :

I see the corruption on Slashdot.org to the point that it can be invoked
by merely scrolling the page.

Bryce Harrington (bryce) wrote :

@Eric, hmm. Unless Stefano also sees it with web browsers, my preference would be to handle this as a terminal specific bug (we also have bug #718339 and bug #713440 about terminal-related corruptions, although both seem distinct from this bug). It's also easily conceivable that there is a terminal specific corruption as well as an unrelated firefox related corruption.

Anyway, so Eric I would like to have you file a new bug report (ubuntu-bug xorg), mention this bug report as possibly related, and attach photos showing the corruption you see - include both the Slashdot.org corruption case and the terminal case (gnome-terminal as well as xterm if possible).

summary: - [i945gm] Screen Corruption with new Xorg stack with xterm
+ [i945gm] Screen Corruption with new Xorg stack with terminal programs
Bryce Harrington (bryce) wrote :

@kees, I'd like you also to post a photo or screenshot here, even if you're certain it's a dupe. If it is the same bug it might give some added context.

Come to think of it, it might be useful if you could also run 'ubuntu-bug xorg' to create a new bug report and dupe it to this one, in case there are interesting differences in your logs and config to compare against.

Bryce Harrington (bryce) wrote :

Okay, now to some questions... Stefano can you please try the following:

1. It looks like you're running compiz. Try turning off compiz (from login screen select Classic Desktop - no effects). If the corruption goes away after that, then I'm guessing a mesa/compiz 3d rendering bug. If it's still present then it's more X-y.

2. In the duped bug you mention you saw this since the introduction of the new stack. Do you recall more precisely when you started noticing it? We upgraded mesa, the kernel, and xserver all within a period of a couple weeks, and any one of those could cause a bug like this. If you know when exactly it started then that gives a strong clue what to look at first.

3. Do you have the 2.6.37 kernel still installed? If so, try booting that and reproducing the issue. If it can't be reproduced, then we know it's a kernel bug (probably drm), and if it can then we can at least get the kernel ruled out.

Changed in xserver-xorg-video-intel (Ubuntu):
status: Triaged → Incomplete
Bryce Harrington (bryce) wrote :

apw may have this same bug, he adds some of his observations:

<apw> i'd say its improved, is less reproducible recently
<apw> bryceh, i assume you know what it looks like. i have it right now in a wndow where scrolling down one shows it, one more and its ok again and reversing through the same 3 lines seems the same
<apw> looking closly at it, the 'dammage' is actually a ghost of what was on that line before the scroll, about half the lines vertically have not been cleared

Bryce Harrington (bryce) wrote :

What apw sees: http://people.canonical.com/~apw/misc/corruption.png

I've still be unable to reproduce it, either with or without compiz/unity, with xterm, gnome-terminal, firefox, etc. on -ati with a RV770.

Chris Halse Rogers (raof) wrote :

I also can't reproduce it, on a GM45; this suggests that it's restricted to pre-i965 class hardware (or gen < 4).

Eric Appleman (erappleman) wrote :

Posting this here for completeness and in preceding a spin-off bug report.

Kees Cook (kees) wrote :

00:02.0 VGA compatible controller: Intel Corporation 82Q35 Express Integrated Graphics Controller (rev 02)

Attached is what I'm seeing, same as the original reporter's screenshot and apw's. I've seen the firefox corruption too, but much less frequently.

Changed in xserver-xorg-video-intel (Ubuntu):
status: Incomplete → Confirmed
Jesse Michael (jesse.michael) wrote :

I see this also sometimes with--

00:02.0 VGA compatible controller: Intel Corporation Mobile 945GME Express Integrated Graphics Controller (rev 03)

Stefano Rivera (stefanor) wrote :

@Bryce:

> Unless Stefano also sees it with web browsers

Just caught one now with Firefox on slashdot (first try).

> It looks like you're running compiz.

Indeed. The first time I reported this, I was using Unity, but I'm back to GNOME with Compiz. Unity drives me nuts (and I feel blind without my System Monitor panel applet). I'll try without Compiz.

> Do you recall more precisely when you started noticing it?

I seem to remember it was very soon after your announcement, but I don't know why I didn't file it immediately then. Maybe I was waiting for Xorg to be uploaded too. Sorry, life in development releases means you run into quite a lot of bugs, and don't file them all immediately (hope someone else saw them and did the work).

> Do you have the 2.6.37 kernel still installed?

Yes, I'll test.

Bryce Harrington (bryce) wrote :

no prob, thanks for the extra data.

So, at this stage, assuming that apw, stefano, kees, and eric are all seeing roughly the same bug, taking all their observations into account, the picture starts to look like this:

It appears there was a regression introduced with the introduction of the 2.6.38-1 kernel (going by Stefano's timing, and kees' test of 2.6.38 where the issue can't be seen). The issue is irregular but affects text rendering by interlacing pixels from text elsewhere in the given text buffer when doing rapid scrolling of large quantities of text. This most often shows itself in terminal windows but can also be seen sometimes in firefox's rendered text. The issue seems to appear more often with compiz but has been seen in metacity. Only a minority of users seem to be reproducing the behavior, suggesting these users have some sort of hardware or configurational aspect in common, but so far the commonality between the users is not known.

How does that sound to you guys? Did I miss anything or are there any holes you can poke in it? If not I think next step is to take the bug upstream.

I'd really like to hear from each person able to reproduce this if indeed booting 2.6.37 makes the issue go away, since that means a git bisection might be doable to isolate the faulty patch.

Changed in xserver-xorg-video-intel (Ubuntu):
status: Confirmed → Incomplete
Eric Appleman (erappleman) wrote :

btw, the gnome-panel drop down reliably triggers this bug.

no symptoms on .37

Stefano Rivera (stefanor) wrote :

Not present in .37. Present without compiz.

Stefano Rivera (stefanor) wrote :
Download full text (3.4 KiB)

Just ran a bisection, and it pinpoints 6bda10d152735c22baf1dcd92937420b4b0a359a

commit 6bda10d152735c22baf1dcd92937420b4b0a359a
Author: Chris Wilson <email address hidden>
Date: Sun Dec 5 21:04:18 2010 +0000

    drm/i915: Completely disable fence pipelining.

    I'm still seeing tiling corruption of PutImage and CopyArea (I think)
    under mutter on pnv, so obviously the pipelining logic is deeply flawed.

    Signed-off-by: Chris Wilson <email address hidden>

Bisection log:
# bad: [944f96a41e0b2a578569ad96c1422afb027907db] UBUNTU: Ubuntu-2.6.38-1.28
# good: [708cdc66d1ca5f0cd7ff8ca44aeadbd7d0706b55] UBUNTU: Ubuntu-2.6.37-12.26
git bisect start 'Ubuntu-2.6.38-1.28' 'Ubuntu-2.6.37-12.26'
# good: [3c0eee3fe6a3a1c745379547c7e7c904aa64f6d5] Linux 2.6.37
git bisect good 3c0eee3fe6a3a1c745379547c7e7c904aa64f6d5
# good: [949f6711b83d2809d1ccb9d830155a65fdacdff9] Merge branch 'staging-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6
git bisect good 949f6711b83d2809d1ccb9d830155a65fdacdff9
# bad: [fe3c560b8a22cb28e54fe8950abef38e88d75831] Merge branch 'for-linus/i2c-2638' of git://git.fluff.org/bjdooks/linux
git bisect bad fe3c560b8a22cb28e54fe8950abef38e88d75831
# bad: [1b3862798cf4390b9110e54e405646e156f47c83] Merge branch 'tools' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-idle-2.6
git bisect bad 1b3862798cf4390b9110e54e405646e156f47c83
# bad: [42776163e13a56ea3096edff7a5df95408e80eb4] Merge branch 'perf-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
git bisect bad 42776163e13a56ea3096edff7a5df95408e80eb4
# bad: [d8c58fabd75021cdd99abcd96513cb088d41092b] Merge remote branch 'airlied/drm-core-next' into drm-intel-next
git bisect bad d8c58fabd75021cdd99abcd96513cb088d41092b
# good: [71f4566084eb592fe545f05f7dff41fa9aa42e0b] agp/intel: Fix missed cached memory flags setting in i965_write_entry()
git bisect good 71f4566084eb592fe545f05f7dff41fa9aa42e0b
# good: [b08ebe7e776e5be0271ed1e1bbb384e1f29dd117] drm/radeon/kms: properly print ontario chip id
git bisect good b08ebe7e776e5be0271ed1e1bbb384e1f29dd117
# good: [0b0b053a3949f5c467c3b3ba135d4c161f9fbd00] drm/i915/panel: Restore saved value of BLC_PWM_CTL
git bisect good 0b0b053a3949f5c467c3b3ba135d4c161f9fbd00
# good: [257e48f1474a1f5bfa6fcafb12f77a8479063293] drm/i915/lvds: Disable panel-fitter on gen4 for 1:1 scale factors
git bisect good 257e48f1474a1f5bfa6fcafb12f77a8479063293
# bad: [6bda10d152735c22baf1dcd92937420b4b0a359a] drm/i915: Completely disable fence pipelining.
git bisect bad 6bda10d152735c22baf1dcd92937420b4b0a359a
# good: [340479aac697bc73e225c122a9753d4964eeda3f] drm/i915: Be paranoid and bail on resetting if we can't take the lock.
git bisect good 340479aac697bc73e225c122a9753d4964eeda3f
# good: [bbf0c6b3620b3872929ef7d3c392ce436889110f] drm/i915: announce to userspace that the bsd ring is coherent
git bisect good bbf0c6b3620b3872929ef7d3c392ce436889110f
# good: [160b1543cdae83e9f8914ac7afc3d2bd686140af] drm/i915/dp: Trivial code tidy
git bisect good 160b1543cdae83e9f8914ac7afc3d2bd686140af
# good: [e3c4e5dd5ad1993a3687862c982272f8f00cae30]...

Read more...

Changed in xserver-xorg-video-intel (Ubuntu):
status: Incomplete → Confirmed
bugbot (bugbot) on 2011-02-20
tags: added: corruption
Kees Cook (kees) on 2011-02-21
Changed in xserver-xorg-video-intel (Ubuntu):
status: Confirmed → Triaged
Changed in xserver-xorg-video-intel (Ubuntu Natty):
milestone: none → natty-alpha-3
Kees Cook (kees) on 2011-02-22
Changed in xserver-xorg-video-intel (Ubuntu Natty):
assignee: nobody → Canonical Kernel Team (canonical-kernel-team)
Bryce Harrington (bryce) wrote :

I've forwarded this bug upstream to http://bugs.freedesktop.org/show_bug.cgi?id=34584 - please subscribe yourself to this bug, in case they need further information or wish you to test something.

Since Stefano git bisected down to a specific kernel tree commit (thanks bunches Stefano!) it seems safe to say it's a kernel bug rather than xorg at this point. But I've gone ahead and upstreamed the bug to the -intel driver (the bisection search points to a git commit from one of the Intel driver developers).

Even though this is definitely a kernel bug rather than X, I'll leave the -intel task open for a little bit, in case there are more dupe bug reports about this issue filed to X.

Changed in linux (Ubuntu Natty):
assignee: nobody → Canonical Kernel Team (canonical-kernel-team)
importance: Undecided → High
milestone: none → natty-alpha-3
Changed in xserver-xorg-video-intel (Ubuntu Natty):
milestone: natty-alpha-3 → none
assignee: Canonical Kernel Team (canonical-kernel-team) → nobody
Changed in xorg-server:
importance: Unknown → Critical
status: Unknown → Confirmed
Martin Pitt (pitti) on 2011-03-01
Changed in linux (Ubuntu Natty):
milestone: natty-alpha-3 → ubuntu-11.04-beta-1
Gary M (garym) on 2011-03-04
tags: added: regression-release
Simon Butcher (sbutcher) wrote :

For completeness, in addition to terminal and slashdot, i also experience it with Unity (screenshot attached - see corruption in top right near to mouse pointer).
00:02.0 VGA compatible controller: Intel Corporation 82945G/GZ Integrated Graphics Controller (rev 02)

I'm also seeing this in Thunderbird, my card is:

dermot@jesusboots:~$ lspci | grep VGA
00:02.0 VGA compatible controller: Intel Corporation Mobile 945GM/GMS, 943/940GML Express Integrated Graphics Controller (rev 03)

First time adding anything to a bug report so forgive me if I've left off anything that should be added. For what it's worth, I also saw this in Linux Mint before I ditched it during the week.

Benjamin Drung (bdrung) wrote :

On my system there are font glitches (screenshot attached), but they are not as heavy as in the other screenshots.

$ lspci | grep VGA
00:02.0 VGA compatible controller: Intel Corporation 2nd Generation Core Processor Family Integrated Graphics Controller (rev 09)

System: Up-to-date natty with linux 2.6.38 kernel from the kernel PPA. The drm-next and drm-intel-next kernels have the same issue, the kernel in the official archive produces GPU lockups (bug #718870).

Andy Whitcroft (apw) wrote :

Ok confirmed that reverting 6bda10d152735c22baf1dcd92937420b4b0a359a does resolve the corruption we see in terminal windows (for me at least) but it simply moves the corruption elsewhere. With the revert the corruption it is intended to resolve is back, mostly manifesting as bad icons on the desktop and chromium for me. Discussions continue upstream.

Andy Whitcroft (apw) wrote :

Ok I ahve built some test kernels with a proposed fix applied. Could those of you who are seeing this try out the kernels below and let us know how they fair. The kernels are at the URL below. Please report any testing back here:

    http://people.canonical.com/~apw/lp717114-natty/

Thanks!

Changed in linux (Ubuntu Natty):
status: New → Incomplete
assignee: Canonical Kernel Team (canonical-kernel-team) → Andy Whitcroft (apw)
Simon Butcher (sbutcher) wrote :

Andy
I see massive improvement, i cannot reproduce in terminal or slashdot/firefox yet. However i was able to get the problem to manifest when clicking between files+folders and applications in unity launcher (see attached)

$ uname -a
Linux starpc29a 2.6.38-7-generic #35lp717114v201103171030 SMP Thu Mar 17 10:33:13 UTC 2011 i686 i686 i386 GNU/Linux

Stefano Rivera (stefanor) wrote :

Also makes a massive difference for me. I haven't seen any corruption. Tested the usual triggers: gnome-terminal scrolling / curses, notify-osd on top of video, slashdot.org.

I also can't reproduce Simon's corruption in unity.

On Thu, Mar 17, 2011 at 03:59:43PM -0000, Stefano Rivera wrote:

> I also can't reproduce Simon's corruption in unity.

Talking to upstream this is likely a hardware generation specific
corruption which is similar to but unrelated to this bug/fix. That one
is a userspace fix apparently.

-apw

Andy Whitcroft (apw) wrote :

It seems that the initial fix was triggering some stalls, upstream has produced an updated patch. Could those of you affected please test the newest kernel at the url below. Please report any testing back here:

    http://people.canonical.com/~apw/lp717114-natty/

Thanks!

Changed in linux (Ubuntu Natty):
status: Incomplete → In Progress
status: In Progress → Incomplete
Eric Appleman (erappleman) wrote :

Both versions of the patched kernel fixed the corruption issue wherever I was experiencing it.

tags: added: iso-testing
Benjamin Drung (bdrung) wrote :

I tested linux 2.6.38-7.35lp717114v201103180831, but I still experience font glitches (examples from Evolution attached).

Benjamin Drung (bdrung) wrote :
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package linux - 2.6.38-7.36

---------------
linux (2.6.38-7.36) natty; urgency=low

  [ Andy Whitcroft ]

  * Revert "SAUCE: KLUDGE: work around failed 'shrink-wrap' compiler
    optimisation"
  * purge last vestiges of maverick
  * [Config] switch CONFIG_FB_VESA back to module

  [ Chris Wilson ]

  * SAUCE: drm/i915: Fix pipelined fencing
    - LP: #717114

  [ Loïc Minier ]

  * Include nls_cp437 module in virtual for fat
    - LP: #732046
  * Support arch= cross-compilation for any arch
  * Fix couple of typos in 0-common-vars.mk
  * Enforce DEFAULT_MMAP_MIN_ADDR on armhf
  * Add armhf to Debian -> Linux arch map
  * Add initial armhf.mk
  * Enable common packages for armhf

  [ Upstream Kernel Changes ]

  * Yama: fix default relationship to check thread group
    - LP: #737676
 -- Andy Whitcroft <email address hidden> Fri, 18 Mar 2011 18:18:02 +0000

Changed in linux (Ubuntu Natty):
status: Incomplete → Fix Released
Benjamin Drung (bdrung) wrote :

Should I open a new bug report for my font issues or should we continue in this bug?

Ted Carnahan (tedcarnahan) wrote :

I am also running 2.6.38-7.35lp717114v201103180831 and experiencing as many graphics glitches as before. Most are font-related, although some also affect large swatches of the screen. This primarily seems to affect me when running the latest firefox 4.0 beta, but the bug is never seen when running the same firefox under a 2.6.35 series kernel.

lspci gives:
00:02.0 VGA compatible controller: Intel Corporation Mobile 945GM/GMS, 943/940GML Express Integrated Graphics Controller (rev 03)
00:02.1 Display controller: Intel Corporation Mobile 945GM/GMS/GME, 943/940GML Express Integrated Graphics Controller (rev 03)

What can I do on my end to further help you diagnose this bug?

Bryce Harrington (bryce) wrote :

Closing as fixed since the linux task is closed, and has been validated by several people.

If others are still seeing text corruption issues, it's likely there is are multiple rendering bugs going on, or else that there is something hardware-specific going on. In either case, best next action for you is to file a new bug (you can file against xorg if you want, although like this one they may technically be kernel bugs.) Include a screenshot or photo showing the corruption.

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

Duplicates of this bug

Other bug subscribers

Remote bug watches

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