You are not logged in.

#1 2019-02-12 02:44:36

Registered: 2017-10-16
Posts: 6

Can't force video mode (xrandr invalid parameter attributes)

    ]cvt 2048 1536 85 
    # 2048x1536 84.94 Hz (CVT 3.15M3) hsync: 137.18 kHz; pclk: 388.50 MHz
    Modeline "2048x1536_85.00"  388.50  2048 2216 2440 2832  1536 1539 1543 1615 -hsync +vsync
    ]xrandr --newmode "2048x1536_85.00"  388.50  2048 2216 2440 2832  1536 1539 1543 1615 -hsync +vsync
    ]xrandr --addmode DVI-I-0 2048x1536_85.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:  47
      Current serial number in output stream:  48

`gtf` doesn't work either.

Here's my attempted fix:

    ]vim /usr/share/X11/xorg.conf.d/00-modecrt.conf
    Section "Monitor"
        Identifier  "CRT-0" # also tried "DVI-I-0"

        HorizSync  30.0-140.0
        VertRefresh  59.0-160.0
        DisplaySize 2048 1536

        # the modes i want
        Mode "qxga86"
            DotClock        393.25
            HTimings        2048 2216 2440 2832 
            VTimings        1536  1539  1543  1616
            Flags    "-HSync" "+VSync"
        Mode "xga160"
            DotClock        190.25
            HTimings        1024 1112 1216 1408
            VTimings        768 771 775 846
            Flags    "-HSync" "+VSync"
    # ive tried without and without these modeline/option lines, still broken
        Modeline "qxga"  393.25  2048 2216 2440 2832  1536 1539 1543 1616 -hsync +vsync
        Option "Rotate" "normal"
        Option "PreferredMode" "qxga" # put qxga, qxga86 or xga, none works
    # ive also tried without these section screen and device, no difference
    Section "Screen"
        Identifier "Screen 0"
        Device "Configured Video Device"
        SubSection "Display"
            #Virtual 2048 1536 # tried to use this fix but it makes x not start
    Section "Device"
        Identifier  "Configured Video Device"
    # this really should have fixed it but its like its being ignored
    Section "Device"
        Identifier     "Device0"
        Driver         "nvidia"
        VendorName     "NVIDIA Corporation"
        Option         "ModeValidation" "AllowNonEdidModes"


Even with all sorts of additions to xorg.conf, it still refuses to recognize any custom resolutions added through the conf or using `xrandr --addmode`. Adding / setting modes for `DP-0` doesn't work either. Disabling `DP-0` doesn't fix anything for `DVI-I-0`.

Here's `xrandr --query`:

    Screen 0: minimum 8 x 8, current 2944 x 1080, maximum 16384 x 16384
    DVI-I-0 connected primary 1024x768+0+0 (normal left inverted right x axis y axis) 0mm x 0mm
      1024x768      60.00*+
      1600x900      59.82  
      1400x900      59.88  
      1368x768      59.88    59.85  
      1280x800      59.91    59.81  
      1280x720      59.86    59.74  
      1024x576      59.90    59.82  
      960x540       59.82    59.63  
      864x486       59.92    59.57  
      800x600       72.19    60.32    56.25  
      800x450       59.82  
      700x450       59.88  
      684x384       59.88    59.85  
      640x480       59.94  
      640x400       59.98    59.88  
      640x360       59.86    59.83  
      512x384       60.00  
      512x288       60.00    59.92  
      480x270       59.82    59.63  
      432x243       59.92    59.57  
      400x300       72.19  
      320x240       60.05  
    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 connected 1920x1080+1024+0 (normal left inverted right x axis y axis) 531mm x 299mm
      1920x1080     60.00*+ 144.00   119.98    99.93    84.90    59.94    50.00  
      1680x1050     59.95  
      1440x900      59.89  
      1280x1024     75.02    60.02  
      1280x960      60.00  
      1280x800      59.81  
      1280x720      60.00    59.94    50.00  
      1152x864      75.00  
      1024x768      75.03    70.07    60.00  
      800x600       75.00    72.19    60.32    56.25  
      720x576       50.00  
      720x480       59.94  
      640x480       75.00    59.94    59.93  
    DP-1 disconnected (normal left inverted right x axis y axis)
    DP-2 disconnected (normal left inverted right x axis y axis)
    DP-3 disconnected (normal left inverted right x axis y axis)
    DP-4 disconnected (normal left inverted right x axis y axis)
    DP-5 disconnected (normal left inverted right x axis y axis)
      2048x1536_85.00 (0x218) 388.500MHz -HSync +VSync
       h: width  2048 start 2216 end 2440 total 2832 skew    0 clock 137.18KHz 
       v: height 1536 start 1539 end 1543 total 1615           clock  84.94Hz

