# ati radeon driver problem



## yilmazhuseyin (Jan 28, 2009)

Hi I got a video card with x1600 ati radeon chipset and I am trying to run gnome on it but it seems like I can not get the video driver working. I got gnome working but, when I try to use compiz-fusion as window manager I got an error and I loose metacity too. so I checked the x.org log file and it seems to me that I am not using my video driver. I dont really know what to look for so I am posting all the lines that  might be important
..
..
(WW) OS did not count PCI devices, guessing wildly
..
..
(WW) RADEON: No matching Device section for instance (BusID PCI:1:0:1) found
(--) Chipset ATI Radeon X1600 found
..
..
(II) RADEON(0): AGP card detected
..
..
drmOpenDevice: node name is /dev/dri/card0
drmOpenDevice: open result is -1, (No such file or directory)
drmOpenDevice: open result is -1, (No such file or directory)
drmOpenDevice: Open failed
[drm] failed to load kernel module "radeon"
(EE) RADEON(0): [dri] RADEONDRIGetVersion failed to open the DRM
[dri] Disabling DRI.
(II) RADEON(0): Generation 2 PCI interface, using max accessible memory
(II) RADEON(0): Detected total video RAM=524288K, accessible=262144K (PCI BAR=262144K)
(--) RADEON(0): Mapped VideoRAM: 262144 kByte (128 bit DDR SDRAM)
(II) RADEON(0): Supported VESA Video Modes:
before xf86InitialConfiguration
..
..
(II) RADEON(0): Output VGA-0 using initial mode 1680x1050
..
..
 (II) RADEON(0): RandR 1.2 enabled, ignore the following RandR disabled message.
(WW) RADEON(0): Option "AddARGBGLXVisuals" is not used
(--) RandR disabled

===============================================
Here is the content of my /dev folder
=================================================
venus# pwd
/dev
venus# ls -R
acd0		cuad0		klog		ptyp2		ttyv7
acd0t01		cuad0.init	kmem		ptyp3		ttyv8
acpi		cuad0.lock	log		random		ttyv9
ad0		dcons		lpt0		stderr		ttyva
ad0s1		devctl		lpt0.ctl	stdin		ttyvb
ad0s1a		devstat		mdctl		stdout		ttyvc
ad0s1b		dgdb		mem		sysmouse	ttyvd
ad0s1c		dumpdev		net		ttyd0		ttyve
ad0s1d		fd		net1		ttyd0.init	ttyvf
ad0s1e		fido		net2		ttyd0.lock	ukbd0
ad0s1f		fw0		net3		ttyp0		ums0
ad1		fw0.0		net4		ttyp1		urandom
ad1s1		fwmem0		net5		ttyp2		usb
agpgart		fwmem0.0	network		ttyp3		usb0
ata		geom.ctl	nfs4		ttyv0		usb1
atkbd0		io		nfslock		ttyv1		usb2
audit		iso9660		null		ttyv2		usb3
bpf0		kbd0		pci		ttyv3		usb4
console		kbd1		ppi0		ttyv4		xpt0
consolectl	kbd2		ptyp0		ttyv5		zero
ctty		kbdmux0		ptyp1		ttyv6

./fd:
0	1	2

./iso9660:
FreeBSD_Install

./net:
em0	fwe0	fwip0	lo0	plip0
venus# 
=====================================
and my xorg.conf is here 
======================================
Section "ServerLayout"
	Identifier     "X.org Configured"
	Screen      0  "Screen0" 0 0
	InputDevice    "Mouse0" "CorePointer"
	InputDevice    "Keyboard0" "CoreKeyboard"
EndSection

Section "Files"
	RgbPath      "/usr/local/share/X11/rgb"
	ModulePath   "/usr/local/lib/xorg/modules"
	FontPath     "/usr/local/lib/X11/fonts/misc/"
	FontPath     "/usr/local/lib/X11/fonts/TTF/"
	FontPath     "/usr/local/lib/X11/fonts/OTF"
	FontPath     "/usr/local/lib/X11/fonts/Type1/"
	FontPath     "/usr/local/lib/X11/fonts/100dpi/"
	FontPath     "/usr/local/lib/X11/fonts/75dpi/"
EndSection

Section "Module"
	Load  "GLcore"
	Load  "dbe"
	Load  "dri"
	Load  "extmod"
	Load  "glx"
	Load  "record"
	Load  "xtrap"
	Load  "freetype"
	Load  "type1"
EndSection

Section "InputDevice"
	Identifier  "Keyboard0"
	Driver      "kbd"
EndSection

Section "InputDevice"
	Identifier  "Mouse0"
	Driver      "mouse"
	Option	    "Protocol" "auto"
	Option	    "Device" "/dev/sysmouse"
	Option	    "ZAxisMapping" "4 5 6 7"
EndSection

Section "Monitor"
	#DisplaySize	  470   300	# mm
	Identifier   "Monitor0"
	VendorName   "SAM"
	ModelName    "SyncMaster"
 ### Comment all HorizSync and VertRefresh values to use DDC:
	HorizSync    30.0 - 81.0
	VertRefresh  56.0 - 75.0
	Option	    "DPMS"
EndSection

Section "Device"
        ### Available Driver options are:-
        ### Values: <i>: integer, <f>: float, <bool>: "True"/"False",
        ### <string>: "String", <freq>: "<f> Hz/kHz/MHz"
        ### [arg]: arg optional
        #Option     "NoAccel"            	# [<bool>]
        #Option     "SWcursor"           	# [<bool>]
        #Option     "Dac6Bit"            	# [<bool>]
        #Option     "Dac8Bit"            	# [<bool>]
        #Option     "BusType"            	# [<str>]
        #Option     "CPPIOMode"          	# [<bool>]
        #Option     "CPusecTimeout"      	# <i>
        #Option     "AGPMode"            	# <i>
        #Option     "AGPFastWrite"       	# [<bool>]
        #Option     "AGPSize"            	# <i>
        #Option     "GARTSize"           	# <i>
        #Option     "RingSize"           	# <i>
        #Option     "BufferSize"         	# <i>
        #Option     "EnableDepthMoves"   	# [<bool>]
        #Option     "EnablePageFlip"     	# [<bool>]
        #Option     "NoBackBuffer"       	# [<bool>]
        #Option     "DMAForXv"           	# [<bool>]
        #Option     "FBTexPercent"       	# <i>
        #Option     "DepthBits"          	# <i>
        #Option     "PCIAPERSize"        	# <i>
        #Option     "AccelDFS"           	# [<bool>]
        #Option     "DDCMode"            	# [<bool>]
        #Option     "IgnoreEDID"         	# [<bool>]
        #Option     "DisplayPriority"    	# [<str>]
        #Option     "PanelSize"          	# [<str>]
        #Option     "ForceMinDotClock"   	# <freq>
        #Option     "ColorTiling"        	# [<bool>]
        #Option     "VideoKey"           	# <i>
        #Option     "RageTheatreCrystal" 	# <i>
        #Option     "RageTheatreTunerPort" 	# <i>
        #Option     "RageTheatreCompositePort" 	# <i>
        #Option     "RageTheatreSVideoPort" 	# <i>
        #Option     "TunerType"          	# <i>
        #Option     "RageTheatreMicrocPath" 	# <str>
        #Option     "RageTheatreMicrocType" 	# <str>
        #Option     "ScalerWidth"        	# <i>
        #Option     "RenderAccel"        	# [<bool>]
        #Option     "SubPixelOrder"      	# [<str>]
        #Option     "ShowCache"          	# [<bool>]
        #Option     "DynamicClocks"      	# [<bool>]
        #Option     "VGAAccess"          	# [<bool>]
        #Option     "ReverseDDC"         	# [<bool>]
        #Option     "LVDSProbePLL"       	# [<bool>]
        #Option     "AccelMethod"        	# <str>
        #Option     "DRI"                	# [<bool>]
        #Option     "ConnectorTable"     	# <str>
        #Option     "DefaultConnectorTable" 	# [<bool>]
        #Option     "DefaultTMDSPLL"     	# [<bool>]
        #Option     "TVDACLoadDetect"    	# [<bool>]
        #Option     "ForceTVOut"         	# [<bool>]
        #Option     "TVStandard"         	# <str>
        #Option     "IgnoreLidStatus"    	# [<bool>]
        #Option     "DefaultTVDACAdj"    	# [<bool>]
        #Option     "Int10"              	# [<bool>]
	Identifier  "Card0"
	Driver      "ati"
#	Driver      "radeon"         tried this
#	Driver      "radeonhd"       and this too 
	VendorName  "ATI Technologies Inc"
	BoardName   "RV530 [Radeon X1600]"
	BusID       "PCI:1:0:0"
EndSection

Section "Screen"
	Identifier "Screen0"
	Device     "Card0"
	Monitor    "Monitor0"
	DefaultDepth    24
	Option         "AddARGBGLXVisuals" "True"


#	SubSection "Display"
	#	Viewport   0 0
#		Depth     24
	#EndSubSection
	SubSection "Display"
		Viewport   0 0
		Depth     24
		Modes      "1680x1050"
	EndSubSection

EndSection

Section "Extensions"
Option         "Composite" "Enable"
EndSection

==============================================
I am actually not familiar with the freebsd environment. I  am using ubuntu linux to get familiar with unix like systems. but having really hard time to figure out the system. 
I actually do not know which driver I am using right know. I thought when I install a driver it would create a device driver in /dev folder. but I do not have any radeon file in there so my driver should be in some where else or I just misunderstand the whole system. could somebody please tell me how can I find out which video driver I am using , is there a utility I can use to manage my hardware. and my only source is freebsd handbook and this forum , is there any important sources I should be checking.
any help would be appretiated I am trying to get this thing work for a month but I do not really know what to do. finally here is the error message I am gettin from compiz 

$ compiz --replace --sm-disable --ignore-desktop-hints ccp &
$ compiz (core) - Fatal: No GLXFBConfig for default depth, this isn't going to work.
compiz (core) - Error: Failed to manage screen: 0
compiz (core) - Fatal: No manageable screens found on display :0.0


----------



## adamk (Jan 29, 2009)

The necessary kernel modules for your video card are available in FreeBSD -STABLE.  They were mfc'ed recently.  For 3D acceleration, you will need to be using the latest version of Xorg and Mesa from the ports tree (built after the Xorg 7.4 merge) and either need to update your system to -STABLE or build the DRM modules from git.  I would recommend the upgrade to -STABLE instead, though.

Adam


----------



## yilmazhuseyin (Jan 29, 2009)

first of all thank you for the quick reply. I think I understand what I supposed to do but I don't do not know how to do that,I am using portsnap utility to get the portstree, when I install my system I did 
	
	



```
portsnap fetch
```
 then 
	
	



```
portsnap extract
```
. now I do 
	
	



```
portsnap fetch update
```
 to update my ports tree. the problem is I have no idea which version of ports tree I am getting. in the freebsd hand book I saw another utulity called cvsup , which you can use to get specific version of ports tree I think I should use that utility to get tag=RELENG_7_4. am I on the right track? is that how I get 7.4 release? can I get it with portsnap utility?


----------



## yilmazhuseyin (Feb 1, 2009)

ok I tried to do everything to make my ati driver  work ,but simply I could not get it work. for couple days I hated freebsd. now I decided to just use it without ati driver. I used cvsup to get ports tree. then I did make buildkernel and makeinstallkernel. it just didn't work.
for adamk: thank you for your answer. I did fail to make it but I learn a lot of stuff. After I install xorg and fluxbox I will try to make a custom kernel. Maybe in that process I can learn how to add that DRM module you were talking about.


----------



## pablo (Feb 7, 2009)

It seems you haven't loaded kernel module drm.ko. Check:

[pablo@free /usr/home/pablo]$ kldstat -v | grep drm                          
 4    2 0xc089c000 10e88    drm.ko

You can load manually:

# kldload rdm

or from /boot/loader.conf

drm_load="YES"

Also add to your xorg.conf drm support:

Section "Module"
    Load        "drm"
EndSection


----------



## adamk (Feb 7, 2009)

pablo said:
			
		

> It seems you haven't loaded kernel module drm.ko. Check:
> 
> [pablo@free /usr/home/pablo]$ kldstat -v | grep drm
> 4    2 0xc089c000 10e88    drm.ko
> ...



That is not necessary.  Loading the radeon kernel module (which is handled by Xorg) will cause the drm kernel module to load.



			
				pablo said:
			
		

> Also add to your xorg.conf drm support:
> 
> Section "Module"
> Load        "drm"
> EndSection




That is incorrect.  There is no 'drm' Xorg module.  There is, however, a 'dri' Xorg module, which is loaded by default on the latest version of Xorg in ports.

Adam


----------

