Java Desktop System Release 2 How-To:
3D acceleration on a Tadpole Talin (ATI Radeon M9)


Contents

  1. Background ... system used, links, notes
  2. Install Kernel Sources ... simple!
  3. Install/compile the ATI driver ... pick your version, SuSE makes it easy
  4. XF86Config-4 ... pick your configuration, I make it easy
  5. Modify modules.conf ... small system tweak
  6. Restart X ... rebooting is best, but you have a choice
  7. Testing ... how many FPS do you get?
  8. Final notes ... fixing libGLU, reverting to old setup, upgrading to a new version
Legend

`` (backticks) ... commands to be executed verbatim in a command shell


  1. Background:
    1. These steps are tailored to a Tadpole Talin laptop with an ATI M9 Radeon Mobility GPU ... mileage will vary but they should help with the basic steps.

      NOTE: These instructions were written using Java Desktop System release 2 (aka "Quicksilver") and not Java Desktop System 2003 (aka "Mercury"). Tadpole Talins were first shipped with Java Desktop System 2003 along with an OEM Vendor Update CD to fix a couple of configuration issues (like getting the wireless driver set up properly). I have found that Java Desktop System release 2 seems to fix alot (if not all) of the issues that the Talin Vendor Update CD was addressing. However, if you don't want to install a fresh release 2, you will probably need to configure your kernel sources after you install them. I don't remember ever needing to do this for Quicksilver. I've put the instructions for doing this later in the document. AFAIK this is the only difference with these instructions between the two releases.

    2. The following information was derived from a ton of online postings about getting ATI cards in general to work. Some (but no way all) of the links I used for source material include:
    3. The end goal of this note is to allow 3D acceleration (via DRI) to work on the ATI card. In addition the synaptics pointing device on the Talin will be fully enabled along with a USB wheel mouse.
    4. This document is targeted for Java Desktop System 2003 and release 2 users but should apply to similar distributions (SuSE 8.x, SuSE Linux Desktop 1.0, possibly SuSE 9.x). Be aware that this procedure is UNSUPPORTED BY SUN due to the manual configuration needed, which prevents you from using YaST2 and SaX2 to configure your video card in the future.
    5. If you don't need 3D acceleration on your machine (Sun does not currently ship any 3D apps with JavaDS) then do not do the following procedure.
    6. Only 24-bit mode is supported with this driver ... some apps specifically require 16-bit modes though this is rare.
    7. In the example XF86Config-4 files I configured my own external mouse and external monitor (Sun 1399) so you may have some editing to do.

  2. Install the kernel source for JavaDS
    1. Find the kernel source for your running kernel and install it (175+ MB of space required) and install it. If you have a stock Java Desktop system you can go to "Launch / Applications / System Tools / Administration / Software Installer", then "Filter: Search" for "kernel" and select "kernel-source", then click "Accept".
    2. NOTE: You do not need to compile the kernel sources, you just need to install the source. If you desperately need the space back you can uninstall the sources after you've compiled the kernel module in the next section.

  3. Install the drivers and compile the kernel module from ftp://ftp.suse.com/pub/suse/i386/supplementary/X/XFree86/ATI/suse91/fglrx/
    1. NOTES:
      1. Yes they are in the 'suse91' directory but this allows us to use the latest version of the driver since SuSE is not putting anything into the suse81 branch anymore. I have tested these instructions against the suse90/3.7.6 and suse91/3.9.0 versions Java Desktop System release 2 (so they should also work for SuSE 8.* and SuSE Linux Desktop 1.0).
      2. I used the suse91/3.9.0 version RPMs but check to see if something newer is there when you are installing. I have also succeed with the suse90/3.7.6 version.
      3. The reason I chose the suse91/3.9.0 version was to use the latest driver since I'm told it fixes a few crash bugs in some Java3D applications. However, when running glxgears with the suse90/3.7.6 driver I was getting 1500-1700 FPS but with the suse91/3.9.0 driver I only got 1000-1200. The 3.9.0 driver has some extra bits to support kernel 2.6 so you may want to play around with 3.7.6 if getting a ton of FPS is your goal over stability (there may be some performance tweaks for 3.9.0 to fix this, I didn't check).
    2. Install the fglrx rpm (binary driver) via:
      `rpm -Uhv --force --nodeps fglrx*.rpm`
      1. I used --force and --nodeps in case you have tried to install an older version of the RPM and because it complained that the libpng library was not installed when it was on my system (possibly it was looking for the SuSE9 version of libpng)
      2. If you have other copies of the driver RPM you should explicitly type out the filename, replacing "fglrx*.rpm" above.
      3. If you want to use the version I used without checking for a newer version:
        `rpm -Uhv --force --nodeps ftp://ftp.suse.com/pub/suse/i386/supplementary/X/XFree86/ATI/suse91/fglrx/3.9.0/fglrx-3.9.0-2.1.i586.rpm`
    3. Install the kernel module source via:
      `rpm -Uhv --force --nodeps km_fglrx*.rpm`
      (see previous section for notes).

      To simply use the version I used:
      `rpm -Uhv --force --nodeps ftp://ftp.suse.com/pub/suse/i386/supplementary/X/XFree86/ATI/suse91/fglrx/3.9.0/km_fglrx-3.9.0-2.1.i586.rpm`

    4. Compile the kernel module sources:
      1. `cd /usr/src/kernel-modules/fglrx`
      2. `make -f Makefile.module && make -f Makefile.module install`
      3. NOTE: If you get complaints about the kernel sources not being the right version (should happen on a fresh Java Desktop System 2003, should not happen to my knowledge on Java Desktop System release 2 but could), do the following to setup your kernel sources as root and repeat the previous command:

        `cp /boot/vmlinuz.version.h /usr/src/linux-2.4.19/include/linux/version.h`

        `cp /boot/vmlinuz.autoconf.h /usr/src/linux-2.4.19/include/linux/autoconf.h`

        `touch /usr/src/linux-2.4.19/include/linux/modversions.h`


  4. Use the linked XF86Config-4.talin-clone file to configure your X server
    1. NOTES:
      1. Once you have the fglrx driver running, you can use the `fireglcontrol` program to configure your settings ... for some it may be preferable to do this over manually editing the XF86Config-4 file, though I've found that fireglcontrol can do some weird things with fonts.
      2. If you are NOT using a laptop with a 1400x1050 pixel screen, synaptics touchpad, and compatible ATI GPU, then skip this section and read through the sources mentioned at the top of this document as you will need to use `SaX2` and/or `fglrxconfig` files to configure your system properly. Specifically the linked XF86Config-4.talin-clone file is meant for use on a Tadpole Talin laptop, though laptops with very similar configurations may work fine.
      3. The X system on SuSE / Linux JavaDS will use the "XF86Config-4" file in preference to the file "XF86Config". This means, assuming you don't already have an XF86Config-4 file, you can install it and restart X without blowing away your known-good XF86Config file (and so you can easily switch back to your old system if needed by renaming/deleting the XF86Config-4 file).
      4. The file I have linked a copy to includes a number of customizations including a preconfigured USB wheel mouse. If you need additional configuration of the X system, you should compare the contents of your XF86Config file to my XF86Config-4 file and incorporate as necessary.
      5. From this point on you need to manually edit the XF86Config-4 file to modify your X system, YaST2 and SaX2 will not understand this version. Explaining how to edit the X directives is WAY beyond the scope of this note, Google is your friend as are the links at the beginning of this document. Please don't ask me to help fix your configuration if you messed something up or want something special. In other words BACKUP YOUR FILES. Since YaST2 / SaX2 -will- understand your old XF86Config file, you can make changes via those tools and manually incorporate the updates into your XF86Config-4 file.
      6. I've added comments to XF86Config-4 ... these may help you alter your setup and if you are using a different configuration may help you tweak that alternate configuration.
    2. To keep a backup of your known-good XF86Config:
      `cp /etc/X11/XF86Config /etc/X11/XF86Config.orig`
    3. Download the file and copy it to /etc/X11/XF86Config-4 (remove the ".talin" extension) ... remember, this won't overwrite your XF86Config setup.
    4. Scan through XF86Config-4 to see if there is anything you would like to tune. I have custom edited this file to add comments where appropriate based on parameters that can be set by SaX2 and fglrxconfig.
    5. The XF86Config-4.talin-clone file is using "clone" mode to use LCD and external monitor with identical pictures. You can also choose from one of the following alternatives if you want (all files are identical except for a few well placed comment ... you can easily edit your config later for different modes):
      1. Clone mode - default configuration, same image on both monitors all the time
      2. Single mode - only uses the LCD
      3. Big Desktop - Uses both monitors for a single large desktop
      4. Dual Head - Each monitor gets a unique desktop, no drag and drop between them. The external monitor is using the settings for my 1399 so you need to edit the "ScreenDual1" section if you want to use dualhead and you had to change "ExternalMonitor" to work with your monitor.

      NOTE: I did not do a "laptop" mode example because I don't know which key on the Talin is used to switch monitors and so I couldn't test it. I have a pre-release Talin and didn't get manuals :)


  5. Tell the system to pre-load the agpgart module before the ATI driver:
    1. Backup /etc/modules.conf:
      `cp /etc/modules.conf /etc/modules.conf.bak`
    2. Make sure the agpgart module is loaded -before- fglrx:
      `echo 'pre-install fglrx /sbin/modprobe "-k" "agpgart"' >> /etc/modules.conf`
    3. Switch from the software renderer (mesasoft) to the hardware accelerated OpenGL driver:
      `/usr/X11/bin/switch2xf86_glx`

  6. Restarting X
    1. The easiest way to finish configuring is to reboot and skip to Testing.
    2. If you want to try to get acceleration without rebooting you can try the following ... but if you don't get 3D acceleration doing this please reboot before assuming you have a problem:
      1. log out (if you `init 3` as follows without logging out you may freeze up)
      2. switch to a virtual console (press Control+ALT+F1)
      3. log in to the console as root
      4. just to be safe:
        `rmmod fglrx`
        (if it says it wasn't loaded or unloads it as expected, no big deal ... but if it complains about it being in use you will have to reboot)
      5. Shut down X:
        `init 3`
      6. Load the video drive kernel modules:
        `insmod agpgart && insmod fglrx`
      7. Start X:
        `init 5`
      8. log in to X (press ALT+F7 to get there) as root and go to the next section

  7. Testing
    1. You can confirm you have 3D acceleration enabled by:
      1. logging in to an X session as normal
      2. open a terminal and execute:
        `glxinfo | grep render`
      3. If you see "direct rendering: Yes" 3D acceleration is enabled
      4. If you see "direct rendering: No" our procedure failed (reboot and test again if you haven't restarted X yet)
      5. If you see an error, search through this document to see if you missed anything and if not, begin looking through the quoted sources at the top of this document.
    2. Assuming you didn't modify the parameters in the XF86Config-4 file and you see have 3D acceleration working (see the beginning of this section to find out) then you can run the `glxgears` program to see your FPS. You should get 1000+ FPS (depending on what else is running) on a 2.4GHz Talin w/512MB RAM. If 3D is enabled but you turn on v-sync (see comments in XF86Config-4.talin) then you'll only see <>100 FPS.

  8. 3D Driver Installation Done!

    Notes:

    1. So far I have not tracked down how to get the "fgl_glxgears" program to run (error about "fbconfig" with v3.7.6 and "Trace/breakpoint trap" with 3.9.0) but since glxgears shows the speed bump fine I haven't taken too much time to diagnose this.
    2. For now the XF86Config-4.talin file only configures "clone mode" where both the LCD and external SVGA connector both display the same screen ... other modes are available through fglrxconfig or by using the aforementioned alternate configurations.
    3. if you want to customize or troubleshoot your setup please revisit the notes in the XF86Config-4 section.
    4. Install/Run your 3D applications!

      NOTE: if you are attempting to run a Java3D program (and probably others) on the Java Desktop System, you need to do this so that it can find the GL libraries:

      `ln -s /usr/lib/libGLU.so.1 /usr/lib/libGLU.so`

    5. To revert to stock configuration:
      1. Make X stop using the accelerated config and use your old XF86Config setup (assuming you left it intact)
        `mv /etc/X11/XF86Config-4 /etc/X11/XF86Config-4.accelerated`
      2. Go back to the software OpenGL renderer (not necessary if you are not going to be using OpenGL apps with the standard video driver and if you skip this step it is that much easier to revert to 3D acceleration later)
        `/usr/X11/bin/switch2mesasoft`
      3. You can optionally remove the 'pre-install fglrx /sbin/modprobe "-k" "agpgart"' line from /etc/modules.conf and uninstall the fglrx and km_fgrlx RPMs, but these won't be used unless you have the XF86Config-4 file in place and keeping them lets you easily switch back to the fglrx driver.
    6. To upgrade the driver ...

      NOTE: I have only tested this on a Java Desktop System box with the SuSE packaged fglrx RPMs ... this may not work with other fglrx packages. It has been verified to work upgrading suse90/3.7.6 to suse91/3.9.0.

      1. Get the correct name of the RPMs you installed via:

        `rpm -qa | grep fglrx`

        In the case of suse90/3.7.6 you should see:

        fglrx-3.7.6-13
        km_fglrx-3.7.6-13

        If you got different results then please use them in the following RPM commands!

      2. Remove the old version:
        `rpm -e km_fglrx-3.7.6-13`
        `rpm -e fglrx-3.7.6-13`
      3. Clean up the build directory:
        `rm -rf /usr/src/kernel-modules/fglrx`
      4. Repeat the section on installing the ATI driver and then reboot

Acknowledgements

The Project Looking Glass team gratefully thanks Geoff Baysinger at Geoff.Baysinger@sun.com for providing these instructions!

$Revision: 1.4 $ $Date: 2004/08/19 12:20:37 $