2

So I have this option of Launch Using Discrete Graphics Card, which I presume allows me to open applications so that they use the discrete NVIDIA GTX 1650 graphic card on my laptop. It seems to be equivalent of using switcherooctl launch command.

$ 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 |
+-----------------------------------------------------------------------------+

When I actually use it, it doesn't work, as in it isn't working properly.

For example, on Chromium with Hardware acceleration enabled, I get:

chromium with nvidia 1 chromium with nvidia 2

But when I normally launch, I don't have such problems:

chromium normal 1 chromium normal 2

Launching with switcheroo command, we can see following output on terminal:

[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

Electrons app also don't work, either black screen or just shows a frozen screen of previous window.

Similarly, Sublime Text with hardware acceleration enabled spits out this error:

st4 error

The glmark2 score is also worse (536) for the NVIDIA card (switcherooctl launch glmark2 --fullscreen --show-all-options) compared to 4551 for the normal integrated card (glmark2 --fullscreen --show-all-options).

  • 1
    Having same problem. Launching as `google-chrome` uses the Intel card as you can tell (maybe it would display under `nvidia-smi` if it wasn't launching under Intel?). By launching it with `__NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia google-chrome` which I assume is like `switcheroo google-chrome`, I get the degraded performance with the same error messages. It's falling back to software emulation, so of course any benchmark with the 'NVIDIA' card (not actually; it's using no card?) would be worse. Not sure how to *fix* the ANGLE errors though... in the same boat as you. – user76871 Aug 27 '22 at 13:30
  • @user76871 Any luck? – Anonymous Guy Mar 08 '23 at 11:14
  • yes, I entirely disabled hybrid graphics and just had everything use the main GPU. Sorry... I seem to recall my BIOS had a setting to disable hybrid graphics, though I don't recall if there was also any fiddling on the OS configuration side. Good luck. – user76871 Mar 09 '23 at 12:43

0 Answers0