4

I have two identical HP monitors that both can handle 1920x1080 resolution connected to a basic HP SlimDesktop model 290-p0043w with a basic IntelĀ® UHD Graphics 610 GPU. However, the video output is one HDMI and one VGA port. I had Ubuntu 18.04 installed on the same computer before and after some tweaking I got the VGA port to work on 1920x1080 stable and reliable. Now I installed Ubuntu 21.04 on the same computer and I do the following:

~$ 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
~$ xrandr --newmode "1920x1080_60.00"  173.00  1920 2048 2248 2576  1080 1083 1088 1120 -hsync +vsync
~$ xrandr --addmode XWAYLAND1 "1920x1080_60.00"
~$ xrandr --output XWAYLAND1 --mode "1920x1080_60.00"
X Error of failed request:  BadValue (integer parameter out of range for operation)
  Major opcode of failed request:  139 (RANDR)
  Minor opcode of failed request:  21 (RRSetCrtcConfig)
  Value in failed request:  0x780
  Serial number of failed request:  29
  Current serial number in output stream:  29
~$

According to many web pages this (and Ubuntu help) it should be done this way. I also used arandr which only shows the newly added resolution, but when applying, it gives the same problem. I also did this (after a reboot) as sudo ... to the same avail. Ubuntu -> Displays -> "Unknown Display" -> Resolution shows the standard 1024x768 as highest resolution. I have seen many similar questions (for other distro's as well) but never any answer.

Does anybody know what to do?

2 Answers2

1

I know it's late but xrandr is broken in my case dummy HDMI display had no ultra resolution 3440x1440 I found this post about Wayland: https://www.davejansen.com/add-custom-resolution-and-refresh-rate-when-using-wayland-gnome/ In nutshell you have to find your port name:

ls /sys/class/drm/card*

in my case card1-HDMI-A-1 port is HDMI-A-1

edit GRUB:

sudo nano /etc/default/grub

add GRUB cmd line with following structure:

GRUB_CMDLINE_LINUX_DEFAULT="quiet video=<port-name>:<resolution-w>x<resolution-h>@<refresh-rate>"

e.g.

GRUB_CMDLINE_LINUX_DEFAULT="quiet video=HDMI-A-1:3440x1440@60"

then sudo update-grub and restart

sample config:

GRUB config screen

karel
  • 122,292
  • 133
  • 301
  • 332
-1

I think I figured it out. In the the line: [~$ xrandr --addmode XWAYLAND1 "1920x1080_60.00] "XWAYLAND" is the name of the monitor (in this case the second) I changed it to "DP-2" and it worked. So now my line looks like: [~$ xrandr --addmode DP-2 "1920x1080_60.00"]

This could be different for you, so you have to experiment a bit to find out what your distro says the second monitor is named.

Good luck.