首页 > 解决方案 > Debian 大黄蜂问题

问题描述

我正在进行一个干净的最小 Debian Stretch 安装,只安装了几个图形包。我告诉了这些:

sudo apt install xserver-xorg-core xinit bumblebee-nvidia primus primus-libs:i386 libgl1-nvidia-glx:i386

bumblebee-nvidia但我可以用开源交换专有的bumblebee

我还将我的用户加入了 bumblebee 组:

sudo adduser $USER bumblebee

重新启动后,我的英特尔卡工作正常:

ziga@ziga-laptop:~$ glxinfo | grep OpenGL
OpenGL vendor string: Intel Open Source Technology Center
OpenGL renderer string: Mesa DRI Intel(R) Ivybridge Mobile 
OpenGL core profile version string: 3.3 (Core Profile) Mesa 13.0.6
OpenGL core profile shading language version string: 3.30
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
OpenGL version string: 3.0 Mesa 13.0.6
OpenGL shading language version string: 1.30
OpenGL context flags: (none)
OpenGL extensions:
OpenGL ES profile version string: OpenGL ES 3.0 Mesa 13.0.6
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.00
OpenGL ES profile extensions:

但是我的 Nvidia 卡是Geforce 610M在调用时不起作用optirun

ziga@ziga-laptop:~$ optirun glxinfo | grep OpenGL
primus: fatal: failed to load any of the libraries: /usr/lib/x86_64-linux-gnu/nvidia/libGL.so.1:/usr/lib/i386-linux-gnu/nvidia/libGL.so.1:/usr/lib/nvidia/libGL.so.1
/usr/lib/x86_64-linux-gnu/nvidia/libGL.so.1: cannot open shared object file: No such file or directory
/usr/lib/i386-linux-gnu/nvidia/libGL.so.1: wrong ELF class: ELFCLASS32
/usr/lib/nvidia/libGL.so.1: cannot open shared object file: No such file or directory

如果我apt用来搜索我的卡,我会得到:

ziga@ziga-laptop:~$ sudo apt search 610M
Sorting... Done
Full Text Search... Done
nvidia-legacy-304xx-driver/stable 304.137-5~deb9u1 amd64
  NVIDIA metapackage (304xx legacy version)

nvidia-legacy-304xx-kernel-dkms/stable 304.137-5~deb9u1 amd64
  NVIDIA binary kernel module DKMS source (304xx legacy version)

nvidia-legacy-304xx-kernel-source/stable 304.137-5~deb9u1 i386
  NVIDIA binary kernel module source (304xx legacy version)

xserver-xorg-video-nvidia-legacy-304xx/stable 304.137-5~deb9u1 amd64
  NVIDIA binary Xorg driver (304xx legacy version)

从这里我会安装nvidia-legacy-304xx-driver,但我担心这不适用于我上面安装的其他软件包。有没有可能我也需要xserver-xorg-video-nvidia-legacy-304xx

谁能向我解释要安装哪些软件包以及为什么?


好吧,我等不及了,我尝试安装xserver-xorg-video-nvidia-legacy-304xx. 看起来这个包确实与bumblebee-nvidia包冲突。安装后我得到了这个:

nvidia-legacy-304xx:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/4.9.0-8-amd64/updates/dkms/

depmod...

DKMS: install completed.
Setting up nvidia-legacy-304xx-driver (304.137-5~deb9u1) ...
Processing triggers for libc-bin (2.24-11+deb9u3) ...
Processing triggers for glx-alternative-nvidia (0.8.3~deb9u1) ...
Processing triggers for menu (2.1.47+b1) ...
Processing triggers for update-glx (0.8.3~deb9u1) ...
Processing triggers for glx-alternative-nvidia (0.8.3~deb9u1) ...
update-alternatives: warning: forcing reinstallation of alternative /usr/lib/nvidia/bumblebee because link group glx is broken
Processing triggers for libc-bin (2.24-11+deb9u3) ...
Processing triggers for initramfs-tools (0.130) ...
update-initramfs: Generating /boot/initrd.img-4.9.0-8-amd64
Processing triggers for bumblebee (3.2.1-14) ...

我卸载了xserver-xorg-video-nvidia-legacy-304xx并尝试安装nvidia-legacy-304xx-driver也安装了该软件包的xserver-xorg-video-nvidia-legacy-304xx软件包。它没有返回任何警告也没有错误,但是重启optirun glxinfo | grep OpenGL命令后仍然失败......

看起来即使在应该是稳定的 Debian 上也没有解决方案?


就像@Antonio Orizondo Leyva 建议的那样,我安装了他建议的软件包并执行了命令sudo update-alternatives --config glx,我必须为我的 GPU 选择不同的选项:

There are 3 choices for the alternative glx (providing /usr/lib/glx).

  Selection    Path                       Priority   Status
------------------------------------------------------------
  0            /usr/lib/nvidia/bumblebee   125       auto mode
  1            /usr/lib/mesa-diverted      5         manual mode
  2            /usr/lib/nvidia             100       manual mode
* 3            /usr/lib/nvidia/bumblebee   125       manual mode

Press <enter> to keep the current choice[*], or type selection number: 

我尝试选择其中的每一个然后重新启动,但最终结果是相同的......除了第二个选项(nvidia)在重新启动后说它找不到openGL.1.so或什么......所以甚至无法使用Nvidia卡本身!?

还有其他想法吗?

标签: nvidiadebian-stretchoptimus

解决方案


我在 GTX 1050 上遇到了一些类似的问题。
我认为您可以绕过该nvidia-detect命令,所以这是我在 Debian Buster 64 位内核 4.17 上所做的:

  1. 执行

    apt install bumblebee-nvidia linux-headers-$(uname -r)
    

    这应该安装nvidia-driverbbswitch-dkms并且blacklist/etc/modprobe.d. 您需要正在运行的内核的标头来添加新模块(在我的情况下是bbswith和)。nvidia*nvidia-current

不需要添加 i386 架构,一切正常,检查您正在使用的 glx 提供程序

update-alternatives --config glx

将其设置为除 之外的任何选项nvidia,重新启动显示管理器并再次测试。


推荐阅读