Chrome Flags Reference

Chrome command line switches and startup flags for automation, headless mode, and debugging.

--gpu-no-context-lost

What does --gpu-no-context-lost do?

Inform Chrome that a GPU context will not be lost in power saving mode, screen saving mode, etc. Note that this flag does not ensure that a GPU context will never be lost in any situations, say, a GPU reset.

Usage

CLILaunch Chrome with --gpu-no-context-lost using CLI

chrome --gpu-no-context-lost

PuppeteerLaunch Chrome with --gpu-no-context-lost using Puppeteer

const browser = await puppeteer.launch({
  args: ['--gpu-no-context-lost']
});

PlaywrightLaunch Chrome with --gpu-no-context-lost using Playwright

const browser = await chromium.launch({
  args: ['--gpu-no-context-lost']
});

SeleniumLaunch Chrome with --gpu-no-context-lost using Selenium

from selenium import webdriver

options = webdriver.ChromeOptions()
options.add_argument('--gpu-no-context-lost')

driver = webdriver.Chrome(options=options)

Build Conditions

ENABLE_VULKAN && \