Lenovo Y570: Ubuntu 12.04安装Nvidia, Bumblebee 3.0, CUDA5.0

转自http://blog.csdn.net/lucktroy/article/details/8445854

这几天经历各种困苦,查阅各种资料,终于在本人笔记本(Lenovo Y570)上成功安装了Nvidia, CUDA5.0. 

发现这方面的中文实在是少之又少, 终于在Ubuntu论坛上[http://ubuntuforums.org/showthread.php?t=2036010&page=2]找到了答案。


先说下电脑配置:

笔记本型号:Lenovo Y570

显卡:NVIDIA GeForce GT 555M 

系统:Ubuntu 12.04

第一步,因为是Y570笔记本,有个bug,得先纠正,具体如下:

sudo apt-get install git
git clone git://github.com/Bumblebee-Project/bbswitch.git -b hack-lenovo
cd bbswitch
sudo mkdir /usr/src/acpi-handle-hack-0.0.1
sudo cp Makefile acpi-handle-hack.c /usr/src/acpi-handle-hack-0.0.1
sudo cp dkms/acpi-handle-hack.conf /usr/src/acpi-handle-hack-0.0.1/dkms.conf
sudo dkms add acpi-handle-hack/0.0.1
sudo dkms build acpi-handle-hack/0.0.1
sudo dkms install acpi-handle-hack/0.0.1
sudo echo acpi-handle-hack | sudo tee -a /etc/modules
sudo update-initramfs -u

第二步,就安装bumblebee 3.0

sudo add-apt-repository ppa:bumblebee/stable
#If you are on Ubuntu 11.04 or older and want newer drivers (recommended) than the ones available in the official repos, run:
sudo add-apt-repository ppa:ubuntu-x-swat/x-updates
sudo apt-get update
#To install Bumblebee using the proprietary nvidia driver:
sudo apt-get install bumblebee bumblebee-nvidia

第三步,用xrandr设置分辨率

xrandr
xrandr --output LVDS1 --mode "1360x768"

第四步,测试

optirun glxspheres

第五步,安装CUDA5.0

5.1 安装所需的工具

sudo apt-get install freeglut3-dev build-essential libx11-dev libxmu-dev libxi-dev libgl1-mesa-glx libglu1-mesa libglu1-mesa-dev

5.2 Blacklist所需的模块

sudo vi /etc/modprobe.d/blacklist.conf
#在最后添加
blacklist amd76x_edac
blacklist vga16fb
blacklist nouveau
blacklist rivafb
blacklist nvidiafb
blacklist rivatv
</pre><h4></h4><h4>5.3 卸载已有的<span style="color:rgb(50,50,50); font-family:Monaco,Consolas,'Andale Mono','DejaVu Sans Mono',monospace; font-size:13.333333969116211px; line-height:26px">nvidia</span></h4><pre name="code" class="html">sudo apt-get remove --purge nvidia*

5.4 切换到命令模式:Ctrl+Alt+F1

(1) 关闭lightdm

sudo /etc/init.d/lightdm stop
(2) 运行下载的NVIDIA*.run

sudo sh NVIDIA*.run

5.5 设置环境变量

#32 bit systems -
export PATH=$PATH:/usr/local/cuda-5.0/bin
export LD_LIBRARY_PATH=/usr/local/cuda-5.0/lib

#64 bit systems -
export PATH=$PATH:/usr/local/cuda-5.0/bin
export LD_LIBRARY_PATH=/usr/local/cuda-5.0/lib64:/lib

5.6 安装CUDA Sample有可能会失败,如果遇到这种情况, 按照下面的修改,之后重复5.4的操作


sudo find /usr -name libglut\*
显示结果:
/usr/lib/x86_64-linux-gnu/libglut.so.3
/usr/lib/x86_64-linux-gnu/libglut.so.3.9.0
/usr/lib/x86_64-linux-gnu/libglut.a
/usr/lib/x86_64-linux-gnu/libglut.so
解决方法:
sudo ln -s /usr/lib/x86_64-linux-gnu/libglut.so.3 /usr/lib/libglut.so

参考:

[1] Lenove补丁安装 http://ubuntuforums.org/showthread.php?t=2036010&page=2

[2] Bumblebee 3.0 http://bumblebee-project.org/install.html

[3] xrandr使用 http://www.2cto.com/os/201202/121012.html

[4] CUDA5.0安装 http://sn0v.wordpress.com/2012/12/07/installing-cuda-5-on-ubuntu-12-04/


你可能感兴趣的:(Lenovo Y570: Ubuntu 12.04安装Nvidia, Bumblebee 3.0, CUDA5.0)