I am not able to set my screen size at 1280 x 1024. When I go to the display settings only the following two screen sizes are available:

1024 x 768

800 x 600

I am using HP LP1965 LCD Display Screen.


You could add a new mode using xrandr and use that.

Type xrandr. This shows you the names of different outputs available on your system (LVDS, VGA-0, etc) and resolutions available on each.

xrandr --newmode "1280x1024_60.00"  109.00  1280 1368 1496 1712  1024 1027 1034 1063 -hsync +vsync
xrandr --addmode LVDS1 1280x1024_60.00
xrandr --output LVDS1 --mode 1280x1024_60.00

Note: Replace LVDS1 by whatever you get in xrandr output.

You would have to edit the /etc/gdm/Init/Default file to make this permanent.

Add the above commands after


Source: Ubuntu Geek

In 12.04 instead of editing GDM config files you edit the lightdm configuration:

sudo nano /etc/lightdm/lightdm.conf

and add the following line to the end of the file:


Now you create the new referenced file:

sudo nano /etc/lightdm/lightdmxrandr.sh

Paste the bash header in the first line:


And your custom xrandr configuration from above below that.

At last make the script executable

sudo chmod a+x /etc/lightdm/lightdmxrandr.sh
| improve this answer | |
  • 12.04 uses lightdm – LiveWireBT Aug 11 '12 at 0:24

Your Ubuntu display driver (nVidia in my case) was unable to read DDC monitor configuration data across the VGA, HDMI or DVI connector.

This can happen if you have a KVM and it was switched away from your Ubuntu PC when it was booted as in my case.

Ubuntu defaults to thinking you're running a CRT with 1024x768 resolution.

The solution is to just simply reboot your Ubuntu with the monitor directly connected to your display adapter.

It may be possible that you have a defective VGA cable where one of the leads carrying DDC data is broken too - try a different cable.

| improve this answer | |
  • Modern KVM switches should store the DCC data and send it to every connected, though good thought that might be a possible cause. Best way to deal with defective VGA cables ist to replace them with DVI, HDMI or DisplayPort cables. :) – LiveWireBT Aug 11 '12 at 8:18

You should be able to change the resolution using XRANDR command from the terminal. To set it up to change the resolution to what you selected every time you restart your computer, you can set up a Shell script.

Check out my post for more information and links on XRANDR

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.