Stop Electron/Chromium apps flickering on NVIDIA + Hyprland
Symptom
VS Code / VSCodium, Discord (Vesktop), Obsidian, Slack, Spotify and Chromium-based browsers flicker, tear, or show stale frames when scrolling or dragging, on an NVIDIA GPU under Hyprland. Native GTK apps look fine.
Cause
Electron/CEF apps default to running under XWayland and do not use the linux-drm-syncobj-v1 (explicit sync) protocol. Without explicit sync, the NVIDIA driver has no implicit synchronisation for these buffers, so Hyprland presents half-rendered or out-of-order frames.
Fix
Make Electron apps run natively on Wayland and enable explicit sync.
In ~/.config/hypr/envs.conf (Omarchy 3.x / Hyprland ≤ 0.54):
env = ELECTRON_OZONE_PLATFORM_HINT,auto
Hyprland 0.55+ / Lua config:
hl.env("ELECTRON_OZONE_PLATFORM_HINT", "auto")
For apps that ignore the hint, add the flags to their per-app flags file:
# Chromium
cat >> ~/.config/chromium-flags.conf <<'EOF'
--enable-features=UseOzonePlatform,WaylandLinuxDrmSyncobj
--ozone-platform=wayland
EOF
# Brave / Chrome / VSCodium / Obsidian use the same pattern:
# ~/.config/brave-flags.conf
# ~/.config/chrome-flags.conf
# ~/.config/codium-flags.conf
# ~/.config/obsidian/user-flags.conf
For Spotify, use the spotify-launcher package (official repos) rather than the AUR spotify, and:
mkdir -p ~/.config
cat > ~/.config/spotify-launcher.conf <<'EOF'
[spotify]
extra_arguments = ["--enable-features=UseOzonePlatform", "--ozone-platform=wayland"]
EOF
Log out and back into Hyprland (env changes only apply to newly started sessions).
Verify
In Chromium open chrome://gpu. 'Ozone platform' should read wayland. The app window no longer flickers while scrolling. hyprctl clients shows the app without an xwayland: 1 flag.