Ubuntu 14.04, ThinkPad W520 and multiple Monitors

Here’s a quick reminder of the commands that I use to switch between a single monitor setup (internal laptop screen) and two external, DVI-attached monitors on my ThinkPad W520 running Ubuntu 14.04 (x86_64).

In order to switch to single-screen setup:

phs@W520:~$ disper -s -d DP-2 -r auto
phs@W520:~$ disper -s -d LVDS-1 -r auto

Switching to the two external monitors:

phs@W520:~$ disper -s -d DP-2 -r auto
phs@W520:~$ disper -e -d DP-2,DP-3 -r auto

All of this uses the stock, Ubuntu-provided driver. Didn’t have much success with the nVidia drivers (from the repositories) on this laptop.