Bumblebee Intel + Nvidia在15.10黑屏问题上


10

我重新安装了Kubuntu 15.10,安装了带有擎天柱的msi GT70笔记本电脑。

我已经安装了bumblebee bumblebee-nvidia,这是绝对需要的,因为nouveau始终在登录时崩溃。

所以我编辑了/etc/bumblebee/bumblebee.conf

# Configuration file for Bumblebee. Values should **not** be put between quotes

## Server options. Any change made in this section will need a server restart
# to take effect.
[bumblebeed]
# The secondary Xorg server DISPLAY number
VirtualDisplay=:8
# Should the unused Xorg server be kept running? Set this to true if waiting
# for X to be ready is too long and don't need power management at all.
KeepUnusedXServer=false
# The name of the Bumbleblee server group name (GID name)
ServerGroup=bumblebee
# Card power state at exit. Set to false if the card shoud be ON when     Bumblebee
# server exits.
TurnCardOffAtExit=false
# The default behavior of '-f' option on optirun. If set to "true", '-f' will
# be ignored.
NoEcoModeOverride=false
# 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
# Directory with a dummy config file to pass as a -configdir to secondary X
XorgConfDir=/etc/bumblebee/xorg.conf.d

## Client options. Will take effect on the next optirun executed.
[optirun]
# Acceleration/ rendering bridge, possible values are auto, virtualgl and
# primus.
Bridge=auto
# The method used for VirtualGL to transport frames between X servers.
# Possible values are proxy, jpeg, rgb, xv and yuv.
VGLTransport=proxy
# List of paths which are searched for the primus libGL.so.1 when using
# the primus bridge
PrimusLibraryPath=/usr/lib/x86_64-linux-gnu/primus:/usr/lib/i386-linux-    gnu/primus
# Should the program run under optirun even if Bumblebee server or nvidia card
# is not available?
AllowFallbackToIGC=false


# Driver-specific settings are grouped under [driver-NAME]. The sections are
# parsed if the Driver setting in [bumblebeed] is set to NAME (or if auto-
# detection resolves to NAME).
# PMMethod: method to use for saving power by disabling the nvidia card, valid
# values are: auto - automatically detect which PM method to use
#         bbswitch - new in BB 3, recommended if available
#       switcheroo - vga_switcheroo method, use at your own risk
#             none - disable PM completely
# https://github.com/Bumblebee-Project/Bumblebee/wiki/Comparison-of-PM-methods

## 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-304
PMMethod=auto
# colon-separated path to the nvidia libraries
LibraryPath=/usr/lib/nvidia-304:/usr/lib32/nvidia-304
# comma-separated path of the directory containing nvidia_drv.so and the
# default Xorg modules path
XorgModulePath=/usr/lib/nvidia-304/xorg,/usr/lib/xorg/modules
XorgConfFile=/etc/bumblebee/xorg.conf.nvidia

## Section with nouveau driver specific options, only parsed if Driver=nouveau
[driver-nouveau]
KernelDriver=nouveau
PMMethod=auto
XorgConfFile=/etc/bumblebee/xorg.conf.nouveau

我有

$ cat /proc/acpi/bbswitch 
0000:01:00.0 ON

我放在/etc/modules-load.d/modules.conf

i915
bbswitch

所以我能够做到:

$ primusrun glxinfo | grep "OpenGL version"
OpenGL version string: 4.2.0 NVIDIA 304.128

但是,如果我重新启动,只有黑屏,要启动系统,我必须登录tty1并执行以下操作:

sudo modprobe nvidia_304
sudo service sddm restart

要获得kubuntu登录屏幕的任何想法来解决?

另外,如果我用nvidia- 355替换nvidia-304,我将无法启动:modprobe提示不起作用。

这是我的lspci配置:

$ lspci|grep -i vga
00:02.0 VGA compatible controller: Intel Corporation 4th Gen Core Processor Integrated Graphics Controller (rev 06)
01:00.0 VGA compatible controller: NVIDIA Corporation GK104M [GeForce GTX 870M] (rev ff)

编辑:

一些相关信息和可能的修复方法http://forum.ubuntu-it.org/viewtopic.php?p=4760241(意大利语) https://www.kubuntuforums.net/showthread.php?69190-Bumblebee-Nvidia355&p=381043

内核4.2上的i915模块实际上也存在一个错误https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1494903

EDIT2(有效的大黄蜂解决方案):

我设法使这项工作https://www.kubuntuforums.net/showthread.php?69190-Bumblebee-Nvidia355&p=381043

  1. 安装nvidia-355和nvidia-prime
  2. 在nvidia面板中选择Intel驱动程序并注销
  3. 仅安装大黄蜂(不安装大黄蜂-nvidia)
  4. 根据需要编辑/etc/bumblebee/bumblebee.conf line22 KernelDriver = nvidia用nvidia-355替换nvidia-current
  5. /etc/bumblebee/xorg.conf.nvidia取消注释BusID“ PCI:01:00:0”,如此处所述/ubuntu/29044...vices-detected
  6. 您现在可以在Intel卡下启动并使用optirun和primusrun。到目前为止,它对我来说一直有效,请使用primusrun glxinfo进行测试

EDIT3: 少校2015年3月12日

使用ppa:graphics-drivers / ppappa:xorg-edgers / ppa,更新并重新启动后,我使用358.16-0ubuntu0〜gpu15.10.2进行了黑屏

所以我清除了所有内容,然后安装了bumblee-nvidia nvidia-358,编辑了/etc/bumblebee/bumblebee.conf,并重新启动sudo服务bumblebeed

