External screen resolution on Ubuntu 21.04

I have a Fujitsu Lifebook 7311 with Displayport through USB-C (Thunderbolt) running Ubuntu 21.04, connected to the DVI-2 port of my 2560x1600 monitor (Dell 3008WFP) through the DeLock 85320 USB Type-C to DVI Cable.

By default the external screen gets the resolution 1920x1200@60Hz, and the Settings Panel of Ubuntu does not give an option for a higher resolution. xrandr also does not show higher resolutions. So how to add them?

I tried to add them with xrandr, but that does not work with Wayland (the default on Ubuntu 21.04). Apparently the Wayland developers think that we should not be doing such things, but there is supposedly a complicated way to do it that requires installing additional software and a reboot for every try.

That did not sound attractive to me, so I instead logged in the user on Xorg instead of Wayland (selectable by the settings on the right bottom corner in the login window). There I can use xrandr to add the mode:

  xrandr --newmode "2560x1600@30" 163.70 2560 2592 3208 3240 1600 1636 1644
  xrandr --addmode DP-1 2560x1600@30
  xrandr --output DP-1 --mode 2560x1600@30 --right-of eDP-1
DP-1 is the USB-C-connected display, eDP-1 is the internal display.

I also tried the following mode I use on my desktop computer with this monitor to get 60Hz, but without success (the monitor suspends when I try to use it):

xrandr --newmode "2560x1600@60" 268 2560 2608 2640 2720 1600 1603 1609 1646 +Hsync +Vsync    
It's not clear why this fails (the DeLock support reports that 4k@30Hz works, so it's not a limitation to single-link DVI), but 2560x1600@30 is good enough for now.

Another problem with Ubuntu 21.04 is that once the external Display is connected, the laptop no longer suspends when I close the lid, even if I configure that in logind.conf. It seems that the logind provided with Ubuntu 21.04 is buggy.


Anton Ertl