ATI Radeon 9100: XOrg-drm or fglrx ?

 
Post new topic   Reply to topic    Lunar-Linux Forum Index -> General Discussion
View previous topic :: View next topic  
Author Message
engelsman



Joined: 21 Aug 2005
Posts: 131
Location: Netherlands

PostPosted: Thu Mar 09, 2006 8:54 pm    Post subject: ATI Radeon 9100: XOrg-drm or fglrx ? Reply with quote

lspci on my box shows:
Code:
01:05.0 VGA compatible controller: ATI Technologies Inc Radeon 9100 IGP

I've built XOrg-drm without selecting a particular driver, and it installs. If I select radeon it gives a compilation error and fails, even though lsmod on my 2.6.15.6 kernel shows
Code:
Module                  Size  Used by
radeon                 93888  0
drm                    54932  1 radeon
agpgart                25416  1 drm

This could be a complete red herring of course. Maybe I need to install or enable something else too. While trying to work out what's going on, I came across the fglrx module, and installed that, but it's not clear what to do with it. Running fglrxconfig by hand produces an xorg.conf that chokes the X server.

When I first installed XOrg six months ago, /etc/X11/xorg.conf was not created by default, and running xorgconfig produced an xorg.conf that choked the X server too. I had to craft one by hand, and as I'm no expert, I had to wonder whether I had got the best config that I could.

I've just (re?)discovered that xorgcfg exists, but that fails to even write an xorg.conf. So what with a failing xorgcfg, and xorgconfig and fglrxconfig that create xorg.confs that give the X server fatal indigestion I'm none the wiser on how to continue.

What is the recommended driver for the ATI Radeon 9100: XOrg-drm or fglrx?
And how do I then go about setting up the optimal xorg.conf?

Or should I just wait for the illusive XOrg-7.0? Smile
Back to top
View user's profile Send private message
dveatch



Joined: 12 Aug 2005
Posts: 18
Location: Port Saint Lucie, Florida

PostPosted: Thu Mar 09, 2006 11:24 pm    Post subject: Reply with quote

Ok. Lets take this one step at a time.

1. motherboard- intel chipset or via? Which ever it may be you afaik also need intel_agp or via_agp kernel modules. lspci will help you there. Those are located in the AGP section of the kernel config.

2. When running fglrxconfig, please define what "chokes the X server" means. By that I mean, what is the output of Xorg.0.log?

3. Try using "xorgcfg" instead of xorgconfig. I have found the former to be more useful.

4. As for which driver to use, fglrx or XOrg-drm, whichever one you get running first? Smile
_________________
You can tune a piano but you can't tuna fish.
Back to top
View user's profile Send private message Send e-mail AIM Address Yahoo Messenger MSN Messenger ICQ Number
engelsman



Joined: 21 Aug 2005
Posts: 131
Location: Netherlands

PostPosted: Fri Mar 10, 2006 6:18 am    Post subject: possible lines of attack Reply with quote

My full lspci listing shows
Code:
root@linux ~ # lspci
00:00.0 Host bridge: ATI Technologies Inc Radeon 9100 IGP Host Bridge (rev 02)
00:01.0 PCI bridge: ATI Technologies Inc Radeon 9100 IGP AGP Bridge
00:13.0 USB Controller: ATI Technologies Inc OHCI USB Controller #1 (rev 01)
00:13.1 USB Controller: ATI Technologies Inc OHCI USB Controller #2 (rev 01)
00:13.2 USB Controller: ATI Technologies Inc EHCI USB Controller (rev 01)
00:14.0 SMBus: ATI Technologies Inc ATI SMBus (rev 1a)
00:14.1 IDE interface: ATI Technologies Inc ATI Dual Channel Bus Master PCI IDE Controller
00:14.3 ISA bridge: ATI Technologies Inc Unknown device 434c
00:14.4 PCI bridge: ATI Technologies Inc Unknown device 4342
00:14.5 Multimedia audio controller: ATI Technologies Inc IXP150 AC'97 Audio Controller (rev 01)
01:05.0 VGA compatible controller: ATI Technologies Inc Radeon 9100 IGP
02:08.0 Ethernet controller: 3Com Corporation 3Com 3C920B-EMB-WNM Integrated Fast Ethernet Controller (rev 40)
02:09.0 Ethernet controller: Atheros Communications, Inc. AR5212 Multiprotocol MAC/baseband processor (rev 01)
02:0a.0 FireWire (IEEE 1394): VIA Technologies, Inc. IEEE 1394 Host Controller (rev 80)
02:0c.0 CardBus bridge: ENE Technology Inc CB-710/2/4 Cardbus Controller (rev 02)
02:0c.1 FLASH memory: ENE Technology Inc CB710 Memory Card Reader Controller

