Bug 34980

Summary: [945GM] glyph corruption
Product: xorg Reporter: Mario Kozjak <spermmail001>
Component: Driver/intelAssignee: Chris Wilson <chris>
Status: RESOLVED FIXED QA Contact: Xorg Project Team <xorg-team>
Severity: normal    
Priority: medium CC: bonbons, daniel, linux, psomas
Version: unspecified   
Hardware: x86 (IA32)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Attachments:
Description Flags
log: Xorg.0.log
none
dmesg
none
Conky glyph screenshot
none
ncmpcpp glyph screenshot
none
Conkeror glyph
none
XFCE Terminal artifacts triggered by mouse wheel
none
Browser glyph 2
none
Fix tiling corruption
none
lspci verbose output none

Description Mario Kozjak 2011-03-03 11:31:23 UTC
Created attachment 44088 [details]
log: Xorg.0.log

[system environment]
-- chipset: 945GM
-- system architecture: i686
-- xf86-video-intel: 2.14.0-2
-- xorg-server (xserver?): 1.9.4-1
-- mesa: 7.10.1-1 (last working: 7.10.0.git20110215-1)
-- libdrm: 2.4.23-2
-- kernel version: 2.6.38-rc7
-- Linux distribution: Arch Linux
-- motherboard model: Hewlett-Packard, 30AA
   00:02.0 VGA compatible controller [0300]: Intel Corporation Mobile 945GM/GMS, 943/940GML Express Integrated Graphics Controller [8086:27a2] (rev 03)
-- window manager: i3

