TL;DR: The /etc/X11/xorg.conf.d/10-monitor.conf I’m using is at the bottom.
What I’ve got: Librem 13v3, external 3840x2160 monitor (Acer ET430K) via HDMI
By default, the highest resolution shown is 1920x1080. That’s kind of expected; it’s just a Linux thing. The monitor will support up to 3840x2160 at 60Hz, but of course only with display port. It’s capped at 30Hz for full resolution over HDMI. Anyway, I wanted to be able to switch to 3840x2160@30Hz occasionally but mostly run under 2560x1440@60Hz, or as near to these settings as possible.
I fiddled around with cvt and xrandr a bunch, trying out different settings. The hardest one to get working was, of course, the one I wanted to use most, 2560x1440.
My basic debug loop was, for example:
$ cvt 2560 1440 55
# 2560x1440 54.93 Hz (CVT) hsync: 81.80 kHz; pclk: 284.00 MHz
Modeline "2560x1440_55.00" 284.00 2560 2744 3016 3472 1440 1443 1448 1489 -hsync +vsync
$ xrandr --newmode "2560x1440_55.00" 284.00 2560 2744 3016 3472 1440 1443 1448 1489 -hsync +vsync
$ xrandr --addmode HDMI-1 2560x1440_55.00
$ xrandr --output HDMI-1 --mode 2560x1440_55.00
And then wait to see how it’d hold up. I initially tried the best theoritical option, which would be cvt -r 2560 1440
giving as near as 60Hz as possible. But that resulting Modeline would blink the screen every ten minutes or so and was pretty maddening.
After many experiments, I did get it use 3840x2160 at around 30Hz, and 2560x1440 at around 55Hz. Follows is my /etc/X11/xorg.conf.d/10-monitor.conf I created. Obviously, no guarantees or warranties from me; this just happens to work for me and maybe it will for others as well. If not, perhaps the debug loop I’ve shown above will help you get what you need.
Section "Monitor"
Identifier "HDMI-1"
# Auto detected
Modeline "1920x1080" 148.50 1920 2008 2052 2200 1080 1084 1089 1125 +hsync +vsync
# 2560x1440 54.93 Hz (CVT) hsync: 81.80 kHz; pclk: 284.00 MHz
Modeline "2560x1440knoqi" 284.00 2560 2744 3016 3472 1440 1443 1448 1489 -hsync +vsync
# 3840x2160x29.98 @ 65.688kHz
Modeline "3840x2160knoqi" 262.750000 3840 3888 3920 4000 2160 2163 2167 2191 +HSync -VSync
Option "PreferredMode" "2560x1440knoqi"
EndSection