Skip to content

Broken on RTX 5060 Advanced Optimus #393

@androidacy-user

Description

@androidacy-user

Hello! As the title says, when using a laptop with advanced optimus, this driver does not work.

With direct backend, in chromium based browsers:

# NVD_LOG=1 NVD_BACKEND=direct LIBVA_DRIVER_NAME=nvidia /usr/bin/microsoft-edge-beta   --ozone-platform=wayland   --enable-features=AcceleratedVideoDecodeLinuxZeroCopyGL,AcceleratedVideoDecodeLinuxGL,VaapiIgnoreDriverChecks,VaapiOnNvidiaGPUs   --disable-features=UseChromeOSDirectVideoDecoder
MESA: warning: Support for this platform is experimental with Xe KMD, bug reports may be ignored.
MESA: warning: Support for this platform is experimental with Xe KMD, bug reports may be ignored.
       663.490378723 [12294-12294] ../src/vabackend.c:2260       __vaDriverInit_1_0 Initialising NVIDIA VA-API Driver
       663.490388259 [12294-12294] ../src/vabackend.c:2268       __vaDriverInit_1_0 Got DRM FD: 1 43
       663.490392896 [12294-12294] ../src/vabackend.c:2280       __vaDriverInit_1_0 Now have 0 (0 max) instances
       663.490393428 [12294-12294] ../src/vabackend.c:2307       __vaDriverInit_1_0 Selecting Direct backend
       663.490407424 [12294-12294] ../src/direct/nv-driver.c: 305            init_nvdriver Initing nvdriver...
       663.490418332 [12294-12294] ../src/direct/nv-driver.c: 323            init_nvdriver NVIDIA kernel driver version: 580.82.09, major version: 580, minor version: 82
       663.490420147 [12294-12294] ../src/direct/nv-driver.c: 330            init_nvdriver Got dev info: 100 1 2 6
       663.789308616 [12294-12294] ../src/vabackend.c: 754           nvCreateConfig Unable to determine surface type for VP9/AV1 codec due to no RTFormat specified.
       663.825148311 [12294-12294] ../src/vabackend.c:2168              nvTerminate Terminating 0x1b0c00d14000
       663.825899410 [12294-12294] ../src/vabackend.c:2182              nvTerminate Now have 0 (0 max) instances
[12241:12241:0914/173651.838110:ERROR:chrome/browser/component_updater/edge_llm_runtime_installer.cc:90] On demand update of the EdgeLLMRuntime component failed with error: 5
       673.562247354 [12294-12658] ../src/vabackend.c:2260       __vaDriverInit_1_0 Initialising NVIDIA VA-API Driver
       673.562255232 [12294-12658] ../src/vabackend.c:2268       __vaDriverInit_1_0 Got DRM FD: 1 43
       673.562257944 [12294-12658] ../src/vabackend.c:2280       __vaDriverInit_1_0 Now have 0 (0 max) instances
       673.562259135 [12294-12658] ../src/vabackend.c:2307       __vaDriverInit_1_0 Selecting Direct backend
       673.562283982 [12294-12658] ../src/direct/nv-driver.c: 305            init_nvdriver Initing nvdriver...
       673.562301734 [12294-12658] ../src/direct/nv-driver.c: 323            init_nvdriver NVIDIA kernel driver version: 580.82.09, major version: 580, minor version: 82
       673.562304383 [12294-12658] ../src/direct/nv-driver.c: 330            init_nvdriver Got dev info: 100 1 2 6
       673.888381526 [12294-12658] ../src/vabackend.c:1051          nvCreateContext Creating context with 0 render targets, at 1920x1080
       673.911683724 [12294-12658] ../src/vabackend.c:1134          nvCreateContext Creating decoder: 0x1b0c046d0000 for context id: 2
       673.911752899 [12294-12658] ../src/vabackend.c: 988        nvCreateSurfaces2 Creating surface 1920x1080, format 1 (0x1b0c034e27e0)
       673.911757608 [12294-12658] ../src/direct/direct-export-buf.c: 190 direct_allocateBackingImage Allocating BackingImages: 0x1b0c0413bc60 1920x1080
       673.911764251 [12294-12662] ../src/vabackend.c: 403          resolveSurfaces [RT] Resolve thread for 0x1b0c0464cc00 started
       673.912105138 [12294-12658] ../src/vabackend.c: 988        nvCreateSurfaces2 Creating surface 1920x1080, format 1 (0x1b0c034e1340)
       673.912110203 [12294-12658] ../src/direct/direct-export-buf.c: 190 direct_allocateBackingImage Allocating BackingImages: 0x1b0c04899500 1920x1080
       673.912313848 [12294-12658] ../src/vabackend.c:1405             nvEndPicture cuvidDecodePicture failed: 1
