Ubuntu 12.10 xrandr can't add undetected monitor resolution

Asked by Patryk Kwaśniewski

I've just installed Ubuntu 12.10, and after booting new system I saw screen flickering and wrong screen resolution. I have nVidia GTX 670 video card and Fujitsu Siemens L22W-9 monitor. This monitor have only VGA input, and video card have only DVI and HDMI outputs, so I connected monitor to video card through DVI/VGA converter that was in box with video card. To get rid off screen flickering I've installed nVivia proprietary video drivers through System Settings -> Software Sources -> Additional Drivers. That helped, and only thing left was wrong resolution. But system doesn't find monitor native resolution 1680x1050. I've tried to add new resolution using this wiki:
https://wiki.ubuntu.com/X/Config/Resolution#Adding_undetected_resolutions

First, output from xrandr:
packie@packie-desktop:~$ xrandr
Screen 0: minimum 8 x 8, current 1024 x 768, maximum 16384 x 16384
DVI-I-0 connected 1024x768+0+0 (normal left inverted right x axis y axis) 0mm x 0mm
   1024x768 60.0*+
   1360x768 60.0 59.8
   1152x864 60.0
   800x600 72.2 60.3 56.2
   680x384 119.9 119.6
   640x480 59.9
   512x384 120.0
   400x300 144.4
   320x240 120.1
DVI-I-1 disconnected (normal left inverted right x axis y axis)
HDMI-0 disconnected (normal left inverted right x axis y axis)
DP-0 disconnected (normal left inverted right x axis y axis)
DVI-D-0 disconnected (normal left inverted right x axis y axis)
DP-1 disconnected (normal left inverted right x axis y axis)

Next I generated new mode using cvt utility:
packie@packie-desktop:~$ cvt 1680 1050
# 1680x1050 59.95 Hz (CVT 1.76MA) hsync: 65.29 kHz; pclk: 146.25 MHz
Modeline "1680x1050_60.00" 146.25 1680 1784 1960 2240 1050 1053 1059 1089 -hsync +vsync

Next I added new mode:
packie@packie-desktop:~$ xrandr --newmode "1680x1050_60.00" 146.25 1680 1784 1960 2240 1050 1053 1059 1089 -hsync +vsync

Next I checked if mode was added:
packie@packie-desktop:~$ xrandr
Screen 0: minimum 8 x 8, current 1024 x 768, maximum 16384 x 16384
DVI-I-0 connected 1024x768+0+0 (normal left inverted right x axis y axis) 0mm x 0mm
   1024x768 60.0*+
   1360x768 60.0 59.8
   1152x864 60.0
   800x600 72.2 60.3 56.2
   680x384 119.9 119.6
   640x480 59.9
   512x384 120.0
   400x300 144.4
   320x240 120.1
DVI-I-1 disconnected (normal left inverted right x axis y axis)
HDMI-0 disconnected (normal left inverted right x axis y axis)
DP-0 disconnected (normal left inverted right x axis y axis)
DVI-D-0 disconnected (normal left inverted right x axis y axis)
DP-1 disconnected (normal left inverted right x axis y axis)
  1680x1050_60.00 (0x360) 146.2MHz
        h: width 1680 start 1784 end 1960 total 2240 skew 0 clock 65.3KHz
        v: height 1050 start 1053 end 1059 total 1089 clock 60.0Hz

But when I try to add new mode to output, I get an error:
packie@packie-desktop:~$ xrandr --addmode DVI-I-0 1680x1050_60.00
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: 39
  Current serial number in output stream: 40

I've tried to find solution for this problem in web, but I didn't find anything useful. I know my video card is compatible with monitor native screen resolution, because under Windows I can set 1680x1050 resolution. I have no idea what I am doing wrong.

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu xrandr Edit question
Assignee:
No assignee Edit question
Solved by:
actionparsnip
Solved:
Last query:
Last reply:
Revision history for this message
Best actionparsnip (andrew-woodhead666) said :
#1

If you run:

sudo nvidia-xconfig; gksudo nvidia-settings

Set the resolution and refresh rate to something and click 'save to x config file'. Then run:

gksudo gedit /etc/X11/xorg.conf

Change the resolution line in the file to what you expect, save the new file, close gedit and run:

killall -u $USER

(after saving all current work).

Revision history for this message
Patryk Kwaśniewski (patryk-kwasniewski11) said :
#2

I used this commands , and changed sections in xorg.conf:

Monitor - added modeline generated by cvt utility:
Modeline "1680x1050_60" 146.25 1680 1784 1960 2240 1050 1053 1059 1089 -hsync +vsync

Screen - changed selected mode to new one:
Option "metamodes" "1680x1050_60 +0+0; nvidia-auto-select +0+0"

Now everything runs smooth, sharp and beautiful. Thanks for your help.

Revision history for this message
Patryk Kwaśniewski (patryk-kwasniewski11) said :
#3

Thanks actionparsnip, that solved my question.

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#4

Your monitor isn't reporting itself correctly (or Ubuntu isn't detecting it properly, probably the former), so you need to go old school and tell the OS what to use.

I suggest you backup the xorg.conf file. If you need to reinstall you can simply install the proprietary video driver, copy in the xorg.conf and reboot :)

Revision history for this message
tomo (tomoedinburgh) said :
#5

Patryk, I have exactly the same "error" description using xrandr on Ubuntu 12.10 and with nvidia graphics.
You write that you solved it by, correct me if Im wrong, opening X11 file and in Section Monitor,
you added the Modeline you want, and in Screen section, you replaced the old resolution figures
with the ones you want "1680x..." leaving "meta..." and "nvidia" as they were originally. You did not change anything
else at all, correct? and then went to "killall..." command, correct?

I presumed the above and typed in the resolution figures I want and did "killall..." the computer immediately restarted,
and ... nothing changed. I went back to X11 and I found the change I made were there. It has simply had no effect.

I just want to confirm that I did what YOU did. Would be great if you could just do that. thanks.

Revision history for this message
tomo (tomoedinburgh) said :
#6

Hi actionparsnip

Solving this problem the way you suggested does seem neater and quicker than cumbersome xrandr way.
however, I still have not got it.

I opened the nvidia x server settings and in there found "X server display configuration". Now
in there I found Resolustion roll down. There, I only found "auto" and "1440x900" which is the
default mode and which I was trying to move away from. Does this mean Im stuck with this mode?

xrandr does say my computer's max resolution is 4094x4094. So I have tried to create new modes
using xrandr but was stuck exactly the same way as Patryk. Do you know how to do it with xrandr
or any other way?

If you have any suggestion, I would greatly appreciate it, thanks. tomo

Revision history for this message
tomo (tomoedinburgh) said :
#7

P.S. actionparsnip, you wrote to Patryk that his pc was not giving him the correct information.
Are you referring to his getting

"Error of failed request: BadMatch (invalid parameter attributes)...

This is exactly what I have got. Is this message to do with the numbes, or modeline, I got from xrandr
after 1440x900 (or whatever) like 934 869 (or whatever). How would I find out these numbers are correct or not?
And what is the old school way to tell the OS what to do?