NVIDIA Optimus

From ArchWiki
Revision as of 02:20, 20 July 2013 by Kynikos (Talk | contribs) (link to existing articles)

Jump to: navigation, search

NVIDIA Optimus is a technology where two GPUs are built into a Computer, one is an Intel GPU integrated in the CPU and the other one is a discrete NVIDIA GPU.

Powering on/off the NVIDIA GPU

It is recommended to use bbswitch to control the power state of the NVIDIA GPU To turn it on, do

# tee /proc/acpi/bbswitch <<< ON

note: You will need to unload nouveau/nvidia kernel modules before you can turn off the GPU, e.g.

# rmmod nouveau
# tee /proc/acpi/bbswitch <<< OFF

Using NVIDIA Optimus with powersaving

See the Bumblebee article.

Using NVIDIA Optimus without powersaving

It is possible to offload rendering to the NVIDIA GPU using the features of xrandr 1.4. The disadvantage of this method is that you can't turn off the GPU as long as the X server is running.

Opensource nouveau driver

The nouveau driver fully supports xrandr 1.4. Install xf86-video-nouveau and xf86-video-intel. Remove /etc/X11/xorg.conf.d/20-intel.conf if it exists. Turn on the GPU and load the nouveau kernel module:

# modprobe nouveau

Now you can start X and it should autodetect your GPUs. You can check that like this:

$ xrandr --listproviders

It should give you somethng like this:

Providers: number : 2
Provider 0: id: 0x8a cap: 0xb, Source Output, Sink Output, Sink Offload crtcs: 2 outputs: 2 associated providers: 0 name:Intel
Provider 1: id: 0x66 cap: 0x7, Source Output, Sink Output, Source Offload crtcs: 2 outputs: 5 associated providers: 0 name:nouveau

you can associate the Intel GPU as the offload sink of the NVIDIA one:

$ xrandr --setprovideroffloadsink nouveau Intel

(you can address the GPUs by id or by name)

now you can run programs on the NVIDIA GPU like this:

$ DRI_PRIME=1 glxgears

Official NVIDIA drivers

The official NVIDIA driver partly supports xrandr 1.4. It does not support the method described above, but it does support setting provider output source. You will have to remove bumblebee as it conflicts with nvidia-libgl. You also need to install xf86-video-modesetting and nvidia. Follow the instructions on this website.