Skip to content

Using the HDMI port on Optimus-enabled Thinkpads: The Final Solution

For years now I've been trying to get this dumb HDMI DisplayPort port to work on my Lenovo T430s, and I'd really appreciate it if somebody who knows about Optimus-enabled laptops could help out. How can I use it? Not just while maintaining Bumblebee functions, but really use it at all? Here's things I've tried:

Trying to get it to boot using only the discrete graphics card:

  • Enabling only the discrete graphics card in the BIOS: Arch Linux won't even boot up properly. It hangs on some inconsequential step early in the bootup process. I haven't tried this with an xorg.conf that could actually make use of the driver, but the bootup process by far doesn't get to the point of starting X anyway.
  • Reconfiguring my Xorg to use the nvidia driver instead of the intel driver: No matter how I generate this file (by hand or with nvidia-xconfig), X simply can't connect to the display, and I'm just left with a command prompt. I'd suspect the nvidia driver of being somehow broken, except for the fact that Bumblebee works fine, which would be impossible without a working nvidia driver somehow. I've triple-checked the BusID, but I swear up and down that Xorg is told the correct PCI port.

Trying to get it to boot while using Bumblebee:

  • Simply doing optirun arandr or primusrun arandr and checking for the HDMI port: The HDMI port doesn't show up, sadly. I've tried this with different devices on the other end to make sure.
  • Booting a new, separate X server with the nvidia driver and a custom xorg.conf as suggested on the wiki: I get basically the same result as when I edit my xorg.conf to only use the nvidia driver, namely a dead X. It seems nvidia simply can't handle the responsibility of having an entire X server dedicated to it, instead of just individual processes. I actually haven't tried this with the Nvidia card's BusID added to the custom xorg.conf, but that shouldn't change anything. I'll try it just to be safe, though. EDIT: Doesn't work.

Here is my xorg.conf.

EDIT: I have found a configuration that works minimally. This is momentous news for me, but I don't entirely understand why the parts of it that work work and the parts of it that don't don't. I would like help with this, ideally in such a way that I can get the DisplayPort working like a normal additional monitor.

