Bug 19215

Summary: cursor corruption when moving over vertical 'strips' of the screen
Product: xorg Reporter: Alex <alex.j.crowe>
Component: Driver/RadeonAssignee: xf86-video-ati maintainers <xorg-driver-ati>
Status: RESOLVED INVALID QA Contact: Xorg Project Team <xorg-team>
Severity: normal    
Priority: medium CC: ancoron, arequipeno, bugzi11.fdo.tormod, christopher.m.penalver, florian.eberle, graeter, mandor, myxiplx, puetzk, rodrigo, stephen.boddy, theseven, yang
Version: 7.4 (2008.09)   
Hardware: All   
OS: Linux (All)   
URL: https://bugs.launchpad.net/bugs/320771
Whiteboard:
i915 platform: i915 features:
Attachments:
Description Flags
Pic of corruption
none
Pic of corruption, edited to illistrate the area affected
none
Pic of corruption, second type, single pixel
none
behavior of "type 1" corruption
none
"type 1" and "type 2" areas on my dual-head
none
"type 3" corruption
none
Xorg.0.log when corruption present none

Description Alex 2008-12-21 05:10:06 UTC
Created attachment 21346 [details]
Pic of corruption

System:

Radeon X1900GT 256MB (R580)
Abit AB9 PRO
Core2Duo E6300
Ubuntu 8.10 

Display Setup:

Dual 20" LCD's (2x 1680x1050)

Problem:

When moving the cursor across the desktop 'strips' of the screen (see attached photo) corrupt the display. This only affect the cursor and does not effect the windows. 

there appears to be two types of corruption, thicker and thinner. thinner might only be 1 pixel and the thicker could be say 10-15 pixels.

I have seen this in both the stock Ubuntu 8.10 xserver-xorg-video-radeon driver and a newer git build (20081129).

First bug report, so please do ask for more information.
Comment 1 Alex 2008-12-21 05:11:11 UTC
Created attachment 21347 [details]
Pic of corruption, edited to illistrate the area affected
Comment 2 Alex 2008-12-21 05:12:30 UTC
Created attachment 21348 [details]
Pic of corruption, second type, single pixel
Comment 3 Ancoron 2009-01-23 11:21:11 UTC
I have exactly the same issue here.

To me it appears that this issue only appears on the second display and it mostly takes some time until this issue appears. At least for me from the beginning all things are fine.

I sometimes use KDE4 or XFCE using Ubuntu 8.10 and when using XFCE it appears within minutes whereas in KDE it take several hours of work until the corruption appears.

All methods to get that corrupted mouse pointer captured failed and in framebuffer mode it doesn't seem to appear, so it is likely to be a problem in the driver.

In addition to the corruptions that Alex mentioned I have an additional corruption with the mouse pointer itself. When I see that corruption the cursor can sometimes be corrected by moving the mouse into the first display and back again.

I'm using a RV515 (ATI Radeon X1300) although the driver complains in the Xorg.0.log that DRI may not work correctly for R600 cards. (???)
Comment 4 Ancoron 2009-01-23 11:24:59 UTC
Created attachment 22182 [details]
behavior of "type 1" corruption

This is an exact reproduction of the "type 1" mouse pointer corruption as I can see it.
Comment 5 Ancoron 2009-01-23 11:28:34 UTC
Created attachment 22183 [details]
"type 1" and "type 2" areas on my dual-head

I managed to exectly find out at which positions the corruption areas are on my system. I created that image (2560x1024) because there may be some mathematical logic in there.
Comment 6 Ancoron 2009-01-23 11:32:36 UTC
Created attachment 22184 [details]
"type 3" corruption

I am experiencing this corruption in addition to the other two ones which always come together. This one seem to appear a bit later and it is not restricted to areas.

Sometimes it is only visible on the second display but after some time it also gets to the first display.
Comment 7 myxiplx 2009-02-06 02:18:06 UTC
I've been hit by this too, but had reported it on the Ubuntu site:
https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-video-ati/+bug/320771

