# XFree 4.3 + XFree-drm but no 3d on radeon 9000 pro

## aequitas

I have a Gigabyte (powered by) Ati radeon 9000 pro.

I have merged XFree 4.3 and the XFree-drm.

I have AGPGART in my kernel no DRM (that was included in the xfree-drm emerge i believe)

Configured it as in the file here

But i don't have any 3d support. Glxinfo says no direct rendering. And glxgears is about 250.

The EE and WW in my XF log:

```

(EE) RADEON(0): Virtual height (0) is too small for the hardware (min 128)

(EE) RADEON(0): No valid mode found for CRTC2 clone

(WW) Open APM failed (/dev/apm_bios) (No such file or directory)

(WW) RADEON: No matching Device section for instance (BusID PCI:1:0:1) found

(WW) RADEON(0): Bad V_BIOS checksum

(WW) RADEON(0): Cannot read colourmap from VGA.  Will restore with default

(WW) RADEON(0): [agp] AGP not available

(WW) Open APM failed (/dev/apm_bios) (No such file or directory)

(WW) Open APM failed (/dev/apm_bios) (No such file or directory)

(WW) Open APM failed (/dev/apm_bios) (No such file or directory)

```

The complete log can be found here

Anyone who can help me?

----------

## J.M.I.T.

I think you gotta wait until ATI releases XFree 4.3 drivers for their cards.

Until then you have to stay with Xfree 4.2 if you want hardware 3d support. As far as i know, the current drivers (4.2.1-2.5.1) don't work with XFree 4.3.0...

----------

## radTube

The DRI drivers are working fine with my r8500. According to xfree86.org there should also be 3d support for the r9000. I quess you've got a problem with your configuration. Try checking if the radeon drm module is loaded correctly by running lsmod. You might also need to enable direct rendering manager under character devices in the kernel.

----------

## aequitas

I don't want to wait for ati to release new drivers. Who knows how ling it will take. BTW the ati drivers screw up my framebuffer console. 

The module is loaded fine. But isn't used "used 0".

I wil try to mangle around with some kernel setting. Se what i can do.

----------

## Colonel Paneek

Yay finally it works.   :Very Happy: 

I'm using a Gigabyte Radeon 9000 Pro on a GA-7VKML m/b

It was necessary for my m/b to load agpgart as a module

so that agp_try_unsupported=1 could work.

agpgart must be loaded before module radeon.

With XFree 4.3, It was necessary to define a virtual

screen size in my Screen section of XF86Config. I set mine

to my active resolution.

    SubSection "Display"

        Depth           16

        Modes           "1280X1024" "1024X768"

        ViewPort        0 0

        Virtual           1280 1024

    EndSubsection

The ebuild advises not to merge xfree-drm. I didn't.

When I used XFree 4.2.1, glxinfo would tell me that

direct rendering was enabled, but running glxgears would

lock up my box.

Getting approx 2400 fps from glxgears   :Very Happy: 

----------

## aequitas

thx for the tips. Ill will try to see if it works on my card. 

Did you emerge xfree-drm or did you use the kernel radeon drivers?

edit: sorry overread it

----------

## Cappy

I have the exact same card as above...Gigabyte Maya II-Radeon 9000 Pro and it works perfectly with xfree4.3 and the DRM module.

Actually its not really necessary to builg "agpgart" as a module...you CAN build it in the kernel if you like, I actually think it is better because it loads it before the xfree DRM module. The one major key is that when you compile the kernel....DO NOT add the DRM that is included with the kernel because you want the xfree DRM module. It is also not necessary to enable a virtual screen size in the config. All  you need to do is emerge xfree-drm, and then uncomment "load GLX" and "load DRI" in your XF86Config file, restart the X server. There are also several options you can add to the config file also to improve performance. One is to enable 4x AGP (if your board supports it) because it defaults to 1x. Do it by adding (Option "AGPMode" "4"). Also this next one will give you a big performance jump.... (Option "EnablePageFlip" "yes"). If you type "info radeon" in a console it will give you a lot of info on the radeon series including aditional options you can add to the config. Of course you need to do these in the "Device" section where Radeon is listed. Hope this helps  :Smile: 

