S3 Savage

XFree86 4.3.0


Contents:
XF86Config options History Issues Newbie info Environments Download Misc laptop links About me

Overview

I am maintaining a moderated mailing list for folks who wish to be receive updates on the status of this driver. You may sign up at this web page: www.probo.com/mailman/listinfo/savage40. This is a very low-volume list; several have suggested I should have called it "savage40-announce", since that's really what it is. They're right.

VIA/S3 has release an updated version of THEIR Savage driver. It forked off of my source base about 3 years ago, so there are significant differences, but it looks like they have addressed a number of issues. This includes motion compensation support for MPEG playback (XvMC), and the long-awaited DRI driver for 3D OpenGL code. The DRI driver is only for the ProSavage and Twister chips, so it won't help Savage/IX or SuperSavage users. If you want to download the source and build it, try http://www.linux.org.uk/~alan/S3.zip. It was built for XFree86 4.2.0; the DRI code, in particular, will need a lot of work for XFree86 4.3.0. This driver has been submitted to XFree86, but it will not be a standard part of XFree86 4.4.

ProSavage-DDR Refresh Rates A number of users have complained that they get wacky refresh rates when using the 1.1.27t driver. There is apparently some kind of conflict between this driver and the BIOS found on some ProSavage-DDR motherboard that causes anything but the default refresh rate to be set wrong. There are two workaround for this. One is to turn off the use of the BIOS by adding
     Option "UseBios" "no"
in the "Device" section of your XF86Config file. Another is to try the driver below that was built from the 4.4.0 beta 2 source base. It works on 4.3.0, and reportedly solves the refresh problem.

Important Update!VIA has now replaced the Savage chips with a new and incompatible graphics engine which was initially called "CastleRock". However, in a brilliant marketing move paralleling the "New Coke" fiasco, the marketing folks at VIA have decided to allow laptop makers to call this chip the "ProSavage-DDR400". This is insanity on VIA's part, and it's going to cause me enormous grief, because of my optimistic statement that my driver supports every chip with "Savage" in the name.

So, here's the new rule. My driver supports every chip with "Savage" in the name that has a PCI vendor ID of 5333 (which belongs to S3). If you have a Savage chip with VIA's vendor ID (1106), then it is a CastleRock, not a Savage, and my driver does not support it.

VIA has submitted an XFree86 4.2 driver for the CastleRocks to XFree86, but I don't think it has been integrated yet.

VIA also has a pre-built driver for the ProSavage and Twister chips for RedHat 7.3 at downloads.viaarena.com, or www.viaarena.com. I haven't looked at either of these pages.

Several folks have asked about the possibility of contributing as thanks for past work and to inspire future development. I don't expect anyone to feel obligated to do so, but if the mood so strikes you, I do have a PayPal account with my e-mail address (timr@probo.com).

Want to meet my dog?


XF86Config Options

There are a number of options you can set in the Screen section of your XF86Config file to manipulate the driver's operation. Some of the more interesting options are:

Option name Purpose
Option "NoAccel" Turn off all acceleration. You might try this if you're seeing unusual crashes, just to rule out acceleration problems. On a speedy machine, even the unaccelerated code runs pretty darn fast. That's a tribute to the new XFree86 4.x architecture.
Option "SWCursor" Force the board to use a software cursor instead of a hardware cursor.
Option "CRTOnly" On a laptop chip (/IX, /MX, Twister, SuperSavage), force the chip to display only to an attached CRT, not to the LCD panel.
Option "TvOnly" On the chips that support a "TV Out" connector, force the chip to display only to the TV, not to the CRT and/or LCD.
Option "PAL" (Requires TvOnly) Force the "TV Out" signal to be in PAL instead of NTSC.
Option "shadowFB" This is another option for cases where acceleration does not work. With shadowFB, the X server maintains an image of the screen as a bitmap in memory, and only updates the sections of the screen that change. This often provides better performance than pure "NoAccel".
Option "Rotate" "CW"
Option "Rotate" "CCW"
Causes the frame buffer to be rotated 90 degrees clockwise or counterclockwise. This is designed primarily for monitors which can rotate between portrait and landscape orientations. Turning this option on disables acceleration and enables shadowFB.
Option "UseBIOS" "off"
Option "UseBIOS" "on"
Enables or disables the use of the video BIOS to switch modes. Using the BIOS lets me do a better job of supporting all the various LCD panels in the world, but some purists are opposed to it. Default is "on".
Option "ShadowStatus" Allows you to select the alternate "shadow" method of reading the engine status register. This has completely eliminated the infamous "scrolling hang" bug in every instance thus far, at the cost of a slight performance hit. The default value is "off".
Option "LCDClock" "100MHz" Allows you to limit the maximum dot clock when an LCD panel is active. Some Savage/MX and /IX users report problems as if the BIOS were allowing the dot clock to overdrive the panel. I've tried to detect this automatically and failed, so it seems to me that the best solution is to provide this override. Most users will probably not need this. Overall, the BETTER choice might be to limit the H and V frequencies of your LCD monitor definition in XF86Config. The default maximum dot clock is 220MHz.

