Location of persistent flags for Chrome/Chromium in F35?

Configuring Persistent Flags for Chrome and Chromium in Fedora 35: A Comprehensive Guide

For Fedora 35 users seeking to optimize their Chrome or Chromium browser experience, particularly concerning hardware acceleration and Wayland compatibility, setting persistent flags is crucial. This article provides a detailed guide on how to achieve this, addressing the challenge of ensuring flags are consistently applied across browser sessions.

Understanding the Need for Persistent Flags

Chrome and Chromium, while powerful browsers, sometimes require specific flags to enable or enhance certain features. Hardware acceleration, a common point of concern on Wayland, often necessitates these flags. The challenge lies in making these configurations persistent, so they don't disappear after each browser restart.

The Arch Linux Approach: A Quick Comparison

In Arch Linux, a straightforward method exists: storing flags in a dedicated configuration file, typically located at ~/.config/chromium-config.conf or ~/.config/chrome-config.conf. This file is read by the browser upon startup, applying the specified flags.

Fedora 35: Where to Store Persistent Flags?

Unfortunately, the Arch Linux method doesn't directly translate to Fedora 35. Adding flags directly to the desktop shortcut proves temporary, with changes reverting upon the next browser update.

Alternative Solutions for Persistent Flags in Fedora

While the original post doesn't provide the solution, here are the general methods that usually work.

Using the chrome-flags.conf File

  1. Create the Configuration File: Create a file named chrome-flags.conf in the appropriate directory. The exact location can vary depending on the Chromium version, but a good starting point is ~/.config/chrome-flags.conf.
  2. Add Flags: Open the file in a text editor and add each flag on a new line. For instance, to enable hardware acceleration, you might add:
--enable-features=VaapiVideoDecoder
--ignore-gpu-blocklist
--enable-gpu-rasterization
--enable-zero-copy
  1. Restart the Browser: Save the file and restart Chrome/Chromium. The flags should now be applied persistently.

Modifying the Desktop Entry File

  1. Locate the .desktop File: Find the .desktop file for Chrome or Chromium. It's usually located in /usr/share/applications/ or ~/.local/share/applications/.
  2. Edit the Exec Line: Open the .desktop file in a text editor. Look for the Exec= line.
  3. Append Flags: Add the desired flags to the end of the Exec= line. Ensure you place a space between the original command and the first flag. For example:
Exec=/usr/bin/google-chrome-stable %U --enable-features=VaapiVideoDecoder --ignore-gpu-blocklist
  1. Save and Refresh: Save the file. You might need to log out and log back in or restart your desktop environment for the changes to take effect.

Verifying the Flags

After implementing either method, it's crucial to verify that the flags are indeed active.

  1. Open Chrome/Chromium.
  2. Navigate to chrome://flags or chromium://flags.
  3. Search for the flags you added. They should be listed as "Enabled" or "Overridden."

Troubleshooting

  • Flags Not Applying: Double-check the file paths and the syntax of the flags. Ensure there are no typos and that each flag is on a new line in the chrome-flags.conf file.
  • Conflicting Flags: Some flags might conflict with each other or with the browser's default settings. Experiment with different combinations to find the optimal configuration.
  • Browser Updates: Be aware that browser updates can sometimes reset or override custom flags. It's a good practice to periodically check and reapply your configurations after an update.

Conclusion

Configuring persistent flags in Chrome and Chromium on Fedora 35 requires a slightly different approach than on Arch Linux. By utilizing the chrome-flags.conf file or modifying the desktop entry, you can ensure that your desired flags are consistently applied, optimizing your browsing experience, especially in scenarios involving hardware acceleration and Wayland. Remember to verify the flags and troubleshoot any issues that may arise.

. . .