Ubuntu 20.04 上的 AMD 和 NVIDIA GPU

MTi*_*ita 6 nvidia xorg graphics amd-graphics 20.04

我最近获得了 AMD Radeon RX 5700 XT 卡,并且我已经有一段时间将 GeForce RTX 2070 作为我的主要 GPU。我试图将它们一起运行并在将 AMD 卡安装为主要卡并在需要时使用 Prime-run 在 NVIDA 卡上运行应用程序后设法在 manjaro 上执行此操作,现在我正在尝试返回 Ubuntu,我可以不会运行相同的配置。

  1. 即使安装后,prime-run 也根本无法工作 nvidia-prime
  2. 使用 env vars 运行任何东西都__NV_PRIME_RENDER_OFFLOAD=2 __GLX_VENDOR_LIBRARY_NAME=nvidia不起作用
root@my-pc:~#__NV_PRIME_RENDER_OFFLOAD=2 __GLX_VENDOR_LIBRARY_NAME=nvidia glxinfo | grep OpenGL
X Error of failed request:  BadValue (integer parameter out of range for operation)
  Major opcode of failed request:  152 (GLX)
  Minor opcode of failed request:  24 (X_GLXCreateNewContext)
  Value in failed request:  0x0
  Serial number of failed request:  39
  Current serial number in output stream:  40

Run Code Online (Sandbox Code Playgroud)

我为这两张卡安装了专有驱动程序在这里尝试了答案,但似乎没有任何效果。

小智 5

这不是真正的答案,但如果它有帮助。

我在笔记本电脑上同时安装了 AMD 和 Nvidia 我根据https://forums.developer.nvidia.com/t/i-cant-enable-nvidia-gpu-with-nvidia-prime/69899/4 的说明强制使用 Nvidia

在这个文件中, /usr/share/X11/xorg.conf.d/10-nvidia.conf 我放了:

选项“主GPU”“真”

并重启


MTi*_*ita 0

通过删除 nvidia 驱动程序并重新安装已修复此问题。