Saturday, August 11, 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.

3 lewsers:

lotso said...

Dude.. may I ask what laptop you're using since your laptop's resolution is _way_ bigger than mine.. and Mine is already 1400x1050 huge..

BTW, I use a modeline for my external Acer 22in Widescreen LCD on my Radeon 9000 running on dual head as independent desktops.

Yoon Kit said...

Im using a 2 year old (already!!) Compaq Presario x1407 (x1000 series). It comes with a nice widescreen which I really like. Unfortunately the laptop itself is big, but its a tradeoff innit?

can u send me your xorg.conf for me to inspect? are you using flgx or the open drivers?

yk.

chfl4gs_ said...

As I recalled, you only need to do "gtf 1680 1050 60" to get your modeline.