Browse Source

Add bumblebee script

master
Cole Deck 1 year ago
parent
commit
6df86b512f
  1. 4
      etc/bumblebee/bumblebee.conf
  2. 28
      gpuapp
  3. 4
      gpuoff.sh

4
etc/bumblebee/bumblebee.conf

@ -7,7 +7,7 @@
VirtualDisplay=:8
# Should the unused Xorg server be kept running? Set this to true if waiting
# for X to be ready is too long and don't need power management at all.
KeepUnusedXServer=true
KeepUnusedXServer=false
# The name of the Bumbleblee server group name (GID name)
ServerGroup=bumblebee
# Card power state at exit. Set to false if the card shoud be ON when Bumblebee
@ -29,7 +29,7 @@ IGCPCIVendorId=0x1002
[optirun]
# Acceleration/ rendering bridge, possible values are auto, virtualgl and
# primus.
Bridge=primus
Bridge=auto
# The method used for VirtualGL to transport frames between X servers.
# Possible values are proxy, jpeg, rgb, xv and yuv.
VGLTransport=proxy

28
gpuapp

@ -0,0 +1,28 @@
#!/bin/bash
function exit_script {
sleep 0.5
if nvidia-smi | grep "No running processes found"; then
sudo rmmod nvidia_modeset
sudo rmmod nvidia
sudo sh -c 'echo "\\_SB.PCI0.GPP0.PG00._OFF" > /proc/acpi/call'
fi
}
trap exit_script SIGINT
trap exit_script SIGTERM
if lsmod | grep nvidia; then
vblank_mode=0 primusrun "$@"
else
sudo sh -c 'echo "\\_SB.PCI0.GPP0.PG00._ON" > /proc/acpi/call'
sleep 1
vblank_mode=0 primusrun "$@"
fi
exit_script
#sleep 1
#if nvidia-smi | grep "No running processes found"; then
# sudo rmmod nvidia_modeset
# sudo rmmod nvidia
# sudo sh -c 'echo "\\_SB.PCI0.GPP0.PG00._OFF" > /proc/acpi/call'
#fi

4
gpuoff.sh

@ -1,7 +1,7 @@
#!/bin/bash
#sudo rmmod nvidia_drm
#sudo rmmod nvidia_modeset
#sudo rmmod nvidia
sudo rmmod nvidia_modeset
sudo rmmod nvidia
#sudo tee /proc/acpi/bbswitch <<<OFF
#echo $(cat /proc/acpi/bbswitch)
#sudo sh -c "echo 1 > /sys/bus/pci/devices/0000:01:00.0/remove; echo '\\_SB.PCI0.PEG0.PEGP._OFF' > /proc/acpi/call"

Loading…
Cancel
Save

Proudly self-hosted by Cole Deck. Fast loading powered by Turbo.