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.confthat 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
nvidiadriver instead of theinteldriver: No matter how I generate this file (by hand or withnvidia-xconfig), X simply can't connect to the display, and I'm just left with a command prompt. I'd suspect thenvidiadriver of being somehow broken, except for the fact that Bumblebee works fine, which would be impossible without a workingnvidiadriver somehow. I've triple-checked theBusID, 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 arandrorprimusrun arandrand 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
nvidiadriver and a customxorg.confas suggested on the wiki: I get basically the same result as when I edit myxorg.confto only use thenvidiadriver, namely a dead X. It seemsnvidiasimply 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'sBusIDadded to the customxorg.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.confso thatKeepUnusedXServerwastrueandPMMethodwasnone. - Copying
xorg.conf.nvidiafrom the Screenclone git to/etc/X11/and changingbumblebee.confso that under[driver-nvidia],XorgConfFilewas 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 nonexistentxorg.conf.multi.) - Running
optirun trueto start a new X server on the other screen. (Somehow.) export DISPLAY=:8in 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
arandrto arrange the screens as I desire - Run
DISPLAY=:8 nvidia-settingsto 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-outputcreates isn't killed. I don't know how to kill it; I just deactivate it inarandr. 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 ofintel-virtual-outputand can't be helped. It sure does make usingnvidia-settingsannoying, though.
I'm happy with it. Yay!
Edited 12 Apr 2015. We only hold this version.
About this post
- Posted
- Archived
- Edited
- Score
- 11 · 100% up
- Kind
- Text
- ID
- 326bl6
15 comments
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.
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.
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.
Ah yes forgot to mention the graphics card's model. Yeah, it's got to be something like that if your OSes consistently fail.
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.
Have you tried dual-booting Windows to see if that works?
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.
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.
I saw a tutorial that had one use
nvidia-331or something. What do you use?Thank you, but well duh. Did you read what I wrote?
The best solution I've used is Bumblebee/nvidia/intel-virtual-output. It's not perfect, but it gets the job done.
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.
Surely, though, this is /r/archlinux and not the World Jewish Congress?
Surely there aren't many holocaust survivors using Archlinux.