# ATI Radeon display corruption



## aragon (Sep 17, 2010)

Hi,

I'm running two screens connected to an RV620 Radeon card on FreeBSD 8.1-STABLE with X.org 7.5 and Radeon 6.13 drivers.  Contents of the second screen overwrite or corrupt the contents on the first screen for some reason.  Photo attached gives you an idea - the notepad with "screen 2" written in it is actually on the second screen, but it's being rendered on both.  Lots of other corruption is visible too.

Anyone have any ideas how to fix this?

My xorg.conf:


```
Section "Files"
	ModulePath	"/usr/local/lib/xorg/modules"
	FontPath	"/usr/local/lib/X11/fonts/Type1"
	FontPath	"/usr/local/lib/X11/fonts/Liberation"
	FontPath	"/usr/local/lib/X11/fonts/webfonts"
	FontPath	"/usr/local/lib/X11/fonts/artwiz-aleczapka-en"
	FontPath	"/usr/local/lib/X11/fonts/misc"
	FontPath	"/usr/local/lib/X11/fonts/cyrillic"
	FontPath	"/usr/local/lib/X11/fonts/100dpi"
	FontPath	"/usr/local/lib/X11/fonts/75dpi"
EndSection

Section "Module"
	Load	"bitmap"
	Load	"extmod"
	Load	"glx"
	Load	"int10"
	Load	"dbe"
	Load	"record"
EndSection

Section "InputDevice"
	Identifier	"Keyboard0"
	Driver		"kbd"
	Option		"CoreKeyboard"
	Option		"XkbRules" "xorg"
	Option		"XkbModel" "pc104"
	Option		"XkbLayout" "us"
	Option		"XkbOptions" "compose:ralt,terminate:ctrl_alt_bksp"
EndSection

Section "InputDevice"
	Identifier	"Mouse0"
	Driver		"mouse"
	Option		"CorePointer"
	Option		"Device" "/dev/sysmouse"
	Option		"Protocol" "auto"
	Option		"Emulate3Buttons" "false"
EndSection

Section "Device"
	Identifier	"Videocard0"
	Driver		"radeon"
	VendorName	"ATI"
	BoardName	"Radeon HD3450"
	Option		"AccelMethod"	"EXA"
	Option		"DRI"		"on"
	Option		"UseConfiguredMonitor"	"on"
	Option		"DynamicPM" "on"
	Option		"monitor-DVI-0" "Monitor0"
	Option		"monitor-VGA-0" "Monitor1"
EndSection

Section "Monitor"
	Identifier	"Monitor0"
	VendorName	"Samsung"
	ModelName	"T260"
	Option		"DPMS"	"on"
	Option		"Primary" "on"
EndSection

Section "Monitor"
	Identifier	"Monitor1"
	VendorName	"Samsung"
	ModelName	"2232GW"
	Option		"DPMS"	"on"
	Option		"Position" "1920 150"
	Option		"Primary" "off"
EndSection

Section "Screen"
	Identifier	"Screen0"
	Device		"Videocard0"
	Monitor		"Monitor0"
	DefaultDepth	24
	SubSection	"Display"
		Viewport	0 0
		Virtual		3600 1200
		Depth		32
	EndSubSection
EndSection

Section "ServerLayout"
	Identifier	"Layout0"
	Screen		"Screen0"
	InputDevice	"Keyboard0"
	InputDevice	"Mouse0"
EndSection

Section "ServerFlags"
	Option		"AllowClosedownGrabs"	"on"
	Option		"AIGLX"			"on"
	Option		"DontZap"		"off"
EndSection

Section "DRI"
	Mode 0666
EndSection

Section "Extensions"
	Option	"Composite"	"on"
EndSection
```


----------



## davidgurvich (Sep 18, 2010)

I would suggest 2 things that you might try.  The first is changing the AccelMethod to XAA or None or turn DRI off.  If the corruption disappears with either of the latter two options then you could stick with that and use software rendering.  If your system is powerful enough you may not notice a difference.  The second would be to try the radeonhd driver.  I believe that your graphics card is supported by that driver.


----------



## wblock@ (Sep 18, 2010)

There's a 6.13.1 version of the driver available from the freedesktop.org git repo, which might also be worth trying.


----------



## wblock@ (Sep 18, 2010)

aragon said:
			
		

> xorg.conf:
> 
> 
> ```
> ...



Depth 32?  Only depths up to 24 are allowed, according to xorg.conf(5):
`% man xorg.conf | less "+/colour depth"`


----------



## aragon (Sep 18, 2010)

wblock said:
			
		

> Depth 32?


Ugh, can't believe I overlooked that.  I guess it working for over a year with radeonhd didn't help. 

Thanks!


----------



## aragon (Sep 20, 2010)

Has anyone found their mouse cursor rendering becoming corrupt?  Mine seems to get corrupted over time, particularly the text I-beam cursor.  Enabling SWCursor causes two cursors to get rendered, one that stays permanently in the center of the screen.

Photo attached shows current cursor.


----------



## wblock@ (Sep 20, 2010)

Wait, is the display corruption fixed now?

As far as the cursor goes, I saw noise on the cursor on certain columns of the screen with an X1650.  Haven't seen that yet on an HD4650.  Software cursors seem to not be well tested because most people don't use them.


----------



## aragon (Sep 21, 2010)

Yea, my initial corruption issue is fixed now, thanks - was the depth setting.

The more I use the radeon driver the more problems I run into.  Seeing corruption during video playback too.  Xorg crashes when I switch to a VT, and sometimes I return to my workstation and it's unresponsive with Xorg consuming 100% CPU.


----------



## wblock@ (Sep 21, 2010)

Option "AllowClosedownGrabs" "on" doesn't look familiar, probably should remove the DynamicPM option, too, otherwise nothing really jumps out.

A system BIOS update might make a difference, too.  Could be the RAM on the video card going bad, except then I'd expect it to run okay.  Maybe also power supply (does the video board have a connector?) or to the system, or maybe system RAM.  /var/log/Xorg.0.log might be useful.  Are you running with or without hal?


----------



## davidgurvich (Sep 21, 2010)

I had a similar issue in Linux with an ATI M52 X1300.  Random crashes and screen corruption.  I changed to using the radeonhd driver there which worked very well.  I recently tested the radeon driver again and the problems that I had are no longer evident.  I suspect a combination of xorg, kernel, and driver changes.  

The version of Xorg in FreeBSD is similar to what I used when the radeonhd driver worked better.


----------



## aragon (Sep 21, 2010)

wblock said:
			
		

> Option "AllowClosedownGrabs" "on" doesn't look familiar, probably should remove the DynamicPM option, too, otherwise nothing really jumps out.
> 
> A system BIOS update might make a difference, too.  Could be the RAM on the video card going bad, except then I'd expect it to run okay.  Maybe also power supply (does the video board have a connector?) or to the system, or maybe system RAM.  /var/log/Xorg.0.log might be useful.  Are you running with or without hal?


Cool.  I've commented those two and will see how things run now.

I'm using HAL, but Xorg is not compiled against it.  Only the window manager (XFCE) benefits from HAL here.


----------



## aragon (Sep 21, 2010)

davidgurvich said:
			
		

> I had a similar issue in Linux with an ATI M52 X1300.  Random crashes and screen corruption.  I changed to using the radeonhd driver there which worked very well.  I recently tested the radeon driver again and the problems that I had are no longer evident.  I suspect a combination of xorg, kernel, and driver changes.
> 
> The version of Xorg in FreeBSD is similar to what I used when the radeonhd driver worked better.


Yea, I've been running with radeonhd for over a year now and have always preferred it to the radeon driver.  I figured I'd give the radeon driver a try seeing as radeonhd is dead, and was hoping radeon would be faster too. (it's not)


----------



## aragon (Sep 21, 2010)

wblock said:
			
		

> Option "AllowClosedownGrabs" "on" doesn't look familiar, probably should remove the DynamicPM option, too, otherwise nothing really jumps out.


Disabling those two fixed the mouse cursor corruption, but not Xorg instability unfortunately.  I've gone back to using radeonhd.


----------

