Nvidia Optimus

By Blue2k on Friday 28 December 2012 23:16 - Comments (5)
Category: -, Views: 2.730

One of the first things I do when I buy a new computer? Get Gentoo installed on it. I find it's the best way to get familiar with the new hardware and somehow feel like I'm in control over this new piece of machinery. Sure, getting it installed on the MacBook Pro that I bought a couple of years ago was no small feat. It took me about a month to get it all working natively (EFI) and supporting switching between the integrated Intel GPU and the dedicated ATI GPU... But boy, did I learn a lot about EFI and grub2 in the process.

I just bought the new Razer Blade, which comes with an NVidia 660m GTX and an integrated Intel HD 4000 chipset (Ivy Bridge). Assuming it followed the same pattern as the MacBook Pro that I own, I tried getting the dedicated NVidia chip set up to run Xorg on. I'd then worry about getting the Intel chip enabled later. Ironically, the only chip I could get recognized was the Intel chip... The NVidia kernel module could not find any NVidia hardware.

Enter Optimus... I was somewhat puzzled by my Gentoo experience on this laptop and started looking around on the internet. I had read about this laptop featuring 'Optimus' but I somewhat wrote it off as a buzzword. The Wikipedia page however started to change my perception a little. It appears that the two GPUs have a symbiotic relationship, as opposed to the 'friendly' relationship they had in older laptops. The dedicated GPU can not function without the integrated GPU! The dedicated GPU renders into the integrated GPU's frame-buffer when active. This allows for a combined final result where only part of the screen is rendered by a dedicated GPU.

As I looked back at the somewhat confused output from the NVidia kernel module I wondered how many properties I would have to add to my xconfig file to get this all to work. Only to then realize that all the configuration in the world wouldn't help with my kernel module. I headed back to Google and ended up at the Bumblebee project. It's an opensource attempt to get the Optimus technology to function on Linux. Reading a bit more on the forums there I learned that NVidia has no intention to support Optimus with the proprietary NVidia Linux drivers... It managed to get them the finger from Linus.

So, the approach to getting a laptop with Optimus technology to run Xorg is to configure Xorg with the Intel GPU and then use Bumblebee to get the dedicated GPU activated. The only way to leverage the dedicated GPU at that point is to launch applications with Bumblebee's 'optirun' executable which will then render the application's graphical output into the integrated GPU's frame-buffer. While I applaud the technology in principle, I'm very disappointed with the total lack of support from a Linux perspective.

Volgende: PCSX2 01-'13 PCSX2
Volgende: My love for... Psion - Part 2 04-'11 My love for... Psion - Part 2


By RSpliet, Friday 28 December 2012 23:26

There's more work in progress than just Bumblebee. A more promising (but less finished) project is called DRM Prime. This is an actual kernel infrastructure for transferring the buffers from the nVidia to the Intel card. One of the main advantages then is that hardware copy can be used easier, resulting in higher throughput. The downside: it's not stable yet.
The open-source Nouveau driver will probably be the first to support this infrastructure. I'm unsure whether the APIs of DRM Prime and the DMABUF back-end are GPL-only. If not, the official nVidia driver might support this in the future. From what I've heard (but no official sources) nVidia is exploring the possibilities of supporting this the DMABUF backend in their official driver.

By Tweakers user Blue2k, Saturday 29 December 2012 00:13

Interesting, it looks like DRM Prime is based on an idea that has been around for a while. Thanks for the reference, it didn't come up in earlier searches. I've always been a supporter of NVidia partially because their Linux driver performance has been relatively good (although proprietary). The current state of affairs is disappointing.

By Tweakers user Gropah, Saturday 29 December 2012 01:18

I thought DRM Prime was already intregateble into bumble, after which you could run it with primus instead of optirun?

By Tweakers user Thedr, Saturday 29 December 2012 14:16

As far as I know the performance increase from running with primusrun instead of optirun comes from omitting the transfer of framebuffer data via a network stack and using a more direct (DMA?) way of copying the data. Primusrun uses the Bumblebee backend. However this is a very nice and quite well working initiative, there's still a lot of work to do before it can compete with the functionality of the Windows version (e.g. automatic switching). I'm at least very happy to be able to benefit of both the energy efficient IGP and the powerful GPU when needed :)

[Comment edited on Saturday 29 December 2012 14:17]

By Tweakers user br men, Saturday 29 December 2012 14:32

DRM Prime/DMABUF will be gpl-only and thus blocking the closed source nvidia driver.
Nvidia is working on getting optimus working with the closed source linux driver though.


Comments are closed