Created
March 19, 2022 21:11
-
-
Save michelesr/dfa8630848405af3e242ce4912565b7f to your computer and use it in GitHub Desktop.
Turn NVIDIA discrete card on
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/bash | |
set -ex | |
CONTROLLER_BUS_ID=0000:00:01.0 | |
DEVICE_BUS_ID=0000:01:00.0 | |
sudo tee /sys/bus/pci/devices/${CONTROLLER_BUS_ID}/power/control <<<on | |
sleep 1 | |
sudo tee /sys/bus/pci/rescan <<<1 | |
sleep 1 | |
sudo tee /sys/bus/pci/devices/${DEVICE_BUS_ID}/power/control <<<auto | |
sudo tee /sys/bus/pci/devices/${CONTROLLER_BUS_ID}/power/control <<<auto | |
sudo modprobe nvidia | |
# modeset:Enable atomic kernel modesetting (1 = enable, 0 = disable (default)) (bool) | |
sudo modprobe nvidia_drm modeset=0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment