Views:
536
Votes: 2
Tags:
nvidia
graphics
amd-graphics
vga
Link:
🔍 See Original Answer on Ask Ubuntu ⧉ 🔗
URL:
https://askubuntu.com/q/1064740
Title:
How to install 2 Graphics drivers, and have Ubuntu detect and load which one (without conflict)
ID:
/2018/08/12/How-to-install-2-Graphics-drivers_-and-have-Ubuntu-detect-and-load-which-one-_without-conflict_
Created:
August 12, 2018
Upload:
September 15, 2024
Layout: post
TOC:
false
Navigation: false
Copy to clipboard: false
Ubuntu automatically detects which GPU is installed in your machine. If you want a script to switch between Nvida and Intel drivers I’ve found one you can modify here: bauca/graphics-switcher
It will require the program glxinfo
which you can get by installing:
sudo apt install mesa-utils
One key function in the bash script that will interest you is this one:
function CheckForCurrentVideoCardInUse {
local _VIDEO_CARD=`glxinfo|egrep "OpenGL vendor|OpenGL renderer*"`
if [[ $_VIDEO_CARD == *"NVIDIA"* && $_VIDEO_CARD == *"GeForce"* ]]; then
CURRENT_VIDEO_CARD="NVIDIA"
elif [[ $_VIDEO_CARD == *"Intel"* ]]; then
CURRENT_VIDEO_CARD="INTEL"
else
ErrorHandler
fi
}