From searching the web I've come up with the following scenarios:

1) ATI Radeon 9100 might not support 3D - one radeon man page says it doesn't, but people talk about getting it working anyway

2) I need to have intel_agp {or maybe ati_agp) compiled into the kernel rather than as a module,

3) and/or I'm missing some udev setup that creates /dev/agpart

4) and/or I'm missing some magic in xorg.conf

5) it could be that the syntax error in XOrg-drm (drm_agpsupport.h line 47) is a real coding error, and not down to missing config. seems unlikely.

I've just rebuilt the kernel, but realised that the CONFIG_AGP* are still set to 'm' Sad
I'll have to try again later.
Back to top
View user's profile Send private message
sofar



Joined: 11 Aug 2005
Posts: 172

PostPosted: Fri Mar 10, 2006 6:46 am    Post subject: 4) and/or I'm missing some magic in xorg.conf Reply with quote

about the drivers:

1) Open Source "ati" driver - standard in xorg - does NOT provide 3D
2) Open Source "radeon" driver - comes from the XOrg-drm module, provides 3D for SOME cards
3) closed source "fglrx" driver - comes from the binary "fglrx" module, provides 3D for SOME cards.

when you "pick" one of these "drivers" - you need to tell XOrg that your "video driver" also has changed.

For instance, I use the radeon DRI on my radeon7500 (which has 3D support). My xorg.conf has thus a section like this:

Code:
Section "Device"
        Identifier  "Card0"
        Driver      "radeon"
        VendorName  "ATI"
EndSection


note that when you use "fglrx" or "ati" as driver, you *NEED* to change the "Driver" string in your xorg.conf.

hth
Back to top
View user's profile Send private message Send e-mail
engelsman



Joined: 21 Aug 2005
Posts: 131
Location: Netherlands

PostPosted: Sat Mar 11, 2006 8:18 pm    Post subject: At last: glxinfo shows Direct rendering: Yes ! Reply with quote

I've finally done it, based on the clues given above, the contents of /var/log/Xorg.0.log, running 'LIBGL_DEBUG=verbose glxinfo' and searching Google for the error messages, and also the DRI Troubleshooting page!

I've compiled the AGP and ATI_AGP into the 2.6.15.6 kernel (I was trying to use the ati_agp module but maybe it needed the later steps too).

I've compiled DRM and the related RADEON driver as modules (I also tried compiling them into the kernel, but again, maybe it needed the later steps).
Code:
CONFIG_AGP=y
CONFIG_AGP_ATI=y

CONFIG_DRM=m
CONFIG_DRM_RADEON=m

After rebooting, 'LIBGL=verbose glxinfo' showed that there was a problem with resolving a module within libGL.so, so I eventually decided to reinstall 'XOrg' from scratch. XOrg-drm still gave an error where 'struct drm_agp_t' was undefined, so I installed XOrg-drm-cvs instead.

xorgcfg failed to give meaningful output because it was just swamped with undefined modules until I remembered to run 'lrm fglrx' and either this action, or swapping back and forth with lin and lrm trying to install XOrg-drm and XOrg-drm-cvs resulted in the removal of libGL.so. That was just at the point I was going to report success earlier, and wanted to run glxgears to find the frame rate when I found that it didn't work. And neither did glxinfo! Luckily it was lunar fix to the rescue, and here we are.

glxinfo reports: direct rendering: Yes

glxgears reports: 3595 frames in 5.0 seconds = 719.000 FPS

I went round in circles because I thought that the creation of /dev/agpart was the key to the process, but in fact, the configuration I've got now doesn't have it. (Shrugs)

Maybe I've forgotten to report a vital step here - it's all a blur after 6 evenings of kernel rebuilds and rebooting - but this is what has worked for me. Someone else might succeed in using the ati_agp module instead. Good luck.
Back to top
View user's profile Send private message
sofar



Joined: 11 Aug 2005
Posts: 172

PostPosted: Sat Mar 11, 2006 10:47 pm    Post subject: one question Reply with quote

you said that you use the following kernel config options:

Code:
CONFIG_DRM=m
CONFIG_DRM_RADEON=m


but also have the XOrg-drm-cvs module installed. This creates a conflict, as the kernel installs a radeon.ko and so does XOrg-drm-cvs.

You should see which module you are actually using - for instance by checking the timestamp of the radeon.ko kernel module.
Back to top
View user's profile Send private message Send e-mail
engelsman



Joined: 21 Aug 2005
Posts: 131
Location: Netherlands

PostPosted: Sun Mar 12, 2006 8:56 am    Post subject: That might explaing it! Reply with quote

That might explaing why it took me so long trying to get the right combination Smile

I had uninstalled both XOrg-drm and XOrg-drm-cvs at one point, and things were still running, but it was about then that I lost libGL.so. Things obviously don't get cleared out properly until reboot.
Back to top
View user's profile Send private message
engelsman



Joined: 21 Aug 2005
Posts: 131
Location: Netherlands

PostPosted: Sun Mar 12, 2006 2:43 pm    Post subject: Kernel v XOrg-drm[-cvs] modules Reply with quote

I've just run 'lrm XOrg-drm-cvs' so now I have neither Xorg-drm nor XOrg-drm-cvs installed. I've just run 'lin linux-2.6' and rebuilt with the same options given above. I've rebooted, (my libGL.so hasn't disappeared), glxinfo still runs, and still tells me 'direct rendering: Yes' Smile

And I've just found that I do have /dev/agpgart rather than /dev/agpart: a typo or thinko that's cost me a lot of time maybe Embarassed

I've no idea what would happen if I rebuild XOrg from scratch again though Smile

Seriously though, maybe I've reached the point where I have to find time to read up about the Linux kernel architecture, how compiled drivers work compared to modules, etc. I've been working under the impression that code for common drivers/modules is helpfully supplied as part of the kernel distribution, by the distro's developers, and that other drivers/modules can be added later. Like the madwifi-cvs module that I'm using. I thought that the configuration process allowed you to (a) ignore a feature, or (b) add a stub for a feature so you could hang a kernel module on it later, or (c) compile the code directly into the kernel. It hadn't really crossed my mind that there were kernel supplied drivers/modules *and* also alternative drivers and modules for some features, and that they might conflict. I assumed that everyone was working together on a single unified driver or module.

They say that a little bit of knowledge is a dangerous thing, but on the other hand, they also say that ignorance is bliss Confused
Back to top
View user's profile Send private message
sofar



Joined: 11 Aug 2005
Posts: 172

PostPosted: Sun Mar 12, 2006 9:36 pm    Post subject: kernel modules are never removed by lunar Reply with quote

kernel modules are never removed by lunar - whenyou lrm xorg-drm-cvs the 'radeon.ko' module stays intact. this is to insure that you can ue the hardware if something bad happens. the best way to start from scratch is probably:

Code:
lrm XOrg fglrx XOrg-drm-cvs XOrg-drm linux-2.6
rm -rf /lib/modules/`uname -r`
lin -c linux-2.6
lin -c XOrg
lin -c (the module that you wanted to use for drm - xorg-drm-cvs)


