Chrome Flags Reference

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

--gpu-preferences

What does --gpu-preferences do?

Passes encoded GpuPreferences to GPU process.

Usage

CLILaunch Chrome with --gpu-preferences using CLI

chrome --gpu-preferences

PuppeteerLaunch Chrome with --gpu-preferences using Puppeteer

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

PlaywrightLaunch Chrome with --gpu-preferences using Playwright

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

SeleniumLaunch Chrome with --gpu-preferences using Selenium

from selenium import webdriver

options = webdriver.ChromeOptions()
options.add_argument('--gpu-preferences')

driver = webdriver.Chrome(options=options)