With help from there we've found that:
- This only happens with the free driver (ATI's driver is fine)
- It only happens with two monitors connected (one monitor is fine)
- It only happens with the hardware cursor  SWcursor=true removes the problem.

It looks to me like the interference bands are 20 pixels wide, and repeated every 250 pixels across the screen, on both screens. Locations I've measured (very approximately) are:
1770 - 1989
2025 - 2045
2290 - 2299
2540 - 2559

It may also be worth knowing that this issue only occurs on my home computer, not at work, with the main differences between them being:

Home:  ATI 1950 Pro, 1x DVI monitor @1280x1024, 1x VGA monitor @1680x1050
Work:  ATI 2600XT, 2x DVI monitors @1920x1200
Comment 8 Michael Sparmann 2009-02-14 11:03:11 UTC
Same issue here, I get flickering black and white lines when the cursor is in those approx. 20 pixel wide corruption bands on both screens, with the following setup:
ATI Radeon Mobile X1400, Internal LCD @1680x1050, VGA monitor @1920x1200
Comment 9 Matthias Hopf 2009-02-18 06:22:22 UTC
Bug 13405 is a duplicate, only this time it's on the radeonhd driver.
Comment 10 Steve 2009-03-10 10:49:01 UTC
Something that might be relevant: The corruption appears to be visible when the cursor spans a strip that is the last 10 or so pixels of the stride value given here:
http://cgit.freedesktop.org/xorg/driver/xf86-video-ati/tree/src/radeon_cursor.c#n204
i.e. pixels where x=245 to 255. This could be expressed as every (256*n-10) to (256*n) where n>=1. If you use a jumbo sized pointer you can see that the strips of cursor on either side of the range given are OK.

There is an additional corruption which is seen as the cursor vertically bouncing. This occurs at 204+(256*n) where n>=0.

I see both symptoms on both screens with an X1400 Lenovo Z61m using LVDS (1680x1050) and CRT (1280x1024). According to xdpyinfo these are treated as screen #0 @ 2960x1050 pixels.

This was with 6.11.0.99+git20090305.5dc4b69f-0ubuntu0tormod~intrepid package.
Comment 11 Ancoron 2009-03-10 15:55:21 UTC
I'm currently also experiencing corruptions type 2 and 3 in an irregular basis across two screens using the proprietary fglrx driver (8.54.3) with a Radeon HD2400 PRO PCI-E. It is not really a problem because it appears and then it takes a few minutes and the corruption is gone completely.

This is rather unusual and I didn't had such issues previously using Ubuntu 8.04 but now I did a fresh install of Kubuntu 8.10. In addition it indicates that this may not be a bug in the xrandr implementation as stated in some other bug as the fglrx 8.54.3 doesn't use xrandr.

Machine data:
- AMD Athlon 64 X2 4400+ Dual-Core @ 2.3 GHz
- ATI Radeon HD 2400 PRO (RV610, PCI-E)
- 2x 19" CRT @ 1280x1024@85Hz each

Software stack:
- Kubuntu Intrepid Ibex (8.10)
- Kernel 2.6.27.11-generic x64_64
- X.org 7.4.2.0
- fglrx 8.54.3.2 (BigDesktop mode)
- KDE 4.1.3

All drivers/software from the repos as I couldn't get the newer fglrx drivers to work with my two monitors. Xrandr implementations doesn't seem to be stable yet. In addition xrandr implementation in the drivers often use modes that are not appropriate for CRT's.


Might this be a result of shared code between the proprietary driver and the free ones? I know that AMD already pushed a lot of code out to the world for free use and this code might be buggy. As these corruptions can be seen regardless of the Hardware actually used (or at least in a range of chips R5xx-R6xx) and regardless of the driver (+version) used.

Can we also be sure that this involves only 64bit versions of the driver(s) used?

Comment 12 Alex Deucher 2009-03-10 16:00:11 UTC
I'm pretty sure the cursor issues are related to the watermark setup for the displays.  Unfortunately, I haven't yet gotten any info on how to properly program them, but I got some new leads today.

The open drivers do not share any code with the proprietary drivers.
Comment 13 Ancoron 2009-03-10 16:51:39 UTC
OK then, if driver code is completely separately developed but the same corruptions can be seen this bug is only partly related to the drivers then (as far as I suspect as I don't know the meaning of "watermark setup" exactly, as I'm just a lazy web developer).

:-)
Comment 14 Kevin Puetz 2009-03-28 20:31:18 UTC
Ancoron: I am seeing this on my Macbook 1,1 (Core Duo), so it's not specific to 64-bit.

I'm running Ubuntu 9.04 beta (radeon 6.12.1, x.org, 1.6.0, kernal 2.6.28) with a radeon M56P (mobility X1600).

I'm also seeing the corruption on both screens, apparently unlike some others. If I disable one screen, or set them to clone rather than left-of/right-of, it clears up, but when it's happening both outputs are affected.
Comment 15 Ancoron 2009-03-30 03:33:01 UTC
Two weeks ago I upgraded to KDE 4.2.0 from the Kubuntu testing repos plus a newer kernel and I've yet to see corruptions type 3. Also I have no input freezes anymore.

                   Kernel: 2.6.27-14-generic
                    X.org: 1.5.2
