Just installed Ubuntu 23.04 and found out that I can't change the default resolution
1920 x 1080 via the display settings. Tried adding custom resolution using xrandr --addmode
and got the problem bellow:
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
Got this problem after following these steps:
cvt 3840 2160 144
# 3840x2160 143.94 Hz (CVT) hsync: 338.25 kHz; pclk: 1829.25 MHz
Modeline "3840x2160_144.00" 1829.25 3840 4200 4624 5408 2160 2163 2168 2350 -hsync +vsync
xrandr --newmode "3840x2160_144.00" 1829.25 3840 4200 4624 5408 2160 2163 2168 2350 -hsync +vsync
xrandr --addmode DP-0 3840x2160_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: 41
Current serial number in output stream: 42
Here's the xrandr
output:
Screen 0: minimum 8 x 8, current 1920 x 1080, maximum 32767 x 32767
HDMI-0 disconnected (normal left inverted right x axis y axis)
DP-0 connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 531mm x 299mm
1920x1080 60.00 + 144.00* 119.98 99.93 84.90
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)
HDMI-1 disconnected (normal left inverted right x axis y axis)
USB-C-0 disconnected (normal left inverted right x axis y axis)
This problem appears whether or not I'm increasing or decreasing the resolution. The only preset that remains available is 1920x1080. I also use the settings mentioned earlier on Windows without any issues.
Update:
I'm using BenQ XL2420G with G-SYNC enabled, connected directly to the PC via Displayport 1.4, which is capable of sending the output of 4k@144.
The driver that's being used is NVIDIA driver metapackage from nvidia-driver-535 (proprietary, tested), being the latest. I tried switching it to X.Org Nouveau, but didn't have any luck with the resolution option being locked in the settings menu and, while trying to change it via xrandr, encountered another problem:
xrandr: Failed to get size of gamma for output default
I also tried using HDMI cable instead of DP, but it doesn't support G-SYNC, therefore I couldn't set the resolution and refresh rate higher than FULL HD and 60 Hz