From cdd8bc7c83cbdc30bbabd4248f0f843526560f35 Mon Sep 17 00:00:00 2001 From: gferg <> Date: Sun, 3 Feb 2002 21:04:44 +0000 Subject: [PATCH] updated --- .../docbook/Nvidia-OpenGL-Configuration.sgml | 824 +++++++++++------- .../Unix-and-Internet-Fundamentals-HOWTO.sgml | 68 +- LDP/howto/linuxdoc/C++Programming-HOWTO.sgml | 56 +- LDP/howto/linuxdoc/Kernel-HOWTO.sgml | 287 +----- LDP/howto/linuxdoc/PHP-HOWTO.sgml | 72 +- 5 files changed, 651 insertions(+), 656 deletions(-) diff --git a/LDP/howto/docbook/Nvidia-OpenGL-Configuration.sgml b/LDP/howto/docbook/Nvidia-OpenGL-Configuration.sgml index 1fecc9b2..0ada4bc9 100644 --- a/LDP/howto/docbook/Nvidia-OpenGL-Configuration.sgml +++ b/LDP/howto/docbook/Nvidia-OpenGL-Configuration.sgml @@ -1,8 +1,8 @@ - + -
+ - + Nvidia OpenGL Configuration mini-HOWTO Nvidia-OpenGL-Configuration-mini-HOWTO @@ -12,15 +12,15 @@ B
- reaster@comptechnews.com + reaster@reaster.com
- v1.9 - 2001-03-20 + v1.10 + 2002-01-31 rbe @@ -45,15 +45,19 @@ its Java 3D extension so that a user can have a complete runtime and development environment for OpenGL applications on Linux. + + Note that some of this material may be out of date. The author + has attempted to update this material but has not had time to + test all the procedures. Nevertheless, this document should + still provide a decent overview of what is involved. + If you spot errors please contact the author. + + -
+ - - -Introduction - - + New Versions of this Document @@ -63,13 +67,14 @@ http://www.linuxdoc.org/HOWTO/mini/Nvidia-OpenGL-Configuration/ - - + + + Copyright and Licenses
- Copyright (c) 2001 Robert B. Easter. + Copyright (c) 2001, 2002 Robert B. Easter. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; @@ -77,10 +82,9 @@ no Back-Cover Texts. A copy of the license is included in the section entitled "GNU Free Documentation License".
+
-
- - + Disclaimer @@ -99,19 +103,67 @@ Naming of particular products or brands should not be seen as endorsements. - + -
+ + Contributors + I thank the following contributors for their input into this document: - + + + Jan De Luyck (jandeluyck at gmx.net) -- + Provided information about tweaking os-registry.c + to change AGP settings and how to monitor the nv settings + with cat /proc/nv/card0. Thanks ! + + + + + + + + Introduction + + The installation of the NVIDIA drivers under Linux can be quite easy + in itself. However, there is a little more to it sometimes than + just unpacking the driver files. + + + + Since certain versions of the NVIDIA drivers require upgrading your + XFree86 to work, I've included some material on installing XFree86. + If upgrading XFree86 is necessary for you, you can read this document + but also carefully read the information at + XFree86.org. + + + + The NVIDIA driver is only concerned with installing the OpenGL libGL + library. But since there is more to a complete OpenGL installation than + just libGL, I cover the installation of defacto standard OpenGL add-on + libraries like GL Utility (libGLU) and GL Utility Toolkit (libglut). + + + + Going a little beyond the basics, I cover the installation of some + other libraries you might want to consider: + TrollTech's Qt C++ Library + and the Java language + Java 3D API. + + + + + Download the software packages - + Linux Kernel >= 2.2.12 Required First of all, the OpenGL drivers for the Nvidia cards currently require - a system with Linux kernel 2.2.12 or later. Release versions of - kernel 2.4.x are supported. If you don't have it, then + a system with Linux kernel 2.2.12 or later. Recent releases of + kernel 2.4.x are supported and are recommended since most new development + happens in the 2.4 kernels. If you don't have it, then you will have to upgrade your system's Linux kernel; see The Linux Kernel HOWTO for details. @@ -121,33 +173,43 @@ The Linux kernel can be downloaded at: http://www.kernel.org/ - + - + XFree86 4.0 or later - XFree86 4.0 or later, preferably 4.0.2 as of this writing, is also required. - Its installation will be covered later. + The current version of XFree86 is 4.2.0 as of this writing. + It can be downloaded as source or binaries. It is generally recommended + to download the binaries these days. See + http://www.XFree86.org for + the lastest official information on installation of XFree86. + Later in this document, I describe only the very basic procedure + for compiling and installing from the source. XFree86 source code comes in three files: - X402src-1.tgz - X402src-2.tgz - X402src-3.tgz - doctools-1.2.tgz + X420src-1.tgz + X420src-2.tgz + X420src-3.tgz + doctools-1.3.tgz + utils.tgz - Doctools is something it uses to prepare the X documentation. - Binary distributions of XFree86 are available for many platforms - and can be used instead of compiling the sources. This howto - talks about compiling the source. + Doctools is the DocBook SGML package used by XFree86 to prepare the X documentation. + Utils contains the source for the "extract" program, which is a modified GNU tar with + gzip support. Extract is only important if you are installing a binary distribution + of XFree86 on top of your existing XFree86 to upgrade it. Extract unlinks old existing + files that are being extracted/updated instead of skipping them. Extract comes with the + binary distributions so utils.tgz is only important for making your own binary + distribution. + You can download XFree86 from its ftp site: ftp://ftp.xfree86.org/ @@ -157,40 +219,50 @@ the OpenGL X interface functions. Each window system has to provide the platform-specific interfaces between OpenGL and the window system for mapping a GL rendering - context to a window system widget. + context to a window system widget. Recent versions of XFree86, like + version 4.2.0, now also include libGLU and the OpenGL manual pages. - + - + OpenGL man pages - XFree86 comes with only the GLX man pages. If you want a full set of - OpenGL man pages, you have to get them yourself. + XFree86 prior to version 4.2.0 comes with only the GLX and (maybe) GLU man pages. + If you wanted a full set of OpenGL man pages, you had to get them yourself. mangl.tar.Z manglu.tar.Z - manglx.tar.Z (don't need this one) + manglx.tar.Z (you don't need this one) + If you are using XFree86 4.2.0 or later, you should already have the manglx OpenGL interface + extension man pages, mangl OpenGL library man pages, and the manglu GL Utility library pages too. + If you are using XFree86 prior to 4.2.0, you'll have to see what you have included + with your XFree86 version and get some of the packages above. As time goes on, XFree86 + has been including more of these manual pages and other standard OpenGL add-on libraries. + + + + These packages can be found at: ftp://ftp.sgi.com/sgi/opengl/doc/ - These man pages are in a format ready to be unpacked into the - XFree86 source distributions, see below. + These man page packages are in a format ready to be unpacked into the + XFree86 source distributions (if needed/missing), see below. - + - + Mesa 3D - MesaLib-3.4.tar.gz - MesaDemos-3.4.tar.gz + MesaLib-4.0.1.tar.gz + MesaDemos-4.0.1.tar.gz @@ -199,15 +271,26 @@ - Mesa is the library that provides the foundation for the 3D support included in XFree86, which comes only - with the libGL OpenGL core library component. Mesa is a software renderer. To enable hardware - accelerated performance, many 3D hardware manufacturers provide a drop-in replacement - for Mesa's standard software-only libGL rendering library. For this document, we - are only interested in NVIDIA's libGL drop-in replacement library. + Mesa is the library that provides the foundation for the 3D support included in XFree86. Originally, Mesa + included a software-only libGL that only claims to be "similar to that of OpenGL." Mesa now + also supports hardware acceleration for a growing number of cards (see their site for details). + The Mesa package also includes an implementation of the libGLU Utility library and the libglut + GL Utility Toolkit library. Some versions of XFree86 only included the libGL from Mesa and + some header files. With recent releases of XFree86, like 4.2.0, more has been added + from Mesa, like libGLU and the manual pages. libglut may still be missing from your XFree86 + distribution, so you may still like to get it from the Mesa distribution or from the GLUT + distribution directly. + + + As shipped, XFree86 will support software OpenGL rendering (painfully slow) using the Mesa libGL. + It may also support hardware accelerated OpenGL for some cards that have a fully open source + driver. But for NVIDIA, the subject of this document, there is no fully open sourced + hardware accelerated OpenGL driver included in XFree86. The NVIDIA GLX/OpenGL driver we download + from NVIDIA.com is a binary, closed source driver + that is a drop-in hardware accelerated replacement for the Mesa libGL.so file. - MesaLib provides a software OpenGL implementation consisting of libGL. It also provides libGLU (GL Utility). libGLU is a library built on top of libGL to provide some higher-level functions for applications. OpenGL itself, libGL, is considered a low-level library. GLU is a standard part of most OpenGL installations and many programs make use of it. @@ -215,19 +298,17 @@ MesaDemos provides many OpenGL demo programs and, more importantly, the - GL Utility Toolkit + GL Utility Toolkit (libglut) library. GLUT provides a window system independent interface between OpenGL - and any supported window system. For instance, on the X Window System, it - hides the details of using glX functions to setup a window. Programmers - can write code once and can compile it to work on MS Windows or X, etc - provided that a GLUT library is available on the target platform. Like libGLU, libglut - is a standard part of most OpenGL installations and is required by many programs even though - it is not packaged with XFree86. + and any supported window system. For instance, on the X Window System, it + hides the details of using glX functions to setup a window. Programmers + can write code once and can compile it to work on MS Windows or X, etc + provided that a GLUT library is available on the target platform. Like libGLU, libglut + is a standard part of most OpenGL installations and is required by many programs. - While GLUT is bundled with MesaDemos, it is also available as a separate package from - its original project website: + While GLUT is bundled with MesaDemos, it is also available as separate packages: @@ -236,7 +317,7 @@ - http://reality.sgi.com/mjk/glut3/ + from http://www.opengl.org/developers/documentation/glut/index.html @@ -244,11 +325,11 @@ project website. Don't install both! It's recommended at this time to go with the GLUT packaged with MesaDemos, but instructions on how to install the other GLUT are still provided in the next section as an option. Note that MesaDemos does not include the glut manpages, so - you may want to download the project GLUT package just to install its manpages. + you may want to download the project GLUT package just to install its man pages. - + - + Qt @@ -273,7 +354,7 @@ for OpenGL that provides for creating OpenGL rendering contexts in Qt windows. This provides some alternative to both GLUT and using the glX functions directly, plus the - added benefit of full access to the excellent qt widgets and + added benefit of full access to the excellent Qt widgets and cross-platform portability. @@ -281,55 +362,54 @@ This is useful if you want to compile or develop programs based on Qt (e.g., KDE2 and its apps). - + - + NVIDIA drivers (Mesa libGL replacement) - NVIDIA_kernel-0.9-769.tar.gz - NVIDIA_GLX-0.9-769.tar.gz + NVIDIA_kernel-1.0-2314.tar.gz + NVIDIA_GLX-1.0-2313.tar.gz Note that XFree86 4.0.1 and later is required with driver 0.9-6 and later. If you have XFree86 4.0.0, then you'll have to download the older 0.9-4 version. + You should try to use the lastest XFree86 and NVIDIA drivers. - http://www.nvidia.com/ + Download the drivers at: http://www.nvidia.com/ - See the updated faq at Nvidia.com while you are downloading. - It may have some important information not in this HOWTO. + See the updated FAQ at Nvidia.com while you are downloading. + It has important installation information not in this HOWTO. - The NVIDIA drivers provide a kernel driver: /lib/modules/2.2.16/video/NVdriver + The NVIDIA drivers provide a kernel driver: /lib/modules/kernel.version.number/video/NVdriver and libGL.so and libGLcore.so files that go into /usr/lib/ to replace and Mesa ones that might be in there. libGL.so is OpenGL. These files are Nvidia's own hardware accelerated OpenGL implementation. - + - + Java 2 SDK, Java 3D extension, and Java PlugIn for Netscape (optional) - The following files are available at http://www.blackdown.org/: + The following file is available at http://www.blackdown.org/: - j2sdk-1.2.2-FCS-linux-i386-glibc-2.1.3.tar.bz2 - java3d1_2-FCS-linux-i386-sdk.tar.bz2 - JavaPlugIn-1.2.2-FCS-linux-i386-glibc-2.1.3.run + java3d-1.2.1_01-fcs-linux-i386-sdk.tar.bz2 - Note that to install these Java files, your system needs to have glibc 2.1.3 or better. + Note that to install these Java files, your system needs to have glibc 2.1.3 or later. To check your version of glibc: @@ -343,10 +423,9 @@ - Java2 1.3.0 FCS can also be used and it includes the JavaPlugin. If you use it, you - don't have to get JavaPlugin-1.2.2-FCS. Installation of this Plugin is different - and you'll have to see its documentation. Installation of Java2 1.3.0 itself, and Java3D, is - the same as with Java2 1.2.2. + To use any Java on your system, you must also install the Java Software Development Kit (JSDK) 1.3.1 or + later from java.sun.com. The Blackdown version of the JSDK + will also work. @@ -355,17 +434,26 @@ media extension contains many 3D demo programs/applets and takes advantage of the OpenGL hardware acceleration on the system. The Java 3D API uses the OpenGL API internally. The demos run as normal Java applications and also as applets - inside Netscape (4.7x) via the Java PlugIn, or inside + inside Netscape via the Java PlugIn, or inside KDE's - Konqueror 2.1 or later! + Konqueror by directly using the Java runtime (JRE). - - + + - + Install Software - + + README and INSTALL files + + During the installation of all these packages, always read the README and INSTALL + files etc. that come with them for the lastest, most authoritative information. + Take some time to browse the website for each package for additional documentation. + + + + Install XFree86 @@ -374,6 +462,12 @@ (see, man su). + + The following explains the installation of XFree86 from source in only the + most basic terms. Make sure to read all the XFree86 documentation to + learn about special options. + + If you have a version of XFree86 installed already, you may want to move it or delete it. However, installing over an existing X is generally OK and @@ -386,7 +480,7 @@ cd /etc mv X11 X11-old - -- you may have an X directory in /var also + # you may have an X directory in /var also cd /var mv X11R6 X11R6-old @@ -404,13 +498,24 @@ cd /usr/src mkdir release cd release - tar -xvzf X402src-1.tgz - tar -xvzf X402src-2.tgz - tar -xvzf X402src-3.tgz - tar -xvzf doctools-1.2.tar.gz + tar -xvzf X420src-1.tgz + tar -xvzf X420src-2.tgz + tar -xvzf X420src-3.tgz + tar -xvzf doctools-1.3.tar.gz - -- unpack the man pages (actually, glx pages are already present) - cd /usr/src + + + + + If you are using an old version of XFree86 for some reason, you may + want to use the man page packages. XFree 4.2.0 and later has all these + man pages already. Skip using the man page packages if you don't + need them. Check in /usr/src/release/xc/doc/man to see what all + is included with your XFree86. + + + # unpack the man pages if they are missing. + cd /usr/src tar -xvzf mangl.tar.Z tar -xvzf manglu.tar.Z @@ -422,8 +527,8 @@ cd /usr/src/release/xc/doc/man/GL - Edit the file: Imakefile - SUBDIRS = glx gl glu + # Edit the file: Imakefile + # SUBDIRS = glx gl glu @@ -440,49 +545,49 @@ cd /usr/src/release cd doctools - -- Having this variable set confuses the sgml docs build. - -- With it unset, the build uses the proper defaults. + # Having this variable set confuses the sgml docs build. + # With it unset, the build uses the proper defaults. unset $SGML_CATALOG_FILES make make install - -- Note: doctools installs the perl program sgmlfmt to - -- /usr/local/bin. It looks for the perl executable - -- at /usr/local/bin/perl. If perl is installed - -- on your system at /usr/bin/perl, then it will not - -- find perl and the sgml docs build will fail! - -- Make a symlink if needed (or edit the script): + # Note: doctools installs the perl program sgmlfmt to + # /usr/local/bin. It looks for the perl executable + # at /usr/local/bin/perl. If perl is installed + # on your system at /usr/bin/perl, then it will not + # find perl and the sgml docs build will fail! + # Make a symlink if needed (or edit the script): cd /usr/local/bin ln -s /usr/bin/perl perl cd /usr/src/release cd xc/config/cf vi host.def - -- add the following three lines to host.def: - -- #define HasSgmlFmt YES - -- #define BuildAllDocs YES - -- #define HasZlib YES - -- See the README file in doctools and xc/config/cf. - -- HasZlib YES instructs XFree86 not to build and install - -- it's own old zlib. If you do not have zlib installed - -- (check /usr/lib/libz*), then omit the HasZlib line or - -- go download it and install it first: - -- http://www.info-zip.org/pub/infozip/zlib/ - -- A common zlib conflict occurs when a system already - -- has zlib installed and XFree86 installs it's also. - -- In this case, deleting /usr/X11R6/lib/libz.a fixes - -- the problem. + # add the following three lines to host.def: + # #define HasSgmlFmt YES + # #define BuildAllDocs YES + # #define HasZlib YES + # See the README file in doctools and xc/config/cf. + # HasZlib YES instructs XFree86 not to build and install + # it's own old zlib. If you do not have zlib installed + # (check /usr/lib/libz*), then omit the HasZlib line or + # go download it and install it first: + # http://www.info-zip.org/pub/infozip/zlib/ + # A common zlib conflict occurs when a system already + # has zlib installed and XFree86 installs it's also. + # In this case, deleting /usr/X11R6/lib/libz.a fixes + # the problem. cd /usr/src/release/xc make World - -- before installing, make sure you have moved - -- or deleted prior installation of X - -- unless you are sure you want to just overwrite + # before installing, make sure you have moved + # or deleted prior installation of X + # unless you are sure you want to just overwrite make install make install.man - -- make symlinks + # make symlinks cd /usr/include ln -s ../X11R6/include/DPS DPS ln -s ../X11R6/include/GL GL @@ -510,9 +615,9 @@ cd /usr/src/release/xc/doc/hardcopy cp -r GL /usr/X11R6/lib/X11/doc/html - The index.html file in the docs points to + The index.html file in the docs might point to manindex5x.html, but the filename may - actually be manindex5.html. Just make a symlink to fix it: + actually be manindex5.html. Just make a symlink to fix it if needed: cd /usr/X11R6/lib/X11/doc/html @@ -526,25 +631,32 @@ and glut man pages are in section 3. If you have KDE2, khelpcenter allows man-page browsing. - + - + Install Mesa Note: This gives you the libGLU* and libglut* - files that are missing in XFree86. - XFree86 only comes with the OpenGL core library, + files that may be missing in XFree86. + XFree86 used to only come with the OpenGL core library, libGL (based on Mesa). This also installs Mesa's libGL, but we will delete that since it is to be replaced by the Nvidia libGL. + + You should look in /usr/X11R6/lib to see if you already have + libglut.* and libGLU.*. If you do, you can skip installing Mesa. Recent releases + of XFree86 have been including more of Mesa as standard. + + It's best to uninstall any old Mesa version you may have installed before installing a new Mesa. Uninstalling software can be a dangerous operation, - so know what you are doing! + so know what you are doing! If you have software depending on your old Mesa, + you might need to keep it and just install the new Mesa along with it. @@ -555,9 +667,9 @@ For rpm-based systems (like RedHat and Mandrake), try: - -- see what will be removed first + # see what will be removed first rpm -e --test Mesa | less - -- if ok, proceed + # if ok, proceed rpm -e Mesa For Debian, you can try: @@ -578,19 +690,19 @@ - -- IF you are going to use the project GLUT distribution of GLUT, then - -- unpack the Glut-3.7 packages ... - -- Mesa's compile looks for it + # IF you are going to use the project GLUT distribution of GLUT, then + # unpack the Glut-3.7 packages ... + # Mesa's compile looks for it cd /usr/src tar -xvzf glut-3.7.tar.gz tar -xvzf glut_data-3.7.tar.gz - -- IF you are using this GLUT, use the --with-glut=/usr/src/glut-3.7 - -- parameter with Mesa's ./configure below in addition to the --prefix + # IF you are using this GLUT, use the --with-glut=/usr/src/glut-3.7 + # parameter with Mesa's ./configure below in addition to the --prefix cd /usr/src - tar -xvzf MesaLib-3.4.tar.gz - tar -xvzf MesaDemos-3.4.tar.gz - cd Mesa-3.4 + tar -xvzf MesaLib-4.0.1.tar.gz + tar -xvzf MesaDemos-4.0.1.tar.gz + cd Mesa-4.0.1 ./configure --prefix=/usr make make install @@ -599,6 +711,7 @@ + Important: At this point, Mesa installed its own version of the glx.h include files over the ones that XFree86 installed. This will cause some @@ -610,29 +723,69 @@ - + - + Install Nvidia OpenGL drivers + + + Install NVIDIA kernel driver package + First, unpack the kernel driver source. - -- delete the libGL.* files that come with XFree86 / Mesa 3.4 ... - -- the nvidia libGL.* should replace them - cd /usr/X11R6/lib - rm libGL.* - cd modules/extensions - rm libGL* - rm libglx* - cd /usr/lib - rm libGL.* - cd /usr/src - tar -xvzf NVIDIA_kernel-0.9-769.tar.gz - tar -xvzf NVIDIA_GLX-0.9-769.tar.gz - cd NVIDIA_kernel-0.9-769 + tar -xvzf NVIDIA_kernel-1.0-2314.tar.gz + tar -xvzf NVIDIA_GLX-1.0-2313.tar.gz + cd NVIDIA_kernel-1.0-2314 + Now, before building and installing this kernel driver, it has some + AGP options that can affect performance. You shouldn't really attempt to use these + options during your first attempt at getting your card working and not unless + you are using a very recent 2.4 kernel and the lastest nvidia drivers. + + + + The Linux kernel source can be compiled with an AGP character + device that the Nvidia driver can use to get better performance. If your + kernel does not have the AGP driver for your motherboard chipset compiled in, + then the Nvidia kernel driver uses its own built-in AGP support if your + video card is an AGP card. If you want to experiment with the Linux + kernel AGP support, you should be able to rebuild and install your kernel + with the appropriate support: + + cd /usr/src/linux + make menuconfig + # Go to Character devices and put a * by /dev/agpgart support + # and also put a * by your motherboard chipset type. + # Go to the Processor type and features and put a * by + # MTTR support. + # Save the config. + make + make modules + make install + make modules_install + reboot + + + + + Futher tweaking can be done to the file os-registry.c + in the NVIDIA kernel source. Looking though this file, you will see many + flag variables (they can be set to 0 or 1) to control options that affect + performance and stability! You should try your configuration with this + file unmodified first to see that your system works. If it does, you + can try these options. Among the options you can try here are: + + + + Enabling AGP 4x on VIA chipsets (by default constrained to only 2x) + Enabling Side Band Addressing (your card needs to support this) + Enabling Fast Writes (IIRC, this must be enabled in your motherboard BIOS too) + + + If you experience problems starting X, see the files @@ -647,35 +800,80 @@ M64_USERS_README. - - make - cd .. - cd NVIDIA_GLX-0.9-769 - make - ldconfig - -- Make a basic XF86Config file using the "nv" driver: + + After you have tweaked (or not tweaked) your Linux kernel and os-registry.c + file, you can build and install the kernel module. + + # The make command will build and install the driver: + make + + After the driver is loaded, you can see the driver configuration with + cat /proc/nv/card0 + + + + + Install NVIDIA GLX package + + + Installing the Nvidia OpenGL library package is nothing too special. + First you need to clean up some old files. + + + # delete the libGL.* files that come with XFree86 / Mesa ... + # the nvidia libGL.* should replace them + # The more recent Nvidia Makefile installer does this for you. + + cd /usr/X11R6/lib + rm libGL.* + cd modules/extensions + rm libGL* + rm libglx* + cd /usr/lib + rm libGL.* + + + + + With the conflicting old files gone, you can begin the installation. + + + cd .. + cd NVIDIA_GLX-1.0-2313 + make + ldconfig + + # make might not install the C header files that come with + # the libraries in the NVIDIA_GLX package so, do this: + cd usr/include/GL + cp *.h /usr/include/GL + # usr/include/GL is a subdirectory in the NVIDIA_GLX package. + # /usr/include/GL should be a symlink to /usr/X11R6/include/GL + # so you could copy to there instead if you want. + + # Make a basic XF86Config file using the "nv" driver: cd /etc/X11 xf86config - -- Follow the prompts and fill in the information xf86config asks for. - -- Select the Nvidia GeForce or appropriate name. - -- You can test X with this XF86Config file, or continue for OpenGL: + # Follow the prompts and fill in the information xf86config asks for. + # Select the Nvidia GeForce or appropriate name. + # You can test X with this XF86Config file, or continue for OpenGL: - -- You must edit XF86Config and set the following: + # You must edit XF86Config and set the following: vi XF86Config - Load "glx" - Replace 'driver "nv"' with 'driver "nvidia"' - Put "1600x1200" first (or your preferred screen resolution) - Copy ttf fonts from Windows into a font directory and add a font path. - Use ttmkfdir (check freshmeat.net) to a fonts.dir file. - A good place to keep your own fonts is /usr/local/share/fonts ... + # Load "glx" + # Replace 'driver "nv"' with 'driver "nvidia"' + # Put "1600x1200" first (or your preferred screen resolution) + # Copy ttf fonts from Windows into a font directory and add a font path. + # Use ttmkfdir (check freshmeat.net) to a fonts.dir file. + # A good place to keep your own fonts is /usr/local/share/fonts ... - -- Nvidia drivers do NOT use the dri module - don't load it. + # Nvidia drivers do NOT use the dri module - don't load it. - -- You may like to edit /etc/X11/xinit/xinitrc to have run "startkde" - -- or "gnome-session" instead of twm. + # You may like to edit /etc/X11/xinit/xinitrc to have run "startkde" + # or "gnome-session" instead of twm. - -- Note: /usr/include/GL should be a symlink to /usr/X11R6/include/GL + # Note: /usr/include/GL should be a symlink to /usr/X11R6/include/GL @@ -683,34 +881,46 @@ Specifying "nvidia" for the driver in the XF86Config makes that take effect each time you startx. But the NVdriver kernel driver will have to be - loaded each time your system boots using: + loaded before you startx. It can be loaded with: - + # to load it insmod NVdriver + # If you need to unload it: + rmmod NVdriver - You can place this command in one of the system startup files, like - /etc/rc.d/rc.modules. But this may not be necessary if the following - line is present in /etc/modules.conf - (or conf.modules): + You should not have to use insmod manually. The NVdriver installation + should have inserted a line into /etc/modules.conf + (or conf.modules) that looks something like: alias char-major-195 NVdriver - If this line is present, NVdriver is loaded automatically - when X is started (autoclean). + If this line is present, NVdriver is loaded automatically + when X is started. You can check if its loaded using the command, lsmod. - + + In my experience, your video system will become unstable if you compile, + load, and unload the NVdriver module. You should reboot your system + after rebuilding this module to help make sure your system doesn't + lock inside X. Its possible that your screen will go black and the keyboard + will become unresponsive after switching NVdriver. It is advisable to + always have another computer with telnet or ssh that you can use to + get into your Linux box to shut it down properly if this happens. + + - + + + Install Qt - -- for Qt, there is no "make install", just place the source - -- where you want it to live: + # for Qt, there is no "make install", just place the source + # where you want it to live: cd /usr/local tar -xvzf qt-x11-2.2.4.tar.gz ln -s qt-2.2.4 qt @@ -740,52 +950,52 @@ - -- note: configure has some options you can try, to see them - -- see ./configure --help + # note: configure has some options you can try, to see them + # see ./configure --help ./configure - -- NOTE: when you run make as suggested on the next line, you may - -- encounter a make error that halts the build IF you run make - -- from outside X. The program $QTDIR/bin/uic (the User Interface Compiler) - -- may Segmentation Fault when run from a Linux console. You can run - -- "startx" and use the twm (tiny window manager) and xterm (or whatever you - -- might have setup for X) to run the rest of the Qt build. If for some - -- reason twm is not even available, then you can run "XFree86 &", use - -- "CTRL-ALT-F1" to get to a console, start an xterm as - -- "xterm -display localhost:0.0 &", then switch back to X with "ALT-F7". + # NOTE: when you run make as suggested on the next line, you may + # encounter a make error that halts the build IF you run make + # from outside X. The program $QTDIR/bin/uic (the User Interface Compiler) + # may Segmentation Fault when run from a Linux console. You can run + # "startx" and use the twm (tiny window manager) and xterm (or whatever you + # might have setup for X) to run the rest of the Qt build. If for some + # reason twm is not even available, then you can run "XFree86 &", use + # "CTRL-ALT-F1" to get to a console, start an xterm as + # "xterm -display localhost:0.0 &", then switch back to X with "ALT-F7". make - -- Only for old versions of Qt before 2.1.0 or so ... - -- compile the opengl extension - -- Note that in qt 2.2.0 on, the OpenGL support has been moved out of extensions - -- and is now a standard part of the library that is installed if configure - -- finds OpenGL installed on your system. If you were to not want OpenGL - -- support in Qt, you'd have to pass the -no-opengl option to configure. + # Only for old versions of Qt before 2.1.0 or so ... + # compile the opengl extension + # Note that in qt 2.2.0 on, the OpenGL support has been moved out of extensions + # and is now a standard part of the library that is installed if configure + # finds OpenGL installed on your system. If you were to not want OpenGL + # support in Qt, you'd have to pass the -no-opengl option to configure. cd extensions/opengl/src - -- Check the Makefile and ensure there are not Mesa references. + # Check the Makefile and ensure there are not Mesa references. make ldconfig cd ../examples - -- Try compiling and running the examples. + # Try compiling and running the examples. - + - + Install GLUT 3.7 Distribution (optional) - If you installed the MesaDemos package along with the Mesa 3.4, then you + If you installed the MesaDemos/MesaLib package, then you have already installed GLUT 3.7 since it is included with MesaDemos. However, you may be interested in installing the GLUT manpages and you can skip right to the "Install GLUT manual pages", below ... - Installing GLUT is a bit tricky. I'm not too familiar with imake, the + Installing GLUT is a bit tricky. I'm not too familiar with imake, the program that it uses to manage the Makefiles, and didn't quite see how to get GLUT to install to where I wanted it (/usr/lib, but MesaDemos will do this @@ -831,7 +1041,7 @@ cp -d libglut.* /usr/lib cd .. cd gle - -- make a shared lib for libgle + # make a shared lib for libgle make gcc -shared -o libgle.so.3.7 *.o ln -s libgle.so.3.7 libgle.so @@ -839,14 +1049,14 @@ cp -d libgle.* /usr/lib cd .. cd mui - -- make a shared lib for libmui + # make a shared lib for libmui make gcc -shared -o libmui.so.3.7 *.o ln -s libmui.so.3.7 libmui.so ln -s libmui.so.3.7 libmui.so.3 cp -d libmui.* /usr/lib - -- Install the GLUT manual pages (not included with MesaDemos) + # Install the GLUT manual pages (not included with MesaDemos) cd /usr/src/glut-3.7 make SUBDIRS=man Makefile cd man/glut @@ -854,83 +1064,98 @@ ldconfig cd ../../progs/demos/ideas - -- edit the Makefile, change OPENGL = -lGL and GLU = -lGLU + # edit the Makefile, change OPENGL = -lGL and GLU = -lGLU make ./ideas - -- test compiling some demos - -- take a look at which libraries have to be linked (-lX11 ...) in - -- the Makefiles. Qt's tmake program available at www.troll.no - -- is a quick way to make a Makefile but you have to edit it - -- and add the -l needed. + # test compiling some demos + # take a look at which libraries have to be linked (-lX11 ...) in + # the Makefiles. Qt's tmake program available at www.troll.no + # is a quick way to make a Makefile but you have to edit it + # and add the -l needed. - + - + Install Java 3D (optional) - If you already have a Java JDK/SDK or JRE, that is, a Java/Software Development Kit - or Java Runtime Environment, installed, then you may have to take care to uninstall them - or leave them alone! + If you already have a Java Software Development Kit (JSDK) or Java Runtime Environment + (JRE) installed, then you can skip parts of this section. If you are using a JRE only, + you'll have to get the JRE version of the Java 3D package and adapt these instructions. - It is recommended that you have the lastest version of Netscape 4.7x, which at this time of - writing, is 4.76, if you plan to install the Java PlugIn for netscape. + It is recommended that you have the lastest version of Netscape, which at this time of + writing is 6.2.1, if you plan to install the Java PlugIn for netscape. It works, but you may (or may not) experience Segmentation Faults when leaving a page - that contained a Java 3D applet - KDE - Konqueror 2.1 works well. + that contained a Java 3D applet. KDE Konqueror + can also be used to view Java 3D applets. - Assuming you are logged in as root and have downloaded the Java packages from - blackdown.org into the root home directory, - /root, do: - - - - Install the Java 2 SDK (1.2.2) and Java 3D (1.2) extension: + If you have not installed the Java SDK yet, you should have downloaded it already at least. + Installing the JSDK is simple. You should follow the instructions that comes with it + or follow my example below, based on using the Sun download. + # The Sun download is a type of binary shell archive (man shar). + # Make it executable and run it to unpack its contents + chmod 744 j2sdk-1_3_1_02-linux-i386.bin + ./j2sdk-1_3_1_02-linux-i386.bin + mv jdk1.3.1_02 /usr/local + cd /usr/local + ln -s jdk1.3.1_02 jdk + + - cd /usr/local - tar -xvyf ~/j2sdk-1.2.2-FCS-linux-i386-glibc-2.1.3.tar.bz2 - ln -s jdk1.2.2 jdk - cd jdk - tar -xvyf ~/java3d1_2-FCS-linux-i386-sdk.tar.bz2 - cd jre/lib/ext - cp j3d* .. - cp vecmath.jar .. - cd /usr/local - chown -R root:root jdk1.2.2 + + Next is to unpack Java 3D and finish setting up the environment + for the Java SDK. + + cd jdk + tar -xvyf ~/java3d-1.2.1_01-fcs-linux-i386-sdk.tar.bz2 + cd jre/lib/ext + cp j3d* .. + cp vecmath.jar .. + cd /usr/local + chown -R root:root jdk1.3.1_02 - Edit /etc/profile, add: + Edit /etc/profile or, as on many systems, + you can add a new file like java.sh to + the directory /etc/profile.d/. + To either file, add: - - JAVA_HOME=/usr/local/jdk - PATH=$PATH:$JAVA_HOME/bin - export JAVA_HOME PATH + JAVA_HOME=/usr/local/jdk + PATH=$PATH:$JAVA_HOME/bin + MANPATH=$MANPATH:$JAVA_HOME/man + export JAVA_HOME PATH MANPATH - This completes the installation of the Java 2 SDK, which includes the JRE, and the - Java 3D 1.2 extension. + If you used a separate file java.sh, remember to make it + executable. Start a new login terminal for these changes to take affect. + + + + This completes the installation of the Java 2 SDK, which includes the JRE and the + Java 3D extension. - Install the Java PlugIn for netscape: + You can install the Java PlugIn for netscape: - -- source profile to set JAVA_HOME and PATH - source /etc/profile - cd - chmod u+x JavaPlugIn-1.2.2-FCS-linux-i386-glibc-2.1.3.run - ./JavaPlugIn-1.2.2-FCS-linux-i386-glibc-2.1.3.run - -- each user has to run this file to install the plugin - -- it is per user, not global - netscape & + # go to where netscape is installed + cd $MOZILLA_HOME + cd plugins + ln -s /usr/local/jdk/jre/plugin/i386/ns600/libjavaplugin_oji.so libjavaplugin_oji.so + # This installs it globally for all users + # Each user can run ControlPanel to customize the Java Plugin preferences. + ControlPanel + # Then try it out: + netscape & When netscape loads, go to EditPreferences @@ -938,32 +1163,15 @@ exit Netscape. - - The next step is to configure the Java PlugIn. It comes with a configuration applet. - - - netscape ~/.netscape/java/ControlPanel.html & - -- the Control Panel for JavaPlugIn should load - - Again, netscape will load. Click the "Advanced" tab, select "Other ..." and type for Path: - - - /usr/local/jdk1.2.2/jre - - Then click "Apply" and exit Netscape. By changing this, it tells the Plugin to use the system - Java Runtime Environment instead of the JRE it installed under ~/.netscape. - The system JRE is where the Java 3D API extension is installed. - - Test Java 3D demos: cd $JAVA_HOME/demo/java3d/GearTest java GearBox & - -- runs as normal java application + # runs as normal java application netscape GearBox_plugin.html & - -- runs in netscape as an applet + # runs in netscape as an applet @@ -979,10 +1187,10 @@ See http://java.sun.com/ for further information about Java and the Java 3D extension. - + - + Final Comments @@ -992,7 +1200,7 @@ You can try building the demos in - /usr/src/Mesa-3.4/{demos,xdemos} by using the + /usr/src/Mesa-4.0.1/{demos,xdemos} by using the Makefile.X11 as Makefile and running "make targets" or "make teapot" etc. They should build and link with the hardware accelerated libGL and run very fast! @@ -1010,17 +1218,12 @@ HAVE FUN! - + GNU Free Documentation License - - - - - - + + GNU FDL Version, and Copyright Notice Version 1.1, March 2000
@@ -1029,8 +1232,9 @@ Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.
+
- + PREAMBLE The purpose of this License is to make a manual, textbook, @@ -1057,7 +1261,7 @@ of this license document, but changing it is not allowed. whose purpose is instruction or reference. - + APPLICABILITY AND DEFINITIONS This License applies to any manual or other work that @@ -1125,7 +1329,7 @@ of this license document, but changing it is not allowed. text. - + VERBATIM COPYING You may copy and distribute the Document in any medium, @@ -1143,7 +1347,7 @@ of this license document, but changing it is not allowed. above, and you may publicly display copies. - + COPYING IN QUANTITY If you publish printed copies of the Document numbering more @@ -1185,7 +1389,7 @@ of this license document, but changing it is not allowed. updated version of the Document. - + MODIFICATIONS You may copy and distribute a Modified Version of the @@ -1316,7 +1520,7 @@ of this license document, but changing it is not allowed. or to assert or imply endorsement of any Modified Version. - + COMBINING DOCUMENTS You may combine the Document with other documents released @@ -1343,7 +1547,7 @@ of this license document, but changing it is not allowed. must delete all sections entitled "Endorsements." - + COLLECTIONS OF DOCUMENTS You may make a collection consisting of the Document and @@ -1360,7 +1564,7 @@ of this license document, but changing it is not allowed. copying of that document. - + AGGREGATION WITH INDEPENDENT WORKS A compilation of the Document or its derivatives with other @@ -1381,7 +1585,7 @@ of this license document, but changing it is not allowed. aggregate. - + TRANSLATION Translation is considered a kind of modification, so you may @@ -1397,7 +1601,7 @@ of this license document, but changing it is not allowed. prevail. - + TERMINATION You may not copy, modify, sublicense, or distribute the @@ -1410,7 +1614,7 @@ of this license document, but changing it is not allowed. compliance. - + FUTURE REVISIONS OF THIS LICENSE The Free Software Foundation may publish new, revised @@ -1431,7 +1635,7 @@ of this license document, but changing it is not allowed. Free Software Foundation. - + How to use this License for your documents To use this License in a document you have written, include @@ -1463,7 +1667,7 @@ of this license document, but changing it is not allowed.
-
+ +See +. Or if you feel that you can take risk of losing data, then skip this section and go to next section. - -If you have a tape-drive or a network storage device and you can use fine backup -and restore tools like Arkeia or Bru, go to -and search for 'Backup' with CTRL+f keys. - -If you have a read-write CDROM on your linux system then you can create the -backups of all filesystems in your linux box. -For CDROM writing refer to - -and see the cdrecord.sh script in . -To dump all the filesystems to CDROM blanks, do: - -bash$ su - root -bash# mkdir /backups -bash# cd /backups -bash# df -This will list something like: -Filesystem 1k-blocks Used Available Use% Mounted on -/dev/hda9 2529920 242812 2158592 11% / -/dev/hda1 23302 18859 3240 86% /boot -/dev/hda5 3028080 509216 2365044 18% /home -/dev/hda7 7611636 3734668 3490208 52% /usr -/dev/hda8 3834464 447864 3191816 13% /var -/dev/hda11 1375616 461400 844336 36% /misc -bash# mkdir root-partition -bash# mkdir boot-partition -bash# mkdir home-partition -bash# mkdir usr-partition -bash# mkdir var-partition -bash# mkdir misc-partition -bash# mount /dev/hda9 /backups/root-partition (in my case root is /dev/hda9, change this) -bash# mount /dev/hda1 /backups/boot-partition (in my case boot is /dev/hda1, change this) -bash# mount /dev/hda5 /backups/home-partition (in my case home is /dev/hda5, change this) -bash# mount /dev/hda7 /backups/usr-partition (in my case usr is /dev/hda7, change this) -bash# mount /dev/hda8 /backups/var-partition (in my case var is /dev/hda8, change this) -bash# mount /dev/hda11 /backups/misc-partition (in my case misc is /dev/hda11, change this) -and others paritions which you may have -bash# ./cdrecord.sh (load the drivers - see Appendix A and CD-Writing howto) -bash# cdrecord -scanbus - -bash# cd /backups -bash# du -sk * -If the size is less than 650MB, it will fit on the CDROM blank. -bash# nice --20 mkisofs -R /backups | cdrecord -v fs=40m speed=2 dev=0,0 - - - -If the size is greater than 650MB, you need to dump -separately group of filesystems. Note that you can group multiple paritions, so that -each group is < 650 MB and mkisofs command accepts multiple pathnames. As in the example -below, I grouped root and boot and put them on one CDROM. -Load a new CD blank and do : - -bash# nice --20 mkisofs -R /backups/root-partition /backups/boot-partition | cdrecord -v fs=40m speed=2 dev=0,0 - - -Load a new CD blank and do : -bash# nice --20 mkisofs -R /backups/home-partition | cdrecord -v fs=40m speed=2 dev=0,0 - - -Load a new CD blank and do : -bash# nice --20 mkisofs -R /backups/usr-partition | cdrecord -v fs=40m speed=2 dev=0,0 - - -Load a new CD blank and do : -bash# nice --20 mkisofs -R /backups/var-partition | cdrecord -v fs=40m speed=2 dev=0,0 - - - -Large Partitions: -What will you do if the partition is very large? Let's say the partition size is more than 650 MB? -If you have a DVD drive then you can write upto 5GB. But not all computers come with -DVD read-write drives. If you just have a R-W CD drive, -the maximum that you can store is upto 650MB, hence use the following technique: - - -Let's assume the usr partition is greater than 650 MB. - -bash# du -sk /backups/usr-partition - -If the total size is greater than 650 MB, then run the shell script (path-list.sh) -given in . - -The path-list.sh script will create list files like -CDROM-BACKUP1.txt, -CDROM-BACKUP2.txt, -CDROM-BACKUP3.txt and so on. -And each group will total upto 650MB thus filling up a CDROM blank. - - -Load a new CD blank and do : -bash# nice --20 mkisofs -R -path-list CDROM-BACKUP1.txt | cdrecord -v fs=40m speed=2 dev=0,0 - - -Load a new CD blank and do : -bash# nice --20 mkisofs -R -path-list CDROM-BACKUP2.txt | cdrecord -v fs=40m speed=2 dev=0,0 - - -Load a new CD blank and do : -bash# nice --20 mkisofs -R -path-list CDROM-BACKUP3.txt | cdrecord -v fs=40m speed=2 dev=0,0 - - -and so on for all the grouplist files which you create. - - Appendix A - cdrecord.sh