Difference between revisions of "Chromium"

From ArchWiki
Jump to navigation Jump to search
(Undo revision 496317 by Orschiro (talk) - this issue is only about GNOME keyring, other password stores are mentioned in Chromium/Tips_and_tricks#Force_a_password_store)
m (→‎See also: update links)
 
(70 intermediate revisions by 16 users not shown)
Line 1: Line 1:
 
[[Category:Web browser]]
 
[[Category:Web browser]]
 +
[[Category:Google]]
 
[[de:Chromium]]
 
[[de:Chromium]]
 
[[es:Chromium]]
 
[[es:Chromium]]
Line 16: Line 17:
 
[[Wikipedia:Chromium (web browser)|Chromium]] is an open-source graphical web browser based on the [[Wikipedia:Blink (web engine)|Blink]] rendering engine. It is the basis for the proprietary Google Chrome browser.
 
[[Wikipedia:Chromium (web browser)|Chromium]] is an open-source graphical web browser based on the [[Wikipedia:Blink (web engine)|Blink]] rendering engine. It is the basis for the proprietary Google Chrome browser.
  
== Installation ==
+
Google Chrome has following notable built-in features over Chromium:
  
The open-source project, '''Chromium''', can be [[install]]ed with the {{Pkg|chromium}} package. For printing support, see [[Gtk#Printers not shown in the GTK print dialog]].
+
* Widevine [[Wikipedia:Encrypted Media Extensions|EME]] for e.g. Netflix, also available via {{AUR|chromium-widevine}}.
 +
* [[Wikipedia:Flash player|Flash player]], also available via {{Pkg|pepper-flash}}. (will be removed in [https://www.chromium.org/flash-roadmap#TOC-Flash-Support-Removed-from-Chromium-Target:-Chrome-87---Dec-2020- December 2020])
 +
* [[Wikipedia:Native client|Native client]] (NaCl). (will be removed in [https://blog.chromium.org/2020/01/moving-forward-from-chrome-apps.html June 2021])
  
Other alternatives include:
+
See these two articles [https://chromium.googlesource.com/chromium/src/+/master/docs/chromium_browser_vs_google_chrome.md] [https://www.howtogeek.com/202825/what%E2%80%99s-the-difference-between-chromium-and-chrome/] for an explanation of the differences between Chromium and Chrome.
  
* {{App|Chromium Beta Channel|the beta version|https://googlechromereleases.blogspot.com/|{{AUR?|chromium-beta}}}}
+
See [[List of applications/Internet#Blink-based]] for other browsers based on Chromium.
* {{App|Chromium Dev Channel|the development version|https://googlechromereleases.blogspot.com/|{{AUR|chromium-dev}}}}
 
* {{App|Chromium snapshot builds|the untested nightly version|https://build.chromium.org/|{{AUR|chromium-snapshot-bin}}}}
 
* {{App|Chromium with [[VA-API]] support|with a patch to enable VA-API|https://chromium-review.googlesource.com/c/chromium/src/+/532294|{{AUR|chromium-vaapi}}}}
 
  
The derived browser, '''Google Chrome''', which automatically installs Flash Player and Widevine [[Wikipedia:Encrypted Media Extensions|EME]] (for e.g. Netflix), can be [[install]]ed with the {{AUR|google-chrome}} package.
+
== Installation ==
 
 
Other alternatives include:
 
  
* {{App|Google Chrome Beta Channel|the beta version|https://www.google.com/chrome/browser/beta.html|{{AUR|google-chrome-beta}}}}
+
There are several packages available to [[install]] Chromium with:
* {{App|Google Chrome Dev Channel|the development version|https://www.google.com/chrome/browser/|{{AUR|google-chrome-dev}}}}
 
  
{{Note|Support for native client (NaCl) has been dropped in {{pkg|chromium}} version 54, see {{Bug|51511}}. Opening NaCl applications will display this error message: "This plugin is not supported". The {{aur|google-chrome}} package supports NaCl.}}
+
* {{Pkg|chromium}} – stable release.
 +
* {{AUR|chromium-dev}} – development release.
 +
* {{AUR|chromium-snapshot-bin}} – nightly build.
 +
* {{AUR|chromium-vaapi}} – patched stable release with [[#Hardware_video_acceleration|VA-API]].
 +
* {{AUR|chromium-vaapi-bin}} – patched stable release with [[#Hardware_video_acceleration|VA-API]], pre-compiled.
 +
* {{AUR|chromium-ozone}} – stable release compiled with wayland support via ozone
  
See these [https://chromium.googlesource.com/chromium/src/+/master/docs/chromium_browser_vs_google_chrome.md two] [https://www.howtogeek.com/202825/what%E2%80%99s-the-difference-between-chromium-and-chrome/ articles] for an explanation of the differences between Chromium and Chrome.
+
Google Chrome packages:
  
On top of the different Chromium build channels, a number of forks exist with more or less special features; see [[List of applications#Blink-based]].
+
* {{AUR|google-chrome}} – stable release.
 +
* {{AUR|google-chrome-beta}} – beta release.
 +
* {{AUR|google-chrome-dev}} – development release.
  
 
== Configuration ==
 
== Configuration ==
Line 46: Line 50:
 
To set Chromium as the default browser and to change which applications Chromium launches when opening downloaded files, see [[default applications]].
 
To set Chromium as the default browser and to change which applications Chromium launches when opening downloaded files, see [[default applications]].
  
=== Flash Player plugin ===
+
=== Certificates ===
  
Flash Player is automatically installed when using Google Chrome.
+
Chromium uses [[Network Security Services]] for certificate management. Certificates can be managed in {{ic|chrome://settings/certificates}}.
 
 
To install it for Chromium, [[install]] the {{Pkg|pepper-flash}} package.
 
 
 
Make sure Flash is allowed to run in {{ic|chrome://settings/content/flash}}.
 
  
 
=== Widevine Content Decryption Module plugin ===
 
=== Widevine Content Decryption Module plugin ===
Line 59: Line 59:
  
 
To install it for Chromium, [[install]] the {{AUR|chromium-widevine}} package. Make sure ''Allow sites to play protected content'' is checked in {{ic|chrome://settings/content/protectedContent}}.
 
To install it for Chromium, [[install]] the {{AUR|chromium-widevine}} package. Make sure ''Allow sites to play protected content'' is checked in {{ic|chrome://settings/content/protectedContent}}.
 +
 +
=== Force GPU acceleration ===
 +
 +
{{Warning|Disabling the rendering blacklist may cause unstable behavior, including crashes of the host. See the bug reports in {{ic|chrome://gpu}} for details.}}
 +
 +
By default Chromium on Linux doesn't use any GPU acceleration. To force GPU acceleration, [[append]] the following flags to [[/Tips and tricks#Making flags persistent|persistent configuration]]:
 +
 +
{{hc|~/.config/chromium-flags.conf|
 +
--ignore-gpu-blacklist
 +
--enable-gpu-rasterization
 +
--enable-native-gpu-memory-buffers
 +
--enable-zero-copy
 +
}}
 +
 +
Additionally the flag {{ic|--disable-gpu-driver-bug-workarounds}} may need to be passed to prevent GPU workaround from being used. Flags in {{ic|chrome://gpu}} should state "Hardware accelerated" when configured and available.
 +
 +
=== Hardware video acceleration ===
 +
 +
Accelerated video decoding using [[VA-API]] can be used with community made patches [https://bugs.chromium.org/p/chromium/issues/detail?id=463440#c65], packages are available in [[AUR]] as {{aur|chromium-vaapi}} or {{aur|chromium-vaapi-bin}}.
 +
 +
{{Warning|Wayland support is not enabled in above packages yet. XWayland is [https://github.com/intel/libva/issues/79 broken] on {{Pkg|libva-intel-driver}}.}}
 +
 +
Be sure to install correct VA-API driver for your video card and verify VA-API has been enabled and working correctly, see [[Hardware video acceleration#Verifying VA-API]].
 +
 +
To enable video acceleration, [[append]] the {{ic|--ignore-gpu-blacklist}} flag to [[/Tips and tricks#Making flags persistent|persistent configuration]]
 +
 +
{{Note|Additionally [[#Force GPU acceleration]] and set {{ic|--disable-gpu-driver-bug-workarounds}} to remove video freezes (especially when watching in fullscreen).
 +
 +
If you keep seeing some issues during playback, try to set also {{ic|1=--use-gl=egl}} option.
 +
}}
 +
 +
To check if it's working play a video which is using a codec supported by your VA-API driver (vainfo tell you which codecs are supported) go to chrome://media-internals/ and check video_decoder :
 +
* Hardware acceleration: MojoVideoDecoder, GpuVideoDecoder
 +
* Software acceleration: VpxVideoDecoder, FFmpegVideoDecoder (some say it's Hardware acceleration?)
 +
Also chrome://gpu should read Video Decode: Hardware accelerated
  
 
=== PDF viewer plugin ===
 
=== PDF viewer plugin ===
Line 64: Line 99:
 
Chromium and Google Chrome are bundled with the ''Chromium PDF Viewer'' plugin. If you don't want to use this plugin, check ''Open PDFs using a different application'' in {{ic|chrome://settings/content/pdfDocuments}}.
 
Chromium and Google Chrome are bundled with the ''Chromium PDF Viewer'' plugin. If you don't want to use this plugin, check ''Open PDFs using a different application'' in {{ic|chrome://settings/content/pdfDocuments}}.
  
=== Certificates ===
+
=== Flash Player plugin ===
 +
 
 +
{{Note|Support for Flash Player will be completely removed from Chromium and Google Chrome in [https://www.chromium.org/flash-roadmap#TOC-Flash-Support-Removed-from-Chromium-Target:-Chrome-87---Dec-2020- December 2020].}}
 +
 
 +
Flash Player is automatically installed when using Google Chrome.
 +
 
 +
To install it for Chromium, [[install]] the {{Pkg|pepper-flash}} package.
  
Chromium uses [[Network Security Services|NSS]] for certificate management. Certificates can be managed in {{ic|chrome://settings/certificates}}.
+
Make sure Flash is allowed to run in {{ic|chrome://settings/content/flash}}.
  
 
== Tips and tricks ==
 
== Tips and tricks ==
Line 82: Line 123:
 
To fix the font rendering in some PDFs one has to install the {{Pkg|ttf-liberation}} package, otherwise the substituted font causes text to run into other text. This was [https://code.google.com/p/chromium/issues/detail?id=369991 reported on the chromium bug tracker] by an Arch user.
 
To fix the font rendering in some PDFs one has to install the {{Pkg|ttf-liberation}} package, otherwise the substituted font causes text to run into other text. This was [https://code.google.com/p/chromium/issues/detail?id=369991 reported on the chromium bug tracker] by an Arch user.
  
=== Force 3D acceleration ===
+
==== Font rendering issues of UTF characters ====
  
{{Warning|Disabling the rendering blacklist may cause unstable behaviour, including crashes of the host. See the bug reports in {{ic|chrome://gpu}}.}}
+
UTF characters may render as boxes (e.g. simplified Chinese characters). Installing {{Pkg|ttf-liberation}} will allow for the characters to be rendered as expected.
  
First follow [[Hardware video acceleration]]. Then, to force 3D rendering, ''enable'' the flags: "Override software rendering list", "GPU rasterization", "Zero-copy rasterizer" in {{ic|chrome://flags}}. Check if it is working in {{ic|chrome://gpu}}. This may also alleviate tearing issues with the [[radeon]] driver.
+
==== Tab font size is too large ====
  
If "Native GpuMemoryBuffers" under {{ic|chrome://gpu}} mentions software rendering, you additionally need to pass the {{ic|--enable-native-gpu-memory-buffers}} flag, or some optimizations (like the zero-copy rasterizer) won't do anything. This flag isn't available under {{ic|chrome://flags}} - it must be passed in either the chromium-flags.conf file (as noted in [[Chromium/Tips and tricks#Making flags persistent]]) or directly on the command line.
+
Chromium will use the GTK settings as described in [[GTK#Configuration]]. When configured, Chromium will use the {{ic|gtk-font-name}} setting for tabs (which may mismatch window font size). To override these settings, use {{ic|1=--force-device-scale-factor=1.0}}.
  
 
=== WebGL ===
 
=== WebGL ===
There is the possibility that your graphics card has been blacklisted by Chromium. See [[#Force 3D acceleration]].
+
 
 +
There is the possibility that your graphics card has been blacklisted by Chromium. See [[#Force GPU acceleration]].
  
 
If you are using Chromium with [[Bumblebee]], WebGL might crash due to GPU sandboxing. In this case, you can disable GPU sandboxing with {{ic|optirun chromium --disable-gpu-sandbox}}.
 
If you are using Chromium with [[Bumblebee]], WebGL might crash due to GPU sandboxing. In this case, you can disable GPU sandboxing with {{ic|optirun chromium --disable-gpu-sandbox}}.
Line 99: Line 141:
 
Chromium can save incorrect data about your GPU in your user profile (e.g. if you use switch between an Nvidia card using Optimus and Intel, it will show the Nvidia card in {{ic|chrome://gpu}} even when you're not using it or primusrun/optirun). Running using a different user directory, e.g, {{ic|1=chromium --user-data-dir=$(mktemp -d)}} may solve this issue. For a persistent solution you can reset the GPU information by deleting {{ic|~/.config/chromium/Local\ State}}.
 
Chromium can save incorrect data about your GPU in your user profile (e.g. if you use switch between an Nvidia card using Optimus and Intel, it will show the Nvidia card in {{ic|chrome://gpu}} even when you're not using it or primusrun/optirun). Running using a different user directory, e.g, {{ic|1=chromium --user-data-dir=$(mktemp -d)}} may solve this issue. For a persistent solution you can reset the GPU information by deleting {{ic|~/.config/chromium/Local\ State}}.
  
=== Zoomed-in GUI ===
+
=== Incorrect HiDPI rendering ===
  
Chromium's graphical interface will automatically scale on high-DPI displays. To disable this, use {{ic|1=--force-device-scale-factor=1}}.
+
Chromium will automatically scale for a [[HiDPI]] display, however this may cause an incorrect renderend GUI.
 +
 
 +
The flag {{ic|1=--force-device-scale-factor=1}} may be used to overrule the automatic scaling factor.
 +
 
 +
On Wayland, the {{AUR|chromium-ozone}} package will automatically scale based on the configured scale of each monitor.
  
 
=== Password prompt on every start with GNOME Keyring ===
 
=== Password prompt on every start with GNOME Keyring ===
Line 116: Line 162:
  
 
See [[Chromium/Tips and tricks#Force a password store]].
 
See [[Chromium/Tips and tricks#Force a password store]].
 +
 +
=== Hang on startup when Google Sync enabled ===
 +
 +
Try launching Chrome with {{ic|1=--password-store=basic}} or another appropriate password store.
 +
 +
See [[Chromium/Tips and tricks#Force a password store]].
 +
 +
=== Shortcuts are not getting created ===
 +
 +
{{Expansion|Which shortcuts?}}
 +
 +
Install {{Pkg|xdg-utils}}.
  
 
== See also ==
 
== See also ==
  
 
* [https://www.chromium.org/ Chromium homepage]
 
* [https://www.chromium.org/ Chromium homepage]
* [https://googlechromereleases.blogspot.com Google Chrome release notes]
+
* [https://chromereleases.googleblog.com/ Google Chrome release notes]
* [https://chrome.google.com/webstore/category/home Chrome web store]
+
* [https://chrome.google.com/webstore/ Chrome web store]
 
* [[Wikipedia:Chromium (web browser)#Differences from Google Chrome|Differences between Chromium and Google Chrome]]
 
* [[Wikipedia:Chromium (web browser)#Differences from Google Chrome|Differences between Chromium and Google Chrome]]
* [http://peter.sh/experiments/chromium-command-line-switches/ List of Chromium command-line switches]
+
* [https://peter.sh/experiments/chromium-command-line-switches/ List of Chromium command-line switches]

Latest revision as of 11:14, 23 January 2020

Chromium is an open-source graphical web browser based on the Blink rendering engine. It is the basis for the proprietary Google Chrome browser.

Google Chrome has following notable built-in features over Chromium:

See these two articles [1] [2] for an explanation of the differences between Chromium and Chrome.

See List of applications/Internet#Blink-based for other browsers based on Chromium.

Installation

There are several packages available to install Chromium with:

Google Chrome packages:

Configuration

Default applications

To set Chromium as the default browser and to change which applications Chromium launches when opening downloaded files, see default applications.

Certificates

Chromium uses Network Security Services for certificate management. Certificates can be managed in chrome://settings/certificates.

Widevine Content Decryption Module plugin

Widevine is Google's Encrypted Media Extensions (EME) Content Decryption Module (CDM). It is used to watch premium video content such as Netflix. It is automatically installed when using Google Chrome.

To install it for Chromium, install the chromium-widevineAUR package. Make sure Allow sites to play protected content is checked in chrome://settings/content/protectedContent.

Force GPU acceleration

Warning: Disabling the rendering blacklist may cause unstable behavior, including crashes of the host. See the bug reports in chrome://gpu for details.

By default Chromium on Linux doesn't use any GPU acceleration. To force GPU acceleration, append the following flags to persistent configuration:

~/.config/chromium-flags.conf
--ignore-gpu-blacklist
--enable-gpu-rasterization
--enable-native-gpu-memory-buffers
--enable-zero-copy

Additionally the flag --disable-gpu-driver-bug-workarounds may need to be passed to prevent GPU workaround from being used. Flags in chrome://gpu should state "Hardware accelerated" when configured and available.

Hardware video acceleration

Accelerated video decoding using VA-API can be used with community made patches [3], packages are available in AUR as chromium-vaapiAUR or chromium-vaapi-binAUR.

Warning: Wayland support is not enabled in above packages yet. XWayland is broken on libva-intel-driver.

Be sure to install correct VA-API driver for your video card and verify VA-API has been enabled and working correctly, see Hardware video acceleration#Verifying VA-API.

To enable video acceleration, append the --ignore-gpu-blacklist flag to persistent configuration

Note: Additionally #Force GPU acceleration and set --disable-gpu-driver-bug-workarounds to remove video freezes (especially when watching in fullscreen).

If you keep seeing some issues during playback, try to set also --use-gl=egl option.

To check if it's working play a video which is using a codec supported by your VA-API driver (vainfo tell you which codecs are supported) go to chrome://media-internals/ and check video_decoder :

  • Hardware acceleration: MojoVideoDecoder, GpuVideoDecoder
  • Software acceleration: VpxVideoDecoder, FFmpegVideoDecoder (some say it's Hardware acceleration?)

Also chrome://gpu should read Video Decode: Hardware accelerated

PDF viewer plugin

Chromium and Google Chrome are bundled with the Chromium PDF Viewer plugin. If you don't want to use this plugin, check Open PDFs using a different application in chrome://settings/content/pdfDocuments.

Flash Player plugin

Note: Support for Flash Player will be completely removed from Chromium and Google Chrome in December 2020.

Flash Player is automatically installed when using Google Chrome.

To install it for Chromium, install the pepper-flash package.

Make sure Flash is allowed to run in chrome://settings/content/flash.

Tips and tricks

See the main article: Chromium/Tips and tricks.

Troubleshooting

Fonts

Note: Chromium does not fully integrate with fontconfig/GTK/Pango/X/etc. due to its sandbox. For more information, see the Linux Technical FAQ.

Font rendering issues in PDF plugin

To fix the font rendering in some PDFs one has to install the ttf-liberation package, otherwise the substituted font causes text to run into other text. This was reported on the chromium bug tracker by an Arch user.

Font rendering issues of UTF characters

UTF characters may render as boxes (e.g. simplified Chinese characters). Installing ttf-liberation will allow for the characters to be rendered as expected.

Tab font size is too large

Chromium will use the GTK settings as described in GTK#Configuration. When configured, Chromium will use the gtk-font-name setting for tabs (which may mismatch window font size). To override these settings, use --force-device-scale-factor=1.0.

WebGL

There is the possibility that your graphics card has been blacklisted by Chromium. See #Force GPU acceleration.

If you are using Chromium with Bumblebee, WebGL might crash due to GPU sandboxing. In this case, you can disable GPU sandboxing with optirun chromium --disable-gpu-sandbox.

Visit chrome://gpu/ for debugging information about WebGL support.

Chromium can save incorrect data about your GPU in your user profile (e.g. if you use switch between an Nvidia card using Optimus and Intel, it will show the Nvidia card in chrome://gpu even when you're not using it or primusrun/optirun). Running using a different user directory, e.g, chromium --user-data-dir=$(mktemp -d) may solve this issue. For a persistent solution you can reset the GPU information by deleting ~/.config/chromium/Local\ State.

Incorrect HiDPI rendering

Chromium will automatically scale for a HiDPI display, however this may cause an incorrect renderend GUI.

The flag --force-device-scale-factor=1 may be used to overrule the automatic scaling factor.

On Wayland, the chromium-ozoneAUR package will automatically scale based on the configured scale of each monitor.

Password prompt on every start with GNOME Keyring

See GNOME/Keyring#Passwords are not remembered.

Chromecasts in the network are not discovered

You will need to enable the Media Router Component Extension in chrome://flags/#load-media-router-component-extension.

Losing cookies and passwords when switching between desktop environments

If you see the message Failed to decrypt token for service AccountId-* in the terminal when you start Chromium, it might try to use the wrong password storage backend. This might happen when you switch between Desktop Environments.

See Chromium/Tips and tricks#Force a password store.

Hang on startup when Google Sync enabled

Try launching Chrome with --password-store=basic or another appropriate password store.

See Chromium/Tips and tricks#Force a password store.

Shortcuts are not getting created

Tango-view-fullscreen.pngThis article or section needs expansion.Tango-view-fullscreen.png

Reason: Which shortcuts? (Discuss in Talk:Chromium#)

Install xdg-utils.

See also