Get rid of a graphics problem in Ubuntu on Thinkpad A21P

Update 2:

David Rees has filed a bug report of this issue: (see his comment further down).


I have updated this guide for Ubuntu 11.10 Oneiric Ocelot. These updates are marked with Ubuntu 11.10 where they occur.

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

In Ubuntu 11.10 it’s lightdm:

sudo service lightdm stop

Then generate the Xorg configuration file like this:

Xorg -configure

In Ubuntu 11.10 we get errors if we do not run with sudo:

sudo Xorg -configure

This generates a file called 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

In Ubuntu 11.10 we get errors if we do not run with sudo:

sudo Xorg -config

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 /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.

20 thoughts on “Get rid of a graphics problem in Ubuntu on Thinkpad A21P

  1. 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.

  2. 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”

    Section “Monitor”
    Identifier “Configured Monitor”

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

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

  3. 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.

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

  5. Thanks! That also works with opensuse 11.3!

    You need to insert the lines in the file /etc/X11/xorg.conf.d/50-monitor.conf

  6. Hi I just read this post it seems to be the right problem, but Im not a really big Linux guy so I was wondering if you can make like a video of your explanation. Because the info is a little hard to comprehend for me

  7. Thanks a ton. Totally fixed the problem. I remember I had to do this back in the day when Intrepid was brand new, but I had to dig two or three Google pages down to find a solution. Your site is the first hit and lays everything out really well. Woohoo!

  8. Hi everyone. Sorry for the late responses…

    @MattPatt I’m not really a video making guy :) If you still have this problem, you might want to ask a friend who’s more used to configuring Linux to help you.

    @Robert: Great!

    @David Rees: Thanks for the info, I’ll add it to the post!

  9. Worked great for me with Xubuntu 11.10 as well. Some tweaks:
    I used “sudo init 1” to shutdown the window manager and X.
    I had two Monitor sections (Monitor0 and Monitor1), I added the lines in the first one.
    I also only needed the HorizSync, VertRefresh and the 1600×1200 Modelines.
    I copied the file as described, then rebooted to get everything working.

Leave a Reply

Your email address will not be published. Required fields are marked *