我正在尝试在 Ubuntu 20.04 中将 nouveau 驱动程序与 nVidia Optimus 卡(GeForce GTX 1650)结合使用。
这是输出inxi -G
:
Graphics: Device-1: Intel UHD Graphics driver: i915 v: kernel
Device-2: NVIDIA driver: nouveau v: kernel
Display: x11 server: X.Org 1.20.8 driver: nouveau resolution: 1920x1080~60Hz
OpenGL: renderer: Mesa Intel UHD Graphics (CML GT2) v: 4.6 Mesa 20.0.8
当我跑步时DRI_PRIME=0 glxinfo | grep 'OpenGL renderer string'
:
OpenGL renderer string: Mesa Intel(R) UHD Graphics (CML GT2)
但是如果我使用DRI_PRIME=1
,则会出现一些 libGL 错误:
libGL error: failed to create dri screen
libGL error: failed to load driver: nouveau
OpenGL renderer string: Mesa Intel(R) UHD Graphics (CML GT2)
有什么帮助吗?
答案1
可能需要安装这些驱动程序。
如果你放弃 nouveau 而使用 nvidia 驱动程序:
https://www.if-not-true-then-false.com/2015/fedora-nvidia-guide/
您需要使用 __GLX_VENDOR_LIBRARY_NAME=nvidia 来强制驱动程序:
$ inxi -G
Graphics: Device-1: Intel UHD Graphics 620 driver: i915 v: kernel
Device-2: NVIDIA GP106 [GeForce GTX 1060 3GB] driver: nvidia v: 470.74
Device-3: Acer SunplusIT Integrated Camera type: USB driver: uvcvideo
Display: wayland server: X.Org 1.21.1.2 driver: loaded: nvidia resolution: 1920x1080~60Hz
OpenGL: renderer: Mesa Intel UHD Graphics 620 (KBL GT2) v: 4.6 Mesa 21.1.8
$ DRI_PRIME=0 glxinfo | grep 'OpenGL renderer string'
OpenGL renderer string: Mesa Intel(R) UHD Graphics 620 (KBL GT2)
$ DRI_PRIME=1 glxinfo | grep 'OpenGL renderer string'
libGL error: failed to create dri screen
libGL error: failed to load driver: nouveau
OpenGL renderer string: llvmpipe (LLVM 12.0.1, 256 bits)
$ __GLX_VENDOR_LIBRARY_NAME=nvidia DRI_PRIME=1 glxinfo | grep 'OpenGL renderer string'
OpenGL renderer string: NVIDIA GeForce GTX 1060 3GB/PCIe/SSE2