由于ubuntu的显卡驱动更新到nvidia384,所以系统源里面的bumblebee已经没办法使用了,因为不支持384这个版本的显卡。所以,要添加测试源。
第一步:安装源里面的显卡驱动
很简单,只要点进去安装就好,安装后重启(一般不会出错,出错你很快会发现)
安装成功后,把显卡切换为intel模式
第二步:添加源
sudo add-apt-repository ppa:bumblebee/testing
sudo apt update
sudo apt install bumblebee-nvidia bumblebee primus
第三步:修改配置文件
第一处
# The Driver used by Bumblebee server. If this value is not set (or empty),
# auto-detection is performed. The available drivers are nvidia and nouveau
# (See also the driver-specific sections below)
Driver=nvidia
第二处(全部的nvidia-current改成你使用的版本)
## Section with nvidia driver specific options, only parsed if Driver=nvidia
[driver-nvidia]
# Module name to load, defaults to Driver if empty or unset
KernelDriver=nvidia
PMMethod=auto
# colon-separated path to the nvidia libraries
LibraryPath=/usr/lib/nvidia-384:/usr/lib32/nvidia-384
# comma-separated path of the directory containing nvidia_drv.so and the
# default Xorg modules path
XorgModulePath=/usr/lib/nvidia-384/xorg,/usr/lib/xorg/modules
XorgConfFile=/etc/bumblebee/xorg.conf.nvidia
第四步:(需要重启后才可以检查)检查下
optirun --status
结果是下面的,基本是没问题了
Bumblebee status: Ready (3.2.1). X inactive. Discrete video card is off.
或者使用(报错就是可能配置错了,或者bug吧)
optirun glxspheres64