# Radeon DRM Mesa KMS [solved] [worksforme]

## petlab

I want to set up my new Radeon with KMS and the OSS drivers on AMD64.  I have read a ton of forums and wiki, but they are only partial configs - I haven't found a really sweet complete Howto yet.  Right now I'm using vga only in the kernel, and then xf86-video-ati.

I think I want the DRM git kernel, to build in the ucode, and try mesa-9999, uh, and stuff.  I think the most work is being done on R600g?? which sounds like it should work for my card.  I'm using x11 overlay, and genkernel, but ONLY for its initrd and my grub2 uuid support.  Not for the automatic 'build everything' it can do.

The kernel configs I have seen don't detail anything besides "DRM, radeon, KMS." It isn't working, and I wonder about the other 'framebuffer' options in there.   Throw me a complete howto, or help me config my kernel and emerge list?  Thanks people!

Radeon HD 4650 agp RV730 PRO

Tyan S2885 2 x Opt 290 - AMD-8151

----------

## Hu

I have a working Radeon/KMS using (almost) only in-Portage packages.  The only quirk I have noticed is that some operations trigger the kernel to complain I have a broken userland and should install a newer mesa.  It was so much easier to setup than I expected, I think a howto would seem like overkill.  Enable CONFIG_DRM_KMS_HELPER, CONFIG_DRM_RADEON, and CONFIG_DRM_RADEON_KMS in the kernel.  Install >=x11-drivers/xf86-video-ati-6.13.1, >=x11-libs/libdrm-2.4.21, >=x11-base/xorg-server-1.7.7-r1, and a recent copy of sys-kernel/linux-firmware.  I grabbed a new snapshot of that by copying =sys-kernel/linux-firmware-20090421 to =sys-kernel/linux-firmware-20100825.  Ensure that xorg.conf does not set a video driver explicitly.

If you have any problems, please post back and we can try to resolve them.

----------

## k-root

http://en.gentoo-wiki.com/wiki/Radeon

----------

## petlab

Great, that's right where I'm at, but I'm getting either black screen or dead video at boot.  So, I have xf86-video-ati working, by using a vga only kernel.  I guess what I want more specifically is help configuring so I can boot in something other than vga --- like radeon   :Cool: 

I do have

CONFIG_DRM_KMS_HELPER, CONFIG_DRM_RADEON, CONFIG_DRM_RADEON_KMS.

That makes sense to me.

But I am confused about:

```

Device Drivers-> Graphics support->

            [*] Include in-kernel firmware blobs in kernel binary

            ( ) External firmware blobs..

            Console display driver support->

                               [*] VGA text console

                               <M> Framebuffer Console support

            -*- Support for frame buffer devices

                               <*> ATI Radeon display support

```

What about all of that?  These aren't mentioned in http://en.gentoo-wiki.com/wiki/Radeon so it is ambiguous.  Thanks!

EDIT: OOPS   :Embarassed:   This info IS on that page... I'll RTFW and see if I can get this done...

----------

## k-root

what kernel version are you using ? build everything as modules and let the firmware be load from /lib/firmware.

https://forums.gentoo.org/viewtopic-t-842004-highlight-ati.html

and check for

CONFIG_FRAMEBUFFER_CONSOLE=y

 *Quote:*   

> With this choice, KMS will be enabled when modules are loaded during the boot process.
> 
>    1. Remove all vga= options from the kernel line in the bootloader configuration file (/boot/grub/menu.lst for GRUB users). Using other framebuffer drivers (such as uvesafb or radeonfb) will conflict with KMS. Remove any framebuffer related modules from /etc/mkinitcpio.conf. video= can now be used in conjunction with KMS.
> 
>    2. Add radeon to MODULES array in /etc/rc.conf. Depending on motherboard chipset, it may be necessary to add intel_agp before the radeon module. Previously, the fbcon module also needed to be listed to be able to switch to the console after X has started, but is now compiled into the default kernel. 

 

http://wiki.archlinux.org/index.php/ATI#Enabling_experimental_KMS

----------

## petlab

Well, it wasn't  a kernel source issue, just my misconfiguration of the graphics support sections.  I found a set of .config that works.  Below is my kernel config, showing what I have ignorantly done relating to radeon open-source drivers.  Everything not shown (graphics wise) is unset.

```

Device Drivers--->

     Generic Driver Options--->

           [*] Include in-kernel firmware blobs in kernel binary

           (radeon/R700_rlc.bin ) External firmware blobs..

     Graphics support--->

           <*> /dev/agpgart (AGP Support)---> #(This is an AGP card)

                <M> AMD Opteron .. GART support #(dunno why this is Module)

           [*] VGA Arbitration

           (16) Maximum number of GPUs

           <*> Direct Rendering Manager...--->

                <*> ATI Radeon

                [*] Enable modesetting  by default

           <*> Lowlevel video output switch controls

           -*- Support for frame buffer devices--->

                [*] Enable firmware EDID

                [*] Enable Video Mode Handling Helpers

                [*] Enable Tile Blitting Support

           Console display driver support->

                [*] VGA text console

                <*> Framebuffer Console support

            [*] Bootup logo--->

            [*] Standard 224-color Linux logo

     Power management and ACPI options --->

          [*] Power Management support

          [*] ACPI (Advanced Configuration and Power Interface) Support  --->

               # this part depends on your board

Bus options (PCI, etc.)--->

     [*] PCI support

     [*] PCI Express support

     <*> PCI Express Hotplug driver

     [*]   Root Port Advanced Error Reporting support

     [*] Message Signaled Interrupts (MSI and MSI-X)

```

Now, I read somewhere that AGP cards with a RIALTO chip need PCI Express in the kernel, so I set that even tho I don't have PCIe on my mobo.  I also saw a message somewhere that ACPI is needed for radeon.  The file R700_rlc.bin is from x11-drivers/radeon-ucode.  I copied it into /usr/src/linux/firmware/radeon/

With this setup, I am able to boot and use KMS and X.  Like I say, I'm fairly ignorant about all this, but its working.

I have tried some live builds of {xorg-server, mesa, friends} and they work.  I've also tried some more stable ebuilds.  So I'm marking this solved.  Thanks, all!

----------

