Add bumblebee script

master
Cole Deck 4 years ago
parent 98ce58602e
commit 6df86b512f

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

@ -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

@ -1,7 +1,7 @@
#!/bin/bash #!/bin/bash
#sudo rmmod nvidia_drm #sudo rmmod nvidia_drm
#sudo rmmod nvidia_modeset sudo rmmod nvidia_modeset
#sudo rmmod nvidia sudo rmmod nvidia
#sudo tee /proc/acpi/bbswitch <<<OFF #sudo tee /proc/acpi/bbswitch <<<OFF
#echo $(cat /proc/acpi/bbswitch) #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" #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