What I did to make it work was follow this guide for setting Optimus up on Ubuntu. Specifically:

  • Changing my /etc/bumblebee/bumblebee.conf so that KeepUnusedXServer was true and PMMethod was none.
  • Copying xorg.conf.nvidia from the Screenclone git to /etc/X11/ and changing bumblebee.conf so that under [driver-nvidia], XorgConfFile was set to /etc/X11/xorg.conf.nvidia. (I am not sure whether this actually helped or not, but it couldn't have been good that originally it was pointing to a nonexistent xorg.conf.multi.)
  • Running optirun true to start a new X server on the other screen. (Somehow.)
  • export DISPLAY=:8 in a terminal so that commands I ran would open up windows in the external screen.

The new screen was on an entirely new X server, and so lacked even a window manager, but one openbox-session and nvidia-settings later it was in a usable state. However, this setup is still unacceptably terrible. xrandr run on my laptop's screen (?!?) tells me that the only connected monitor is LVDS1, while run on the external monitor, it tells me that the only connected monitor is the one it's running on. How narcissistic of both! Both screens respond to my mouse and keyboard simultaneously, and have their own unique X configs. For example, on the external monitor, two-finger scrolling doesn't work (instead there is the default right-side scroll), while on the laptop monitor it does, so a way I can move the mouse on the external monitor but not the laptop monitor is that I use two fingers instead of one. Also, setting my keyboard to a different layout only applies the setting to the monitor it's on. It's like having two different machines that just happen to share some hardware, like Siamese twins.

I don't entirely understand why this is the case. Can the two graphics cards not interact with each other at all, to the point that they can share screens? There must be some synergy going on between the two, since X can tell the difference between :9, the laptop screen, and :8, the external screen. Screenclone, by the way, doesn't work; no matter what I run—I've tried screenclone -s :9 -d :8, screenclone -s :9 -d :8 -x 1, screenclone -d :8 -x 1, and even simply screenclone—it always exits with some exception. The only Screenclone command I can run that doesn't crash is screenclone -h. I've tried reinstalling it. But even if it worked, what would that do? I don't think it can actually merge the two servers,just paste one onto the other. Somehow I feel that intel-virtual-output is the missing ingredient in this, but when I ran it, it didn't seem to do anything useful but add a virtual screen that didn't show up anywhere.

EDIT 2: I've gotten it to work almost completely. This is what I do now:

  • Reboot my computer (see below)
  • Once it's completely booted, plug in the cable and turn on the external monitor
  • Run optirun true
  • Run intel-virtual-output
  • Open arandr to arrange the screens as I desire
  • Run DISPLAY=:8 nvidia-settings to further fiddle with the display settings, particularly the overscan

And then it works. However, there are a couple peculiarities to the process:

  • After I've disconnected the cable, reconnecting it will not work. I've frozen my computer at least once in trying to get it to work.
  • After I've disconnected the cable, the virtual screen intel-virtual-output creates isn't killed. I don't know how to kill it; I just deactivate it in arandr. On the bright side, the discrete card doesn't seem to drain my batteries afterwards.
  • When I run any program with DISPLAY=:8, it shows up on that screen but acts like there's no window manager on it. Also, all the elements from the virtual screen, even the desktop, keep "overwriting"/"covering" it—I can only see the graphical elements in it when they get updated ahead of the stuff on the virtual screen, e.g. when I mouse over a button in it. This probably has to do with the functionality of intel-virtual-output and can't be helped. It sure does make using nvidia-settings annoying, though.

I'm happy with it. Yay!

Edited 12 Apr 2015. We only hold this version.

11 points15 comments
Open on Reddit
About this post
Posted
Archived
Edited
Score
11 · 100% up
Kind
Text
ID
326bl6

Author

12
posts
126
comments
1
media
View profile

15 comments

unknown author5 hidden

Interesting about the failing to boot with discrete-only. I have a T420 with Nvidia Quadro NVS 4200m, and when I did discrete-only from bios, I couldn't get any distro to boot consistently in live environments or after installing. The only way I could get Linux to boot consistently was to use integrated-only. Must be a big incompatibility with Quadro cards or something.

2 points

Well I think the way Optimus works is that the Nvidia card is connected to the CPU, which is connected to the mobo. So if you tell the system to run from just the Nvidia card, and don't also use the CPU on board gpu, the system will fail to properly connect to the Nvidia card. Bumblebee helps with this problem.

But I could also be totally wrong. This is only what I've understood so far.

2 points
unknown author2 hidden

I see, so then I must use Bumblebee on Optimus-enabled laptops or else turn the discrete card off completely. But there has to be a workaround, because Windows works fine with discrete-only.

2 points

Ah yes forgot to mention the graphics card's model. Yeah, it's got to be something like that if your OSes consistently fail.

1 points

I have a w520 or something and dang i feel your pains. I now run opensuse and 13.1 was tough to get it to work. 13.2 picked it right up but i cant get webgl to work. I hate the discrete graphics cards.

2 points

Have you tried dual-booting Windows to see if that works?

1 points

I thought about doing that. Gonna try it. I really wish the video ports would use the intel or embedded side of the gpu so i can turn my nvidia completely off.

2 points

So I use the Intel driver almost always. I call bumble bee only when I run accelerated apps.

Also the driver you need is probably not the latest driver but the recently legacy one.

I have a t410 and I can no longer use the latest nvidia driver.

Also using nvidia driver will require setting up xorg file.

2 points

Also the driver you need is probably not the latest driver but the recently legacy one.

I saw a tutorial that had one use nvidia-331 or something. What do you use?

Also using nvidia driver will require setting up xorg file.

Thank you, but well duh. Did you read what I wrote?

1 points

The best solution I've used is Bumblebee/nvidia/intel-virtual-output. It's not perfect, but it gets the job done.

2 points

Don't... don't use the term "final solution" like that, especially if you're going to capitalise it that way. It's a loaded term.

1 points
unknown author

Surely there aren't many holocaust survivors using Archlinux.

0 points

Keyboard shortcuts

Move and act

jork
Next / previous post or comment
Enteroro
Open the post
f
Open the media viewer
s
Save
h
Hide (the toast has Undo)
Tab
Right after an action: the toast's Undo
x
Collapse the comment
v
Next layout: cards, compact, grid

Go to

/
Search
gthenh
Home
gthena
All
gthens
Subreddits
gthenl
Library
?
This list
Esc
Close a menu or this list

In the viewer

←or→
Previous / next file
↑or↓
Previous / next post
korj
Previous / next post
Space
Play / pause
m
Mute
z
Zoom
s
Save
o
Open the post (on its own page: back to it)
Esc
Close

Keys do nothing while you type in a box.