Get rid of a graphics problem in Ubuntu on Thinkpad A21P

March 23, 2009
Tags: , ,

I wanted to see if an old IBM Thinkpad A21P could be put to use and installed Ubuntu (9.10) on it. The installation went well, but when X started and displayed the login screen, the graphics were messed up.

Some googling finally solved this, but since I had to collect information from several sources, I thought I should sum it up in one post.

The problem is a known bug, and there even is a fix for the problem in the bug report, provided by Longwing. Add these lines to your xorg.conf file in the appropriate place (the Monitor section):

HorizSync 31-77
VertRefresh 50-77
 
Modeline "640x480" 27.96 640 656 720 864 480 480 485 501
Modeline "800x600" 43.68 800 816 928 1072 600 600 606 626
Modeline "1024x768" 71.39 1024 1040 1216 1400 768 768 776 802
Modeline "1152x864" 90.48 1152 1168 1384 1568 864 864 873 902
Modeline "1280x960" 111.82 1280 1296 1552 1736 960 960 970 1003
Modeline "1280x1024" 119.28 1280 1296 1552 1736 1024 1024 1035 1070
Modeline "1600x1200" 160.16 1600 1616 1968 2208 1200 1200 1212 1253
Modeline "1600x1200" 167.23 1600 1616 1968 2208 1200 1200 1212 1253

This is all very well if you know how to do that. I haven’t been editing the X configuration files for a while, so I actually had to look it up.

First off, we need an xorg.conf file. It’s probably located in /etc/X11, if it exists. It didn’t on my computer, but as I found out, it can be generated. In order to do that, X has to be shut down. Switch to a virtual console by pressing Alt+F1. Log in and stop gdm (the GNOME Display Manager, it manages the X displays) like this:

sudo /etc/init.d/gdm stop

Then generate the Xorg configuration file like this:

Xorg -configure

This generates a file called xorg.conf.new. Open it in your favourite text editor and add the configuration lines from above to the Monitor section. Save it and then try it out with:

Xorg -config xorg.conf.new

This will present a running X session, but it will probably not show anything interesting. We only need to check that the graphics problem is gone. You can easily exit the session by pressing Ctrl+Alt+Backspace. X should run nice now, but you need to make this change permanent by copying the configuration file to the correct place:

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

Now just start gdm again and everything should be fine:

sudo /etc/init.d/gdm start

Hopefully this can help someone :)

Edit: added some clarification.

  • Share/Bookmark

9 Responses to “Get rid of a graphics problem in Ubuntu on Thinkpad A21P”

  1. Thanks much! This worked for me, too.

  2. Great!

  3. You Rock. Thanks.

    Love my old a21p.

  4. Yes, it’s cool that it still holds up.

  5. I am trying to copy this but up to now with little success. Able to stop the gmd from a terminal window. I obtain a fatal server error, once in single user mode:
    Cannot move old log file (“/var/log/Xorg.0.log” to “/var/log/Xorg.O.log.old”

    To see whether the problem was connected to not being able to create the .old file, I renamed it, but problem persisted. Any ideas how to solve this wil be warmly appreciated.

  6. Hi Gaston,

    I found this post that seems to deal with your problem: http://vijayk.blogspot.com/2006/08/xorg-startx-problem.html

    If you try that, are you able to get any further?

  7. Thanks but, being brand new to Linux, I don’t know what “the appropriate place” is. It has been very difficult getting the screen to show up clearly at all. Now I would like to get it into 1600×1200 mode.

    My Xorg.conf file on my A21p contains:
    Section “Device”
    Identifier “Configured Video Device”
    Driver “vesa”
    EndSection

    Section “Monitor”
    Identifier “Configured Monitor”
    EndSection

    Section “Screen”
    Identifier “Default Screen”
    Monitor “Configured Monitor”
    Device “Configured Video Device”
    EndSection

    Once I understand where to put the information above, I will be able to get through the startx problem.
    Thanks.

  8. Hi Fred!

    I actually mentioned where to put it a bit down in my post, but I’ve updated the text you’re referring to, to avoid confusion.

    You should add the information to the Monitor section, before “EndSection”. Try that and see if it works!

    Please come back if you have any further questions.

  9. Peter Jaric,
    Thanks for your great explanations, you gave a newlife to our old laptop.
    It’s good to meet people sharing,
    Ghislain & Manu

Leave a Reply