You are not logged in.

#1 2020-05-02 08:04:48

zee220
Member
Registered: 2017-03-12
Posts: 20

[Solved] Can't add custom resolution to my system (X Error: BadMatch)

I have two 1920x1080 monitors, I want to turn one of them into 1440x1080 when playing csgo because its easier to see far away target in 4:3. Whenever I try to add a new mode I get an error, here how I'm doing it:

[zee@zeeDT ~]$ cvt 1440 1080 144
# 1440x1080 143.80 Hz (CVT) hsync: 169.25 kHz; pclk: 338.50 MHz
Modeline "1440x1080_144.00"  338.50  1440 1568 1720 2000  1080 1083 1087 1177 -hsync +vsync
[zee@zeeDT ~]$ xrandr --newmode "1440x1080_144.00"  338.50  1440 1568 1720 2000  1080 1083 1087 1177 -hsync +vsync
[zee@zeeDT ~]$ xrandr --addmode DVI-D-0 "1440x1080_144.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:  45
  Current serial number in output stream:  46

I also tried editing my /etc/X11/xorg.conf.d/20-nvidia.conf file to this but that doesn't work, the resolution just doesn't show up as an option for me in either xrandr or nvidia-settings

Section "Monitor"
    # HorizSync source: edid, VertRefresh source: edid
    Identifier     "Monitor0"
    VendorName     "Unknown"
    ModelName      "Ancor Communications Inc VG248"
    HorizSync       30.0 - 160.0
    VertRefresh     50.0 - 150.0
    Modeline "1920x1080_144.00"  452.50  1920 2088 2296 2672  1080 1083 1088 1177 -hsync +vsync
    Modeline "1440x1080_144.00"  338.50  1440 1568 1720 2000  1080 1083 1087 1177 -hsync +vsync
    Option         "DPMS"
EndSection

system info:

Kernel: Linux 5.6.8-arch1-1
CPU: Intel Core i5-6600K
GPU: GeForce GTX 1070
GPU driver: prop drivers 440.82

Last edited by zee220 (2020-05-03 18:58:37)

Offline

#2 2020-05-02 10:56:14

seth
Member
Registered: 2012-09-03
Posts: 51,056

Re: [Solved] Can't add custom resolution to my system (X Error: BadMatch)

Can you add

# 1440x1080 @ 144.000 Hz Reduced Blank (CVT) field rate 144.000 Hz; hsync: 166.608 kHz; pclk: 253.24 MHz
Modeline "1440x1080_144.00_rb2"  253.24  1440 1448 1480 1520  1080 1143 1151 1157 +hsync -vsync

Offline

#3 2020-05-02 20:47:41

zee220
Member
Registered: 2017-03-12
Posts: 20

Re: [Solved] Can't add custom resolution to my system (X Error: BadMatch)

Thanks for the response seth! Unfortunately that gives me the same error

[zee@zeeDT ~]$ xrandr --newmode "1440x1080_144.00_rb2"  253.24  1440 1448 1480 1520  1080 1143 1151 1157 +hsync -vsync         
[zee@zeeDT ~]$ xrandr --addmode DVI-D-0 1440x1080_144.00_rb2
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:  45
  Current serial number in output stream:  46

Offline

#4 2020-05-03 06:56:54

seth
Member
Registered: 2012-09-03
Posts: 51,056

Re: [Solved] Can't add custom resolution to my system (X Error: BadMatch)

Can you add a 60Hz modeline?

# 1440x1080 @ 60.000 Hz (CVT) field rate 59.989 Hz; hsync: 67.188 kHz; pclk: 129.00 MHz
Modeline "1440x1080_60.00"  129.00  1440 1528 1680 1920  1080 1083 1087 1120 -hsync +vsync

What's the output of "xrandr -q --verbose"


Edit: this is probably an xy-problem anyway. Try the viewport transformation in nvidia-settings, Advanced Display Configuration. Especially if your output/monitor stretches non-native resolutions and you want a letterboxed 4:3 display .

Last edited by seth (2020-05-03 06:59:24)

Offline

#5 2020-05-03 09:35:46

zee220
Member
Registered: 2017-03-12
Posts: 20

Re: [Solved] Can't add custom resolution to my system (X Error: BadMatch)

Here's the output for that command: https://pastebin.com/BLgEyp4V

I tried doing it through nvidia-settings but I really couldn't figure out how. It would either add a massive black bar to my monitor, or it would still render the full 1920x1080 desktop but only show a 1440x1080 slice of it and I'd be forced to pan around with my mouse.

Offline

#6 2020-05-03 09:50:16

zee220
Member
Registered: 2017-03-12
Posts: 20

Re: [Solved] Can't add custom resolution to my system (X Error: BadMatch)

as per usual, as soon as I made that last post I figured out how to do it in nvidia-settings. For anyone who stumbles on this in the future the way you want to do it is by settings your ViewPortIn to your desired resolution, and your Panning to the desired resolution as well. Do NOT touch ViewPortOut. You can just copy the meta mode for each state using

nvidia-settings -q CurrentaMetaMode

and assign it again using

nvidia-settings -a CurrentMetaMode="mode"`.

For example I created these two scripts

1440p.sh

nvidia-settings -a CurrentMetaMode="DPY-0: 1920x1080_144 @1440x1080 +0+0 {ViewPortIn=1440x1080, ViewPortOut=1920x1080+0+0, ForceCompositionPipeline=On, ForceFullCompositionPipeline=On}, DPY-1: nvidia-auto-select @1920x1080 +1440+0 {ViewPortIn=1920x1080, ViewPortOut=1920x1080+0+0, ForceCompositionPipeline=On, ForceFullCompositionPipeline=On}"

and 1920p.sh

nvidia-settings -a CurrentMetaMode="DPY-0: 1920x1080_144 @1920x1080 +0+0 {ViewPortIn=1920x1080, ViewPortOut=1920x1080+0+0, ForceCompositionPipeline=On, ForceFullCompositionPipeline=On}, DPY-1: nvidia-auto-select @1920x1080 +1920+0 {ViewPortIn=1920x1080, ViewPortOut=1920x1080+0+0, ForceCompositionPipeline=On, ForceFullCompositionPipeline=On}"

Then to automate this I did

/home/zee/scripts/1440p.sh; %command%; /home/zee/scripts/1920p.sh

in my csgo launch options

Offline

#7 2020-05-03 12:32:40

seth
Member
Registered: 2012-09-03
Posts: 51,056

Re: [Solved] Can't add custom resolution to my system (X Error: BadMatch)

Cool.

Please always remember to mark resolved threads by editing your initial posts subject - so others will know that there's no task left, but maybe a solution to find.
Thanks.

Offline

Board footer

Powered by FluxBB