Tuesday, August 19, 2008

How to set default display driver in Redhat Linux?

I faced this problem when I was trying to install Redhat Linux 3 on a system with NVidia display card. After installation, everything came up fine upto X-server and then it was kind of blank screen. Obviously, the driver selected during the installation was not the perfect for the system. So, here is what I did to make it work with 'default' or 'vesa' driver:

1) Booted the system in single user mode.
2) Edited the file /etc/X11/XF86Config and replaced/changed at two places:
- Changed driver from "nvidia" to "vesa" in line starting with "Driver" in Section "Device"
- Checked for line containing "dpms" and appened "off" after it.
Option "dpms" "off"
3) Saved the changes and rebooted the system. Boom! It came up fine with default display driver.

Update on 03/23/2011::
Note: This article became alive again yesterday when I was doing X11 config on RHEL 4U7 server. User wanted GUI and video card was somehow not supported. The simplest way was to switch to VESA driver and get it going. User happy, I am happy!!! :)


Update on 03/28/2011::
This user again called me now for a better (smaller) resolution settings. At first, I thought that it may not be supported with default/vesa driver but the system's default drivers also support better resolution than default 800x600. Here is how I did that:

1) First of all, invoked "system-config-display utility". Using this utility, select the correct Monitor type. In my case, the correct type was "LCD Panel 1280x1024". I saved that monitor type and exited from utility.

2) Rebooted.

3) Again, edited the /etc/X11/xorg.conf file to add more resolutions.
Modes "1280x1024" "1280x960" "1024x768" "800x600" "640x480"

4) Rebooted again! (Yeah I know I rebooted one more time, but I did what I did ;))

And yes, user was able to get much more better display with 1280x1024 settings.

The final /etc/X11/xorg.conf file now looked like below: (Note that the lines/sections in maroon were changed/added/modified manually or using system-config-display.


# cat /etc/X11/xorg.conf
# Xorg configuration created by system-config-display

Section "ServerLayout"
Identifier "single head configuration"
Screen 0 "Screen0" 0 0
InputDevice "Mouse0" "CorePointer"
InputDevice "Keyboard0" "CoreKeyboard"
EndSection

Section "Files"

# RgbPath is the location of the RGB database. Note, this is the name of the
# file minus the extension (like ".txt" or ".db"). There is normally
# no need to change the default.
# Multiple FontPath entries are allowed (they are concatenated together)
# By default, Red Hat 6.0 and later now use a font server independent of
# the X server to render fonts.
RgbPath "/usr/X11R6/lib/X11/rgb"
FontPath "unix/:7100"
EndSection

Section "Module"
Load "dbe"
Load "extmod"
Load "fbdevhw"
Load "glx"
Load "record"
Load "freetype"
Load "type1"
Load "dri"
EndSection

Section "InputDevice"

# Specify which keyboard LEDs can be user-controlled (eg, with xset(1))
# Option "Xleds" "1 2 3"
# To disable the XKEYBOARD extension, uncomment XkbDisable.
# Option "XkbDisable"
# To customise the XKB settings to suit your keyboard, modify the
# lines below (which are the defaults). For example, for a non-U.S.
# keyboard, you will probably want to use:
# Option "XkbModel" "pc102"
# If you have a US Microsoft Natural keyboard, you can use:
# Option "XkbModel" "microsoft"
#
# Then to change the language, change the Layout setting.
# For example, a german layout can be obtained with:
# Option "XkbLayout" "de"
# or:
# Option "XkbLayout" "de"
# Option "XkbVariant" "nodeadkeys"
#
# If you'd like to switch the positions of your capslock and
# control keys, use:
# Option "XkbOptions" "ctrl:swapcaps"
# Or if you just want both to be control, use:
# Option "XkbOptions" "ctrl:nocaps"
#
Identifier "Keyboard0"
Driver "kbd"
Option "XkbModel" "pc105"
Option "XkbLayout" "us"
EndSection

Section "InputDevice"
Identifier "Mouse0"
Driver "mouse"
Option "Protocol" "IMPS/2"
Option "Device" "/dev/input/mice"
Option "ZAxisMapping" "4 5"
Option "Emulate3Buttons" "yes"
EndSection

Section "Monitor"
Identifier "Monitor0"
VendorName "Monitor Vendor"
ModelName "LCD Panel 1280x1024"
HorizSync 31.5 - 64.0
VertRefresh 56.0 - 65.0
Option "dpms" "off"
EndSection

Section "Device"
Identifier "Videocard0"
Driver "vesa"
VendorName "Videocard vendor"
BoardName "NVIDIA Quadro NVS 285"
EndSection

Section "Screen"
Identifier "Screen0"
Device "Videocard0"
Monitor "Monitor0"
DefaultDepth 16
SubSection "Display"

# Modes "800x600" "640x480"
Viewport 0 0
Depth 16
Modes "1280x1024" "1280x960" "1024x768" "800x600" "640x480"
EndSubSection
EndSection

No comments: