Skip to content

Hardware acceleration works but Youtube shows black screenΒ #463

Open

Description

@akontsevich

Hardware acceleration works but Youtube shows black screen while video is playing and can hear the sound.

My machine:

Operating System: openSUSE Tumbleweed 20260922
KDE Plasma Version: 6.7.5
KDE Frameworks Version: 6.30.0
Qt Version: 6.11.2
Kernel Version: 7.2.4-1-default (64-bit)
Graphics Platform: X11 (1.21.1.24 (12101024))
Graphics Processor: NVIDIA GeForce RTX 3050
NVIDIA Driver Version: 595.99.02

3 situations show:

in each:


1 Chromium without parameters

nvidia-smi dmon shows zeros in dec column.

chrome://gpu/:

Graphics Feature Status

  • Canvas: Hardware accelerated
  • Direct Rendering Display Compositor: Disabled
  • Compositing: Hardware accelerated
  • Multiple Raster Threads: Enabled
  • OpenGL: Enabled
  • Rasterization: Hardware accelerated on all pages
  • Raw Draw: Disabled
  • Skia Graphite: Disabled
  • TreesInViz: Disabled
  • Video Decode: Hardware accelerated
  • Video Encode: Hardware accelerated
  • Vulkan: Disabled
  • WebGL: Hardware accelerated
  • WebGPU: Hardware accelerated
  • WebGPU interop: Hardware accelerated
  • WebNN: Disabled
Codec checker page -> Image

2 Chromium with recommended parameters but video is black on Youtube (NVD_BACKEND=direct)

LIBVA_DRIVER_NAME=nvidia NVD_BACKEND=direct chromium \
  --enable-features=AcceleratedVideoDecodeLinuxGL,VaapiOnNvidiaGPUs \
  --ignore-gpu-blocklist \
  --use-gl=angle --use-angle=gl

while nvidia-smi dmon shows some numbers in dec column.

chrome://gpu/:

Graphics Feature Status

  • Canvas: Hardware accelerated
  • Direct Rendering Display Compositor: Disabled
  • Compositing: Hardware accelerated
  • Multiple Raster Threads: Enabled
  • OpenGL: Enabled
  • Rasterization: Hardware accelerated on all pages
  • Raw Draw: Disabled
  • Skia Graphite: Disabled
  • TreesInViz: Disabled
  • Video Decode: Hardware accelerated
  • Video Encode: Software only. Hardware acceleration disabled
  • Vulkan: Disabled
  • WebGL: Hardware accelerated
  • WebGPU: Hardware accelerated
  • WebGPU interop: Hardware accelerated
  • WebNN: Disabled
Codec checker page -> Image

Why Video Encode is Software only and Hardware acceleration disabled in 2nd case unlike the 1st case?


3 Chromium with recommended parameters and video is shown on Youtube (NVD_BACKEND=egl) but no hardware decoding

LIBVA_DRIVER_NAME=nvidia NVD_BACKEND=egl chromium \
  --enable-features=AcceleratedVideoDecodeLinuxGL,VaapiOnNvidiaGPUs \
  --ignore-gpu-blocklist \
  --use-gl=angle --use-angle=gl

nvidia-smi dmon shows zeros in dec column again.

chrome://gpu/:

Graphics Feature Status

  • Canvas: Hardware accelerated
  • Direct Rendering Display Compositor: Disabled
  • Compositing: Hardware accelerated
  • Multiple Raster Threads: Enabled
  • OpenGL: Enabled
  • Rasterization: Hardware accelerated on all pages
  • Raw Draw: Disabled
  • Skia Graphite: Disabled
  • TreesInViz: Disabled
  • Video Decode: Hardware accelerated
  • Video Encode: Software only. Hardware acceleration disabled
  • Vulkan: Disabled
  • WebGL: Hardware accelerated
  • WebGPU: Hardware accelerated
  • WebGPU interop: Hardware accelerated
  • WebNN: Disabled
Codec checker page -> Image

