Overclocking the graphics card's processor and RAMDAC
This article deals with boosting of the performance of a graphics card using running the hardware in out-of-specifications conditions. There is a non-zero risk of damaging your graphics card. If your hardware is still under the guarantee, you are not prepared to bear the risk of damaging it or if you have some objections against the overclocking in general, simply don't do it. I am not liable for any damages resulting from any use of the following information. Use at your own risk.
The overclocking of the CPU is a known thing - there are success stories of an overclocking of 300 MHz Celerons to 450 MHz on the net, there are Web pages dealing exclusively with the overclocking and the manufacturers try more or less succesfully to do something against this fact. But your CPU is not the only processor in your computer and fiddling with your motherboard's jumpers or setup is not the only possibility to speed up your hardware one more notch.
A modern graphics card is also a computer. It has a processor (sometimes even more than one), operating memory, an interface for commands and responses. When you tell the graphics card "move this rectangle 20 pixels further", your CPU never sees the image data - the copy operation will be done on the graphics card using its own processor.
There is a clock chip on the graphics card that control the image timing (number of pixels in the line, horizontal and vertical refresh rates), but also the timing of the graphics processor itself. The maximum frequency of the graphics processor is dependent on the characteristics of the video memory (similar dependency exists between the main memory and the maximal clock frequency of the CPU on the motherboard).
The manufacturers of the graphics cards often use very pesimistics settings to ensure the functionality even in the case slower memories are used. The processor itself also has some reserves. With a bit of luck it is possible to use these reserves and visibly speed the operations such as "move the window".
The following scenario is functional at least for S3-based chips, controlled by the XF86_S3 X server. It is very probable that it is useful for a broader range of graphics cards, but I had no possibility to test them.
Firstly we find the presently used clock frequency. It can be found in the X server log message, which can normally be read from the screen when starting via startx, or in e.g. /var/log/xdm-error.log X server log file when starting automatically. An example:
(--) S3: Using Trio32/64 programmable clock (MCLK 51.009 MHz)
The number of our interest is in this case 51 MHz. We find the Device section in our XF86Config file (normally located in /etc/X11 or /usr/lib/X11 directory) and insert a set_mclk command there:
Section "Device" Identifier "My Video Card" VendorName "Unknown" BoardName "Unknown" set_mclk 51 Option "power_saver" EndSection
The next step is to carefully tune the set_mclk value higher. After each change we restart the server and try to use some graphically intensive application, quickly move the windows, mouse, several graphics modes and generally everything that we can. If we "overshoot" the set_mclk value, there will be some image distortions - the windows or mouse leave traces behind etc. We then select a value that is at least 5-10 MHz lower than the biggest value without such distortions.
In am able to run my S3 Trio64V+ at the 80 MHz for more than a year. The performance comparison using a x11perf tool shows at least 50% speed increase of the accelerated operations. Some operations are even faster than the clock change suggests - there is probably something that can be either finished before some event, or must wait.
A good monitor is not cheap. Many of the users find out that their graphics card is unable to "feed" their new monitor. The same happened to me - the 19-inch Philips Brilliance happily accepts 1600x1200 at 75 Hz or 1280x1024 at 85 Hz, but ... the card has 135 MHz RAMDAC and its maximums are somwhere at 1280x1024 @ 75 Hz.
Fortunately the basic Unix rule - don't try to be smarter than a user - comes into effect also in the XFree server. If the user thinks he knows what he is doing, don't try to prevent him to do it. It is possible to insert your opinion on the maximal RAMDAC speed in the abovementioned Device section using the DACSpeed line:
Section "Device" Identifier "My Video Card" VendorName "Unknown" BoardName "Unknown" set_mclk 80 DACSpeed 225 Option "power_saver" EndSection
The server then allows to define also the modes that need higher frequency. I use following mode line with the above setting:
# 1440x1080 (100x100 dpi, 4:3) @ 79 Hz, 90.2 kHz hsync Modeline "1440x1080" 170 1440 1464 1664 1894 1080 1083 1088 1136
The gotcha is that while set_mclk warns you with small visible image distortions that he has gone too far, there is no such clue when you overshoot the DACSpeed - the chip merely runs a bit hotter and the image can be a bit less sharp. The right attitude here is "if I fry it, I wanted to buy a new card anyway" :-)
Bratislava, 14. 5. 1999Stanislav Meduna
stano (AT) meduna.org