Unix/Gentoo

Nvidia drivers and xorg.conf.d on Gentoo

ForceCore 2011. 3. 1. 00:19
The Wiki and Document pages for Gentoo are horribly outdated and does not work with the new version of xorg server, which has xorg.conf.d. Before I did the following instructions, startx failed.

1. Install Nvidia drivers. For me, it was

emerge nvidia-drivers
eselect opengl set nvidia

Arch wiki helps ALOT:

running  nvidia-config will generate /etc/X11/xorg.conf for you. It would generate redundant parts such as server layout and keyboard stuff. Remove those and leave only what is really related to Graphic stuff:

# nvidia-xconfig: X configuration file generated by nvidia-xconfig
# nvidia-xconfig:  version 260.19.29  (buildmeister@swio-display-x86-rhel47-04.nvidia.com)  Wed Dec  8 12:27:39 PST 2010

Section "Monitor"
    Identifier     "Monitor0"
    VendorName     "Unknown"
    ModelName      "Unknown"
    HorizSync       28.0 - 33.0
    VertRefresh     43.0 - 72.0
    Option         "DPMS"
EndSection

Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
EndSection

Section "Screen"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection
Save this as /usr/share/X11/xorg.conf.d/10-monitor.conf

3. startx should now work by now, at least it worked for me.