9

I am asking this question because I have found articles basically saying that some computers have enabled Optimus technique with some propriatory graphics drivers, for example this one from Ubuntu Wiki page and this one from pilot6, while a lot of people are still seeking methods to install Bumblebee over internet. So, I got confused. Meanwhile, although my laptop, Lenovo Thinkpad P50, is listed on the document linked above as a supported system, but I haven't make the propriatory nvidia-361 driver successfully installed (see this question) which is told by the document to be working on my system. I have a little suspect about the authority of the document.

Could anyone offer some reliable sources, evidence and real experiences (or techniques to confirm if no success instance found yet) to confirm Ubuntu 16.04 indeed natively supports hybrid graphics -- one integrated card and one discrete card -- no worse than Bumblebee? I haven't built enough confidence by simple searching. Thanks!

16

Currently, you have (at the best of my knowledge) three possibilities regarding Nvidia hybrid graphics (the so-called Optimus technology) under Linux:

  • Bumblebee. While this project might seem dead, it’s not (discloser: I’m part of the dev team). It has been slowly developing for a very long time, because we were all quite busy, but things have gone better recently, and we received help from new contributors. The 4.0 version is on track, it’s mostly bug fixes and the primus backend becoming the default (most people won’t notice since they were already using it). Bumblebee allows you to run your desktop and display on the integrated Intel chip, while running selected applications on the discrete Nvidia card. It can use either nouveau or nvidia driver (given that they support your card, which they should both do), and relies on bbswitch for power management (with the option of using vga_switcheroo if using nouveau). On the performance side, because of how it works, Bumblebee is PCIe bottlenecked, which means you can not achieve very high framerates (which is not really usefull anyway) but also that you can never reach the full power of your dedicated Nvidia card. In case some of the display outputs on your laptop are wired to the Nvidia chip (often the case of HDMI on Lenovo laptop), Bumblebee allows you to use them, but it requires a bit of configuration, is probably far less than ideal and above all not tested since no any of Bumblebee devs own an affected laptop. Otherwise, Bumblebee works with either DRI2 or DRI3.
  • PRIME. This is the proper solution for this technology, and is implemented at the right level: drivers, kernel, Xorg… PRIME allows you the same setup as Bumblebee, however, due to legal concerns, only nouveau is supported. Outside of that, it has also some issues with tearing because of changes needed in the i915 driver. Also, nouveau still has a lot of issues regarding performances, so until it gets proper reclocking, you might have less perfs than in the Bumblebee + nvidia setup (Bumblebee + nouveau suffers from the same issue obviously). PRIME does not rely on bbswitch for power management, but rather use nouveau/kernel integrated one. PRIME also allows you to use outputs wired to the Nvidia chip quite transparently AFAIK. When running on DRI2, it requires a bit of configuration (depending on whether you also have Bumblebee/bbswitch installed, the exact amount may vary), but nothing outstanding. VDPAU is supported too in this mode (but only with nouveau driver again). When running on DRI3, it’s very seemless to use (so much that Bumblebee will probably gain support for this mode in the next release). However, you don’t get VDPAU support, and apparently no Nvidia outputs support either.
  • Reverse PRIME. Here, the idea is to use the Nvidia card for everything including the desktop, and only use the Intel chip as an output sink for the laptop display. This is supported by both nouveau (with the same performances issues as above) and nvidia (with the dedicated nvidia-prime tool under Ubuntu for instance). This means you don’t get powersaving at all (and get increased power consumption at all stages), but as with PRIME you can easily and fully utilize any display output. In this mode, you get the best of your dedicated card when using the nvidia driver. This is also the only configuration where you can get VDPAU working on the Nvidia chip using the nvidia driver. However, it has also some issues with tearing because of changes needed in the i915 driver. This mode only works with DRI2. In fact, this is for the same reason as why you can’t use outputs in PRIME+DRI3: Reverse PRIME is in fact the name of the support for using another card outputs (whether it’s Intel ones while running on Nvidia here or Nvidia ones when running on Intel above), and that currently does not work under DRI3.

Note that things like CUDA or OpenCL do not require any of these tools, just a bit of configuration, but Bumblebee as a mode to use them easily while still getting its other advantages.