xserver-xorg-video-radeon: 6.9.0+git20081003.f9826a56-0ubuntu2.1

It is the same radeon driver version that ships with the stable Kubuntu repos and only the kernel and DM version changed. And some issues seem to be fixed for me.

@Kevin: What type of corruptions are you experiencing and when?
Comment 16 Ancoron 2009-03-30 13:38:40 UTC
Well I must withdraw my previous statement. Today I got that type 3 corruption again after a week of a running system.
Comment 17 Andrew P. Falaleev 2009-04-17 02:26:43 UTC
System:

RV635
Core2 Quad 6600
Debian testing.
xserver-xorg-video-radeon 6.12.2
xserver-xorg 7.4.
xrandr 1.3
kernel 2.6.29 with radeon drm module from git.

Display 20" LCD (1680x1050)

Problem:
Change orientation via "xrandr -o left".
All is ok until I press mouse button - cursor corrupt. It restored when I move mouse to some place, where cursor must change (to link in web-browser for example).
When I enter some text I see artefacts on previos place of blinking cursor.
If I enable SWcursor and enter command "xrandr -o left" - xserver fail and themself restarted.

xserver-xorg-video-radeonhd 1.2.5 fail on command "xrandr -o left" - my computer is locked - keyboard doesn't response, but mouse work.

This is my first bug report. Please ask me, if need more information.

Thanks.
Comment 18 Tormod Volden 2009-04-17 04:24:00 UTC
Andrew, you will have to open a new bug report here: http://bugs.freedesktop.org/enter_bug.cgi
Comment 19 Alex Deucher 2009-04-22 12:00:58 UTC
I've fixed the "single pixel" corruption in e3c564114eea4d032f920fcebd4040f1934c21b0

The other one is watermark related and I should have a fix for that soon.
Comment 20 Alex Deucher 2009-04-22 12:04:09 UTC
*** Bug 16865 has been marked as a duplicate of this bug. ***
Comment 21 Alex Deucher 2009-04-28 16:33:02 UTC
Should be fixed now in git.
Comment 22 Alex 2009-04-28 16:36:07 UTC
Great Alex!

I will attempt to build from Git and confirm the fix on my system. Any instructions for compiling from Git from a standard Ubuntu 9.04 driver?
Comment 23 Alex Deucher 2009-04-28 16:39:03 UTC
basic instructions here:
http://www.botchco.com/agd5f/?page_id=2
Comment 24 Brian Paterni 2009-04-28 18:47:01 UTC
When transitioning from screen to screen I'm experiencing left over cursor images on the screen I transitioned from. My cursor is still functional on the active screen, however, and the image goes away once I return to the other screen.

