Ubuntu – Can’t get native resolution


I am running Ubuntu 12.10 on HP Pavilion Slimline with Nvidia GT220 video card and Nvidia driver 310.14. I have Samsung LCD connected through HDMI, native resolution of this TV is 1366×768, but the only options I am getting in settings are 1920×1080, 1280×720, 720×480 and 640×480. I'd like to run in native resolution, so how can add it to the list of available options? I tried to use xrandr, but not sure what are correct values to enter or whether it's the right way to go.


After running cvt 1366 768 60 I got the following:

# 1368x768 59.88 Hz (CVT) hsync: 47.79 kHz; pclk: 85.25 MHz
Modeline "1368x768_60.00"   85.25  1368 1440 1576 1784  768 771 781 798 -hsync +vsync

Then running xrandr I have

Screen 0: minimum 8 x 8, current 1280 x 720, maximum 8192 x 8192
DVI-I-0 disconnected (normal left inverted right x axis y axis)
VGA-0 disconnected (normal left inverted right x axis y axis)
DVI-I-1 disconnected (normal left inverted right x axis y axis)
HDMI-0 connected 1280x720+0+0 (normal left inverted right x axis y axis) 160mm x 90mm
   1280x720       60.0*+   59.9  
   1920x1080      30.0     30.0  
   720x480        59.9  
   640x480        59.9  
  1368x768_60.00 (0x2aa)   85.2MHz
        h: width  1368 start 1440 end 1576 total 1784 skew    0 clock   47.8KHz
        v: height  768 start  771 end  781 total  798           clock   59.9Hz

However, when running xrandr –addmode HDMI-0 1368x768_60.00, I get:

X Error of failed request:  BadMatch (invalid parameter attributes)
  Major opcode of failed request:  140 (RANDR)
  Minor opcode of failed request:  18 (RRAddOutputMode)
  Serial number of failed request:  29
  Current serial number in output stream:  30

Best Answer

See here for the wiki.ubuntu.com entry on xrandr and how to use it. Basically run xrandr from the terminal and copy the output to create a .xprofile file in your home directory - my .xprofile reads as follows (I have a 1680x1050 monitor connected on VGA1):

xrandr --output VGA-1 --mode 1680x1050

Make the .xprofile file executable then log out and back in again.