Use apt-get install xmodelines

usage is:
xmodelines -x 1280 -y 1024 -r 70

to generate a modeline or online:

http://xtiming.sourceforge.net/cgi-bin/xtiming.pl

Use the timing line in your xorg.conf file.

Make a backup of your old xorg.conf and comment out unwanted entries