59

I am new to Ubuntu. I have installed Ubuntu 12.04 and am stuck trying to set up the correct resolution for my LCD display.

The native resolution for the LCD is 1920x1080

here is the output from xrandr:

$ xrandr
Screen 0: minimum 320 x 200, current 1280 x 720, maximum 4096 x 4096
LVDS1 connected 1280x720+0+0 (normal left inverted right x axis y axis) 0mm x 0mm
1280x720 60.0*+
800x600 60.3 56.2 
640x480 59.9
VGA1 disconnected (normal left inverted right x axis y axis)

Then I create new modeline:

$ cvt 1920 1080 60
1920x1080 59.96 Hz (CVT 2.07M9) hsync: 67.16 kHz; pclk: 173.00 MHz
Modeline "1920x1080_60.00" 173.00 1920 2048 2248 2576 1080 1083 1088 1120 -hsync +vsync

So far so good. Then I create new mode using xrandr:

$ xrandr --newmode "1920x1080_60.00" 173.00 1920 2048 2248 2576 1080 1083 1088 1120 -hsync +vsync

But for some reason that new mode was created for VGA (VGA1) output instead of LCD output (LVDS1):

$ xrandr
Screen 0: minimum 320 x 200, current 1280 x 720, maximum 4096 x 4096
LVDS1 connected 1280x720+0+0 (normal left inverted right x axis y axis) 0mm x 0mm
1280x720 60.0*+
800x600 60.3 56.2 
640x480 59.9 
VGA1 disconnected (normal left inverted right x axis y axis)
1920x1080_60.00 (0xbc) 173.0MHz <---------- ????!!!!!!
h: width 1920 start 2048 end 2248 total 2576 skew 0 clock 67.2KHz
v: height 1080 start 1083 end 1088 total 1120 clock 60.0Hz

So, if I try to add mode to LVDS1, I get an error:

$ xrandr --addmode LVDS1 "1920x1080_60.00"
X Error of failed request: BadMatch (invalid parameter attributes)
Major opcode of failed request: 149 (RANDR)
Minor opcode of failed request: 18 (RRAddOutputMode)
Serial number of failed request: 25
Current serial number in output stream: 26

Adding that new mode to VGA1 works fine, but I don't use that VGA1 output.

2
  • Having similar trouble with my laptop. Can't seem to get my resolution to 1440x900 like it's supposed to be.
    – romandas
    Commented Jun 17, 2012 at 17:21
  • Did any of these answers work for you? If so, please select one as the answer. Thanks!
    – Tass
    Commented Nov 19, 2013 at 16:00

2 Answers 2

85

You can add missing resolutions to Ubuntu 12.04 using xrandr.

First, use cvt to create a new resolution mode.

sudo cvt 1920 1080 60

Part of the output should be similar to this: "Modeline "1920x1080_60.00" 173.00 1920 2048 2248 2576 1080 1083 1088 1120 -hsync +vsync" (w/o the quotes).

Next, declare a new resolution mode.

sudo xrandr --newmode "1920x1080_60.00" 173.00 1920 2048 2248 2576 1080 1083 1088 1120 -hsync +vsync

Next, find out the name of your video device.

sudo xrandr -q

Mine was named "Virtual1" (running a virtual machine). Once you know the name of your device, you can, finally, add your new resolution mode to the device/system.

sudo xrandr --addmode Virtual1 1920x1080_60.00

See more information in the "Adding undetected resolutions" section here: https://wiki.ubuntu.com/X/Config/Resolution/#Adding_undetected_resolutions

6
  • 14
    getting error on --admode X Error of failed request: BadMatch (invalid parameter attributes) Major opcode of failed request: 141 (RANDR) Minor opcode of failed request: 18 (RRAddOutputMode) Serial number of failed request: 39 Current serial number in output stream: 40
    – lenzai
    Commented Dec 3, 2013 at 4:27
  • I tested this on Ubuntu 13.10 with my Acer x233H and it works, but as soon as I reboot, I get the message "Could not apply stored configuration for monitors" and the higher resolution option is not available anymore. Is there a way to make the change permanent?
    – stragu
    Commented Feb 12, 2014 at 13:35
  • I also got a BadMatch error 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: 41 Current serial number in output stream: 42 Commented Mar 8, 2014 at 18:56
  • Use "xrandr -q" to find out the mode. In my case it was HDMI1
    – nizam.sp
    Commented Jun 26, 2016 at 9:12
  • 1
    Add last 2 commands at the end of the ~/.profile file so the settings are saved after restart
    – Barmaley
    Commented Aug 1, 2018 at 1:27
17

This link helped me.

In short: run xrandr and cvt like you did, then create the following file:

/usr/share/X11/xorg.conf.d/10-monitor.conf

In the file change the parameters in < > according to your specs:

Section "Monitor"
  Identifier "Monitor0"
  <INSERT MODELINE HERE>
EndSection
Section "Screen"
  Identifier "Screen0"
  Device "<INSERT DEVICE HERE>"
  Monitor "Monitor0"
  DefaultDepth 24
  SubSection "Display"
    Depth 24
    Modes "<INSERT MODENAME HERE>"
  EndSubSection
EndSection
3
  • This is the only working solution for me so far...
    – styu
    Commented May 19, 2013 at 7:59
  • does "MODENAME" = "1920x1080_60.00" ?
    – Beebee
    Commented Jun 12, 2017 at 10:34
  • Doesn't work for Ubuntu 16.04. I guess everything depends on the video card. If it doesn't support the needed resolution, it won't work.
    – Footniko
    Commented Jun 11, 2019 at 8:15

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .