Next Previous Contents

20. Appendix C - NeoMagic Chip NM20xx

20.1 Introduction

Hence the NeoMagic chipset series NM20xx is one of the most used graphic chips in laptops in our times, I will spent a few words on them. Though a long time this chip was only supported by commercial X servers, since the middle of 1998 RedHat provided a binary X server manufactured by PrecisionInsight. Since version 3.3.3 this X server is also available by XFree86.

20.2 Textmode 100x37

This chapter is a courtesy of Cedric Adjih . I changed some minor parts.

An apparently little known fact about the Neomagic chipset NM20xx is that you can run text mode in 100x37 (i.e. 800x600). This text mode is very nice (as opposed to the 80x25 which is ugly). I tried this with a HP OmniBook 800 and suppose it might work with other laptops using the NeoMagic chip, too. The following that I wrote was much longer than I expected so I wrote it as a kind of mini-howto :-) :

The main problem is that is a bit difficult to set up, and if you're going wrong with SVGATextMode/restoretextmode some results on the LCD might be frightening. Although I didn't manage to break my LCD with many many attempts going wrong, DISCLAMER: THIS MIGHT DAMAGE YOUR HARDWARE. YOU HAVE BEEN WARNED. FOLLOW THE FOLLOWING INSTRUCTIONS AT YOUR OWN RISKS. I'M NOT RESPONSIBLE IF SOMETHING BAD HAPPENS.

Survey

You need to do three main steps:

  1. Enable Linux to boot in 800x600 textmode. The problem is that you won't see any text before the following two steps aren't done.
  2. Automatically run restoretextmode with correct register data.
  3. Automatically run SVGATextMode.

More Details

All the files I have modified, are available for now at http://starship.python.net/crew/adjih/data/cda-omni-trick.tar.gz

Enabling Linux to Boot in 800x600

Recent kernels (2.2.x) need to be compiled with CONFIG_VIDEO_GFX_HACK defined. Default is off. (look in /usr/src/linux-2.2.x/arch/i386/boot/video.S)

This is done by passing the parameter vga=770 to older kernels or vga=7 to 2.2.x kernels. Example with lilo.conf:


image=/boot/bzImage-modif
label=22
append="svgatextmode=100x37x8_SVGA" #explained later
vga=7
read-only

Running restoretextmode and SVGATextMode at Boot Time

You must arrange to run restoretextmode <name of some textreg.dat file> and SVGATextMode 100x37x8_SVGA at boot time.

An example textreg.dat for restoretextmode (obtained using savetextmode) is in my tar archive in tmp/, and an example /etc/TextConfig.

Since I'm lazy, I've simply put SVGATextMode and restoretextmode in the /etc/rc.boot/kbd file from my Debian/GNU Linux which get executed at boot time (also available in the tar archive).

Now the Key Point

Annoying things will be displayed if you don't use the right SVGATextMode in the right video text mode: this is why I also pass the environmental variable "svgatextmode=100x37x8_SVGA" (arbitrary name) to the kernel (using append=xxx in lilo.conf) when I also set vga=7: the script /etc/rc.boot/kbd tests this variable and calls restoretextmode and SVGATextMode IF AND ONLY IF.

Road Map

  1. Recompile the kernel 2.2.x with CONFIG_VIDEO_GFX_HACK
  2. Insert the restoretextmode with the correct parameter in the initialisation script, with no other changes.
  3. Boot with normal text mode (80x25) but restoretextmode: you should see the screen going to 100x37, but with only 80x25 usable. Don't use SVGATextMode yet.
  4. It is much better to conditionnalize your initialize code as I did, to keep the possibility of booting in both modes: you may test this now with some reboots (starting restoretextmode or not).
  5. Boot with 100x37 text mode using parameter vga=7 (lilo.conf), you should see white background at some point, but the characters will be black on black. This is ok. You'll have to reboot blindly now.
  6. Insert the <path>/SVGATextMode 100x37x8_SVGA after the restoretextmode in initialization scripts.
  7. Reboot with vga=7 (lilo.conf)
  8. Should be OK now. Enjoy.


Next Previous Contents