Bug 28798 - [2.12 regression] Intel driver incorrectly renders some UI elements
Summary: [2.12 regression] Intel driver incorrectly renders some UI elements
Status: RESOLVED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: Driver/intel (show other bugs)
Version: git
Hardware: All Linux (All)
: medium normal
Assignee: Chris Wilson
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords: NEEDINFO
: 28871 30157 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-06-28 09:23 UTC by Toralf Förster
Modified: 2011-07-06 07:33 UTC (History)
6 users (show)

See Also:
i915 platform:
i915 features:


Attachments
screen shot of the wired corners (4.45 KB, image/jpeg)
2010-06-28 09:23 UTC, Toralf Förster
no flags Details
w/o issue (2.11) (3.63 KB, image/jpeg)
2010-06-28 09:24 UTC, Toralf Förster
no flags Details
Test case (76.41 KB, application/x-ms-dos-executable)
2011-04-20 00:01 UTC, Jaime Rave
no flags Details
Screenshot illustrating the rendering issue in Word 2007 (wine) (139.46 KB, image/png)
2011-04-26 15:57 UTC, quentin.denis
no flags Details
Strange Rendering on certain textures (490.56 KB, image/png)
2011-05-10 12:53 UTC, jinx.wolf
no flags Details

Description Toralf Förster 2010-06-28 09:23:39 UTC
Created attachment 36578 [details]
screen shot of the wired corners

I'm running wine-1.2-rc5 under a mostly stable Gentoo.

After I upgraded the driver from 2.11.0 to 2.12.0 the issue appeared.
Comment 1 Toralf Förster 2010-06-28 09:24:08 UTC
Created attachment 36579 [details]
w/o issue (2.11)
Comment 2 Chris Wilson 2010-06-28 12:33:45 UTC
Spans, I'd guess. Is the right response to tell Wine to not use an interface so stupid? ;-)
Comment 3 Toralf Förster 2010-06-29 10:10:29 UTC
(In reply to comment #2)
> Spans, I'd guess. Is the right response to tell Wine to not use an interface so
> stupid? ;-)
http://bugs.winehq.org/show_bug.cgi?id=23424#c9
Comment 4 Toralf Förster 2010-10-11 05:19:51 UTC
Because the issue still exists in wine-1.3.34 + intel-2.13 pleae could somebdoy respond to http://bugs.winehq.org/show_bug.cgi?id=23424#c9 ?
Comment 5 Toralf Förster 2010-11-04 05:13:55 UTC
(In reply to comment #2)
> Spans, I'd guess. Is the right response to tell Wine to not use an interface so
> stupid? ;-)
Please could you give (me) a more detailed explanation. The wine people are convinced that the issue is related to the intel driver : http://bugs.winehq.org/show_bug.cgi?id=23424#c12
Comment 6 Toralf Förster 2010-11-25 04:35:46 UTC
I bisected this issue to :

tfoerste@n22 ~/devel/xf86-video-intel $ git bisect bad
3055d40164590147d35b5e7059ebe5f5858c85fa is the first bad commit
commit 3055d40164590147d35b5e7059ebe5f5858c85fa
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Wed May 26 10:12:57 2010 +0100

    uxa: Use Composite rather than solid blitter for PolyRect
    
    Due to the relocation overhead, using a single composite with many
    rectangles outperforms many solid blits.
    
    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>

:040000 040000 8c45b1f393d14319f9a096ab1ad92a1f06e634f0 b3604c38de001d403bd9c2e4a4e11d921079e1fd M      uxa


In case that this commit doesn't introduce a bug - but triggers an issue somewhere else - an appropriate answer is appreciated.

TIA
Comment 7 Artem S. Tashkinov 2011-03-15 17:15:36 UTC
*** Bug 30157 has been marked as a duplicate of this bug. ***
Comment 8 Artem S. Tashkinov 2011-03-15 17:15:51 UTC
*** Bug 28871 has been marked as a duplicate of this bug. ***
Comment 9 André Brait 2011-03-15 20:00:28 UTC
Thanks, Artem, for tracking the bug to its first report.

I hope people use the info found on the other two bug reports to fix this.
Comment 10 Jaime Rave 2011-04-20 00:01:19 UTC
Created attachment 45844 [details]
Test case

I have created a minimum testcase using as base the code on http://zetcode.com/tutorials/winapi/controlsII/

You can see there how the trackbar should looks. If you want the source code just let me know.
Comment 11 quentin.denis 2011-04-26 15:56:47 UTC
Any bugfix in sight? This bug starts being very annoying, wine developers won't accept to take the issue on their shoulders.
Comment 12 quentin.denis 2011-04-26 15:57:45 UTC
Created attachment 46102 [details]
Screenshot illustrating the rendering issue in Word 2007 (wine)
Comment 13 Artem S. Tashkinov 2011-04-26 16:09:15 UTC
(In reply to comment #10)
> Created an attachment (id=45844) [details]
> Test case
> 
> I have created a minimum testcase using as base the code on
> http://zetcode.com/tutorials/winapi/controlsII/
> 
> You can see there how the trackbar should looks. If you want the source code
> just let me know.

I wrote almost the same testcase almost a year earlier :)

https://bugs.freedesktop.org/show_bug.cgi?id=28871#c3

(In reply to comment #11)
> Any bugfix in sight? This bug starts being very annoying, wine developers won't
> accept to take the issue on their shoulders.

Why should they? It's an Intel driver bug.
Comment 14 Gustavo Ansaldi Oliva 2011-05-02 23:53:59 UTC
(In reply to comment #2)
> Spans, I'd guess. Is the right response to tell Wine to not use an interface so
> stupid? ;-)

Hi Chris. Have you got any clues about this bug? I'm another one who's having problems with this issue... Thanks!
Comment 15 Md Imam Hossain 2011-05-08 21:15:04 UTC
confirm with:

Ubuntu 10.10
Linux 2.6.37-02063706-generic
libdrm 2.4.24
Xserver 1.9.2.901
xf86-video-intel 2.14.0

Mostly WINE apps
Comment 16 jinx.wolf 2011-05-10 12:53:10 UTC
Created attachment 46567 [details]
Strange Rendering on certain textures

I highly suspect this is related as well. I'm also having several other issues with rendering 3D graphics.

This was tested on Slackware 13.1, Slackware 13.37, Ubuntu 10.04, Ubuntu 11.04, and Debian Testing. I have an Intel Core i5 M540 with GMA HD graphics.

Using Intel driver version 2.11.0:
Most textures loaded properly, however, performance was very poor, and anything that used 3D acceleration randomly crashed. The following are screenshots of Eve Online using this driver.
http://imageshack.us/f/801/201105090341161920x1080.png/
http://imageshack.us/f/801/201105090341161920x1080.png/
However, planet textures were distorted, and looking at them caused the game to crash. Look in the lower right corner of the following screenshot.
http://imageshack.us/f/651/201105090348131920x1080.png/

Using Intel driver version 2.13.0 or higher:
Performance has improved greatly, and the random crashing has ceased. There are several black artifacts that float around certain textures, and some textures render like the attached file. This isn't limited to Eve Online, almost ALL of Portal 2 renders with that odd looking texture, and the more textures that load like that in a room, the slower the game gets. The following screenshots are of eve after updating the the latest Intel drivers.
[The title screen's picture didn't clearly show the artifacts floating around]
http://imageshack.us/f/684/201105101422011920x1080.png/
Notice how the above screenshot's background is filled with little gray blocks.
Planets load just fine:
http://imageshack.us/photo/my-images/14/201105101421291920x1080.png/

As you can see, it's mostly in WINE apps, but I've had a few problems with some Linux natives as well (i.e. blender)

Sorry if this is a bit lengthy, but I wanted to explain EVERYTHING that's going on.
Comment 17 Eric Anholt 2011-06-05 21:35:28 UTC
(original reporter:) Please retest with the 2D driver as of:

commit e0066e77e026b0dd0daa0c3765473c7d63aa6753
Author: Eric Anholt <eric@anholt.net>
Date:   Tue May 31 23:17:16 2011 -0700

    uxa: Simplify Composite solid acceleration for spans by only clipping once.
    
    Unlike the previous commit removing this style of code, the code in
    this one was originally wrong, and would fail to clip in the second
    pass of clipping when y was > pbox->y2.
    
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=37233
    Reviewed-by: Keith Packard <keithp@keithp.com>
Comment 18 Toralf Förster 2011-06-06 01:55:40 UTC
(In reply to comment #17)
> (original reporter:) Please retest with the 2D driver as of:
No, issue still exists - although it is the right place to look for b/c that piece of source code was bisected to be the culprit : https://bugs.freedesktop.org/show_bug.cgi?id=28798#c6
Comment 19 quentin.denis 2011-06-13 02:54:38 UTC
Ok, this bug is almost one year old, and still no proper solution. You might have heard that the intel driver has now a much higher performance thanks to SNA. I was told that compiling the latest git with SNA enabled should fix this rendering issue. I tried, but the result was not very satisfying. If you want to try:

1. git clone git://git.freedesktop.org/git/xorg/driver/xf86-video-intel
2. ./autogen (you may require a newer proto/dri2 version. In this case, just edit configure.ac and set proto version to 2.3. You will have to remove/uncomment DRI2BufferHiz in sna_dri.c and intel_dri.c and it will not complain during compilation)
3. ./configure --enable-sna
4. make
5. cp /usr/local/lib/xorg/modules/drivers/intel_drv.so /usr/lib64/xorg/modules/drivers/ (or similar on 32bit) MAKE A BACKUP OF YOUR DRIVER BEFORE OVERRIDING!

Try the driver, and the performance with glxgears. I would recommend you to discuss your feedback in #intel-gfx on freenode, they are quite open to work out a solution. Lets get this bug fixed, together with our feedbacks!
Comment 20 Md Imam Hossain 2011-06-13 07:47:04 UTC
tested on:

Ubuntu 10.10
Linux 2.6.38-02063807-generic
libdrm 2.4.24
Xserver 1.9.3
xf86-video-intel git 2facaa910798c0e7adb34345e6d6913849b7d8a3 with --enable-sna
Mesa 7.11-devel mesa-ef59049c5242a1be7fa59a182d342191185dd62b

xf86-video-intel ask for dri2proto-2.6 but I can only see dri2proto-2.4 from this site:
http://www.x.org/releases/individual/proto/

At first I installed dri2proto-2.4 and modified configure.ac of xf86-video-intel, to allow compile with dri2proto-2.4 and then xf86-video-intel compile breaks on sna_dri.c and intel_dri.c source files saying DRI2BufferHiz is undeclared. Then I comment out DRI2BufferHiz from both sna_dri.c and intel_dri.c files from xf86-video-intel and finish compiling and installing.

When I restart X with new xf86-video-intel, everything is non-responsive and incredibly slow. In spite of that I tested WINE and Microsoft Office 2007 with WINE and it seems that the problem is not there anymore. It seems to be fixed.

Thank you
Comment 21 André Brait 2011-06-14 01:01:32 UTC
(In reply to comment #20)
> tested on:
> 
> Ubuntu 10.10
> Linux 2.6.38-02063807-generic
> libdrm 2.4.24
> Xserver 1.9.3
> xf86-video-intel git 2facaa910798c0e7adb34345e6d6913849b7d8a3 with --enable-sna
> Mesa 7.11-devel mesa-ef59049c5242a1be7fa59a182d342191185dd62b
> 
> xf86-video-intel ask for dri2proto-2.6 but I can only see dri2proto-2.4 from
> this site:
> http://www.x.org/releases/individual/proto/
> 
> At first I installed dri2proto-2.4 and modified configure.ac of
> xf86-video-intel, to allow compile with dri2proto-2.4 and then xf86-video-intel
> compile breaks on sna_dri.c and intel_dri.c source files saying DRI2BufferHiz
> is undeclared. Then I comment out DRI2BufferHiz from both sna_dri.c and
> intel_dri.c files from xf86-video-intel and finish compiling and installing.
> 
> When I restart X with new xf86-video-intel, everything is non-responsive and
> incredibly slow. In spite of that I tested WINE and Microsoft Office 2007 with
> WINE and it seems that the problem is not there anymore. It seems to be fixed.
> 
> Thank you

Hm... so, it's worse than 2.11? Because that leaves us nowhere, I think.
Comment 22 Md Imam Hossain 2011-06-14 04:08:04 UTC
(In reply to comment #21)
> (In reply to comment #20)
> > tested on:
> > 
> > Ubuntu 10.10
> > Linux 2.6.38-02063807-generic
> > libdrm 2.4.24
> > Xserver 1.9.3
> > xf86-video-intel git 2facaa910798c0e7adb34345e6d6913849b7d8a3 with --enable-sna
> > Mesa 7.11-devel mesa-ef59049c5242a1be7fa59a182d342191185dd62b
> > 
> > xf86-video-intel ask for dri2proto-2.6 but I can only see dri2proto-2.4 from
> > this site:
> > http://www.x.org/releases/individual/proto/
> > 
> > At first I installed dri2proto-2.4 and modified configure.ac of
> > xf86-video-intel, to allow compile with dri2proto-2.4 and then xf86-video-intel
> > compile breaks on sna_dri.c and intel_dri.c source files saying DRI2BufferHiz
> > is undeclared. Then I comment out DRI2BufferHiz from both sna_dri.c and
> > intel_dri.c files from xf86-video-intel and finish compiling and installing.
> > 
> > When I restart X with new xf86-video-intel, everything is non-responsive and
> > incredibly slow. In spite of that I tested WINE and Microsoft Office 2007 with
> > WINE and it seems that the problem is not there anymore. It seems to be fixed.
> > 
> > Thank you
> 
> Hm... so, it's worse than 2.11? Because that leaves us nowhere, I think.

No, the problem seems to be fixed but there is performance regression that I experienced. I guess that's because I was not using latest Xserver 1.10 and kernel and I modified the source to work this on Xserver 1.9.3

Since Xserver 1.10 is recommended for xf86-video-intel 2.15.0 and up
http://intellinuxgraphics.org/2011Q1.html
the performance and responsiveness problems maybe because I forced it to run on older version of X.

I cannot get latest X because I am using Ubuntu 10.10
Comment 23 Sameer Morar 2011-06-14 12:05:11 UTC
If this issue is indeed fixed, can someone point out the commit that fixes it?
This can be determined by bisecting through the source repository - anyone up to the challenge?

It would make it easier for distributions to port the fix into their currently released versions of the intel video driver. Of course, if the fix relies on too much new infrastructure, this may not be possible.
Comment 24 Chris Wilson 2011-06-16 05:42:30 UTC
The code is gone:

commit 855ced5a4eb67e287001ae22cb6489639c548cfa
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Thu Jun 16 13:24:14 2011 +0100

    uxa: Remove the attempt to use the 3D pipeline for core rendering
    
    The attempt was still ridden with bugs, such as
    
    http://bugs.freedesktop.org/show_bug.cgi?id=28768
    http://bugs.freedesktop.org/show_bug.cgi?id=28798
    http://bugs.freedesktop.org/show_bug.cgi?id=28908
    http://bugs.freedesktop.org/show_bug.cgi?id=29401
    
    A fresh approach was taken with SNA, but in the mean time before that
    can be enabled downstream, restore correct behaviour.
    
    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Comment 25 Toralf Förster 2011-06-16 06:13:50 UTC
(In reply to comment #24)
> The code is gone:
> 
> commit 855ced5a4eb67e287001ae22cb6489639c548cfa
and works well :-)

at least at my ThinkPad T400 I used 2.15.0 + 83948ab..29c04fd + 855ced5 patches on top of it - and all graphic glitches went away AFAICS.
Comment 26 Sameer Morar 2011-06-28 06:45:38 UTC
I have created packages to test the fix from commit 855ced for ubuntu natty (11.04) and oneiric (11.10): https://launchpad.net/~smorar/+archive/bugfixes
Comment 27 Gustavo Ansaldi Oliva 2011-06-28 21:05:09 UTC
(In reply to comment #26)
> I have created packages to test the fix from commit 855ced for ubuntu natty
> (11.04) and oneiric (11.10): https://launchpad.net/~smorar/+archive/bugfixes

This works like a charm in my Thinkpad T410! Thanks for the superb work. This bug has affected us for a long time.
Comment 28 Md Imam Hossain 2011-07-06 07:33:54 UTC
surprisingly, this bug only happens when using Gnome Desktop.

Tested Ubuntu 11.04 Gnome Desktop bug present
Kubuntu 11.04 KDE desktop no bug at all!

I am using Kubuntu now and I really enjoy KDE desktop, much faster.

Kubuntu 11.04
Linux 2.6.38-8-generic
libdrm-2.4.25
dri2proto-7fd18b15646a62bd82a4eb0eca60a34c1731813d
xf86-video-intel-98f2e3855d70c02b05e2721a70ebce0c17e44283 without sna!
mesa-962dab948609c97c1c01fde6a27e19307948d302

Intel GMA 4500 256MB

Should we file bug to Gnome!


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.