上下载https://github.com/downloads/Bumblebee- ... 4.1.tar.gz
解压,make
cp bbswitch.ko /home/xxx
vi /etc/rc.local
代码: 全选
#!/bin/bash -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.
/sbin/insmod /home/xxx/bbswitch.ko
tee /proc/acpi/bbswitch <<<OFF
exit 0
否则会/etc/rc.local: 16: Syntax error: redirection unexpected
原因是:
Does your script reference /bin/bash or /bin/sh in its hash bang line? The default system shell in Ubuntu is dash, not bash, so if you have #!/bin/sh then your script will be using a different shell than you expect. Dash does not have the <<< redirection operator.