From dc22f6fb1749d0b53e9f27a2852f682a12bda587 Mon Sep 17 00:00:00 2001 From: Ronni Skansing Date: Sun, 17 May 2026 20:38:28 +0200 Subject: [PATCH] attempt fix chrome hid Signed-off-by: Ronni Skansing --- backend/remotebrowser/runner.go | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/backend/remotebrowser/runner.go b/backend/remotebrowser/runner.go index 13ceb7e..c9c8b66 100644 --- a/backend/remotebrowser/runner.go +++ b/backend/remotebrowser/runner.go @@ -514,13 +514,18 @@ func (r *Runner) Run(ctx context.Context) error { Logger(chromeLog). Set("disable-crash-reporter"). Set("crash-dumps-dir", crashDir). + // No GPU in headless server environments; software rendering avoids + // the GPU process entirely and prevents CreateCommandBuffer failures. + Set("disable-gpu"). // Prevents navigator.webdriver from being set to true, which is // the primary signal sites like Gmail use to detect automation. Set("disable-blink-features", "AutomationControlled"). - // Disables the HID/USB device-detection service. Without udev (common - // in containers), Chrome's HidServiceLinux crashes with SIGSEGV when - // it tries to enumerate devices via a udev handle it failed to open. - Set("disable-features", "UsbDeviceDetection"). + // Disable device-service features that try to enumerate hardware via + // udev/NETLINK. On VPS environments where AF_NETLINK is restricted, + // Chrome's HidServiceLinux crashes with SIGSEGV when the udev monitor + // fails to open but enumeration is still attempted on the null handle. + // Append (not Set) so Rod's existing site-per-process,TranslateUI defaults are preserved. + Append("disable-features", "WebHID,WebUSB,WebBluetooth"). Env(chromeEnv( "XDG_CONFIG_HOME="+filepath.Join(rootDir, "config"), "XDG_CACHE_HOME="+filepath.Join(rootDir, "cache"),