Repository navigation
feat(browse): add GSTACK_HEADED_NOGPU opt-in for headed mode on virtual displays (Xvnc/Xvfb) - #1915
auroracapital wants to merge 1 commit into
Conversation
On headless virtual displays (Xvnc/Xvfb on EC2/Linux), Playwright's bundled Chromium crashes at GPU process init (SIGTRAP) when headed mode is requested. This renders headed browse completely unusable on remote Linux servers. Add GSTACK_HEADED_NOGPU=1 env opt-in that appends --disable-gpu, --disable-gpu-compositing, --disable-software-rasterizer, and --disable-dev-shm-usage to launch args so the GPU process is bypassed entirely. This keeps headed mode alive on VNC-backed displays without affecting users on real displays who don't set the flag.
|
Merging to
After your PR is submitted to the merge queue, this comment will be automatically updated with its status. If the PR fails, failure details will also be posted here |
|
/trunk merge |
|
An error occurred while submitting your PR to the queue: |
|
Directionally useful for VNC-backed boxes. Two notes: 1. Coverage gap on the handoff path. The NOGPU flags are only added to the 2. Coordination: #1933 adds a general |
|
Thanks for this. The opt-in flags apply to only one headed launch path, and disabling software rendering could produce blank output. Please centralize justified flags across every headed path and add Xvfb/Xvnc rendering, screenshot, PDF, and handoff coverage. |
Problem
On headless Linux servers using virtual displays (Xvnc, Xvfb), Playwright's bundled Chromium crashes with SIGTRAP during GPU process initialization when headed mode is requested. This makes
/browse --headedcompletely non-functional on remote Linux dev boxes.Root cause: virtual display drivers (Xvnc, Xvfb) have no real GPU. Chromium's GPU process init path raises SIGTRAP when it can't initialize hardware acceleration, crashing the browser before the page loads.
Solution
Add an opt-in env var
GSTACK_HEADED_NOGPU=1that appends GPU-disabling Chromium flags at launch:--disable-gpu--disable-gpu-compositing--disable-software-rasterizer--disable-dev-shm-usageThis bypasses the GPU process entirely, keeping headed mode alive on VNC-backed virtual displays.
Usage
Or export it for a session:
export GSTACK_HEADED_NOGPU=1 browse --headed ...Safety
Context
This came up while using gstack
/browse --headedon an EC2 dev box with a VNC display for interactive browser automation. The fix unblocks headed mode for the growing number of users running Claude Code on remote Linux servers.