Error adding xrandr mode
It looks like your problem is, you might not have anything connected to the port you are trying to send the xrandr
command to. I tested some on my system here and received the same error. Make sure that you are running the command on the correct port. I will use an older monitor of mine as a demonstration.
terrance@terrance-ubuntu:~$ cvt 1280 1024
# 1280x1024 59.89 Hz (CVT 1.31M4) hsync: 63.67 kHz; pclk: 109.00 MHz
Modeline "1280x1024_60.00" 109.00 1280 1368 1496 1712 1024 1027 1034 1063 -hsync +vsync
terrance@terrance-ubuntu:~$ xrandr --newmode "1280x1024_60.00" 109.00 1280 1368 1496 1712 1024 1027 1034 1063 -hsync +vsync
terrance@terrance-ubuntu:~$ xrandr --addmode DVI-I-0 1280x1024_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: 33
Current serial number in output stream: 34
Here's the error. The next line shows me all my connected DVI ports.
terrance@terrance-ubuntu:~$ xrandr | grep -w connected
DVI-I-1 connected 1024x768+1920+0 (normal left inverted right x axis y axis) 0mm x 0mm
DVI-I-2 connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 509mm x 286mm
As we can see, mine that I want is connected to DVI-I-1
, so I corrected the line to match my connected monitor.
terrance@terrance-ubuntu:~$ xrandr --addmode DVI-I-1 1280x1024_60.00
terrance@terrance-ubuntu:~$ xrandr --output DVI-I-1 --mode 1280x1024_60.00
terrance@terrance-ubuntu:~$ xrandr | grep -w connected
DVI-I-1 connected 1280x1024+1920+0 (normal left inverted right x axis y axis) 0mm x 0mm
DVI-I-2 connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 509mm x 286mm
And now, my monitor took the new mode and looks good.
Hope this helps!
Related videos on Youtube
Scorb
Updated on September 18, 2022Comments
-
Scorb over 1 year
I am following the following xrandr documentation on adding a missing resolution, and am getting an error that I can't resolve.
user@box:~$ cvt 1920 1080 # 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
Then it says to use --newmode to create the mode
user@box:~$ xrandr --newmode "1920x1080_60.00" 173.00 1920 2048 2248 2576 1080 1083 1088 1120 -hsync +vsync
and finally add the mode to the output. This is where I get the error, and I can not figure out what exactly is going on. Nothing I found online could resolve this issue.
user@box:~$ xrandr --addmode DVI-D-0 "1920x1080_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: 33 Current serial number in output stream: 34
PLEASE HELP!! I am so sad and desperate! :P
EDIT: Here is some additional very important revelations.
There is some docs on my exact error....
https://wiki.archlinux.org/index.php/NVIDIA/Troubleshooting#xrandr_BadMatch
And I have confirmed in xorg logs that I have a bad EDID....
[ 27.493] (WW) NVIDIA(0): DFP-0 does not have an EDID, or its EDID does not contain a [ 27.493] (WW) NVIDIA(0): maximum image size; cannot compute DPI from DFP-0's EDID.
-
George Udosen over 7 yearsThe line
xrandr --addmode DVI-D-0 "1920x1080_60.00"
should bexrandr --addmode DVI-D-0 1920x1080_60.00
-
Scorb over 7 yearsNo it doesn't. Either way, it results in the same error.
-
George Udosen over 7 yearsPlease can I have the link to the steps you followed ?
-
Scorb over 7 yearssorry I forgot to add it.
-
George Udosen over 7 yearsI have seen your link and your have
"1920x1080_60.00"
when you should have1920x1080_60.00
like I had pointed out. The error is in theparameters
your passing toxrandr
-
JosephK about 6 yearsI agree the error is in the parameters passed, but adding or removing quotes to either or both of the parameters has no effect - the same error message results with all possible combinations of quoting either/all/or those two params.
-
-
Scorb over 7 yearsIf i run xrandr -q it only lists DVI-D-0 and HDMI-0. My card only has 1 DVI-D out, so I am certain DVI-D-0 is correct. Thank you for your response!
-
Terrance over 7 years@ScottF What does
xrandr | grep -w connected
return? -
JosephK about 6 yearsI copied and pasted exactly what is shown in "connected" as well as the name I used for "newmode" line, and I still get the same error.
-
Terrance about 6 years@JosephK What Ubuntu version are you running?
-
JosephK about 6 yearsThe problem turned out to be that the NVIDIA driver no longer supports xrandr beyond query-mode. You have to specifically allow settings not found in monitor-detection, add that flag plus settings, etc.