Mauriat Miranda     mjmwired

Default Xorg Resolution

Recent versions of Linux and the Xorg X-Windows system have been engineered to require very little configuration settings to properly detect graphics options and display resolutions. In most cases graphics should “just work”.

The Xorg system stores all its configuration options in the file: xorg.conf. Many distributions including Fedora and CentOS keep this file in the /etc/X11/ directory. In the past this file would contain a great deal of information that was not easy to setup. However as of recent releases, this file is not required for graphics to work correctly. Both Fedora and CentOS will provide a very minimal xorg.conf file if required.

Typically the proper resolution for your display will be detected at run time. While this is great for most users, it often leads to strange resolutions or blank screens depending on your monitor or LCD screen.

EDIT: If you have NO file at all, on the Fedora wiki is: How to create xorg.conf. This works for both Fedora and CentOS. There are two solutions if you have no xorg.conf. As ‘root’ run either of the following:

# yum install system-config-display
# system-config-display --noui

-OR-

# yum install xorg-x11-server-Xorg
# Xorg -configure
# cp xorg.conf.new /etc/X11/xorg.conf

Whenever I install Fedora or CentOS with the X-server, I typically edit /etc/X11/xorg.conf and add the following Section (or at least the missing parts):

Section "Screen"
        Identifier "Screen0"
        Device     "Videocard0"
        DefaultDepth     24
        Subsection "Display"
                Viewport   0 0
                Depth     24
                **Modes     "1024x768"**
        EndSubSection
EndSection

The Modes line will control the resolution. You should put the proper resolution for your display. You can also add mutiple modes if you monitor supports it. For example:

Modes     "1280x1024" "1024x768" "800x600"

If you have an LCD and Xorg does not properly detect the resolution, set the mode to the maximum resolution your LCD supports. If you have a standard CRT monitor that Xorg detects higher resolutions (with poor refresh rates) set the mode to the resolution you are comfortable. Also, if you have a CRT you can set multiple modes, then using either Gnome or KDE you can pick a resolution you prefer.

Note: This does NOT apply to everyone (most people will find the defaults correct), however many people have reported that setting a fixed resolution is helpful. Especially for some LCD’s which just seem to go blank.

For more information run man xorg.conf

Edit: 11/23/2009

Posted in: CentOS, Fedora, Hardware, Setup, Tips,