CentOS7.3安装Bumblebee驱动

2017-01-13 08:23:34来源:CSDN作者:hobohero人点击

参考文献http://elrepo.org/tiki/bumblebeehttp://elrepo.org/tiki/nvidia-detecthttp://www.dedoimedo.com/computers/centos-7-nvidia.html
安装elrepo源(参见本人文章)
查看显卡型号是否支持双显卡# lspci  | grep VGA00:02.0 VGA compatible controller: Intel Corporation HD Graphics 520 (rev 07)# lspci  | grep 3D01:00.0 3D controller: NVIDIA Corporation GM108M [GeForce 940MX] (rev a2)
安装nvidia-detect检查显卡型号# yum install  nvidia-detectInstalled:  nvidia-detect.x86_64 0:375.20-1.el7.elrepo # nvidia-detect -vProbing for supported NVIDIA devices...[10de:134d] NVIDIA Corporation GM108M [GeForce 940MX]This device requires the current 375.20 NVIDIA driverkmod-nvidia[8086:1916] Intel Corporation HD Graphics 520Optimus hardware detected: An Intel display controller was detectedEither disable the Intel display controller in the BIOSor use the bumblebee driver to support Optimus hardware
安装内核开发文件# yum install kernel-devel kernel-headers gcc makeInstalled:  kernel-devel.x86_64 0:3.10.0-327.36.3.el7
比较内核和内核开发文件# uname -r # rpm -q kernel kernel-devel3.10.0-514.el7.x86_64kernel-devel-3.10.0-514.el7.x86_64
如果不匹配,需重装并重启# yum -y upgrade kernel kernel-devel
禁用nouveau驱动# lsmod | grep nouveaunouveau 1527946 0mxm_wmi 13021 1 nouveauttm 93908 1 nouveaui2c_algo_bit 13413 2 i915,nouveaudrm_kms_helper 146456 2 i915,nouveaudrm 372540 8 ttm,i915,drm_kms_helper,nouveauwmi 19070 2 mxm_wmi,nouveauvideo 24400 2 i915,nouveaui2c_core 40756 8 drm,i915,i2c_i801,i2c_hid,drm_kms_helper,i2c_algo_bit,nouveau,videodev
# vi /lib/modprobe.d/dist-blacklist.conf#blacklist nvidiafbblacklist nouveau options nouveau modeset=0
更改grub2配置禁用nouveau# vi /etc/default/grubGRUB_CMDLINE_LINUX="rhgb quiet rdblacklist=nouveau"
重新生成grub.cfg# grub2-mkconfig -o /boot/grub2/grub.cfg
重建initramfs image# mv /boot/initramfs-$(uname -r).img /boot/initramfs-$(uname -r).img.bak# dracut /boot/initramfs-$(uname -r).img $(uname -r)
设置为文本模式启动# systemctl set-default multi-user.target# reboot
查看nouveau是否被禁用# lsmod | grep nouveau输出空白,说明禁用成功
安装kmod-nvidia驱动# yum -y install kmod-nvidiaInstalled:  kmod-nvidia.x86_64 0:375.26-1.el7.elrepoDependency Installed:  nvidia-x11-drv.x86_64 0:375.26-1.el7.elrepo yum-plugin-nvidia.noarch 0:1.0.2-1.el7.elrepo 
如果安装不成功,有可能是没有配置/etc/X11/xorg.conf# nvidia-xconfig
设置图形模式启动# systemctl set-default graphical.target# reboot
查看驱动# nvidia-detect -vProbing for supported NVIDIA devices...[10de:134d] NVIDIA Corporation GM108M [GeForce 940MX]This device requires the current 375.20 NVIDIA driver kmod-nvidia[8086:1916] Intel Corporation HD Graphics 520Optimus hardware detected: An Intel display controller was detectedEither disable the Intel display controller in the BIOSor use the bumblebee driver to support Optimus hardware

安装bumblebee# yum -y install bumblebeeInstalled:  bumblebee.x86_64 0:3.2.1-10.el7.elrepoDependency Installed:  VirtualGL.x86_64 0:2.4-4.el7 bumblebee-selinux.x86_64 0:1.0-1.el7.elrepo  fltk.x86_64 0:1.3.0-13.el7 fontconfig.x86_64 0:2.10.95-10.el7  fontpackages-filesystem.noarch 0:1.44-8.el7 kmod-bbswitch.x86_64 0:0.8-3.el7.elrepo  libXcursor.x86_64 0:1.1.14-2.1.el7 libXdamage.x86_64 0:1.1.4-4.1.el7  libXext.x86_64 0:1.3.3-3.el7 libXfixes.x86_64 0:5.0.1-2.1.el7  libXft.x86_64 0:2.3.2-2.el7 libXinerama.x86_64 0:1.1.3-2.1.el7  libXrender.x86_64 0:0.9.8-2.1.el7 libXv.x86_64 0:1.0.10-2.el7  libXxf86vm.x86_64 0:1.1.3-2.1.el7 libbsd.x86_64 0:0.6.0-3.el7.elrepo  libxshmfence.x86_64 0:1.2-1.el7 mesa-libGL.x86_64 0:11.2.2-2.20160614.el7  mesa-libGLU.x86_64 0:9.0.0-4.el7 mesa-libglapi.x86_64 0:11.2.2-2.20160614.el7  turbojpeg.x86_64 0:1.2.90-5.el7 xcb-util-keysyms.x86_64 0:0.4.0-1.el7
把用户添加到 bumblee组# cat /etc/group | grep bumblebeebumblebee:x:1001:# usermod  -a root   -G bumblebee# usermod  -a david -G bumblebee# cat /etc/group | grep bumblebeebumblebee:x:1001:root,david
配置bumblebee.conf# vi  /etc/bumblebee/bumblebee.conf[bumblebeed]VirtualDisplay=:8KeepUnusedXServer=falseServerGroup=bumblebeeTurnCardOffAtExit=falseNoEcoModeOverride=falseDriver=nvidiaXorgConfDir=/etc/bumblebee/xorg.conf.d[optirun]Bridge=autoVGLTransport=proxyPrimusLibraryPath=/usr/lib/primus:/usr/lib32/primusAllowFallbackToIGC=false[driver-nvidia]KernelDriver=nvidiaPMMethod=bbswitchLibraryPath=/usr/lib64/nvidia:/usr/lib64/vdpau:/usr/lib/nvidia:/usr/lib/vdpauXorgModulePath=/usr/lib64/xorg/modules/extensions/nvidia,/usr/lib64/xorg/modules/drivers,/usr/lib64/xorg/modulesXorgConfFile=/etc/bumblebee/xorg.conf.nvidia[driver-nouveau]KernelDriver=nouveauPMMethod=autoXorgConfFile=/etc/bumblebee/xorg.conf.nouveau
编辑nvidia-settings.desktop# vi /usr/share/applications/nvidia-settings.desktopExec=optirun nvidia-settings -c :8.0
测试是否安装成功# optirun glxgears

最新文章

123

最新摄影

微信扫一扫

第七城市微信公众平台