Ubuntu – Cannot use full resolution of external display

displaydisplay-resolution

I've hooked up a 3440×1440 display to my Ubuntu laptop.
The laptop detected and used the screen with a lower default resolution of 2560×1440, and no higher option available in display settings.

I've used the following commands to add the custom resolution:

sudo xrandr --newmode "3440x1440_60.00"  419.50  3440 3696 4064 4688  1440 1443 1453 1493 -hsync +vsync
sudo xrandr --addmode HDMI-2 "3440x1440_60.00"

and it does indeed add the setting to the settings screen. But when I try to apply it, it instantly switches back to 2560×1440.

This display is correctly autodetected and used at full resolution by another computer (non-Ubuntu).

I have checked that my grub conf does not contain nomodeset.
I have also checked that my GPU supports higher resolutions (Intel UHD Graphics 620).

How can I troubleshoot this issue?

Best Answer

First you don't need to use sudo with xrandr.

Second you need to run cvt to get the settings to pass to xrandr --newmode. For example (on my 4K TV):

cvt -v 3840 2160 56

Warning: Refresh Rate is not CVT standard (50, 60, 75 or 85Hz).
# 3840x2160 55.98 Hz (CVT) hsync: 124.95 kHz; pclk: 661.75 MHz
Modeline "3840x2160_56.00"  661.75  3840 4152 4568 5296  2160 2163 2168 2232 -hsync +vsync

Then copy the Modeline output as input for xrandr --newmode:

$ xrandr --newmode "3840x2160_56.00"  661.75  3840 4152 4568 5296  2160 2163 2168 2232 -hsync +vsync

X Error of failed request:  BadName (named color or font does not exist)
  Major opcode of failed request:  140 (RANDR)
  Minor opcode of failed request:  16 (RRCreateMode)
  Serial number of failed request:  52
  Current serial number in output stream:  52

The refresh rate is too high in this case so I reduced it to 54 Hz and repeated the process.

Related Question