Ubuntu 10.04 Fixing the Monitor Resolution with xrandr
My laptop is running Ubuntu 10.04 and I have an LCD monitor connected to it. I recently changed the LCD monitor from NEC to Samsung. When I booted up Ubuntu, the LCD monitor was stuck at the 1024 x 768 resolution and the optimal resolution 1280 x 1024 was not provided as an option. I didn’t have this problem with the previous NEC LCD monitor which Ubuntu detected automatically and displayed the correct resolution.
I tried to change the monitor resolution with System> Administration> Multiple Screens and also with System> Preferences> Monitors but neither worked. I could not get the monitor to display the correct resolution.
I found an article at ubuntugeek about how to add a monitor resolution with xrandr.
1. Go to Applications> Accessories> Terminal and type
2. You will get an output of the display(s) connected to your computer and the supported resolutions.
LVDS1 is the laptop screen and VGA1 is the LCD monitor. Under VGA1, there is no entry for the 1280×1024 resolution. So I have to retrieve the settings for the 1280×1024 resolution and add it to the list.
2. To get the settings for the 1280×1024 resolution, type the following at the terminal window
cvt 1280 1024
You’ll get the following output.
Highlight and copy everything after Modeline. (Unfortunately ctrl-c does not work so you have to right-click and select Copy.)
3. Then type
xrandr --newmode "1280x1024_60.00" 109.00 1280 1368 1496 1712 1024 1027 1034 1063 -hsync +vsync
^ You are pasting here what you copied in step 2. Remember to right-click and select Paste.
xrandr --addmode VGA1 1280x1024_60.00
xrandr --output VGA1 --mode 1280x1024_60.00
The LCD monitor should now be set to the correct resolution.
4. Unfortunately, the monitor settings only apply to the current session. If you reboot, the setting will be lost. To make them permanent, type
gksudo gedit /etc/gdm/Init/Default
and type the following and save.
xrandr –newmode “1280x1024_60.00″ 109.00 1280 1368 1496 1712 1024 1027 1034 1063 -hsync +vsync
xrandr –addmode VGA1 1280x1024_60.00
xrandr –output VGA1 –mode 1280x1024_60.00
It worked for me I hope it works for you. The original information was from a post on ubuntuforums.org.