So I have an LG 4k (31MU97) monitor that supports 4096x2160 at 60Hz. I can run 3840x2160 at 60Hz fine. When I run xrandr, I don't see the 4096x2160 mode:
Screen 0: minimum 320 x 200, current 3840 x 2160, maximum 16384 x 16384
DisplayPort-0 disconnected (normal left inverted right x axis y axis)
DisplayPort-1 connected 3840x2160+0+0 (normal left inverted right x axis y axis) 621mm x 341mm
3840x2160 60.00*+ 30.00
1920x1080 60.00 59.94
1600x900 60.00
1280x1024 60.02
1152x864 59.97
1280x720 60.00 59.94
1024x768 60.00
800x600 60.32
720x480 60.00 59.94
640x480 60.00 59.94
4096x2160_60.00 59.98
HDMI-0 disconnected (normal left inverted right x axis y axis)
DVI-0 disconnected (normal left inverted right x axis y axis)
DVI-1 disconnected (normal left inverted right x axis y axis)
I've looked at some other guides including a forum thread and a pastebin that have very similar instructions:
Run either CVT or GTF to generate a modeline string:
cvt 4096 2160 60
# 4096x2160 59.98 Hz (CVT) hsync: 134.18 kHz; pclk: 760.00 MHz
Modeline "4096x2160_60.00" 760.00 4096 4432 4880 5664 2160 2163 2173 2237 -hsync +vsync
or
gtf 4096 2160 60.0
# 4096x2160 @ 60.00 Hz (GTF) hsync: 134.10 kHz; pclk: 759.54 MHz
Modeline "4096x2160_60.00" 759.54 4096 4424 4880 5664 2160 2161 2164 2235 -HSync +Vsync
Then I create a new mode
xrandr --newmode <mode string>
xrandr --addmode DisplayPort-1 4096_2160_60.00
If anyone remembers the old CRT monitors days, with the mode switch and a timer, you can do something similar just by running:
xrandr -s "4096x2160_60.0"; sleep 15; xrandr --output DisplayPort-1 --mode 3840x2160 --auto
Anyway, using both the CVT and GTF mode lines, I simply get a blank screen and my monitor says it can't find an input signal (you can use --rmmode and --delmode to remove a mode so you can add it again). I've tried some variations such as using 30.0HZ or 59.94Hz without successful results.
What exactly are all the other numbers for in the modeline string? I'm suspecting these programs were written for CRT monitors, and didn't really have 2160p screens in mind. I know this monitor supports 4096x2160@60Hz (it currently warns me I'm not in the correct native resolution whenever I switch back to 3840x2160).
If I have both a 59.94 and a 30Hz modeline specified, I can get it to display 4096x2160 @ 30Hz, but not the higher 60Hz mode.
It probably doesn't matter, but I should add I'm using an AMD/ATi R7800 via mini-displayport (DP1.2) and the open source radeon kernel drivers.
How do I determine the correct modeline for this particular monitor?
I just wanted to drop a line, and say that in Arch Linux on the new 4-7.1 kernel the 4096x2160 59Hz is showing up by default in the Display manager. It is working great so far. I spent a great of time deal trying to get this monitor to work in the native resolution of 4096x2160, even with the xrandr settings being set manually it was not working. Someone should try Ubuntu with the upstream Kernel and see if it corrects the problem in Ubuntu also.
So I discovered a forum post that documented the correct modelines. The closed source/binary AMD drivers property pull this information from the monitor, but the open source drivers do not yet.
I have documented the commands needed to set the correct mode in the following blog post:
http://penguindreams.org/blog/running-a-lg31mu97-on-linux-at-4096x2160-at-60hz/
For the impatient: