Next Previous Contents

16. Changing the video mode

As far as I know there are 6 ways to change resolution:

1. At compile time: change the line


        SVGA_MODE=      -DSVGA_MODE=NORMAL_VGA
in /usr/src/linux/Makefile.

1A. After compilation: use rdev -v - a terrible hack, but it exists.

2. At boot time: put vga=ask in the lilo config file, and lilo will ask you what video mode you want. Once you know, put vga=mypreference.

3. At run time: A. Use the resizecons command. (This is a very primitive wrapper around the VT_RESIZE ioctl.) B. Use the SVGATextMode command. (This is a less primitive wrapper around the VT_RESIZE ioctl.)

4. Not "on the console": Under dosemu, or with svgalib etc. you can change the hardware video mode without the console driver being aware of it. Sometimes this is useful in getting resizecons or SVGATextMode set up: use dosemu and some DOS program to get into the desired videomode, dump (say from another VT) the contents of all video hardware registers, and use that in the initialization that resizecons and SVGATextMode require. In some cases where the video mode has gotten into some unusable state, starting dosemu, relying on the BIOS to set up the video mode, and then killing dosemu (with kill -9), is the easiest way to get into shape again.

16.1 Instructions for the use of resizecons

Get svgalib and compile the program restoretextmode. Boot up your machine in all possible video modes (using vga=ask in the lilo config file), and write the video hardware register contents to files CxR (C=cols, R=rows), e.g., 80x25, 132x44, etc. Put these files in /usr/lib/kbd/videomodes. Now resizecons 132x44 will change videomode for you (and send SIGWINCH to all processes that need to know about this, and load another font if necessary).

At present, resizecons only succeeds when there is memory enough for both the old and the new consoles at the same time.


Next Previous Contents