Introduction:
This HOWTO documents the procedure for enabling 2D X acceleration for NVIDIA GeForce2 MX cards on YellowDog Linux using the "nv" X driver.
1. Get a very recent Linux kernel. The BenH 2.4.19-pre8-ben0 kernel
(or more recent) is highly recommended. You can rsync the BenH
kernel from rsync.penguinppc.org via:
cd directory_where_you_want_the_kernel_source
rsync -avz --delete rsync.penguinppc.org::linux-2.4-benh .
Note the "." by itself at the end of the rsync line is required.
Then build and install the new kernel.
2. Either make sure that the kernel is built *WITHOUT* CONFIG_FB_RIVA
support, or make sure that the "novideo" option is used in your
/etc/yaboot.conf file (which causes video=ofonly to be passed as a
boot argument to the kernel). This causes the console video system
to use the OpenFirmware video (OFFB).
3. Make sure you have a recent XFree86 4.2 suite of RPMs, such as
XFree86-4.2.0-0.6.24a (or more recent).
4. Initially, set the "initdefault" level in /etc/inittab to:
id:3:initdefault:
so that the system does not start a graphical login.
5. Login to the console as root, and run Xconfigurator, which will
generate an /etc/X11/XF86Config-4 file. Select the desired screen
resolution and color depth when you run Xconfigurator. Afterward,
edit the /etc/X11/XF86Config-4 file, and change the "Driver" entry
in the Section "Device" to "nv" (including the quote characters).
This is what activates the X acceleration. The accelerated "nv"
X driver can not currently coexist with the accelerated "riva"
console video driver, and that is why you must use the OpenFirmware
console video (which is not accelerated).
6. Test the accelerated "nv" X driver by running /etc/X11/X. If all
goes well, you should get a grey screen with an X mouse cursor which
you should be able to move around the screen. Switch back to virtual
terminal 1 by entering <Control-Alt-F1> and kill X by typing
<Control-C>.
7. If you've gotten this far, you now need to make sure that the system
doesn't mess with your /etc/X11/XF86Config-4 file. First, disable
Xautoconfig in all run levels by:
chkconfig --level 0123456 Xautoconfig off
8. Similarly, you need to comment out the following lines in the
/etc/rc.d/rc.sysinit file:
#if [ -x /usr/X11R6/bin/Xautoconfig4 ]; then
# OFFB=`cat /proc/fb |grep -i 'offb'`
# if [ ! -z "$OFFB" ]; then
# action "Configuring X11: " /usr/X11R6/bin/Xautoconfig4
# fi
#fi
Otherwise, since you will be using the OpenFirmware video (OFFB)
during booting, Xautoconfig4 would be run by the rc.sysinit script,
which would wipe out the /etc/X11/XF86Config-4 file you just created.
9. *DO NOT* run Xconfigurator a second time without rebooting your
system first. This is because a failed initial attempt may cause
problems with subsequent attempts, which might otherwise work fine.
So if you want to try a different screen resolution or color depth,
reboot the system first to get a clean system and X environment.
There is also a known nasty bug with the accelerated "nv" X driver,
that if you run the X server a second time, X will go into the weeds
and cause the system to hang.
10. If you want to have a graphical login, and since there are apparently
problems with the KDE Display Manager (kdm), it is recommended to run
the Gnome Display Manager (gdm), even if you are using KDE. To
accomplish this, just put the following single line in your
/etc/sysconfig/desktop file:
DESKTOP=GNOME
11. If you did the above, but you want a KDE desktop environment by
default, just do the following:
cd /etc/X11/gdm/Sessions
mv Default Default.orig
cp KDE Default
12. You can now change the "initdefault" level in /etc/inittab to:
id:5:initdefault:
so that the system comes up to runlevel 5, which will provide a
graphical X environment.
13. At this point, you should be able to reboot your system and get a
graphical login.
14. Because of the nasty accelerated "nv" X driver bug mentioned earlier,
*DO NOT* logout of your KDE, Gnome, or other X desktop environment.
Doing so will cause a new X server to be started, which will cause
X to go into the weeds and hang your system. Instead, either simply
lock your screen or reboot the system (with the reboot command of
course, which can be executed by a normal user).
CAVEATS:The accelerated "nv" X driver does not appear to currently support the NVIDIA GeForce4 cards. The status of the GeForce3 cards is unknown, but since YellowDog Linux lists these cards as unsupported, it is likely that they would not work either.
The accelerated "nv" X driver does not currently support 3D acceleration.
This procedure has only been tested on VGA connected monitors.
This procedure has been tested by multiple users on several 867 MHz G4 systems with nVidia Corporation NV11 (GeForce2 MX) cards. As a sample case, it is being used quite successfully on a daily basis for providing basic 2D accelerated X with a screen resolution of 1152x864 and a color depth of 24 (millions of colors), using a SONY CPD-G400 19" monitor.
This HOWTO was written by Bill Fink





