Thinkpad T440p with Ultra Dock: Multiple screens

At work I got a shiny new Lenovo Thinkpad T440p with 16GiB RAM, and an Ultra Dock as docking station to connect my 2 normal displays.

The first thing I did was installing Ubuntu with Mate, without ever accepting the EULA that comes with the pre-installed Redmond operating system. Installing Linux was a breeze and quickly done.

I had only one problem after booting: Of my two external displays (one connected via DVI, the other one via display port), only one was detected. Both showed the same picture (mirroring).

This blog post is about the Thinkpad T440p with an Intel graphics card, not an nvidia card.

Intel has by far the best open source graphics drivers, while nvidia only publishes a closed-source driver that never supports the latest linux kernel features. You'll probably have to wait a half or a full year until DP-MST will work with the nvidia graphics card.

DisplayPort: Multi-Stream Transport

It turned out that the Ultra Docks internally use a DisplayPort 1.2 feature called MST, Multi-Stream Transport. It allows one to have hubs and chains of display devices, just like one knows it from USB.

Despite DP 1.2 being specified end of 2009, real hardware did not hit the shelves until a year ago, which explains the missing support in the stock Linux kernel 3.16. This was the problem - I was getting some kind of fallback mode with my mirrored displays.

airlied to the rescue

Redhat employee and graphics driver kernel hacker David Airlie fortunately has some colleagues that also had the same problem as me. He implemented DisplayPort MST support for the Intel Haswell hardware (the T440p has a Intel HD Graphics 4600 graphics chip) in the linux kernel and the X.org intel driver, and published it all in a Fedora 20 package repository . Awesome!

MST on Ubuntu

I use Ubuntu, so the Fedora repository was of not help for me. Fortunately, the patches are available and others can use them.

I had to compile the Linux kernel myself, and the X.org intel graphics driver.

Linux kernel

The first step was to get airlied's kernel patches. They are available in a git repository on freedesktop.org on top of the mainline 3.14 kernel sources. They are integrated in the mainline kernel since version 3.17 .

Just download it from kernel.org, configure the kernel with the same options the default Ubuntu kernel uses, compile and install it. It's really not hard. The Ubuntu wiki git kernel build howto helps a lot. We even get .deb packages for the kernel.

$ sudo bash
$ apt-get install build-essential kernel-package fakeroot libncurses5-dev
$ cd /usr/local/src
$ wget https://www.kernel.org/pub/linux/kernel/v3.x/linux-3.17.1.tar.xz
$ tar xJvf linux-3.17.1.tar.xz
$ cd linux-3.17.1
$ cp /boot/config-`uname -r` .config
$ yes '' | make oldconfig
$ make clean
$ make -j `getconf _NPROCESSORS_ONLN` deb-pkg LOCALVERSION=-dp-mst
$ cd ..
$ dpkg -i linux-image-*.deb
$ dpkg -i linux-headers-*.deb

That was the first part.

Intel graphics drivers

The necessary patches for the X.org intel driver xf86-video-intel are already in git master, which means we do not have to apply patches ourselves. Re-compiling the graphics driver is also very easy because the driver is only a loadable module for x.org and does not require recompilation of other packages.

Now reboot and enjoy the all the displays you can connect.

Screenshot

This is a screenshot of my T440p's desktop with the laptop's own display on the left, and two other monitors connected on the middle and right.

Screenshot of 3 monitors

Issues

I still experience some bugs now and then.

Written by Christian Weiske.

Comments? Please send an e-mail.