GTX 980 Ti, out DVI-I and DisplayPort.

Nothing's working, how do I hard force the modes I want? I don't want to be limited by what the drivers "think" the monitors can handle. The modes I wish to use aren't standard and wouldn't be listed in an EDID, but are within scanning range, so correcting any EDID problems would likely not help.

Last edited by bitmask (2019-02-12 02:45:08)


#2 2019-02-12 16:41:25

Registered: 2015-03-09
Posts: 594

Re: Can't force video mode (xrandr invalid parameter attributes)

That "Identifier" in your config file in the "Monitor" section, that name you use there is just for you. It has nothing to do with the actual ports on the card. You can name things any way you like, it just has to be something unique.

I'm not sure how to tie a monitor section to a real output port. The xorg.conf man-page explains something in a part named "MONITOR SECTION". You can jump to exactly that part of the man-page by typing "/^MON". There is one paragraph that says this here:

       With RandR 1.2-enabled drivers, monitor sections may be tied to specific  outputs  of  the
       video  card.  Using the name of the output defined by the video driver plus the identifier
       of a monitor section, one associates a monitor section with an output by adding an  option
       to the Device section in the following format:

       Option "Monitor-outputname" "monitorsection"

       (for example, Option "Monitor-VGA" "VGA monitor" for a VGA output)

This would be something I would try. For the config file you showed earlier, it would mean adding this here to your Device section:

    Section "Device"
        Identifier     "Device0"
        Driver         "nvidia"
        VendorName     "NVIDIA Corporation"
        Option         "ModeValidation" "AllowNonEdidModes"
        Option "Monitor-DVI-I-0" "CRT-0"

This "CRT-0" name is the Identifier you used in that Monitor section you've written.

In that config you showed earlier, I would remove that Screen section and that empty Device you have. About the Device section with the Identifier "Device0" where you configure the nvidia driver, you have to make sure that there is no other config file with a similar Device section. Perhaps do this to see if there's a different one:

$ grep -r nvidia /etc/X11

Look at the Xorg log file closely after starting X. The Xorg server will print the names it uses to identify stuff, and it will print which section from a config file it sees and applies to stuff.


#3 2019-02-12 17:32:30

Registered: 2009-08-25
Posts: 3,604

Re: Can't force video mode (xrandr invalid parameter attributes)

@bitmaks: Nvidia doesn't allow arbitrary resolutions with xrandr 1.2. Instead, you need to use their ViewPortIn/ViewPortOut stuff. Search for that in the Nvidia documentation here: … nview.html

@Ropid: Actually, the Identifier does matter when you have a minimal config without any "Device" sections, only "Monitor" sections. For example, I have a stupid display that's 1366x768, but lists 1360x768 as it's default mode, so I use this minimal config:

Section "Monitor"
  Identifier "DP-1"
  Option "PreferredMode" "1366x768"

In this case, the Identifier must be set to the output I'm configuring. I could instead do this:

Section "Device"
  Identifier "something"
  Driver "modesetting"
  Option "Monitor-DP-1" "blah"

Section "Monitor"
  Identifier "blah"
  Option "PreferredMode" "1366x768"

That's what's described in the manpage section you quoted. But why bother, the first config is smaller and works identically.


Board footer

Powered by FluxBB