omarchy icon indicating copy to clipboard operation
omarchy copied to clipboard

Hybrid Intel+NVIDIA: Chromium hardware acceleration requires manual workarounds

Open josefdc opened this issue 8 months ago • 21 comments

System details

  • CPU: 13th Gen Intel (Raptor Lake-P)
  • GPU (integrated): Intel Iris Xe Graphics (RPL-P)
  • GPU (discrete): NVIDIA GeForce RTX 3050 6GB Laptop GPU
  • Drivers: nvidia-open-dkms 590.48.01, Mesa 26.0.1, intel-media-driver 25.3.4
  • Omarchy: 3.4.1
  • Kernel: 6.18.13-arch1-1
  • Chromium: 145.0.7632.116

Problem

On hybrid Intel+NVIDIA laptops, Chromium's hardware acceleration is broken out of the box. Enabling "Use hardware acceleration when available" in Chromium settings causes black screen, flickering, and visual corruption. This forces users to disable hardware acceleration entirely, losing VAAPI video decode and GPU rasterization.

The root cause is a cross-GPU DMA-BUF incompatibility: Hyprland's compositor runs on the NVIDIA GPU, while Chromium renders via the Intel GPU through ANGLE/OpenGL. When Chromium's GPU compositor tries to import NVIDIA DMA-BUF buffers as EGLImages on the Intel GPU, it fails with EGL_BAD_MATCH (0x3009), producing hundreds of errors per second:

eglCreateImage failed with 0x00003009
OzoneImageBacking::ProduceSkiaGanesh failed to create GL representation
SharedImageManager::ProduceSkia: Trying to produce a Skia representation from an incompatible backing: OzoneImageBacking

This is the same issue reported in #3899 (same hardware: 13th Gen Intel + RTX 3050).

Investigation & what we tried

1. Set LIBVA_DRIVER_NAME=iHD in ~/.config/hypr/envs.conf

Result: Partially successful. Without this, vainfo defaults to NVIDIA's NVDEC driver which has limited VAAPI support. With iHD, Intel's full VAAPI stack activates (60+ profiles including H264, VP9, HEVC, AV1 encode/decode).

