Bug 10245

Summary: Mouse cursor glitches with r300 in some OpenGL applications
Product: Mesa Reporter: Giacomo Perale <ghepeu>
Component: Drivers/DRI/r300Assignee: Default DRI bug account <dri-devel>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: medium    
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments: Mouse cursor glitches.
New mouse glitches.
Xorg.0.log
Window border glitches.

Description Giacomo Perale 2007-03-10 09:39:15 UTC
I'm noticing some glitches with the mouse cursors with some OpenGL applications. 

The glitches appears frequently but not always; I didn't take notes but I estimate that this bug occurs roughly 4 times out of 5. The affected applications so far are stellarium and lowfat (maybe others are affected but I don't use GL application often).

The glitches, usually some apparently randomly arranged white dots, move with the mouse cursor and once they appear (after some seconds up to some minutes of use) the only way to make them disappear is to close and restart the application; they can however return in the new instance.

The glitches pattern is random, but once they appear the pattern doesn't change until the application is closed and restarted. In the next comment I'll attach a pictures of the mouse cursor area.

Using Xorg 7.2 (xorg-server-1.2.0), xf86-video-ati 6.6.3 and mesa 6.5.2, on a Radeon X550 (RV370) 5B63 (PCIE).
Comment 1 Giacomo Perale 2007-03-10 09:39:55 UTC
Created attachment 9078 [details]
Mouse cursor glitches.
Comment 2 Giacomo Perale 2007-03-10 18:21:33 UTC
I had an idea and I restarted X with EXA instead of XAA; I tried both stellarium and lowfat and I could not reproduce the problem. However I don't if it is because the problem is related to XAA or if I was just lucky.

Normally I don't use EXA because Render Acceleration is unsupported with R300 cards and moving windows around is jerkier than with XAA.

xorg.conf relevant section (XAA):

Section "Device"
    Identifier  "ATI Radeon X550"
    Driver      "radeon"
    Option      "RenderAccel"    "on"
    Option      "AccelMethod"    "xaa"
    Option      "EnablePageFlip" "True"
    Option      "XAANoOffscreenPixmaps"
EndSection


xorg.conf relevant section (EXA):

Section "Device"
    Identifier  "ATI Radeon X550"
    Driver      "radeon"
    Option      "RenderAccel"    "on"
    Option      "AccelMethod"    "exa"
    Option      "AccelDFS"       "on" 
    Option      "EnablePageFlip" "on"
EndSection
Comment 3 Giacomo Perale 2007-03-11 04:24:57 UTC
Created attachment 9080 [details]
New mouse glitches.

> The glitches pattern is random, but once they appear the pattern doesn't change
> until the application is closed and restarted. In the next comment I'll attach
> a pictures of the mouse cursor area.

Apparently I was wrong, it seems that the glitches change over time. I was playing with lowfat and initially the glitches were similar to the previous screenshot, then after some minutes they were like the screenshot attached to this comment.
Comment 4 Michel Dänzer 2007-03-12 01:32:58 UTC
Please attach the full Xorg.0.log.
Comment 5 Giacomo Perale 2007-03-12 01:43:55 UTC
Created attachment 9102 [details]
Xorg.0.log

I upgraded to xorg-server 1.2.99.901, no changes.
Comment 6 Michel Dänzer 2007-03-12 01:51:44 UTC
Does this also happen with Option "ColorTiling" "off" or without page flipping?
Comment 7 Giacomo Perale 2007-03-12 02:23:36 UTC
(In reply to comment #6)
> Does this also happen with Option "ColorTiling" "off" or without page flipping?
> 

ColorTiling On   PageFlipping On:	glitches
ColorTiling On   PageFlipping Off:	no glitches
ColorTiling Off  PageFlipping On:	no glitches
ColorTiling Off  PageFlipping Off:      no glitches

PS. Is it normal if there was no message acknowledging that ColorTiling was disabled?
Comment 8 Roland Scheidegger 2007-03-12 04:18:23 UTC
(In reply to comment #7)
> (In reply to comment #6)
> > Does this also happen with Option "ColorTiling" "off" or without page flipping?
> > 
> 
> ColorTiling On   PageFlipping On:       glitches
> ColorTiling On   PageFlipping Off:      no glitches
> ColorTiling Off  PageFlipping On:       no glitches
> ColorTiling Off  PageFlipping Off:      no glitches
> 
> PS. Is it normal if there was no message acknowledging that ColorTiling was
> disabled?
I thought no, but looking at the code apparently it is...

Do you run lowfat/stellarium in full screen mode? If so could you try it windowed? It may be possible due to some bug the 3d driver writes beyond the screen area by 1 line, which due to tiling would mess up the hw cursor area (just behind the front screen buffer). At least that would explain why it only happens with both pageflip and tiling (without pageflip, typical gl apps only render to back buffer, without tiling, it wouldn't hit the cursor area since there are 2 lines reserved after front buffer).
Comment 9 Giacomo Perale 2007-03-12 04:34:42 UTC
Created attachment 9104 [details]
Window border glitches.

> Do you run lowfat/stellarium in full screen mode? If so could you try it
> windowed? It may be possible due to some bug the 3d driver writes beyond the
> screen area by 1 line, which due to tiling would mess up the hw cursor area
> (just behind the front screen buffer). At least that would explain why it only
> happens with both pageflip and tiling (without pageflip, typical gl apps only
> render to back buffer, without tiling, it wouldn't hit the cursor area since
> there are 2 lines reserved after front buffer).

I think you're right: I'm doing these tests with lowfat, because I can quickly cause the glitches with it, and launching the program in a window the mouse glitches DO NOT appear.
Moreover, the lowfat window isn't "grabbed" by metacity and just one pixel out the window border you can see some moving dots (see attached screenshot).
Comment 10 Giacomo Perale 2007-03-12 04:45:56 UTC
> Moreover, the lowfat window isn't "grabbed" by metacity and just one pixel out
> the window border you can see some moving dots (see attached screenshot).
> 

These white dots happen only with both ColorTiling and PageFlipping enabled, so apparently they're related.
Comment 11 Giacomo Perale 2007-04-02 02:18:41 UTC
Hello, I upgraded yesterday to xf86-video-ati 6.6.191 and I can't reproduce the first problem (glitches in the mouse pointer area) anymore. The glitches 1 pixel out of the window border when not using fullscreen are still there, however.
Comment 12 Benjamin Close 2008-01-11 02:38:31 UTC
Bugzilla Upgrade Mass Bug Change

NEEDSINFO state was removed in Bugzilla 3.x, reopening any bugs previously listed as NEEDSINFO.

  - benjsc
    fd.o Wrangler
Comment 13 Giacomo Perale 2008-01-11 03:18:47 UTC
Problem disappeared sometime in the last months.

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.