我有用過 GT540M 在 debian 上跑過 SETI,分數普普啦。至於採 Bumblebee 切換使用,我個人不太喜歡這種方式,也因為平常工作不需要獨顯加持,索性把它關了,還有兩個好處,一是省電又不熱,二是不用擔心獨顯掛掉的問題。

我以前有過兩三次因為筆電獨顯過熱而故障的經驗,所以挑筆電的時候特別注意這個,至於現在的筆電是公司提供的,加減用。
進入正題,使用 acpi_call module 來開關你的獨顯:
https://github.com/mkottman/acpi_call
# git clone http://github.com/mkottman/acpi_call.git
# cd acpi_call
# make
# insmod acpi_call.ko
先看看關掉獨顯之前,溫度大約 55度,lspci 顯示:
# lspci -vnnn | grep VGA
01:00.0 VGA compatible controller [0300]: NVIDIA Corporation GF108 [GeForce GT 540M] [10de:0df4] (rev a1) (prog-if 00 [VGA controller])
執行關閉獨顯的 script:
# ./test_off.sh
Trying \_SB.PCI0.P0P1.VGA._OFF: failed
Trying \_SB.PCI0.P0P2.VGA._OFF: failed
Trying \_SB_.PCI0.OVGA.ATPX: failed
Trying \_SB_.PCI0.OVGA.XTPX: failed
Trying \_SB.PCI0.P0P3.PEGP._OFF: failed
Trying \_SB.PCI0.P0P2.PEGP._OFF: failed
Trying \_SB.PCI0.P0P1.PEGP._OFF: failed
Trying \_SB.PCI0.MXR0.MXM0._OFF: failed
Trying \_SB.PCI0.PEG1.GFX0._OFF: failed
Trying \_SB.PCI0.PEG0.GFX0.DOFF: works! <== 我的顯示卡是這行,請找到屬於你的
再來看看關閉獨顯後,溫度大概降至 50度,lspci 顯示:
# lspci -vnnn | grep VGA
01:00.0 VGA compatible controller [0300]: NVIDIA Corporation GF108 [GeForce GT 540M] [10de:0df4] (rev ff) (prog-if ff)
可以把它加在開機後執行,編輯你的 /etc/rc.local 加入:
insmod /root/acpi_call/acpi_call.ko
./root/acpi_call/test_off.sh
可以關閉,當然也要可以開啟:
# cp test_off.sh test_on.sh
# vi test_on.sh
找到屬於你的顯示卡的那一行,我的是 \_SB.PCI0.PEG0.GFX0.DOFF,把 OFF 改成 ON,例如 \_SB.PCI0.PEG0.GFX0.DON,存檔離開即可。
*1 http://www.nvidia.com.tw/object/optimus_technology_tw.html
*2 http://www.techbang.com/posts/9858-why-linus-torvalds-publicly-say-nvidia-fuck-you
*3 http://yblog.org/archive/index.php/12110
沒有留言:
張貼留言