The behavior was first introduced in commit: http://cgit.freedesktop.org/xorg/driver/xf86-video-ati/commit/?id=4e948e2aaa59267a9aa797396add2c6b7b4c1e7c
Comment 25 Alex Deucher 2009-04-28 22:57:09 UTC
(In reply to comment #24)
> When transitioning from screen to screen I'm experiencing left over cursor
> images on the screen I transitioned from. My cursor is still functional on the
> active screen, however, and the image goes away once I return to the other
> screen.
> 
> The behavior was first introduced in commit:
> http://cgit.freedesktop.org/xorg/driver/xf86-video-ati/commit/?id=4e948e2aaa59267a9aa797396add2c6b7b4c1e7c
> 

I think this should be fixed in 35183ef528411eb0122cf48550d93f921d291d12
Comment 26 Alex 2009-04-30 14:32:28 UTC
Looks good to me Alex, I have been using my machine all this evening and the artifacts are not appearing. 

I saw the behavior Brian described briefly but I believe the reason was I hadn't done a full restart after installing, only an X restart

Great job!
Comment 27 Arto Jarvinen 2009-05-02 23:33:10 UTC
I installed Tormod Volden's -ati/-radeon packages for Ubuntu that I believe should have these fixes. When I restart the computer after stand-by the cursor flickering comes back. The flickering disappears (for good in that session it seems) when I click once on the second screen in my laptop setup. I'm running ubuntu 9.04 on a laptop with a Radeon Mobility X1600 gfx board. Thanks! -Arto
Comment 28 Steve 2009-05-04 01:38:21 UTC
Just to add to the chorus of approval, I'm also on the Tormod Volden packages for Ubuntu, and it is totally fixed for me too. Many thanks (I know this was minor, but it really used to irritate me!)
Comment 29 Florian Eberle 2009-05-04 03:02:23 UTC
i compiled 35183ef528411eb0122cf48550d93f921d291d12 a week ago and it works fine till now. thanks alex! 

---
ubuntu 9.04
radeon
VGA compatible controller: ATI Technologies Inc RV516 [Radeon X1300/X1550 Series]
Comment 30 Ancoron 2009-06-06 06:55:18 UTC
Yepp, tested on a HD2400Pro and an X1950XTX and finally the cursor got fixed.

Thanks Alex!
Comment 31 Ancoron 2009-08-03 15:27:33 UTC
Sorry for the reopen but today the problem reappeared (similar to type 2 corruption, but not thinner at the top and not wider at bottom).

This appeared on a system with an X1950XTX using GIT master up to commit 2b9a5be3bb22fad1d52ec9eea7733c5e956250b7.

The system was running for about a whole day (no system standby or suspend in between, just monitor blank/off via DPMS).


Regards,

Ancoron
Comment 32 Ancoron 2009-08-04 12:00:27 UTC
Well, I have to add something here.

Shortly after the corruption appeared (around an hour or so) the cursor changed into a square as I moved the cursor from one screen to the other. Additionally the cursor moved with a delay and not smooth at all. After that the keyboard was inaccessible and logging in via SSH remotely (which took quite some time) I saw that Xorg was using almost all CPU (dual-core AMD X2) and what I was curious about was that even 'top' was using very much CPU (~20-60%).

The system didn't come down correctly after issuing a 'shutdown now' so I had to hard-reset the system.

Although the mouse pointer was movable (hardware cursor) the system didn't respond to anything.

My current setup:

                  xorg: 7.4~5ubuntu18
          xserver-xorg: 7.4~5ubuntu18
     xserver-xorg-core: 1.6.3+git20090801+server-1.6-branch.f274e595-0ubuntu0sarvatt~jaunty
xserver-xorg-video-ati: 6.12.99+git20090729.2b9a5be3-0ubuntu0sarvatt~jaunty


Regards,

Ancoron
Comment 33 Alex Deucher 2009-08-04 12:11:52 UTC
(In reply to comment #32)
> Well, I have to add something here.
> 
> Shortly after the corruption appeared (around an hour or so) the cursor changed
> into a square as I moved the cursor from one screen to the other. Additionally
> the cursor moved with a delay and not smooth at all. After that the keyboard
> was inaccessible and logging in via SSH remotely (which took quite some time) I
> saw that Xorg was using almost all CPU (dual-core AMD X2) and what I was
> curious about was that even 'top' was using very much CPU (~20-60%).
> 
> The system didn't come down correctly after issuing a 'shutdown now' so I had
> to hard-reset the system.
> 
> Although the mouse pointer was movable (hardware cursor) the system didn't
> respond to anything.

That's a GPU lock-up.
Comment 34 Ancoron 2009-08-04 23:49:39 UTC
(In reply to comment #33)
> 
> That's a GPU lock-up.
> 

OK, that's why I asked about the ability to monitor temperatures a while back on the mailing list.

The system runs fine now till then, although I experienced the mouse cursor corruption from time to time but it disappeared after some minutes when I move the mouse from one monitor to the other.

Is it possible that the corruption itself is caused by high temperatures of the GPU? Seems unlikely to me but I'm not a GPU expert.
Comment 35 Trevor Campbell 2010-12-26 15:28:42 UTC
This has reappeared for me.  I had not seen it for a long time, but after recent upgrade to Fedora 14 it has reappeared.  It is does not always seem to be present, and may be related to suspend/resume.  That is I think it only happens sometimes after the system resumes from a suspended state.
Comment 36 Trevor Campbell 2010-12-26 15:30:24 UTC
Created attachment 41465 [details]
Xorg.0.log when corruption present
Comment 37 Roman Šmakal 2013-08-11 15:48:44 UTC
I have type 3 and Single Pixel (vertical and vertical + horizontal .. ill say 128x128 px area) type corruptions when playing Heroes of Newerth. There is no way to reproduce it easily, but its quite often issue. It happens when you scroll the map on edge of the screen (for some reason i think it happens only at corners).

GPU is AMD Sumo on 3870K APU. It happens for quite longer time. Im using Linux 3.11 with DPM enabled (but that does not matter as it happened on older kernels as well) and git mesa from ubuntu PPA.

Feel free to ask for more informations.
Comment 38 Christopher M. Penalver 2016-02-25 21:31:54 UTC
Fixed as per https://bugs.freedesktop.org/show_bug.cgi?id=19215#c26 .

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.