11 August 2007

Making X fast(er)

I always wondered about my sluggish OpenGL performance. I just attributed it to the poor support of my ATI Radeon Mobility 9200 in Linux. Im still using the "radeon" Open source drivers and not the fglrx binaries from ATI.

One "random" thread suggested to add a ModeLine entry in /etc/X11/xorg.conf file. So I tried. I generated my ModeLine entry using this online calculator: "The XFree86 Modeline Generator: create the mode thats just right for you!"

In the Basic Configuration, I just entered in the resolution of my Laptop LCD, which is "1680x1050" and put in the refresh rate of 60Hz.
Click on "Calculate Modeline", and this will be generated:
So in /etc/X11/xorg.conf, update the "Monitor" section as such:

Section "Monitor"
Identifier "Laptop Monitor"
Option "DPMS"
# 070809 yky - added modeline:
# http://xtiming.sourceforge.net/cgi-bin/xtiming.pl
Modeline "1680x1050@60" 154.20 1680 1712 2296 2328 1050 1071 1081 1103
EndSection

You dont need to reboot your computer. You just need to restart X by pressing Ctrl-Alt-Backspace. When you've logged in, you may find X performing better. For example, the tilda application used to be quite jerky as it revealed itself. Now its smooth.

Additionally glxgears used to be a paltry 200-400FPS. Now its an OKay 2000-3000FPS. BZFlag also is now actually playable!

So if you think your X is underperforming, put a ModeLine in and see if theres any difference. Now to figure out why my laptop can't do dual-head/output video.

yk.