Cap

----------

## aequitas

Can you explain to me why it doesn;t work for me then?

----------

## Cappy

Youre not trying to use ATIs driver are you?  the fglrx 2.51 or whatever it is....because it wont work with xfree4.3.  Also when you ran XF86Config....which driver did you use...there's 2 "generic Radeon" ones,  the "ATI" driver and the "Radeon" driver. The one you want is the "Radeon" driver.

Do you have "agpgart" compiled as a module?? or is it compiled directly in the kernel ?? You also want make sure you chose the correct chipset for you're board. You might want to check you're kernel config. Make sure DRM is NOT chosen in the kernel....this is very important....xfree will take care of it. You're best bet may be to start fresh.....try compiling "agpgart" in the kernel...not as a module, if it isn't already. Make sure your're not using the kernel DRM. Make sure you're appropriate chipset is listed and chosen. You can do this even with you're system up and running. In a console, just go back to /usr/src/linux.....run "make menuconfig" just like you originally did ( make sure you open up you're console window big enough or it will complain about it no being big enough). All the settings that are already marked  ARE the ones that are currently active...and see what you have. Like I said....compile "agpgart" into the kernel...not as a module. Make sure DRM is NOT chosen. Exit and save. Delete the current linux folder (in /usr/src). Also delete "bzImage" in /boot.  And just to be safe, got to /lib/modules and delete the folder that represents you're current kernel eg. 2.4.20 or whatever it is. Now recompile the kernel just like you did during the install (make dep && make clean bzImage modules modules_install). After that...just do..cp /usr/src/linux/arch/i386/boot/bzImage /boot. After that...just rerun xf86config in a console....chose the "generic radeon" with the "radeon" driver....fifnish that up....then reboot so it loads with the new kernel. Then just emerge "xfree-drm". Then go to /etc/X11 and open up your XF86Config file and uncomment "load DRI" and "load glx" then rerstart the X server and you should be good to go. I get about 2000 fps with glxgears with agp 4x set and page flipping enabled. the perfomance is a little less than what the ATI driver gave me with Xfree4.2.x but no bad none the less. Give it a try and post back the results and we'll go from there.

btw...I apologize if this was too "n00bified"  :Smile:  but I was just trying to help in the event you are/were kind of new to linux....if not... sorry   :Embarassed: 

Cap

----------

## aequitas

NP  :Smile: 

Now here's what i have tried the latest:

build the kernel without drm but with agpgart as module with VIA support. Then when i wanted to load the module it gave a error about not supported chip. So i tried the agp_try_unsupported=1 and it did load fine. 

My XFree used the radeon drivers all the time and it still does. I used the firegl before but the srew up my beatifull fb console. 

The dri and glx options are on and have always been on.

I have added virtual 1024 768 to my config so i had one error less  :Smile: 

I had xfree-drm merged already.

With these settings i get the error DRIinit failed. 

Any clue?

I am trying differt combintions of kernel setting now. Hope it will work out.

I just discovered an extra error messages with no (EE). 

drmopen failed to load the radeon driver. Maybe because i tried kernel drm support after the xfree-drm emerge. 

Emerging xfree-drm now to see if it helps.

----------

## aequitas

Update:

XFree now crashes my box. 

apggart as module

no drm in kernel

emerge xfree-drm

I'll keep trying.  But not today. Got to get some sleep. 

BTW when i do a modprobe radeon and a dmesg it says it has initialized dri. But x crashes so i didn't had the chanche to test it.

----------

## Cappy

