Ubuntu – How to set up a second display via DVI/viewport with a Lenovo T420S


My Lenovo T420S has a discrete graphic card with nvidia optimus technology. What I'm basically trying to achieve is the following:

  • use a second display – connected via DVI/viewport – at work (VGA is blurry)
  • achieve a moderate to good battery performance while travelling (2 hours)

As far as I figured out, I have the following options:

  1. disable Optimus, use internal graphics exclusively
  2. disable Optimus, use nvidia exclusively
  3. enable Optimus, use bumblebee (homepage) / ironhide

(1) disqualifies as I read (and experienced) that DVI / viewport is technically not usable via internal graphics

(2) haven't really tried so far, just a quick test-install that booted into a black screen after I added the nvidia drivers 🙁

(3) followed this blog, used bumblebee instead of ironhide. Bumblebee worked (I can see impressive FPS on glxgears), but I did not get the second display to be recognized. I also felt lost in the nvidia-driver-hell and had no chance to run nvidia-xconfig, simply because it was not installed. No idea if a second display is supposed to be recognized out of the box? Do I need to install more? Do I need to mess with my xorg.conf? Many questions, few answers.

So, what can I do to achieve my goals? Which path to follow, and what are the next steps?

Any hint is welcome 🙂

Update: Thanks to everyone who answered. I will migrate my work environment to a "discrete" installation, and will use "optimus/bumblebee" as a parallel play project and see how far I get… I will post future questions in new threads.

Best Answer

I have a Thinkpad W520 and have messed around with this extensively. I am not sure how much the W520 and T420S have in common, but I have written a blog post here outlining the big picture situation and giving some suggestions.

You should be able to get 2 hours of battery life using the nvidia card with proprietary drivers full time. That will also probably be the option that involves the least hassle when adding an external display (The program "disper" is very helpful for this). If the nvidia proprietary drivers for the card in the T420s function the same as for the W520, they will automatically underclock the card when it is not in full use (they call this "Power Mizer"), so your battery life will not be too horrible. Honestly, I only get a 25 or 30% increase in battery life by turning off the nvidia card. Also, I believe that with Bumblebee installed, you may not be able to use your external monitor because the nvidia card is already running an X server "under the hood". In summary, I would recommend pursuing option (2) further. Hopefully, once you get the proprietary drivers installed and working, X will autodetect everything and you will not have to mess with your xorg.conf.

When I installed and uninstalled Bumblebee, I had a little bit of trouble getting the nvidia proprietary drivers to work again. Here a few things to look into: (a) The W520 has BIOS options related to which graphics scheme is in use. I'm not sure what the T420 options are, but if you want to use the nvidia graphics on your Thinkpad display, you probably have to be in "discrete" mode. (b) You may have to mess around with the "jockey" program in ubuntu to get it to use the proprietary drivers.

Good luck! I hope this was of some help.