[12294:12658:0914/173701.788588:ERROR:media/gpu/vaapi/vaapi_wrapper.cc:3516] vaEndPicture failed, VA error: internal decoding error
[12294:12658:0914/173701.788681:ERROR:media/gpu/vaapi/vaapi_video_decoder.cc:1221] error decoding stream
       673.914476065 [12294-12658] ../src/vabackend.c:1170         nvDestroyContext Destroying context: 2
       673.914481043 [12294-12658] ../src/vabackend.c: 321           destroyContext Signaling resolve thread to exit
       673.914483087 [12294-12658] ../src/vabackend.c: 327           destroyContext Waiting for resolve thread to exit
       674.154732540 [12294-12662] ../src/vabackend.c: 458          resolveSurfaces [RT] Resolve thread for 0x1b0c0464cc00 exiting
       674.154851052 [12294-12658] ../src/vabackend.c: 329           destroyContext Finished waiting for resolve thread with 0
       674.154874392 [12294-12658] ../src/vabackend.c:1023        nvDestroySurfaces Destroying surface 0 (0x1b0c034e1340)
       674.155298164 [12294-12658] ../src/vabackend.c:1023        nvDestroySurfaces Destroying surface -1 (0x1b0c034e27e0)
       674.155414153 [12294-12658] ../src/vabackend.c:2168              nvTerminate Terminating 0x1b0c03b7b800
       674.156211786 [12294-12658] ../src/vabackend.c:2182              nvTerminate Now have 0 (0 max) instances

with egl:

# NVD_LOG=1 NVD_BACKEND=egl LIBVA_DRIVER_NAME=nvidia /usr/bin/microsoft-edge-beta   --ozone-platform=wayland   --enable-features=AcceleratedVideoDecodeLinuxZeroCopyGL,AcceleratedVideoDecodeLinuxGL,VaapiIgnoreDriverChecks,VaapiOnNvidiaGPUs   --disable-features=UseChromeOSDirectVideoDecoder
MESA: warning: Support for this platform is experimental with Xe KMD, bug reports may be ignored.
MESA: warning: Support for this platform is experimental with Xe KMD, bug reports may be ignored.
       462.691148863 [9835-9835] ../src/vabackend.c:2260       __vaDriverInit_1_0 Initialising NVIDIA VA-API Driver
       462.691158154 [9835-9835] ../src/vabackend.c:2268       __vaDriverInit_1_0 Got DRM FD: 1 43
       462.691162213 [9835-9835] ../src/vabackend.c:2280       __vaDriverInit_1_0 Now have 0 (0 max) instances
       462.691162767 [9835-9835] ../src/vabackend.c:2304       __vaDriverInit_1_0 Selecting EGL backend
       462.691170989 [9835-9835] ../src/export-buf.c: 144       findGPUIndexFromFd Looking for DRM device index: 129
       462.691443689 [9835-9835] ../src/export-buf.c: 158       findGPUIndexFromFd Found 4 EGL devices
       462.691496557 [9835-9835] ../src/export-buf.c: 167       findGPUIndexFromFd Got EGL_CUDA_DEVICE_NV value '0' for EGLDevice 0
       462.691497872 [9835-9835] ../src/export-buf.c: 173       findGPUIndexFromFd Found drmDeviceIndex: 129
       462.691498927 [9835-9835] ../src/export-buf.c: 188       findGPUIndexFromFd Selecting EGLDevice 0
       462.691905507 [9835-9835] ../src/export-buf.c: 257         egl_initExporter Driver supports 16-bit surfaces
       462.948881123 [9835-9835] ../src/vabackend.c: 754           nvCreateConfig Unable to determine surface type for VP9/AV1 codec due to no RTFormat specified.
       462.962736604 [9835-9835] ../src/vabackend.c:2168              nvTerminate Terminating 0x20c400d14000
       462.962747934 [9835-9835] ../src/export-buf.c:  63      egl_releaseExporter Releasing exporter, 0 outstanding frames
       462.962873819 [9835-9835] ../src/export-buf.c:  80      egl_releaseExporter Done releasing frames
       462.962879054 [9835-9835] ../src/vabackend.c:2182              nvTerminate Now have 0 (0 max) instances
