# KMS fails with AMD



## Roberth (Aug 30, 2012)

Hello,

I have a fresh install of freebsd 9.1rc1, and a AMD Radeon HD 6850 card in it.

When i start X with radeon, here is the log


```
[  4421.005] 
X.Org X Server 1.10.6
Release Date: 2012-02-10
[  4421.005] X Protocol Version 11, Revision 0
[  4421.005] Build Operating System: FreeBSD 9.1-RC1 amd64 
[  4421.005] Current Operating System: FreeBSD R2D2 9.1-RC1 FreeBSD 9.1-RC1 #0: Tue Aug 14 04:25:06 UTC 2012     root@farrell.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC amd64
[  4421.005] Build Date: 30 August 2012  02:36:52PM
[  4421.005]  
[  4421.005] Current version of pixman: 0.24.2
[  4421.005] 	Before reporting problems, check http://wiki.x.org
	to make sure that you have the latest version.
[  4421.005] Markers: (--) probed, (**) from config file, (==) default setting,
	(++) from command line, (!!) notice, (II) informational,
	(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[  4421.005] (==) Log file: "/var/log/Xorg.0.log", Time: Thu Aug 30 18:07:35 2012
[  4421.005] (==) Using config file: "/etc/X11/xorg.conf"
[  4421.005] (==) ServerLayout "X.org Configured"
[  4421.005] (**) |-->Screen "Screen0" (0)
[  4421.005] (**) |   |-->Monitor "Monitor0"
[  4421.006] (**) |   |-->Device "Card0"
[  4421.006] (**) |-->Input Device "Mouse0"
[  4421.006] (**) |-->Input Device "Keyboard0"
[  4421.006] (==) Automatically adding devices
[  4421.006] (==) Automatically enabling devices
[  4421.006] (**) FontPath set to:
	${prefix}/share/fonts/X11/misc/,
	${prefix}/share/fonts/X11/TTF/,
	${prefix}/share/fonts/X11/OTF/,
	${prefix}/share/fonts/X11/Type1/,
	${prefix}/share/fonts/X11/100dpi/,
	${prefix}/share/fonts/X11/75dpi/,
	${prefix}/share/fonts/X11/misc/,
	${prefix}/share/fonts/X11/TTF/,
	${prefix}/share/fonts/X11/OTF/,
	${prefix}/share/fonts/X11/Type1/,
	${prefix}/share/fonts/X11/100dpi/,
	${prefix}/share/fonts/X11/75dpi/
[  4421.006] (**) ModulePath set to "/usr/local/lib/xorg/modules"
[  4421.006] (WW) Hotplugging is on, devices using drivers 'kbd', 'mouse' or 'vmmouse' will be disabled.
[  4421.006] (WW) Disabling Mouse0
[  4421.006] (WW) Disabling Keyboard0
[  4421.006] (II) Loader magic: 0x7c8240
[  4421.006] (II) Module ABI versions:
[  4421.006] 	X.Org ANSI C Emulation: 0.4
[  4421.006] 	X.Org Video Driver: 10.0
[  4421.006] 	X.Org XInput driver : 12.2
[  4421.006] 	X.Org Server Extension : 5.0
[  4421.006] (--) PCI:*(0:1:0:0) 1002:6739:1458:21f8 rev 0, Mem @ 0xe0000000/268435456, 0xfbdc0000/131072, I/O @ 0x0000ee00/256, BIOS @ 0x????????/65536
[  4421.006] (II) "extmod" will be loaded. This was enabled by default and also specified in the config file.
[  4421.006] (II) "dbe" will be loaded. This was enabled by default and also specified in the config file.
[  4421.006] (II) "glx" will be loaded. This was enabled by default and also specified in the config file.
[  4421.006] (II) "record" will be loaded. This was enabled by default and also specified in the config file.
[  4421.006] (II) "dri" will be loaded. This was enabled by default and also specified in the config file.
[  4421.006] (II) "dri2" will be loaded. This was enabled by default and also specified in the config file.
[  4421.006] (II) LoadModule: "extmod"
[  4421.006] (II) Loading /usr/local/lib/xorg/modules/extensions/libextmod.so
[  4421.006] (II) Module extmod: vendor="X.Org Foundation"
[  4421.006] 	compiled for 1.10.6, module version = 1.0.0
[  4421.006] 	Module class: X.Org Server Extension
[  4421.006] 	ABI class: X.Org Server Extension, version 5.0
[  4421.006] (II) Loading extension MIT-SCREEN-SAVER
[  4421.006] (II) Loading extension XFree86-VidModeExtension
[  4421.006] (II) Loading extension XFree86-DGA
[  4421.006] (II) Loading extension DPMS
[  4421.006] (II) Loading extension XVideo
[  4421.006] (II) Loading extension XVideo-MotionCompensation
[  4421.006] (II) Loading extension X-Resource
[  4421.006] (II) LoadModule: "record"
[  4421.006] (II) Loading /usr/local/lib/xorg/modules/extensions/librecord.so
[  4421.006] (II) Module record: vendor="X.Org Foundation"
[  4421.006] 	compiled for 1.10.6, module version = 1.13.0
[  4421.006] 	Module class: X.Org Server Extension
[  4421.006] 	ABI class: X.Org Server Extension, version 5.0
[  4421.006] (II) Loading extension RECORD
[  4421.006] (II) LoadModule: "dbe"
[  4421.007] (II) Loading /usr/local/lib/xorg/modules/extensions/libdbe.so
[  4421.007] (II) Module dbe: vendor="X.Org Foundation"
[  4421.007] 	compiled for 1.10.6, module version = 1.0.0
[  4421.007] 	Module class: X.Org Server Extension
[  4421.007] 	ABI class: X.Org Server Extension, version 5.0
[  4421.007] (II) Loading extension DOUBLE-BUFFER
[  4421.007] (II) LoadModule: "glx"
[  4421.007] (II) Loading /usr/local/lib/xorg/modules/extensions/libglx.so
[  4421.007] (II) Module glx: vendor="X.Org Foundation"
[  4421.007] 	compiled for 1.10.6, module version = 1.0.0
[  4421.007] 	ABI class: X.Org Server Extension, version 5.0
[  4421.007] (==) AIGLX disabled
[  4421.007] (II) Loading extension GLX
[  4421.007] (II) LoadModule: "dri"
[  4421.007] (II) Loading /usr/local/lib/xorg/modules/extensions/libdri.so
[  4421.007] (II) Module dri: vendor="X.Org Foundation"
[  4421.007] 	compiled for 1.10.6, module version = 1.0.0
[  4421.007] 	ABI class: X.Org Server Extension, version 5.0
[  4421.007] (II) Loading extension XFree86-DRI
[  4421.007] (II) LoadModule: "dri2"
[  4421.007] (II) Loading /usr/local/lib/xorg/modules/extensions/libdri2.so
[  4421.007] (II) Module dri2: vendor="X.Org Foundation"
[  4421.007] 	compiled for 1.10.6, module version = 1.2.0
[  4421.007] 	ABI class: X.Org Server Extension, version 5.0
[  4421.007] (II) Loading extension DRI2
[  4421.008] (II) LoadModule: "radeon"
[  4421.008] (II) Loading /usr/local/lib/xorg/modules/drivers/radeon_drv.so
[  4421.008] (II) Module radeon: vendor="X.Org Foundation"
[  4421.008] 	compiled for 1.10.6, module version = 6.14.3
[  4421.008] 	Module class: X.Org Video Driver
[  4421.008] 	ABI class: X.Org Video Driver, version 10.0
[  4421.008] (II) RADEON: Driver for ATI Radeon chipsets:
	<here are all the gpus supported listed....>
[  4421.010] (--) Using syscons driver with X support (version 2.0)
[  4421.010] (--) using VT number 9

[  4421.010] (II) Loading /usr/local/lib/xorg/modules/drivers/radeon_drv.so
[  4421.010] (II) [KMS] Kernel modesetting enabled.
[  4421.010] (WW) VGA arbiter: cannot open kernel arbiter, no multi-card support
[  4421.010] (==) RADEON(0): Depth 24, (--) framebuffer bpp 32
[  4421.010] (II) RADEON(0): Pixel depth = 24 bits stored in 4 bytes (32 bpp pixmaps)
[  4421.010] (==) RADEON(0): Default visual is TrueColor
[  4421.010] (==) RADEON(0): RGB weight 888
[  4421.010] (II) RADEON(0): Using 8 bits per RGB (8 bit DAC)
[  4421.010] (--) RADEON(0): Chipset: "AMD Radeon HD 6800 Series" (ChipID = 0x6739)
[  4421.010] (II) RADEON(0): PCIE card detected
[  4421.010] drmOpenDevice: node name is /dev/dri/card0
[  4421.010] Failed to change owner or group for file /dev/dri! 2: No such file or directory
[  4421.010] Failed to change owner or group for file /dev/dri/card0! 2: No such file or directory
[  4421.010] drmOpenDevice: open result is -1, (No such file or directory)
[  4421.010] Failed to change owner or group for file /dev/dri/card0! 2: No such file or directory
[  4421.010] drmOpenDevice: open result is -1, (No such file or directory)
[  4421.010] drmOpenDevice: Open failed
[  4421.010] [drm] failed to load kernel module "radeon"
[  4421.010] (EE) RADEON(0): [drm] Failed to open DRM device for pci:0000:01:00.0: File exists
[  4421.010] (EE) RADEON(0): Kernel modesetting setup failed
[  4421.010] (II) UnloadModule: "radeon"
[  4421.010] (II) Unloading radeon
[  4421.010] (EE) Screen(s) found, but none have a usable configuration.
[  4421.010] 
Fatal server error:
[  4421.010] no screens found
[  4421.010] 
Please consult the The X.Org Foundation support 
	 at http://wiki.x.org
 for help. 
[  4421.010] Please also check the log file at "/var/log/Xorg.0.log" for additional information.
[  4421.010]
```

