Ubuntu12.10 GT650M 混合显卡/双显卡驱动安装
UEFI+WIN7+Ubuntu就够坑了,这回还来一个hybrid显卡,搜来搜去,搜到个外国友人解决方案,译来共勉
source:http://eternalvoid.net/tutorials/linux-optimus-gt650m/
先安装这几个非官方包
- sudo add-apt-repository ppa:bumblebee/stable
- sudo add-apt-repository ppa:ubuntu-x-swat/x-updates
升级系统
- sudo apt-get update
- sudo apt-get upgrade
安装几个软件 大黄蜂神码的
- sudo apt-get install build-essential ia32-libs git automake autoconf libtool virtualgl virtualgl-libs virtualgl-libs-ia32 bbswitch-dkms
- sudo apt-get build-dep bumblebee bumblebee-nvidia
下载官方驱动 (版本304.22b以后的). 64位
http://www.nvidia.com/object/linux-display-amd64-304.22-driver.html
32位:
http://www.nvidia.com/object/linux-display-ia32-304.22-driver.html
If you don't know whether you need a 64-bit or 32-bit driver, you should probably
learn a lot of things about computers before proceeding any further with
these instructions.
- lsmod | grep nouveau
若你看见任何输出(任何反映),跑下面的两句
- sudo su -
- echo "blacklist nouveau" >> /etc/modprobe.d/blacklist.conf
- echo "blacklist nvidia" >> /etc/modprobe.d/blacklist.conf
屏蔽nouveau之后就reboot吧,确认nouveau没再跑
- reboot
启动完成再检测是否已屏蔽它
- lsmod | grep nouveau
If the last command outputs nothing, you're good to continue. If instead
you see some references to nouveau, then you haven't blacklisted the module properly
and the method for doing so may be different on your system. Please make sure
you've blacklisted nouveau before continuing past this point.
如果检测无反映,即可继续
Give the NVidia driver installer the execute permission:
给驱动加权限
- chmod 755 ~/Downloads/NVIDIA-Linux-x86_64-304.22.run
Now start the NVidia driver installer with some special command line arguments. The arguments are super-important, and if you do this part wrong you'll break your existing OpenGL install, possibly not fixable without reinstalling your operating system!!:
开始装驱动,后缀非常重要,否则可能破坏已安装的opengl,可能重装才能解决
- sudo ~/Downloads/./NVIDIA-Linux-x86_64-304.22.run --no-recursion --no-rpms --no-distro-scripts --no-x-check --dkms --x-prefix=/usr/nvidia --x-module-path=/usr/lib/xorg/nvidia/modules --x-library-path=/usr/nvidia/lib --opengl-prefix=/usr/nvidia --utility-prefix=/usr/nvidia --documentation-prefix=/usr/nvidia -e -q
During the install some errors may be reported, but this should be okay, and so long
as the install completes successfully there's nothing to worry about.
安装过程中可能出现一些错误,只要最后显示'completes'就行
Copy the 32-bit libraries into the right place (this only applies to 64-bit installations):
64位的机器如下操作(不过我12.10这两行不成功也搞定了)
- sudo mkdir -p /usr/nvidia/lib32
- sudo cp -a /emul/ia32-linux/usr/lib/* /usr/nvidia/lib32
重启
- sudo reboot
Get the bumblebee git repository (because for the GT650M you need Bumblebee version 3.0.1 or newer):
取得大黄蜂
- mkdir -p ~/src
- cd src
- git clone https://github.com/Bumblebee-Project/Bumblebee.git
Configure, compile, install, and set up Bumblebee:
反正就是跑了
- cd Bumblebee
- git checkout v3.0.1
- autoreconf -fi
- ./configure --prefix=/usr --sysconfdir=/etc CONF_DRIVER=nvidia CONF_DRIVER_MODULE_NVIDIA=nvidia CONF_LDPATH_NVIDIA=/usr/nvidia/lib:/usr/nvidia/lib32:/usr/lib/xorg/nvidia/modules/drivers:/usr/lib/xorg/nvidia/modules/extensions:/usr/lib/xorg/nvidia/modules:/usr/lib/xorg/modules:/usr/lib/xorg/modules/drivers:/usr/lib/xorg/modules/extensions CONF_MODPATH_NVIDIA=/usr/lib/xorg/nvidia/modules/drivers,/usr/lib/xorg/nvidia/modules,/usr/lib/xorg/modules
- make
- sudo make install
- sudo groupadd bumblebee
- sudo addgroup _your_username_here_ bumblebee
Make sure you change _your_username_here_ above to your actual Linux regular user account name.
Configure your system to start bumblebeed during bootup. This procedure may need to be different on non-Debian-based Linux distributions:
设置大黄蜂随系统启动
- sudo cp -a scripts/sysvinit/bumblebeed /etc/init.d
- sudo chmod 755 /etc/init.d/bumblebeed
- cd /etc/rc2.d
- sudo ln -s ../init.d/bumblebeed S20bumblebeed
跑~
- sudo mv /usr/lib/xorg/nvidia/modules/libwfb.so /usr/lib/xorg/nvidia/modules/libwfb.so.bak
重启
- sudo reboot
应该搞定了,下边是测试一下独显
- optirun glxspheres
测自带的intel显卡,看对比
- glxspheres
Troubleshooting
If you followed these instructions correctly, but when running something with the
optirun command, it fails with an error similar to:
[29.675070] [ERROR]Cannot access secondary GPU - error: [XORG] (EE)
NVIDIA(0): Failed to initialize the NVIDIA kernel module. Please see
the
[ 29.675096] [ERROR]Aborting because fallback start is
disabled.
...and if your /var/log/Xorg.8.log looks similar to this: http://pastebin.com/GnFzaJcD
You should try changing a setting in your xorg.conf.nvidia like this:
- sudo gedit /etc/bumblebee/xorg.conf.nvidia &
Change:
Option "ConnectedMonitor" "DFP"
to
Option "ConnectedMonitor" "CRT"
Thanks to kudlata for figuring out this fix!
If nothing's working and you have a Lenovo or Toshiba brand system, try following
the instructions outlined here:
lenovo hack
浙公网安备 33010602011771号