[9781:9781:0914/173331.460689:ERROR:chrome/browser/component_updater/edge_llm_runtime_installer.cc:90] On demand update of the EdgeLLMRuntime component failed with error: 5
       482.566232310 [9835-10260] ../src/vabackend.c:2260       __vaDriverInit_1_0 Initialising NVIDIA VA-API Driver
       482.566238621 [9835-10260] ../src/vabackend.c:2268       __vaDriverInit_1_0 Got DRM FD: 1 43
       482.566241401 [9835-10260] ../src/vabackend.c:2280       __vaDriverInit_1_0 Now have 0 (0 max) instances
       482.566242953 [9835-10260] ../src/vabackend.c:2304       __vaDriverInit_1_0 Selecting EGL backend
       482.566249177 [9835-10260] ../src/export-buf.c: 144       findGPUIndexFromFd Looking for DRM device index: 129
       482.566631176 [9835-10260] ../src/export-buf.c: 158       findGPUIndexFromFd Found 4 EGL devices
       482.566669337 [9835-10260] ../src/export-buf.c: 167       findGPUIndexFromFd Got EGL_CUDA_DEVICE_NV value '0' for EGLDevice 0
       482.566671906 [9835-10260] ../src/export-buf.c: 173       findGPUIndexFromFd Found drmDeviceIndex: 129
       482.566673196 [9835-10260] ../src/export-buf.c: 188       findGPUIndexFromFd Selecting EGLDevice 0
       482.566689581 [9835-10260] ../src/export-buf.c: 257         egl_initExporter Driver supports 16-bit surfaces
       482.841199349 [9835-10260] ../src/vabackend.c:1051          nvCreateContext Creating context with 0 render targets, at 1920x1080
       482.885798912 [9835-10260] ../src/vabackend.c:1134          nvCreateContext Creating decoder: 0x20c404850000 for context id: 2
       482.885878698 [9835-10260] ../src/vabackend.c: 988        nvCreateSurfaces2 Creating surface 1920x1080, format 1 (0x20c403489600)
       482.885882723 [9835-10260] ../src/export-buf.c: 525       egl_realiseSurface No free surfaces found
       482.885953813 [9835-10268] ../src/vabackend.c: 403          resolveSurfaces [RT] Resolve thread for 0x20c404f61400 started
       482.886077217 [9835-10260] ../src/export-buf.c: 437 egl_allocateBackingImage Presenting frame -1 1920x1080 (0x20c403489600, 0x20c4040048c0, 0x20c403e0f980)
       482.886235318 [9835-10260] ../src/export-buf.c: 438 egl_allocateBackingImage CUDA ERROR 'invalid resource handle' (400)

       482.886245029 [9835-10260] ../src/export-buf.c:  97                reconnect Reconnecting to stream
       482.886451658 [9835-10260] ../src/export-buf.c: 117                reconnect CUDA ERROR 'operation not supported' (801)

       482.886455919 [9835-10260] ../src/export-buf.c: 530       egl_realiseSurface Unable to realise surface: 0x20c403489600 (-1)
       482.886457853 [9835-10260] ../src/vabackend.c:2147    nvExportSurfaceHandle Unable to export surface
[9835:10260:0914/173350.762733:ERROR:media/gpu/vaapi/vaapi_wrapper.cc:2587] vaExportSurfaceHandle failed, VA error: resource allocation failed
       482.886530891 [9835-10260] ../src/vabackend.c:1023        nvDestroySurfaces Destroying surface -1 (0x20c403489600)
       482.886534111 [9835-10260] ../src/export-buf.c: 332 egl_detachBackingImageFromSurface Cannot detach NULL BackingImage from Surface
[9835:10260:0914/173350.762812:ERROR:media/gpu/vaapi/vaapi_video_decoder.cc:1221] failed Initialize()ing the frame pool
       482.889039963 [9835-10260] ../src/vabackend.c:1170         nvDestroyContext Destroying context: 2
       482.889043886 [9835-10260] ../src/vabackend.c: 321           destroyContext Signaling resolve thread to exit
       482.889045728 [9835-10260] ../src/vabackend.c: 327           destroyContext Waiting for resolve thread to exit
       483.115499768 [9835-10268] ../src/vabackend.c: 458          resolveSurfaces [RT] Resolve thread for 0x20c404f61400 exiting
       483.115620755 [9835-10260] ../src/vabackend.c: 329           destroyContext Finished waiting for resolve thread with 0
       483.115642374 [9835-10260] ../src/vabackend.c:2168              nvTerminate Terminating 0x20c403ee7400
       483.115645154 [9835-10260] ../src/export-buf.c:  63      egl_releaseExporter Releasing exporter, 0 outstanding frames
       483.116835235 [9835-10260] ../src/export-buf.c:  80      egl_releaseExporter Done releasing frames
       483.116913534 [9835-10260] ../src/vabackend.c:2182              nvTerminate Now have 0 (0 max) instances
