August 4, 2025

How to Use Hybrid GPU Systems (e.g., NVIDIA Optimus) in Linux

mr rockstar

How to Use Hybrid GPU Systems (e.g., NVIDIA Optimus) in Linux
Cheap Dedicated Server

Hybrid GPU systems combine an integrated GPU (typically Intel/AMD) with a dedicated NVIDIA GPU for better power efficiency and performance when needed. On Windows, NVIDIA Optimus manages this automatically—but on Linux, manual setup or specific tools are often required. Here’s how to use and manage hybrid graphics on Linux effectively.


1. Understand the Basics

Hybrid systems use the integrated GPU for low-demand tasks and switch to the dedicated GPU for graphics-intensive work. On Linux, this switching doesn’t happen automatically without configuration. You need to decide whether to run everything on the NVIDIA GPU or only specific applications.


2. Install NVIDIA Drivers

First, ensure you’re using the proprietary NVIDIA driver. On Ubuntu/Debian:
Install NVIDIA Drivers

sudo apt update
sudo apt install nvidia-driver-525
sudo reboot

(Replace 525 with the correct version for your card.)

Use nvidia-smi to confirm the driver is active:
Use nvidia-smi

nvidia-smi

3. Use a GPU Manager Tool

There are several ways to manage GPU switching:

Option 1: NVIDIA Prime (for Ubuntu-based distros)

Install and use:
NVIDIA Prime

sudo apt install nvidia-prime

To switch to NVIDIA:
To switch to NVIDIA

sudo prime-select nvidia

To switch to Intel:
To switch to Intel

sudo prime-select intel

A reboot is usually required.

Option 2: Optimus Manager (for Arch-based distros)
Optimus Manager

yay -S optimus-manager
sudo systemctl enable optimus-manager.service
sudo systemctl start optimus-manager.service

Switch GPUs using:

optimus-manager --switch nvidia

Requires logout or reboot.

Option 3: prime-run / __NV_PRIME_RENDER_OFFLOAD

On newer systems, you can offload a specific app to NVIDIA GPU:

prime-run glxgears
# or
__NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia glxinfo | grep "OpenGL renderer"

4. Check Your Current GPU Usage

To see which GPU is being used:

glxinfo | grep "OpenGL renderer"

To monitor real-time NVIDIA GPU usage:

watch -n 1 nvidia-smi

5. Troubleshooting Tips

  • Ensure Secure Boot is disabled (some distros require this for NVIDIA).
  • Blacklist nouveau driver if you face conflicts.
  • Always reboot after switching between GPUs or updating drivers.

 

How to Use Hybrid GPU Systems (e.g., NVIDIA Optimus) in Linux (F.A.Q)

Can Linux automatically switch GPUs like Windows?

Not yet fully. Some distros and desktop environments (like GNOME or KDE) offer partial support, but manual switching is more reliable.

 

 

 

Is Optimus Manager better than NVIDIA Prime?

Optimus Manager offers more flexibility on Arch-based systems, including session-based switching. NVIDIA Prime is simpler but requires a full reboot.

 

 

How do I run a single application on the NVIDIA GPU?

Use prime-run or __NV_PRIME_RENDER_OFFLOAD=1 for that application.

Will Wayland work with hybrid GPUs?

Wayland support is improving, but hybrid GPU switching is more stable on X11 as of now.

Popular Blog Posts