Typo
[linux_from_scratch_hints.git] / OLD / svgatextmode.txt
blob6d386bedc134e514369c7c85e6c88a87ac2b3698
1 TITLE:          High resolution console modes with SVGATextMode
2 LFS VERSION:    CVS 2002-08-30+
3 AUTHOR:         Jim Mischel <jim@mischel.com>
5 SYNOPSIS:
6         Downloading and installing SVGATextMode to provide high-resolution
7         console modes.
9 HINT:
11 (Version 0.51, 2002-09-16)
13 0. IMPORTANT NOTE
14 -----------------
15 It is possible to damage your hardware (specifically, your monitor and your
16 video card) using the program described in this hint (SVGATextMode).  Be very
17 careful when specifying your video card's and monitor's capabilities.  Be sure
18 to read the documentation that comes with the SVGATextMode program, especially
19 the README.FIRST file, and the notes at the top of TextConfig.
21 The author of this hint, and the authors and maintainers of SVGATextMode
22 cannot be held responsible for any damage caused to your hardware.
25 I. Introduction
26 ---------------
27 The default console mode set by the Linux kernel is 25 lines of 80 characters.
28 That's fine if you're not doing much at the console, or if you use a console
29 window from X where you can make the window as big as you like.  But if you're
30 doing a lot of work at the console, 80x25 just isn't big enough!  80x25 is an
31 EGA mode selected by the kernel because all common PC hardware supports it.
32 But most video cards and monitors these days are capable of much higher
33 resolutions simply by reprogramming the registers on your VGA card.  What
34 would you say to 50 lines of 132 characters each?
37 II. Text mode or graphics mode?
38 -------------------------------
39 The Linux kernel itself provides two different ways to specify text modes
40 larger than 80x25.  The first is the video mode selection support that is
41 documented in the svga.txt file found in the kernel source's Documentation
42 directory.  With this support, you can specify any of the standard and
43 extended VGA text modes, and also (if you're fortunate) some custom modes.
44 The problem is that the kernel's automatic detection of video cards is not
45 terribly reliable.
47 Current Linux kernel versions also include framebuffer support, which will
48 give you a high-resolution console provided you enable framebuffer support
49 in your kernel configuration.  Although it's a nice feature, using framebuffer
50 puts your video card into graphics mode, resulting in very slow scrolling.  On
51 an older, slower computer, a graphics mode console is unbearable.
53 In either case, kernel support does not include a way to change text modes
54 on the fly.
57 III. SVGATextMode
58 -----------------
59 SVGATextMode is a program that supports a wide range of video cards and chip
60 sets.  You specify your video card and the capabilities of your monitor in an
61 X-like configuration file, and then run the program telling it what text mode
62 to display.  SVGATextMode talks directly to the hardware, rather than to the
63 BIOS, to set the video mode.  Specifying your video card and monitor
64 capabilities helps prevent SVGATextMode from trying to change into a mode that
65 will damage the video card or the monitor.
67 The configuration file also contains descriptions of many different text modes
68 that you can try.  Some you probably won't be able to use due to hardware
69 limitations, and others are just plain ugly.  But you should be able to find
70 several high-resolution modes that will improve on the standard 80x25 and
71 other modes supported directly by the kernel.
74 IV. Download and installation
75 ------------------------------
76 Source for the current version of SVGATextMode (version 1.10) is available at
77 ftp.ibiblio.org/pub/Linux/utils/console/SVGATEXTMODE-1.10-src.tar.gz.  Download
78 that file and extract it to your build directory.  It was created using an
79 older version of gcc, and might not compile as is with more current gcc 
80 versions.  If you're using gcc version 3.2 or later, or if you get build errors,
81 download and apply the patch from
82 http://www.mischel.com/lfs/SVGATextMode-1.10.patch.gz.  Sorry, as of this
83 writing (2002-09-16), I cannot offer FTP access to that site.
85 To build the program, change to the directory that contains the extracted source.
86 If you must apply the patch, then enter this command:
88 patch -Np1 -i ../SVGATextMode-1.10.patch
90 Once the patch is applied (if necessary), you can build the SVGATextMode
91 program by entering the following commands:
93 make &&
94 make install &&
95 make man-install &&
96 cp TextConfig /etc/TextConfig
98 SVGATextMode is installed in the /usr/sbin directory.
101 V. Configuration
102 ----------------
103 After installation, open the /etc/TextConfig file in your favorite editor.
105 !! READ THE HINTS AND WARNINGS AT THE TOP OF THE FILE !!
107 The default setting for SVGATextMode is standard VGA, which is highly sub-
108 optimal for most modern Linux systems.  You'll want to change the configuration
109 settings in this file to match your video card and monitor.  Down about line
110 60 of the TextConfig file is this text:
112 Chipset "VGA"
113 Clocks 25.175 28.322
115 You want to comment those lines out by placing '#' characters at the beginning
116 of the lines.  Then, scroll down through the (long!) list of chip sets to
117 locate the one that matches your video card.  Uncomment the line, and the
118 "Clocks" or "Clockchip" line for your card.  For example, I un-commented
119 these two lines for my S3 Virge based video card:
121 Chipset         "S3"
122 ClockChip "S3Virge"
124 Many of the pre-configured cards have additional settings with which you may
125 want to experiment.
127 IMPORTANT:  You should be absolutely sure about the kind of video card you have,
128 and specify it properly here.  If you have any doubt, get out the documentation
129 for your card, or examine the card itself to see what chips are on it.
131 After you have configured the video card, you need to tell SVGATextMode your
132 monitor's allowable horizontal sync and vertical refresh timings.
134 Find these two lines in TextConfig:
136 #HorizSync 30-32
137 #VertRefresh 50-80
139 These are defaults that will work with almost all monitors.  But most monitors
140 are capable of much more than this.  Uncomment these two lines and look in the
141 manual to find the allowable values for your monitor.  It's possible that those
142 numbers will be printed on the back of the monitor, as well.  It's very
143 important that you enter the correct numbers for your monitor here.  Failure to
144 do this can cause SVGATextMode to send signals that will fry your monitor.
146 Once you've made these changes, save the file and return to your console prompt.
149 VI. Testing
150 -----------
151 Note that not modes modes will work with all cards.  It's possible to scramble
152 your display such that you can't make head or tails of it.  Fortunately, the
153 default mode is 80x25, which should work with all displays, so just typing
154 SVGATextMode (blindly, if you have to) should restore your screen.  If you have
155 changed the default text mode in TextConfig, then you'll need to type
157 SVGATextMode 80x25
159 in order to get things back to normal.  If you have the savetextmode and
160 textmode programs, you can type savetextmode to save the current mode before
161 testing SVGATextMode.  If your screen becomes scrambled, just type textmode
162 (blindly, possibly) to restore the screen.
164 It's a good idea at this time to close any programs that have unsaved data.
166 At the command prompt, enter
168 SVGATextMode 80x25
170 or, try
172 SVGATextMode -o
174 The program should show you some status information and set the video mode.
175 You won't notice any change here, because that's the normal operating mode.  If
176 your screen is scrambled here, then you probably configured something wrong.
177 If you don't have textmode to restore the screen, you'll probably have to
178 reboot.
180 Select one of the text modes from the long list of pre-configured modes that
181 are at the end of /etc/TextConfig.  It's a good idea to try one of the
182 "standard" modes first.  For example, most (all?) SVGA cards should support
183 a 132x50 line screen.  Try
185 SVGATextMode 132x50x9
187 You may want to experiment with other modes, or with creating your own.
190 VII. Final Configuration
191 -------------------------
192 The default TextConfig file enables the "SyncDisks" option to flush the disk
193 cache before trying to reprogram the mode.  This is useful when testing, but
194 once you've determined that SVGATextMode is working, you can disable this
195 option and comment out the corresponding message in TextConfig.  You will also
196 want to comment out the lines (starting at about line 70) that echo a message
197 about configuration.
200 VIII. Going further
201 -------------------
202 SVGATextMode comes with a few other programs, and very good documentation.
203 Be sure to scan the files in the doc directory, and the man pages for more
204 information about using this fine program.