Changing Monitors in Ubuntu

How to reconfigure the resolution of a new monitor

My monitor died... a sudden death without warning. Fortunately, I had a spare monitor lying around, although it was an old one with lower lower resolutions, etc. Turning the computer off and switching monitors was easy, but when I reached the login screen, it was the wrong resolution. Interestingly enough, my normal desktop resolution was fine.

I have had this problem when switching monitors previously, although a fresh install was due anyway, so I never found a solution. This time, however, it was a already a clean install, so I needed to fix it.

I don't know how much this applies to other distros, but in Ubuntu Ibex the /etc/X11/xorg.conf file is not solely responsible for resolution settings like it once was, so editing this had no effect. After a bit of research, I learned about the xrandr command.

Typing the command xrandr listed attached devices and available resolutions. Take note of the VGA, LVDS, etc. part, which tells you which output device (monitor) you are referring to.

Next, I tested my new settings by typing the command xandr --output VGA --mode 1024x768 which instantly changed the resolution. Perfect! Now all that needed to be done was to place the command in the appropriate place, namely the /etc/gdm/Init/Default file, which is executed when the login manager is initialised.

As a final test, I logged off to see the login screen in the correct resolution. A dirty fix, but it works like a charm!

Posted by Christopher Wassall on Thu, 04 Dec 2008 07:20:51 GMT

Comments

There are no comments yet.

Post a Comment

You must be logged in to post a comment