Prime-select intel not shutting off nvidia GPU

Solution 1:

See answer here https://unix.stackexchange.com/a/420273. Once you have switched into Intel mode you can do the command

sudo tee /proc/acpi/bbswitch <<<OFF

to turn off the GPU. Likewise to turn it back on again you can do

sudo tee /proc/acpi/bbswitch <<<ON

Preferabbly I would like this to automatically run during Intel mode instead of manually entering it after every boot. If anyone has a suggestion for how to do this it would be much appreciated.