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.

检测nouveau 核心模组是否已载入

    • lsmod | grep nouveau

若你看见任何输出(任何反映),跑下面的两句

    • sudo su -
    • echo "blacklist nouveau" >> /etc/modprobe.d/blacklist.conf

 

 

黑名单屏蔽nvidia模块,因为咱不想让他自动安装

    • 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

 

 

Reboot:

重启

    • 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. 

上边语句中的_your_username_换成自己的用户名

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

 

 

Rename an NVidia X server module to keep it from being loaded through bumblebee, because X really needs to load the stock version instead to work properly:

跑~

    • sudo mv /usr/lib/xorg/nvidia/modules/libwfb.so /usr/lib/xorg/nvidia/modules/libwfb.so.bak

 

 

Reboot:

重启

    • sudo reboot

 

 

If all went well, you can now run programs using your discrete NVidia card by launching them with the optirun command, like this:

应该搞定了,下边是测试一下独显

    • optirun glxspheres

 

 

And, you still have your stock OpenGL stuff installed, so when you don't want to use the better video card, you can run programs as normal and they will be run using the primary display device. You can easily see the performance difference (check the FPS):

测自带的intel显卡,看对比

    • glxspheres

 

 

If you try to do this setup the wrong way, you'll overwrite all the stock OpenGL stuff, and on Linux Mint 13 Cinnamon this means you won't be able to use the Cinnamon desktop. I hope it all worked out for you, thanks for reading / loving Linux.

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

转载于:https://www.cnblogs.com/ishiiwa/archive/2012/10/28/2743088.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值