Offerman Consulting
spacer Zone

Getting X Server with nVidia Drivers to Work on Fedora 9

After upgrading from Fedora 8 to release 9, I was stuck with an X server that could not start. It appears that X version 1.5 (RC5) is supposed to go with as few configuration settings as possible. Obviously, auto-detecting doesn't get it right yet. It misconfigured my mouse, and failed to recognize my monitor. Furthermore, none of the installation scripts/programs was able to generate an /etc/X11/xorg.conf file that even allowed the X server to start. So I had to collect as many as possible settings and see which ones worked by trial and error.

Mouse Misconfiguration

First, after rebooting, the X server didn't recognize my Logitec vanilla three-button PS/2 mouse. According to the logs in /var/log/Xorg.0.log, a mouse was detected and configured, but it wasn't the right one.

Running the system-config-display script didn't generate a mouse description at all, and the nVidia driver installation (NVIDIA-Linux-x86_64-173.14.12-pkg2.run) left me with a configuration like this:

Section "InputDevice"
  Identifier    "Mouse0"
  Driver        "mouse"
  Option        "Protocol" "auto"
  Option        "Device" "/dev/input/mice"
  Option        "Emulate3Buttons" "no"
  Option        "ZAxisMapping" "4 5"
EndSection

When starting the X server, the mouse Protocol was set to "ExplorerPS/2". The same happened when I started the X server without any mouse section in the xorg.conf file (as it is intended to be in the new version).

When I tried a USB mouse, it did work with these settings. But since this system is in another room and connected to my mouse through a KVM switch, that was not what I wanted. So I had to adjust the path to the mouse driver to get my PS/2 mouse to work:

Section "InputDevice"
  Identifier    "Mouse0"
  Driver        "mouse"
  Option        "Protocol" "auto"
  Option        "Device" "/dev/input/mouse0"
  Option        "Emulate3Buttons" "no"
  Option        "ZAxisMapping" "4 5"
Endsection

Now the Protocol is set to "PS/2". The logs look like this:

(II) LoadModule: "mouse"
(II) Loading /usr/lib64/xorg/modules/input//mouse_drv.so
(II) Module mouse: vendor="X.Org Foundation"
         compiled for 1.4.99.901, module version = 1.3.0
         Module class: X.Org XInput Driver
         ABI class: X.Org XInput driver, version 2.0

(**) Option "Device" "/dev/input/mouse0"
(II) Mouse0: Setting mouse protocol to "PS/2"
(**) Mouse0: Device: "/dev/input/mouse0"
(**) Mouse0: Protocol: "auto"
(**) Option "CorePointer"
(**) Mouse0: always reports core events
(**) Option "Device" "/dev/input/mouse0"
(**) Option "Emulate3Buttons" "no"
(**) Option "ZAxisMapping" "4 5"
(**) Mouse0: ZAxisMapping: buttons 4 and 5
(**) Mouse0: Buttons: 9
(**) Mouse0: Sensitivity: 1
(II) evaluating device (Mouse0)
(II) XINPUT: Adding extended input device "Mouse0" (type: MOUSE)
(II) Mouse0: Setting mouse protocol to "PS/2"
(II) Mouse0: ps2EnableDataReporting: succeeded
(II) config/hal: Adding input device Macintosh mouse button emulation
(II) LoadModule: "evdev"
(II) Loading /usr/lib64/xorg/modules/input//evdev_drv.so
(II) Module evdev: vendor="X.Org Foundation"
        compiled for 0.0.0, module version = 1.0.0
        Module class: X.Org XInput Driver
        ABI class: X.Org XInput driver, version 2.1
(**) Macintosh mouse button emulation: always reports core events
(**) Macintosh mouse button emulation: Device: "/dev/input/event0"
(II) Macintosh mouse button emulation: Found x and y relative axes
(II) Macintosh mouse button emulation: Found mouse buttons
(II) Macintosh mouse button emulation: Configuring as mouse
(II) XINPUT: Adding extended input device "Macintosh mouse button emulation" (type: MOUSE)
(II) config/hal: Adding input device PS/2 Logitech Wheel Mouse
(**) PS/2 Logitech Wheel Mouse: always reports core events
(**) PS/2 Logitech Wheel Mouse: Device: "/dev/input/event2"
(II) PS/2 Logitech Wheel Mouse: Found x and y relative axes
(II) PS/2 Logitech Wheel Mouse: Found mouse buttons
(II) PS/2 Logitech Wheel Mouse: Configuring as mouse
(II) XINPUT: Adding extended input device "PS/2 Logitech Wheel Mouse" (type: MOUSE)

(II) Mouse0: ps2EnableDataReporting: succeeded

Monitor not Recognized

Then there was the problem with the monitor not being recognized. The default used of 75x75 DPI resulted in unreadable tiny fonts on a 17" screen in 1024x768 resolution. So I added the screen size by hand to the Device section, disabling the EDID detection (Extended Display Identification Data):

Section "Device"
  Identifier    "Videocard0"
  Driver        "nvidia"
  VendorName    "NVIDIA Corporation"
  BoardName     "GeForce 7100 GS"
  Option        "UseEdiDpi" "false"
  Option        "DPI" "96x96"
EndSection

The default sync and refresh rates of the monitor were also set too high, resulting in flickering stripes through the screen. So I had to adjust these in the Monitor section:

Section "Monitor"
  Identifier     "Monitor0"
  VendorName     "Iiyama"
  ModelName      "Vision Master Pro 400 A701GT"
  HorizSync      27.0 - 96.0
  VertRefresh    50.0 - 160.0
  Option         "DPMS"
EndSection

Resolutions

Finally, I used the xorg.conf settings generated by the nVidia X Server Settings program in the Applications -> System Tools menu to generate the Screen section. Without the "metamodes" setting, the X server went through the higher screen resolutions before settling in 1024x768:

Section "Screen"
  Identif ier     "Screen0"
  Device          "Videocard0"
  Monitor         "Monitor0"
  DefaultDepth    24
  Option          "TwinView" "0"
  Option          "TwinViewXineramaInfoOrder" "CRT-0"
  Option          "metamodes" "1024x768 +0+0; 800x600 +0+0; 640x480 +0+0; 640x400 +0+0; 640x350 +0+0"
  SubSection      "Display"
    Depth    24
    Modes    "1600x1200" "1280x1024" "1024x768" "800x600" "640x480" "640x400" "640x350"
  EndSubSection
EndSection

You can see the current settings using:

  xdpyinfo |grep dimension
and:
  xdpyinfo |grep resolution

Complete /etc/X11/xorg.conf File

The RgbPath and FontPath settings in the Files section had to be disabled.

# nvidia-xconfig: X configuration file generated by nvidia-xconfig
# nvidia-xconfig: version 1.0  (buildmeister@builder26) Wed Jun 13 16:54:14 PDT 2007

# adjusted

Section "ServerLayout"
  Identifier     "Layout0"
  Screen         0 "Screen0"
  InputDevice    "Keyboard0" "CoreKeyboard"
  InputDevice    "Mouse0" "CorePointer"
EndSection

Section "Files"
# RgbPath     "/usr/X11R6/lib/X11/rgb"
# FontPath    "unix/:7100"
EndSection

Section "Module"
  Load    "dbe"
  Load    "extmod"
# Load    "type1"
  Load    "freetype"
  Load    "glx"
EndSection

Section "ServerFlags"
  Option    "Xinerama" "0"
EndSection

Section "InputDevice"
# device /dev/input/mice only working for USB-PS/2
  Identifier    "Mouse0"
  Driver        "mouse"
  Option        "Protocol" "auto"
  Option        "Device" "/dev/input/mouse0"
  Option        "Emulate3Buttons" "no"
  Option        "ZAxisMapping" "4 5"
EndSection

Section "InputDevice"
  # generated from data in "/etc/sysconfig/keyboard"
  Identifier    "Keyboard0"
  Driver        "keyboard"
  Option        "XkbLayout" "us"
  Option        "XkbModel" "pc105"
EndSection

Section "Monitor"
  Identifier     "Monitor0"
  VendorName     "Iiyama"
  ModelName      "Vision Master Pro 400 A701GT"
  HorizSync      27.0 - 96.0
  VertRefresh    50.0 - 160.0
  Option         "DPMS"
EndSection

Section "Device"
  Identifier    "Videocard0"
  Driver        "nvidia"
  VendorName    "NVIDIA Corporation"
  BoardName     "GeForce 7100 GS"
  Option        "UseEdiDpi" "false"
  Option        "DPI" "96x96"
EndSection

Section "Screen"
  Identifier      "Screen0"
  Device          "Videocard0"
  Monitor         "Monitor0"
  DefaultDepth    24
  Option          "TwinView" "0"
  Option          "TwinViewXineramaInfoOrder" "CRT-0"
  Option          "metamodes" "1024x768 +0+0; 800x600 +0+0; 640x480 +0+0; 640x400 +0+0; 640x350 +0+0"
  SubSection "Display"
    Depth    24
    Modes    "1600x1200" "1280x1024" "1024x768" "800x600" "640x480" "640x400" "640x350"
  EndSubSection
EndSection

gdm

The X server is working like a charm now. All that's left is to get gdm running again. I'm currently starting up using startx.