Here is my xorg.conf


```
Section "ServerLayout"
	Identifier     "X.org Configured"
	Screen      0  "Screen0" 0 0
	InputDevice    "Mouse0" "CorePointer"
	InputDevice    "Keyboard0" "CoreKeyboard"
EndSection

Section "Files"
	ModulePath   "/usr/local/lib/xorg/modules"
	FontPath     "${prefix}/share/fonts/X11/misc/"
	FontPath     "${prefix}/share/fonts/X11/TTF/"
	FontPath     "${prefix}/share/fonts/X11/OTF/"
	FontPath     "${prefix}/share/fonts/X11/Type1/"
	FontPath     "${prefix}/share/fonts/X11/100dpi/"
	FontPath     "${prefix}/share/fonts/X11/75dpi/"
EndSection

Section "Module"
	Load  "extmod"
	Load  "record"
	Load  "dbe"
	Load  "glx"
	Load  "dri"
	Load  "dri2"
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"
	Identifier   "Monitor0"
	VendorName   "Monitor Vendor"
	ModelName    "Monitor Model"
EndSection

Section "Device"
	Identifier  "Card0"
	Driver      "vesa"
	BusID       "PCI:1:0:0"
EndSection


Section "Screen"
	Identifier "Screen0"
	Device     "Card0"
	Monitor    "Monitor0"
	SubSection "Display"
		Viewport   0 0
		Depth     24
	EndSubSection
EndSection

Section "Screen"
	Identifier "Screen1"
	Device     "Card1"
	Monitor    "Monitor1"
	SubSection "Display"
		Viewport   0 0
		Depth     24
	EndSubSection
EndSection
```

What is wrong?

Everything is compiled from ports without any problems, if I just replace radeon with vesa in the config, I get the  X.org server up.


----------



## zeissoctopus (Aug 30, 2012)

FreeBSD's new KMS code supports Intel cards only.


----------



## Roberth (Aug 30, 2012)

Luck I have an intel gpu inside my cpu.

Is amd support in this regard in the works?


----------



## zeissoctopus (Aug 30, 2012)

Roberth said:
			
		

> Luck I have an intel gpu inside my cpu.
> 
> Is amd support in this regard in the works?



Please check the answer by the FreeBSD KMS porter, Konstantin Belousov in this thread


----------



## adamk (Aug 30, 2012)

Roberth said:
			
		

> Luck I have an intel gpu inside my cpu.
> 
> Is amd support in this regard in the works?



It's been discussed, as you can see in the link zeissoctopus posted, but it appears to not have gotten beyond that stage.

Adam


----------



## Roberth (Aug 30, 2012)

Is the code for KMS for intel practically the same in 10-current compared to the code in 9-stable branch?


----------

