Score:1

Can't add custom resolutions on Display Port

am flag

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

codlord avatar
ru flag
It looks to me like your system is not seeing the monitor Extended Display Identification Data (EDID). `xrandr` should list all the display resolutions the monitor is capable of. Are What is your monitor make/model? What is your display adaptor make/model and what "additional Drivers" are you using? Run the "Additional Drivers" app to see. If you are using the Nvidia drivers then temporarily select X.Org Nouveau and try again. That might tell you more on what is causing the problem. Also are you connecting PC/monitor with a direct DP cable or via a hub or adaptor of any sort?
SlareJ avatar
am flag
@codlord added the information requested in update section of the post
codlord avatar
ru flag
Only a couple more things I can think of, first: See if `nomodeset` is in `GRUB_CMDLINE_LINUX_DEFAULT` of `/etc/default/grub`. If it is then remove `nomodeset`. And second, it looks to me like you are already logging in using Xorg and not the new default (Wayland) but just to confirm as I think `xrandr` onty fully works under Xorg, Do `echo $XDG_SESSION_TYPE` which should show `x11` or `wayland`
SlareJ avatar
am flag
@codlord I changed `nomodeset` to `quick splash` in `/etc/default/grub` and the issue remained the same. After executing `echo $XDG_SESSION_TYPE` I got `x11`. I tried switching to Wayland and even succeeded the first time, but then for some reason when I chose the Wayland option in the logging screen, after I type in the password the system kept throwing me back to the same logging screen, so no Wayland for me anymore. Also, while I had the opportunity to use Wayland, I did have more resolution presets available, so now I have the issue of enabling Wayland and getting past the logging screen.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.