Activity

  1. svector commented on Oct 12, 2026

    @svector

    I get the same issue in X11 - no errors but no video. NVIDIA driver 595.99.02 and chrome 154.0.8037.92. It works in a wayland session, and Firefox works in both x11 and wayland. So it appears to be a Chrome + X11 bug. Maybe try a wayland session and see if it works for you there?

  2. az4521 commented on Oct 14, 2026

    @az4521

    i'm real lazy so i'm not making a proper PR for this, but i got hardware decode working on X11 in my own flatpak app (GTX 1650, 580.178.04, Electron 44)

    root cause on the Vulkan side: NVIDIA's Vulkan driver only lists DRM_FORMAT_MOD_LINEAR (0x0) for NV12, so importing the driver's block-linear surfaces fails vkCreateImage with VK_ERROR_INVALID_DRM_FORMAT_MODIFIER_PLANE_LAYOUT_EXT (that's the "could not create backing" / GPU process restart loop). Chromium's GL path on X11 stays black even with linear surfaces, so Vulkan is the only route that worked

    this patch adds NVD_LINEAR=1, which allocates and exports surfaces pitch-linear (single buffer, LINEAR modifier) and maps them into CUDA as device memory. Without the env var it behaves exactly like upstream:
    https://github.com/az4521/Zam/blob/78a6db8b3f5d21251fcb1e8b796276fed0d64375/flatpak/nvidia-vaapi-driver/linear-surfaces.patch

    you also need a small Vulkan layer: Chromium asks for COLOR_ATTACHMENT usage on every imported frame, and NVIDIA doesn't support that on linear NV12, so the layer drops it (Chromium only samples video frames anyway). In my log it kicks in on every import:
    https://github.com/az4521/Zam/blob/033484a31cab231ace106331286e643149eca9da/flatpak/vk-layer/zam_video_import.c

    chromium flags:
    --use-angle=vulkan --enable-features=Vulkan,VulkanFromANGLE,DefaultANGLEVulkan,VaapiIgnoreDriverChecks,VaapiOnNvidiaGPUs
    plus NVD_LINEAR=1 and LIBVA_DRIVER_NAME=nvidia in the environment

  3. akontsevich commented on Oct 14, 2026

    @akontsevich
    Author

    chromium flags:
    --use-angle=vulkan --enable-features=Vulkan,VulkanFromANGLE,DefaultANGLEVulkan,VaapiIgnoreDriverChecks,VaapiOnNvidiaGPUs
    plus NVD_LINEAR=1 and LIBVA_DRIVER_NAME=nvidia in the environment

    Shows the video, however how can I check it hardware decoded now? nvidia-smi dmon shows zeros now in dec column, while codec-checker page shows everything green and hardware decoded:

    GPU & Codec Checker page content>>>
    GPU & Codec Checker - CODECS.COM
    ==================================
    
    GPU:     ANGLE (NVIDIA, Vulkan 1.4.329 (NVIDIA NVIDIA GeForce RTX 3050 (0x00002507)), NVIDIA)
    Vendor:  Google Inc. (NVIDIA)
    Family:  NVIDIA
    Engine:  Chromium/Blink
    WebGL:   Yes | WebGL2: Yes | WebGPU: Yes
    
    AT A GLANCE
    -----------
    H.264    Hardware
    H.265    Hardware
    AV1      Hardware
    VP9      Hardware
    
    DECODE
    ------
    H.264 Baseline 1080p             Supported        HW:Hardware     PWR:Yes
    H.264 High 1080p                 Supported        HW:Hardware     PWR:Yes
    H.264 High 4K                    Supported        HW:Hardware     PWR:Yes
    H.265/HEVC Main 1080p            Supported        HW:Hardware     PWR:Yes
    H.265/HEVC Main 4K               Supported        HW:Hardware     PWR:Yes
    H.265/HEVC Main10 4K             Supported        HW:Hardware     PWR:Yes
    AV1 Main 1080p                   Supported        HW:Hardware     PWR:Yes
    AV1 Main 4K                      Supported        HW:Hardware     PWR:Yes
    AV1 Main10 4K (HDR)              Supported        HW:Hardware     PWR:Yes
    VP9 Profile 0 1080p              Supported        HW:Hardware     PWR:Yes
    VP9 Profile 0 4K                 Supported        HW:Hardware     PWR:Yes
    VP9 Profile 2 4K (HDR)           Supported        HW:Hardware     PWR:Yes
    VP8 480p                         Supported        HW:Hardware     PWR:Yes
    Theora 480p                      Not Supported    HW:-            PWR:-
    
    ENCODE
    ------
    H.264 Baseline 1080p             Supported        HW:Software
    H.264 High 1080p                 Supported        HW:Software
    H.265/HEVC Main 1080p            Not Supported    HW:-
    AV1 Main 1080p                   Supported        HW:Software
    VP9 Profile 0 1080p              Supported        HW:Software
    VP8 480p                         Supported        HW:Software
    
    Checked at: https://www.free-codecs.com/app/codec-checker/
    

    However browser window operates strange and blinks few times on video start and shows me underlying terminal where I run chromium from. Then works fine.

  4. akontsevich commented on Oct 14, 2026

    @akontsevich
    Author

    I get the same issue in X11 - no errors but no video. NVIDIA driver 595.99.02 and chrome 154.0.8037.92. It works in a wayland session, and Firefox works in both x11 and wayland. So it appears to be a Chrome + X11 bug. Maybe try a wayland session and see if it works for you there?

    Thanks, will try: forth coming Plasma 6.8 upgrade will force me to switch to wayland.

  5. akontsevich commented on Oct 18, 2026

    @akontsevich
    Author

    I get the same issue in X11 - no errors but no video. NVIDIA driver 595.99.02 and chrome 154.0.8037.92. It works in a wayland session, and Firefox works in both x11 and wayland. So it appears to be a Chrome + X11 bug. Maybe try a wayland session and see if it works for you there?

    Yes, works fine in wayland! Thanks!

  6. alesisjoan commented on Oct 29, 2026

    @alesisjoan

    I vibe coded with claude this fix and works for me https://github.com/alesisjoan/nvidia-vaapi-driver/tree/chrome-nvdec

    Image Image
  7. akontsevich commented on Oct 30, 2026

    @akontsevich
    Author
  8. elee1766 commented on Nov 2, 2026

    @elee1766

    so i think there are at least two problems? ive tried to report them upstream

    https://issues.angleproject.org/issues/578756715 this in chrome
    https://forums.developer.nvidia.com/t/595-112-07-glxbindteximageext-sigsegv-on-dri3-imported-linear-xrgb8888-pixmap/387204 this in nvidia

    try this:

    LIBVA_DRIVER_NAME=nvidia NVD_BACKEND=direct chromium \
      --use-gl=angle --use-angle=gl-egl \
      --ignore-gpu-blocklist \
      --disable-features=Vulkan \
      --enable-features=AcceleratedVideoDecodeLinuxGL,VaapiVideoDecoder,VaapiIgnoreDriverChecks,VaapiOnNvidiaGPUs
    

    this forces the egl backend which i think works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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