1.9 KiB
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
- Persistent Flags: On Arch-based systems (like Manjaro), use
~/.config/chrome-flags.confinstead of modifying.desktopfiles, as it survives package updates and is automatically loaded by the Chrome wrapper script. - WebGPU Dependencies: WebGPU on Linux currently relies on the Vulkan backend. Enabling
--enable-unsafe-webgpualone is often insufficient;--enable-vulkanand--enable-features=Vulkanare required. - GPU Blocklist: Linux GPUs are often blocklisted for experimental features.
--ignore-gpu-blocklisthelps 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.gpuis 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/.