1. Computers
  2. Display Drivers
  3. Graphics Cards
  4. Memory
  5. Motherboards
  6. Processors
  7. Software
  8. Storage
  9. Operating Systems


Facebook RSS Twitter Twitter Google Plus


Phoronix Test Suite

OpenBenchmarking.org

NVIDIA Talks Of Optimus Possibilities For Linux

NVIDIA

Published on 25 January 2012 10:07 AM EST
Written by Michael Larabel in NVIDIA
124 Comments

A NVIDIA Linux engineer is trying to work on code that could lead to official Optimus support under Linux, but there's a catch... And it falls outside of NVIDIA Corp as the fate of this multi-GPU notebook feature could now fall with the Linux kernel developers.

While there's been some rudimentary Optimus hacks for Linux to use notebooks that offer an integrated graphics processor and a discrete GPU (to offer maximum performance when needed but to fall-back to only powering the IGP when in a low-power mode), NVIDIA Corp hasn't provided any official Optimus support under Linux. Now there's talk of possible support, but it's potentially to be blocked by Linux kernel developers.

Robert Morell, a long-time NVIDIA Linux engineer who's worked on the Tegra support and other areas of NVIDIA graphics, requested a kernel change (and provided a patch). He's requested that the DMA-BUF symbols be exported without the GPL license attached. This would allow DMA-BUF to be used within the binary NVIDIA Linux graphics driver, the AMD Catalyst driver, and other binary graphics drivers (i.e. many ARM SoCs), etc. This was done to the mailing list last week.

DMA-BUF is a big underlying feature of the Linux 3.3 kernel that's been worked on for months by Linaro and various Linux kernel developers. DMA-BUF is a buffer sharing mechanism so that buffers can be easily and cleanly shared between various Linux kernel drivers. Simply put, this code makes it easier to share data in a standard way between different drivers.

DMA-BUF functionality has been primarily sought after by ARM SoC vendors so that they can easily share buffers between the various SoC drivers, but there's also very real uses within the desktop graphics world as well. DMA-BUF could be used for sharing buffers between multiple graphics cards (e.g. NVIDIA SLI or CrossFire) or for sharing buffers between OpenCL devices or in cases like Optimus for sharing buffers between discrete and integrated GPUs.

DMA-BUF can be easily used by the open-source graphics drivers, and NVIDIA actually wants to use this buffer sharing mechanism by their binary drivers. The change requested by Robert Morell to export the infrastructure symbols without needing to comply with the GPL would allow this support.

David Airlie is in support of this change and acknowledges its possible use by the binary blobs for the good of the Linux desktop. "The problem is the x86 nvidia binary driver does sit outside of subsystems, and I forsee wanting to share buffers with it from the Intel driver in light of the optimus hardware. Although nouveau exists and I'd much rather nvidia get behind that wrt the kernel stuff, I don't forsee that happening."

When kernel developers began raising issues about non-GPL symbols, the NVIDIA Linux engineer chimed in with a longer response:
Yes, this is one potential use case that I have in mind.

This is digressing a bit, but the binary nvidia driver is the best way that I see that we can support our users with a feature set compatible to that available to other operating systems. For technical reasons, we've chosen to leverage a lot of common code written internally, which allows us to release support for new hardware and software features much more quickly than if those of us working on the Linux/FreeBSD/Solaris drivers wrote it all from scratch. This means that we share a lot with other NVIDIA drivers, but we for better or worse can't share much infrastructure like DRI.

I only see such hardware becoming more common. For example, in the future, if we can't agree on using EXPORT_SYMBOL, then if somebody were to introduce a laptop that had a Tegra GPU (which uses GPL-compatible open-source Linux drivers) and a GeForce GPU (which is, as described above, supported by our existing binary driver) then I imagine we'd have no choice but to re-implement a different open-source buffer allocation mechanism for Tegra that could be used between the two, or just continue using our existing nvhost code. This, along with every other SoC's version, is exactly what the dma-buf project was intended to replace.

