nvidia manual activate/reactivte

This commit is contained in:
Flinner Yuu 2022-09-15 17:41:32 +03:00
parent e7451a58b4
commit ec0c51c07a
Signed by: flinner
GPG Key ID: 95CE0DA7F0E58CA6
2 changed files with 9 additions and 0 deletions

6
bin/bin/nvidia-deactivate Executable file
View File

@ -0,0 +1,6 @@
#!/bin/bash
DEVICE_BUS_ID=$(lspci | grep "VGA compatible controller: NVIDIA" | awk '{print $1}')
sudo tee /sys/bus/pci/devices/0000:${DEVICE_BUS_ID}/remove <<<1

3
bin/bin/nvidia-reactivate Executable file
View File

@ -0,0 +1,3 @@
#!/bin/sh
sudo tee /sys/bus/pci/rescan <<< 1