Modular X on amd64 and xgl

I’ve just finished migrating from 6.8.2 to Modular X 7.0, and everything built like it should. nvidia binary drivers even work as well. Kudos to the x11 team for the hard work. (Migrating to Modular X HOWTO)

After making sure X and GL were working properly, I started to build xgl. Here’s how I did it:

# wget
# cvs login
(press Enter for password)
# cvs co glitz glitzinfo
# pushd glitz
# ./ --prefix=/opt/fdo/
# make
# make install
# popd
# pushd glitzinfo
# PKG_CONFIG_PATH=/opt/fdo/lib/pkgconfig/ make -f Makefile.glx
# LD_LIBRARY_PATH=/opt/fdo/lib/ ./glitzinfo
# popd

At this point, glitzinfo should have told you a bunch of information about available features and formats. You’ll have poor performance if you don’t have the following:

texture rectangle
texture border clamp
texture environment combine

Now it’s time to build the xgl server.

# tar -xjvf xgl-svn_100.tar.bz2
# cd Xserver-6.6.1/
# PKG_CONFIG_PATH="/opt/fdo/lib/pkgconfig/" ./configure --disable-kdriveserver --enable-glx --enable-xglserver --prefix=/opt/fdo
# make
# make install
# cd /usr/bin
# rm X && ln -s /opt/fdo/bin/Xgl X

At this point you can now start X. I use

$ startxfce4

The server seems to be somewhat unstable, but that may be because I’m trying to run 2 displays on one video card. YMMV

To go back to the original X server,

# cd /usr/bin/
# rm X && ln -s Xorg X

I’ll find out on Tuesday if I can have multiple 3D displays when my new video cards arrive.

EDIT: Sorry, no more comments because of nasty spammers

6 thoughts on “Modular X on amd64 and xgl”

  1. Ok so being a dumb dumb I decided to try getting Xgl running on my machine….

    I followed your posted directions and when trying to build Xserver.6.6.1 it bails out with PKG_CONFIG errors.

    Now to the question… tada

    Did you already have a build of the Xserver in /opt/fdo/blah ?
    The PK_CONFIG variable is set to /opt/fdo/lib/pkgconfig but after following your directions the only .pc file located in that directoy was….tada…glitz.pc/glitzinfo.pc….

    Being the fool that I am I decided to use the XserverBuildScript linked on the Xgl page…So did I just condemn myself to a multihour compile frenzy for naught ?

    Of course another thought that went thru my head simply copying the missing .pc files from /usr/lib/pkgconfig…would that have been smarter/wiser/correct ?

    at any rate I will know soon enough whether or not I just botched this little attempt to build Xgl….

    Thanks for your verbosity, but context helps even more ;)=

  2. Sounds like you didn’t properly build or install the glitz package you fetched from cvs.

  3. just as a followup….

    I ran the XserverBuildScript listed at the fdo Xgl page. About 30 minutes later the script errored out with the same error message (missing .pc files-btw. a totally non-descript error message-just stating one(or more) of many .pc files were missing without telling me which one was causing the problem). This error mesage appeared while the script was attempting to build the Xserver module(i assume this would have been kdrive-after all this script is for getting and installing kdrive). I then glanced in /opt/fdo/lib/pkgconfig and saw that enough of the script had finished building to probably build Xserver-6.6.1. So I then built Xserver and followed the rest of directions listed in the blog posting.

    The thing is the new Xserver ran just fine, brought up xfce4 and gnome -everything worked- but it was very slow -the only opengl accelration was MESA (and I have a nvidia FX5700 with binary drivers). glxgears gave me 120 fps which is what MESA generally yields on my machine.

    To be honest I am quite confused here.

    In answer to the follow post from KingTaco:

    Glitz built and installed fine- Glitz only provides two .pc files namely: glitz.pc and glitz-glx.pc

    In order to build Xserver-6.6.1 several other .pc files need to already be present in /opt/fdo/lib/pkgconfig. _This is why I originally asked if Mike had already installed something in /opt/fdo prior to what he described in his blog.

    From what I understand XGL is based on nested Xserver setup ie. one runs one Xserver inside of another Xserver. Gitz is basically an OpenGL implementation of the RENDER API. XGL simply translates all of the RENDER calls generated when drawing the X desktop into OpenGL and passes these on to the underlying OpenGL accleration framework ie. MESA for DRI OpenGL or nvidia-glx.

    My confusion stems from this:

    The XserverBuildScript crapped out while trying to build the Xserver(AFAIK kdrive). I could, however, then build Xserver-6.6.1 because the .pc files required to build it were present- due to the fact that some large percentage of script had successfully built and installed (xdmcp/Xau/composite/damage/fixes/xproto/xext/xfont etc.)

    However when I ran this new Xserver the nesting never took place. The XGL Xserver(6.6.1) must run against some other preexisting Xserver. AFAIK XGL should run against a normal Xorg 7 Xserver or Xephyr. To my knowledge one normally launches a normal Xserver and then XGL on another display, eg. :1. Thus the :0 display is redirected thru XGL and appears as accelerated OpenGL on :1.

    Since the script failed to build and install the assumedly kdrive server and XGL did not invoke my Xorg 7 Xserver the nesting part, ie. the part where things get translated from RENDER into OpenGL via glitz and nvidia-glx never took place…..

    At least this what I have logicall deduced from my botched attempt….I could be wrong of course…

    I am assuming that Mike ran XGL against Xorg 7- but Xorg 7 does not place it’s pkgconfig files in /opt/fdo/lib/pkgconfig unless it was specifically built and installed there(–prefix=/opt/fdo/). I don’t think one can copy pkgconfig files from one place to another and still have them work because the paths are hard-coded, so I doubt that the pkgconfig files from Xorg 7, which normally land in /usr/lib/pkgconfig , were copied over to /opt/fdo/lib/pkconfig….Additionally In my install of Xorg(which is the latest cvs version of the monolithic build-6.9_pre20051030) only includes 5 pkgconfig files -not those that are required to build Xserver-6.6.1 so I am at a total loss here how this is supposed to work….

    Sorry for excessively rambling here…..I would just love to try this out and have no clue as to how to get it to run. Perhaps I just don’t grok how this is supposed to work…oh well

  4. I had the problem with not met packages as well, and I have found out that the PKG_CONFIG_PATH need to be set to directory where rest the .pc files of X.Org 7 (in my case /usr/local/X11R7 where I installed *modular* X.Org built from source)

Comments are closed.