Skip to content

Instantly share code, notes, and snippets.

@VictorQueiroz
Last active May 25, 2025 23:20
Show Gist options
  • Select an option

  • Save VictorQueiroz/daed70908f73092c8db518d864923461 to your computer and use it in GitHub Desktop.

Select an option

Save VictorQueiroz/daed70908f73092c8db518d864923461 to your computer and use it in GitHub Desktop.
Chromium-based project flags to work seamlessly work with Wayland.

Chromium-based project flags to work seamlessly work with Wayland.

Installation

  1. Copy code-flags.conf to the root of the "$HOME"/.config folder.
  2. Replace all *-flags.conf files, except code-flags.conf with the new flags:
find ~/.config \
  -mindepth 1 -maxdepth 1 \
  -type f -and \
  \( \
    -name '*-flags.conf' -and \
    ! -name 'code-flags.conf' \
  \) \
  -exec \
    cp -v ~/.config/code-flags.conf {} \;
## UI scaling working properly
# Wayland Platform (native, no XWayland)
--ozone-platform=wayland
--ozone-platform-hint=auto
# Rendering Backend (ANGLE/OpenGL)
--use-gl=angle
--use-angle=gl
--disable-vulkan
# Sandbox (you might enable sandbox explicitly later if needed)
# --no-sandbox
# --enable-sandbox
# GNOME Integration (GTK4 Preferred)
--gtk-version=4
# Wayland-specific features
--enable-wayland-linux-drm-syncobj
--enable-simplified-tab-drag-ui
# Skia optimizations
--disable-skia-graphite
--disable-skia-vulkan
--disable-features=UseSkiaRenderer,EyeDropper
# Unrelated features
--disable-features=UseChromeOSDirectVideoDecoder
# Video Hardware Acceleration (VAAPI)
--enable-features=VaapiVideoDecodeLinuxGL
--enable-features=AcceleratedVideoDecodeLinuxZeroCopyGL
--enable-features=AcceleratedVideoEncoder
--enable-features=VaapiIgnoreDriverChecks
--enable-features=RawDrawClipboardChangeEvent
# GPU optimizations
--ignore-gpu-blocklist
--disable-gpu-driver-bug-workaround
--disable-gpu-vsync
--enable-accelerated-2d-canvas
--enable-gpu-rasterization
--enable-features=NativeGpuMemoryBuffers
--enable-features=CanvasOopRasterization
--enable-features=VariableRefreshRateAvailable
# WebGPU
--enable-unsafe-webgpu
--enable-webgpu-developer-features
# Video encoding & decoding
--enable-accelerated-video-decode
--enable-accelerated-video-encode
--enable-cast-streaming-hardware-h264
--enable-cast-streaming-hardware-vp8
--enable-cast-streaming-hardware-vp9
# Parallel downloads
--enable-parallel-downloading
# Web APIs
--enable-web-bluetooth
--enable-web-bluetooth-new-permissions-backend
--enable-webusb-device-detection
--enable-zero-copy
--enable-webrtc-pipewire-camera
# Smoothness and UX improvements
--enable-smooth-scrolling
--enable-overlay-scrollbars
--enable-fluent-overlay-scrollbars
--enable-fluent-scrollbars
--enable-lazy-load-image-for-invisible-pages
# Accessibility and UX
--enable-text-based-audio-descriptions
--enable-top-chrome-toasts
# Text enhancements
--enable-cros-touch-text-editing-redesign
# Autofill (disabled predictions/signatures)
--disable-show-autofill-type-predictions
--disable-show-autofill-signatures
# Explicitly avoid problematic flags
# --enable-features=SystemCursorSizeSupported
# --enable-features=ElasticOverscroll
# --enable-features=SurfaceSynchronization
# --enable-features=AsyncFullscreenWindowState
# --enable-features=TouchpadOverscrollHistoryNavigation
# --enable-features=OzoneBubblesUsePlatformWidgets
# See: https://wiki.archlinux.org/title/PipeWire#WebRTC_screen_sharing
--enable-features=WebRTCPipeWireCapturer
# -------- Scaling Flags MUST BE LAST --------
--enable-features=UseOzonePlatform,WaylandWindowDecorations
--enable-features=WaylandUiScale,WaylandPerSurfaceScale,WindowPerSurfaceScale
# --------------------------------------------
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment