The Cookie Machine - Click here to drag window

DUMMY TEXT - Real text set in assets/js/theCookieMachine.js

Views: 314     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: November 24, 2022    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
}
⇧ Serious screen flickering when WiFi is on (Dell XPS 15) How are the default user folders in the home created for a new user?  â‡©