分页: 1 / 1

用bbswitch关闭nVIDIA OPTIMUS独显

发表于 : 2012-02-25 9:46
bigsun
https://github.com/Bumblebee-Project/bbswitch
上下载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
注意将首行/bin/sh改成/bin/bash,
否则会/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.

Re: 用bbswitch关闭nVIDIA OPTIMUS独显

发表于 : 2012-02-25 11:16
lovelyzlf
does it really work??

Re: 用bbswitch关闭nVIDIA OPTIMUS独显

发表于 : 2012-02-25 12:36
bigsun
好象有点用。

tee /proc/acpi/bbswitch <<<ON
打开时:
grep rate /proc/acpi/battery/BAT0/state
present rate: 20809 mW

tee /proc/acpi/bbswitch <<<OFF
关闭时:
grep rate /proc/acpi/battery/BAT0/state
present rate: 17320 mW=

能省15%。

http://billhsu.me/?p=103上测试能省20-30%