PRIME and Bumblebee can cohabit when using DRI3, but under DRI2 or switching to Reverse PRIME requires a switch of configuration files and restarting the X server. So, depending on your needs, this is what I would advice:

  1. If you don’t care about performances, but care about ease of utilisation (for external outputs mainly — if affected) and FLOSS, go for PRIME.
  2. If you care a bit more on performances but often use your laptop in battery mode and don’t want to restart your X server all the time, go for Bumblebee.
  3. If you care about performances and mostly use your laptop while plugged on AC (and don’t care about some extra W saving), take a look at Reverse PRIME using nvidia (you can use nvidia-prime to switch to Intel only mode when running occasionally on battery, but I’m not sure if the Nvidia card is turned off in this setup).
  • Thank you for clarifying on this matter--especially you are in the Bumblebee dev team! Appreciate your time! I will be waiting for the release of Bumblebee 4.0 and hopefully the installation on a Thinkpad mobile workstation is easy enough! – Xiaodong Qi May 22 '16 at 2:13
  • This comprehensive answer is now almost 6 months old. In the meantime, with nVidia driver 370.28, Ubuntu 16.10 with kernel 4.8, has anything changed or even improved? – youri Nov 12 '16 at 9:34
  • Yes, they have been changes, especially regarding power management with kernel 4.8 on newer laptops. Namely, bbswitch doesn’t work very well without a specific kernel option in this case (see github.com/Bumblebee-Project/bbswitch/issues/140), and more generally needs to be updated for recent methods. This is ongoing work, but no ETA. Regarding PRIME, nouveau still lacks proper reclocking as of today. So no real news here AFAIK. Regarding Reverse PRIME, they have been some patches/updates that enhanced the situation, but still far from ideal. – Archange Nov 22 '16 at 23:27
  • Note: regarding Reverse PRIME issues, one big thing that ongoing is PRIME Synchronization, see here devtalk.nvidia.com/default/topic/957814/linux/…. – Archange Feb 12 '17 at 18:37
  • Could you point to an help on how to install and configure Reverse PRIME to use it the way you describe it ? – mxdsp Aug 21 '17 at 12:56
3

Ubuntu 16.04 of course supports hybrid graphics solutions, especially notebooks that have intel graphics and NVIDIA graphics with Optimus support. Do NOT install bumblebee, it is not under development anymore, the latest version is from April 2013. The solution to switch between the two graphics today is nvidia-prime, which is available in the official Ubuntu repositories. Most important to get everything working properly is the way the drivers are getting installed. Here you find the instructions to install the drivers with a high chance that everything works properly :

Install NVIDIA drivers

  • I have Ubuntu 16.0.4.1 and Bumblebee works ok for me. – QkiZ Sep 19 '16 at 13:18
  • Bumblebee worked for me, after slogging away for hours with all the NVIDIA driver posts on Askubuntu. Have Nvidia 960m. – Khashir Oct 24 '16 at 19:01
  • I have an old Thinkpad quadcore W520 with optimus (Quadro 1000M) & ubuntu 16.04. I have it working with Nvidia proprietary drivers, and three screens (two DP monitors via a Lenovo dock, and the laptop panel). However, I could not get Unity to display three panels, I needed to use Xfce (although with lightdm, Unity's display manager). – Tim Richardson Dec 5 '16 at 7:48
1

A reason to install bumblebee instead of nvidia-prime is that with bumblebee you can switch easier between both GPUs. With nvidia-prime you can only select a single GPU for an X session. That means that if you want to switch GPU, the X session has to be restarted. With bumblebee, it is not necessary to restart the X server.
This blog contains installation instructions for bumblebee on 16.04. The comments section also discusses the reason to install bumblebee instead of nvidia-prime in more detail.

  • 1
    I suggest to briefly summarize some of the comments in the original post here. There are important points attract people to still consider non-active Bumblebee or make NVidia tools better. – Xiaodong Qi May 9 '16 at 22:12
1

PRIME works perfectly well with NVidia proprietary drivers now(mine is 367), so my guess is, even though @Archange's answer is very extensive and detailed, PRIME has no performance implications any longer, and is probably the best option in terms of performance now.

@Archange, or did you mean that with nouveau it can really happen automatically, Windows-style?

  • 1
    Plus, Mir and Unity are making display management easier. – Xiaodong Qi Nov 13 '16 at 3:29

protected by Community Dec 14 '16 at 21:17

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.