Difference between revisions of "Chromium"

From ArchWiki
Jump to navigation Jump to search
(→‎Configuration: chromium-vaapi needs only --ignore-gpu-blacklist to get hw decoding working)
 
(222 intermediate revisions by 59 users not shown)
Line 1: Line 1:
 +
[[Category:Web browser]]
 +
[[Category:Google]]
 
[[de:Chromium]]
 
[[de:Chromium]]
 
[[es:Chromium]]
 
[[es:Chromium]]
Line 5: Line 7:
 
[[ja:Chromium]]
 
[[ja:Chromium]]
 
[[ru:Chromium]]
 
[[ru:Chromium]]
[[zh-CN:Chromium]]
+
[[zh-hans:Chromium]]
[[Category:Web Browser]]
 
 
{{Related articles start}}
 
{{Related articles start}}
{{Related|Chromium tweaks}}
+
{{Related|Chromium/Tips and tricks}}
 
{{Related|Browser plugins}}
 
{{Related|Browser plugins}}
 
{{Related|Firefox}}
 
{{Related|Firefox}}
Line 14: Line 15:
 
{{Related articles end}}
 
{{Related articles end}}
  
[[Wikipedia:Chromium (web browser)|Chromium]] is an open-source graphical web browser from Google, based on the [[Wikipedia:Blink (layout engine)|Blink]] rendering engine.
+
[[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.
 +
 
 +
Google Chrome has following notable built-in features over Chromium:
 +
 
 +
* [[Wikipedia:Flash player|Flash player]], also available via {{Pkg|pepper-flash}}.
 +
* Widevine [[Wikipedia:Encrypted Media Extensions|EME]] for e.g. Netflix, also available via {{AUR|chromium-widevine}}.
 +
* [[Wikipedia:Native client|Native client]] (NaCl). Support for native client (NaCl) has been dropped from Chromium packages since version 54, see {{Bug|51511}}.
 +
 
 +
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.
 +
 
 +
See [[List of applications/Internet#Blink-based]] for other browsers based on Chromium.
  
 
== Installation ==
 
== Installation ==
  
The open source project, '''Chromium''', can be [[Pacman|installed]] with the package {{Pkg|chromium}}, available in the [[official repositories]].  
+
There are several packages available to [[install]] Chromium with:
In the [[AUR]] you can also find:
+
 
* {{AUR|chromium-dev}} - the development version (binary version: {{AUR|chromium-browser-bin}})
+
* {{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
 +
 
 +
Google Chrome packages:
 +
 
 +
* {{AUR|google-chrome}} – stable release.
 +
* {{AUR|google-chrome-beta}} – beta release.
 +
* {{AUR|google-chrome-dev}} – development release.
 +
 
 +
== Configuration ==
  
The modified browser, '''Google Chrome''', bundled with Flash Player and PDF Reader, can be installed with the package {{AUR|google-chrome}}, available in the [[AUR]].
+
=== Default applications ===
In the [[AUR]] you can also find:
 
* {{AUR|google-chrome-beta}} - the beta version
 
* {{AUR|google-chrome-dev}} - the development version
 
  
{{Tip|See these [https://code.google.com/p/chromium/wiki/ChromiumBrowserVsGoogleChrome two] [http://news.softpedia.com/news/Google-Chrome-vs-Chromium-Understanding-Stable-Beta-Dev-Releases-and-Version-No-140060.shtml articles] for an explanation of the differences between Stable/Beta/Dev, as well as Chromium vs. Chrome and an explanation of the version numbering.}}
+
To set Chromium as the default browser and to change which applications Chromium launches when opening downloaded files, see [[default applications]].
  
===32-bit systems predating SSE2===
+
=== Certificates ===
  
As of version 35 of chromium, [https://code.google.com/p/chromium/issues/detail?id=348761#c15 support for older hardware without an SSE2 instruction set has been removed upstream]. Users of old hardware still wishing to use chromium may build the {{AUR|chromium-no-sse2}} package or download a pre-compiled package from [[Repo-ck#Miscellaneous_packages]]. Keep in mind that requiring SSE2 fixed several bugs, and you should not report issues encountered with this patched version upstream.
+
Chromium uses [[Network Security Services]] for certificate management. Certificates can be managed in {{ic|chrome://settings/certificates}}.
  
== Configuration ==
+
=== Widevine Content Decryption Module plugin ===
  
=== Set Chromium as default browser ===
+
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.
  
This behaviour is related to [[xdg-open]]: see [[xdg-open#Set the default browser]]. For more information about the topic in general, see [[Default applications]].
+
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}}.
  
=== File associations ===
+
=== Force GPU acceleration ===
  
This behaviour is related to [[xdg-open]]: see [[xdg-open#Configuration]]. For more information about the topic in general, see [[Default applications]].
+
{{Warning|Disabling the rendering blacklist may cause unstable behavior, including crashes of the host. See the bug reports in {{ic|chrome://gpu}} for details.}}
  
=== Flash Player plugin ===
+
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]]:
  
{{Note|Chromium no longer supports the Netscape plugin API (NPAPI), so {{pkg|flashplugin}} from the repositories cannot be used.}}
+
{{hc|~/.config/chromium-flags.conf|
 +
--ignore-gpu-blacklist
 +
--enable-gpu-rasterization
 +
--enable-native-gpu-memory-buffers
 +
--enable-zero-copy
 +
}}
  
'''pepper-flash''' is the Flash Player plugin, using the new Pepper plugin API. It is developed by Adobe, and distributed bundled with Google Chrome.
+
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.
  
To install pepper-flash for Chromium, install {{AUR|chromium-pepper-flash}} from the [[AUR]]. If you want the development version, install {{AUR|chromium-pepper-flash-dev}}.
+
=== Hardware video acceleration ===
  
Enable the plugin in {{ic|chrome://plugins}}.
+
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}}.
  
=== PDF viewer plugin ===
+
{{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}}.}}
  
There are multiple ways of enabling PDF support in Chromium that are detailed below.
+
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]].
  
==== libpdf ====
+
To enable video acceleration, [[append]] the {{ic|--ignore-gpu-blacklist}} flag to [[/Tips and tricks#Making flags persistent|persistent configuration]]
  
'''libpdf''' is Google's own implementation of a PDF renderer included with Google Chrome. It is compatible with Chromium.
+
{{Note|Additionally [[#Force GPU acceleration]] and set {{ic|--disable-gpu-driver-bug-workarounds}} to remove video freezes (especially when watching in fullscreen).
  
From [[Chromium]] v37.0 '''libpdf''' is included in {{Pkg|chromium}} package (and built with {{AUR|chromium-dev}}).
+
If you keep seeing some issues during playback, try to set also {{ic|1=--use-gl=egl}} option.
 +
}}
  
If the plugin is disabled then enable it in {{ic|chrome://plugins}}.
+
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.js ====
+
=== Flash Player plugin ===
  
See the main article: [[Browser plugins#PDF.js]]
+
Flash Player is automatically installed when using Google Chrome.
  
=== Print preview ===
+
To install it for Chromium, [[install]] the {{Pkg|pepper-flash}} package.
  
The print preview feature is disabled by default in Chromium, unlike Google Chrome. Enabling it requires passing {{ic|--enable-print-preview}} with the [[#PDF viewer plugin]] installed.
+
Make sure Flash is allowed to run in {{ic|chrome://settings/content/flash}}.
  
=== Certificates ===
+
=== PDF viewer plugin ===
  
Chromium uses [[Network Security Services|NSS]] for certificate management. Certificates can be managed in {{ic|Settings}} → {{ic|Show advanced settings...}} → {{ic|Manage Certificates...}}.
+
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}}.
  
 
== Tips and tricks ==
 
== Tips and tricks ==
  
See the main article: [[Chromium tweaks]]
+
See the main article: [[Chromium/Tips and tricks]].
  
 
== Troubleshooting ==
 
== Troubleshooting ==
  
=== Constant freezes under KDE ===
+
=== Fonts ===
 +
 
 +
{{Note|Chromium does not fully integrate with fontconfig/GTK/Pango/X/etc. due to its sandbox. For more information, see the [https://dev.chromium.org/developers/linux-technical-faq Linux Technical FAQ].}}
  
[[Pacman#Removing packages|Uninstall]] {{pkg|libcanberra-pulse}}. See: [https://bbs.archlinux.org/viewtopic.php?pid=1228558 BBS#1228558].
+
==== Font rendering issues in PDF plugin ====
  
=== Cracking sound ===
+
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.
  
There have been reports of cracking sound with Chromium over HDMI audio. Start Chromium with a different audio buffer size to fix the issue:
+
==== Font rendering issues of UTF characters ====
$ chromium --audio-buffer-size=2048
 
  
=== Font rendering issues in PDF plugin ===
+
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.
  
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.
+
==== Tab font size is too large ====
 +
 
 +
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 ===
 +
 
 +
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}}.
  
=== Force 3D acceleration in Flash Player and the browser ===
+
Visit {{ic|chrome://gpu/}} for debugging information about WebGL support.
  
{{Warning|Disabling the rendering list may cause unstable behaviour, including crashes of the host. See the bug reports in {{ic|chrome://gpu}}.}}
+
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}}.
  
First, make sure you have all the required packages as explained in [[VDPAU]]. Then, to force 3D rendering ''enable'' the flag "Override software rendering list" in {{ic|chrome://flags}}. Check if it is working in {{ic|chrome://gpu}}. This may also alleviate tearing issues with the [[radeon]] driver.
+
=== Incorrect HiDPI rendering ===
  
=== mailto links opened in new tab ===
+
Chromium will automatically scale for a [[HiDPI]] display, however this may cause an incorrect renderend GUI.
  
If you do not use any DE, you might encounter the issue that all mailto links are opened in a new browser instance instead of your default email client. In this case you might need to use the following workaround by modifying {{ic|/usr/bin/xdg-email}} which is called by Chromium:
+
The flag {{ic|1=--force-device-scale-factor=1}} may be used to overrule the automatic scaling factor.
  
  # sed 's/open_generic "${mailto}"/open_gnome "${mailto}"/' -i /usr/bin/xdg-email
+
On Wayland, the {{AUR|chromium-ozone}} package will automatically scale based on the configured scale of each monitor.
  
This patch needs to be applied on every update of {{Pkg|xdg-utils}}. If you want a persisting solution, you can install {{AUR|xdg-utils-xdg-email-gnome}} from the [[AUR]].
+
=== Password prompt on every start with GNOME Keyring ===
  
=== Proxy settings ===
+
See [[GNOME/Keyring#Passwords are not remembered]].
  
As of June 2012, there are many situations in which proxy settings do not work properly, especially if set through the KDE interface. A working alternative is to use Chromium's command-line options, like {{ic|--proxy-pac-url}} and {{ic|--proxy-server}}, to set your proxy.
+
=== Chromecasts in the network are not discovered ===
  
=== speech-dispatcher dumps core ===
+
You will need to enable the Media Router Component Extension in {{ic|chrome://flags/#load-media-router-component-extension}}.
  
{{Note|This was reported as bug {{Bug|38456}}.}}
+
=== Losing cookies and passwords when switching between desktop environments ===
  
Chromium installs {{Pkg|speech-dispatcher}} as a dependency. The latter is an independent layer for speech synthesis interface and by default uses {{Pkg|festival}} as its back end. If you are frequently receiving core dumps, it is likely caused by not having installed festival. To resolve the error message, either install festival or change the back end used by speech-dispatcher.
+
If you see the message {{ic|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.
  
=== WebGL ===
+
See [[Chromium/Tips and tricks#Force a password store]].
  
Chromium will sometimes disable WebGL with certain graphics card configurations. To remedy this, enter {{ic|chrome://flags}} into the URL bar and ''disable'' the ''Disable WebGL'' flag. Alternatively, pass the command-line flag {{ic|--enable-webgl}} to Chromium in the terminal.
+
=== Hang on startup when Google Sync enabled ===
  
There is also the possibility that your graphics card has been blacklisted by Chromium. To override this, go to {{ic|chrome://flags}} and ''enable'' the ''Override software rendering list'' flag. Alternatively, pass the command-line flag {{ic|--ignore-gpu-blacklist}} to Chromium in the terminal.
+
Try launching Chrome with {{ic|1=--password-store=basic}} or another appropriate password store.
  
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}}.
+
See [[Chromium/Tips and tricks#Force a password store]].
  
 
== See also ==
 
== See also ==
  
* [http://www.chromium.org/Home Chromium homepage]
+
* [https://www.chromium.org/ Chromium homepage]
* [http://googlechromereleases.blogspot.com Google Chrome release notes]
+
* [https://googlechromereleases.blogspot.com Google Chrome release notes]
 
* [https://chrome.google.com/webstore/category/home Chrome web store]
 
* [https://chrome.google.com/webstore/category/home 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]
 
* [http://peter.sh/experiments/chromium-command-line-switches/ List of Chromium command-line switches]

Latest revision as of 08:02, 16 October 2019

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 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 [1], 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

Flash Player plugin

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.

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.

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.

See also