# How to no xorg.conf and radeonhd?

## urcindalo

I run a laptop with a Radeon Mobility HD card. I get 3D acceleration with both the radeon and radeonhd drivers thanks to the instructions in other post.

I also run my system with no xorg.conf at all, and in this case the radeon driver is chosen, I suppose by udev.

Is there any way of making the system choose the radeonhd driver instead without using xorg.conf? Some .fdi to modify?

Thanks in advance.

----------

## engil

Hi,

in /etc/make.conf, make sure you only have VIDEO_CARDS="radeonhd". You may have VIDEO_CARDS"radeon radeonhd" at the moment.

Then recompile the whole thing related to xorg, and it should be OK.

----------

## urcindalo

Thanks for your help  :Smile:  Yes, I have VIDEO_CARDS="radeon radeonhd".

I had already thought of that, but I'd like not to lose the "radeon" support just in case. I think there has to be a rule somewhere choosing radeon over radeonhd, and I would like to set it the other way around.

Or, in other words, what makes xorg-server select radeon when no xorg.conf is present? I'd like to learn why and to be able to play with it. Isn't that the Gentoo way?   :Cool: 

----------

## engil

This might sounds stupid, but try with VIDEO_CARDS="radeonhd radeon".

Someone here told me that the order is important, may be you can give it a try.  :Smile: 

----------

## urcindalo

 *engil wrote:*   

> This might sounds stupid, but try with VIDEO_CARDS="radeonhd radeon".

 

He he... I tried  :Smile:  Sometimes simple things like that may work. But not this time  :Sad: 

I changed the order in VIDEO_CARDS and then recompiled x11-base/xorg-drivers, x11-base/xorg-server, x11-drivers/xf86-video-ati and x11-drivers/xf86-video-radeonhd, in that exact order. But still radeon driver is chosen. From my Xorg.0.log:

```
(II) LoadModule: "ati"

(II) Loading /usr/lib64/xorg/modules/drivers/ati_drv.so

(II) Module ati: vendor="X.Org Foundation"

        compiled for 1.7.5, module version = 6.12.4

        Module class: X.Org Video Driver

        ABI class: X.Org Video Driver, version 6.0

(II) LoadModule: "radeon"

(II) Loading /usr/lib64/xorg/modules/drivers/radeon_drv.so

(II) Module radeon: vendor="X.Org Foundation"

        compiled for 1.7.5, module version = 6.12.4

        Module class: X.Org Video Driver

        ABI class: X.Org Video Driver, version 6.0
```

What is it that makes xorg-driver to select "radeon" when no xorg.conf is present? Even though I wouldn't want to change the driver, I'd want to know the process to make the choice.

----------

## Nick C

I believe all new xorg configs are generated using HAL, so you could have a look through the HAL configs in /etc/hal.d (i think this is the folder, im not in linux atm so cant double check but its named something like this  :Smile: ), they are xml files from what i remember so should be fairly easy to understand and edit.

----------

## urcindalo

 *Nick C wrote:*   

> I believe all new xorg configs are generated using HAL, so you could have a look through the HAL configs in /etc/hal.d (i think this is the folder, im not in linux atm so cant double check but its named something like this ), they are xml files from what i remember so should be fairly easy to understand and edit.

 

If you read my first post, I ask in it if there's any .fdi file to modify.

I already looked for it, but I have not found any related .fdi file neither active in /etc/hal/fdi/ nor as an example in /usr/share/hal/fdi/, so I guess I'll have to write it from scratch. Does anybody know how to do it?

----------

## Rexilion

Won't it just work if you delete the xf86-video-radeon driver? X should pick up the xf86-video-radeonhd driver.

First you need to delete the radeon from VIDEO_CARDS and then do:

emerge -C xf86-video-radeon

which is safe...

----------

## urcindalo

 *Rexilion wrote:*   

> Won't it just work if you delete the xf86-video-radeon driver?

 

Yes, it would work. But please, read my second post in this thread  :Smile: 

----------

## Rexilion

You can emerge it whenever you need it, just make sure you always have a copy of the source /usr/portage/distfiles if you want to reactivate it without internet access. I see no other way of doing this...

----------

## urcindalo

 *Rexilion wrote:*   

> You can emerge it whenever you need it, just make sure you always have a copy of the source /usr/portage/distfiles if you want to reactivate it without internet access. I see no other way of doing this...

 

Thanks for your suggestions. Removing one of them is the easy solution.

However, I'm beginning to be more interested in how one of them is chosen when the two drivers are available.  I want to learn the choice process., and I will never do it by taking the easy way   :Smile: 

----------

## aZZe

Hi!

I'm also interested in radeonhd with no xorg.conf. Could you please post your installed version of gentoo-sources, xorg-x11, xf86-video-radeonhd and xorg-server? Which HD Radeon do you have?

----------

## urcindalo

Sure  :Smile:  Here they go. Everything is from portage itself, unmasking only in package.keywords the ~packages asked for by the xorg-server and mesa versions:

```
* gentoo-sources-2.6.33

* xorg-server-1.7.5 (with USE flags: hal ipv6 nptl sdl xorg). I have no xorg-x11 installed.

* xorg-drivers-1.7 (input_devices_evdev input_devices_synaptics video_cards_fbdev video_cards_radeon video_cards_radeonhd video_cards_vesa)

* xf86-video-radeonhd-1.3.0

* mesa-7.7-r1 (with USE flags: motif nptl video_cards_radeon video_cards_radeonhd video_cards_svga xcb)
```

The packages unmasked are:

```
$ cat /etc/portage/package.keywords/ati

x11-libs/libXxf86vm

x11-libs/libX11

x11-libs/libXi

x11-libs/libXext

x11-libs/libXtst

x11-libs/libXinerama

x11-libs/libXxf86dga

x11-base/xorg-drivers

x11-proto/xf86dgaproto

x11-proto/xineramaproto

x11-proto/inputproto

x11-proto/recordproto

x11-proto/xf86vidmodeproto

media-libs/mesa

x11-apps/mesa-progs

x11-base/xorg-server

x11-base/xorg-drivers

x11-drivers/xf86-video-ati

x11-proto/xextproto

x11-libs/libdrm

x11-proto/fixesproto
```

The relevant lines in my /etc/make.conf:

```
VIDEO_CARDS="svga radeonhd radeon vesa fbdev"

INPUT_DEVICES="synaptics evdev"
```

To get rid of ATI's driver (fglrx) I followed this Gentoo ATI Migration guide, except I have no xorg.conf at all. My DRM and RADEON kernel support are modules, as the guide indicates, but I didn't even add the "radeon" module to "/etc/modules.autoload.d/kernel-2.6". It is simply loaded at start up automatically:

```
$ sudo lsmod

Module                  Size  Used by

radeon                579418  2

ttm                    48515  1 radeon

drm_kms_helper         24141  1 radeon

drm                   169116  5 radeon,ttm,drm_kms_helper

...
```

With this set-up, radeon is chosen as my driver and I get 3D acceleration and fancy desktop effects in KDE. "glxgears" from mesa-progs-7.7 report ~1900 fps.

Why don't you try to do the same but removing "radeon" from your VIDEO_CARDS in /etc/make.conf, leaving only radeonhd? I'm just curious but to lazy to try it by myself  :Laughing: 

Also, if you want I can provide you with my keyboard and synaptiks .fdi files for udev when no xorg.conf is present.

Oh! I almost forgot. I have an ATI Mobility Radeon HD 4570 (512 MB).

----------

## aZZe

All right thanks a lot! I will give it a try and check it it out the next days.

----------