重新启动后,它确实又可以工作了。


我有一个类似的问题,我现在运行内核4.4,xorg-edgers和nvidia 358,并且一切正常(nvidia 361现在可以正常工作)
Calin


Answers:


10

由于您拥有相当新的GPU硬件,因此也应该使用新的NVIDIA驱动程序和软件。

用代替大黄蜂nvidia-prime集成图形专用图形之间切换。

重新安装NVIDIA驱动程序,但首先卸载所有NVIDIA软件并删除大黄蜂。

打开一个终端并执行:

sudo apt-get purge nvidia* '^bumblebee.*'  
sudo reboot  

GRUB引导菜单出现时:突出显示Ubuntu菜单项,然后E按键。
nouveau.modeset=0参数添加到Linux行的末尾...然后按F10引导。

从Ubuntu存储库安装稳定的NVIDIA专有驱动程序(不适用于ubuntu 12.04:

sudo apt-get update
sudo apt-get install nvidia-352 nvidia-prime
sudo reboot

如果要使用最新的驱动程序,请从专有GPU驱动程序PPA安装它们:

sudo add-apt-repository ppa:graphics-drivers/ppa
sudo apt-get update
sudo apt-get install nvidia-355 nvidia-prime
sudo reboot  

1
谢谢您,这似乎可行,我还必须创建一个文件,/etc/modprobe.d/blacklist-nouveau.conf其中包含 blacklist nouveau options nouveau modeset=0
Kwaadpepper 2015年

我还有一个问题,就是您的知识大黄蜂可以工作吗?因为使用nvidia-prime,它在使用英特尔图形卡时无法启动使用nvidia的特定程序,primusrun因此非常重要
Kwaadpepper 2015年

1
@Kwaadpepper:大黄蜂似乎有点贬值,并且越来越多地追随问题-最新版本已经有2.5年历史-nvidia-prime是一种行之有效的替代品-唯一的缺点是您无法启动单个特定程序特别是-但最重要的是:您的机器现在正在运行!我很高兴它为您服务-所以...享受ubuntu的经验!:)
cl-netbox

4
确保不要得到nvidia-current:那是一个旧驱动程序,导致我黑屏。
Ciro Santilli冠状病毒审查六四事件法轮功

像在18.04上获得冠军一样,以及在华硕SCAR Strix上进行临时的nomodeset修复,都可以正常工作。
RobotHumans

6

经过太多不必要的头痛之后,设法让大黄蜂在Wily工作,而没有那首屈一指的英伟达原始恐怖。

正如其他人所怀疑的,这是因为gpu-manager。不管是什么,它都遍及整个更新替代配置。屏蔽该服务并重新安装bumblebee [-nvidia]可解决所有问题,现在该卡可以通过optirun按预期方式打开和关闭,并且在启动时不再出现黑屏。

sudo systemctl mask gpu-manager.service
sudo apt-get install --reinstall bumblebee bumblebee-nvidia

另外,请确保没有遗留损坏的/etc/X11/xorg.conf。


6

尽管一切似乎正常,但是尝试以下操作表明bbswitch无法正确关闭nvidia卡:

cat /proc/acpi/bbswitch
primusrun glxinfo|grep OpenGL
sleep 1
cat /proc/acpi/bbswitch

然后,我重新安装了bumblebee-nvidia,直到重新启动系统后,它才起作用。在深入研究了该问题之后,我注意到在重新启动系统后更新了替代方案,并且我注意到gpu-manager引起了这一问题。(只需运行“ sudo gpu-manager”,您就会看到它已更新)

gpu-manager在启动lightdm之后运行。因此,作为一种快速的解决方法,我禁用了它。

现在一切正常。用optirun或primusrun运行某些程序后,当进程退出时,bbswitch会正确关闭nvidia。

总结一下,这是我的摘要,从头开始安装所有内容(通过阅读评论来手动运行):

sudo add-apt-repository ppa:graphics-drivers/ppa
sudo apt-get update

sudo apt-get purge -y nvidia* bumblebee bumblebee-nvidia bbswitch-dkms primus
sudo apt-get install nvidia-355

#switch to intel
sudo tee /etc/prime-discrete <<< off

#reboot is recommended at this point

sudo add-apt-repository ppa:bumblebee/stable
sudo apt-get update
sudo apt-get install bumblebee primus

#sudo gedit /etc/modules
#  add the line "bbswitch load_state=0"

#sudo gedit /etc/modprobe.d/bumblebee.conf
#and make sure the following line exists
#  blacklist nvidia-355

#sudo gedit /etc/bumblebee/bumblebee.conf
#  change line 22 "Driver=" to "Driver=nvidia"
#  change all nvidia-current to nvidia-355

#sudo gedit /etc/bumblebee/xorg.conf.nvidia
#  uncomment BusID line if it is commented and make sure it corresponds to the correct BusID

#disable gpu-manager as it changes i386-linux-gnu_gl_conf and x86_64-linux-gnu_gl_conf
sudo systemctl mask gpu-manager.service

编辑:我删除了rc.local修改,因为gpu-manager不仅在运行时运行,而且在使用系统时运行。因此,我完全禁用了它。


做得好,这真的很难找到,它也可以与nvidia-361一起使用
GuySoft,

1
要获取BusID,请使用以下代码lspci | grep NVIDIA
Karl Morrison

同样在14.04,必须进入/etc/init/gpu-manager.conf文件并注释所有开始行
Karl Morrison
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.