[steps to reproduce]
Occurs randomly on workspace switches on Conky (a monitoring tool) or in Conkeror (a Gecko-based web browser). The text on both is badly displayed, as showed in the attachment. It is crippled always on the same spots of Conky (not sure about Conkeror, or other apps (it didn't occur at all on LibreOffice Writer for now).
The glyph on Conky disappears once Conky redraws its window.
Comment 1 Mario Kozjak 2011-03-03 11:33:26 UTC
Created attachment 44089 [details]
dmesg
Comment 2 Mario Kozjak 2011-03-03 11:34:44 UTC
Created attachment 44090 [details]
Conky glyph screenshot
Comment 3 Mario Kozjak 2011-03-03 14:09:38 UTC
Created attachment 44093 [details]
ncmpcpp glyph screenshot
Comment 4 Mario Kozjak 2011-03-03 14:29:47 UTC
Created attachment 44094 [details]
Conkeror glyph
Comment 5 Stefan Glasenhardt 2011-03-05 08:05:03 UTC
Same happens for me :

Tested with a completely updated Ubuntu 11.04 and additionally with kernel-version 2.6.38rc7 and latest git-version of the intel-driver and libdrm.
Comment 6 legolas558 2011-03-06 06:16:20 UTC
Same issue with XFCE4, can be see on Terminal (see screenshot) and also on Firefox background. It is very easy to trigger it by scrolling the Terminal window with the mouse buffer. Corruptions are likely to apply only within a "page" boundary, so I assume the corrupted area is a finite portion of the whole video memory. Coupled with this issue I have a BSOD-blue screen in place of any video-playing surface (known issue).

[legolas558:~]$ lspci| grep 855
00:00.0 Host bridge: Intel Corporation 82852/82855 GM/GME/PM/GMV Processor to I/O Controller (rev 02)
00:00.1 System peripheral: Intel Corporation 82852/82855 GM/GME/PM/GMV Processor to I/O Controller (rev 02)
00:00.3 System peripheral: Intel Corporation 82852/82855 GM/GME/PM/GMV Processor to I/O Controller (rev 02)
00:02.0 VGA compatible controller: Intel Corporation 82852/855GM Integrated Graphics Device (rev 02)
00:02.1 Display controller: Intel Corporation 82852/855GM Integrated Graphics Device (rev 02)
Comment 7 legolas558 2011-03-06 06:16:59 UTC
Created attachment 44172 [details]
XFCE Terminal artifacts triggered by mouse wheel
Comment 8 Mario Kozjak 2011-03-08 04:44:52 UTC
Same issues with 2.6.38rc8
Comment 9 Alexander Lam 2011-03-08 10:38:49 UTC
seen in firefox 3.6 with drm-intel-next (47ae63e) with and without compositing (xcompmgr)

-- chipset: 945GSE
-- system architecture: i686
-- xf86-video-intel-git: 34f9a33 (configure: Bump for 2.14.901 snapshot)
-- xorg-server: 1.9.4-1
-- mesa: 7.10.1
-- libdrm-git: 3b04c73 (libdrm: oops fix get cap return value.)
-- kernel version: drm-intel-next (47ae63e)
-- Linux distribution: Arch Linux
-- Laptop: Acer Aspire One AOA150/ZG5
Comment 10 Bruno 2011-03-14 13:42:10 UTC
I'm seeing similar corruption on my i855 (Acer TM66x):
00:02.0 VGA compatible controller [0300]: Intel Corporation 82852/855GM Integrated Graphics Device [8086:3582] (rev 02)
00:02.1 Display controller [0380]: Intel Corporation 82852/855GM Integrated Graphics Device [8086:3582] (rev 02)

Software (Gentoo): xf86-video-intel-2.14.901, libdrm-2.4.24, xorg-server-1.9.4, Enlightenment 17, 2.6.38-rc8-00026-g8fc9a4ed-dirty (dirty is
   Revert "drm/i915: Completely disable fence pipelining."

   This reverts commit 6bda10d152735c22baf1dcd92937420b4b0a359a
which ickle suggested to try and which reduced amount of corruption in xchat)

Most often corruption affects xchat (timestamp and nick in chat log) but periodically it also corrupts desktop background (until now always the same area of it) or Enligthenment's shelves. (no compositing)

The corruptions do seem to happen mostly when multiple applications are running (right after system startup there are no corruptions yet and when having closed most apps before shutdown corruptions are not not showing up anymore either).
Comment 11 Mario Kozjak 2011-03-15 12:04:45 UTC
Same happens with mainline 2.6.38.
Comment 12 Mario Kozjak 2011-03-16 07:12:31 UTC
Created attachment 44500 [details]
Browser glyph 2

Happens every time I switch from http://www.vimeo.com/7838039 to http://www.vimeo.com/8138614.
Comment 13 Chris Wilson 2011-03-18 02:53:02 UTC
Created attachment 44573 [details] [review]
Fix tiling corruption

Please try this kernel (linus/master) patch along with an updated userspace.
Comment 14 Oleksij Rempel 2011-03-18 05:38:37 UTC
Seems to be fixed.
Thank you!
Comment 15 Bruno 2011-03-19 15:24:17 UTC
(In reply to comment #13)
> Created an attachment (id=44573) [details]
> Fix tiling corruption
> 
> Please try this kernel (linus/master) patch along with an updated userspace.

This reduces corruptions a lot on 2.6.38 (manually applied/adapted as it does not apply/compile cleanly) for my i855 (c.f. comment #10) but there are some corruptions left, e.g. when scrolling a lot in xchat but also sometimes on enlightenment shelves.
So some flush/fence is probably still missing/wrong.
Comment 16 Chris Wilson 2011-03-19 15:44:52 UTC
Hmm, I've reports of xchat corrupting on scrolling from long ago. Similar to the firefox bug where it copies from outside its window...

The enlightenment shelves I'm not aware of nor recognise what you mean.
Comment 17 Bruno 2011-03-19 16:39:09 UTC
(In reply to comment #16)
> Hmm, I've reports of xchat corrupting on scrolling from long ago. Similar to
> the firefox bug where it copies from outside its window...
> 
> The enlightenment shelves I'm not aware of nor recognise what you mean.

The enlightenment shelves are like KDE's kicker. Corruption looks like tiling issue (at bo tiling/format change?) though it mostly happens when one is not prepared to shoot a screenshot (but does not happen often).

In xchat corruption also happens on repaint when a menu which was above it disappears (so not only when scrolling)

Both cases seem to require much painting activity (when recycling video memory?)
Comment 18 Chris Wilson 2011-03-20 00:24:42 UTC
Ok, I think I know the other bug. Bruno, on gen2, there is a second bug where we needed to allocate an even number of tile rows, failure to do so caused rendering corruption at the bottom of images.

Try xf86-video-intel commit d21d781466785c317131a8a57606925867265dc8
Author: Daniel Vetter <daniel.vetter@ffwll.ch>
Date:   Tue Feb 22 18:31:44 2011 +0100

    Fix relaxed tiling on gen2
    
    Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>

[in 2.14.901]
Comment 19 Mario Kozjak 2011-03-24 08:46:35 UTC
Tried applying Wilson's patch on 2.6.38.1. First hunk succeeds and the second one fails. Still having corruptions without the patch.
Comment 20 Stratos Psomadakis 2011-04-19 06:58:54 UTC
(In reply to comment #18)
> Ok, I think I know the other bug. Bruno, on gen2, there is a second bug where
> we needed to allocate an even number of tile rows, failure to do so caused
> rendering corruption at the bottom of images.
> 
> Try xf86-video-intel commit d21d781466785c317131a8a57606925867265dc8
> Author: Daniel Vetter <daniel.vetter@ffwll.ch>
> Date:   Tue Feb 22 18:31:44 2011 +0100
> 
>     Fix relaxed tiling on gen2
> 
>     Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
> 
> [in 2.14.901]
I had the same corruption issues with i915 driver, after 2.6.38.2...
2.6.39-rc with the 'fix tiling corruption' patch didn't work, but 2.6.38 with xf86-video-intel-2.15, which includes the above patch('fix relaxed tiling on gen2') did work, and resolved the corruption issues...
thanks!
Comment 21 Daniel Vetter 2011-04-19 07:08:03 UTC
xf86-video-intel release 2.15 completely disables relaxed tiling for
gen2 and older gen3 chips.
It was too broken. Adding
  Option "RelaxedFencing" "true"
in the Driver section of your xorg.conf will reenable that. If that's
the case, it'd be great if
you could take a screenshot of the corruptions your seeing (and on
what exact chipset).

Thanks, Daniel
Comment 22 Stratos Psomadakis 2011-04-19 07:22:20 UTC
Created attachment 45818 [details]
lspci verbose output

(In reply to comment #21)
> xf86-video-intel release 2.15 completely disables relaxed tiling for
> gen2 and older gen3 chips.
> It was too broken. Adding
>   Option "RelaxedFencing" "true"
> in the Driver section of your xorg.conf will reenable that. If that's
> the case, it'd be great if
> you could take a screenshot of the corruptions your seeing (and on
> what exact chipset).
> 
> Thanks, Daniel
I enabled RelaxedFencing in xorg.conf:
[  1522.843] (**) intel(0): Option "RelaxedFencing" "true"
[  1522.843] (**) intel(0): Relaxed fencing enabled

However, with intel-2.15, even with RelaxedFecning enabled, I don't see any screen/graphics corruptions(with 2.6.38 kernel).
Comment 23 Eugeni Dodonov 2011-08-30 12:48:26 UTC
Can this be closed then?
Comment 24 Daniel Vetter 2011-08-31 23:36:18 UTC
On Tue, Aug 30, 2011 at 12:48:27PM -0700, bugzilla-daemon@freedesktop.org wrote:
> Can this be closed then?

As fas as I know this commit (merged into 3.0)

commit e28f87116503f796aba4fb27d81e2c3d81966174
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Mon Jul 18 13:11:49 2011 -0700

    drm/i915: Fix unfenced alignment on pre-G33 hardware

fixed the last known tiling/fencing issues on i945 and earlier chips.

Please reopen the bug if this is not true for you. 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.