2. Added VA-API flags to chromium-flags.conf (as proposed in #4773)

--enable-features=VaapiVideoDecodeLinuxGL,VaapiVideoEncoder
--enable-gpu-rasterization
--enable-zero-copy
--ignore-gpu-blocklist

Result: Partially successful. chrome://gpu showed "Video Decode: Hardware accelerated" and chrome://media-internals confirmed VaapiVideoDecoder was being used. However, the eglCreateImage errors persisted, causing black screen and flickering.

3. Tried --use-angle=vulkan with Vulkan features

--use-angle=vulkan
--enable-features=Vulkan,DefaultANGLEVulkan

Result: Failed. Chromium window became completely transparent/invisible. ANGLE Vulkan cannot render at all on this hybrid setup.

4. Added --disable-gpu-compositing (working solution)

--disable-gpu-compositing

Result: Working workaround. This disables only the GPU compositor (the part that does cross-GPU buffer sharing), while keeping:

  • ✅ VAAPI video decode (hardware) - H264, VP8, VP9, HEVC, AV1
  • ✅ GPU rasterization (hardware)
  • ✅ Canvas (hardware)
  • ✅ WebGL/WebGPU (hardware, at reduced performance)
  • ❌ GPU compositing (software - scrolling/CSS animations use CPU)

Working configuration

~/.config/hypr/envs.conf

env = LIBVA_DRIVER_NAME,iHD

~/.config/chromium-flags.conf

--enable-features=VaapiVideoDecodeLinuxGL,VaapiVideoEncoder
--enable-gpu-rasterization
--enable-zero-copy
--ignore-gpu-blocklist
--disable-gpu-compositing

Proposal

For hybrid Intel+NVIDIA systems, Omarchy could:

  1. Auto-detect hybrid GPU setups and set LIBVA_DRIVER_NAME=iHD in the environment (needed for Intel VAAPI to work when NVIDIA is present)
  2. Include VA-API flags by default in chromium-flags.conf (as proposed in #4773)
  3. Auto-add --disable-gpu-compositing for hybrid Intel+NVIDIA systems to prevent the cross-GPU eglCreateImage errors

This would make Chromium usable with hardware acceleration out of the box on hybrid laptops, instead of forcing users to either disable HW acceleration entirely or manually figure out the workaround.

Related issues

  • #4773 — Enable VA-API hardware acceleration in default Chromium flags
  • #3899 — Chromium GPU/Ozone errors after update to 3.2.3 (same hardware, same errors)
  • #2964 — Chromium crashes when hardware acceleration is enabled
  • #2800 — google-chrome flickers
  • #3891 — Videos not playing after recent update

josefdc avatar Mar 04 '26 21:03 josefdc

Update: Definitive solution found (no need for --disable-gpu-compositing)

After extensive investigation of the cross-GPU rendering issue on hybrid Intel+NVIDIA laptops, I found the root cause and a working fix that provides full hardware acceleration without any workarounds.

Root cause

On hybrid Intel+NVIDIA systems:

  1. Hyprland composites on Intel (the display eDP-2 is physically connected to Intel/card2/renderD129)
  2. GLVND loads NVIDIA EGL first (10_nvidia.json has priority 10 vs Mesa's 50_mesa.json at priority 50)
  3. Chromium defaults to NVIDIA EGL for rendering (because of GLVND priority order)
  4. This creates a cross-GPU DMA-BUF conflict: Chromium renders buffers on NVIDIA, Hyprland tries to composite them on Intel → eglCreateImage EGL_BAD_MATCH (0x3009) → black screens, intermittent crashes

The previous workaround (--disable-gpu-compositing) avoided this by forcing software compositing in Chromium, but caused visible lag on pages with CSS animations (scroll animations, parallax effects, etc.).

The solution

Force Chromium to use Mesa EGL (Intel) instead of NVIDIA EGL, so it renders on the same GPU as Hyprland.

Wrapper script at ~/.local/bin/chromium (must be in PATH before /usr/bin):

#!/bin/bash
# Force Mesa (Intel) EGL so Chromium renders on the same GPU as Hyprland compositor.
# By default, GLVND loads NVIDIA EGL first (10_nvidia.json priority),
# but Hyprland composites on Intel (eDP-2 display) — causing cross-GPU DMA-BUF failures.
# See: https://github.com/basecamp/omarchy/issues/4901
export __EGL_VENDOR_LIBRARY_FILENAMES=/usr/share/glvnd/egl_vendor.d/50_mesa.json
export LIBVA_DRIVER_NAME=iHD
exec /usr/bin/chromium "$@"

Desktop file override at ~/.local/share/applications/chromium.desktop (so launchers also use the fix):

Exec=env __EGL_VENDOR_LIBRARY_FILENAMES=/usr/share/glvnd/egl_vendor.d/50_mesa.json LIBVA_DRIVER_NAME=iHD /usr/bin/chromium %U

~/.config/chromium-flags.conf (no --disable-gpu-compositing needed):

--ozone-platform=wayland
--ozone-platform-hint=wayland
--enable-features=TouchpadOverscrollHistoryNavigation,VaapiVideoDecodeLinuxGL,VaapiVideoEncoder
--enable-gpu-rasterization
--enable-zero-copy
--ignore-gpu-blocklist

Verified results from chrome://gpu

Feature Before (workaround) After (fix)
GPU Active Intel Intel
Compositing Software only Hardware accelerated
Video Decode Hardware Hardware accelerated
Rasterization Hardware Hardware accelerated on all pages
WebGL Hardware Hardware accelerated
WebGPU Hardware Hardware accelerated
GL_RENDERER — ANGLE (Intel, Mesa Intel Iris Xe Graphics)
GPU crash count — 0

VAAPI decode codecs confirmed working via Intel iHD: H264, VP8, VP9, HEVC, AV1.

What does NOT work (and crashed Hyprland)

During investigation, we tried several approaches that should be avoided:

  1. __EGL_VENDOR_LIBRARY_FILENAMES set globally in envs.conf → Breaks Hyprland completely (compositor can't initialize EGL, crashes on startup, requires TTY recovery)
  2. --render-node-override=/dev/dri/renderD128 (NVIDIA) in chromium-flags.conf → Forces Chromium to render on NVIDIA while Hyprland composites on Intel → crashes Hyprland
  3. LIBVA_DRIVER_NAME=nvidia alone → Intermittent black screens because Chromium still defaults to NVIDIA EGL, creating cross-GPU buffer conflicts

Why this works

By setting __EGL_VENDOR_LIBRARY_FILENAMES only for Chromium (not globally), we override GLVND's default priority order. Chromium loads Mesa EGL → renders on Intel (renderD129) → same GPU as Hyprland compositor → no cross-GPU DMA-BUF conflicts → full hardware acceleration.

LIBVA_DRIVER_NAME=iHD keeps VAAPI decode on Intel too, ensuring all GPU operations happen on the same device.

Proposal for Omarchy

For hybrid Intel+NVIDIA laptops, Omarchy could:

  1. Ship a Chromium wrapper (or chromium-flags.conf entry) that sets __EGL_VENDOR_LIBRARY_FILENAMES to Mesa for Chromium specifically
  2. Set LIBVA_DRIVER_NAME=iHD for Chromium (while keeping nvidia globally for other apps if desired)
  3. Do not add --disable-gpu-compositing — it's not needed with this fix
  4. Include the desktop file override so launcher-started Chromium also gets the fix

This provides full hardware acceleration (compositing + VAAPI decode + rasterization) with zero lag and zero cross-GPU errors.

josefdc avatar Mar 04 '26 22:03 josefdc

This works for me. Thanks!!!

schotime avatar Apr 03 '26 12:04 schotime

I can confirm that this worked for me using the Helium browser

Ret2Hell avatar Apr 03 '26 21:04 Ret2Hell

Was broken for me too, with an AMD integrated GPU and an nvidia discrete gpu, but the same fix worked for me

tanevanwifferen avatar Apr 15 '26 11:04 tanevanwifferen

The think the issue is fixed with the recent updates and this needs to be closed.

n0yal avatar Apr 24 '26 15:04 n0yal

This issue popped up for me after the 3.8.1 update on both Chromium and Helium Browser (on AMD iGPU + Nvidia dGPU). The solution of @josefdc fixed it for me.

bskrt avatar May 15 '26 12:05 bskrt

This issue popped up for me after the 3.8.1 update on both Chromium and Helium Browser (on AMD iGPU + Nvidia dGPU). The solution of @josefdc fixed it for me.

Hey i also faced this after 3.8.1 and i have applied the fix, but now my shortcut to launch chromium is not working, but i can launch chromium from menu where the hardware acceleration fix is correct but when entering keyboard shortcut to launch chromium, nothing happens

n0yal avatar May 15 '26 17:05 n0yal

I'm encountering the same issue as @n0yal, even though I applied the fix before version 3.8.1 (I don't remember the exact version when I did it).

PatBiz avatar May 25 '26 21:05 PatBiz

i am having the same issue.

vytorrennan avatar Aug 25 '26 22:08 vytorrennan

The LIBVA_DRIVER_NAME=iHD half of your workaround may have a traceable source, which might save the next person some digging.

On a hybrid machine — Intel iGPU driving the panel, RTX 2070 Mobile (10de:1f14) driving no outputs at all — Omarchy sets LIBVA_DRIVER_NAME=nvidia session-wide from default/hypr/nvidia.lua. The omarchy-hw-nvidia-gsp detector it gates on matches vendor 0x10de, class 0x03*, device ID >= 0x1e00, so it fires on the presence of a suitable NVIDIA device rather than on whether that device drives a display. On an Optimus laptop it drives nothing, and VA-API decode ends up on the dGPU while rendering and compositing stay on the iGPU.

Symptoms here were different from yours: judder on pages carrying video, with Chromium's renderer peaking at 484% of one core, plus ~200 MiB and ~4 W held on the dGPU for no benefit. No visual corruption and no black screens, so I can't say this accounts for the DMA-BUF failures in this issue. But if iHD helped you, this is very likely where the nvidia value was coming from to begin with.

Filed separately as #8328 with before/after measurements and a suggested gate on /sys/class/drm/card*-*/status, since that defect is fixable independently of the buffer-sharing problem reported here.

emshiarla avatar Aug 26 '26 03:08 emshiarla

This fix worked for me. I had fixed this issue previously on Omarchy 3.8 but with the latest update the issue returned and this worked.

redredkrovy avatar Aug 26 '26 14:08 redredkrovy

Confirming this on a different hybrid box — and note this is Google Chrome 152.0.7977.64, not Chromium. The thread so far is Chromium 145, so the problem spans both browsers and is still present seven major versions later.

One correction to the root cause, and a warning about a partial fix that makes things worse.

System: Omarchy 4.0.1-1, Hyprland 0.56.2, kernel 7.1.9-arch1-2, i7-12800H (Alder Lake-P, Iris Xe) + RTX 3070 Ti Laptop, intel-media-driver 26.2.4, nvidia-utils 610.57.04, Google Chrome 152.0.7977.64.

Correction: libva's auto-detection is fine — Omarchy overrides it

The issue text says libva "defaults to NVIDIA's NVDEC driver". It doesn't. With the variable unset, libva picks Intel on its own:

$ env -u LIBVA_DRIVER_NAME vainfo | grep 'Driver version'
vainfo: Driver version: Intel iHD driver for Intel(R) Gen Graphics - 26.2.4

The NVIDIA driver is only ever loaded because Omarchy explicitly asks for it:

/usr/share/omarchy/default/hypr/nvidia.lua:13:    hl.env("LIBVA_DRIVER_NAME", "nvidia")

That gate is "NVIDIA present + GSP", which is true of every hybrid laptop — but on those machines the iGPU is the only device with an encoder:

$ LIBVA_DRIVER_NAME=nvidia vainfo --device /dev/dri/renderD129 | grep -c Enc
0
$ LIBVA_DRIVER_NAME=iHD    vainfo --device /dev/dri/renderD129 | grep -c Enc
26

So the fix is narrower than "auto-detect hybrid and set iHD": on a hybrid system nvidia.lua should simply not set LIBVA_DRIVER_NAME at all and let libva choose. It already chooses correctly.

Warning: setting LIBVA_DRIVER_NAME=iHD alone is worse than doing nothing

Chrome renders on NVIDIA EGL by default (GLVND ranks 10_nvidia.json above 50_mesa.json). Move VA-API to Intel while rendering stays on NVIDIA and the two sit on different GPUs, so VA-API stops initialising entirely — hardware decode is lost too, not just encode.

VA-API EGL render Result
nvidia (Omarchy default) NVIDIA aligned — decode works, no encoder exists
iHD only NVIDIA mismatched — VA-API dead, everything software
iHD + Mesa EGL Intel decode and encode in hardware

Measured mid-call in that middle state: no VA driver mapped into any Chrome GPU process, Intel's Video engine at 0.3%, and a renderer at 27% CPU doing VP9 in software.

The pair has to move together, which lines up with @josefdc's __EGL_VENDOR_LIBRARY_FILENAMES finding — worth stating explicitly that the VA-driver half must never be applied on its own, since it reads like a safe partial step.

Two diagnostics that actively mislead here

  1. vainfo inherits the same LIBVA_DRIVER_NAME, so it reports the NVIDIA driver even when pointed at the Intel node with --device. What settles it is reading the process:

    $ grep -oE '/usr/lib/dri/[a-z0-9_]+_drv_video\.so' /proc/$(pgrep -f 'type=gpu-process' | head -1)/maps
    

    Chrome also runs its GPU process with --render-node-override=/dev/dri/renderD129 — the Intel node — while loading the NVIDIA VA driver, so every render-node check looks correct.

  2. chrome://gpu's "Graphics Feature Status" reports Video Encode: Hardware accelerated when no encoder exists at all. Only the Video Acceleration Information table lower down is authoritative — its Encoding section was empty.

Omarchy-specific gotcha when applying any env fix

hl.env only affects processes Hyprland spawns from then on. quickshell (the bar and app menu) is started at login and hands its environment to everything launched from the menu — so a browser relaunched from the app menu keeps the old value however many times you quit it. After changing the env:

hyprctl reload
hyprctl dispatch 'hl.dsp.exec_cmd("omarchy restart shell")'

Also worth knowing: Chrome reports LIBVA_DRIVER_NAME as unset in its own /proc/<pid>/environ while its crashpad-handler children show the real value.

Rookie0ne avatar Aug 27 '26 00:08 Rookie0ne

Confirming this on Omarchy 4.0.1 after the upgrade from 4.0.0.

Brave / Brave Origin video playback is broken for almost everything. Apple TV is the only site that still plays cleanly. YouTube and Amazon Prime Video both fail (same for other sites I’ve tried). Screenshot: Image

I haven’t applied the workarounds in this thread yet. I’ll try them and report back. I may have used some of them on 3.x / 4.0.0; if so, the 4.0.1 upgrade likely wiped those flags.

System Info:

  • Dell XPS 17 9710
  • Omarchy 4.0.1-1
  • Linux 7.1.9-arch1-2
  • Hyprland 0.56.2 (Wayland)
  • 11th Gen Intel(R) Core(TM) i7-11800H
  • GeForce RTX 3060 Mobile / Max-Q
  • UHD Graphics
  • intel-media-driver 26.2.4-1
  • nvidia-utils 610.57.04-1
  • Brave 1.94117 (Official Build) (x86_64)/Chromium: 152.0.7977.64

daedalus-codes avatar Aug 29 '26 21:08 daedalus-codes

UPDATE:

Adding the hybrid GPU flags below to the Brave flags file restored playback. I did not A/B which line was the actual fix — I wanted the videos working, not a science project. The block that was not present before the fix:

# GPU FIXES
--enable-features=VaapiVideoDecodeLinuxGL,VaapiVideoEncoder
--enable-gpu-rasterization
--enable-zero-copy
--ignore-gpu-blocklist
--disable-gpu-compositing

Also set env = LIBVA_DRIVER_NAME,iHD in ~/.config/hypr/envs.conf.

Brave Origin stayed broken until it loaded the same flags. Origin does not read brave-flags.conf, so I created a symlink:

~/.config/brave-origin-flags.conf → brave-flags.conf

Then Origin worked too. Omarchy’s Origin install path can write a different/stub flags file, so the GPU workaround looks like a miss if you’re only editing Brave’s conf.

Also thank you @Rookie0ne - definitely need to do this too after applying the changes:

hyprctl reload
hyprctl dispatch 'hl.dsp.exec_cmd("omarchy restart shell")'

daedalus-codes avatar Aug 29 '26 22:08 daedalus-codes

UPDATE II:

  1. My laptop is now a hoverboard when watching video... this was not the case pre 4.0.1
  2. Compared to backed up & pre-Quattro upgrade configs for Brave, no change and video stopped working.

daedalus-codes avatar Aug 29 '26 23:08 daedalus-codes

Follow-up:

Brave 1.94.117 / Chromium 152:

  • Video present broken on this hybrid XPS 17 unless --disable-gpu-compositing (software composite, fans).
  • Also failing Cloudflare Turnstile on some sites.

Rolled back to Brave / Origin 1.93.138 from yay cache. Video works again without disabling GPU compositing, using:

--enable-features=VaapiVideoDecodeLinuxGL,VaapiVideoEncoder,TouchpadOverscrollHistoryNavigation --enable-gpu-rasterization --enable-zero-copy --disable-features=AcceleratedVideoDecodeLinuxZeroCopyGL

--ignore-gpu-blocklist and --disable-gpu-compositing may not be required on 1.93.138.

Pre-4.0.1 this machine ran stock Wayland flags only. After the 1.94 bump those were not enough. Pinning 1.93.138 until Chromium 152 present path is fixed.

daedalus-codes avatar Aug 30 '26 16:08 daedalus-codes

@daedalus-codes your solution works for me with chromium as well, thanks for your update

texarr avatar Sep 04 '26 19:09 texarr

Adding a concrete confirmation for this Intel+NVIDIA case: on the same Raptor Lake-P/Iris Xe + RTX 4060 Max-Q laptop (Omarchy 4.0.2-1, Chromium 151.0.7922.173), an incoming Discord stream remained blank on the affected/default launch even though the Discord web app itself loaded. This makes Discord incoming-stream playback a useful regression test alongside the browser video cases already reported here.

Update: the Intel-only LIBVA_DRIVER_NAME=iHD override restored the incoming Discord stream. The result is confirmed on this machine and is not being presented as a universal workaround for every hybrid-GPU configuration. See #8989 for the session-wide report and #8726 for the AMD-side confirmation; #9483 is the current proposed implementation.

CompleteDotTech avatar Sep 04 '26 22:09 CompleteDotTech

while the command line and the Omarchy Menu -> Apps -> Chromium will work, this temporary fix still breaks because shortcuts use omarchy-launch-browser which wont be able to read the chromium.desktop file properly.

rvalue avatar Sep 14 '26 18:09 rvalue

I can confirm this issue on a different generation of hybrid Intel/NVIDIA hardware and current Omarchy 4.0.4.

System

  • Omarchy: 4.0.4-1
  • Kernel: 7.2.5-3-omarchy
  • Hyprland: 0.56.2-2
  • Chromium: 152.0.7977.82-1
  • Mesa: 26.2.2-1
  • CPU: Intel Core i7-10850H
  • Integrated GPU: Intel UHD Graphics, Comet Lake-H GT2 [8086:9bc4], i915
  • Discrete GPU: NVIDIA Quadro T1000 Mobile [10de:1fb9]
  • NVIDIA driver: nvidia-open-dkms 610.57.04-1

The built-in display is connected through the Intel GPU. chrome://gpu identifies Intel as Chromium's active GPU:

  • GPU0: NVIDIA [10de:1fb9]
  • GPU1: Intel [8086:9bc4] ACTIVE
  • GL_RENDERER: ANGLE (Intel, Mesa Intel UHD Graphics (CML GT2), OpenGL ES 3.2 Mesa 26.2.2)
  • Render node: /dev/dri/renderD129

The Omarchy session also exports:

  • LIBVA_DRIVER_NAME=nvidia
  • __GLX_VENDOR_LIBRARY_NAME=nvidia

Symptoms

Under native Wayland with GPU acceleration enabled:

  • Pages repeatedly jump up and down at particular scroll positions. (Reproduced with keyboard arrows, mouse wheel, and touchpad)
  • Reproduced on Drawabox and Facebook.
  • Also briefly observed in the Chromium-based ChatGPT desktop app.
  • Opening Photopea produced severe stale-frame corruption: Photopea rendered in the upper portion of the tab while content from the previous page remained visible below it.

Errors

During reproduction, Chromium emitted this error sequence over 100 times in approximately two seconds:

ImageEGL.cpp:118: eglCreateImage failed with 0x00003009
Failed to create EGLImage
Unable to initialize binding from pixmap
OzoneImageBacking::ProduceSkiaGanesh failed to create GL representation
SharedImageManager::ProduceSkia: Trying to produce a Skia representation from an incompatible backing: CompoundImageBacking

0x3009 is EGL_BAD_MATCH.

I found no corresponding NVIDIA Xid, GPU hang, or GPU reset in the kernel log.

Controlled tests

  1. Native Wayland, fresh Chromium profile, GPU acceleration enabled:

    • Problem reproduced.
  2. Native Wayland, fresh Chromium profile, --disable-gpu:

    • Problem did not reproduce.
  3. XWayland, fresh Chromium profile, GPU acceleration enabled:

    chromium --user-data-dir=/tmp/chromium-x11-test \
      --ozone-platform=x11 https://drawabox.com
    
    • Problem did not reproduce.

This appears to involve Chromium's accelerated native Wayland buffer-sharing path on hybrid Intel/NVIDIA systems. Running Chromium through XWayland is currently a reliable workaround:

--ozone-platform=x11

shapelesh avatar Sep 21 '26 05:09 shapelesh