You are not logged in.

#1 2007-07-05 20:28:49

ConnorBehan
Package Maintainer (PM)
From: Long Island NY
Registered: 2007-07-05
Posts: 1,359
Website

DRI and GLX

I ordered a larger hard drive for my laptop so I can have some fun and when it arrives I plan to install a Linux distro that I've never tried before... you guessed it: Arch!  Something I've had trouble with in the past is getting open source 3D acceleration to work. 

When I used ubuntu I followed these instructions: http://dri.freedesktop.org/wiki/Building and http://mesa3d.org/ for compiling Mesa and DRM on X.org 7.0.  I was so sure it was going to work.  The drivers and the kernel modules seemed to compile correctly and in the end my X.org logfile said "Direct Rendering Enabled" and xdpyinfo listed DRI as one of the extensions.  However glxinfo said "Direct Rendering: No" and glxgears was still very slow, so clearly it didn't work.

If I were to download Archlinux "Full" right now, what would be the recommended steps for getting DRI and GLX?  Would there be an easier way than compiling Mesa and DRM?  I noticed a number of packages related to direct rendering.  I would love to enjoy Arch Linux but I don't want to spend days trying to compile DRI and GLX and not getting it to work.  This will be the first thing I try when I install it.  Can anyone offer me any advice?


6EA3 F3F3 B908 2632 A9CB E931 D53A 0445 B47A 0DAB
Great things come in tar.xz packages.

Offline

#2 2007-07-05 20:41:08

Misfit138
Misfit Emeritus
From: USA
Registered: 2006-11-27
Posts: 4,189

Re: DRI and GLX

By "open source 3d acceleration" do you mean using the xfree86 drivers rather than the proprietary drivers like nvidia, for example?
I use the nVidia drivers on Arch and glx support seems built in; it is loaded in the "Module" section of my xorg.conf.
This was as easy as:

# pacman -S nvidia

No compiling.
I was not aware that you could get 3d acceleration from the open xfree86 drivers.

Offline

#3 2007-07-05 21:24:03

mucknert
Member
From: Berlin // Germany
Registered: 2006-06-27
Posts: 510

Re: DRI and GLX

DRI and GLX are mutually exclusive. Either you use DRI or GLX. That's at least how I understood it.


Todays mistakes are tomorrows catastrophes.

Offline

#4 2007-07-06 13:50:48

tom5760
Member
From: Philadelphia, PA, USA
Registered: 2006-02-05
Posts: 283
Website

Re: DRI and GLX

@mucknert: Are you sure?  I thought you needed DRI to get GLX.  Hmm...

Anyway @ConnorBehan:
What kind of video card do you have?  If you have an nVidia or Intel or ATI, it should be pretty easy.  I have an Intel 945 integrated card in my MacBook, and an ATI X700 in my desktop, and they both work well.  I don't have an nVidia, but I hear good things about their cards.

The only thing you may be concerned with, is if you actually want to use true open source drivers.  Intel has the best true open source drivers.  nVidia has really good proprietary drivers (from what I hear).  ATI has sorta decent proprietary drivers, but you won't be able to use GLX easily (you have to use this thing called AIGLX).  The ATI open source drivers are good, they let you use GLX and stuff like Beryl well, but don't try and do anything super 3D intensive.

Make sure you check out the wiki for instructions for your particular card.

Offline

#5 2007-07-06 14:04:44

kth5
Member
Registered: 2004-04-29
Posts: 657
Website

Re: DRI and GLX

DRI = Direct Rendering Interface
DRI is the interface X11 uses to access DRM (Direct Rendering Management) in the Linux kernel. It usually only speeds up writes to the cards amongst other advantages over using plain software.

GLX = OpenGL Extension to the X Window System
GLX is like Direct3D on windows. Yet another implementation of a 3D library and does not require DRI! It can on the other hand take advantage of certain combinations of Kernel, Platform & X11 and make use of DRI for several things such a texture upload & execute operations on teh GPU instead of the main CPU. That although is very driver dependent.


For either DRI or GLX to work, you don't need to compile a thing on Arch. Especially for the comercial nvidia as they come with their own built of the DRI/GLX extensions - you'll see that nvidia-utils conflicts with libgl-dri.

Last edited by kth5 (2007-07-06 14:06:47)


I recognize that while theory and practice are, in theory, the same, they are, in practice, different. -Mark Mitchell

Offline

#6 2007-07-07 00:51:36

ConnorBehan
Package Maintainer (PM)
From: Long Island NY
Registered: 2007-07-05
Posts: 1,359
Website

Re: DRI and GLX

Sorry I should have mentioned that.  My laptop is fairly old (but I love it and want to keep using it).  It is a Thinkpad a22m with an ATI Rage Mobility M3.  ATI's proprietary driver (fglrx) doesn't work with it... the two open source drivers that work with it and claim to support 3D acceleration are ati.2 from gatos.sourceforge.net and X.org's r128.  It has 8MB of memory so I won't be using Beryl or playing games, this computer is primarily for work... I just want to make the most of the hardware I have.

GATOS looks like a whole other challenge on its own so I will start by getting Arch with X.org and the r128 driver, and trying to install DRI.  GLX works but it does not use direct rendering for some reason... it might be because ubuntu comes with alot of things preinstalled and in non-standard directories.  I don't know how many times I've compiled a program that couldn't find a dependency until I made a symlink to it.  That's one of the reasons why I'm switching to Arch.

Does anyone have experience using direct rendering with GLX on the r128 driver or another open source driver of X.org?


6EA3 F3F3 B908 2632 A9CB E931 D53A 0445 B47A 0DAB
Great things come in tar.xz packages.

Offline

#7 2007-07-07 02:29:00

kth5
Member
Registered: 2004-04-29
Posts: 657
Website

Re: DRI and GLX

With 8MB, do not set more than 1024x768 at 16bpp. This will give you very minimal DRI/GLX. I would recommend to discard the idea of 3D though, and only use XAA with is much faster with more free memory - as in no DRI/GLX.


I recognize that while theory and practice are, in theory, the same, they are, in practice, different. -Mark Mitchell

Offline

#8 2007-07-09 20:48:56

ConnorBehan
Package Maintainer (PM)
From: Long Island NY
Registered: 2007-07-05
Posts: 1,359
Website

Re: DRI and GLX

Yes when I was setting it up before I noticed that I had to set 1024x768 and 16 bit colour... maybe if I get it to work I will discover that it isn't worth the small screen size and colour depth... but I definitely want to get it working so I can decide for myself.  How does one usually do that on Arch?  Is it the same labour intensive building process that http://dri.freedesktop.org/wiki/Building recommends?  Or is there a package that makes DRI/GLX on r128 a little easier?


6EA3 F3F3 B908 2632 A9CB E931 D53A 0445 B47A 0DAB
Great things come in tar.xz packages.

Offline

#9 2007-07-09 21:43:01

kth5
Member
Registered: 2004-04-29
Posts: 657
Website

Re: DRI and GLX

As I already sai, you don't need to build anything at all. Just install your graphics driver and if that supports DRI at all it will only be a matter of configuration.


I recognize that while theory and practice are, in theory, the same, they are, in practice, different. -Mark Mitchell

Offline

#10 2007-07-10 01:26:36

ConnorBehan
Package Maintainer (PM)
From: Long Island NY
Registered: 2007-07-05
Posts: 1,359
Website

Re: DRI and GLX

I believe the X.org comes with the r128 driver and Arch Full comes with X.org.  I don't have very many questions for configruing...  I know about adding "DRI" and "GLX" and adding "Mode 0666" and I've seen the options in the Device section of Xorg.conf in many examples.  However, the "AGPMode" option can have many values like 0,1,2,3 or 4 depending on your device.  I don't know which value the Rage Mobility M3 uses.  Is there a way I can find out?  Or should I just try all of them?

Then there's the matter of kernel modules.  The compilation instructions had me copy r128.ko and drm.ko and such into the /lib/modules/2.6.15-26-686/kernel/drivers/char/drm directory.  If I install Arch Full with X.org, will those files already be there?  If not I suppose the drm-radeon-git 20070131-1 package will contain them.  The name implies that it is only for radeon modules but the description says ATI modules which should include r128.  The person who reported successful DRI with the Rage Mobility M3 on http://free3d.org got 795 fps in glxgears - way higher than what I get with no DRI but he said he used the radeon driver.  He must have meant r128, I tried radeon and it absolutely does not work - X won't even start with it.  Different people have also told me different kernel modules I need to load.  Here's what my modules file looks like now:

agpgart
intel-agp
ati-agp
drm
r128

Is there anything I'm missing?  I put intel-agp and ati-agp because my card is ATI but my motherboard is Intel so at least one of them will work.  Also... is just the name of the module sufficient on Arch?  Or should I put the pre-install /sbin/modprobe command in there?

Finally, do I need to install these packages? libgl-dri-git 20070131-1, libdrm-git 20070407-2... they seem to be what I'm looking for even though they are "unsupported."  Sorry for all the questions, but I know you will be a big help.

Last edited by ConnorBehan (2007-07-10 01:27:50)


6EA3 F3F3 B908 2632 A9CB E931 D53A 0445 B47A 0DAB
Great things come in tar.xz packages.

Offline

#11 2007-07-11 16:54:14

ConnorBehan
Package Maintainer (PM)
From: Long Island NY
Registered: 2007-07-05
Posts: 1,359
Website

Re: DRI and GLX

Hmm it appears as though these modules will be automatically loaded once hwdetect tries to load the proper modules for the AGP hardware.  And maybe drm and r128 will automatically load when I configure X.  I can always check lsmod to see if they are in use.  If not I'm sure rc.conf will allow me to load them.  I will try just stating the name and I will try the pre-install command that the building instructions give.

I will also make sure I have the mesa, libdrm and libgl-dri packages installed and I will try AGPMode 0,1,2,3 and 4.  Does this sound like a good plan?


6EA3 F3F3 B908 2632 A9CB E931 D53A 0445 B47A 0DAB
Great things come in tar.xz packages.

Offline

Board footer

Powered by FluxBB