Java Desktop System Release 2 How-To:
3D acceleration on a Tadpole Talin (ATI Radeon M9)
Contents
- Background ... system used, links, notes
- Install Kernel Sources ... simple!
- Install/compile the ATI driver ...
pick your version, SuSE makes it easy
- XF86Config-4 ... pick your configuration,
I make it easy
- Modify modules.conf ... small system
tweak
- Restart X ... rebooting is best, but you have
a choice
- Testing ... how many FPS do you get?
- Final notes ... fixing libGLU, reverting to
old setup, upgrading to a new version
Legend
`` (backticks) ... commands to be executed verbatim in a command shell
- Background:
- 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.
- 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:
- 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.
- 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.
- 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.
- Only 24-bit mode is supported with this driver ... some apps
specifically require 16-bit modes though this is rare.
- 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.
- Install
the kernel source for JavaDS
- 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".
- 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.
-
Install the drivers and compile the kernel module from ftp://ftp.suse.com/pub/suse/i386/supplementary/X/XFree86/ATI/suse91/fglrx/
- NOTES:
- 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).
- 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.
- 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).
- Install the fglrx rpm (binary driver)
via:
`rpm -Uhv --force --nodeps fglrx*.rpm`
- 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)
- If you have other copies of the driver RPM you should explicitly
type out the filename, replacing "fglrx*.rpm" above.
- 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`
- 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`
- Compile the kernel module sources:
- `cd /usr/src/kernel-modules/fglrx`
- `make -f Makefile.module && make -f Makefile.module
install`
- 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`
- Use the
linked XF86Config-4.talin-clone file
to configure your X server
- NOTES:
- 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.
- 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.
- 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).
- 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.
- 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.
- 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.
- To keep a backup of your known-good XF86Config:
`cp /etc/X11/XF86Config /etc/X11/XF86Config.orig`
- Download the file and copy it to /etc/X11/XF86Config-4 (remove
the ".talin" extension) ... remember, this won't overwrite your XF86Config
setup.
- 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.
- 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):
- Clone mode - default
configuration, same image on both monitors all the time
- Single mode - only
uses the LCD
- Big Desktop -
Uses both monitors for a single large desktop
- 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 :)
- Tell the
system to pre-load the agpgart module before the ATI driver:
- Backup /etc/modules.conf:
`cp /etc/modules.conf /etc/modules.conf.bak`
- Make sure the agpgart module is loaded -before- fglrx:
`echo 'pre-install fglrx /sbin/modprobe "-k" "agpgart"' >>
/etc/modules.conf`
- Switch from the software renderer (mesasoft) to the hardware
accelerated OpenGL driver:
`/usr/X11/bin/switch2xf86_glx`
- Restarting X
- The easiest way to finish configuring is to reboot and skip to
Testing.
- 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:
- log out (if you `init 3` as follows without logging
out you may freeze up)
- switch to a virtual console (press Control+ALT+F1)
- log in to the console as root
- 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)
- Shut down X:
`init 3`
- Load the video drive kernel modules:
`insmod agpgart && insmod fglrx`
- Start X:
`init 5`
- log in to X (press ALT+F7 to get there) as root and go to
the next section
- Testing
- You can confirm you have 3D acceleration enabled by:
- logging in to an X session as normal
- open a terminal and execute:
`glxinfo | grep render`
- If you see "direct rendering: Yes" 3D acceleration is enabled
- If you see "direct rendering: No" our procedure failed (reboot
and test again if you haven't restarted X yet)
- 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.
- 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.
- 3D Driver Installation
Done!
Notes:
- 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.
- 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.
- if you want to customize or troubleshoot your setup please revisit
the notes in the XF86Config-4 section.
- 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`
- To revert to stock configuration:
- 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`
- 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`
- 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.
- 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.
- 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!
- Remove the old version:
`rpm -e km_fglrx-3.7.6-13`
`rpm -e fglrx-3.7.6-13`
- Clean up the build directory:
`rm -rf /usr/src/kernel-modules/fglrx`
- 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 $