maybe I was a little confusing.....I was typing faster than my brain can think    :Rolling Eyes: . But try compiling "agpgart" into the kernel....not as a module. I know compililing it as a module does work for some people....but in my experience it has always been a problem....similiar to yours...thats why I always compile it into the kernel....not as a module. Also....the way xfree-drm is packaged it installs it into whatever kernel your "linux" symlink points to.....and the same goes  for where it installs to /lib/modules. So if you have several different kernels set up to boot into and you have grub or lilo pointing directly ater you're "linux-2.whatever, but your "linux" folder symlink is stale and points to another kernel on you're system...it will still install it there....the same goes for you includes directory....you will undoubtedly have probs as I found out. As Of now, I have 3 different kernels...and only my favorite has hardware acceleration. A bit of hacking is in order to allow it in all installed kernels....possibly rewriting the makefile...don't know though. Haven't really felt like messing with it too much. As long as I have it working in one...i'm happy. If you wan't, issue a dmesg and post it so I can take a look at whats going on at boot time. It may just be something so simple that you're just missing. Sometimes it just takes another person to spot it  :Smile:  Also...what kind of hardware are you running....motherboard/chipset to be exact. It seems like you're system is being stubborn. Installation for me has always been fairly trouble free....except for the multiple kernel deal  :Smile:  Let me know how it goes. I'll check back frequently.

Cap   :Cool: 

----------

## Cappy

Oops   :Embarassed: , I just now noticed you DID post your xf86config file. Must have missed that...might have saved me a bit of typing....oooh well  :Smile:   A few things I noticed in it though....the bus ID is not really needed in there if you're only using one card and/or a single display as it will default to the active cards ID. its not like the actual ATI fglrx driver that had a bug in it where you had to change ID 1:0:1 to 1:0:0 in the config file (this may not have been a problem with Gentoos port of it though). Also, if I'm not mistaken, the Radeon series doesn't utililize Fast Writes (maybe the 9700 and 9500 series do). I know its in the info page....but I think that is inaccuarate. I could be wrong though  :Smile:  I have tried it though...having it doesn't cause any probs....it just doesn,t do anything performance wise. All I have in the vid card section of xf86config is the identifier,driver "radeon" , "AGPMode" "4", "EnablePageFlip" "yes",  and VideoRam "131072" (its a Maya II 9000Pro II w/128 MB) ......and the "clone" options doen't need to be there either.   Just a though....post back and let me know how it goes.

Cap  :Cool: 

----------

## aequitas

I think its the agpgart. Yesterday i checked the dmesg to see if agpgart loads properly when build in to the kernel. It gives the error it can't find any supported chipsets. When i load it as modules with agp_try_unsupported=1 it loads the generic. But that crashes my system i guess

I have a gigabyte GA-7VAXP. It has a VIA kt400 chipset. 

Today ill not be working with linux i guess because i have a lot of dreamweaving to do. Maybe when i get some time ill try the ram setting.

----------

## Cappy

I don't think manually setting your ram is going to help...but its worth a try....I'm sure your right about agpgart though. Even though VIA chipsets are supported....it maybe an issue with the fact that its a kt400....fairly new...it may not yet have full support in the kernel. Which kernel are you using ??? have you tried any other kernels....maybe something a bit more "bleeding edge" but still built on the stable sources...or even a development kernel just to see. Mine definately detects the chipset properly..or close anyway. Reports it as a Via Apollo Pro kt266....it a 266A...but thats close enough  :Smile:   I'll see if I can dig up some resources.

Cap   :Cool: 

----------

## aequitas

When i see the supported chipsets in the help file for the VIA agpgart i don;t see anything about kt400 nor kt333. My current kernel is vanilla-sources 2.4.20. I will search kernel.org for some info about the VIA chipset support.

Maybe there are some patches available for kt400.

----------

## Cappy

I seems kind of odd , doesn't it, that some of the more heavily patched kernels support the NForce chipsets.....but not the common VIA ones. I'm currenly using the lolo-sources as my primary....but also have the CK and GS sources bootable. Yeah the vanilla is plain-jane....some kernel has to have support for that chipset.....Its way late here.....but in the morning I'll take a peak at the one I have running and see what kind of chipset support they have....plus you get a bit of performance tweek using something like the CK, lolo....or any that are preemtable. I did have the vanilla sources installed at one point while trying to figure out a devfs glitch I had...which actually turned out to be a bit buggy on my system, downgraded the version...all probs gone  :Smile: ......but anyway... I notice a difference in crispness of apps and such. Gotta run....I'll get back to you.

Cap   :Cool: 

----------