These chips are supported:

Supported Chipsets:Trivia Tidbits
Chip NamePCI Id
  • Savage3D
  • 8A20
  • Savage3D-MV
  • 8A21
  • Savage4
  • 8A22
  • Savage2000
  • 9102
  • Savage/MX-MV
  • 8C10
  • Savage/MX
  • 8C11
  • Savage/IX-MV
  • 8C12
  • Savage/IX
  • 8C13
  • ProSavage PM133
  • 8A25
  • ProSavage KM133
  • 8A26
  • ProSavage PN133 ("Twister")
  • 8D01
  • ProSavage KN133 ("Twister")
  • 8D02
  • ProSavage DDR
  • 8D04
  • SuperSavage MX/128
  • 8C22
  • SuperSavage MX/64
  • 8C24
  • SuperSavage MX/64C
  • 8C26
  • SuperSavage IX/128 SDR
  • 8C2A
  • SuperSavage IX/128 DDR
  • 8C2B
  • SuperSavage IX/64 SDR
  • 8C2C
  • SuperSavage IX/64 DDR
  • 8C2D
  • SuperSavage IX/C SDR
  • 8C2E
  • SuperSavage IX/C DDR
  • 8C2F

    The list to the left is roughly in chronological order of release. The Savage3D was the first Savage. Only a few actually made it into the real world. The graphics engine is a cleaned-up and sped-up version of the ViRGE engine.

    The 3D, MX and IX all have the same basic drawing engine. The MX and IX add LCD support. The only difference between the MX and IX is video RAM: the MX uses external RAM, while the IX has its RAM on-chip. A one-chip solution!

    Savage4, ProSavages, and the SuperSavages share a drawing engine, which is much improved over the 3D. The ProSavage and SuperSavage engine is embedded in the motherboard north bridge chip, so its raw memory access rate is excellent. This design came from a partnership between S3 and VIA. Now that S3 is owned by VIA, I think you'll hear a lot more about these products. The P products are for Pentium systems; the K products are for AMD systems. The graphics parts are identical; only the north bridge functions differ.

    The Savage2000 has a the best 3D engine of the bunch; the 2D engine is an incremental improvement over the Savage4. The Savage2000 did quite poorly in the marketplace, so the installed base is rather small.

    The "-MV" designation means the chip supports the Macrovision copy protection scheme, like that used on commercial video tapes. A computer OEM cannot get a license to play DVDs on a system with a "TV out" port unless the graphics chip supports Macrovision encoding, to prevent you from making digitally perfect tape copies of your DVDs. And don't think you can get around this by looking for a non-MV chip; no non-MV Savages have ever left the S3 testing lab.

    The SuperSavage is a recently introduced set of laptop chips from VIA/S3. I have never had one of these in my hands, so my support is entirely based on good luck and the good will of others.


    Driver History


    Known Issues

    As I mentioned above, S3 is taking future development of this driver in-house. As a result, it seems likely that the current list of known issues will be outstanding for quite a while. Some of them have workarounds, some do not.

    DRI/OpenGL/Mesa support.

    There is currently no DRI driver for the Savages for XFree86 4.x, which means that OpenGL applications are entirely simulated in software. There was work going on at one time to add this support, by the same fellow who did the UtahGLX driver for XFree86 3.3.6, but his e-mail address no longer responds.

    Xvideo extension unreliable at depth 24.

    Many people have been unable to get the xvideo extension to work at depth 24, especially on the laptop chips, although some have had complete success. I do not know what the issue is, but each case thus far has had success by switching to depth 16. This problem is MUCH improved in 1.1.22t, although at least one user is still seeing problems.

    Black screen when exiting X on 1400x1050 LCDs.

    Several manufacturers (IBM T21, T22, T23; HP; Micron Transport GX) now have Savage-based laptops with an LCD panel of an unusual size: 1400x1050. These manufacturers have concocted "magic" in their video BIOSes to get text-mode screens to fill the panel, and this "magic" conflicts with the Savage driver in some way. As a result, any attempts to exit the server or to switch VTs results in a black console. You can work around this by using a graphics console, by adding vga=828 or vga=830 to your /etc/lilo.conf. This has the added bonus of giving you crisp, clear characters in your consoles, instead of the fuzzy "expanded" text mode.

    Citrix ICA client causes server hang.

    When using the Citrix ICA client, some operations can cause the chip to go out to lunch, and hang the server and the system. You can work around the hang by adding
         Option "XaaNoMono8x8PatternFillRect"
    in the "Screen" section of your XF86Config-4 file.

    ASUS Signal 4.

    Some people get "fatal error, signal 4" with the BIOS turned on. ASUS laptops seem particularly prone to this. For now, if you see this signal 4, please set UseBIOS "off".


    Newbie Info

    I get a lot of requests for technical support. I'm not really set up to handle that kind of thing. There are a number of good web sites devoted to getting started with Linux and X; check the links below. However, I have learned some things that might be of use to those just getting started.

    Some folks get the idea from my text below that you have to build from source. If you're running Linux, you do NOT need to build from source. Just fetch the xf40sav.tgz file. This file is a "compressed tar". If you're used to Windows, this is just like a .zip file; it is a compressed file which contains other files. You decompress it with the tar command: tar xvfz xf40sav.tgz

    There are relatively few really key files in XFree86. The first key file is the server binary itself: /usr/X11R6/bin/XFree86. In XFree86 4.x, this file provides only the most basic services. Most of the work is done by separate, loadable modules. These modules reside in directories /usr/X11R6/lib/modules and /usr/X11R6/lib/modules/drivers. The next key file is the Savage server, which goes in /usr/X11R6/lib/modules/drivers/savage_drv.o.

    The next key file is a symbolic link to the server binary. When you go to run X, the file you eventually run is /etc/X11/X. This is not actually an executable file. Instead, it is a "symbolic link" which points to the actual file. In RedHat 7.0 and Mandrake 7.2, this file is the method by which you can switch between XFree86 3.3.6 and XFree86 4.x. To run 3.3.6, /etc/X11/X must point to /usr/X11R6/bin/XF86_SVGA. To run 4.x, /etc/X11/X must point to /usr/X11R6/bin/XFree86. You can switch between them like this:

    Switch to 3.3.6Switch to 4.x
    rm /etc/X11/X
    ln -s /usr/X11R6/bin/XF86_SVGA /etc/X11/X
    rm /etc/X11/X
    ln -s /usr/X11R6/bin/XFree86 /etc/X11/X

    The final key file is the XF86Config file. This includes all the configuration information, like your monitor type, your graphics board, your keyboard, your mouse, which modules you want, which options you want, which font directories you need, and so on. On many systems today, you will find two such files: /etc/X11/XF86Config and /etc/X11/XF86Config-4. This allows XFree86 3.3 and XFree86 4.x to coexist on the same system. XFree86 4.x will always use the XF86Config-4 file if it is present, otherwise it looks for XF86Config.

    Now, you can construct a basic configuration file using "X -configure". You need to make sure you copy this to the correct spot. Look at the files in /etc/X11; if you see XF86Config-4, that's where you should copy the file produced by "X -configure". Otherwise, copy it to /etc/X11/XF86Config. You can download a sample XF86Config-4 here.

    Important Note! The default configuration file created by "X -configure" assumes a very stupid monitor, capable of no more than 640x480 60Hz. On many laptops, this timing produces an unreadable screen. Before launching X, you should load your newly created XF86Config into an editor, find the "Monitor" section, and add these two lines before the EndSection:

        HorizSync    30-70
        VertRefresh  50-90
    

    That's the setup in a nutshell. If you have more configuration and setup questions, your best bet is to ask them in the comp.os.linux.portable or comp.os.linux.x newsgroups. I've been impressed by the uncharacteristic patience of both groups towards beginners.

    I don't know anything about Xconfigurator or XFdrake or SaX. These are tools invented by RedHat and Mandrake to do pretty graphical X configuration. I don't know where they get their lists of supported chips and drivers. I understand that the scheme I describe above is less friendly than these GUI tools, but I also know that it works. Perhaps someone on one of the newsgroups (comp.os.linux.x or comp.os.linux.portable) could help with these other tools.


    Environments

    The server seems to work well on Linux, FreeBSD, OpenBSD and Solaris. It also works in Linux/Alpha. Binaries and sources are available below.

    I have been assured that XFree86 drivers are operating system independent. In theory, you should be able to use ANY of the Intel/x86 drivers below on any operating system.


    Download

    The binary tars below contain the file savage_drv.o. This is the driver binary. This file belongs in the loadable driver module directory, which is usually /usr/X11R6/lib/modules/drivers. Note that the driver name in XF86Config is just "savage"; the "_drv.o" suffix is automatically added by XFree86.

    The 1.1.26t zip contains three files. Most people will ONLY need the driver file itself. The other two libraries will only be needed if you run Linux, using a SuSE distribution 8.0 or later, a Mandrake 9.0 or later, or a Gentoo 1.2 or later.

    FileUsual Location
    savage_drv.o/usr/X11R6/lib/modules/drivers
    libvbe.a/usr/X11R6/lib/modules
    libint10.a/usr/X11R6/lib/modules/linux

    XFree86 modules are supposed to be operating system independent, and in my experience this actually seems to be true. If there is a binary below built on your operating system, use it, but feel free to try one of the others if you have a need to run some other version. I include the source code below for those who are masochistic enough to want to explore it, and for those who are running other operating systems (anybody have a Plan 9 binary?).

    If you really need to build from source, you will need to install the XFree86 4.3.0 source distribution. It's BIG. First, build everything with "make World". Change to xc/programs/Xserver/hw/xfree86/drivers/savage. Get rid of the existing files (rm Imakefile *.[ch]). Untar the source code tarball into that directory. Do "make Makefile", "make depend", and "make". That gives you a "savage_drv.o", which should be linked into the modules directory.

    DeliverableVersionSizeHTTPFTP
    savage_drv.o driver binary from 4.4.0 source
    built on Linux/x86
    4.4.0 beta 2 34kB xf44sav-27t.tgz xf44sav-27t.tgz
    savage_drv.o driver binary for 4.3.0
    built on Linux/x86
    1.1.27t 37kB xf43sav-27t.tgz xf43sav-27t.tgz
    savage_drv.o driver binary for 4.2.x
    built on Linux/x86
    plus support libs
    1.1.27t 47kB xf42sav-27t.tgz xf42sav-27t.tgz
    1.1.26t 48kB xf42sav-26t.tgz xf42sav-26t.tgz
    1.1.25t 32kB xf42sav.tgz xf42sav.tgz
    savage_drv.o driver binary
    Debian package
    1.1.23t 35kB s3savage-driver_1.1.23t-1_i386.deb s3savage-driver_1.1.23t-1_i386.deb
    savage_drv.o driver binary
    built on FreeBSD/x86
    1.1.27t xf43sav-27t-FreeBSD.tgz
    1.1.20t 31kB xf41free.tgz xf41free.tgz
    1.1.23t 32kB xf42free.tgz xf42free.tgz
    savage_drv.o driver binary
    built on OpenBSD and NetBSD
    1.1.19 30kB xf40net.tgz xf40net.tgz
    1.1.13b 29kB xf40open.tgz xf40open.tgz
    savage_drv.o driver binary
    built on Solaris 8
    1.1.15 29kB xf40sol.tgz xf40sol.tgz
    Savage driver source code 1.1.27t 77kB savage-1.1.27t.zip savage-1.1.27t.zip
    1.1.26t 77kB savage-1.1.26t.tgz savage-1.1.26t.tgz
    1.1.25t 67kB savage-1.1.25t.tgz savage-1.1.25t.tgz
    s3switch utility binary for Linux/x86 -- 21kB s3s.tgz s3s.tgz
    s3switch utility source code -- 8kB s3ssrc.zip s3ssrc.zip

    Thanks to Christian Herzog for building the 4.4.0 driver.

    Thanks to Thanassis Misaradis for building 27t on XFree86 4.3.0.

    Big thanks to Manoj Kasichainula for his work in adding support for the SuperSavage.

    Thanks to Tony Simone for buildint the Debian package.

    Thanks to Frank Mehnert and Jork Loeser of Dresden University for coming up with the "scrolling hang" fix.

    Thanks to Adrian Woizik for building the FreeBSD binary.

    Thanks to Dean Christakos for building the NetBSD binary.

    Thanks to Angelos Keromytis for building the OpenBSD binary.

    Thanks to Rudy Ruiz for allowing me debug time to find the x86emu emulator bug on FreeBSD.

    If you have comments or questions, you can e-mail me at timr@probo.com.


    Laptop Links

    Here are some links to general laptop setup sites. I haven't visited most of these myself, but I'm told they are helpful.


    About Me

    I am Tim Roberts, a partner in the technology consulting firm Providenza & Boekelheide, Inc. (www.probo.com), located in Tigard, Oregon, just southwest of Portland. I've been programming computers for just over a quarter of a century, from teletypes to mainframes to minis to PCs. I hold a CCP (Certificate in Computer Programming), an MCP (Microsoft Certified Professional), and have been named a Microsoft MVP (Most Valuable Professional) for the last eight years.

    P&B offers a wide range of technology consulting and development services, from chips to boards to architectural and design reviews to drivers of all kinds, as well as networking and Internet consulting for small businesses.

    This web site was created with vim, the ultimate web site management tool.

    Legal Stuff

    Take appropriate precautions. Although substantial testing suggests this software is quite stable, this is an open source product, and there is no warranty. The prudent computer user always makes regular backups. Neither I nor VIA/S3 Graphics can be held responsible for any damage which might be caused by this software.


    Last modified: Monday, December 8, 2003