So NVIDIA is actually talking about NVIDIA Optimus support under Linux! Robert also mentions an interesting -- possible -- Optimus configuration we haven't yet seen where a laptop would have a Tegra GPU as the low-power solution and then a higher-end GeForce GPU as the discrete solution. (This would also mean an ARM version of the mainline GeForce Linux driver.) It looks like NVIDIA clearly wants to enable such Optimus support under Linux based upon the patch so their binary driver can use DMA-BUF for its buffer sharing. But not all kernel developers support out-of-tree drivers, especially those that are not compliant with the GNU GPL.

At large, kernel developers are largely objecting to this patch on moral/legal beliefs. Robert has persisted to find out how this change can possibly move forward. Simply having an open-source (GPL) shim sitting between DMA-BUF and the blob doesn't look like it would bypass the legal restrictions. "It really seems to me that this change on a technical level won't have any adverse effect on the scenarios where it can be used today, but it will allow it to be used more widely, which will prevent duplication and fragmentation in the future and be greatly appreciated by users of hardware such as Optimus."

Alan Cox is one of the developers objecting to the change. As usual, some just call for NVIDIA to open up their driver.

If the kernel developers won't allow this symbol exporting change, NVIDIA will just need to forget about the new features under Linux or instead develop their own in-house buffer sharing system for the kernel. Developing another mechanism would -- as said by Morell -- defeat the purpose of DMA-BUF as this infrastructure was developed after there was already enough fragmentation in the Linux world by ARM driver developers. The open-source graphics drivers (Intel, Radeon, Nouveau) would additionally then need to comply with that buffer sharing mechanism too. This is sad seeing as there are many Linux desktop end-users that could benefit from the support.

About The Author
Michael Larabel is the principal author of Phoronix.com and founded the web-site in 2004 with a focus on enriching the Linux hardware experience and being the largest web-site devoted to Linux hardware reviews, particularly for products relevant to Linux gamers and enthusiasts but also commonly reviewing servers/workstations and embedded Linux devices. Michael has written more than 10,000 articles covering the state of Linux hardware support, Linux performance, graphics hardware drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated testing software. He can be followed via and or contacted via .
Latest Linux Hardware Reviews
  1. Trying The Configurable 45 Watt TDP With AMD's A10-7800 / A6-7400K
  2. Sumo's Omni Gets Reloaded
  3. AMD A10-7800 & A6-7400K APUs Run Great On Linux
  4. Radeon Gallium3D Is Running Increasingly Well Against AMD's Catalyst Driver
Latest Linux Articles
  1. Intel Sandy Bridge Gets A Surprise Boost From Linux 3.17
  2. Open-Source Radeon Graphics Have Some Improvements On Linux 3.17
  3. CPUFreq Scaling Tests With AMD's Kaveri On Linux 3.16
  4. Enabling HyperZ Is Still An Easy Way For Faster RadeonSI Performance
Latest Linux News
  1. NVIDIA Releases CUDA 6.5 As A Huge Update
  2. GNOME 3.14 Beta Makes GLSL Optional, Supports Wayland Gesture/Touch Events
  3. KDE Software Compilation 4.14 Released
  4. The Many Things You Can Build With A Raspberry Pi
  5. AMD's Catalyst Linux Driver Preparing For A World Without An X Server?
  6. Khronos Publishes Its Slides About OpenGL-Next
  7. Proposed: A Tainted Performance State For The Linux Kernel
  8. Systemd 216 Piles On More Features, Aims For New User-Space VT
  9. LXQt 0.8 Is Being Released Soon
  10. Linux 3.17 Lands Memfd, A KDBUS Prerequisite
Latest Forum Discussions
  1. Remote gui not accessible in Phoronix Test Suite 5.2
  2. The dangers of Linux kernel development
  3. Dead Island for Linux (?)
  4. Updated and Optimized Ubuntu Free Graphics Drivers
  5. AMD Offers Mantle For OpenGL-Next, Pushes Mantle To Workstations
  6. Next-Gen OpenGL To Be Announced Next Month
  7. OpenGL 4.5 Released With New Features
  8. Updated graphics drivers for Ubuntu 12.04 Precise LTS