Chromium Browser on Arch Linux: A Comprehensive Setup and Optimization Guide
Chromium is a powerful, open-source web browser that serves as the foundation for Google Chrome. This guide provides a detailed walkthrough on installing, configuring, and optimizing Chromium on Arch Linux. From hardware acceleration to Wayland support, discover how to get the most out of your browsing experience.
Why Choose Chromium?
Chromium offers a customizable and open-source browsing experience. It's a great choice for users who value control over their browser and want to leverage the flexibility of Arch Linux.
Chromium vs. Google Chrome: What's the Difference?
Chromium is the open-source project, while Google Chrome is the proprietary browser built upon it. Key differences include:
- Sync: Chromium versions 89+ have disabled sync functionality.
- Branding: Chromium lacks Google's branding and some proprietary features.
- Telemetry: Chromium has reduced telemetry compared to Google Chrome.
Installation: Choosing the Right Package
Several Chromium packages are available in the Arch Linux repositories and the Arch User Repository (AUR). Choose the one that best fits your needs:
- chromium: The stable release from the official repositories. Install with:
pacman -S chromium
- chromium-dev: A development release from the AUR for those seeking the latest features.
- chromium-snapshot-bin: A nightly build from the AUR, offering bleeding-edge updates.
For those preferring Google Chrome, the following AUR packages are available:
- google-chrome: Stable release of Google Chrome.
- google-chrome-beta: Beta release for testing upcoming features.
- google-chrome-dev: Development release for developers and advanced users.
- google-chrome-canary: Canary release, providing daily builds with the newest features.
Privacy Note: Be aware that Google Chrome integrates with Google services and is subject to the Google Privacy Policy. If privacy is a concern, consider privacy-focused Chromium spin-offs.
Configuration: Tailoring Chromium to Your Needs
Let's dive into configuring Chromium for optimal performance and user experience.
Setting Default Applications
Configure Chromium as your default browser and manage how it handles downloaded files through the default applications settings in your desktop environment.
Managing Certificates
Chromium uses Network Security Services (NSS) for handling certificates. Access and manage certificates directly in Chromium's settings: chrome://settings/certificates
.
Making Flags Persistent: Customize with Command-Line Switches
Customize Chromium's behavior using command-line flags. To make these flags permanent, create a chromium-flags.conf
file:
- Create the file:
$HOME/.config/chromium-flags.conf
or/etc/chromium-flags.conf
(for global settings). - Add your desired flags, one per line. Lines starting with
#
are ignored as comments.
~/.config/chromium-flags.conf
# Start Chromium maximized
--start-maximized
# Launch in incognito mode
--incognito
Enhancing Performance: GPU and Hardware Video Acceleration
Force GPU Acceleration
Chromium usually enables GPU acceleration automatically. If your system is on the blocklist, force enable it by adding these flags:
Warning: Overriding the blocklist may cause instability.
~/.config/chromium-flags.conf
--ignore-gpu-blocklist
--enable-zero-copy
Hardware Video Acceleration (VA-API)
Enabling VA-API can significantly reduce CPU usage during video playback.
Note: There's no official support from Chromium or Arch Linux for this feature.
Steps to Enable VA-API:
- Install VA-API driver: Install the appropriate driver for your GPU (e.g.,
libva-intel-driver
for Intel,libva-nvidia-driver
for NVIDIA proprietary). - Verify VA-API: Use
vainfo
to confirm VA-API is working. - Add flags: Add the following flag to your
chromium-flags.conf
:
~/.config/chromium-flags.conf
--enable-features=AcceleratedVideoDecodeLinuxGL
* Older versions of Chromium (prior to 131) should use `--enable-features=VaapiVideoDecodeLinuxGL` instead.
4. Additional flags (if needed):
* `--use-gl=egl`: To use the system GL renderer on Xorg or Wayland.
* `--enable-features=VaapiIgnoreDriverChecks` or `--disable-features=UseChromeOSDirectVideoDecoder`: If VA-API still doesn't function properly.
* `LIBVA_DRI3_DISABLE=1`: As an environment variable for X11 and older GPUs.
Vulkan Configuration:
For systems using Vulkan, these flags may be required:
~/.config/chromium-flags.conf
--enable-features=VaapiVideoDecoder,VaapiIgnoreDriverChecks,Vulkan,DefaultANGLEVulkan,VulkanFromANGLE
Tips for Verifying VA-API:
- Check Media Tab: Open DevTools (
Ctrl+Shift+I
), go to "More tools" > "Media," and inspect the hardware decoder state during video playback. - Use Large Videos: Chromium may only accelerate videos larger than 720p.
- To reduce CPU usage, consider using extensions like h264ify, enhanced-h264ify or Not yet, AV1.
KDE Plasma Integration
For seamless integration with the KDE Plasma desktop environment, install the plasma-browser-integration
package.
Disabling the PDF Viewer Plugin
If you prefer an external PDF viewer, disable the built-in Chromium PDF Viewer in chrome://settings/content/pdfDocuments
by selecting "Download PDFs".
Wayland Support: Modern Display Protocol
Running on Xwayland with NVIDIA
If you encounter GPU crashes when using NVIDIA's proprietary driver on Xwayland, add these flags:
--use-angle=vulkan --use-cmd-decoder=passthrough
Native Wayland Support
Enable native Wayland support for improved performance and integration:
- Add flags:
--ozone-platform-hint=auto
* If that doesn't work, try:
--ozone-platform=wayland
- Restart Chromium: Completely close and reopen Chromium after changing the ozone platform flags.
- Troubleshooting input methods: If you have issues with input methods, try:
--gtk-version=4
* Alternatively, for Fcitx5:
--enable-wayland-ime --wayland-text-input-version=3
Touchpad Gestures on Wayland
Enable touchpad gestures for history navigation with these flags:
--ozone-platform-hint=auto --enable-features=TouchpadOverscrollHistoryNavigation
Useful Tips and Tricks
Exploring Chrome:// URLs
Access a variety of settings and debugging tools through Chrome URLs:
chrome://flags
: Enable experimental features.chrome://extensions
: Manage installed extensions.chrome://gpu
: View GPU status and settings.chrome://sandbox
: Check sandbox status.chrome://version
: Display Chromium version and command-line switches.
Chromium Task Manager
Press Shift+Esc
to open the built-in task manager and monitor resource usage.
Overriding the Preferences File
To prevent Chromium from overwriting your preferences file when syncing, launch it with the --disable-sync-preferences
flag.
Adding Custom Search Engines
Customize your search experience by adding custom search engines like wiki.archlinux.org
.
By following this comprehensive guide, you can tailor Chromium on Arch Linux to perfectly suit your needs, maximizing performance, security, and overall browsing satisfaction.