Resolution of X

Hendrix tgjp at thezone.net
Sat Jul 8 05:34:42 PDT 2000


Anas Mughal wrote:
> 
> Hi,
> Could someone please advise me on how to change the resolution of X in
> RedHat 6.2. 
> Thank you very much.

I'm using RedHat6.1, but it doesn't matter much, the kernel is the
same...  This is done with a not-so-complex shell script that the X
server uses to configure the memory interface from the video card, and
then pass the values to the monitor...  You first have to make sure that
the serial devices for your distro are set up...Check under /dev
directory to see that you have tty0, tty1, and tty2...  You also must
know the clock chip that is being used on your vid card (mine is a
ti8026 I think)...  If you are going to write this script from scratch
you need to research your Modeline documentation for your monitor/vid
card combination...  Most companies do not have these specs at their
fingertips (and the frigging secretaries, YES secretaries, they have
answering the email probably won't write you back)...  Check the video
memory section in the /proc filesystem...  The video card takes over
memory addresses in the 0A000-0D000 range, I think...  Actually, I think
the NIC captures 0D000, but in any case, check /proc...  Don't depend on
the "user friendly" probeing technology that Red Hat uses to probe the
modelines......They are just trying to make linux more like Windoze.... 
I done a "Red Hat" plug'n pray setup and it didn't work, all f*cked up
left right and centre...  So I manually got my modes from memory, like I
said, I think VGA starts at 0A000...  Here is a copy of my modelines (as
extracted from the config script I wrote)...  Note: I commented out each
line previous to the actual "Modeline" so that you will know exactly
what frequency we are talking about in the Modeline...  Each modeline,
is just an expanded way of saying the following:

Identifier  "Insert Your monitor here"
    VendorName  "This is just an ID string, fill it in if you want"
    ModelName   "Again, this is just an ID string"
    HorizSync   31.5-63.9  
    VertRefresh 56-87.59    

Here are the Modelines:

# 640x400 @ 70 Hz, 31.5 kHz hsync
Modeline "640x400"     25.175 640  664  760  800   400  409  411  450
# 640x480 @ 60 Hz, 31.5 kHz hsync
Modeline "640x480"     25.175 640  664  760  800   480  491  493  525
# 800x600 @ 56 Hz, 35.15 kHz hsync
ModeLine "800x600"     36     800  824  896 1024   600  601  603  625
# 1024x768 @ 87 Hz interlaced, 35.5 kHz hsync
Modeline "1024x768"    44.9  1024 1048 1208 1264   768  776  784  817
Interlace
# 640x400 @ 85 Hz, 37.86 kHz hsync
Modeline "640x400"     31.5   640  672 736   832   400  401  404  445
-HSync +VSync
# 640x480 @ 72 Hz, 36.5 kHz hsync
Modeline "640x480"     31.5   640  680  720  864   480  488  491  521
# 640x480 @ 75 Hz, 37.50 kHz hsync
ModeLine  "640x480"    31.5   640  656  720  840   480  481  484  500
-HSync -VSync
# 800x600 @ 60 Hz, 37.8 kHz hsync
Modeline "800x600"     40     800  840  968 1056   600  601  605  628
+hsync +vsync
# 640x480 @ 85 Hz, 43.27 kHz hsync
Modeline "640x480"     36     640  696  752  832   480  481  484  509
-HSync -VSync
# 800x600 @ 72 Hz, 48.0 kHz hsync
Modeline "800x600"     50     800  856  976 1040   600  637  643  666
+hsync +vsync
# 1024x768 @ 60 Hz, 48.4 kHz hsync
Modeline "1024x768"    65    1024 1032 1176 1344   768  771  777  806
-hsync -vsync
# 1152x864 @ 60 Hz, 53.5 kHz hsync
Modeline  "1152x864"   89.9  1152 1216 1472 1680   864  868  876  892
-HSync -VSync
# 800x600 @ 85 Hz, 55.84 kHz hsync
Modeline  "800x600"    60.75  800  864  928 1088   600  616  621  657
-HSync -VSync
# 1024x768 @ 70 Hz, 56.5 kHz hsync
Modeline "1024x768"    75    1024 1048 1184 1328   768  771  777  806
-hsync -vsync
# 1280x1024 @ 87.59 Hz interlaced, 51 kHz hsync
Modeline "1280x1024"   80    1280 1296 1512 1568  1024 1025 1037 1165
Interlace  

NOW...  Here is the part where you can actaully change the
resolution:::::

You can edit the /etc/X11/XF86Config file, or you can press CTRL-ALT-(+)
or CTRL-ALT-(-) to switch between resolution while running X... 
Basically, the XF86Free file sets up the display and screen parameters
with Mode settings...  You can create a basic XF86Config by running Red
Hat's 'Xconfigurator'...  Then fill in the blanks that relate to your
monitor and adaptor specification...  To start with a specific res, edit
the XF86Config file and insert the following in subsequent sections (see
end of email):
 
Example:  This is an excerpt from my XF86Config script...  It first sets
up my display adapter in the "Device" Section, and then it sets up the
"Screen"...  In my file, I have three color depths (which refers to the
bit mode of the adapter)...  These depths are 8, 16, and 32...  In the
modes section (see below), is the set of resolutions that can be
attained for each color depth....  The way to set a default color depth
(bit mode) for X is shown with the option "DefaultColorDepth 16" (as
shown below)...  This means that my X server will start in 16 bit
mode...  Under the  16 bit mode, you will see that the resolutions are
given in the modes section...  I have "1152x864" listed first...  This
is the resolution that X will start in first... Then I can switch back
and forth between all modes listed under the color depth of 16 by using
CTRL-ALT-(+) or CTRL-ALT-(-) while the X server is running... In other
words, I will be switching between the following list: "1152x864"
"1024x768" "800x600" "640x480"....With "1152x864" being the default res
at startup....  If you need anymore help, feel free to email me...  The
scripting part of this can be a little tricky...  And don't always rely
on user programs to do the work for ya, you won't always be sitting at a
user-friendly distro like "Red Hat"...  Happy Scripting...

Section "Device"
    Identifier  "Matrox|MGA 2064W [Millennium]"
    VendorName  "Matrox...Duh, I just wrote that"
    BoardName   "ti3026...I hate useless id strings"
    #VideoRam    2048
    Clockchip   "ti3026"
EndSection
 
Section "Screen"
    Driver      "svga"
    Device      "Matrox|MGA 2064W [Millennium]"
    Monitor     "Generic Monitor"
    DefaultColorDepth 16
    Subsection "Display"
        Depth       8
        Modes       "640x480" "800x600" "1024x768" "1152x864"
"1280x1024"
        ViewPort    0 0
    EndSubsection
    Subsection "Display"
        Depth       16
        Modes       "1152x864" "1024x768" "800x600" "640x480"
        ViewPort    0 0
    EndSubsection
    Subsection "Display"
        Depth       32
        Modes       "640x480"
        ViewPort    0 0
    EndSubsection
EndSection                                 

--
Trevor Penney, 
A+, Network+, BCT, BKT Certified
----------------------
"That's alright, I still got my guitar"... 
-James Marshall Hendrix (11/27/1942-09/18/1970)
--
Mail archive: http://www.pcrdallas.com/mail-archives/alfs-discuss
IRC access: server: irc.linuxfromscratch.org port: 6667 channel: #LFS
Unsubscribe: email alfs-discuss-request at linuxfromscratch.org and put
"unsubscribe" (without the quotation marks) in the body of the message
(no subject is required)



More information about the alfs-discuss mailing list