Skip to content

A small utility to switch graphics on Intel-Nvidia dual graphics devices on Linux

License

Notifications You must be signed in to change notification settings

prasadthx/Intel-Nvidia-Switch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Intel-Nvidia-Switch

A small utility to switch graphics on Intel-Nvidia Hybrid graphics devices on Linux

It Provides:-

  1. Switch GPU to Intel Only, switching off Nvidia.
  2. Switch GPU to Hybrid, Intel and Nvidia both.
  3. Switch GPU to Nvidia Only.
  4. Run Programs on Nvidia GPU in Hybrid mode.

Installation

Install The Proprietary NVIDIA drivers according to the linux kernel installed(nvidia/nvidia-lts).

For Arch Linux Users:-

  1. Use AUR Helpers. eg:-
paru -S intel-nvidia-switch-bin
  1. Using PKGBUILD provided in source code(From arch-linux-pkg directory).
makepkg -si

For other Distros:-

Get the release or download the source code and run:-

sudo ./install.sh

Usage:-

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.

  1. 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
  1. To switch to Intel Only Mode:
sudo intel-nvidia-switch --switch intel
  1. To switch to Hybrid Mode:
sudo intel-nvidia-switch --switch hybrid
  1. To switch to Nvidia Mode:
sudo intel-nvidia-switch --switch nvidia

Working:-

  1. https://wiki.archlinux.org/title/Hybrid_graphics#Fully_power_down_discrete_GPU
  2. https://wiki.archlinux.org/title/PRIME#PRIME_render_offload
  3. https://wiki.archlinux.org/title/NVIDIA_Optimus#Use_NVIDIA_graphics_only

About

A small utility to switch graphics on Intel-Nvidia dual graphics devices on Linux

Resources

License

Stars

Watchers

Forks

Packages

No packages published