Tuesday, July 14, 2009

Manually set screen resolution in Linux

With most modern Linux distributions, graphics support is pretty good. That being said, I recently configured a Linux workstation running Ubuntu 9.04 that has an old graphics card and a crappy graphics driver. I was unable to get desktop effects to work and had to set my desired screen resolution manually. This is not as difficult as it may sound. First, make a backup of the X.org configuration file:
sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf.orig
Now, open the file. Find the section called "Screen". It should look something like this:
Section "Screen"
Identifier "Default Screen"
Monitor "Standard skjerm"
Device "Configured Video Device"
DefaultDepth 24
EndSection
You need to add a subsection which contains the desired screen resolution. It should look something like this when you're done:
Section "Screen"
Identifier "Default Screen"
Monitor "Standard skjerm"
Device "Configured Video Device"
DefaultDepth 24
SubSection "Display"
Modes "1280x1024"
EndSubSection
EndSection
Make sure you specify the resolution you actually want where is says "1280x1024". You will need to restart X in order for the changes to take effect. You can restart it by logging out and back in.

No comments:

Post a Comment