Created
October 12, 2016 08:14
-
-
Save Bomberus/6059c4281ecce01af91e2f0f69b6aa1d to your computer and use it in GitHub Desktop.
GPU Switcher NVIDIA <--> Nouveau <--> VFIO-PCI
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Switch GPU Drivers | |
# Script by Pascal Maximilian Bremer | |
# === Functions === | |
# Read GPUs in System | |
lspci -v | perl -ne '/VGA/../^$/ and /VGA|Kern/ and print' | |
# Read name of selected GPU | |
# Switch GPU | |
# Detect XServer | |
# Shutdown XServer | |
# Start XServer | |
lspci -v -s 01:00.0 | grep "Kernel driver in use:" | awk -F ": " '{print $2}' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment