Run apps on the discrete NVIDIA GPU (PRIME offload) with one command.
nvidia-prime-runner targets hybrid Intel+NVIDIA laptops on Debian/Ubuntu. It applies per-process PRIME offload and does not switch the entire desktop session.
curl -fsSL https://raw.githubusercontent.com/YrustPd/nvidia-prime-runner/main/scripts/install.sh | sudo bashInstalls nvidia-run to /usr/local/bin and adds a .bashrc marker block for the banner.
Security note: review scripts before running curl|bash, and prefer local installs when possible.
nvidia-run firefox-esrnvidia-run shellnvidia-run verify
glxinfo -B | grep renderercurl -fsSL https://raw.githubusercontent.com/YrustPd/nvidia-prime-runner/main/scripts/uninstall.sh | sudo bashsudo ./scripts/install.shsudo ./scripts/uninstall.shDefault run:
nvidia-run <command> [args...] runs a command with PRIME offload.
Subcommands:
run <command|file> [args...]Explicit run mode (same behavior as default).shellStart an interactive shell with PRIME offload enabled.verifyPrint verification commands for renderer checks.helpor--helpShow usage.versionor--versionShow the version string.
Flags:
--dry-runPrint environment variables and the command that would run.--verbosePrint environment variables and execution details.--no-bannerShell mode only; suppresses the banner hook.
- Sets
DRI_PRIME=1,__NV_PRIME_RENDER_OFFLOAD=1, and__GLX_VENDOR_LIBRARY_NAME=nvidiafor the launched process. - Shell mode sets
NVIDIA_SHELL=1; the banner can be suppressed withNVIDIA_NO_BANNER=1. - PRIME offload is per-process; the desktop session remains on the integrated GPU.
- Hybrid Intel+NVIDIA hardware with PRIME offload support.
- Working Mesa PRIME setup and GPU drivers.
mesa-utilsrecommended forglxinfoandglxgears.- Driver note: nouveau has limitations; proprietary NVIDIA drivers often work better, but results vary by system.
Baseline (Intel):
glxinfo -B | grep rendererWith offload (NVIDIA):
nvidia-run glxinfo -B | grep renderer
# or
DRI_PRIME=1 glxinfo -B | grep rendererOptional detail:
nvidia-run glxgears -info | grep -E "GL_RENDERER|GL_VENDOR|GL_VERSION"Example NVIDIA renderer line: GL_RENDERER = NVD7 (exact string varies by GPU).
- The installer creates
~/.bashrc.backup-YYYYmmdd-HHMMSSbefore changes. - Marker lines:
# >>> NVIDIA-RUN START >>># <<< NVIDIA-RUN END <<<
docs/usage.mddocs/troubleshooting.mddocs/constraints.mddocs/developer.mddocs/release.mddocs/release-notes-v1.0.0.md
make lint,make test,make install,make uninstall,make package- Man page:
man/nvidia-run.1 - Packaging:
./scripts/package.shwritesdist/nvidia-prime-runner-<version>.tar.gz
- GNU Affero General Public License v3.0 (AGPL-3.0): https://www.gnu.org/licenses/agpl-3.0.html
- See
SECURITY.mdfor reporting vulnerabilities.
- See
CODE_OF_CONDUCT.mdfor community guidelines.