[9781:9862:0914/173400.364429:ERROR:content/browser/browser_main_loop.cc:311] GLib: g_main_context_pop_thread_default: assertion 'stack != NULL' failed
[9781:9863:0914/173400.364430:ERROR:content/browser/browser_main_loop.cc:311] GLib: g_main_context_pop_thread_default: assertion 'stack != NULL' failed
[9781:9865:0914/173400.364513:ERROR:content/browser/browser_main_loop.cc:311] GLib: g_main_context_pop_thread_default: assertion 'stack != NULL' failed
[9781:9864:0914/173400.364518:ERROR:content/browser/browser_main_loop.cc:311] GLib: g_main_context_pop_thread_default: assertion 'stack != NULL' failed

both fallback to software decoding. vainfo shows:

NVD_LOG=1 NVD_BACKEND=direct LIBVA_DRIVER_NAME=nvidia vainfo
Trying display: wayland
libva info: VA-API version 1.22.0
libva info: User environment variable requested driver 'nvidia'
libva info: Trying to open /usr/lib64/dri-nonfree/nvidia_drv_video.so
libva info: Trying to open /usr/lib64/dri-freeworld/nvidia_drv_video.so
libva info: Trying to open /usr/lib64/dri/nvidia_drv_video.so
libva info: Found init function __vaDriverInit_1_0
       848.936897490 [14194-14194] ../src/vabackend.c:2260       __vaDriverInit_1_0 Initialising NVIDIA VA-API Driver
       848.936899929 [14194-14194] ../src/vabackend.c:2268       __vaDriverInit_1_0 Got DRM FD: 1 4
       848.936902913 [14194-14194] ../src/vabackend.c:2280       __vaDriverInit_1_0 Now have 0 (0 max) instances
       848.936903902 [14194-14194] ../src/vabackend.c:2307       __vaDriverInit_1_0 Selecting Direct backend
       848.953342957 [14194-14194] ../src/direct/nv-driver.c: 305            init_nvdriver Initing nvdriver...
       848.953390822 [14194-14194] ../src/direct/nv-driver.c: 323            init_nvdriver NVIDIA kernel driver version: 580.82.09, major version: 580, minor version: 82
       848.953393673 [14194-14194] ../src/direct/nv-driver.c: 330            init_nvdriver Got dev info: 100 1 2 6
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.22 (libva 2.22.0)
vainfo: Driver version: VA-API NVDEC driver [direct backend]
vainfo: Supported profile and entrypoints
      VAProfileMPEG2Simple            : VAEntrypointVLD
      VAProfileMPEG2Main              : VAEntrypointVLD
      VAProfileVC1Simple              : VAEntrypointVLD
      VAProfileVC1Main                : VAEntrypointVLD
      VAProfileVC1Advanced            : VAEntrypointVLD
      VAProfileH264Main               : VAEntrypointVLD
      VAProfileH264High               : VAEntrypointVLD
      VAProfileH264ConstrainedBaseline: VAEntrypointVLD
      VAProfileHEVCMain               : VAEntrypointVLD
      VAProfileVP8Version0_3          : VAEntrypointVLD
      VAProfileVP9Profile0            : VAEntrypointVLD
      VAProfileAV1Profile0            : VAEntrypointVLD
      VAProfileHEVCMain10             : VAEntrypointVLD
      VAProfileHEVCMain12             : VAEntrypointVLD
      VAProfileVP9Profile2            : VAEntrypointVLD
      VAProfileHEVCMain444            : VAEntrypointVLD
      VAProfileHEVCMain444_10         : VAEntrypointVLD
      VAProfileHEVCMain444_12         : VAEntrypointVLD
       849.204135973 [14194-14194] ../src/vabackend.c:2168              nvTerminate Terminating 0x56239ee82870
       849.204814945 [14194-14194] ../src/vabackend.c:2182              nvTerminate Now have 0 (0 max) instances

my compositor (kwin) is set to run on the NVidia GPU. CUDA 13 is installed and working. NVidia driver version is the 580 beta.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions