Spaces:
Running
Workarounds for issues with Chrome on Ubuntu
I tested this LFM2-VL-WebGPU example on on AMD Ryzen AI MAX+ 395 w/ Radeon 8060S.
To make WebGPU work on the iGPU I encountered several issues so I wanted to share the workarounds here. To launch chrome with those workarounds you can call the script launch-chrome-webgpu.sh
WebGPU + Webcam Test Report
Date: 2026-03-15
Machine: GlacierPeak NucBox EVO X2
CPU: AMD Ryzen AI MAX+ 395 w/ Radeon 8060S
GPU: AMD Radeon Graphics (RADV GFX1151 / RDNA 3.5 โ Strix Halo)
OS: Ubuntu 24.04.4 LTS (kernel 6.17.0-1012-oem)
Chrome: 146.0.7680.80
Mesa RADV: 25.2.8
ROCm: 1.18 (gfx1151)
Webcam: UGREEN Camera 4K (USB ID eba4:6579)
Test Results
| Test | Result |
|---|---|
| Vulkan driver (RADV) fp16 | PASS โ shaderFloat16 = True via VK_KHR_shader_float16_int8 |
| Chrome Vulkan backend | PASS โ Enabled via --ignore-gpu-blocklist --enable-features=Vulkan |
| WebGPU adapter | PASS โ Vendor: AMD, Architecture: RDNA-3 |
WebGPU shader-f16 feature |
PASS โ Supported, device creation OK |
| Webcam capture in Chrome | PASS โ 1920x1080 @ 30fps (MJPG), 1280x960 @ 10fps (YUY2) |
| Webcam video rendering | PASS โ Requires --disable-gpu-compositing workaround |
| LFM2-VL-WebGPU (HuggingFace) | PASS โ Model loads and runs with webcam input |
Issues Found & Workarounds
1. Chrome defaults to SwiftShader (software) instead of AMD GPU
Cause: Chrome disables Vulkan by default on Linux. Without Vulkan, Dawn (WebGPU) falls back to SwiftShader, which lacks shader-f16.
Fix: --ignore-gpu-blocklist --enable-features=Vulkan and VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/radeon_icd.json
2. GPU compositing breaks webcam video rendering
Cause: Chrome's Vulkan-based GPU compositor has a bug on gfx1151 (Strix Halo) where video textures render as grey/white. Pixel data is captured correctly but display fails.
Fix: --disable-gpu-compositing
3. PipeWire camera delivers low-resolution frames
Cause: Chrome's PipeWire camera backend selects YUY2 raw format (max 640x480@30fps) instead of MJPG (up to 4K@30fps), resulting in pixelated/zoomed images.
Fix: --disable-features=PipeWireCamera forces direct V4L2 access with proper MJPG negotiation.
Purpose of ~/launch-chrome-webgpu.sh
This script launches Google Chrome with the necessary flags to enable hardware-accelerated WebGPU with fp16 (shader-f16) support on the AMD Radeon 8060S (gfx1151) GPU, while also ensuring the UGREEN 4K webcam works correctly.
It is required because Chrome 146 on Ubuntu 24.04 does not enable Vulkan or expose WebGPU shader-f16 by default for this GPU, and has two additional bugs affecting video rendering and camera capture on this hardware.
Flags explained
| Flag | Purpose |
|---|---|
VK_ICD_FILENAMES=.../radeon_icd.json |
Force AMD RADV Vulkan driver, skip SwiftShader/llvmpipe |
--ignore-gpu-blocklist |
Allow Chrome to use Vulkan on gfx1151 (not yet on Chrome's allowlist) |
--enable-unsafe-webgpu |
Enable WebGPU on non-validated hardware |
--enable-features=Vulkan |
Activate Chrome's Vulkan backend (disabled by default on Linux) |
--enable-features=WebGPUDeveloperFeatures |
Expose additional WebGPU capabilities |
--disable-features=PipeWireCamera |
Use V4L2 directly for webcam (fixes resolution/format issue) |
--disable-gpu-compositing |
Work around video rendering bug on gfx1151 |
--enable-dawn-features=allow_unsafe_apis |
Let Dawn expose shader-f16 on unvalidated hardware |
--disable-dawn-features=disallow_unsafe_apis |
Ensure unsafe API restriction is off |
Usage
# Launch Chrome with WebGPU support
~/launch-chrome-webgpu.sh
# Launch with a specific URL
~/launch-chrome-webgpu.sh https://huggingface.co/spaces/LiquidAI/LFM2-VL-WebGPU
# Launch with multiple URLs
~/launch-chrome-webgpu.sh https://example.com https://other.com
Note: The script kills any existing Chrome instance before launching, because Chrome ignores command-line flags if an existing instance is already running.