SDB:NVIDIA SUSE Prime

Jump to: navigation, search


Tested on openSUSE

Recommended articles

Icon-manual.png


SUSE Prime is a tool used for switching between integrated Intel GPU and NVIDIA GPU on Optimus laptops. It is alternative to Bumblebee.

With SUSE Prime setup, all applications render either on Intel or on NVIDIA. You can switch between them using a prime-select tool. Log-out and log-in is required for the change to take effect.

Warning: SUSE Prime is a setup for X server. It does not work with Wayland.

Situation

You have Optimus laptop and want ability to switch between NVIDIA and Intel GPUs.


Procedure

  • Install the NVIDIA proprietary driver: SDB:NVIDIA drivers
  • Make sure you have no /etc/X11/xorg.conf file and no configuration files with "ServerLayout", "Device" or "Screen" sections in the /etc/X11/xorg.conf.d directory. (Clean installation fulfills that.)
  • Install the suse-prime package.

Usage

To switch between Intel and NVIDIA, run as root:

# prime-select nvidia

or

# prime-select intel

Then log out and log in to apply the changes.

Verification

To verify which GPU is in use, you can compare the output of following commands:

Intel

# xrandr --listproviders
    Providers: number : 1
    Provider 0: ... associated providers: 0; name: modesetting
# glxinfo | grep 'OpenGL renderer string'
    OpenGL renderer string: Mesa DRI Intel(R) Ivybridge Mobile

NVIDIA

# xrandr --listproviders
    Providers: number : 2
    Provider 0: ... associated providers: 1; name: NVIDIA-0
    Provider 1: ... associated providers: 1; name: Intel
# glxinfo | grep 'OpenGL renderer string'
    OpenGL renderer string: GeForce GT 640M LE/PCIe/SSE2

How does it work?

The prime-select script modifies two things in the system:

  • Switches the X server's GLX extension between the original and NVIDIA implementations.
  • Copies either /etc/prime/xorg-nvidia.conf or /etc/prime/xorg-intel.conf into the /etc/X11/xorg.conf.d directory.

When the Intel option is selected, the X server is configured to completely ignore the NVIDIA card. The NVIDIA driver will keep it sleeping.

When the NVIDIA option is select, X server will use both cards - NVIDIA for rendering and Intel as output provider. The configuration of output provider is done automatically by the X server on start.

Customizing the configuration

If you need change the "Screen", "Device" or "ServerLayout" sections of X configuration, make you changes in the /etc/prime/xorg-nvidia.conf or /etc/prime/xorg-intel.conf files.

Any other sections (e.g. input device configurations) can be done in files in the /etc/X11/xorg.conf.d directory.