xorg.conf for IBM ThinkPad 1171 iseries

I’ve been setting up an old IBM laptop for my brother write papers and play freeCiv on. The Windows XP installation that was previously on the laptop had no problem displaying 1024×768 @ 60Hz, (and didn’t do much else, but that’s not what this article is about.) Once I installed Ubuntu the laptop would only display a small box at 800×600.

I spent a lot of time searching on Google for the magic line that would make the X server recognize this laptop monitor. There were a few other people on the internet that had posted questions about this, but there was either no answer or even more frustrating they had posted to their own questions “I figured it out” without any explanation. I knew it was possible, but I was just going to have to figure it out on my own. I had learned a few things during my search and this is how I finally got it working:

The first thing I did was back up my original xorg.conf by dropping into the terminal and typing this:

sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf_backup

Then I used gtf to generate a the code needed to tell X server to use 1024×768 resolution with a refresh rate of 60Hz:

gtf 1024 768 60

This gave me the code:

# 1024x768 @ 60.00 Hz (GTF) hsync: 47.70 kHz; pclk: 64.11 MHz
  Modeline "1024x768_60.00"  64.11  1024 1080 1184 1344  768 769 772 795  -HSync +Vsync

which I pasted into my /etc/X11/xorg.conf under the “Monitor” section

Under the “Monitor” section I also pasted

 Option "PreferredMode" "1024x768_60"

I checked the log file in /var/log/Xorg.0.log and among the other information was the error “hsync out of range”. What I also noticed was that it was unable to determine the monitor type and was using defaults for the monitor hsync and vrefresh values.

The solution was to hard code hsync and vrefresh values that were outside the default range but that didn’t break X server and allowed for 1024×768 resolution. I did brake X server a few times trying to get the values right, but was finally able to boot into 1024×768 full screen.

Below is the xorg.conf that worked for me with the IBM ThinkPad iseries 1171

Section "ServerLayout"
	Identifier     "X.org Configured"
	Screen      0  "Screen0" 0 0
	InputDevice    "Mouse0" "CorePointer"
	InputDevice    "Keyboard0" "CoreKeyboard"

Section "Files"
	ModulePath   "/usr/lib/xorg/modules"
	FontPath     "/usr/share/fonts/X11/misc"
	#FontPath     "/usr/share/fonts/X11/cyrillic"
	FontPath     "/usr/share/fonts/X11/100dpi/:unscaled"
	FontPath     "/usr/share/fonts/X11/75dpi/:unscaled"
	FontPath     "/usr/share/fonts/X11/Type1"
	FontPath     "/usr/share/fonts/X11/100dpi"
	FontPath     "/usr/share/fonts/X11/75dpi"
	FontPath     "/var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType"

Section "Module"
	Load  "glx"
	Load  "record"
	Load  "dri2"
	Load  "dri"
	Load  "extmod"
	Load  "dbe"

Section "InputDevice"
	Identifier  "Keyboard0"
	Driver      "kbd"

Section "InputDevice"
	Identifier  "Mouse0"
	Driver      "mouse"
	Option	    "Protocol" "auto"
	Option	    "Device" "/dev/input/mice"
	Option	    "ZAxisMapping" "4 5 6 7"

Section "Monitor"
	Identifier   "Monitor0"
	VendorName   "Monitor Vendor"
	ModelName    "Monitor Model"
	Horizsync 47-48
	Vertrefresh 60
	# 1024x768 @ 60.00 Hz (GTF) hsync: 47.70 kHz; pclk: 64.11 MHz
	Modeline "1024x768_60"  64.11  1024 1080 1184 1344  768 769 772 795  +HSync +Vsync
	Option "PreferredMode" "1024x768_60"

Section "Device"
        ### Available Driver options are:-
        ### Values: : integer, : float, : "True"/"False",
        ### : "String", : " Hz/kHz/MHz"
        ### [arg]: arg optional
        #Option     "AccelMethod"        	# []
        #Option     "SWcursor"           	# []
        #Option     "PciRetry"           	# []
        #Option     "NoAccel"            	# []
        #Option     "SetMClk"            	#
        #Option     "MUXThreshold"       	# 
        #Option     "ShadowFB"           	# []
        #Option     "Rotate"             	# []
        #Option     "VideoKey"           	# 
        #Option     "NoMMIO"             	# []
        #Option     "NoPciBurst"         	# []
        #Option     "MMIOonly"           	# []
        #Option     "CyberShadow"        	# []
        #Option     "CyberStretch"       	# []
        #Option     "XvHsync"            	# 
        #Option     "XvVsync"            	# 
        #Option     "XvBskew"            	# 
        #Option     "XvRskew"            	# 
        #Option     "FpDelay"            	# 
        #Option     "Display1400"        	# []
        #Option     "Display"            	# []
        #Option     "GammaBrightness"    	# []
        #Option     "TVChipset"          	# []
        #Option     "TVSignal"           	# 
	Identifier  "Card0"
	Driver      "trident"
	VendorName  "Trident Microsystems"
	BoardName   "CyberBlade/i1"
	BusID       "PCI:1:0:0"
	Option      "CacheLines" "768"

Section "Screen"
	Identifier "Screen0"
	Device     "Card0"
	Monitor    "Monitor0"
	SubSection "Display"
		Viewport   0 0
		Depth     1
		Modes "1024x768_60"
	SubSection "Display"
		Viewport   0 0
		Depth     16
		Modes "1024x768_60"