无法使用带有 NVIDIA 卡的应用程序

无法使用带有 NVIDIA 卡的应用程序

因此,我有这个选项Launch Using Discrete Graphics Card,我推测它允许我打开应用程序,以便它们使用笔记本电脑上的独立 NVIDIA GTX 1650 显卡。这似乎相当于使用switcherooctl launch命令。

$ uname -a 
Linux some-name-here 5.18.0-4-amd64 #1 SMP PREEMPT_DYNAMIC Debian 5.18.16-1 (2022-08-10) x86_64 GNU/Linux

$ nvidia-smi
Thu Aug 18 15:19:25 2022       
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 470.141.03   Driver Version: 470.141.03   CUDA Version: 11.4     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|                               |                      |               MIG M. |
|===============================+======================+======================|
|   0  NVIDIA GeForce ...  On   | 00000000:01:00.0 Off |                  N/A |
| N/A   42C    P8     4W /  N/A |      5MiB /  3911MiB |      0%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+
                                                                               
+-----------------------------------------------------------------------------+
| Processes:                                                                  |
|  GPU   GI   CI        PID   Type   Process name                  GPU Memory |
|        ID   ID                                                   Usage      |
|=============================================================================|
|    0   N/A  N/A      1398      G   /usr/lib/xorg/Xorg                  4MiB |
+-----------------------------------------------------------------------------+

当我实际使用它时,它不起作用,因为它不能正常工作。

例如,在启用硬件加速的 Chromium 上,我得到:

带有 nvidia 1 的 chromium 带有 nvidia 2 的 chromium

但我正常启动的时候并没有遇到这样的问题:

铬正常 1 铬正常 2

使用switcheroo命令启动,我们可以在终端看到以下输出:

[24936:24936:0818/145402.243976:ERROR:angle_platform_impl.cc(43)] Display.cpp:992 (initialize): ANGLE Display::initialize error 12289: Invalid visual ID requested.
[24936:24936:0818/145402.244193:ERROR:gl_surface_egl.cc(831)] EGL Driver message (Critical) eglInitialize: Invalid visual ID requested.
[24936:24936:0818/145402.244256:ERROR:gl_surface_egl.cc(1353)] eglInitialize OpenGL failed with error EGL_NOT_INITIALIZED, trying next display type
[24936:24936:0818/145402.244756:ERROR:angle_platform_impl.cc(43)] Display.cpp:992 (initialize): ANGLE Display::initialize error 12289: Invalid visual ID requested.
[24936:24936:0818/145402.244819:ERROR:gl_surface_egl.cc(831)] EGL Driver message (Critical) eglInitialize: Invalid visual ID requested.
[24936:24936:0818/145402.244859:ERROR:gl_surface_egl.cc(1353)] eglInitialize OpenGLES failed with error EGL_NOT_INITIALIZED
[24936:24936:0818/145402.244889:ERROR:gl_ozone_egl.cc(23)] GLSurfaceEGL::InitializeOneOff failed.
[24936:24936:0818/145402.247139:ERROR:viz_main_impl.cc(186)] Exiting GPU process due to errors during initialization
[24976:24976:0818/145402.469444:ERROR:angle_platform_impl.cc(43)] Display.cpp:992 (initialize): ANGLE Display::initialize error 12289: Invalid visual ID requested.
[24976:24976:0818/145402.469610:ERROR:gl_surface_egl.cc(831)] EGL Driver message (Critical) eglInitialize: Invalid visual ID requested.
[24976:24976:0818/145402.469644:ERROR:gl_surface_egl.cc(1353)] eglInitialize OpenGL failed with error EGL_NOT_INITIALIZED, trying next display type
[24976:24976:0818/145402.470012:ERROR:angle_platform_impl.cc(43)] Display.cpp:992 (initialize): ANGLE Display::initialize error 12289: Invalid visual ID requested.
[24976:24976:0818/145402.470080:ERROR:gl_surface_egl.cc(831)] EGL Driver message (Critical) eglInitialize: Invalid visual ID requested.
[24976:24976:0818/145402.470106:ERROR:gl_surface_egl.cc(1353)] eglInitialize OpenGLES failed with error EGL_NOT_INITIALIZED
[24976:24976:0818/145402.470130:ERROR:gl_ozone_egl.cc(23)] GLSurfaceEGL::InitializeOneOff failed.
[24976:24976:0818/145402.472348:ERROR:viz_main_impl.cc(186)] Exiting GPU process due to errors during initialization
[25015:25015:0818/145402.482869:ERROR:gpu_init.cc(486)] Passthrough is not supported, GL is disabled, ANGLE is

电子应用程序也无法工作,要么黑屏,要么只显示前一个窗口的冻结屏幕。

类似地,启用硬件加速的 Sublime Text 也会出现此错误:

st4 错误

NVIDIA 卡 ( ) 的 glmark2 得分 ( 536 ) 也switcherooctl launch glmark2 --fullscreen --show-all-options比普通集成卡 ( glmark2 --fullscreen --show-all-options) 的 4551 更差。

相关内容