Thinking about buying 4K UHD monitors but your current hardware doesn’t support it? Bought a monitor and stuck with 30Hz? Postpone the upgrade.

TL;DR: 3840×2160@43 Hz, 3200×1800@60 Hz. 2560×1440@86 Hz with Intel HD 3000 (Sandy Bridge); 3840×2160@52 Hz with Intel Iris 5100 (Haswell).

Introduction

Very long time ago, when all monitors were fat and heavy, computers used fixed resolutions and timings to output something on the screen. It was standardized as Display Monitor Timings (DMT) and there wasn’t any universal way to calculate timings for custom resolutions. Monitors used to send supported resolutions from DMT using special protocol called Extended display identification data (EDID) which stored DMT table with supported modes. As the times go on, monitors felt the limit of DMT. In 1999 VESA announced Generalized Timing Formula (GTF), universal timing calculation (with a fixed precision). Just in 3 years, in 2002 it was replaced by Coordinated Video Timings (CVT) standard which was a bit more precise.

Both standards were designed with the awareness of сathode ray tube characteristic, there was a special delay for magnetic field to set up properly. LCD displays were much faster and there wasn’t any need for such delays, the CVT Reduced Blanking (CVT-R or CVT-RB) standard was born which is exact like CVT but for new type of displays. This allowed to greatly reduce required interface bandwidth. There is a newer version of this standard, CVT-R2, but it’s not available for public access, VESA sells it for $350.

The story

Finally, after so many years we’re able to buy high density display for PC. All these years we’ve seen absurdist theatre where mobile devices have 1920×1080 5" displays, shops were full of 4K TVs (although we watch it from 2–4 meters away) but monitors were with the fist-sized pixels. Overwhelming majority say Full HD is “good enough” for a 27" monitor, completely forgetting last “good enough” to go with iPad Retina release. In my opinion, this happens mostly because older Windows versions don’t really support different pixel density and it become fine only in Windows 8.1.

Well, let’s face it. Now in 2015 we have 246 TV models and only 36 monitor models, one of which — DELL P2415Q — I was lucky to buy for a relatively low price (€377). This is a 23.8" IPS display with 3840×2160 resolution and pixel density of 185 PPI with DisplayPort 1.2 and HDMI 1.4 ports. Early 4K monitors were detected by the OS as a two different monitors and combined in a one by video card driver. That happened because early scalers were unable to operate in full resolution and display manufacturers put 2 scalers for a half (1920×2160) resolution in each monitor. Modern monitors got rid of such hack but now require more powerful video adapters. Unfortunately my relatively old Lenovo Thinkpad X220 doesn’t support any resolutions higher than 2560×1440 according to information on Intel and Lenovo websites. Can we do anything with it? Sure!

Standard and non-standard standards

Modern monitors and videocards don’t give a damn about fixed resolutions and timings from DMT times. They can work in a broad range of resolutions and refresh rates. Let’s take a look at my monitor’s tech details:

Horizontal scan range: 31 kHz to 140 kHz (automatic)

Vertical scan range: 29 Hz to 76 Hz (automatic)

And the maximum preset:

Display Mode: VESA, 3840 x 2160

Horizontal Frequency (kHz): 133.3

Vertical Frequency (Hz): 60.0

Pixel Clock (MHz): 533.25

Sync Polarity (Horizontal/Vertical): +/-

So, why the laptop can’t handle maximum resolution?

The answer is: pixel clock.

Many videocards, especially integrated in CPU ones, have a hardware limit for pixel clock. Since EDID don’t have maximum resolution but lower vertical frequency preset because of size limitation, my laptop can’t use maximum resolution.

Unfortunately PC and laptop manufacturers rarely publish maximum pixel clocks for their chips but only maximum supported resolutions, but I’ve manage to find it:

Intel HD 3000 (Sandy Bridge): 389 kHz

Haswell ULT (-U): 450 kHz

Haswell ULX (-Y): 337 kHz

What should be done and what should we do?

The answer is obvious — we should lower the pixel clock! Lowering pixel clock get us lower refresh rates. How to do this? We need to generate so-called modeline, a timing information line. There is a bunch of generators available online, but most of it are far beyond its’ sell-by date and don’t know anything about CVT-R which we should use. I recommend you to use umc in Linux, PowerStrip in Windows and SwitchResX in Mac OS. By the way, SwitchResX is the only software can make modelines using CVT-R2 but my monitor doesn’t support it.

Modeline has the following structure:

Modeline "modeline_name" dot_clock hdisp hsyncstart hsyncend htotal vdisp vsyncstart vsyncend vtotal flags

Take a look at the table above. My monitor’s minimal vertical frequency is 29 Hz. Let’s generate modeline for 3840×2160 with 30 Hz refresh rate:

% umc 3840 2160 30 --rbt # 3840x2160x29.98 @ 65.688kHz

Modeline "3840x2160x29.98" 262.750000 3840 3888 3920 4000 2160 2163 2167 2191 +HSync -VSync

As we can see, pixel clock is 262.75 MHz for this mode, which is much lower from my adapter limit.

Let’s try to set up and activate this mode:

% xrandr --newmode "3840x2160x29.98" 262.750000 3840 3888 3920 4000 2160 2163 2167 2191 +HSync -VSync

% xrandr --addmode DP1 "3840x2160x29.98"

% xrandr --output DP1 --mode "3840x2160x29.98"

If everything went fine you’ll see a picture in “unsupported” by your monitor resolution. Hooray!

We still have lots of pixel clocks and hardly anyone would happy to use display with 30 Hz refresh rate. Let’s increase refresh rate until we hit a limit of 389 MHz of pixel clock for my adapter. For 389 MHz pixel clock we get 44.1 Hz refresh rate.

# 3840x2160x44.10 @ 97.250kHz

Modeline “3840x2160x44.10” 389.000000 3840 3888 3920 4000 2160 2163 2167 2205 +HSync -VSync

Not great, but still.

As you can see, generated horizontal frequency — 97.25 KHz — in a supported frequency range. Just as with vertical frequency, monitor doesn’t care of fixed “modes”, so we can use 3200×1800 with 60 Hz refresh rate — not so low as 2560×1440 and with usual refresh rate.

% umc 3200 1800 60 --rbt # 3200x1800x59.98 @ 111.086kHz

Modeline "3200x1800x59.98" 373.250000 3200 3248 3280 3360 1800 1803 1807 1852 +HSync -VSync

We can apply our modifications on boot several ways:

Edit EDID information and point driver to it

Add modeline to Xorg settings

The last is more convenient and I use it. If you choose the first one, use Phoenix EDID Designer.

To use second way, we should add Xorg “Monitor” section file and put it to /etc/X11/xorg.conf.d/:

% cat /etc/X11/xorg.conf.d/30-dp1.conf

Section "Monitor"

Identifier "DP1"

ModelName "DELL P2415Q"

Modeline "3200x1800" 373.250000 3200 3248 3280 3360 1800 1803 1807 1852 +HSync -VSync

Modeline "3840x2160" 370.000000 3840 3888 3920 4000 2160 2163 2167 2203 +HSync -VSync

Option "PreferredMode" "3200x1800"

EndSection

Where Identifier is your xrandr monitor output name. With PreferredMode you can set default mode.

It doesn’t work!

Make sure you connect your monitor with DisplayPort 1.2. HDMI 1.4 is limited to 340 MHz pixel clock while DisplayPort (HBR2) allows up to 540 MHz. Also make sure your monitor supports more than 30 Hz with highest resolution because earliest models can’t do that.

The end

Don’t blindly trust your monitors’ technical papers. It seems that the vertical frequency limit is 86 Hz rather than 76 Hz in documentation. I can enjoy smooth picture although not in a very high resolution.