Skip to content

Commit

Permalink
Added loading and unloading of relevant modules
Browse files Browse the repository at this point in the history
  • Loading branch information
Witko authored Sep 1, 2016
1 parent 04e794c commit bf1eeab
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions nvidia-xrun
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,26 @@ COMMAND="xinit $EXECL -- $NEWDISP vt$LVT -nolisten tcp -br -config nvidia-xorg.c

echo 'Waking up nvidia GPU'
execute "sudo tee /proc/acpi/bbswitch <<<ON"

echo 'Loading nvidia module'
execute "sudo modprobe nvidia"

echo 'Loading nvidia_drm module'
execute "sudo modprobe nvidia_drm"

execute $COMMAND

echo 'Unloading nvidia module'
execute "sudo rmmod nvidia"

echo 'Unloading nvidia_modeset module'
execute "sudo rmmod nvidia_modeset"

echo 'Unloading nvidia_drm module'
execute "sudo rmmod nvidia_drm"

echo 'Turning off nvidia GPU'
execute "sudo tee /proc/acpi/bbswitch <<<OFF"

echo -n 'Current state of nvidia GPU: '
execute "cat /proc/acpi/bbswitch"

0 comments on commit bf1eeab

Please sign in to comment.