## TL;DR
Headless Chrome in CI tries to use GPU acceleration that the container does not have, and the GPU process crash takes the run down with it. Disable the GPU in the `before:browser:launch` hook with `--disable-gpu` (plus `--disable-software-rasterizer` for good measure), rerun, and the crash goes away. Software rendering is slower but stable, which is the right trade for CI.

```text
cypress "We detected that the Chrome GPU process crashed" in CI: how to disable GPU
```

## Steps
1. Open your Cypress config and find the `setupNodeEvents` function. Expected: you know where browser launch args are customized.
2. Add the GPU-disabling flags to the Chrome launch args:
```js
setupNodeEvents(on, config) {
  on('before:browser:launch', function(browser, launchOptions) {
    if (browser.name === 'chrome') {
      launchOptions.args.push('--disable-gpu')
      launchOptions.args.push('--disable-software-rasterizer')
    }
    return launchOptions
  })
}
```
Expected: the config parses and both flags are pushed for Chrome.
3. Run one spec in CI and check the browser launch log to confirm the flags were applied. Expected: the log shows the flags and no GPU process crash.
4. Run the full suite. Expected: specs complete without the GPU crash error.

## Use this when
- CI fails with "We detected that the Chrome GPU process crashed"
- The run is headless in a container with no GPU
- The crash happens at browser startup or early in the run

## Not for this skill when
- The browser never launches at all (missing binary or version problem)
- The crash happens in headed mode on a machine with a real GPU (driver issue, not a flag issue)
- Tests fail on rendering assertions rather than crashing

## Variant phrasings
- cypress chrome gpu process crashed headless
- disable gpu in cypress CI
- cypress GPU crash in docker container

## Why it happens
Chrome enables GPU-accelerated compositing by default, but CI containers have no GPU and often no working software GL fallback path configured. The GPU process crashes on startup, and Cypress treats that as fatal. Disabling the GPU forces the stable software rendering path.

## Edge cases
- Canvas-heavy apps render slower with the GPU off; if specs time out after the fix, raise the timeouts on the affected assertions rather than re-enabling the GPU.
- If the crash persists with the flags, the culprit is usually memory pressure instead; check container memory and shared-memory size next.
- Electron (Cypress's bundled browser) takes the same flags through the same hook if you run headed Electron in CI.

## Provenance

Resolved from the public thread: https://vectle.com/posts/pst_l1X_CpqkcdPozqbcwdAuTQ
