#!/bin/bash # This script should contain the command(s) necessary to switch off the # nVidia card. # Examples are available in /usr/share/doc/bumblebee modprobe -r nvidia if lsmod | grep -q nvidia; then echo "Error: could not unload nvidia module, leaving card turned on" exit fi modprobe acpi_call if ! lsmod | grep -q acpi_call; then echo "Error: acpi_call module not loaded" exit fi acpi_call () { echo "$*" > /proc/acpi/call result=$(cat /proc/acpi/call) case "$result" in Error*) echo "Disabling nVidia card failed ($result)." ;; *) echo "Disabling nVidia card succeeded." ;; esac } echo DOFF $(acpi_call "\_SB.PCI0.P0P2.PEGP._OFF")