A small utility to switch graphics on Intel-Nvidia Hybrid graphics devices on Linux
- Switch GPU to Intel Only, switching off Nvidia.
- Switch GPU to Hybrid, Intel and Nvidia both.
- Switch GPU to Nvidia Only.
- Run Programs on Nvidia GPU in Hybrid mode.
Install The Proprietary NVIDIA drivers according to the linux kernel installed(nvidia/nvidia-lts).
- Use AUR Helpers. eg:-
paru -S intel-nvidia-switch-bin
- Using PKGBUILD provided in source code(From arch-linux-pkg directory).
makepkg -si
Get the release or download the source code and run:-
sudo ./install.sh
Usage: intel-nvidia-switch [OPTIONS]
Options:
-S, --switch <SWITCH> Choose the Graphics Mode: Nvidia or Intel or Hybrid
--run <RUN> Run any program with Nvidia GPU in Hybrid Mode
-h, --help Print help information
-V, --version Print version information
It sets a Global Environment Variable (GPU_STATUS) in the system according to the GPU mode. The default mode on installation is Hybrid Mode.
- To run a program on Nvidia GPU in Hybrid Mode
intel-nvidia-switch --run "<program_name>"
Example:
[prasad@ArchLinux ~]$ echo $GPU_STATUS
hybrid
[prasad@ArchLinux ~]$ glxinfo | grep "OpenGL renderer"
OpenGL renderer string: Mesa Intel(R) UHD Graphics 630 (CFL GT2)
[prasad@ArchLinux ~]$
[prasad@ArchLinux ~]$ intel-nvidia-switch --run "glxinfo | grep 'OpenGL renderer'"
Running on Nvidia.....
OpenGL renderer string: NVIDIA GeForce GTX 1650 with Max-Q Design/PCIe/SSE2
- To switch to Intel Only Mode:
sudo intel-nvidia-switch --switch intel
- To switch to Hybrid Mode:
sudo intel-nvidia-switch --switch hybrid
- To switch to Nvidia Mode:
sudo intel-nvidia-switch --switch nvidia