check 'lvu from radeon.ko' afterwards - the radeon.ko module will come from the module in that list that was installed *last* - it overwrote the previous versions.

You can disable the radeon.ko in the kernel and such of course.
Back to top
View user's profile Send private message Send e-mail
engelsman



Joined: 21 Aug 2005
Posts: 131
Location: Netherlands

PostPosted: Fri Mar 17, 2006 1:11 am    Post subject: It's baaack !!! Reply with quote

With some trepidation, early yesterday evening I started to follow the procedure above. I was running the current 2.6.15.6 kernel, with the apparently strangely configured but working AGP- and DRM-enabled kernel and/or modules. I shut down X as I was going to be removing and rebuilding it anyway, and started work on the console.

I ran the lrm line given in the reply above this one. I ran the rm -rf /lib/modules/`uname -r` line, and then started with lin -c linux-2.6. It didn't run make menuconfig but prompted me for the config one line at a time. I obviously made a mistake or two along the line, like giving a LOCALVERSION suffix that kept reappearing even when I thought I'd got rid of it. Lucky for me, as it turned out. I carefully added AGP and AGP_ATI into the kernel, and said no to DRM and DRM_RADEON in both the kernel and as modules. I let the system build.

It built the kernel. Then it built hostap, pcmcia-cs, madwifi-cvs and iptables, and then it surprised me by rebuilding XOrg too. Total build time was the best part of an hour.

I rebooted the system into the new 2.6.15.6, only to find that my wifi connection had gone. If you've read my User Talk page, you'll know what a saga it was to get the thing to work in the first place Exclamation

I ran lin madwifi-cvs but it complained about a missing file (/etc/*/ppp/isp or something like that) and refused to build. I ran lin kernel-headers-2.6 and tried again, and this time it worked. On reboot, the wifi was still missing. modprobe ath_pci etc threw up fatal errors about missing modules.

I rebooted into 2.6.14.5, which did have a working wifi, and tried to lin linux-2.6 from there. I went round the loop with kernel-headers-2.6 and madwifi-cvs several times, booting in both 2.6.14.5 and in the new 2.6.15.6 but with the same result. No wifi Exclamation

I began to get suspicious that I'd done something wrong in the first kernel re-config and that the error was simply being re-used over and over when I kept seeing the LOCALVERSION suffix reappearing, even though I kept deleting it from the config. And by this time I'd run lin -rc linux-2.6 and had specified that I wanted to use menuconfig so it was easier to go back and forth through the menus to check and change the config.

Finally, in desparation, I went back to square one. After booting 2.6.15.6, I ran the lrm again, and then removed /lib/modules/2.6.15.6* and rebooted into 2.6.14.5. I started the lin -rc linux-2.6 again, this time loading a copy of the strange but working 2.6.15.6 config that I had carefully saved elsewhere before I started on this rebuild from scratch.

Once again an hour to build the kernel, hostap, pcmcia-cs, madwifi-cvs, iptables and XOrg. Would it work? On the first reboot, no. But after reloading the kernel-headers-2.6 and madwifi-cvs and rebooting again, we were back in business. The wifi was back Exclamation

So after two long evenings of rebuilding, the system is back to the strangely configured, but apparently working configuration with AGP and AGP_ATI configured into the kernel, and DRM and DRM_RADEON configured as modules. lvu reports that XOrg-drm, XOrg-drm-cvs and fglrx are not installed. glxinfo still reports that direct rendering is enabled, and glxgears still gives me 720FPS.

lunar nofix has just reported that the only problem is with libperl.so in graphviz, so we're back to normal Shocked

Now I know that I can recover to this configuration, given an hour of downtime, I might have another go at reconfiguring over the weekend, but I'm more tempted just to let sleeping dogs lie.

Thanks for the help - and I don't mean that sarcastically.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Lunar-Linux Forum Index -> General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group