Run X on Gentoo with nVidia GeForce FX 5200

Getting X up and running

Read all of the guides below carefully and follow the instructions:

Follow them to configure the kernel, and then install the xorg and video drivers.

Getting this part right is the hardest, and it often involves recompile the kernel a couple of times until we get it right. Everytime after we re-compile the kernel,we must re-emerge nvidia-drivers.

Configure and compile the kernel

I use genkernel as much as possbile. I found it too time comsuming to do the menu config myself.

# genkernel --menuconfig all

Setup compilation options

In /etc/make.conf, add the following:

VIDEO_CARDS="vesa nvidia nv vmware"
INPUT_DEVICES="keyboard mouse evdev"

Also add "xvmc nvidia X" to the USE flag in /etc/make.conf.

What you really need is the "nvidia" video card, and "evdev" for input device. I include the other ones because I want to.

In /etc/portage/package.use, add the following:

x11-drivers/nvidia-drivers acpi 

Install xorg

# emerge -pv xorg-server xorg-x11

This shall be able to bring in the x11-drivers/nvidia-drivers.

Prepare the system

Module "agpgart"

If you compiled agpgart as a module, you will need to add it to /etc/modules.autoload.d/kernel-2.6.

update modules

# env-update
# source /etc/profile
# lsmod | grep nvidia && rmmod nvidia
# modprobe nvidia
# update-modules

APCID

We also need to make sure we have the APCID running

# /etc/init.d/apcid start
# rc-update add apcid default

GLX

Check that the system is using nvidia's glx module

# eselect opengl list
Available OpenGL implementations:
  [1]   nvidia
  [2]   xorg-x11 *
# eselect opengl set 1
Switching to nvidia OpenGL interface... done

Input devices

Follow my note on upgrading Gentoo Xorg Server from 1.3 to 1.5 to configure the input devices.

Configure the X

# Xorg -configure
# X -config /home/daisyb/xorg.conf.new

Now check whether everything works fine. Correct any error if there might still be any.

Font

Gentoo-wiki has an article on fonts: X.Org/Fonts. The essence is

  1. Add "truetype" to USE flag in /etc/make.conf.
  2. emerge -av freetype corefonts freefonts artwiz-aleczapka-en terminus-font ttf-bitstream-vera unifont dejavu media-fonts/font-misc-misc
  3. Here are some Asian and CJK fonts:
    media-fonts/acroread-asianfonts media-fonts/wqy-bitmapfont media-fonts/wqy-microhei media-fonts/wqy-unibit
  4. If you get "twm: warning: font for charset JISX0208.1983-0 is lacking.", then try emerging the package "intlfonts".

Desktop

Once we have install the video drivers, xorg-server, and xorg-x11, we can proceed to the desktop of our choice:

There are other desktop guides in the Gentoo Documentation Resources.