在桌面系统上使用 Intel GPU + NVidia 和 1 个显示器

在桌面系统上使用 Intel GPU + NVidia 和 1 个显示器

我计划在一台显示器上运行带有 2 个 GPU 的桌面系统:我是否正确认为 GPU 切换在此情况下不可用?所以我必须使用 Intel GPU 启动(但我可以使用 NVidia 进行 CUDA 操作/渲染或 VGA 直通到 VM)或使用 NVidia GPU(用于 Steam)?

或者 Optimus/Bumblebee 是否也可以在桌面上使用,使用一根电缆驱动显示器,并且卡之间“自动”相互感知?

您的设置/经验是什么?

答案1

我只是想通过补充最后发生的事情来结束这个问题。

我使用附加驱动程序配置选项安装了 nvidia 驱动程序,以确保任何可能出现的巫术都能完成。然后我安装了 bumblebee 和 nvidia-prime。我最初在 16.04 上使用 nvidia-361,但目前在 16.10 上使用 nvidia-367。

配置文件需要在 /etc/bumblebee 中手动调整。我对 nvidia 驱动程序使用以下内容:

在 bumblebee.conf 中:

[driver-nvidia]
# Module name to load, defaults to Driver if empty or unset
KernelDriver=nvidia-367
PMMethod=auto
# colon-separated path to the nvidia libraries
LibraryPath=/usr/lib/nvidia-367:/usr/lib32/nvidia-367
# comma-separated path of the directory containing nvidia_drv.so and the
# default Xorg modules path
XorgModulePath=/usr/lib/nvidia-367/xorg,/usr/lib/xorg/modules
XorgConfFile=/etc/bumblebee/xorg.conf.nvidia

xorg.conf.nvidia 文件:

xorg.conf.nvidia 
Section "ServerLayout"
    Identifier  "Layout0"
    Option      "AutoAddDevices" "false"
    Option      "AutoAddGPU" "false"
EndSection

Section "Device"
    Identifier  "DiscreteNvidia"
    Driver      "nvidia"
    VendorName  "NVIDIA Corporation"

#   If the X server does not automatically detect your VGA device,
#   you can manually set it here.
#   To get the BusID prop, run `lspci | egrep 'VGA|3D'` and input the data
#   as you see in the commented example.
#   This Setting may be needed in some platforms with more than one
#   nvidia card, which may confuse the proprietary driver (e.g.,
#   trying to take ownership of the wrong device). Also needed on Ubuntu 13.04.
    BusID "PCI:01:00:0"

#   Setting ProbeAllGpus to false prevents the new proprietary driver
#   instance spawned to try to control the integrated graphics card,
#   which is already being managed outside bumblebee.
#   This option doesn't hurt and it is required on platforms running
#   more than one nvidia graphics card with the proprietary driver.
#   (E.g. Macbook Pro pre-2010 with nVidia 9400M + 9600M GT).
#   If this option is not set, the new Xorg may blacken the screen and
#   render it unusable (unless you have some way to run killall Xorg).
    Option "ProbeAllGpus" "false"

    Option "NoLogo" "true"
    Option "UseEDID" "false"
    Option "UseDisplayDevice" "none"
EndSection

您需要确保驱动程序版本与您拥有的版本匹配,并且 BusID 也很重要。

这基本上允许我使用 nvidia 设置应用程序切换 GPU(需要注销并重新登录)或使用“optirun -b primus”在特定 GPU 上启动应用程序,我在启动设置中将其添加到 Steam 游戏中,并且从那时起一直完美地为我运行。

相关内容