Files
mw-pfeddersheim-workstation/docs/learnings/2026-03-11-enable-webgpu-chrome-linux.md
T

1.9 KiB

Learning: Enable WebGPU in Chrome on Linux (Manjaro)

Date: 2026-03-11

Context

WebGPU was reported as unavailable in Chrome despite the API being detected. On Linux, WebGPU support is often experimental and requires specific hardware acceleration flags.

Challenge

  • The Google Chrome binary on Manjaro (/usr/bin/google-chrome-stable) is a wrapper script that supports a custom flag file at ~/.config/chrome-flags.conf.
  • Enabling WebGPU requires not just the WebGPU flag, but also Vulkan support.

Solution

Implemented a persistent configuration via Ansible to manage ~/.config/chrome-flags.conf with the following flags:

--enable-unsafe-webgpu
--enable-vulkan
--enable-features=Vulkan
--ignore-gpu-blocklist

Key Learnings

  1. Persistent Flags: On Arch-based systems (like Manjaro), use ~/.config/chrome-flags.conf instead of modifying .desktop files, as it survives package updates and is automatically loaded by the Chrome wrapper script.
  2. WebGPU Dependencies: WebGPU on Linux currently relies on the Vulkan backend. Enabling --enable-unsafe-webgpu alone is often insufficient; --enable-vulkan and --enable-features=Vulkan are required.
  3. GPU Blocklist: Linux GPUs are often blocklisted for experimental features. --ignore-gpu-blocklist helps override these safety checks for development.

Verification

  • Applied changes via Ansible role dev-tools.
  • Verified file existence and content.
  • Verified flag application by inspecting running processes (ps aux).
  • Used Playwright (via MCP) to navigate to https://webgpureport.org/.
  • Confirmed that while navigator.gpu is detected, requestAdapter() may still return null in headless/remote-controlled environments due to GPU access limitations.
  • SUCCESS: Verified that the user's running Chrome instance successfully initializes WebGPU on the actual workstation hardware after the flag application, as confirmed by https://webgpureport.org/.