https://wiki.archlinux.org/api.php?action=feedcontributions&user=GloriousYellow&feedformat=atomArchWiki - User contributions [en]2024-03-28T13:23:45ZUser contributionsMediaWiki 1.41.0https://wiki.archlinux.org/index.php?title=Variable_refresh_rate&diff=804398Variable refresh rate2024-03-24T07:06:49Z<p>GloriousYellow: fix formatting with code block</p>
<hr />
<div>[[Category:Graphics]]<br />
[[Category:X server]]<br />
[[Category:Gaming]]<br />
[[ja:可変リフレッシュレート]]<br />
{{Related articles start}}<br />
{{Related|Xrandr}}<br />
{{Related|Xorg}}<br />
{{Related|AMDGPU}}<br />
{{Related|NVIDIA}}<br />
{{Related|Sway}}<br />
{{Related articles end}}<br />
<br />
[[Wikipedia:Variable refresh rate|Variable refresh rate]] (VRR), also referred to as adaptive sync, allows the monitor to adjust its refresh rate to the output signal. This allows for games to eliminate screen tearing with less of the usual downsides of Vsync (such as stuttering). For a comprehensive look at VRR see [https://pcgamingwiki.com/wiki/Glossary:Variable_refresh_rate_(VRR) PC Gaming Wiki].<br />
<br />
== Overview ==<br />
<br />
{{Out of date|It looks like this needs to be updated to reflect the latest Intel GPUs.}}<br />
<br />
There are multiple implementations of VRR:<br />
<br />
* [[wikipedia:FreeSync|FreeSync]] is AMD's implementation of VESA's VRR standard, and the phrases are often used interchangeably. FreeSync branded monitors should be compatible with all VESA compatible drivers.<br />
* [[wikipedia:G-SYNC|G-SYNC]] is NVIDIA's proprietary hardware and software implementation of VRR.<br />
* Intel plans on implementing VESA's standard [https://software.intel.com/content/www/us/en/develop/articles/enabling-intel-adaptive-sync-with-11th-generation-intel-processor-graphics-and-microsoft.html in their upcoming 11th Gen] and dedicated GPUs. <br />
<br />
For setup purposes, it is necessary to differentiate between "native" G-SYNC monitors that licenses Nvidia's own chip, and ''G-SYNC Compatible'' monitors, FreeSync monitors which support a subset of G-SYNC's functionality. [https://www.howtogeek.com/755346/g-sync-compatible-vs-g-sync-whats-the-difference/] Within the category of G-SYNC Compatible monitors, the monitor may or may not be validated by NVIDIA. [https://www.nvidia.com/en-us/geforce/news/g-sync-ces-2019-announcements/] [https://www.nvidia.com/en-us/geforce/news/g-sync-compatible-validation/] Even if a VRR monitor has not passed NVIDIA's validation (and thus would not be called G-SYNC Compatible in marketing material), you may still be capable of using it with G-SYNC.<br />
<br />
{| class="wikitable<br />
|+ VRR compatibility and implementations<br />
|-<br />
! Driver<br />
! VESA<br />
! G-SYNC<br />
|-<br />
! [[AMDGPU]]<br />
| {{G|FreeSync}}<br />
| {{No|}}<br />
|-<br />
! [[Intel]]<br />
| {{Y|Planned}}<br />
| {{No|}}<br />
|-<br />
! [[Nouveau]]<br />
| {{No}}<br />
| {{No}}<br />
|-<br />
! [[NVIDIA]]<br />
| {{G|G-SYNC Compatible}}<br />
| {{G|G-SYNC}}<br />
|}<br />
<br />
{{Note|Nvidia GPUs older than their 10 series do not support G-SYNC Compatible monitors.}}<br />
<br />
== Xorg configuration ==<br />
<br />
=== Enable on AMDGPU ===<br />
<br />
FreeSync is only available if your [https://www.amd.com/en/products/freesync-monitors monitor is compatible with FreeSync], as well as if your [https://www.amd.com/en/technologies/free-sync-faq#faq-Which-products-support-AMD-FreeSync%E2%84%A2-technology? GPU is compatible with FreeSync].<br />
<br />
If you are using a laptop, you can check if your [https://www.amd.com/en/products/freesync-laptops laptop is compatible with FreeSync].<br />
<br />
==== Using an Xorg conf file ====<br />
<br />
Add the line to your AMDGPU [[AMDGPU#Xorg configuration|.conf]] file in the {{ic|Section "Device"}} block:<br />
<br />
Option "VariableRefresh" "true"<br />
<br />
Verify ''vrr_capable'' is set to ''1'' using [[xrandr]]:<br />
<br />
{{hc|$ xrandr --props|<br />
vrr_capable: 1<br />
range: (0, 1)<br />
}}<br />
<br />
xrandr will show the properties for all video output ports; make sure to look at the one that's actually connected to your monitor - the other outputs will report vrr_capable: 0.<br />
<br />
==== Multi-monitor configuration ====<br />
<br />
Suppose you have a new 144Hz FreeSync capable monitor and want to use it as your primary monitor and connect your old 60Hz monitor as secondary monitor. In that case you may want to enable the AsyncFlipSecondaries option in your AMDGPU [[AMDGPU#Xorg configuration|.conf]] file in the {{ic|Section "Device"}} block:<br />
<br />
Option "AsyncFlipSecondaries" "true"<br />
<br />
This option is available since xorg-server release 21.1.0 and will allow synchronized page flips up to the highest refresh rate your primary monitor supports. Your secondary monitor(s) may exhibit tearing however.<br />
<br />
=== Enable on NVIDIA ===<br />
<br />
==== Using a Xorg conf file ====<br />
<br />
{{Expansion|This section needs info.}}<br />
<br />
==== Via nvidia-settings ====<br />
<br />
"Native" G-SYNC and validated G-SYNC Compatible monitors should automatically have VRR enabled. To check the state of your monitors, open {{Pkg|nvidia-settings}} and navigate to your GPU (e.g. ''GPU 0''), under which there will be an node for each active monitor (e.g. ''DP-0'', ''HDMI-0''). In each of those monitor frames, the ''G-SYNC Mode Available'' indicates the status of G-SYNC support, either: [https://github.com/NVIDIA/nvidia-settings/blob/510/src/gtk+-2.x/ctkdisplaydevice.c#L872-L905] [https://github.com/NVIDIA/nvidia-settings/blob/510/src/libXNVCtrl/NVCtrl.h#L3541-L3551]<br />
<br />
* ''G-SYNC'', indicating that this is a "native" G-SYNC monitor. Full G-SYNC support is enabled by default.<br />
* ''G-SYNC Compatible'', indicating that this is a validated G-SYNC Compatible monitor. G-SYNC support is enabled by default.<br />
* ''G-SYNC Unvalidated'', indicating that this is an unvalidated G-SYNC Compatible monitor. G-SYNC support is not enabled by default. [https://github.com/NVIDIA/nvidia-settings/blob/510/src/gtk+-2.x/ctkdisplayconfig.c#L4628-L4674]<br />
* ''None'', indicating that this monitor does not seem to support G-SYNC. Note that there are some FreeSync VRR monitors which are not G-SYNC compatible at all. [https://www.howtogeek.com/755346/g-sync-compatible-vs-g-sync-whats-the-difference/]<br />
<br />
If you have an unvalidated G-SYNC Compatible monitor, you can override NVIDIA's default and enable VRR with it:<br />
<br />
* In {{Pkg|nvidia-settings}} go to the ''X Server Display Configuration'' page, then under the ''Advanced'' button is the option to ''Allow G-SYNC on monitor not validated as G-SYNC Compatible''. Click ''apply''.<br />
* Now, under ''OpenGL settings'', check ''Allow G-SYNC/G-SYNC Compatible''.<br />
<br />
{{Note|If a monitor did fail NVIDIA's certification to be G-SYNC compatible, there may be issues with the experience such as poor image quality, flickering, or lack of VRR activation due to limited refresh rate range. [https://www.nvidia.com/en-us/geforce/news/g-sync-compatible-validation/]}}<br />
<br />
{{Tip|In the same menu, you can check the ''show G-SYNC indicator'' option to display an indicator that G-SYNC is working in the top right corner.}}<br />
<br />
== Wayland configuration ==<br />
=== NVIDIA ===<br />
<br />
VRR Wayland using the proprietary driver [https://forums.developer.nvidia.com/t/wayland-information-for-r545-beta-release/214275 requires a Volta GPU architecture or newer].<br />
<br />
NVIDIA has shipped VRR Wayland support starting with driver version 525. Until 545, there are forced VSync issues. Past that, there are still remaining issues which are covered by the [https://forums.developer.nvidia.com/t/feature-g-sync-freesync-under-wayland-session/220822/5 VRR Wayland thread] on NVIDIA forums.<br />
<br />
=== GNOME ===<br />
<br />
[[GNOME]] supports VRR as an experimental feature starting with version 46. Run {{ic|gsettings set org.gnome.mutter experimental-features "['variable-refresh-rate']"}} to enable the experimental feature, then restart the session. VRR needs to be enabled for each supported monitor in the ''Display settings''. When running on a supported and enabled monitor, GNOME automatically enables VRR for all full screen applications.<br />
<br />
=== KDE Plasma ===<br />
<br />
Plasma's Wayland session uses the kwin compositor, which should automatically enable VRR for full screen applications [https://www.reddit.com/r/kde/comments/nwxxgy/how_does_the_automatic_vrr_mode_on_wayland_work/h1bvfuo].<br />
<br />
=== Sway ===<br />
<br />
Sway supports variable refresh rate. To enable it for all of your outputs you can add the following to the sway configuration, or apply the setting to on a per output basis:<br />
<br />
output * adaptive_sync on<br />
<br />
You can verify that your display supports adaptive sync with swaymsg:<br />
<br />
{{hc|$ swaymsg -t get_outputs|<br />
Output DP-1 'Display Name'<br />
Adaptive sync: enabled<br />
}}<br />
<br />
{{Note|VRR may not work if an application is full screen in sway. Direct scanout must be disabled by launching sway with {{ic|-D noscanout}}. https://github.com/swaywm/sway/issues/7370#issuecomment-1380986291}}<br />
<br />
=== Hyprland ===<br />
<br />
Hyprland supports variable refresh rate. To enable it, you need to add either {{ic|vrr {{=}} 1}} or {{ic|vrr {{=}} 2}}[https://wiki.hyprland.org/Configuring/Variables/#misc] in your misc section of your {{ic|hyprland.conf}} :<br />
<br />
misc {<br />
vrr = 1<br />
}<br />
<br />
{{ic|vrr {{=}} 1}} always enables variable refresh rate, while {{ic|vrr {{=}} 2}} only enables it for fullscreen applications.<br />
<br />
You can verify that your display supports adaptive sync with hyprctl:<br />
<br />
{{hc|$ hyprctl monitors |<br />
Monitor DP-2 (ID 0):<br />
...<br />
vrr: 1<br />
}}<br />
<br />
== Testing ==<br />
<br />
[https://github.com/Nixola/VRRTest VRRTest] is a simple testing tool which should work for FreeSync and G-Sync. Install {{AUR|vrrtest-git}} or, manually install {{Pkg|love}} package, clone repository, then run<br />
<br />
$ love /path/to/cloned/repository<br />
<br />
With VRR off, if the application's FPS is less than the monitor's native refresh rate then the bars will stutter a lot since frames are being skipped. With VRR active, the bars will always move smoothly across the screen since the screen's refresh rate will match the application's refresh rate. Even with VRR functional you may experience tearing in which case you can also enable the [[AMDGPU#Tear free rendering|TearFree]] option for AMDGPU; with both enabled there should be neither stuttering nor tearing (what is the nvidia equivalent?).<br />
<br />
If you are using a Nvidia GPU, you can test G-SYNC compatibility with {{AUR|gl-gsync-demo}}. This program will allow you to test VRR and Vsync so you can observe resulting effects. See project's [https://github.com/dahenry/gl-gsync-demo/blob/master/README.md Readme] for more information.<br />
<br />
According to [https://linuxreviews.org/HOWTO_enable_Adaptive_Vertical_Sync_(Freesync)_on_AMD_GPUs#Get_ready_for_much_disappointment_once_you_have_it_working this] page: "gl-gsync-demo is made with G-SYNC but that does not matter, it will test AMD adaptive sync just fine". However, it may still not work as expected for FreeSync testing.<br />
<br />
== Change VRR range of a FreeSync monitor ==<br />
<br />
Freesync monitors usually have a limited range for VRR that are much lower than their max refresh rate. It should be possible to overclock the monitor to change the Freesync range.<br />
<br />
{{Warning|Overclocking your monitor may cause it to run hot and possibly cause harm.}}<br />
<br />
=== Editing the EDID File ===<br />
<br />
External Display Identification Data (EDID) stores driver information about your monitor. By default, this file is sent by your monitor and read on connect. You will need to extract this file using something like {{Pkg|read-edid}} or {{Pkg|nvidia-settings}}.<br />
<br />
You can edit this file with {{Aur|wxedid}}.<br />
<br />
{{Expansion|This section needs verification from users with a freesync monitor please consider contributing.}}<br />
<br />
You may follow one of the guides of people changing the freesync range on Windows: [https://www.reddit.com/r/Amd/comments/5iux1q/updated_tutorial_on_increasing_and_decreasing/][https://wccftech.com/amd-freesync-hack-expands-refresh-rate-range/]<br />
<br />
Process of overclocking on Linux (works only on NVidia GPUs): [https://forum.level1techs.com/t/overclock-your-monitor-with-nvidia-windows-and-linux/109323]<br />
<br />
Make a Xorg [[Xorg#Using .conf files|.conf]] file for your monitor and add a path to the custom EDID file you have edited.<br />
See [[xrandr]] to find find out the other information about your monitor.<br />
<br />
{{hc|/etc/X11/xorg.conf.d/10-monitor.conf|2=<br />
Section "Screen"<br />
Identifier "Screen0"<br />
Device "nvidia" # e.g. Radeon, nvidia<br />
Monitor "DP1"<br />
Option “CustomEDID” “MONITOR:/home/USER/Desktop/modified-edid.bin”<br />
EndSection<br />
}}<br />
<br />
{{Note|Edit “MONITOR” in the file to be the correct display ID. You can get the display ID with the {{ic|xrandr -–query}} command.}}<br />
<br />
== Tips and tricks ==<br />
<br />
=== Remove applications from Blacklist ===<br />
<br />
Mesa has a list of blacklisted applications to avoid unexpected behavior, you can edit this blacklist here:<br />
<br />
/usr/share/drirc.d/00-mesa-defaults.conf<br />
<br />
== Troubleshooting ==<br />
<br />
=== Monitor occasionally drops signal with FreeSync enabled ===<br />
<br />
This is most likely due to firmware issues or driver issues causing the refresh rate to fall below the minimum safety margin[https://forums.blurbusters.com/viewtopic.php?f=7&t=9249]. You can mitigate it by raising the minimum vertical refresh range.<br />
<br />
==== Using wxedid ====<br />
<br />
See [[#Editing the EDID File]] or refer to [https://forum.level1techs.com/t/how-to-fix-freesync-lfc-screen-blanking-issues-using-wxedid-linux-ubuntu/177867 this tutorial].<br />
<br />
==== NVIDIA ====<br />
<br />
Alternatively, you can edit the VertRefresh property in your [[Xorg#Configuration|Xorg configuration file]] (the following example was generated by {{Pkg|nvidia-settings}}): <br />
<br />
{{hc|/etc/xorg.conf.d/20-nvidia.conf|<br />
Section "Monitor"<br />
# HorizSync source: edid, VertRefresh source: edid<br />
Identifier "Monitor0"<br />
VendorName "Monitor Vendor"<br />
ModelName "Monitor Model"<br />
HorizSync 223.0 - 223.0<br />
VertRefresh 48.0 - 144.0<br />
Option "DPMS"<br />
EndSection<br />
}}<br />
<br />
== Known issues ==<br />
<br />
* [[Wayland]] is supported as of KDE Plasma 5.22 (any compatible GPU) and Sway (no Nvidia) [https://invent.kde.org/plasma/kwin/-/merge_requests/718] [https://gitlab.freedesktop.org/wayland/wayland/issues/84]. GNOME Wayland is supported starting with version 46 as an experimental feature.<br />
* The monitor must be plugged in via DisplayPort. Some displays which implement (part of) the HDMI 2.1 specification also support VRR over HDMI. This is [https://www.phoronix.com/scan.php?page=news_item&px=NVIDIA-440.31-Linux-Release supported] by the Nvidia driver and is supported by the AMD driver (pre HDMI 2.1) in Kernel 5.13 and later [https://www.phoronix.com/scan.php?page=news_item&px=Linux-5.13-Released].<br />
* If you want to use G-SYNC and possibly Freesync on X11, only the G-SYNC/Freesync monitor must be connected.<br />
** On X11, multiple monitors in a single X display will break G-SYNC/Freesync, however, this problem does not exist on Wayland.<br />
** A secondary monitor set as copy/duplicate of the primary monitor does not break G-SYNC/Freesync on the primary monitor.<br />
** If on X11, if you want to use multiple monitors and still use G-SYNC/Freesync, you can create a new X display which only covers the G-SYNC/Freesync monitor and run games there.<br />
* Compositors will most likely need to be disabled before the OpenGl/Vulkan program is started (disabling compositors is not relevant or necessary on Wayland [https://mastransky.wordpress.com/2021/01/10/firefox-were-finally-getting-hw-acceleration-on-linux/#comment-15517]).<br />
* On X11, Mesa [[#Remove applications from Blacklist|blacklists]] many applications including video players.<br />
* Although tearing is much less noticeable at higher refresh rates, FreeSync monitors often have a limited range for their VRR of 90Hz, which can be much lower than their max refresh rate. See [[#Change VRR range of a FreeSync monitor|Change VRR Range of a FreeSync Monitor]].</div>GloriousYellowhttps://wiki.archlinux.org/index.php?title=Variable_refresh_rate&diff=804397Variable refresh rate2024-03-24T07:05:02Z<p>GloriousYellow: update information regarding gnome 46</p>
<hr />
<div>[[Category:Graphics]]<br />
[[Category:X server]]<br />
[[Category:Gaming]]<br />
[[ja:可変リフレッシュレート]]<br />
{{Related articles start}}<br />
{{Related|Xrandr}}<br />
{{Related|Xorg}}<br />
{{Related|AMDGPU}}<br />
{{Related|NVIDIA}}<br />
{{Related|Sway}}<br />
{{Related articles end}}<br />
<br />
[[Wikipedia:Variable refresh rate|Variable refresh rate]] (VRR), also referred to as adaptive sync, allows the monitor to adjust its refresh rate to the output signal. This allows for games to eliminate screen tearing with less of the usual downsides of Vsync (such as stuttering). For a comprehensive look at VRR see [https://pcgamingwiki.com/wiki/Glossary:Variable_refresh_rate_(VRR) PC Gaming Wiki].<br />
<br />
== Overview ==<br />
<br />
{{Out of date|It looks like this needs to be updated to reflect the latest Intel GPUs.}}<br />
<br />
There are multiple implementations of VRR:<br />
<br />
* [[wikipedia:FreeSync|FreeSync]] is AMD's implementation of VESA's VRR standard, and the phrases are often used interchangeably. FreeSync branded monitors should be compatible with all VESA compatible drivers.<br />
* [[wikipedia:G-SYNC|G-SYNC]] is NVIDIA's proprietary hardware and software implementation of VRR.<br />
* Intel plans on implementing VESA's standard [https://software.intel.com/content/www/us/en/develop/articles/enabling-intel-adaptive-sync-with-11th-generation-intel-processor-graphics-and-microsoft.html in their upcoming 11th Gen] and dedicated GPUs. <br />
<br />
For setup purposes, it is necessary to differentiate between "native" G-SYNC monitors that licenses Nvidia's own chip, and ''G-SYNC Compatible'' monitors, FreeSync monitors which support a subset of G-SYNC's functionality. [https://www.howtogeek.com/755346/g-sync-compatible-vs-g-sync-whats-the-difference/] Within the category of G-SYNC Compatible monitors, the monitor may or may not be validated by NVIDIA. [https://www.nvidia.com/en-us/geforce/news/g-sync-ces-2019-announcements/] [https://www.nvidia.com/en-us/geforce/news/g-sync-compatible-validation/] Even if a VRR monitor has not passed NVIDIA's validation (and thus would not be called G-SYNC Compatible in marketing material), you may still be capable of using it with G-SYNC.<br />
<br />
{| class="wikitable<br />
|+ VRR compatibility and implementations<br />
|-<br />
! Driver<br />
! VESA<br />
! G-SYNC<br />
|-<br />
! [[AMDGPU]]<br />
| {{G|FreeSync}}<br />
| {{No|}}<br />
|-<br />
! [[Intel]]<br />
| {{Y|Planned}}<br />
| {{No|}}<br />
|-<br />
! [[Nouveau]]<br />
| {{No}}<br />
| {{No}}<br />
|-<br />
! [[NVIDIA]]<br />
| {{G|G-SYNC Compatible}}<br />
| {{G|G-SYNC}}<br />
|}<br />
<br />
{{Note|Nvidia GPUs older than their 10 series do not support G-SYNC Compatible monitors.}}<br />
<br />
== Xorg configuration ==<br />
<br />
=== Enable on AMDGPU ===<br />
<br />
FreeSync is only available if your [https://www.amd.com/en/products/freesync-monitors monitor is compatible with FreeSync], as well as if your [https://www.amd.com/en/technologies/free-sync-faq#faq-Which-products-support-AMD-FreeSync%E2%84%A2-technology? GPU is compatible with FreeSync].<br />
<br />
If you are using a laptop, you can check if your [https://www.amd.com/en/products/freesync-laptops laptop is compatible with FreeSync].<br />
<br />
==== Using an Xorg conf file ====<br />
<br />
Add the line to your AMDGPU [[AMDGPU#Xorg configuration|.conf]] file in the {{ic|Section "Device"}} block:<br />
<br />
Option "VariableRefresh" "true"<br />
<br />
Verify ''vrr_capable'' is set to ''1'' using [[xrandr]]:<br />
<br />
{{hc|$ xrandr --props|<br />
vrr_capable: 1<br />
range: (0, 1)<br />
}}<br />
<br />
xrandr will show the properties for all video output ports; make sure to look at the one that's actually connected to your monitor - the other outputs will report vrr_capable: 0.<br />
<br />
==== Multi-monitor configuration ====<br />
<br />
Suppose you have a new 144Hz FreeSync capable monitor and want to use it as your primary monitor and connect your old 60Hz monitor as secondary monitor. In that case you may want to enable the AsyncFlipSecondaries option in your AMDGPU [[AMDGPU#Xorg configuration|.conf]] file in the {{ic|Section "Device"}} block:<br />
<br />
Option "AsyncFlipSecondaries" "true"<br />
<br />
This option is available since xorg-server release 21.1.0 and will allow synchronized page flips up to the highest refresh rate your primary monitor supports. Your secondary monitor(s) may exhibit tearing however.<br />
<br />
=== Enable on NVIDIA ===<br />
<br />
==== Using a Xorg conf file ====<br />
<br />
{{Expansion|This section needs info.}}<br />
<br />
==== Via nvidia-settings ====<br />
<br />
"Native" G-SYNC and validated G-SYNC Compatible monitors should automatically have VRR enabled. To check the state of your monitors, open {{Pkg|nvidia-settings}} and navigate to your GPU (e.g. ''GPU 0''), under which there will be an node for each active monitor (e.g. ''DP-0'', ''HDMI-0''). In each of those monitor frames, the ''G-SYNC Mode Available'' indicates the status of G-SYNC support, either: [https://github.com/NVIDIA/nvidia-settings/blob/510/src/gtk+-2.x/ctkdisplaydevice.c#L872-L905] [https://github.com/NVIDIA/nvidia-settings/blob/510/src/libXNVCtrl/NVCtrl.h#L3541-L3551]<br />
<br />
* ''G-SYNC'', indicating that this is a "native" G-SYNC monitor. Full G-SYNC support is enabled by default.<br />
* ''G-SYNC Compatible'', indicating that this is a validated G-SYNC Compatible monitor. G-SYNC support is enabled by default.<br />
* ''G-SYNC Unvalidated'', indicating that this is an unvalidated G-SYNC Compatible monitor. G-SYNC support is not enabled by default. [https://github.com/NVIDIA/nvidia-settings/blob/510/src/gtk+-2.x/ctkdisplayconfig.c#L4628-L4674]<br />
* ''None'', indicating that this monitor does not seem to support G-SYNC. Note that there are some FreeSync VRR monitors which are not G-SYNC compatible at all. [https://www.howtogeek.com/755346/g-sync-compatible-vs-g-sync-whats-the-difference/]<br />
<br />
If you have an unvalidated G-SYNC Compatible monitor, you can override NVIDIA's default and enable VRR with it:<br />
<br />
* In {{Pkg|nvidia-settings}} go to the ''X Server Display Configuration'' page, then under the ''Advanced'' button is the option to ''Allow G-SYNC on monitor not validated as G-SYNC Compatible''. Click ''apply''.<br />
* Now, under ''OpenGL settings'', check ''Allow G-SYNC/G-SYNC Compatible''.<br />
<br />
{{Note|If a monitor did fail NVIDIA's certification to be G-SYNC compatible, there may be issues with the experience such as poor image quality, flickering, or lack of VRR activation due to limited refresh rate range. [https://www.nvidia.com/en-us/geforce/news/g-sync-compatible-validation/]}}<br />
<br />
{{Tip|In the same menu, you can check the ''show G-SYNC indicator'' option to display an indicator that G-SYNC is working in the top right corner.}}<br />
<br />
== Wayland configuration ==<br />
=== NVIDIA ===<br />
<br />
VRR Wayland using the proprietary driver [https://forums.developer.nvidia.com/t/wayland-information-for-r545-beta-release/214275 requires a Volta GPU architecture or newer].<br />
<br />
NVIDIA has shipped VRR Wayland support starting with driver version 525. Until 545, there are forced VSync issues. Past that, there are still remaining issues which are covered by the [https://forums.developer.nvidia.com/t/feature-g-sync-freesync-under-wayland-session/220822/5 VRR Wayland thread] on NVIDIA forums.<br />
<br />
=== GNOME ===<br />
<br />
[[GNOME]] supports VRR as an experimental feature starting with version 46. Run `gsettings set org.gnome.mutter experimental-features "['variable-refresh-rate']"` to enable the experimental feature, then restart the session. VRR needs to be enabled for each supported monitor in the ''Display settings''. When running on a supported and enabled monitor, GNOME automatically enables VRR for all full screen applications.<br />
<br />
=== KDE Plasma ===<br />
<br />
Plasma's Wayland session uses the kwin compositor, which should automatically enable VRR for full screen applications [https://www.reddit.com/r/kde/comments/nwxxgy/how_does_the_automatic_vrr_mode_on_wayland_work/h1bvfuo].<br />
<br />
=== Sway ===<br />
<br />
Sway supports variable refresh rate. To enable it for all of your outputs you can add the following to the sway configuration, or apply the setting to on a per output basis:<br />
<br />
output * adaptive_sync on<br />
<br />
You can verify that your display supports adaptive sync with swaymsg:<br />
<br />
{{hc|$ swaymsg -t get_outputs|<br />
Output DP-1 'Display Name'<br />
Adaptive sync: enabled<br />
}}<br />
<br />
{{Note|VRR may not work if an application is full screen in sway. Direct scanout must be disabled by launching sway with {{ic|-D noscanout}}. https://github.com/swaywm/sway/issues/7370#issuecomment-1380986291}}<br />
<br />
=== Hyprland ===<br />
<br />
Hyprland supports variable refresh rate. To enable it, you need to add either {{ic|vrr {{=}} 1}} or {{ic|vrr {{=}} 2}}[https://wiki.hyprland.org/Configuring/Variables/#misc] in your misc section of your {{ic|hyprland.conf}} :<br />
<br />
misc {<br />
vrr = 1<br />
}<br />
<br />
{{ic|vrr {{=}} 1}} always enables variable refresh rate, while {{ic|vrr {{=}} 2}} only enables it for fullscreen applications.<br />
<br />
You can verify that your display supports adaptive sync with hyprctl:<br />
<br />
{{hc|$ hyprctl monitors |<br />
Monitor DP-2 (ID 0):<br />
...<br />
vrr: 1<br />
}}<br />
<br />
== Testing ==<br />
<br />
[https://github.com/Nixola/VRRTest VRRTest] is a simple testing tool which should work for FreeSync and G-Sync. Install {{AUR|vrrtest-git}} or, manually install {{Pkg|love}} package, clone repository, then run<br />
<br />
$ love /path/to/cloned/repository<br />
<br />
With VRR off, if the application's FPS is less than the monitor's native refresh rate then the bars will stutter a lot since frames are being skipped. With VRR active, the bars will always move smoothly across the screen since the screen's refresh rate will match the application's refresh rate. Even with VRR functional you may experience tearing in which case you can also enable the [[AMDGPU#Tear free rendering|TearFree]] option for AMDGPU; with both enabled there should be neither stuttering nor tearing (what is the nvidia equivalent?).<br />
<br />
If you are using a Nvidia GPU, you can test G-SYNC compatibility with {{AUR|gl-gsync-demo}}. This program will allow you to test VRR and Vsync so you can observe resulting effects. See project's [https://github.com/dahenry/gl-gsync-demo/blob/master/README.md Readme] for more information.<br />
<br />
According to [https://linuxreviews.org/HOWTO_enable_Adaptive_Vertical_Sync_(Freesync)_on_AMD_GPUs#Get_ready_for_much_disappointment_once_you_have_it_working this] page: "gl-gsync-demo is made with G-SYNC but that does not matter, it will test AMD adaptive sync just fine". However, it may still not work as expected for FreeSync testing.<br />
<br />
== Change VRR range of a FreeSync monitor ==<br />
<br />
Freesync monitors usually have a limited range for VRR that are much lower than their max refresh rate. It should be possible to overclock the monitor to change the Freesync range.<br />
<br />
{{Warning|Overclocking your monitor may cause it to run hot and possibly cause harm.}}<br />
<br />
=== Editing the EDID File ===<br />
<br />
External Display Identification Data (EDID) stores driver information about your monitor. By default, this file is sent by your monitor and read on connect. You will need to extract this file using something like {{Pkg|read-edid}} or {{Pkg|nvidia-settings}}.<br />
<br />
You can edit this file with {{Aur|wxedid}}.<br />
<br />
{{Expansion|This section needs verification from users with a freesync monitor please consider contributing.}}<br />
<br />
You may follow one of the guides of people changing the freesync range on Windows: [https://www.reddit.com/r/Amd/comments/5iux1q/updated_tutorial_on_increasing_and_decreasing/][https://wccftech.com/amd-freesync-hack-expands-refresh-rate-range/]<br />
<br />
Process of overclocking on Linux (works only on NVidia GPUs): [https://forum.level1techs.com/t/overclock-your-monitor-with-nvidia-windows-and-linux/109323]<br />
<br />
Make a Xorg [[Xorg#Using .conf files|.conf]] file for your monitor and add a path to the custom EDID file you have edited.<br />
See [[xrandr]] to find find out the other information about your monitor.<br />
<br />
{{hc|/etc/X11/xorg.conf.d/10-monitor.conf|2=<br />
Section "Screen"<br />
Identifier "Screen0"<br />
Device "nvidia" # e.g. Radeon, nvidia<br />
Monitor "DP1"<br />
Option “CustomEDID” “MONITOR:/home/USER/Desktop/modified-edid.bin”<br />
EndSection<br />
}}<br />
<br />
{{Note|Edit “MONITOR” in the file to be the correct display ID. You can get the display ID with the {{ic|xrandr -–query}} command.}}<br />
<br />
== Tips and tricks ==<br />
<br />
=== Remove applications from Blacklist ===<br />
<br />
Mesa has a list of blacklisted applications to avoid unexpected behavior, you can edit this blacklist here:<br />
<br />
/usr/share/drirc.d/00-mesa-defaults.conf<br />
<br />
== Troubleshooting ==<br />
<br />
=== Monitor occasionally drops signal with FreeSync enabled ===<br />
<br />
This is most likely due to firmware issues or driver issues causing the refresh rate to fall below the minimum safety margin[https://forums.blurbusters.com/viewtopic.php?f=7&t=9249]. You can mitigate it by raising the minimum vertical refresh range.<br />
<br />
==== Using wxedid ====<br />
<br />
See [[#Editing the EDID File]] or refer to [https://forum.level1techs.com/t/how-to-fix-freesync-lfc-screen-blanking-issues-using-wxedid-linux-ubuntu/177867 this tutorial].<br />
<br />
==== NVIDIA ====<br />
<br />
Alternatively, you can edit the VertRefresh property in your [[Xorg#Configuration|Xorg configuration file]] (the following example was generated by {{Pkg|nvidia-settings}}): <br />
<br />
{{hc|/etc/xorg.conf.d/20-nvidia.conf|<br />
Section "Monitor"<br />
# HorizSync source: edid, VertRefresh source: edid<br />
Identifier "Monitor0"<br />
VendorName "Monitor Vendor"<br />
ModelName "Monitor Model"<br />
HorizSync 223.0 - 223.0<br />
VertRefresh 48.0 - 144.0<br />
Option "DPMS"<br />
EndSection<br />
}}<br />
<br />
== Known issues ==<br />
<br />
* [[Wayland]] is supported as of KDE Plasma 5.22 (any compatible GPU) and Sway (no Nvidia) [https://invent.kde.org/plasma/kwin/-/merge_requests/718] [https://gitlab.freedesktop.org/wayland/wayland/issues/84]. GNOME Wayland is supported starting with version 46 as an experimental feature.<br />
* The monitor must be plugged in via DisplayPort. Some displays which implement (part of) the HDMI 2.1 specification also support VRR over HDMI. This is [https://www.phoronix.com/scan.php?page=news_item&px=NVIDIA-440.31-Linux-Release supported] by the Nvidia driver and is supported by the AMD driver (pre HDMI 2.1) in Kernel 5.13 and later [https://www.phoronix.com/scan.php?page=news_item&px=Linux-5.13-Released].<br />
* If you want to use G-SYNC and possibly Freesync on X11, only the G-SYNC/Freesync monitor must be connected.<br />
** On X11, multiple monitors in a single X display will break G-SYNC/Freesync, however, this problem does not exist on Wayland.<br />
** A secondary monitor set as copy/duplicate of the primary monitor does not break G-SYNC/Freesync on the primary monitor.<br />
** If on X11, if you want to use multiple monitors and still use G-SYNC/Freesync, you can create a new X display which only covers the G-SYNC/Freesync monitor and run games there.<br />
* Compositors will most likely need to be disabled before the OpenGl/Vulkan program is started (disabling compositors is not relevant or necessary on Wayland [https://mastransky.wordpress.com/2021/01/10/firefox-were-finally-getting-hw-acceleration-on-linux/#comment-15517]).<br />
* On X11, Mesa [[#Remove applications from Blacklist|blacklists]] many applications including video players.<br />
* Although tearing is much less noticeable at higher refresh rates, FreeSync monitors often have a limited range for their VRR of 90Hz, which can be much lower than their max refresh rate. See [[#Change VRR range of a FreeSync monitor|Change VRR Range of a FreeSync Monitor]].</div>GloriousYellowhttps://wiki.archlinux.org/index.php?title=DaVinci_Resolve&diff=796600DaVinci Resolve2024-01-10T08:12:23Z<p>GloriousYellow: /* Installation */ add additional test information with link to bug report</p>
<hr />
<div>[[Category:Audio]]<br />
[[Category:Video]]<br />
[[ja:DaVinci Resolve]]<br />
[[zh-hans:DaVinci Resolve]]<br />
[[pl:DaVinci Resolve]]<br />
{{Related articles start}}<br />
{{Related|OpenCL}}<br />
{{Related articles end}}<br />
<br />
[https://www.blackmagicdesign.com/products/davinciresolve/ Davinci Resolve] is a proprietary video editing, color grading, color correction, visual effects, motion graphics and audio post-production application.<br />
<br />
== Installation ==<br />
<br />
Both a limited free version and a paid (Studio) version are offered.<br />
<br />
For the free version, [[install]] {{AUR|davinci-resolve}} or {{AUR|davinci-resolve-beta}}.<br />
<br />
For the Studio version, install {{AUR|davinci-resolve-studio}} or {{AUR|davinci-resolve-studio-beta}}.<br />
<br />
To run DaVinci Resolve, it is required to use suitable OpenGL and OpenCL drivers. Open-source OpenCL drivers are currently unsupported, with the exception of {{Pkg|intel-compute-runtime}} as of 25/08/2023 (check [https://github.com/intel/compute-runtime/issues/659 this issue.] for instructions, you'll have to compile mesa and compute-runtime yourself, and export some envvars).<br />
<br />
{| class="wikitable" style="text-align:center"<br />
|+Table of OpenGL drivers<br />
|-<br />
! GPU vendor !! OpenGL driver !! Open Source !! Documentation !! Tested driver version !! Works with DaVinci Resolve !! Tested DR version !! Notes<br />
|-<br />
! rowspan="2" | AMD<br />
| {{Pkg|mesa}} || {{Yes}} || [[AMDGPU]] || 23.0.2-2 || {{Yes}} || 18.1.4-1 || On pre-Vega GPUs, if using opencl-amd and mesa, DR crashes, see [https://gitlab.freedesktop.org/mesa/mesa/-/issues/6256 this] bug report. You can instead use rocm with {{ic|1=ROC_ENABLE_PRE_VEGA=1}} or use opencl-amd with progl.<br />
<br />
Tested with Radeon RX 580.<br />
<br />
Tested with Radeon PRO W6600.<br />
|-<br />
| {{AUR|amdgpu-pro-oglp}} || {{No}} || [[AMDGPU PRO]] || 21.10_1247438-1 || {{Yes}} || 17.1.1 || This is required if using ORCA legacy OpenCL driver. Requires running Resolve with the {{ic|progl}} wrapper script. See [[AMDGPU PRO#Using proprietary OpenGL|documentation]] and the [https://github.com/Ashark/archlinux-amdgpu-pro driver github] for usage.<br />
|-<br />
! Intel<br />
| {{Pkg|mesa}} || {{Yes}} || [[Intel graphics]] || 23.1.6 || {{Yes}} || 18.5.1 || Works without issues.<br />
|-<br />
! rowspan="2" | NVIDIA<br />
| {{Pkg|mesa}} || {{Yes}} || [[Nouveau]] || || {{No}} || ||<br />
|-<br />
| {{Pkg|nvidia-utils}} || {{No}} || [[NVIDIA]] || 460.32.03-1 || {{Yes}} || 17.0b6-1 || Tested on optimus laptop using nvidia-xrun.<br />
|-<br />
|}<br />
<br />
{| class="wikitable" style="text-align:center"<br />
|+Table of tested [[OpenCL]] drivers<br />
! GPU Vendor !! OpenCL driver !! Open Source !! Tested driver version !! Works with DR !! Tested DR version !! Comment<br />
|-<br />
!rowspan="3" | Neutral<br />
|{{Pkg|opencl-rusticl-mesa}} || {{Yes}} || 1:23.3.2-2 || {{Yes}} || 18.6.4-1 || This only works if {{Pkg|opencl-clover-mesa}} is not installed, otherwise DR will use Clover instead of rusticl. Recent kernel versions have [https://github.com/ROCm/ROCm/issues/2596 an issue with ROCm], but 6.1 LTS works.<br />
<br />
Tested with RX 6800M.<br />
|-<br />
|{{Pkg|opencl-rusticl-mesa}}/{{Pkg|opencl-rusticl-mesa}} || {{Yes}} || 22.0.0-1 || {{No}} || 17.4.5-1 || DR behaves like with intel-compute-runtime (likely same cause). Launches normally, can open a project. But unable to start playing the timeline (even without video tracks) in the Cut and in the Edit pages. However in the Fairlight page it is able to play timeline.<br />
<br />
DR requires OpenCL 1.2. Mesa [https://www.phoronix.com/scan.php?page=news_item&px=Mesa-20.3-OpenCL-1.2-Clover supports OpenCL 1.2], despite [https://gitlab.freedesktop.org/mesa/mesa/-/issues/4452 reporting it as OpenCL 1.1]. [https://www.phoronix.com/forums/forum/linux-graphics-x-org-drivers/opengl-vulkan-mesa-gallium3d/1211540-opencl-1-2-support-merged-for-mesa-s-gallium3d-clover-while-opencl-3-0-is-being-tackled?p=1211802#post1211802 Overriding] OpenCL version with {{ic|1=CLOVER_PLATFORM_VERSION_OVERRIDE=1.2 CLOVER_DEVICE_VERSION_OVERRIDE=1.2 CLOVER_DEVICE_CLC_VERSION_OVERRIDE=1.2}} does not change the situation.<br />
<br />
Tested with RX580.<br />
|-<br />
|mesa-tkg-git || {{Yes}} || 24.0.0_devel.180705.fdbb5d58983-1 || {{Yes}} || 18.6 || DR works with rusticl now that [https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21305 MR 21305] has been merged (commit [https://gitlab.freedesktop.org/mesa/mesa/-/commit/0a072bb31c0aa99ba6f8348e0e601053b643a584 0a072bb3]).<br />
<br />
Tested with RX 7600 using {{ic|1=RUSTICL_ENABLE=radeonsi}}.<br />
|-<br />
!rowspan="3" | AMD<br />
| {{AUR|opencl-amd}} || {{Y|Mixed pro and open components}} || 1:5.6.0-2 || {{Yes}} || 18.5b || There is no currently AUR package with only repackaged rocm drivers from Ubuntu (this opencl-amd packages both rocm and orca). On GFX8 (RX 580 and others), the ORCA legacy driver is used by default, which itself currently requires the AMDGPU-PRO OpenGL drivers to work (see above).<br />
<br />
Tested with Radeon Pro W6600 (works, even with mesa)<br />
<br />
Tested with Radeon RX 580 (works, currently only with progl).<br />
<br />
Tested with Radeon RX 5700 XT (with mesa)<br />
<br />
Addresses crashing (encounted with rocm-opencl-runtime package) when attempting to perform color correction on the color page. Tested with Radeon 7900XT.<br />
|-<br />
| {{Pkg|rocm-opencl-runtime}} || {{Yes}} || 5.4.3-1 || {{Yes}} || 18.1.4-1 || For GPUs older than GFX9/Vega use variable {{ic|1=ROC_ENABLE_PRE_VEGA=1}}; works with Mesa OpenGL<br />
<br />
Tested with Radeon Pro W6600<br />
<br />
Tested with AMD RX580. Color correction may result in crashing (did for Radeon )7900XT), consider using opencl-amd 5.6.0-2.<br />
|-<br />
| {{AUR|opencl-legacy-amdgpu-pro}} || {{No}} || 22.10.1_1401426-1 || {{G|Yes, for GPUs older than Vega}} || 17.4.6-2 || Note that this is simply the {{AUR|opencl-amd}} package without the ROCm drivers.<br />
<br />
Requires the AMDGPU-PRO OpenGL drivers to work.<br />
<br />
Tested with Radeon RX580.<br />
|-<br />
!rowspan="5"|Intel<br />
|{{Pkg|intel-compute-runtime}} || {{Yes}} || [https://github.com/smunaut/compute-runtime/tree/clgl custom] || {{Yes}} || 18.5.1 || Works with patches, described in [https://github.com/intel/compute-runtime/issues/659 this issue.]<br />
|-<br />
|mesa [https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21305 with the cl-gl sharing MR applied] || {{Yes}} || 23.3.0 with MR applied || {{Yes}} || 18.6 || Works with {{ic|1=RUSTICL_ENABLE=iris}} exported as an environment variable<br />
|-<br />
|{{AUR|beignet}} || {{Yes}} || 1.3.2+12+gfc5f430c-2 || {{No}} || || Core dumped<br />
|-<br />
|{{AUR|intel-opencl}} || {{No}} || 5.0.r63503-2 || {{No}} || || Core dumped<br />
|-<br />
|{{AUR|intel-opencl-runtime}} || {{No}} || 1:18.1.0.013-2 || {{No}} || || Core dumped<br />
|-<br />
!Nvidia<br />
|{{Pkg|opencl-nvidia}} || {{No}} || 460.32.03-1 || {{Yes}} || || Suitable, but working on cuda instead?<br />
|}<br />
<br />
=== DaVinci Resolve Checker ===<br />
<br />
You can run [https://github.com/Ashark/davinci-resolve-checker davinci-resolve-checker] script, which will tell you if your configuration is suitable for running DR (doesn't work for Intel iGPUs - says OpenCL driver is unsupported, though you can make it work). In good configurations it should output:<br />
<br />
All seems good. You should be able to run DaVinci Resolve successfully. <br />
<br />
=== BlackMagic Design Cards ===<br />
<br />
If using DeckLink, UltraStudio or Intensity cards for video capture and playback, install Desktop Video Software with {{AUR|decklink}} package.<br />
<br />
== Tips and tricks ==<br />
<br />
=== Decrease installation time ===<br />
<br />
Compression of the Davinci Resolve package takes a significant amount of time because the binary is quite large. You can instruct makepkg to use a [[Makepkg#Use other compression algorithms|different compression algorithm]], which in this case disables compression altogether, speeding up the process tremendously.<br />
<br />
PKGEXT='.pkg.tar'<br />
<br />
=== Using application in portable way ===<br />
<br />
There may be reasons you may want to not install davinci resolve package to the system. For example, you do not want such big package to take space in system partition. Or you want to quickly switch between different versions of application: free and studio, current and previous versions. To do this, just unpack the contents of the needed versions package in the directory you want, and directly run the opt/resolve/bin/resolve from that directory.<br />
<br />
=== Automating with scripts ===<br />
<br />
DR supports scripting. Free version support launching the scripts only from within dr itself, while with Studio version you can also invoke scripts externally. To allow it, go to Preferences -> System -> General -> External scripting using. You can choose: None (similarly to Free version, only from within dr), Local (allow invokes from local host), and Network (allow invokes from remote host).<br />
<br />
The documentation can be found in Help -> Documentation -> Developer.<br />
<br />
=== Remap keyboard modifiers used with mouse wheel for scroll and zoom ===<br />
<br />
The application uses very strange bindings of keyboard modifiers for zooming and scrolling timeline. Original behavior is the following:<br />
<br />
* shift + wheel = height of tracks<br />
* ctrl + wheel = scroll timeline<br />
* alt + wheel = zoom timeline<br />
* no modifiers + wheel = vertical scroll<br />
<br />
It is impossible to remap this from application, see [https://forum.blackmagicdesign.com/viewtopic.php?f=21&t=74515].<br />
<br />
A workaround (working in X11 and Wayland) is to use [[Input remap utilities#evsieve|evsieve]]. Replace {{ic|/dev/input/event3}} and {{ic|/dev/input/event5}} with your keyboard and mouse events in the following command:<br />
<br />
{{bc|1=<br />
# evsieve --input /dev/input/event3 grab --input /dev/input/event5 grab \<br />
--hook key:leftalt:1 toggle=alt:2 \<br />
--hook key:leftalt:0 toggle=alt:1 \<br />
--hook key:leftctrl:1 toggle=ctrl:2 \<br />
--hook key:leftctrl:0 toggle=ctrl:1 \<br />
--toggle rel:wheel @alt-up @alt-down id=alt \<br />
--map yield rel:wheel@alt-down key:leftalt:0 key:leftctrl:1 key:leftctrl:2 rel:wheel key:leftctrl:0 key:leftalt:1 \<br />
--toggle rel:wheel @ctrl-up @ctrl-down id=ctrl \<br />
--map yield rel:wheel@ctrl-down key:leftctrl:0 key:leftalt:1 key:leftalt:2 rel:wheel key:leftalt:0 key:leftctrl:1 \<br />
--block rel:wheel_hi_res \<br />
--print @alt-down @alt-up @ctrl-down @ctrl-up \<br />
--output create-link=/dev/input/by-id/merged-virtual-KM name="merged virtual KM"<br />
}}<br />
<br />
Another workaround (working in X11 (and Xwayland), is worse and sometimes skips events) of this problem, you can use [[IMWheel]] utility. It can remap modifiers only for the application described by regular expression. <br />
<br />
Use the following config:<br />
<br />
{{hc|head=~/.imwheelrc|output=<br />
"^resolve"<br />
<br />
# just wheel for scroll<br />
None, Up, Control_L{{!}}Button4<br />
None, Down, Control_L{{!}}Button5<br />
<br />
# crtl wheel for zoom<br />
Control_L, Up, Alt_L{{!}}Button4<br />
Control_L, Down, Alt_L{{!}}Button5<br />
<br />
# alt wheel for track height<br />
Alt_L, Up, Shift_L{{!}}Button4<br />
Alt_L, Down, Shift_L{{!}}Button5<br />
}}<br />
<br />
Alternatively, use the following blocks:<br />
<br />
{{hc|head=~/.imwheelrc|output=<br />
"^resolve"<br />
<br />
# just wheel for zoom<br />
None, Up, Alt_L{{!}}Button4<br />
None, Down, Alt_L{{!}}Button5<br />
<br />
# shift wheel for scroll<br />
Shift_L, Up, Control_L{{!}}Button4<br />
Shift_L, Down, Control_L{{!}}Button5<br />
}}<br />
<br />
=== Prevent prompt returning before full exit ===<br />
<br />
When you exit application, the terminal prompt is returned to you, but suddenly the terminal is polluted with "Socket disconnected" message. To prevent this, pipe output of main process via {{ic|cat}}. See [https://unix.stackexchange.com/a/698155 here] for explanation.<br />
<br />
== Troubleshooting ==<br />
<br />
=== Logs ===<br />
<br />
DaVinci Resolve creates the log file {{ic|~/.local/share/DaVinciResolve/logs/ResolveDebug.txt}} at every launch. Inspecting it can help diagnose problems.<br />
<br />
=== Application window misses title bar ===<br />
<br />
There is a workaround for KDE - a window rule to force enable title bar. See [https://forum.blackmagicdesign.com/viewtopic.php?=21&t=56878&p=456990#p456990]<br />
<br />
You can manually create a file describing needed window rule:<br />
<br />
{{hc|1=DaVinci_Resolve_main_window_always_with_titlebar_and_frame.kwinrule|2=<br />
[DaVinci Resolve main window always with titlebar and frame]<br />
Description=DaVinci Resolve main window always with titlebar and frame<br />
clientmachinematch=0<br />
noborder=false<br />
noborderrule=2<br />
titlematch=0<br />
types=1<br />
wmclass=resolve<br />
wmclasscomplete=false<br />
wmclassmatch=1<br />
}}<br />
<br />
Then go to ''System Settings > Window Management > Window Rules'' and import this file.<br />
<br />
=== Mp4 clips are not working ===<br />
<br />
In DR Free the MP4 containers are not supported. Their preview image is shown as blank. And AAC audio stream (mp4 uses that format) is not supported. When you place that clip to timeline, it will be just an audio clip with silence.<br />
<br />
In DR Studio the mp4 videos are supported, but AAC decoding is still not supported. When you place your mp4 clip to timeline, you will get the normal video track, and the audio track will be silent.<br />
<br />
==== Workaround for DR Free ====<br />
<br />
You need to convert your video file to another format. Transcoding command may look like this:<br />
<br />
$ ffmpeg -i input.mp4 -c:v dnxhd -profile:v dnxhr_hq -pix_fmt yuv422p -c:a pcm_s16le -f mov output.mov<br />
<br />
You can automate this task using [[incron]]. It will automatically convert files appeared in specified folder. See setup example on [https://passthroughpo.st/painless-linux-video-production-part-3-organization-and-workflow/#:~:text=Auto%2DTranscode%20Your%20Footage this article]. Another alternative is to write a resolve script for that purpose. See documentation for Resolve Scripting (linked in the see also section) for more information.<br />
<br />
==== Workaround for DR Studio ====<br />
<br />
You need to extract the audio from mp4 clips and convert it to mp3 (takes less space than wav and is supported, see below). Then you can import it and make a compound clip with video track.<br />
<br />
You can use [https://gitlab.com/AndrewShark/davinci-resolve-scripts/-/blob/main/mp4%20audio%20compounder.py mp4 audio compounder.py] resolve script by Andrew Shark, which automates this routine.<br />
<br />
In [[#See also]] section in pdf document of supported codecs, mp3 is listed as supported. For some reason, integrating mp3 audio to mov file is not playing. Tested with DR 17.1 and DR studio 17.4.3.<br />
<br />
{{Expansion|Need retest with version 18.}}<br />
<br />
=== HiDPI ===<br />
<br />
To enable compatibility with high-resolution displays, set the following [[environment variables]] accordingly:[https://forum.blackmagicdesign.com/viewtopic.php?f=21&t=84614&p=469009&hilit=hidpi#wrapper]<br />
<br />
QT_DEVICE_PIXEL_RATIO=2<br />
QT_AUTO_SCREEN_SCALE_FACTOR=true<br />
<br />
You can change UI scaling in settings: Preferences (ctrl + ,) > User tab > UI settings > UI Display Scale.<br />
<br />
=== Wine version ===<br />
<br />
Some plugins are available for Windows, but not available for Linux, so you may want to use Davinci Resolve via wine. Also, wine version could potentially workaround the linux-only problem of mp4 format issues. Wine 6.5 brings [https://www.phoronix.com/scan.php?page=news_item&px=Wine-6.5-Released OpenCL 1.2 support], which is [https://www.newsshooter.com/2020/11/13/blackmagic-design-davinci-resolve-17-1-released/ required] for DR. Unfortunately, there was no success to start DR via wine.<br />
See test results [https://appdb.winehq.org/objectManager.php?sClass=application&iId=17141 here]. In 17.4.1 DR cannot see the list of available gpus (wine 6.21). Probably, need some hack to make wine present gpus to applications. In dr 18.5b1 with wine 8.7-1 I get the rocm error (5.4.3-1) that is filed [https://github.com/RadeonOpenCompute/ROCm-OpenCL-Runtime/issues/158#issuecomment-1529782323 here].<br />
<br />
=== Wrong OpenCL Version ===<br />
<br />
If the application simply is not starting, even after showing installer and "tour" successfully your OpenCL Version may not match your NVIDIA driver. <br />
If you have installed nvidia-440xx make sure to install opencl-nvidia-440xx as well.<br />
A possible error message:<br />
<br />
{{hc|~/.local/share/DaVinciResolve/logs/LogArchive/ResolveDebug_C1.txt|<br />
...<br />
OpenCL error -1001: 'Unspecified Error', GPUPropertiesUtilUnix.cpp:338<br />
...}}<br />
<br />
=== Get back to Onboarding screen ===<br />
<br />
If you are experimenting with driver installation, you may want to start from the welcome tour and onboarding screen, which checks your system and graphics card. You can achieve that by removing configs directory:<br />
<br />
rm -r $HOME/.local/share/DaVinciResolve/configs<br />
<br />
=== Full screen preview function missing ===<br />
<br />
This function is only available in the studio version. It is in menu ''Workspace > Video Clean Feed''.<br />
<br />
=== No audio during video preview ===<br />
<br />
DaVinci interfaces the ALSA directly, so if you use pulseaudio you need to [[install]] {{Pkg|pulseaudio-alsa}}. Alternatively you can redirect it to use PulseAudio yourself by creating {{ic|asound.conf}} in {{ic|/etc/}} with the following content:<br />
<br />
{{hc|/etc/asound.conf|<br />
pcm.!default pulse<br />
ctl.!default pulse}}<br />
<br />
=== Error code 999 on intel/nvidia hybrid graphic card ===<br />
<br />
"The GPU failed to perform image processing because of an error. Error Code: 999."<br />
<br />
If the nvidia gpu is used in on-demand mode, you have to explicitly demand it. To enable set the following [[environment variables]]:<br />
<br />
__NV_PRIME_RENDER_OFFLOAD=1<br />
__GLX_VENDOR_LIBRARY_NAME=nvidia<br />
<br />
=== Silent crash related to libcrypto.so.1.0.0 ===<br />
<br />
DaVinci Resolve is not starting in graphical mode.<br />
In the console, this error is thrown:<br />
<br />
$ /opt/resolve/bin/resolve <br />
bin/resolve: error while loading shared libraries: libcrypt.so.1: cannot open shared object file: No such file or directory<br />
<br />
You need to [[install]] {{Pkg|libxcrypt-compat}}.<br />
<br />
=== Missing Workflow Integrations menu ===<br />
<br />
In DR Studio for Windows and Mac OS there is Workspace -> Workflow Integrations menu. Workflow Integration plugins are written in JavaScript (electron applications). As noted in documentation (you can reach it in Help -> Documentation -> Developer), Linux currently is not supported (checked in 17.4.3). They say Integration Scripts are supported in Linux, this is most probably a mistake, because they did not provided a path where to put them and still the menu is missing (it is that same Workspace -> Workflow Integrations).<br />
<br />
=== Python 3.6 not found ===<br />
<br />
{{Expansion|Please help to write this section.|Talk:DaVinci Resolve#Python 3.6 not found problem}}<br />
<br />
When going to Workspace -> Console -> Py3 the error window appears saying "Python 3.6 not found".<br />
<br />
One solution is the following (from [https://video.stackexchange.com/questions/32458/davinci-resolve-python-3-6-not-found this] question):<br />
<br />
env PYTHON_CONFIGURE_OPTS="--enable-shared" pyenv install 3.6.11<br />
sudo ln -s $HOME/.pyenv/versions/3.6.11/lib/python3.6 /usr/local/lib/python3.6<br />
sudo ln -s $HOME/.pyenv/versions/3.6.11/lib/libpython3.so /usr/local/lib/libpython3.6.so<br />
<br />
In DR 18 they [https://forum.blackmagicdesign.com/viewtopic.php?f=21&t=158557#:~:text=support%20for%20all%20modern%20and%20future%20python%203%20versions%20for%20scripting say] that all python 3 versions are supported.<br />
<br />
=== Kill hanged process ===<br />
<br />
If dr hanged, fails to release a terminal when you press ctrl + c (to send sigint), and when its window is not shown and you cannot open dr again (it is saying another instance is already running), you can still fix it. Open task manager (ctrl + esc in KDE), then search for process named "GUI", then kill it (send signal 9). Now you can start dr normally.<br />
<br />
=== Use Dolphin instead of Qt File Picker ===<br />
<br />
Unfortunately, DR does not support XDG desktop portals yet. See [https://forum.blackmagicdesign.com/viewtopic.php?f=33&t=149142] for feature request. As a workaround, you can use Andrew Shark's script [https://gitlab.com/AndrewShark/davinci-resolve-scripts/-/blob/main/import%20media%20via%20dolphin.py Import Media via Dolphin].<br />
<br />
=== Unable to start (onetbb/log4cxx) ===<br />
<br />
The switch to {{Pkg|onetbb}} is causing a hang with the following message:<br />
<br />
{{hc|/opt/resolve/bin/resolve|2=<br />
...<br />
ActCCMessage Already in Table: Code= c005, Mode= 13, Level= 1, CmdKey= -1, Option= 0<br />
ActCCMessage Already in Table: Code= c006, Mode= 13, Level= 1, CmdKey= -1, Option= 0<br />
ActCCMessage Already in Table: Code= c007, Mode= 13, Level= 1, CmdKey= -1, Option= 0<br />
ActCCMessage Already in Table: Code= 2282, Mode= 0, Level= 0, CmdKey= 8, Option= 0<br />
PnlMsgActionStringAdapter Already in Table: Code= 615e, Mode= 0, Level= 0, CmdKey= -1, Option= 0<br />
log4cxx: No appender could be found for logger (BtCommon).<br />
log4cxx: Please initialize the log4cxx system properly.<br />
...<br />
}}<br />
<br />
One suggested workaround is to temporarily rename {{ic|/opt/intel/oneapi/compiler/2023.0.0/linux/lib/libOpenCL.so}} to something else, or to replace {{Pkg|onetbb}} with {{AUR|tbb2020}}.<br />
<br />
See the [https://forum.blackmagicdesign.com/viewtopic.php?f=21&t=177985 tbb is replaced by onetbb and resolve cannot start on linux] forum post for further discussion.<br />
<br />
=== Unable to start (libpango/glib) ===<br />
<br />
Due to [https://unix.stackexchange.com/questions/743572/fedora-38-davinci-resolve-no-longer-opens-after-updating-from-fedora-37-to-38 the way Resolve handles libraries], starting the software may fail if the system libraries differ too much from the ones resolve ships.<br />
<br />
/opt/resolve/bin/resolve: symbol lookup error: /usr/lib64/libpango-1.0.so.0: undefined symbol: g_string_free_and_steal<br />
<br />
To circumvent it you can force Resolve to use the systems' version instead:<br />
<br />
$ LD_PRELOAD="/usr/lib64/libglib-2.0.so" /opt/resolve/bin/resolve<br />
<br />
Resolve may fail to launch on the first try, but it will work on subsequent attempts.<br />
<br />
== See also ==<br />
<br />
* [https://forum.blackmagicdesign.com/viewtopic.php?f=21&t=56878&p=456990#p456924 Post] on Davinci Resolve forum with tested configurations.<br />
* PDF with list of [https://documents.blackmagicdesign.com/SupportNotes/DaVinci_Resolve_18_Supported_Codec_List.pdf Supported Formats and Codecs] for DR 18<br />
* [https://www.blackmagicdesign.com/support/family/davinci-resolve-and-fusion Here] you can check if BMD released a document for a newer version, see in the Latest Support Notes column. Also, it lists the whats new notes for each release.<br />
* [https://resolvedevdoc.readthedocs.io/en/latest/ ResolveDevDoc] - unofficial documentation for scripting. Formatted with readthedocs and is prettier to read and search than in original txt file.<br />
* [https://github.com/pedrolabonia/pydavinci pydavinci] - a reworked resolve scripting api</div>GloriousYellowhttps://wiki.archlinux.org/index.php?title=GDM&diff=751034GDM2022-10-03T17:36:53Z<p>GloriousYellow: /* Setup default monitor settings */ user gdm does not need to own configuration file; add instructions for copy on bootup</p>
<hr />
<div>[[Category:Display managers]]<br />
[[Category:GNOME]]<br />
[[de:Login-Manager#GDM]]<br />
[[fr:GDM]]<br />
[[ja:GDM]]<br />
[[pt:GDM]]<br />
[[zh-hans:GDM]]<br />
{{Related articles start}}<br />
{{Related|GNOME}}<br />
{{Related|Display manager}}<br />
{{Related articles end}}<br />
From [https://wiki.gnome.org/Projects/GDM GDM - GNOME Display Manager]: "The GNOME Display Manager (GDM) is a program that manages graphical display servers and handles graphical user logins."<br />
<br />
[[Display manager]]s provide [[X Window System]] and [[Wayland]] users with a graphical login prompt.<br />
<br />
== Installation ==<br />
<br />
GDM can be [[install]]ed with the {{Pkg|gdm}} package, and is installed as part of the {{grp|gnome}} group.<br />
<br />
== Starting ==<br />
<br />
To start GDM at boot time, [[enable]] {{ic|gdm.service}}.<br />
<br />
=== Autostarting applications ===<br />
<br />
To automatically start applications after logging in, follow the instructions in [[Autostarting#On desktop environment startup]] that pertain to your desktop environment.<br />
<br />
== Configuration ==<br />
<br />
{{Note|Most of the configuration options listed below can be easily set using the {{AUR|gdm-settings}} GUI application.}}<br />
<br />
=== Login screen background image ===<br />
<br />
{{Accuracy|Configuration is not persistent and changes will be undone after an update of GNOME Shell. Suggestion: Rewrite to use the "User Themes" Gnome extension.}}<br />
<br />
{{Note|<br />
* Since GNOME 3.16, GNOME Shell themes are now stored as binary files (gresource).<br />
* This change will be overwritten on subsequent updates of {{Pkg|gnome-shell}}.<br />
}}<br />
<br />
Firstly, you need to extract the existing GNOME Shell theme to a directory in your home directory. You can do this using the following script:<br />
<br />
{{hc|extractgst.sh|2=<br />
#!/bin/sh<br />
gst=/usr/share/gnome-shell/gnome-shell-theme.gresource<br />
workdir=${HOME}/shell-theme<br />
<br />
for r in `gresource list $gst`; do<br />
r=${r#\/org\/gnome\/shell/}<br />
if [ ! -d $workdir/${r%/*} ]; then<br />
mkdir -p $workdir/${r%/*}<br />
fi<br />
done<br />
<br />
for r in `gresource list $gst`; do<br />
gresource extract $gst $r >$workdir/${r#\/org\/gnome\/shell/}<br />
done<br />
}}<br />
<br />
Navigate to the created directory. You should find that the theme files have been extracted to it. Now copy your preferred background image to this directory.<br />
<br />
Next, you need to create a file in the directory with the following content:<br />
<br />
{{hc|1=gnome-shell-theme.gresource.xml|2=<br />
<?xml version="1.0" encoding="UTF-8"?><br />
<gresources><br />
<gresource prefix="/org/gnome/shell/theme"><br />
<file>calendar-today.svg</file><br />
<file>calendar-today-light.svg</file><br />
<file>checkbox.svg</file><br />
<file>checkbox-focused.svg</file><br />
<file>checkbox-off-focused-light.svg</file><br />
<file>checkbox-off-focused.svg</file><br />
<file>checkbox-off-light.svg</file><br />
<file>checkbox-off.svg</file><br />
<file>gnome-shell.css</file><br />
<file>gnome-shell-high-contrast.css</file><br />
<file>gnome-shell-start.svg</file><br />
<file>pad-osd.css</file><br />
<file>process-working.svg</file><br />
<file>toggle-off.svg</file><br />
<file>toggle-off-hc.svg</file><br />
<file>toggle-off-light.svg</file><br />
<file>toggle-on.svg</file><br />
<file>toggle-on-hc.svg</file><br />
<file>toggle-on-light.svg</file><br />
<file>workspace-placeholder.svg</file><br />
<file>'''filename'''</file><br />
</gresource><br />
</gresources><br />
}}<br />
<br />
Replace '''filename''' with the filename of your background image or remove the line to use a hex color value instead.<br />
<br />
Now, open the {{ic|gnome-shell.css}} file in the directory and change the {{ic|#lockDialogGroup}} definition as follows:<br />
<br />
#lockDialogGroup {<br />
background: url('''filename''');<br />
background-size: '''width'''px '''height'''px;<br />
background-repeat: no-repeat;<br />
}<br />
<br />
Set {{ic|background-size}} to the resolution that GDM uses; this might not necessarily be the resolution of the image. For a list of display resolutions, see [[wikipedia:Display_resolution#Computer_monitors|Display resolution]]. Again, set '''filename''' to be the name of the background image.<br />
<br />
If you only want to change the background color, adjust the {{ic|#lockDialogGroup}} definition as follows:<br />
<br />
#lockDialogGroup {<br />
background-color: #'''color''';<br />
}<br />
<br />
where '''color''' is the new hex-encoded background color.<br />
<br />
Next, compile the theme using the following command:<br />
<br />
$ glib-compile-resources gnome-shell-theme.gresource.xml<br />
<br />
Then, copy the resulting {{ic|gnome-shell-theme.gresource}} file to the {{ic|/usr/share/gnome-shell}} directory.<br />
<br />
Finally, restart {{ic|gdm.service}} (note that simply logging out is not enough) and you should find that it is using your preferred background image.<br />
<br />
For more information, please see the following [https://bbs.archlinux.org/viewtopic.php?id=197036 forum thread]. A shell script to automate the above steps is available on [https://github.com/DimaZirix/fedora-gdm-wallpaper DimaZirix's github repository].<br />
<br />
=== dconf configuration ===<br />
<br />
Some GDM settings are stored in a [[dconf]] database. They can be configured either by adding ''keyfiles'' to the {{ic|/etc/dconf/db/gdm.d}} directory and then recompiling the GDM database by running {{ic|dconf update}} as root or by logging into the GDM user on the system and changing the setting directly using the ''gsettings'' command line tool. Note that for the former approach, a GDM profile file is required—this must be created manually as it is no longer shipped upstream, see below:<br />
<br />
{{hc|/etc/dconf/profile/gdm|<br />
user-db:user<br />
system-db:gdm<br />
file-db:/usr/share/gdm/greeter-dconf-defaults<br />
}}<br />
<br />
For the latter approach, you can log into the GDM user with the command below:<br />
<br />
# machinectl shell gdm@ /bin/bash<br />
<br />
==== Login screen logo ====<br />
<br />
Create the following keyfile:<br />
<br />
{{hc|/etc/dconf/db/gdm.d/02-logo|2=<br />
[org/gnome/login-screen]<br />
logo='<nowiki/>''/path/to/logo.png''<nowiki/>'<br />
}}<br />
<br />
Then recompile the GDM database. Alternatively, execute the following to log in to the GDM user temporarily and change the logo:<br />
<br />
$ sudo -u gdm dbus-launch gsettings set org.gnome.login-screen logo '<nowiki/>''/path/to/logo.png''<nowiki/>'<br />
<br />
==== Changing the cursor theme ====<br />
<br />
GDM disregards [[GNOME]] cursor theme settings and it also ignores the cursor theme set according to the [[Cursor themes#XDG specification|XDG specification]]. To change the cursor theme used in GDM, create the following keyfile: <br />
<br />
{{hc|/etc/dconf/db/gdm.d/10-cursor-settings|2=<br />
[org/gnome/desktop/interface]<br />
cursor-theme='<nowiki/>''theme-name''<nowiki/>'<br />
}}<br />
<br />
Then recompile the GDM database. Alternatively, execute the following to log in to the GDM user temporarily and change the cursor theme:<br />
<br />
$ sudo -u gdm dbus-launch gsettings set org.gnome.desktop.interface cursor-theme '<nowiki/>''theme-name''<nowiki/>'<br />
<br />
==== Changing the icon theme ====<br />
<br />
The same methods can be used to change the icon theme. Create the following keyfile:<br />
<br />
{{hc|/etc/dconf/db/gdm.d/11-icon-settings|2=<br />
[org/gnome/desktop/interface]<br />
icon-theme='<nowiki/>''theme-name''<nowiki/>'<br />
}}<br />
<br />
Then, recompile the GDM database. Alternatively, execute the following to log in to the GDM user temporarily and change the icon theme:<br />
<br />
$ sudo -u gdm dbus-launch gsettings set org.gnome.desktop.interface icon-theme '<nowiki/>''theme-name''<nowiki/>'<br />
<br />
==== Larger font for log-in screen ====<br />
<br />
Click on the accessibility icon at the top right of the screen (a white circle with the silhouette of a person in the centre) and check the ''Large Text'' option.<br />
<br />
To set a specific scaling factor, create the following keyfile:<br />
<br />
{{hc|/etc/dconf/db/gdm.d/03-scaling|2=<br />
[org/gnome/desktop/interface]<br />
text-scaling-factor='<nowiki/>''1.25''<nowiki/>'<br />
}}<br />
<br />
Then recompile the GDM database. Alternatively, execute the following to log in to the GDM user temporarily and change the font:<br />
<br />
$ sudo -u gdm dbus-launch gsettings set org.gnome.desktop.interface text-scaling-factor '<nowiki/>''1.25''<nowiki/>'<br />
<br />
==== Turning off the sound ====<br />
<br />
This tweak disables the audible feedback heard when the system volume is adjusted (via keyboard) on the login screen.<br />
<br />
Create the following keyfile:<br />
<br />
{{hc|/etc/dconf/db/gdm.d/04-sound|2=<br />
[org/gnome/desktop/sound]<br />
event-sounds=false<br />
}}<br />
<br />
Then recompile the GDM database. Alternatively execute the following to log in to the GDM user temporarily and turn off the sound:<br />
<br />
$ sudo -u gdm dbus-launch gsettings set org.gnome.desktop.sound event-sounds 'false'<br />
<br />
==== Configure power button behavior ====<br />
<br />
{{Note|1=<nowiki/><br />
* The [[Power management#ACPI events|logind settings]] for the power button are overriden by GNOME Settings Daemon. [https://bugzilla.gnome.org/show_bug.cgi?id=755953#c4]<br />
* As of GDM 3.18, the power button cannot be set to ''interactive''. [https://bugzilla.gnome.org/show_bug.cgi?id=753713#c6]<br />
* In some cases, this setting will be ignored and hardcoded defaults will be used. [https://bugzilla.gnome.org/show_bug.cgi?id=755953#c17]<br />
}}<br />
<br />
{{Warning|Please note that the [[acpid]] daemon also handles the "power button" and "hibernate button" events. Running both systems at the same time may lead to unexpected behaviour.}}<br />
<br />
Create the following keyfile:<br />
<br />
{{hc|/etc/dconf/db/gdm.d/05-power|2=<br />
[org/gnome/settings-daemon/plugins/power]<br />
power-button-action='<nowiki/>''action''<nowiki/>'<br />
}}<br />
<br />
Then recompile the GDM database. Alternatively, execute the following to log in to the GDM user temporarily and configure the behavior:<br />
<br />
$ sudo -u gdm dbus-launch gsettings set org.gnome.settings-daemon.plugins.power power-button-action '<nowiki/>''action''<nowiki/>'<br />
<br />
where ''action'' can be one of {{ic|nothing}}, {{ic|suspend}} or {{ic|hibernate}}.<br />
<br />
==== Enabling tap-to-click ====<br />
<br />
Tap-to-click is disabled in GDM (and GNOME) by default, but you can easily enable it with a dconf setting.<br />
<br />
{{Note|If you want to do this under X, you have to first set up correct X server access permissions—see [[#Configure X server access permission]].}}<br />
<br />
To enable tap-to-click, create the following keyfile:<br />
<br />
{{hc|/etc/dconf/db/gdm.d/06-tap-to-click|2=<br />
[org/gnome/desktop/peripherals/touchpad]<br />
tap-to-click=true<br />
}}<br />
<br />
Then recompile the GDM database. Alternatively, execute the following to log in to the GDM user temporarily and enable the action:<br />
<br />
$ sudo -u gdm dbus-launch gsettings set org.gnome.desktop.peripherals.touchpad tap-to-click 'true'<br />
<br />
==== Disable/Enable Accessibility Menu ====<br />
<br />
To disable or enable the Accessibility Menu, create the following keyfile:<br />
<br />
{{hc|/etc/dconf/db/gdm.d/07-accessibility|2=<br />
[org/gnome/desktop/interface]<br />
toolkit-accessibility='<nowiki/>''boolean''<nowiki/>'<br />
}}<br />
<br />
Then recompile the GDM database. Alternatively, execute the following to log in to the GDM user temporarily and change the status:<br />
<br />
$ sudo -u gdm dbus-launch gsettings set org.gnome.desktop.interface toolkit-accessibility '<nowiki/>''boolean''<nowiki/>'<br />
<br />
The menu is disabled when the key is {{ic|false}}, enabled when it is {{ic|true}}.<br />
<br />
==== Enable Night Light on GDM ====<br />
<br />
To enable [[GNOME#Night Light|Night Light]] on GDM, run<br />
<br />
{{bc|$ sudo -u gdm dbus-launch gsettings set org.gnome.settings-daemon.plugins.color night-light-enabled true}}<br />
<br />
=== Keyboard layout ===<br />
<br />
The system keyboard layout will be applied to GDM. See [[Keyboard configuration in Xorg#Using X configuration files]].<br />
<br />
{{Tip|See [[Wikipedia:ISO 3166-1]] for a list of keymaps.}}<br />
<br />
When using Wayland, you may need to specify the X keyboard layout manually with ''localectl'':<br />
<br />
# localectl set-x11-keymap ''fr''<br />
<br />
If a system has multiple users, it is possible to specify a keyboard layout for GDM to use which is different from the system keyboard layout. Firstly, ensure the package {{Pkg|gnome-control-center}} is installed. Then start ''gnome-control-center'' and navigate to ''Region & Language > Input Sources''. In the header bar, hit the ''Login Screen'' toggle button and then choose a keyboard layout from the list. Note that the ''Login Screen'' button will not be visible in the header bar unless multiple users are present on the system [https://bugzilla.gnome.org/show_bug.cgi?id=741500].<br />
<br />
Users of GDM 2.x (legacy GDM) may need to edit {{ic|~/.dmrc}} as shown below:<br />
<br />
{{hc|~/.dmrc|2=<br />
[Desktop]<br />
Language=de_DE.UTF-8 # change to your default lang<br />
Layout=de nodeadkeys # change to your keyboard layout<br />
}}<br />
<br />
=== Change the language ===<br />
<br />
The system language will be applied to GDM. If a system has multiple users, it is possible to set a language for GDM different to the system language. In this case, firstly ensure that {{Pkg|gnome-control-center}} is installed. Then, start ''gnome-control-center'' and choose ''Region & Language''. In the header bar, check the ''Login Screen'' toggle button. Finally, click on ''Language'' and choose your language from the list. You will be prompted for your root password. Note that the ''Login Screen'' button will not be visible in the header bar unless multiple users are present on the system [https://bugzilla.gnome.org/show_bug.cgi?id=741500].<br />
<br />
{{Tip|By adding 2 different input languages, logging out then selecting your default language GDM will remember your choice once the second option is removed.}}<br />
<br />
=== Users and login ===<br />
<br />
==== Automatic login ====<br />
<br />
{{Warning|Do not attempt to do this for users managed by [[systemd-homed]]. This is currently [https://github.com/systemd/systemd/issues/20844 not implemented] and will crash GDM.}}<br />
<br />
To enable automatic login with GDM, add the following to {{ic|/etc/gdm/custom.conf}} (replace {{ic|''username''}} with your own):<br />
<br />
{{hc|1=/etc/gdm/custom.conf|<br />
2=# Enable automatic login for user<br />
[daemon]<br />
AutomaticLogin=''username''<br />
AutomaticLoginEnable=True<br />
}}<br />
<br />
{{Tip|If GDM fails after adding these lines, comment them out from a TTY.}}<br />
<br />
or for an automatic login with a delay:<br />
<br />
{{hc|1=/etc/gdm/custom.conf|<br />
2=[daemon]<br />
TimedLoginEnable=true<br />
TimedLogin=''username''<br />
TimedLoginDelay=1<br />
}}<br />
<br />
You can set the session used for automatic login (replace {{ic|gnome-xorg}} with desired session):<br />
<br />
{{hc|1=/var/lib/AccountsService/users/''username''|<br />
2=XSession=gnome-xorg<br />
}}<br />
<br />
==== Passwordless login ====<br />
<br />
If you want to bypass the password prompt in GDM then simply add the following line on the first line of {{ic|/etc/pam.d/gdm-password}}:<br />
<br />
auth sufficient pam_succeed_if.so user ingroup nopasswdlogin<br />
<br />
Then, add the group {{ic|nopasswdlogin}} to your system. See [[User group]] for group descriptions and group management commands.<br />
<br />
Now, add your user to the {{ic|nopasswdlogin}} group and you will only have to click on your username to login.<br />
<br />
{{Warning|<br />
* Do '''not''' do this for a '''root''' account.<br />
* You will not be able to change your session type at login with GDM anymore. If you want to change your default session type, you will first need to remove your user from the {{ic|nopasswdlogin}} group.<br />
}}<br />
<br />
==== Passwordless shutdown for multiple sessions ====<br />
<br />
GDM uses polkit and logind to gain permissions for shutdown. You can shutdown the system when multiple users are logged in by setting:<br />
<br />
{{hc|1=/etc/polkit-1/localauthority.conf.d/org.freedesktop.logind.policy|2=<nowiki><br />
<?xml version="1.0" encoding="UTF-8"?><br />
<!DOCTYPE policyconfig PUBLIC<br />
"-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN"<br />
"http://www.freedesktop.org/software/polkit/policyconfig-1.dtd"><br />
<br />
<!-- <br />
Policy definitions for logind<br />
--><br />
<br />
<policyconfig><br />
<br />
<action id="org.freedesktop.login1.power-off-multiple-sessions"><br />
<description>Shutdown the system when multiple users are logged in</description><br />
<message>System policy prevents shutting down the system when other users are logged in</message><br />
<defaults><br />
<allow_inactive>yes</allow_inactive><br />
<allow_active>yes</allow_active><br />
</defaults><br />
</action><br />
<br />
</policyconfig><br />
</nowiki>}}<br />
<br />
You can find all available logind options (e.g. reboot-multiple-sessions) in {{man|5|org.freedesktop.login1}}.<br />
<br />
==== Enable root login in GDM ====<br />
<br />
It is not advised to login as root, but if necessary you can edit {{ic|/etc/pam.d/gdm-password}} and add the following line before the line {{ic|auth required pam_deny.so}}:<br />
<br />
{{hc|/etc/pam.d/gdm-password|<br />
auth sufficient pam_succeed_if.so uid eq 0 quiet<br />
}}<br />
<br />
The file should look something like this:<br />
<br />
{{hc|/etc/pam.d/gdm-password|2=<br />
...<br />
auth sufficient pam_succeed_if.so uid eq 0 quiet<br />
auth sufficient pam_succeed_if.so uid >= 1000 quiet<br />
auth required pam_deny.so<br />
...<br />
}}<br />
<br />
You should be able to login as root after restarting GDM.<br />
<br />
==== Hide user from login list ====<br />
<br />
The users for the gdm user list are gathered by [https://www.freedesktop.org/wiki/Software/AccountsService/ AccountsService]. It will automatically hide system users (UID < 1000). To hide ordinary users from the login list create or edit a file named after the user to hide in {{ic|/var/lib/AccountsService/users/}} to contain at least:<br />
<br />
{{hc|/var/lib/AccountsService/users/''username''|2=<br />
[User]<br />
SystemAccount=true<br />
}}<br />
<br />
=== Setup default monitor settings ===<br />
<br />
Some [[desktop environments]] store display settings in {{ic|~/.config/monitors.xml}}. ''xrandr'' commands are then generated on the base of the file content. GDM has a similar file stored in {{ic|/var/lib/gdm/.config/monitors.xml}}.<br />
<br />
If you have your monitors setup as you like (resolution, refresh rate, orientation, scaling, primary and so on) in {{ic|~/.config/monitors.xml}} and want GDM to honor those settings:<br />
<br />
# cp ~/.config/monitors.xml /var/lib/gdm/.config/<br />
<br />
To automatically configure the monitor setup on each boot:<br />
<br />
# /etc/systemd/system/gdm.service.d/override.conf<br />
[Service]<br />
ExecStartPre=/bin/cp /home/yellow/.config/monitors.xml /var/lib/gdm/.config/monitors.xml<br />
<br />
The relevant parts of {{ic|monitors.xml}} for screen rotation and scaling are:<br />
<br />
<monitors version="2"><br />
<configuration><br />
<logicalmonitor><br />
...<br />
<scale>2</scale><br />
...<br />
<transform><br />
<rotation>right</rotation><br />
<flipped>no</flipped><br />
</transform><br />
...<br />
</logicalmonitor><br />
</configuration><br />
</monitors><br />
<br />
Changes will take effect on logout. This is necessary because GDM does not respect {{ic|xorg.conf}}.<br />
<br />
{{Note|<br />
* If you use GDM under Wayland, you must also use a {{ic|monitors.xml}} that was created under Wayland. See [https://gitlab.gnome.org/GNOME/gdm/issues/224 GDM bug 224] for more info. Alternatively, you can force GDM to [[#Use Xorg backend]], and use a {{ic|monitors.xml}} that was created under Xorg.<br />
* If you use [[HiDPI#Fractional scaling|fractional scaling]], you need to enable it for user {{ic|gdm}}.}}<br />
<br />
=== Configure X server access permission ===<br />
<br />
You can use the {{ic|xhost}} command to configure X server access permissions.<br />
<br />
For instance, to grant GDM the right to access the X server, use the following command:<br />
<br />
{{bc|# xhost +SI:localuser:gdm}}<br />
<br />
== Troubleshooting ==<br />
<br />
=== Wayland and the proprietary NVIDIA driver ===<br />
<br />
To use Wayland in GDM with the [[NVIDIA]] driver, you must first enable [[NVIDIA#DRM kernel mode setting]].<br />
<br />
{{Note|If the Wayland option is not displayed in GDM, even after [[NVIDIA#DRM kernel mode setting|enabling KMS]] and [[NVIDIA#Wayland|configuring Wayland]], then you most likely have {{ic|NVreg_PreserveVideoMemoryAllocations}} and [https://gitlab.gnome.org/GNOME/gdm/-/commit/51181871e9db716546e9593216220389de0d8b03 NVIDIA systemd services] disabled. Before trying the method below to force Wayland, follow [[NVIDIA/Tips and tricks#Preserve video memory after suspend]] first.}}<br />
<br />
As of GDM 42 and NVIDIA driver 510, GDM defaults to Wayland. For older NVIDIA drivers (in between version 470 and 510), GDM has chipset-dependent [https://gitlab.gnome.org/GNOME/gdm/-/blob/main/data/61-gdm.rules.in udev rules] to use Xorg rather than Wayland. To force-enable Wayland, override these rules by creating the following symlink:<br />
<br />
# ln -s /dev/null /etc/udev/rules.d/61-gdm.rules<br />
<br />
{{Note|This command works because rules in {{ic|/etc/udev/rules.d/}} override those in {{ic|/usr/lib/udev/rules.d/}} (see [[udev#About udev rules]]). It is also advised to modify files in {{ic|/etc/}} rather than in {{ic|/usr/}} as those are managed by [[pacman]].}}<br />
<br />
If, instead of GDM, a black screen appears, try disabling integrated graphics in your computer's BIOS settings.<br />
<br />
=== Failure on logout ===<br />
<br />
If GDM starts up properly on boot, but fails after repeated attempts on logout, try adding this line to the daemon section of {{ic|/etc/gdm/custom.conf}}:<br />
<br />
GdmXserverTimeout=60<br />
<br />
=== Rootless Xorg ===<br />
<br />
See [[Xorg#Rootless Xorg]].<br />
<br />
=== Use Xorg backend ===<br />
<br />
The [[Wayland]] backend is used by default, and the [[Xorg]] backend is used only if the Wayland backend cannot be started. You may wish to use the Xorg backend instead if, for example:<br />
<br />
* GDM [https://bbs.archlinux.org/viewtopic.php?pid=1869534#p1869534 crashes]<br />
<br />
To use the Xorg backend by default, uncomment the following line in {{ic|/etc/gdm/custom.conf}}:<br />
<br />
#WaylandEnable=false<br />
<br />
=== GDM does not start until input is provided ===<br />
<br />
If, after booting, the screen stays black and GDM does not start until the mouse is moved or something is typed on the keyboard, it may be due to a lack of entropy required for random number generation. To confirm, check that the following line appears inside ''systemd-random-seed''’s log (which can be read by running {{ic|journalctl --unit systemd-random-seed}} with root privileges):<br />
<br />
Kernel entropy pool is not initialized yet, waiting until it is.<br />
<br />
To fix this, you can pass the {{ic|<nowiki>random.trust_cpu=on</nowiki>}} [[kernel parameter]] if your CPU supports the ''RDRAND'' instruction, or you can use [[haveged]] which also provides entropy, albeit it is of allegedly low quality. See [[debian:BoottimeEntropyStarvation|Debian’s article on the topic]] for other solutions.<br />
<br />
=== Incomplete removal of gdm ===<br />
<br />
After removing {{Pkg|gdm}}, [[systemd]] may report the following:<br />
<br />
user 'gdm': directory '/var/lib/gdm' does not exist<br />
<br />
To remove this warning, login as root and [[Users and groups#Other examples of user management|delete the primary user]] {{ic|gdm}} and then [[Users and groups#Group management|delete the group]] {{ic|gdm}}:<br />
<br />
Verify that {{ic|gdm}} is successfully removed via {{ic|pwck}} and {{ic|grpck}} with root privileges. To round it off, you may want to double-check no [[Pacman/Tips and tricks#Identify files not owned by any package|unowned files]] for ''gdm'' remain.<br />
<br />
=== GDM auto-suspend (GNOME 3.28) ===<br />
<br />
GDM uses a separate dconf database to control power management. To apply your user's power settings, copy them to GDM's dconf database:<br />
<br />
$ IFS=$'\n'; for x in $(sudo -u ''username'' gsettings list-recursively org.gnome.settings-daemon.plugins.power); do eval "sudo -u gdm dbus-launch gsettings set $x"; done; unset IFS<br />
<br />
where {{ic|''username''}} is your username.<br />
<br />
To only disable auto-suspend on AC, run:<br />
<br />
$ sudo -u gdm dbus-launch gsettings set org.gnome.settings-daemon.plugins.power sleep-inactive-ac-type 'nothing'<br />
<br />
(To also disable auto-suspend on battery, run the command with {{ic|battery}} instead of {{ic|ac}}.)<br />
<br />
Restart GDM to activate your changes.<br />
<br />
=== GDM ignores Wayland and uses X.Org by default ===<br />
<br />
Wayland requires Kernel Mode Setting (KMS) running in order to work, and on some machines the GDM process start earlier than KMS, resulting in GDM unable to see Wayland and working only with X.Org. This might result in messages like the following showing up in your log:<br />
<br />
gnome-shell[569]: Failed to open gpu '/dev/dri/card0': GDBus.Error:org.freedesktop.DBus.Error.AccessDenied: Operation not permitted<br />
gnome-shell[569]: Failed to create backend: No GPUs found<br />
systemd[505]: org.gnome.Shell@wayland.service: Failed with result 'protocol'.<br />
systemd[505]: Failed to start GNOME Shell on Wayland.<br />
<br />
Alternatively, the same issue may lead to GDM not appearing or monitor only displaying the TTY output.<br />
<br />
You can solve this problem by [[Kernel mode setting#Early KMS start|starting KMS earlier]]. You may also wish to just verify that Wayland is enabled in the GDM config ([[#Use Xorg backend|see above]]).<br />
<br />
Also, if you use a [[NVIDIA]] driver, the Wayland session might be blocked by a [[udev]] rule (see the notes under [[GNOME#Wayland sessions]]). This might result in messages like the following:<br />
<br />
systemd[1022]: Condition check resulted in GNOME Shell on Wayland being skipped.<br />
systemd[1022]: org.gnome.Shell@wayland.service: Skipped due to 'exec-condition'.<br />
systemd[1022]: org.gnome.Shell@wayland.service: Control process exited, code=exited, status=2/INVALIDARGUMENT<br />
<br />
See [[#Wayland and the proprietary NVIDIA driver]] for a workaround.<br />
<br />
=== Black screen on AMD or Intel GPUs when an NVidia (e)GPU is present ===<br />
<br />
At first, without an NVidia device, GDM starts and works normally on Wayland, but stops working once an NVidia eGPU is plugged in (or the {{ic|nvidia}} module is loaded for other reasons). A typical symptom of the problem is a black screen with a blinking cursor upon logouts and GDM restarts and the following message in GDM's logs (accessed by running {{ic|journalctl -u gdm -b}} as root):<br />
<br />
Gdm: Child process -<some PID> was already dead.<br />
<br />
The solution is the same as [[#GDM ignores Wayland and uses X.Org by default|above]]: Prevent {{ic|/usr/lib/gdm-disable-wayland}} from running upon {{ic|nvidia}} module loading.<br />
<br />
Notice that GDM on Wayland will no longer work once {{ic|/usr/lib/gdm-disable-wayland}} has run. This is because {{ic|1=WaylandEnable=false}} has been written into {{ic|/run/gdm/custom.conf}}, which overrides {{ic|/etc/gdm/custom.conf}}. To fix the situation without a reboot, remove {{ic|/run/gdm/custom.conf}} and then restart GDM.<br />
<br />
=== GDM cannot be enabled ===<br />
<br />
See [[systemd/FAQ#Failure to enable unit due to preexisting symlink]].<br />
<br />
== See also ==<br />
<br />
* [https://help.gnome.org/admin/gdm/stable/index.html.en GDM Reference Manual]</div>GloriousYellowhttps://wiki.archlinux.org/index.php?title=Laptop/ASUS&diff=733863Laptop/ASUS2022-06-25T06:02:50Z<p>GloriousYellow: remove * based on last edit</p>
<hr />
<div>[[Category:ASUS]]<br />
[[ja:ノートパソコン/Asus]]<br />
{{Laptops navigation}}<br />
<br />
See also [[Wikipedia:Asus]].<br />
<br />
== Battery charge threshold ==<br />
<br />
Kernel 5.4 brought the ability to set the battery charge threshold for some Asus laptops, by modifying the {{ic|charge_control_end_threshold}} variable exposed under {{ic|/sys/class/power_supply/BAT0/}}[https://github.com/torvalds/linux/commit/7973353e92ee1e7ca3b2eb361a4b7cb66c92abee][https://patchwork.kernel.org/project/platform-driver-x86/patch/20190813003023.6748-1-kristian@klausen.dk/].<br />
<br />
By default this value is set to {{ic|100}} and reset on every power cycle[https://github.com/torvalds/linux/commit/7973353e92ee1e7ca3b2eb361a4b7cb66c92abee#diff-38095ba4871836b9eeaa6e1904739d398da72cda890e5ef932daec2995579db3R429-R434].<br />
<br />
The effect of its change can be demonstrated as follows:<br />
<br />
{{bc|<br />
$ cat /sys/class/power_supply/BAT0/status<br />
Charging<br />
$ cat /sys/class/power_supply/BAT0/capacity<br />
74<br />
# echo 60 > /sys/class/power_supply/BAT0/charge_control_end_threshold<br />
$ cat /sys/class/power_supply/BAT0/status<br />
Not charging<br />
}}<br />
<br />
{{Note|As of 2020-12-11, the following battery device names are recognized: BAT0, BAT1, BATC and BATT.[https://github.com/torvalds/linux/blob/1797d588af15174d4a4e7159dac8c800538e4f8c/drivers/platform/x86/asus-wmi.c#L440-L448] Adjust accordingly or use the [[Wikipedia:Wildcard_character#File_and_directory_patterns|single character wildcard]] ({{ic|?}}), e.g. {{ic|BAT?}}.}}<br />
<br />
=== systemd service ===<br />
<br />
In order to automatically change the value at boot, [[create]] the following [[Systemd#Writing_unit_files|systemd service]]:<br />
<br />
{{hc|/etc/systemd/system/battery-charge-threshold.service|2=<br />
[Unit]<br />
Description=Set the battery charge threshold<br />
After=multi-user.target<br />
StartLimitBurst=0<br />
<br />
[Service]<br />
Type=oneshot<br />
Restart=on-failure<br />
ExecStart=/bin/bash -c 'echo '''60''' > /sys/class/power_supply/BAT0/charge_control_end_threshold'<br />
<br />
[Install]<br />
WantedBy=multi-user.target<br />
}}<br />
<br />
and then [[enable]] it.<br />
<br />
{{Tip|Replace {{ic|60}} with the desired value.}}<br />
<br />
{{ic|1=Restart=on-failure}} and {{ic|1=StartLimitBurst=0}} are used to work around the service failing with a {{ic|/bin/bash: /sys/class/power_supply/BAT0/charge_control_end_threshold: Permission denied}} error.<br />
<br />
This error is due to the service being started before [https://github.com/torvalds/linux/blob/master/drivers/platform/x86/asus-wmi.c asus-wmi] could be loaded by the kernel (noted as {{ic|kernel: battery: new extension: ASUS Battery Extension}} in the [[journal]]), making it impossible to write there.<br />
<br />
The combination of those two options allows unlimited restart of the service for {{ic|DefaultStartLimitIntervalSec}} (set to 10 seconds by default in {{ic|/etc/systemd/system.conf}}), leaving enough time for the sysfs path to become available and writable and thus ensuring the fastest execution of the service.<br />
<br />
{{Note|As of 2020-12-01, this is the only functional workaround as neither path-based activation or systemd-tmpfiles were working.}}<br />
<br />
=== udev rule ===<br />
<br />
The battery's {{ic|charge_control_end_threshold}} power supply class attribute does not initially exist. It is added to the {{man|5|sysfs}} directory by the {{ic|asus-nb-wmi}} [[kernel module]]. Create a [[udev rule]] for {{ic|asus-nb-wmi}} to set the battery's charge threshold:<br />
<br />
{{hc|/etc/udev/rules.d/asus-battery-charge-threshold.rules|2=<br />
ACTION=="add", KERNEL=="asus-nb-wmi", RUN+="/bin/bash -c 'echo 60 > /sys/class/power_supply/BAT?/charge_control_end_threshold'"<br />
}}<br />
<br />
=== Persist after hibernation ===<br />
<br />
While this setting will persist after [[Power_management/Suspend_and_hibernate|suspending to RAM]], it will be reset when resuming from hibernation. In order to re-execute the service after hibernation, use one of the methods described in [[Power management#Sleep hooks]].<br />
<br />
E.g. if using [[Power management#Generic service template]], enable an instance of the created template using:<br />
<br />
# systemctl enable sleep@battery-charge-threshold.service<br />
<br />
If creating a script as described in [[Power management#Hooks in /usr/lib/systemd/system-sleep]], use something similar to:<br />
<br />
{{hc|/usr/lib/systemd/system-sleep/battery-threshold.sh|<br />
#!/bin/sh<br />
case $1/$2 in<br />
pre/*)<br />
echo "Going to $2..."<br />
;;<br />
post/*)<br />
echo "Waking up from $2..."<br />
echo 60 > /sys/class/power_supply/BAT0/charge_control_end_threshold<br />
;;<br />
esac<br />
}}<br />
<br />
Do not forget to make the script [[executable]].<br />
<br />
== List of models and details ==<br />
<br />
{{Style|Generic info not specific to laptops should be removed and instead of creating super long, messy entries there should be a dedicated page for the laptop. Many entries also need language improvements}}<br />
<br />
=== Vivobook ===<br />
<br />
{{Laptops table header}}<br />
| VivoBook M513IA || 2021-09-12 || {{Yes}} || {{Yes}} || {{-}} || {{Yes}} || {{Yes}} || {{Yes}} || See [[#Function key behavior]] || <br />
|-<br />
| VivoBook F510UA || 2018-07-01 || {{Yes}} || {{Yes}} || {{-}} || {{Yes}} || {{Yes}} || {{Y|Untested}} || || UEFI secure boot key rejected, had to disable in BIOS.<br />
|-<br />
| VivoBook 14 X442UA-GA139T || 2018-05-01 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Y|Untested}} || {{Y|Untested}} || || UEFI secure boot does not pass, might need work.<br />
|-<br />
| VivoBook S301LA || 2016-09-01 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{ic|1=acpi_osi=}} needed for hotkeys and backlight control. For package power states lower than PC3, see Remarks. || || To reach PC7, {{Pkg|r8168}} has to be built without certain build options. An easy way to do this is to build {{AUR|r8168-dkms}} after modifying its {{ic|dkms.conf}} by removing {{ic|1=EXTRA_CFLAGS='-DCONFIG_R8168_NAPI -DCONFIG_R8168_VLAN'}}<br />
|-<br />
| VivoBook X512DA || 2019-03-15 || {{Yes}} || {{Yes}} || {{-}} || {{Yes}} || {{Yes}} || {{Yes}} || See [[#Function key behavior]] || Fan spins unusually fast when started plugged in.<br />
|-<br />
| [[ASUS X421IA|Vivobook S14 M433 (X421IA)]] || 2020-07-31 || {{Yes}} || {{Yes}} || {{-}} || {{Yes}} || {{Yes}} || {{No}} || Fingerprint does not work. See [[#Function key behavior]] || See article for more details.<br />
|-<br />
| VivoBook X509DA_D509DA || 2021-06-21 || {{Yes}} || {{Yes}} || {{-}} || {{Yes}} || {{Y|Untested}} || {{R|Bad battery life<br/>fan always spins}} || Sometimes the touchpad is not recognized, to fix run {{bc|1=# rmmod i2c-hid-acpi}} and {{bc|1=# modprobe i2c-hid-acpi}} || Needed an external wifi/ethernet adapter (via USB) during archiso (for access to internet), screen brightness is set to lowest when you plug/unplug your power for the first time after boot (now fixed, i think by adding the {{ic|1=amdgpu}} module in {{ic|1=/etc/mkinitcpio.conf}})<br />
|-<br />
| VivoBook Pro 14 (M3400) || 2021-04-29 || {{Yes}} || {{Yes}} || {{-}} || {{Yes}} || {{Yes}} || {{Yes}} || A few keys were strangely mapped (e.g. Screenshot key {{ic|Fn+F11}} mapped to {{ic|Super+S}}). || Recovering from DPMS brightness reset to default can be solved by replacing {{ic|1=acpi_video0}} with {{ic|1=amdgpu_bl0}}. <br />
|-<br />
| Vivobook X450LCP || 2019-11-01 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{No}} || {{Yes}} || Touchpad works better with deprecated {{Pkg|xf86-input-libinput}} driver || Apparently there is no way to control manually the fan. Every time the fan just stops spinning, needing suspending/reboot to fix.<br />
|}<br />
<br />
==== Function key behavior ====<br />
<br />
The Function keys default behavior is {{ic|F1}},{{ic|F2}},etc… and must be unset by using {{ic|Fn+Esc}} to use alternative functions.<br />
<br />
=== Gaming ===<br />
<br />
{{Laptops table header}}<br />
| GL552VM-DM-802D || 2017-02-01 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Y|Untested}} || {{Y|Untested}} || || Needs {{ic|1=acpi_backlight=native}} to have {{ic|Fn}} keys backlight control, {{ic|1=idle=nomwait}} and {{ic|1=acpi_osi=! acpi_osi='Windows 2009'}} to boot. <br />
|-<br />
| G502VM-FY017T || 2017-02-01 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || The screen adjustment need a little workaround || <br />
|-<br />
| FX502VM || 2017-02-01 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Y|Untested}} || {{Yes}} || Fn keys does not send ACPI events, except {{ic|F10}},{{ic|F11}},{{ic|F12}} (sound control) || <br />
|-<br />
| FX504GD || 2019-05-30 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || For Fan Speed Control see [[Fan speed control#Alternative method using EC registers]]. For touchpad five finger touch of death apply patch [https://lore.kernel.org/lkml/20190430083753.18197-1-kai.heng.feng@canonical.com/ pinctl-intel.c patch] ||<br />
|-<br />
| FX505DY || 2020-12-01 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || || See [[#Black screen after sleep]]<br />
|-<br />
| FX505DT || 2021-09-30 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || See [[#Battery charge threshold]]. Keyboard backlight settings can be controlled via {{AUR|tuf-manager}} || See [[#Black screen after sleep]]<br />
|-<br />
| [[ASUS G73SW|G73SW]] || 2011-08-19 || {{Yes}} || {{Yes}} || {{Yes}}|| {{Yes}} || {{Yes}} || {{Y|Untested}} || ||<br />
|-<br />
| G550JK || 2014-08-01 || {{Yes}} || {{Yes}} || {{Y|Untested}} || {{Yes}} || {{Y|Untested}} || {{Y|Untested}} || || [https://xps13-9333.appspot.com/#background_noise fix background noises while using headphones]<br />
|-<br />
| FX 533VE || 2018-02-01 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || || See [[#Nouveau prevents boot]].<br />
|-<br />
| FX 504GM || 2019-02-01 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || || Did not manage to use the HDMI output (in fact, it is possible, but...), issue posted on the forum. See [[#Nouveau prevents boot]].<br />
|-<br />
| FX 504GE || 2019-06-01 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || || See [[#Elan1200 touchpad]].<br />
|-<br />
| GL 503VD || 2019-02-01 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || || See [[#Elan1200 touchpad]].<br/>See [[#Nouveau prevents boot]].<br />
|-<br />
| FA506IV || 2022-02-02 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || Keyboard backlight works but needs [https://github.com/Ann1kaB/faustus faustus] with {{aur|openrgb}} (or {{aur|openrgb-bin}}) to change RGB. || If using [[EFISTUB]], cannot change the UEFI timeout using [[efibootmgr]].<br />
|}<br />
<br />
==== Republic of Gamers (ROG) ====<br />
<br />
{{Laptops table header}}<br />
| [[ASUS GL702ZC|ROG Strix GL702ZC]] || 2017-04-01 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{No}} || {{Y|Untested}} || Backlight keys are amdgpu, not xbacklight. Fancontrol is ACPI, there are some amdgpu fan control stuff on aur/github. ||<br />
|-<br />
| ROG Zephyrus M || 2019-11-01 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{R|Bad battery life:<br/>cannot power down NVIDIA GPU}} || No control over fans and keyboard backlight. Most of functional keys not working || The battery is the big disadvantage. On Windows it can last for up to 6h, however. This laptop is definitely not Linux friendly<br />
|-<br />
| [[ASUS GA401I|ROG Zephyrus G14 (GA401I)]] || 2021-05-12 || {{Yes}} || {{Yes}} || {{-}} || {{Yes}} || {{Yes}} || {{Yes}} || Some function keys and AniMe LED matrix work with kernel patches and {{AUR|asusctl-git}}. || <br />
|-<br />
| ROG Zephyrus G15 (GA502IU)|| 2020-07-08 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || Some custom keys do not work. Can control only one fan with {{ic|asus_nb_wmi}} module. || <br />
|-<br />
| ROG Zephyrus S15 (GX502LWS) || 2020-20-25 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Y|Sleep: Untested}} || Keyboard colors work using {{AUR|rogauracore-git}} || <br />
|-<br />
| ROG Flow X13 (GV301Q'''E''') || 2021-07-01 || rowspan="2" {{Yes}} || rowspan="2" {{Yes}} || rowspan="2" {{-}} || rowspan="2" {{Yes}} || rowspan="2" {{Yes}} || rowspan="2" {{Y|Untested}} || Both accelerometer sensor and lid-backflip are ''not'' detected (waiting for asus-wmi fix?). || rowspan="2" | Tablet integration is manual, because the lid-backflip sensor is missing.<br />
|-<br />
| ROG Flow X13 (GV301Q'''H''') || 2021-10-09 || Lid-backflip is ''not'' detected. Fingerprint sensor is detected when libfprint is fully upgraded, however it always fails to verify.<br />
|-<br />
| ROG Zephyrus GU501GM || 2021-11-24 || {{Yes}} || {{Yes}} || {{-}} || {{Yes}} || {{Yes}} || {{No}} || Fan curves cannot be changed though overboost modes work. RGB works with {{AUR|rogauracore-git}} and all keys work except the mute microphone button || HDMI output is hardwired to the Nvidia GPU. <br />
|-<br />
| [https://linux-hardware.org/?computer=9864b4c43688 ROG Strix G15 G513QY Advantage Edition] || 2022-01-16 || {{G|Yes}} || {{Yes}} || {{Yes}} || {{Y|Partial: No AP (HotSpot) mode}} || {{Yes}} || {{Yes}} || Flashing lights during sleep could be disable with {{AUR|asusctl}}. Support for custom fan curves should land in kernel 5.17 || <br />
|-<br />
| [[ASUS_G533QS|ROG Strix Scar G15 G533QS]] || 2022-02-19 || {{Yes}} || {{Yes}} || {{Yes}} || {{Y|Partial: No AP (HotSpot) mode}} || {{Yes}} || {{Yes}} || ||<br />
|-<br />
| ROG Strix G15 G513 (G513QR) || 2022-02-21 || {{Yes}} || Internal mic is very noisy (almost useless). Headset mic requires workaround: [[Install]] {{Pkg|alsa-tools}}, run ''hdajackretask'', select Realtek ALC825 from menu and override pin {{ic|0x19}} with "Microphone". || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || Sometimes the WiFi card is not recognized after rebooting. The keys for changing profile and muting the mic require workaround (see fix for [https://asus-linux.org/faq/#fn-f5-doesn-t-do-anything profile] and [https://asus-linux.org/faq/#mic-mute-doesn-t-work mic-mute]. || Secure boot disabled. Followed [https://asus-linux.org/wiki/arch-guide/ asusctl guide] but did not try {{AUR|supergfxctl}} nor the {{AUR|linux-g14}} kernel (from g14 repo). <br />
|}<br />
<br />
===== Asusctl =====<br />
<br />
{{Move|asusctl|See [[ASUS GA401I#ASUSCtl]], all the content regarding {{AUR|asusctl}} deserves a dedicated page.}}<br />
<br />
{{aur|asusctl}} (or {{aur|asusctl-git}}) implements functionality specific to the ROG line of laptops, such as backlit keyboards, fan profiles, and the AniMe LED matrix. Check the project's official site for usage: https://asus-linux.org/<br />
<br />
===== Black screen after sleep =====<br />
<br />
Add {{ic|1=amd_iommu=off idle=nomwait amdgpu.gpu_recovery=1}} to your [[kernel command line]]. <br />
<br />
===== Nouveau prevents boot =====<br />
<br />
Boot with nouveau disabled: use {{ic|1=nouveau.modset=0}} on the [[kernel command line]]. <br />
Need to edit bumblebee service to boot : https://github.com/Bumblebee-Project/Bumblebee/issues/764#issuecomment-450749984.<br />
<br />
===== Elan1200 touchpad =====<br />
<br />
Some fixes are needed: see https://bugzilla.redhat.com/show_bug.cgi?id=1543769.<br />
<br />
=== ZenBook ===<br />
<br />
{{Laptops table header}}<br />
| [[ASUS Zenbook UX305|UX305FA]] || 2016-10-01 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || Function keys for brightness (F5/F6) do not send ACPI events ||<br />
|-<br />
| [[ASUS Zenbook UX303|UX303LN]] || 2014-10-01 || {{Yes}} || {{Yes}} || {{-}} || {{Yes}} || {{Y|Untested}} || {{Y|Untested}} || Touchpad misses gestures, Touchscreen misses multi-touch support || Avoid some power management features due to Kernel Bug 102091.<br />
|-<br />
| UX32L(N) || 2015-08-29 || {{Yes}} || {{Yes}} || {{-}} || {{Yes}} || {{Yes}} || {{Yes}} || Set the kernel parameters {{ic|1=video.use_native_backlight=1 acpi_osi=}} for working backlight keys and backlight restore. || Avoid activating some power management features due to Kernel Bug 102091.<br />
|-<br />
| [[UX430UA]] || 2017-06-01 || {{Yes}} || {{Yes}} || {{-}} || {{Yes}} || {{Yes}} || {{Yes}} || rowspan="3" | PWM Fan control is not available || rowspan="3" | See dedicated page. <br />
|-<br />
| [[ASUS_Zenbook_UX390|UX390UA]] || 2018-05-01 || {{Yes}} || {{Yes}} || {{-}} || {{Yes}} || {{Yes}} || {{Yes}} <br />
|-<br />
| [[ASUS_Zenbook_UX534|UX534FTC]] || 2020-04-09 || {{Yes}} || {{Yes}} || {{-}} || {{Yes}} || {{Yes}} || {{Yes}}<br />
|}<br />
<br />
=== ExpertBook ===<br />
<br />
{{Laptops table header}}<br />
| [[ASUS B9450|B9450]] || 2020-04-20 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || || <br />
|-<br />
| [[ASUS B9450CEA|B9450CEA]] || 2021-03-14 || {{Yes}} || {{G|[[Advanced Linux Sound Architecture#ALSA firmware|Yes*]]}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || || <br />
|-<br />
| BR1100FKA || 2021-05-28 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Y|Untested: Webcam<br/>Microphone<br/>Touchpad<br/>Stylus}} || Integrated eMMC memory can't be formatted to linux compatible filesystems; you will need to install an NVME SSD. <br />
|}<br />
<br />
=== Other ===<br />
<br />
{{Laptops table header}}<br />
| W7S || 2007-08-01 (Arch Linux 0.9 Don't Panic) || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || Webcam: {{AUR|stk11xx-svn}} || <br />
|-<br />
| F5R || 2008-01-16 || {{Yes}} || {{Yes}} || {{Yes}} || {{G|[[Broadcom wireless|Yes]]}} || {{Yes}} || {{Y|Untested}} || colspan=2 | ACPI works with acpi4asus and acpid<br />
|-<br />
| M51SN || 2008-12-17 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Y|Untested}} || colspan=2 | Add {{ic|1=snd-hda-intel model=lenovo}} to {{ic|/etc/modprobe.d/modprobe.conf}}<br />
|-<br />
| N80Vn-X5 || 2009-02 (Arch Linux 2009.02RC2) || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Y|Untested}} || colspan=2 | Add {{ic|1=options snd-hda-intel enable=1 model=g50v position_fix=0}} to {{ic|/etc/modprobe.d/modprobe.conf}}<br />
|-<br />
| F8SN || 2009-08 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Y|Untested}} || {{Y|Untested}} || ||<br />
|-<br />
| L3000D || 2010-02-13 || {{Yes}} || {{Yes}} || {{Yes}} || {{-}} || {{-}} || {{Yes}} || ||<br />
|-<br />
| N53JN || 2010-11-03 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Y|Untested}} || {{G|Hibernate: Untested}} || colspan=2 | suspend works but with problems due to USB3 controller<br />
|-<br />
| N53SV || 2011-06-26 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Y|Untested}} || {{Yes|https://bbs.archlinux.org/viewtopic.php?pid=910195 BBS thread}} || colspan=2 | See also [https://help.ubuntu.com/community/Asus_N53 Ubuntu help]<br />
|-<br />
| A8Le || 2011-07-31 || {{Yes}} || {{Yes}} || {{Yes}} || {{Y|Untested}} || {{Y|Untested}} || || ||<br />
|-<br />
| [[ASUS UL30A|UL30A]] || 2011-08-19 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Y|Untested}} || {{Y|Untested}} || {{Y|Card reader: Untested}} || Needs {{ic|1=acpi_backlight=vendor}}<br />
|-<br />
| K55VM || 2013-04-01 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Y|Untested}} || {{Yes}} || ||<br />
|-<br />
| [[ASUS A55VJ|A55VJ]] || 2013-05-01 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || colspan=2 | Use {{ic|1=i8042.nomux=1}} to prevent jittery touchpad.<br />
|-<br />
| X401A/X401A1 || 2013-05-01 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Y|Untested}} || brightness control needs {{ic|asus-nb-wmi}} and {{ic|1=acpi_backlight=intel acpi_osi=}} || || <br />
|-<br />
| [[X502CA]] || 2013-07-01 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Y|Untested}} || {{Yes}} || || Poor Wi-Fi performance<br />
|-<br />
| S300CA || 2013-08-01 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Y|Untested}} || {{Yes}} || {{Y|Untested:<br/>USB3<br/>Card reader}} || Use {{ic|1=acpi_osi=Linux acpi_backlight=vendor}}<br />
|-<br />
| Q400A || 2013-10-17 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{G|Hibernate: Untested}} || {{Y|HDMI output: Untested}} ||<br />
|-<br />
| X401U || 2014-01-05 || {{Yes}} || {{Yes}} || {{Y|Untested}} || {{Yes}} || {{-}} || {{Yes}} || ||<br />
|-<br />
| K55N || 2014-11-12 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{-}} || Overheats and immediately shuts down on modern 3D games. Use thermald to control temp using acpi_cpufreq || colspan=2 | Fix fn brightness keys with {{ic|1=acpi_osi="!Windows 2012" video.use_native_backlight=1}}. Do not enable early radeon hook to prevent blank screen after hibernation. Fix blank screen on suspend to ram with {{ic|1=sysctl -w kernel.acpi_video_flags=3}}.<br />
|-<br />
| 1015E || 2014-05-19 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Y|Untested}} || {{Yes}} || {{Y|USB3: Untested}} ||<br />
|-<br />
| X53BR/K53BR || 2014-03-30 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{-}} || {{Yes}} || || heats up very fast<br />
|-<br />
| X551CA || 2014-03-24 || {{Yes}} || {{Yes}} || {{Y|Untested}} || {{Yes}} || {{Y|Untested}} || {{Y|Untested}} || colspan=2 | Disabling WiFi blocks the card, {{ic|Fn+F2}} does not work. Workaround on [https://ubuntuforums.org/showthread.php?t=2181558 Ubuntu forum.]<br />
|-<br />
| [[N550JV]] || 2014-03-01 || {{Yes}} || {{G|Yes<sup>*</sup>}} || {{Yes}} || {{Yes}} || {{Y|Untested}} || {{G|Yes<sup>**</sup>}} || colspan=2 | <sup>*</sup>external speakers pop on sleep/shutdown<br/><sup>**</sup>battery issues when a powered device is left plugged into the USB charging port.<br />
|-<br />
| X83VB-X2 || 2014-09-01 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Y|Untested}} || {{Y|Untested}} || {{Y|Camera: Untested}} ||<br />
|-<br />
| Q500A || 2015-02-01 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Y|Untested}} || || || <br />
|-<br />
| S400CA || 2015-02-01 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Y|Untested}} || {{Yes}} || {{Y|Untested:<br/>USB3}} || Use {{ic|1=acpi_osi=Linux acpi_backlight=vendor}}<br />
|-<br />
| U32U || 2015-02-01 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}}|| {{Yes}} || {{Y|Partial}} || Needs significant setup. Power management hard to get right. CPU Fan constantly on. || For [[rfkill]] issues {{ic|1=options asus_nb_wmi wapf=1}} may help<br />
|-<br />
| [[ASUS X553MA|X553MA]] || 2015-06-01 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{No}} || {{Yes}} || colspan=2 | Set {{ic|OS Selection}} in BIOS setup to {{ic|Windows 7}}<br/>[[Broadcom_wireless#broadcom-wl|broadcom-wl]] (causes freezes)<br />
|-<br />
| F550J (aka A550J) || 2015-09-01 || {{Y|Partial}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Y|Untested}} || {{Y|Untested}} || {{Pkg|xf86-input-synaptics}} recommended for touchpad || Recommend to disable standalone graphic card<br />
|-<br />
| [[ASUS N550JX|N550JX]] || 2015-12-01 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || || Read dedicated page. <br />
|-<br />
| [[ASUS X552M|X552M]] || 2015-12-01 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Y|Untested}} || {{Yes}} || Use {{ic|1=acpi_osi= acpi_backlight=native}} for changing backlight with {{ic|Fn+F5}}/{{ic|Fn+F6}} || Read dedicated page. <br />
|-<br />
| [[ASUS E403SA|E403SA]] || 2016-06-01 || {{Yes}} || {{Yes}} || {{-}} || {{Yes}} || {{Y|Untested}} || {{Yes}} || colspan=2 | Card reader not tested. ACPI/Function keys and lid switch do not work and will not show up on acpi_listen; except for mute, volup, voldown. With acpi="!Windows 2012" all ACPI functions work perfectly but the touchpad gets disabled.<br />
|-<br />
| F555UA || 2016-08-14 || {{Yes}} || {{Yes}} || {{Yes}} || {{No}} || {{No}} || {{Yes}} || No two finger scroll, very buggy touchpad || Add {{ic|1=options snd-hda-intel model=laptop-dmic position_fix=3 ac97_quirck=alc_jack}} to {{ic|/etc/modprobe.d/alsa-base.conf}} to get mic and headphone/mic to work<br />
|-<br />
| K501J || 2016-09-01 || {{Yes}} || {{Yes}} || {{Y|Untested}} || {{Yes}} || {{-}} || {{Yes}} || colspan=2 | Touchpad works with {{Pkg|xf86-input-libinput}}, but somewhat uncomfortable. Better with {{Pkg|xf86-input-synaptics}} even if deprecated.<br />
|-<br />
| K501LX || 2017-01-01 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{R|Keyboard backlight controls}} || Added {{ic|1=pcie_port_pm=off}} to kernel parameters to make {{Pkg|bbswitch}} work correctly.<br />
|-<br />
| R540SA || 2017-03-01 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || ||<br />
|-<br />
| [[N551VW]] || 2017-06-01 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Y|Untested}} || ||<br />
|-<br />
| N76V || 2019-01-05 || {{Yes}} || {{Yes}} || {{Y|Untested}} || {{Yes}} || {{Y|Untested}} || {{Y|Untested}} || ||<br />
|-<br />
| [[ASUS X451MA|X451MA]] || 2021-02-12 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Y|Untested}} || {{Y|Untested}} || ||<br />
|-<br />
| [[ASUS K55VD|K55VD]] || 2021-11-27 || {{Y|Partial<sup>*</sup>}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || colspan=2 | <sup>*</sup>{{AUR|nvidia-390xx-dkms}} fails with both {{pkg|linux}} and {{pkg|linux-lts}}<br />
|}</div>GloriousYellowhttps://wiki.archlinux.org/index.php?title=Laptop/ASUS&diff=733862Laptop/ASUS2022-06-25T06:02:06Z<p>GloriousYellow: remove a note regarding recently fixed instability</p>
<hr />
<div>[[Category:ASUS]]<br />
[[ja:ノートパソコン/Asus]]<br />
{{Laptops navigation}}<br />
<br />
See also [[Wikipedia:Asus]].<br />
<br />
== Battery charge threshold ==<br />
<br />
Kernel 5.4 brought the ability to set the battery charge threshold for some Asus laptops, by modifying the {{ic|charge_control_end_threshold}} variable exposed under {{ic|/sys/class/power_supply/BAT0/}}[https://github.com/torvalds/linux/commit/7973353e92ee1e7ca3b2eb361a4b7cb66c92abee][https://patchwork.kernel.org/project/platform-driver-x86/patch/20190813003023.6748-1-kristian@klausen.dk/].<br />
<br />
By default this value is set to {{ic|100}} and reset on every power cycle[https://github.com/torvalds/linux/commit/7973353e92ee1e7ca3b2eb361a4b7cb66c92abee#diff-38095ba4871836b9eeaa6e1904739d398da72cda890e5ef932daec2995579db3R429-R434].<br />
<br />
The effect of its change can be demonstrated as follows:<br />
<br />
{{bc|<br />
$ cat /sys/class/power_supply/BAT0/status<br />
Charging<br />
$ cat /sys/class/power_supply/BAT0/capacity<br />
74<br />
# echo 60 > /sys/class/power_supply/BAT0/charge_control_end_threshold<br />
$ cat /sys/class/power_supply/BAT0/status<br />
Not charging<br />
}}<br />
<br />
{{Note|As of 2020-12-11, the following battery device names are recognized: BAT0, BAT1, BATC and BATT.[https://github.com/torvalds/linux/blob/1797d588af15174d4a4e7159dac8c800538e4f8c/drivers/platform/x86/asus-wmi.c#L440-L448] Adjust accordingly or use the [[Wikipedia:Wildcard_character#File_and_directory_patterns|single character wildcard]] ({{ic|?}}), e.g. {{ic|BAT?}}.}}<br />
<br />
=== systemd service ===<br />
<br />
In order to automatically change the value at boot, [[create]] the following [[Systemd#Writing_unit_files|systemd service]]:<br />
<br />
{{hc|/etc/systemd/system/battery-charge-threshold.service|2=<br />
[Unit]<br />
Description=Set the battery charge threshold<br />
After=multi-user.target<br />
StartLimitBurst=0<br />
<br />
[Service]<br />
Type=oneshot<br />
Restart=on-failure<br />
ExecStart=/bin/bash -c 'echo '''60''' > /sys/class/power_supply/BAT0/charge_control_end_threshold'<br />
<br />
[Install]<br />
WantedBy=multi-user.target<br />
}}<br />
<br />
and then [[enable]] it.<br />
<br />
{{Tip|Replace {{ic|60}} with the desired value.}}<br />
<br />
{{ic|1=Restart=on-failure}} and {{ic|1=StartLimitBurst=0}} are used to work around the service failing with a {{ic|/bin/bash: /sys/class/power_supply/BAT0/charge_control_end_threshold: Permission denied}} error.<br />
<br />
This error is due to the service being started before [https://github.com/torvalds/linux/blob/master/drivers/platform/x86/asus-wmi.c asus-wmi] could be loaded by the kernel (noted as {{ic|kernel: battery: new extension: ASUS Battery Extension}} in the [[journal]]), making it impossible to write there.<br />
<br />
The combination of those two options allows unlimited restart of the service for {{ic|DefaultStartLimitIntervalSec}} (set to 10 seconds by default in {{ic|/etc/systemd/system.conf}}), leaving enough time for the sysfs path to become available and writable and thus ensuring the fastest execution of the service.<br />
<br />
{{Note|As of 2020-12-01, this is the only functional workaround as neither path-based activation or systemd-tmpfiles were working.}}<br />
<br />
=== udev rule ===<br />
<br />
The battery's {{ic|charge_control_end_threshold}} power supply class attribute does not initially exist. It is added to the {{man|5|sysfs}} directory by the {{ic|asus-nb-wmi}} [[kernel module]]. Create a [[udev rule]] for {{ic|asus-nb-wmi}} to set the battery's charge threshold:<br />
<br />
{{hc|/etc/udev/rules.d/asus-battery-charge-threshold.rules|2=<br />
ACTION=="add", KERNEL=="asus-nb-wmi", RUN+="/bin/bash -c 'echo 60 > /sys/class/power_supply/BAT?/charge_control_end_threshold'"<br />
}}<br />
<br />
=== Persist after hibernation ===<br />
<br />
While this setting will persist after [[Power_management/Suspend_and_hibernate|suspending to RAM]], it will be reset when resuming from hibernation. In order to re-execute the service after hibernation, use one of the methods described in [[Power management#Sleep hooks]].<br />
<br />
E.g. if using [[Power management#Generic service template]], enable an instance of the created template using:<br />
<br />
# systemctl enable sleep@battery-charge-threshold.service<br />
<br />
If creating a script as described in [[Power management#Hooks in /usr/lib/systemd/system-sleep]], use something similar to:<br />
<br />
{{hc|/usr/lib/systemd/system-sleep/battery-threshold.sh|<br />
#!/bin/sh<br />
case $1/$2 in<br />
pre/*)<br />
echo "Going to $2..."<br />
;;<br />
post/*)<br />
echo "Waking up from $2..."<br />
echo 60 > /sys/class/power_supply/BAT0/charge_control_end_threshold<br />
;;<br />
esac<br />
}}<br />
<br />
Do not forget to make the script [[executable]].<br />
<br />
== List of models and details ==<br />
<br />
{{Style|Generic info not specific to laptops should be removed and instead of creating super long, messy entries there should be a dedicated page for the laptop. Many entries also need language improvements}}<br />
<br />
=== Vivobook ===<br />
<br />
{{Laptops table header}}<br />
| VivoBook M513IA || 2021-09-12 || {{Yes}} || {{Yes}} || {{-}} || {{Yes}} || {{Yes}} || {{Yes}} || See [[#Function key behavior]] || <br />
|-<br />
| VivoBook F510UA || 2018-07-01 || {{Yes}} || {{Yes}} || {{-}} || {{Yes}} || {{Yes}} || {{Y|Untested}} || || UEFI secure boot key rejected, had to disable in BIOS.<br />
|-<br />
| VivoBook 14 X442UA-GA139T || 2018-05-01 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Y|Untested}} || {{Y|Untested}} || || UEFI secure boot does not pass, might need work.<br />
|-<br />
| VivoBook S301LA || 2016-09-01 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{ic|1=acpi_osi=}} needed for hotkeys and backlight control. For package power states lower than PC3, see Remarks. || || To reach PC7, {{Pkg|r8168}} has to be built without certain build options. An easy way to do this is to build {{AUR|r8168-dkms}} after modifying its {{ic|dkms.conf}} by removing {{ic|1=EXTRA_CFLAGS='-DCONFIG_R8168_NAPI -DCONFIG_R8168_VLAN'}}<br />
|-<br />
| VivoBook X512DA || 2019-03-15 || {{Yes}} || {{Yes}} || {{-}} || {{Yes}} || {{Yes}} || {{Yes}} || See [[#Function key behavior]] || Fan spins unusually fast when started plugged in.<br />
|-<br />
| [[ASUS X421IA|Vivobook S14 M433 (X421IA)]] || 2020-07-31 || {{Yes}} || {{Yes}} || {{-}} || {{Yes}} || {{Yes}} || {{No}} || Fingerprint does not work. See [[#Function key behavior]] || See article for more details.<br />
|-<br />
| VivoBook X509DA_D509DA || 2021-06-21 || {{Yes}} || {{Yes}} || {{-}} || {{Yes}} || {{Y|Untested}} || {{R|Bad battery life<br/>fan always spins}} || Sometimes the touchpad is not recognized, to fix run {{bc|1=# rmmod i2c-hid-acpi}} and {{bc|1=# modprobe i2c-hid-acpi}} || Needed an external wifi/ethernet adapter (via USB) during archiso (for access to internet), screen brightness is set to lowest when you plug/unplug your power for the first time after boot (now fixed, i think by adding the {{ic|1=amdgpu}} module in {{ic|1=/etc/mkinitcpio.conf}})<br />
|-<br />
| VivoBook Pro 14 (M3400) || 2021-04-29 || {{Yes}} || {{Yes}} || {{-}} || {{Yes}} || {{Yes}} || {{Yes}} || A few keys were strangely mapped (e.g. Screenshot key {{ic|Fn+F11}} mapped to {{ic|Super+S}}). || Recovering from DPMS brightness reset to default can be solved by replacing {{ic|1=acpi_video0}} with {{ic|1=amdgpu_bl0}}. <br />
|-<br />
| Vivobook X450LCP || 2019-11-01 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{No}} || {{Yes}} || Touchpad works better with deprecated {{Pkg|xf86-input-libinput}} driver || Apparently there is no way to control manually the fan. Every time the fan just stops spinning, needing suspending/reboot to fix.<br />
|}<br />
<br />
==== Function key behavior ====<br />
<br />
The Function keys default behavior is {{ic|F1}},{{ic|F2}},etc… and must be unset by using {{ic|Fn+Esc}} to use alternative functions.<br />
<br />
=== Gaming ===<br />
<br />
{{Laptops table header}}<br />
| GL552VM-DM-802D || 2017-02-01 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Y|Untested}} || {{Y|Untested}} || || Needs {{ic|1=acpi_backlight=native}} to have {{ic|Fn}} keys backlight control, {{ic|1=idle=nomwait}} and {{ic|1=acpi_osi=! acpi_osi='Windows 2009'}} to boot. <br />
|-<br />
| G502VM-FY017T || 2017-02-01 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || The screen adjustment need a little workaround || <br />
|-<br />
| FX502VM || 2017-02-01 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Y|Untested}} || {{Yes}} || Fn keys does not send ACPI events, except {{ic|F10}},{{ic|F11}},{{ic|F12}} (sound control) || <br />
|-<br />
| FX504GD || 2019-05-30 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || For Fan Speed Control see [[Fan speed control#Alternative method using EC registers]]. For touchpad five finger touch of death apply patch [https://lore.kernel.org/lkml/20190430083753.18197-1-kai.heng.feng@canonical.com/ pinctl-intel.c patch] ||<br />
|-<br />
| FX505DY || 2020-12-01 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || || See [[#Black screen after sleep]]<br />
|-<br />
| FX505DT || 2021-09-30 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || See [[#Battery charge threshold]]. Keyboard backlight settings can be controlled via {{AUR|tuf-manager}} || See [[#Black screen after sleep]]<br />
|-<br />
| [[ASUS G73SW|G73SW]] || 2011-08-19 || {{Yes}} || {{Yes}} || {{Yes}}|| {{Yes}} || {{Yes}} || {{Y|Untested}} || ||<br />
|-<br />
| G550JK || 2014-08-01 || {{Yes}} || {{Yes}} || {{Y|Untested}} || {{Yes}} || {{Y|Untested}} || {{Y|Untested}} || || [https://xps13-9333.appspot.com/#background_noise fix background noises while using headphones]<br />
|-<br />
| FX 533VE || 2018-02-01 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || || See [[#Nouveau prevents boot]].<br />
|-<br />
| FX 504GM || 2019-02-01 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || || Did not manage to use the HDMI output (in fact, it is possible, but...), issue posted on the forum. See [[#Nouveau prevents boot]].<br />
|-<br />
| FX 504GE || 2019-06-01 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || || See [[#Elan1200 touchpad]].<br />
|-<br />
| GL 503VD || 2019-02-01 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || || See [[#Elan1200 touchpad]].<br/>See [[#Nouveau prevents boot]].<br />
|-<br />
| FA506IV || 2022-02-02 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || Keyboard backlight works but needs [https://github.com/Ann1kaB/faustus faustus] with {{aur|openrgb}} (or {{aur|openrgb-bin}}) to change RGB. || If using [[EFISTUB]], cannot change the UEFI timeout using [[efibootmgr]].<br />
|}<br />
<br />
==== Republic of Gamers (ROG) ====<br />
<br />
{{Laptops table header}}<br />
| [[ASUS GL702ZC|ROG Strix GL702ZC]] || 2017-04-01 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{No}} || {{Y|Untested}} || Backlight keys are amdgpu, not xbacklight. Fancontrol is ACPI, there are some amdgpu fan control stuff on aur/github. ||<br />
|-<br />
| ROG Zephyrus M || 2019-11-01 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{R|Bad battery life:<br/>cannot power down NVIDIA GPU}} || No control over fans and keyboard backlight. Most of functional keys not working || The battery is the big disadvantage. On Windows it can last for up to 6h, however. This laptop is definitely not Linux friendly<br />
|-<br />
| [[ASUS GA401I|ROG Zephyrus G14 (GA401I)]] || 2021-05-12 || {{Yes}} || {{Yes}} || {{-}} || {{Yes}} || {{Yes}} || {{Yes}} || Some function keys and AniMe LED matrix work with kernel patches and {{AUR|asusctl-git}}. || <br />
|-<br />
| ROG Zephyrus G15 (GA502IU)|| 2020-07-08 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || Some custom keys do not work. Can control only one fan with {{ic|asus_nb_wmi}} module. || <br />
|-<br />
| ROG Zephyrus S15 (GX502LWS) || 2020-20-25 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Y|Sleep: Untested}} || Keyboard colors work using {{AUR|rogauracore-git}} || <br />
|-<br />
| ROG Flow X13 (GV301Q'''E''') || 2021-07-01 || rowspan="2" {{Yes}} || rowspan="2" {{Yes}} || rowspan="2" {{-}} || rowspan="2" {{Yes}} || rowspan="2" {{Yes}} || rowspan="2" {{Y|Untested}} || Both accelerometer sensor and lid-backflip are ''not'' detected (waiting for asus-wmi fix?). || rowspan="2" | Tablet integration is manual, because the lid-backflip sensor is missing.<br />
|-<br />
| ROG Flow X13 (GV301Q'''H''') || 2021-10-09 || Lid-backflip is ''not'' detected. Fingerprint sensor is detected when libfprint is fully upgraded, however it always fails to verify.<br />
|-<br />
| ROG Zephyrus GU501GM || 2021-11-24 || {{Yes}} || {{Yes}} || {{-}} || {{Yes}} || {{Yes}} || {{No}} || Fan curves cannot be changed though overboost modes work. RGB works with {{AUR|rogauracore-git}} and all keys work except the mute microphone button || HDMI output is hardwired to the Nvidia GPU. <br />
|-<br />
| [https://linux-hardware.org/?computer=9864b4c43688 ROG Strix G15 G513QY Advantage Edition] || 2022-01-16 || {{G|Yes<sup>*</sup>}} || {{Yes}} || {{Yes}} || {{Y|Partial: No AP (HotSpot) mode}} || {{Yes}} || {{Yes}} || Flashing lights during sleep could be disable with {{AUR|asusctl}}. Support for custom fan curves should land in kernel 5.17 || <br />
|-<br />
| [[ASUS_G533QS|ROG Strix Scar G15 G533QS]] || 2022-02-19 || {{Yes}} || {{Yes}} || {{Yes}} || {{Y|Partial: No AP (HotSpot) mode}} || {{Yes}} || {{Yes}} || ||<br />
|-<br />
| ROG Strix G15 G513 (G513QR) || 2022-02-21 || {{Yes}} || Internal mic is very noisy (almost useless). Headset mic requires workaround: [[Install]] {{Pkg|alsa-tools}}, run ''hdajackretask'', select Realtek ALC825 from menu and override pin {{ic|0x19}} with "Microphone". || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || Sometimes the WiFi card is not recognized after rebooting. The keys for changing profile and muting the mic require workaround (see fix for [https://asus-linux.org/faq/#fn-f5-doesn-t-do-anything profile] and [https://asus-linux.org/faq/#mic-mute-doesn-t-work mic-mute]. || Secure boot disabled. Followed [https://asus-linux.org/wiki/arch-guide/ asusctl guide] but did not try {{AUR|supergfxctl}} nor the {{AUR|linux-g14}} kernel (from g14 repo). <br />
|}<br />
<br />
===== Asusctl =====<br />
<br />
{{Move|asusctl|See [[ASUS GA401I#ASUSCtl]], all the content regarding {{AUR|asusctl}} deserves a dedicated page.}}<br />
<br />
{{aur|asusctl}} (or {{aur|asusctl-git}}) implements functionality specific to the ROG line of laptops, such as backlit keyboards, fan profiles, and the AniMe LED matrix. Check the project's official site for usage: https://asus-linux.org/<br />
<br />
===== Black screen after sleep =====<br />
<br />
Add {{ic|1=amd_iommu=off idle=nomwait amdgpu.gpu_recovery=1}} to your [[kernel command line]]. <br />
<br />
===== Nouveau prevents boot =====<br />
<br />
Boot with nouveau disabled: use {{ic|1=nouveau.modset=0}} on the [[kernel command line]]. <br />
Need to edit bumblebee service to boot : https://github.com/Bumblebee-Project/Bumblebee/issues/764#issuecomment-450749984.<br />
<br />
===== Elan1200 touchpad =====<br />
<br />
Some fixes are needed: see https://bugzilla.redhat.com/show_bug.cgi?id=1543769.<br />
<br />
=== ZenBook ===<br />
<br />
{{Laptops table header}}<br />
| [[ASUS Zenbook UX305|UX305FA]] || 2016-10-01 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || Function keys for brightness (F5/F6) do not send ACPI events ||<br />
|-<br />
| [[ASUS Zenbook UX303|UX303LN]] || 2014-10-01 || {{Yes}} || {{Yes}} || {{-}} || {{Yes}} || {{Y|Untested}} || {{Y|Untested}} || Touchpad misses gestures, Touchscreen misses multi-touch support || Avoid some power management features due to Kernel Bug 102091.<br />
|-<br />
| UX32L(N) || 2015-08-29 || {{Yes}} || {{Yes}} || {{-}} || {{Yes}} || {{Yes}} || {{Yes}} || Set the kernel parameters {{ic|1=video.use_native_backlight=1 acpi_osi=}} for working backlight keys and backlight restore. || Avoid activating some power management features due to Kernel Bug 102091.<br />
|-<br />
| [[UX430UA]] || 2017-06-01 || {{Yes}} || {{Yes}} || {{-}} || {{Yes}} || {{Yes}} || {{Yes}} || rowspan="3" | PWM Fan control is not available || rowspan="3" | See dedicated page. <br />
|-<br />
| [[ASUS_Zenbook_UX390|UX390UA]] || 2018-05-01 || {{Yes}} || {{Yes}} || {{-}} || {{Yes}} || {{Yes}} || {{Yes}} <br />
|-<br />
| [[ASUS_Zenbook_UX534|UX534FTC]] || 2020-04-09 || {{Yes}} || {{Yes}} || {{-}} || {{Yes}} || {{Yes}} || {{Yes}}<br />
|}<br />
<br />
=== ExpertBook ===<br />
<br />
{{Laptops table header}}<br />
| [[ASUS B9450|B9450]] || 2020-04-20 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || || <br />
|-<br />
| [[ASUS B9450CEA|B9450CEA]] || 2021-03-14 || {{Yes}} || {{G|[[Advanced Linux Sound Architecture#ALSA firmware|Yes*]]}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || || <br />
|-<br />
| BR1100FKA || 2021-05-28 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Y|Untested: Webcam<br/>Microphone<br/>Touchpad<br/>Stylus}} || Integrated eMMC memory can't be formatted to linux compatible filesystems; you will need to install an NVME SSD. <br />
|}<br />
<br />
=== Other ===<br />
<br />
{{Laptops table header}}<br />
| W7S || 2007-08-01 (Arch Linux 0.9 Don't Panic) || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || Webcam: {{AUR|stk11xx-svn}} || <br />
|-<br />
| F5R || 2008-01-16 || {{Yes}} || {{Yes}} || {{Yes}} || {{G|[[Broadcom wireless|Yes]]}} || {{Yes}} || {{Y|Untested}} || colspan=2 | ACPI works with acpi4asus and acpid<br />
|-<br />
| M51SN || 2008-12-17 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Y|Untested}} || colspan=2 | Add {{ic|1=snd-hda-intel model=lenovo}} to {{ic|/etc/modprobe.d/modprobe.conf}}<br />
|-<br />
| N80Vn-X5 || 2009-02 (Arch Linux 2009.02RC2) || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Y|Untested}} || colspan=2 | Add {{ic|1=options snd-hda-intel enable=1 model=g50v position_fix=0}} to {{ic|/etc/modprobe.d/modprobe.conf}}<br />
|-<br />
| F8SN || 2009-08 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Y|Untested}} || {{Y|Untested}} || ||<br />
|-<br />
| L3000D || 2010-02-13 || {{Yes}} || {{Yes}} || {{Yes}} || {{-}} || {{-}} || {{Yes}} || ||<br />
|-<br />
| N53JN || 2010-11-03 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Y|Untested}} || {{G|Hibernate: Untested}} || colspan=2 | suspend works but with problems due to USB3 controller<br />
|-<br />
| N53SV || 2011-06-26 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Y|Untested}} || {{Yes|https://bbs.archlinux.org/viewtopic.php?pid=910195 BBS thread}} || colspan=2 | See also [https://help.ubuntu.com/community/Asus_N53 Ubuntu help]<br />
|-<br />
| A8Le || 2011-07-31 || {{Yes}} || {{Yes}} || {{Yes}} || {{Y|Untested}} || {{Y|Untested}} || || ||<br />
|-<br />
| [[ASUS UL30A|UL30A]] || 2011-08-19 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Y|Untested}} || {{Y|Untested}} || {{Y|Card reader: Untested}} || Needs {{ic|1=acpi_backlight=vendor}}<br />
|-<br />
| K55VM || 2013-04-01 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Y|Untested}} || {{Yes}} || ||<br />
|-<br />
| [[ASUS A55VJ|A55VJ]] || 2013-05-01 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || colspan=2 | Use {{ic|1=i8042.nomux=1}} to prevent jittery touchpad.<br />
|-<br />
| X401A/X401A1 || 2013-05-01 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Y|Untested}} || brightness control needs {{ic|asus-nb-wmi}} and {{ic|1=acpi_backlight=intel acpi_osi=}} || || <br />
|-<br />
| [[X502CA]] || 2013-07-01 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Y|Untested}} || {{Yes}} || || Poor Wi-Fi performance<br />
|-<br />
| S300CA || 2013-08-01 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Y|Untested}} || {{Yes}} || {{Y|Untested:<br/>USB3<br/>Card reader}} || Use {{ic|1=acpi_osi=Linux acpi_backlight=vendor}}<br />
|-<br />
| Q400A || 2013-10-17 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{G|Hibernate: Untested}} || {{Y|HDMI output: Untested}} ||<br />
|-<br />
| X401U || 2014-01-05 || {{Yes}} || {{Yes}} || {{Y|Untested}} || {{Yes}} || {{-}} || {{Yes}} || ||<br />
|-<br />
| K55N || 2014-11-12 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{-}} || Overheats and immediately shuts down on modern 3D games. Use thermald to control temp using acpi_cpufreq || colspan=2 | Fix fn brightness keys with {{ic|1=acpi_osi="!Windows 2012" video.use_native_backlight=1}}. Do not enable early radeon hook to prevent blank screen after hibernation. Fix blank screen on suspend to ram with {{ic|1=sysctl -w kernel.acpi_video_flags=3}}.<br />
|-<br />
| 1015E || 2014-05-19 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Y|Untested}} || {{Yes}} || {{Y|USB3: Untested}} ||<br />
|-<br />
| X53BR/K53BR || 2014-03-30 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{-}} || {{Yes}} || || heats up very fast<br />
|-<br />
| X551CA || 2014-03-24 || {{Yes}} || {{Yes}} || {{Y|Untested}} || {{Yes}} || {{Y|Untested}} || {{Y|Untested}} || colspan=2 | Disabling WiFi blocks the card, {{ic|Fn+F2}} does not work. Workaround on [https://ubuntuforums.org/showthread.php?t=2181558 Ubuntu forum.]<br />
|-<br />
| [[N550JV]] || 2014-03-01 || {{Yes}} || {{G|Yes<sup>*</sup>}} || {{Yes}} || {{Yes}} || {{Y|Untested}} || {{G|Yes<sup>**</sup>}} || colspan=2 | <sup>*</sup>external speakers pop on sleep/shutdown<br/><sup>**</sup>battery issues when a powered device is left plugged into the USB charging port.<br />
|-<br />
| X83VB-X2 || 2014-09-01 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Y|Untested}} || {{Y|Untested}} || {{Y|Camera: Untested}} ||<br />
|-<br />
| Q500A || 2015-02-01 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Y|Untested}} || || || <br />
|-<br />
| S400CA || 2015-02-01 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Y|Untested}} || {{Yes}} || {{Y|Untested:<br/>USB3}} || Use {{ic|1=acpi_osi=Linux acpi_backlight=vendor}}<br />
|-<br />
| U32U || 2015-02-01 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}}|| {{Yes}} || {{Y|Partial}} || Needs significant setup. Power management hard to get right. CPU Fan constantly on. || For [[rfkill]] issues {{ic|1=options asus_nb_wmi wapf=1}} may help<br />
|-<br />
| [[ASUS X553MA|X553MA]] || 2015-06-01 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{No}} || {{Yes}} || colspan=2 | Set {{ic|OS Selection}} in BIOS setup to {{ic|Windows 7}}<br/>[[Broadcom_wireless#broadcom-wl|broadcom-wl]] (causes freezes)<br />
|-<br />
| F550J (aka A550J) || 2015-09-01 || {{Y|Partial}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Y|Untested}} || {{Y|Untested}} || {{Pkg|xf86-input-synaptics}} recommended for touchpad || Recommend to disable standalone graphic card<br />
|-<br />
| [[ASUS N550JX|N550JX]] || 2015-12-01 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || || Read dedicated page. <br />
|-<br />
| [[ASUS X552M|X552M]] || 2015-12-01 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Y|Untested}} || {{Yes}} || Use {{ic|1=acpi_osi= acpi_backlight=native}} for changing backlight with {{ic|Fn+F5}}/{{ic|Fn+F6}} || Read dedicated page. <br />
|-<br />
| [[ASUS E403SA|E403SA]] || 2016-06-01 || {{Yes}} || {{Yes}} || {{-}} || {{Yes}} || {{Y|Untested}} || {{Yes}} || colspan=2 | Card reader not tested. ACPI/Function keys and lid switch do not work and will not show up on acpi_listen; except for mute, volup, voldown. With acpi="!Windows 2012" all ACPI functions work perfectly but the touchpad gets disabled.<br />
|-<br />
| F555UA || 2016-08-14 || {{Yes}} || {{Yes}} || {{Yes}} || {{No}} || {{No}} || {{Yes}} || No two finger scroll, very buggy touchpad || Add {{ic|1=options snd-hda-intel model=laptop-dmic position_fix=3 ac97_quirck=alc_jack}} to {{ic|/etc/modprobe.d/alsa-base.conf}} to get mic and headphone/mic to work<br />
|-<br />
| K501J || 2016-09-01 || {{Yes}} || {{Yes}} || {{Y|Untested}} || {{Yes}} || {{-}} || {{Yes}} || colspan=2 | Touchpad works with {{Pkg|xf86-input-libinput}}, but somewhat uncomfortable. Better with {{Pkg|xf86-input-synaptics}} even if deprecated.<br />
|-<br />
| K501LX || 2017-01-01 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{R|Keyboard backlight controls}} || Added {{ic|1=pcie_port_pm=off}} to kernel parameters to make {{Pkg|bbswitch}} work correctly.<br />
|-<br />
| R540SA || 2017-03-01 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || ||<br />
|-<br />
| [[N551VW]] || 2017-06-01 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Y|Untested}} || ||<br />
|-<br />
| N76V || 2019-01-05 || {{Yes}} || {{Yes}} || {{Y|Untested}} || {{Yes}} || {{Y|Untested}} || {{Y|Untested}} || ||<br />
|-<br />
| [[ASUS X451MA|X451MA]] || 2021-02-12 || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Y|Untested}} || {{Y|Untested}} || ||<br />
|-<br />
| [[ASUS K55VD|K55VD]] || 2021-11-27 || {{Y|Partial<sup>*</sup>}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || colspan=2 | <sup>*</sup>{{AUR|nvidia-390xx-dkms}} fails with both {{pkg|linux}} and {{pkg|linux-lts}}<br />
|}</div>GloriousYellowhttps://wiki.archlinux.org/index.php?title=Trusted_Platform_Module&diff=724905Trusted Platform Module2022-03-31T18:24:42Z<p>GloriousYellow: /* Accessing PCR registers */ Add more specific information about PCR7</p>
<hr />
<div>[[Category:Security]]<br />
[[Category:Hardware]]<br />
[[ja:Trusted Platform Module]]<br />
{{Related articles start}}<br />
{{Related|Rng-tools}}<br />
{{Related|Self-Encrypting Drives}}<br />
{{Related|Smartcards}}<br />
{{Related articles end}}<br />
{{Expansion|Needs clarification about usage difference between TPM 1.2 and 2.0, Evil Maid attack defense and Trusted boot. PCR registers sealing and using in combination with LUKS.}}<br />
<br />
[[wikipedia:Trusted Platform Module|Trusted Platform Module]] (TPM) is an international standard for a secure cryptoprocessor, which is a dedicated microprocessor designed to secure hardware by integrating cryptographic keys into devices.<br />
<br />
In practice a TPM can be used for various different security applications such as [[Secure Boot|secure boot]], key storage and [[random number generation]].<br />
<br />
TPM is naturally supported only on devices that have TPM hardware support. If your hardware has TPM support but it is not showing up, it might need to be enabled in the BIOS settings.<br />
<br />
== Versions ==<br />
<br />
There are two very different TPM specifications: 1.2 and 2.0, which also use different software stacks.<br />
<br />
* TPM 1.2 uses the "TrouSerS" TSS (TCG software stack) by IBM, which is packaged as {{AUR|trousers}} (''tcsd'') and {{AUR|tpm-tools}} (userspace). All software access the TPM through the ''tcsd'' daemon.<br />
* TPM 2.0 allows direct access via {{ic|/dev/tpm0}} (one client at a time), managed access through the {{Pkg|tpm2-abrmd}} resource manager daemon, or kernel-managed access via {{ic|/dev/tpmrm0}}. There are two choices of userspace tools, {{Pkg|tpm2-tools}} by Intel and {{AUR|ibm-tss}} by IBM.<br />
<br />
TPM 2.0 requires [[UEFI]] boot; BIOS or Legacy boot systems can only use TPM 1.2.<br />
<br />
Some TPM chips can be switched between 1.2 and 2.0 through a firmware upgrade (which can be done only a limited number of times).<br />
<br />
== Using TPM 1.2 ==<br />
<br />
=== Drivers ===<br />
<br />
TPM drivers are natively supported in modern kernels, but might need to be loaded:<br />
<br />
# modprobe tpm<br />
<br />
Depending on your chipset, you might also need to load one of the following:<br />
<br />
# modprobe -a tpm_{atmel,infineon,nsc,tis,crb}<br />
<br />
=== Usage ===<br />
<br />
TPM 1.2 is managed by {{ic|tcsd}}, a userspace daemon that manages Trusted Computing resources and should be (according to the TSS spec) the only portal to the TPM device driver. {{ic|tcsd}} is part of the {{AUR|trousers}} package, which was created and released by IBM, and can be configured via {{ic|/etc/tcsd.conf}}.<br />
<br />
To start tcsd and watch the output, run:<br />
<br />
# tcsd -f<br />
<br />
or simply [[start]] and [[enable]] {{ic|tcsd.service}}.<br />
<br />
Once {{ic|tcsd}} is running you might also want to install {{AUR|tpm-tools}} which provides many of the command line tools for managing the TPM.<br />
<br />
Some other tools of interest:<br />
<br />
* {{App|tpmmanager|A Qt front-end to tpm-tools|https://github.com/Rohde-Schwarz/TPMManager|{{AUR|tpmmanager}}}}<br />
* {{App|opencryptoki|A PKCS#11 implementation for Linux. It includes drivers and libraries to enable IBM cryptographic hardware as well as a software token for testing.|https://sourceforge.net/projects/opencryptoki|{{AUR|opencryptoki}}}}<br />
<br />
=== Basics ===<br />
<br />
Start off by getting basic version info:<br />
<br />
$ tpm_version<br />
<br />
and running a selftest:<br />
<br />
{{hc|$ tpm_selftest -l info|<br />
TPM Test Results: 00000000 ...<br />
tpm_selftest succeeded<br />
}}<br />
<br />
=== Securing SSH keys ===<br />
<br />
There are several methods to use TPM to secure keys, but here we show a simple method based on {{AUR|simple-tpm-pk11-git}}.<br />
<br />
First, create a new directory and generate the key:<br />
<br />
$ mkdir ~/.simple-tpm-pk11<br />
$ stpm-keygen -o ~/.simple-tpm-pk11/my.key<br />
<br />
Point the configuration to the key:<br />
<br />
{{hc|~/.simple-tpm-pk11/config|<br />
key my.key<br />
}}<br />
<br />
Now configure SSH to use the right PKCS11 provider:<br />
<br />
{{hc|~/.ssh/config|<br />
Host *<br />
PKCS11Provider /usr/lib/libsimple-tpm-pk11.so<br />
}}<br />
<br />
It is now possible to generate keys with the PKCS11 provider:<br />
<br />
$ ssh-keygen -D /usr/lib/libsimple-tpm-pk11.so<br />
<br />
{{Note|This method currently does not allow for multiple keys to be generated and used.}}<br />
<br />
=== Accessing PCR registers ===<br />
<br />
Platform Configuration Registers (PCR) contain hashes that can be read at any time but can only be written via the extend operation, which depends on the previous hash value, thus making a sort of blockchain. They are intended to be used for platform hardware and software integrity checking between boots (e.g. protection against [[Wikipedia:en:Evil Maid attack|Evil Maid attack]]). They can be used to unlock encryption keys and proving that the correct OS was booted.<br />
<br />
The [https://trustedcomputinggroup.org/resource/pc-client-specific-platform-firmware-profile-specification/ TCG PC Client Specific Platform Firmware Profile Specification] defines the registers in use:<br />
<br />
{| class="wikitable"<br />
|-<br />
! scope="col"| PCR<br />
! scope="col"| Use<br />
! scope="col"| Notes<br />
|-<br />
|PCR0<br />
|Core System Firmware executable code (aka Firmware)<br />
|May change if you upgrade your UEFI<br />
|-<br />
|PCR1<br />
|Core System Firmware data (aka UEFI settings)<br />
|<br />
|-<br />
|PCR2<br />
|Extended or pluggable executable code<br />
|<br />
|-<br />
|PCR3<br />
|Extended or pluggable firmware data<br />
|Set during Boot Device Select UEFI boot phase<br />
|-<br />
|PCR4<br />
|Boot Manager Code and Boot Attempts<br />
|Measures the boot manager and the devices that the firmware tried to boot from<br />
|-<br />
|PCR5<br />
|Boot Manager Configuration and Data <br />
|Can measure configuration of boot loaders; includes the GPT Partition Table<br />
|-<br />
|PCR6<br />
|Resume from S4 and S5 Power State Events<br />
|<br />
|-<br />
|PCR7<br />
|Secure Boot State<br />
|Contains the full contents of PK/KEK/db, as well as the specific certificates used to validate each boot application[https://superuser.com/questions/1640985/how-to-enable-bitlocker-when-booting-windows-10-from-a-non-microsoft-boot-manage]<br />
|-<br />
|PCR8<br />
|Hash of the kernel command line<br />
|Supported by [https://lists.gnu.org/archive/html/grub-devel/2017-07/msg00003.html grub] and [https://github.com/systemd/systemd/pull/2587 systemd-boot]<br />
|-<br />
|PCR 9<br />
|Hash of the initrd<br />
|Scheduled for linux [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=f046fff8bc4c v5.17]<br />
|-<br />
|PCR10<br />
|Reserved for Future Use<br />
|<br />
|-<br />
|PCR11<br />
|BitLocker Access Control<br />
|<br />
|-<br />
|PCR12<br />
|Data events and highly volatile events<br />
|<br />
|-<br />
|PCR13<br />
|Boot Module Details<br />
|<br />
|-<br />
|PCR14<br />
|Boot Authorities<br />
|<br />
|-<br />
|PCR 15 to 23<br />
|Reserved for Future Use<br />
|<br />
|}<br />
<br />
Documentation from tianocore[https://github.com/tianocore-docs/edk2-TrustedBootChain/blob/main/4_Other_Trusted_Boot_Chains.md].<br />
<br />
{{Pkg|tpm2-totp}} facilitates this check with a human observer and dedicated trusted device.<br />
<br />
# cat /sys/kernel/security/tpm0/ascii_bios_measurements<br />
<br />
== Using TPM 2.0 ==<br />
<br />
{{Expansion|This section is a stub. You can help by expanding it with information on how to set up and use a TPM 2.0 device.}}<br />
<br />
Many informative resources to learn how to configure and make use of TPM 2.0 services in daily applications are available from the [https://tpm2-software.github.io/ tpm2-software community].<br />
<br />
=== Checking support ===<br />
<br />
A TPM 2.0 chip has been a requirement for computers certified to run Windows 10 since 2016-07-28.[https://www.computerworld.com/article/3101427/microsoft-mandates-windows-10-hardware-change-for-pc-security.html] Linux has support for TPM 2.0 since version 3.20[https://www.phoronix.com/scan.php?page=news_item&px=Linux-3.20-TPM-2.0-Security] and should not require any other steps to be enabled on a default Arch install.<br />
<br />
Two ways to verify whether TPM 2.0 is setup without specific software:<br />
<br />
* checking the logs, e.g., by running {{ic|1=journalctl -k --grep=tpm}} as root<br />
* read the value of {{ic|/sys/class/tpm/tpm0/device/description}}[https://github.com/tpm2-software/tpm2-tools/issues/604#issuecomment-342784674] or {{ic|/sys/class/tpm/tpm0/tpm_version_major}}<br />
<br />
=== Data-at-rest encryption with LUKS ===<br />
<br />
There are two methods for unlocking a LUKS volume using a TPM. An older method using {{Pkg|clevis}}, and a newer method using ''systemd-cryptenroll''. The newer method will be detailed first.<br />
<br />
Using either method, an encrypted volume or volumes may be unlocked using keys stored in a TPM, either automatically at boot or manually at a later time. Using a TPM for this purpose ensures that your drives will not unlock unless certain conditions are met, such as your firmware not having been modified and [[Secure Boot]] not having been disabled (see [[#Accessing PCR registers]]).<br />
<br />
{{Warning|If you use this method on your root volume, this means that, as long as the previously mentioned certain conditions are met, your computer will '''unlock automatically''' at boot without needing to enter an encryption password.<br />
* This means that access to data is not protected in case the hardware gets stolen.<br />
* Be aware that this method makes you more vulnerable to [[Wikipedia:Cold boot attack|cold boot attacks]], because even if your computer has been powered off for a long time (ensuring the memory is completely cleared), an attacker could simply turn it on and wait for the TPM to load the key automatically. This may be a concern for high-value targets.<br />
}}<br />
<br />
==== systemd-cryptenroll ====<br />
<br />
{{Expansion|This requires {{Pkg|tpm2-tss}}}}<br />
<br />
Since version 248, [[systemd]] has had native support for enrolling LUKS keys in TPMs. This functionality is managed through the ''systemd-cryptenroll'' util. This method requires the following:<br />
<br />
* A LUKS2 device (currently the default type used by [[Dm-crypt/Device_encryption#Encryption_options_with_dm-crypt|cryptsetup]]),<br />
* If you intend to use this method on your root partition, use of the {{ic|systemd}} and {{ic|sd-encrypt}} hooks in the initramfs. See [[Mkinitcpio#HOOKS]] and [[Dm-crypt/System_configuration#Using_sd-encrypt_hook|Using sd-encrypt hook]].<br />
<br />
To begin, run the following command to list your installed TPMs and the driver in use:<br />
<br />
$ systemd-cryptenroll --tpm2-device=list<br />
<br />
A key may be enrolled in both the TPM and the LUKS volume using only one command. The following example binds the key to PCRs 0 and 7 (the system firmware and [[Secure Boot]] state):<br />
<br />
# systemd-cryptenroll --tpm2-device=''/path/to/tpm2_device'' --tpm2-pcrs=0+7 /dev/sdX<br />
<br />
where {{ic|/dev/sdX}} is the full path to the encrypted LUKS volume and {{ic|''/path/to/tpm2_device''}} is the full path to the TPM as given in the output of the first command.<br />
<br />
{{Tip|If your computer has only one TPM installed, which is usually the case, you may instead specify {{ic|1=--tpm2-device=auto}} to automatically select the only available TPM.}}<br />
<br />
To test that the key works, run the following command while the LUKS volume is closed:<br />
<br />
# /usr/lib/systemd/systemd-cryptsetup attach ''mapping_name'' /dev/sdX - tpm2-device=''/path/to/tpm2_device''<br />
<br />
where {{ic|''mapping_name''}} is your chosen name for the volume once opened. If the volume successfully unlocks, you are ready to add the required information to the [[crypttab]] so that [[systemd]] can automatically unlock the device at boot.<br />
<br />
{{hc|/etc/crypttab|2=<br />
# Example crypttab file. Fields are: name, underlying device, passphrase, cryptsetup options.<br />
<br />
# Unlock /dev/sdX using the only available TPM, naming it myvolume<br />
myvolume /dev/sdX - tpm2-device=auto<br />
}}<br />
<br />
Alternatively, you can mention your TPM driver inside {{ic|MODULES()}} of {{ic|mkinitcpio.conf}}. <br />
<br />
{{Note|While you may specify the UUID of your LUKS volume in place of the pathname {{ic|/etc/crypttab}}, the ''systemd-cryptenroll'' command itself currently only supports pathnames.}}<br />
<br />
If the volume you wish to unlock contains your root filesystem, you must take the following additional steps:<br />
<br />
* Ensure you are using {{ic|systemd}} and {{ic|sd-encrypt}} in the {{ic|HOOKS}} array of {{ic|/etc/mkinitcpio.conf}}<br />
* Configure your initramfs to unlock the root volume with one of the following methods:<br />
** Specifying the root volume using the configuration outlined above in {{ic|/etc/crypttab.initramfs}} (see tip at the top of [[Dm-crypt/System_configuration#Using_sd-encrypt_hook|Using sd-encrypt hook]])<br />
** Setting {{ic|1=rd.luks.options=''XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX''=tpm2-device=auto}} in addition to {{ic|rd.luks.uuid}} or {{ic|rd.luks.name}} in the kernel command line<br />
<br />
To remove a key enrolled using this method, run:<br />
<br />
# systemd-cryptenroll /dev/sdX --wipe-slot=''slot_number''<br />
<br />
where {{ic|''slot_number''}} is the numeric LUKS slot number in which your TPM key is stored. <br />
<br />
Alternatively, run:<br />
<br />
# systemd-cryptenroll /dev/sdX --wipe-slot=tpm2<br />
<br />
to remove all TPM-associated keys from your LUKS volume.<br />
<br />
See {{man|1|systemd-cryptenroll}} and {{man|5|crypttab}} for more information and examples.<br />
<br />
==== Clevis ====<br />
<br />
{{Pkg|clevis}} allows binding a LUKS volume to a system by creating a key and encrypting it using the TPM, and sealing the key using PCR values which represent the system state at the time of the Clevis pin creation.<br />
<br />
{{Warning|Set a strong backup password in case the TPM unsealing fails, using:<br />
<br />
{{bc|# cryptsetup luksAddKey /dev/sdX}}<br />
}}<br />
<br />
To bind a LUKS volume to the TPM, use:<br />
<br />
# clevis luks bind -d /dev/sdX tpm2 '{}'<br />
<br />
where {{ic|'{}'|}} contains the configuration. Even with no parameters, the drive cannot be decrypted from another computer (unless the attacker knows the backup password).<br />
<br />
To seal the LUKS key against, for example, the UEFI settings and the [[Secure Boot]] policy, use:<br />
<br />
{{bc|'{"pcr_ids":"1,7"}'}}<br />
<br />
If the UEFI or Secure Boot settings are modified, the TPM will compute different PCR values and decryption will fail. This gives protection against [[wikipedia:Evil maid attack|evil maid attacks]]. <br />
<br />
For a list of parameters, see {{man|1|clevis-encrypt-tpm2|CONFIG}}.<br />
<br />
For a full explanation of the meanings of PCRs, see the [https://trustedcomputinggroup.org/wp-content/uploads/PC-ClientSpecific_Platform_Profile_for_TPM_2p0_Systems_v51.pdf TCG specification] (§ 2.3.4).<br />
<br />
To generate a new Clevis pin after changes in system configuration that result in different PCR values, for example updating the UEFI when PCR 0 is used, run<br />
<br />
{{hc|# cryptsetup luksDump /dev/sdX|output=<br />
Tokens:<br />
''token slot'': clevis<br />
Keyslot: ''keyslot''<br />
}}<br />
<br />
to find the slot used for the Clevis pin, then<br />
<br />
# clevis luks regen -d /dev/sdX -s ''keyslot''<br />
<br />
To remove the Clevis binding, run:<br />
<br />
# clevis luks unbind -d /dev/sdX -s ''keyslot'' <br />
<br />
{{Warning|Double check you have chosen the right slot, or you might lose access to your volume.}}<br />
<br />
You can unlock a TPM-bound volume using:<br />
<br />
# clevis luks unlock -d /dev/sdX<br />
<br />
For automated decryption of volumes in [[Dm-crypt/System_configuration#crypttab|/etc/crypttab]], [[enable]] {{ic|clevis-luks-askpass.path}}.<br />
<br />
For automated decryption of the root volume, use [[Booster]], [[Dracut]] or [https://github.com/kishorv06/arch-mkinitcpio-clevis-hook mkinitcpio-clevis-hook]. Booster automatically decrypts LUKS volumes bound using Clevis out of the box. Dracut and mkinitcpio-clevis-hook needs the following extra packages:<br />
<br />
* {{Pkg|libpwquality}}<br />
* {{Pkg|luksmeta}}<br />
* {{Pkg|nmap}} (For Dracut)<br />
* {{Pkg|tpm2-tools}} (For mkinitcpio-clevis-hook)<br />
<br />
followed by an initramfs regeneration:<br />
<br />
Dracut:<br />
# dracut -f<br />
<br />
mkinitcpio-clevis-hook:<br />
# mkinitcpio -P<br />
<br />
=== Other good examples of TPM 2.0 usage ===<br />
<br />
* SSH: {{Pkg|tpm2-pkcs11}}'s [https://github.com/tpm2-software/tpm2-pkcs11/blob/master/docs/SSH.md SSH configuration] and [https://incenp.org/notes/2020/tpm-based-ssh-key.html Using a TPM for SSH authentication] (2020-01)<br />
* [https://threat.tevora.com/secure-boot-tpm-2/ Configuring Secure Boot + TPM 2] (2018-06, Debian)<br />
* [https://www.youtube.com/watch?v=XwaSyHJIos8 Using the TPM - It's Not Rocket Science (Anymore)] - Johannes Holland & Peter Huewe (2020-11, Youtube): examples for OpenSSL with {{Pkg|tpm2-tss-engine}}<br />
<br />
== Troubleshooting ==<br />
<br />
=== tcsd.service failed to start ===<br />
<br />
After installing {{AUR|trousers}}, the {{ic|tcsd.service}} service may not start correctly due to permission issues.[https://bugs.launchpad.net/ubuntu/+source/trousers/+bug/963587/comments/3] It is possible to fix this either by rebooting or by triggering the [[udev]] rule that is included in the {{AUR|trousers}} package:<br />
<br />
# udevadm control --reload-rules<br />
# udevadm trigger<br />
<br />
== See also ==<br />
<br />
* [https://lwn.net/Articles/674751/ Protecting systems with the TPM]<br />
* [https://www.thinkwiki.org/wiki/Embedded_Security_Subsystem Embedded Security Subsystem on Thinkwiki]<br />
* [https://www.cs.unh.edu/~it666/reading_list/Hardware/tpm_fundamentals.pdf TPM Fundamentals (PDF)]<br />
* [https://www.lorier.net/docs/tpm Using a TPM]</div>GloriousYellowhttps://wiki.archlinux.org/index.php?title=Chromium&diff=703619Chromium2021-11-27T05:25:10Z<p>GloriousYellow: clarify xwayland workaround</p>
<hr />
<div>[[Category:Web browser]]<br />
[[Category:Google]]<br />
[[de:Chromium]]<br />
[[es:Chromium]]<br />
[[ja:Chromium]]<br />
[[zh-hans:Chromium]]<br />
{{Related articles start}}<br />
{{Related|Browser extensions}}<br />
{{Related|Firefox}}<br />
{{Related|Opera}}<br />
{{Related articles end}}<br />
<br />
[[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.<br />
<br />
See [https://chromium.googlesource.com/chromium/src/+/master/docs/chromium_browser_vs_google_chrome.md this page] for an explanation of the differences between Chromium and Google Chrome. Additionally:<br />
<br />
* Sync is unavailable in Chromium 89+ (2021-03-02) [https://archlinux.org/news/chromium-losing-sync-support-in-early-march/]<br />
<br />
{{Note|Sync can be temporarily restored by [https://gist.github.com/foutrelis/14e339596b89813aa9c37fd1b4e5d9d5 using Chrome's OAuth2 credentials] or [https://www.chromium.org/developers/how-tos/api-keys getting your own], but pay attention to the disclaimers and do not consider this to be a long-term solution.<br />
Consider switching to [https://xbrowsersync.org xbrowsersync] for bookmarks syncing as long term solution.<br />
}}<br />
<br />
See [[List of applications/Internet#Blink-based]] for other browsers based on Chromium.<br />
<br />
== Installation ==<br />
<br />
There are several packages available to [[install]] Chromium with:<br />
<br />
* {{Pkg|chromium}} — stable release;<br />
* {{AUR|chromium-dev}} — development release;<br />
* {{AUR|chromium-snapshot-bin}} — nightly build.<br />
<br />
Google Chrome packages:<br />
<br />
* {{AUR|google-chrome}} — stable release;<br />
* {{AUR|google-chrome-beta}} — beta release;<br />
* {{AUR|google-chrome-dev}} — development release.<br />
<br />
{{Note|From the [https://www.chromium.org/Home/chromium-privacy Chromium privacy page]: "Features that communicate with Google made available through the compilation of code in Chromium are subject to the [https://www.google.com/policies/privacy/ Google Privacy Policy]." For those who want to avoid all integration with Google services, there are some [[List of applications/Internet#Privacy-focused chromium spin-offs|privacy-focused spin-offs]].}}<br />
<br />
== Configuration ==<br />
<br />
=== Default applications ===<br />
<br />
To set Chromium as the default browser and to change which applications Chromium launches when opening downloaded files, see [[default applications]].<br />
<br />
=== Certificates ===<br />
<br />
Chromium uses [[Network Security Services]] for certificate management. Certificates can be managed in {{ic|chrome://settings/certificates}}.<br />
<br />
=== Making flags persistent ===<br />
<br />
{{Note|The {{ic|chromium-flags.conf}} file and the accompanying custom launcher script are specific to the Arch Linux {{Pkg|chromium}} package. For {{AUR|google-chrome}} and {{AUR|google-chrome-dev}}, use {{ic|chrome-flags.conf}} and {{ic|chrome-dev-flags.conf}} instead.}}<br />
<br />
You can put your flags in a {{ic|chromium-flags.conf}} file under {{ic|$HOME/.config/}} (or under {{ic|$XDG_CONFIG_HOME}} if you have configured that environment variable).<br />
<br />
No special syntax is used; flags are defined as if they were written in a terminal.<br />
<br />
* The arguments are split on whitespace and shell quoting rules apply, but no further parsing is performed.<br />
* In case of improper quoting anywhere in the file, a fatal error is raised.<br />
* Flags can be placed in separate lines for readability, but this is not required.<br />
* Lines starting with a hash symbol (#) are skipped. (This is only supported by the {{Pkg|chromium}} launcher script and will not work when using {{ic|chrome-flags.conf}} with the {{AUR|google-chrome}} package.)<br />
<br />
Below is an example {{ic|chromium-flags.conf}} file that defines the flags {{ic|--start-maximized --incognito}}:<br />
<br />
{{hc|~/.config/chromium-flags.conf|<br />
# This line will be ignored.<br />
--start-maximized<br />
--incognito<br />
}}<br />
<br />
=== Force GPU acceleration ===<br />
<br />
{{Warning|Disabling the rendering blacklist may cause unstable behavior, including crashes of the host. See the bug reports in {{ic|chrome://gpu}} for details.}}<br />
<br />
By default Chromium on Linux does not use any GPU acceleration. To force GPU acceleration, [[append]] the following flags to [[/Tips and tricks#Making flags persistent|persistent configuration]]:<br />
<br />
{{hc|~/.config/chromium-flags.conf|<br />
--ignore-gpu-blocklist<br />
--enable-gpu-rasterization<br />
--enable-zero-copy<br />
}}<br />
<br />
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.<br />
<br />
{{Out of date|A fix has been merged into mesa as of May 2021. [https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10850]}}<br />
<br />
{{ic|--enable-native-gpu-memory-buffers}} is broken since mesa 20.1.1 [https://gitlab.freedesktop.org/mesa/mesa/-/issues/3119#note_533902]<br />
<br />
=== Hardware video acceleration ===<br />
<br />
{{Note|1=<nowiki/><br />
* There is no official support from Chromium or Arch Linux for this feature [https://chromium.googlesource.com/chromium/src/+/master/docs/gpu/vaapi.md#vaapi-on-linux]. However, {{Pkg|chromium}} from official repositories is compiled with VA-API support and you may ask for help in [https://bbs.archlinux.org/viewtopic.php?id=244031 the dedicated forum thread].<br />
* Wayland is not supported.<br />
}}<br />
<br />
To enable VA-API support in Chromium:<br />
<br />
* Install the correct VA-API driver for your video card and verify VA-API has been enabled and working correctly, see [[Hardware video acceleration]]. For proprietary NVIDIA support, installing {{AUR|libva-vdpau-driver-chromium}} or {{AUR|libva-vdpau-driver-vp9-git}} is required.<br />
* Set the option {{ic|1=--enable-features=VaapiVideoDecoder}}. This is enough when using ANGLE GL renderer and {{Pkg|libva-intel-driver}}.<br />
* When using ANGLE, Chromium forces the older i965 driver and fails when {{Pkg|intel-media-driver}} is used. As a workaround, [[Hardware video acceleration#Configuring VA-API|configure VA-API manually]]. See [https://github.com/intel/media-driver/issues/818] for details.<br />
* To use the system GL renderer on Xorg, use either {{ic|1=--use-gl=egl}} or {{ic|1=--use-gl=desktop}}. On XWayland, use the {{ic|1=--use-gl=egl}} flag (Currently exhibits choppiness {{Bug|67035}} on some systems).<br />
<br />
==== Tips and tricks ====<br />
<br />
To check if it's working play a video which is using a codec supported by your VA-API driver (''vainfo'' tells you which codecs are supported, but Chromium will only support VP9 and h264):<br />
<br />
* Open the DevTools by pressing {{ic|Ctrl+Shift+I}} or on the ''Inspect'' button of the context (right-click) menu<br />
* Add the Media inspection tab: ''Hamburger menu > More tools > Media''<br />
* In the newly opened Media tab, look at the hardware decoder state of the video decoder<br />
<br />
Test on a large enough video. Starting with version 86, Chromium on desktop [https://bugs.chromium.org/p/chromium/issues/detail?id=684792 will only accelerate videos larger than 720p].<br />
<br />
To reduce CPU usage while watching YouTube where VP8/VP9 hardware decoding is not available use the [https://chrome.google.com/webstore/detail/h264ify/aleakchihdccplidncghkekgioiakgal h264ify] or [https://chrome.google.com/webstore/detail/enhanced-h264ify/omkfmpieigblcllmkgbflkikinpkodlk enhanced-h264ify] extension.<br />
<br />
On some systems (especially on XWayland) you might need to [[#Force GPU acceleration]]. Only {{ic|--ignore-gpu-blocklist}} is enough for our purposes.<br />
<br />
{{Expansion|Provide a link to some bug report.}}<br />
<br />
You might need to disable the Skia renderer, as it is currently not compatible with video decode acceleration: {{ic|1=--disable-features=UseSkiaRenderer}}<br />
<br />
=== PDF viewer plugin ===<br />
<br />
Chromium and Google Chrome are bundled with the ''Chromium PDF Viewer'' plugin. If you do not want to use this plugin, check ''Open PDFs using a different application'' in {{ic|chrome://settings/content/pdfDocuments}}.<br />
<br />
=== Flash Player plugin ===<br />
<br />
Support for Flash Player was removed in Chromium 88.[https://www.chromium.org/flash-roadmap#TOC-Flash-Support-Removed-from-Chromium-Target:-Chrome-88---Jan-2021-]<br />
<br />
=== Running on XWayland ===<br />
<br />
If you are using NVIDIA's proprietary driver, running Chromium on XWayland may cause the GPU process to occasionally crash. To prevent the GPU process from crashing, add the following flags:<br />
<br />
--use-angle=vulkan --use-cmd-decoder=passthrough<br />
<br />
Note: This does not prevent all XWayland-related crashes.<br />
<br />
=== Native Wayland support ===<br />
<br />
Since version 87, native [[Wayland]] support in Chromium can be enabled with the following flags [https://bugs.chromium.org/p/chromium/issues/detail?id=1085700]:<br />
<br />
--enable-features=UseOzonePlatform --ozone-platform=wayland<br />
<br />
See [[#Making flags persistent]] for a permanent configuration.<br />
<br />
If you switch between X11 and Wayland often, you can edit the Exec line in desktop file to the following:<br />
if [ "$XDG_SESSION_TYPE" = "wayland" ]; then /usr/bin/chromium --enable-features=UseOzonePlatform --ozone-platform=wayland %U ; else /usr/bin/chromium %U ; fi<br />
This will apply wayland flags only when in wayland session, so you can use a single desktop entry which is working for both session types.<br />
<br />
== Tips and tricks ==<br />
<br />
The following tips and tricks should work for both Chromium and Chrome unless explicitly stated.<br />
<br />
=== Browsing experience ===<br />
<br />
==== chrome:// URLs ====<br />
<br />
A number of tweaks can be accessed via Chrome URLs. See '''chrome://chrome-urls''' for a complete list.<br />
<br />
* '''chrome://flags''' - access experimental features such as WebGL and rendering webpages with GPU, etc.<br />
* '''chrome://extensions''' - view, enable and disable the currently used Chromium extensions.<br />
* '''chrome://gpu''' - status of different GPU options.<br />
* '''chrome://sandbox''' - indicate sandbox status.<br />
* '''chrome://version''' - display version and switches used to invoke the active {{ic|/usr/bin/chromium}}.<br />
<br />
An automatically updated, complete listing of Chromium switches (command line parameters) is available [https://peter.sh/experiments/chromium-command-line-switches/ here].<br />
<br />
==== Chromium task manager ====<br />
<br />
Shift+ESC can be used to bring up the browser task manager wherein memory, CPU, and network usage can be viewed.<br />
<br />
==== Chromium overrides/overwrites Preferences file ====<br />
<br />
If you enabled syncing with a Google Account, then Chromium will override any direct edits to the Preferences file found under {{ic|~/.config/chromium/Default/Preferences}}. To work around this, start Chromium with the {{ic|--disable-sync-preferences}} switch:<br />
$ chromium --disable-sync-preferences<br />
<br />
If Chromium is started in the background when you login in to your desktop environment, make sure the command your desktop environment uses is:<br />
$ chromium --disable-sync-preferences --no-startup-window<br />
<br />
==== Search engines ====<br />
<br />
Make sites like [https://wiki.archlinux.org wiki.archlinux.org] and [https://en.wikipedia.org wikipedia.org] easily searchable by first executing a search on those pages, then going to ''Settings > Search'' and click the ''Manage search engines..'' button. From there, "Edit" the Wikipedia entry and change its keyword to '''w''' (or some other shortcut you prefer). Now searching Wikipedia for "Arch Linux" from the address bar is done simply by entering "'''w arch linux'''".<br />
<br />
{{Note| Google search is used automatically when typing something into the URL bar. A hard-coded keyword trigger is also available using the '''?''' prefix.}}<br />
<br />
==== Tmpfs ====<br />
<br />
===== Cache in tmpfs =====<br />
<br />
{{Note|Chromium stores its cache separate from its browser profile directory.}}<br />
<br />
To limit Chromium from writing its cache to a physical disk, one can define an alternative location via the {{ic|--disk-cache-dir}} flag:<br />
$ chromium --disk-cache-dir="$XDG_RUNTIME_DIR/chromium-cache"<br />
<br />
Cache should be considered temporary and will '''not''' be saved after a reboot or hard lock. Another option is to setup the space in {{ic|/etc/fstab}}:<br />
<br />
{{hc|/etc/fstab|2=<br />
tmpfs /home/''username''/.cache tmpfs noatime,nodev,nosuid,size=400M 0 0<br />
}}<br />
<br />
===== Profile in tmpfs =====<br />
<br />
Relocate the browser profile to a [[Wikipedia:Tmpfs|tmpfs]] filesystem, including {{ic|/tmp}}, or {{ic|/dev/shm}} for improvements in application response as the entire profile is now stored in RAM.<br />
<br />
Use an active profile management tool such as {{Pkg|profile-sync-daemon}} for maximal reliability and ease of use. It symlinks or bind mounts and syncs the browser profile directories to RAM. For more, see [[Profile-sync-daemon]].<br />
<br />
==== Launch a new browser instance ====<br />
<br />
When you launch the browser, it first checks if another instance using the same data directory is already running. If there is one, the new window is associated with the old instance. If you want to launch an independent instance of the browser, you must specify separate directory using the {{ic|--user-data-dir}} parameter:<br />
<br />
$ chromium --user-data-dir=''/path/to/some/directory''<br />
<br />
{{Note|The default location of the user data is {{ic|~/.config/chromium/}}.}}<br />
<br />
==== Directly open *.torrent files and magnet links with a torrent client ====<br />
<br />
By default, Chromium downloads {{ic|*.torrent}} files directly and you need to click the notification from the bottom-left corner of the screen in order for the file to be opened with your default torrent client. This can be avoided with the following method:<br />
<br />
* Download a {{ic|*.torrent}} file.<br />
* Right-click the notification displayed at the bottom-left corner of the screen.<br />
* Check the "''Always Open Files of This Type''" checkbox.<br />
<br />
See [[xdg-open]] to change the default assocation.<br />
<br />
==== Touch Scrolling on touchscreen devices ====<br />
<br />
You may need to specify which touch device to use. Find your touchscreen device with {{ic| xinput list}} then launch Chromium with the {{ic|1=--touch-devices='''x'''}} parameter, where "'''x'''" is the id of your device. {{Note|If the device is designated as a slave pointer, using this may not work, use the master pointer's ID instead.}}<br />
<br />
==== Reduce memory usage ====<br />
<br />
By default, Chromium uses a separate OS process for each ''instance'' of a visited web site. [https://www.chromium.org/developers/design-documents/process-models#Supported_Models] However, you can specify command-line switches when starting Chromium to modify this behaviour.<br />
<br />
For example, to share one process for all instances of a website:<br />
<br />
$ chromium --process-per-site<br />
<br />
To use a single process model:<br />
<br />
$ chromium --single-process<br />
<br />
{{Warning|The single-process model is discouraged because it is unsafe and may contain bugs not present in other models.[https://www.chromium.org/developers/design-documents/process-models#TOC-Single-process]}}<br />
<br />
In addition, you can suspend or store inactive Tabs with extensions such as [https://chrome.google.com/webstore/detail/tab-suspender/fiabciakcmgepblmdkmemdbbkilneeeh?hl=en Tab Suspender] and [https://chrome.google.com/webstore/detail/onetab/chphlpgkkbolifaimnlloiipkdnihall?hl=en OneTab].<br />
<br />
==== User Agent ====<br />
<br />
The User Agent can be arbitrarily modified at the start of Chromium's base instance via its {{Ic|<nowiki>--user-agent="[string]"</nowiki>}} parameter.<br />
<br />
==== DOM Distiller ====<br />
<br />
Chromium has a similar reader mode to Firefox. In this case it's called DOM Distiller, which is an [https://github.com/chromium/dom-distiller open source project].<br />
It is disabled by default, but can be enabled using the {{Ic|chrome://flags/#enable-reader-mode}} flag, which you can also make [[#Making flags persistent|persistent]].<br />
Not only does DOM Distiller provide a better reading experience by distilling the content of the page, it also simplifies pages for print. Even though the latter checkbox option has been removed from the print dialog, you can still print the distilled page, which basically has the same effect.<br />
<br />
After enabling the flag, you will find a new "Toggle reader mode" menu item and corresponding icon in the address bar when Chromium thinks the website you are visiting could do with some distilling.<br />
<br />
==== Forcing specific GPU ====<br />
<br />
In multi-GPU systems, Chromium automatically detects which GPU should be used for rendering (discrete or integrated). This works 99% of the time, except when it does not - if a unavailable GPU is picked (for example, discrete graphics on VFIO GPU passthrough-enabled systems), {{ic|chrome://gpu}} will complain about not being able to initialize the GPU process. On the same page below '''Driver Information''' there will be multiple GPUs shown (GPU0, GPU1, ...). There is no way to switch between them in a user-friendly way, but you can read the device/vendor IDs present there and configure Chromium to use a specific GPU with flags:<br />
<br />
$ chromium --gpu-testing-vendor-id=0x8086 --gpu-testing-device-id=0x1912<br />
<br />
...where {{ic|0x8086}} and {{ic|0x1912}} is replaced by the IDs of the GPU you want to use (as shown on the {{ic|chrome://gpu}} page).<br />
<br />
==== Import bookmarks from Firefox ====<br />
<br />
To ease the transition, you can import bookmarks from [[Firefox]] into Chromium.<br />
<br />
Navigate Chromium to {{ic|chrome://settings/importData}}<br />
<br />
If Firefox is already installed on your computer, you can directly import bookmarks as well as many other things from Firefox.<br />
<br />
Make sure '''Mozilla Firefox''' is selected. Optionally, you can uncheck some unwanted items here. Click the '''Import''' and then '''Done'''. You are done with it.<br />
<br />
{{note|If you have not created any bookmarks in Chromium yet, the bookmarks will show up in your bookmarks bar. If you already have bookmarks, the bookmarks will be in a new folder labeled "Imported From Firefox"}}<br />
<br />
If you import bookmarks from another PC, you have to export bookmarks from Firefox first.<br />
<br />
{{ic|''Ctrl + Shift + O > Import and Backup > Export Bookmarks To HTML}} in Firefox''<br />
<br />
The procedure is pretty much the same. You need to go to {{ic|chrome://settings/importData}}. However, this time, in the '''From''' drop-down menu, select '''Bookmarks HTML File''' and click the '''Choose File''' button and upload the desired bookmark file.<br />
<br />
==== Enabling native notifications ====<br />
<br />
Go to {{ic|chrome://flags#enable-system-notifications}} and select ''Enabled''.<br />
<br />
==== U2F authentication ====<br />
<br />
Install {{Pkg|libfido2}} library. This provides the udev rules required to enable access to the [[U2F]] key as a user.<br />
U2F keys are by default only accessible by root, and without these rules Chromium will give an error.<br />
<br />
==== Dark mode ====<br />
<br />
To enable dark mode (used in ''prefers-color-scheme'' in CSS, JavaScript, Settings and Dev-Tools) and enable the dark theme (normally used for incognito mode) [[append]] the following flag to [[#Making flags persistent|persistent configuration]]:<br />
<br />
{{hc|1=~/.config/chromium-flags.conf|2=<br />
--force-dark-mode<br />
--enable-features=WebUIDarkMode<br />
}}<br />
<br />
===== Dark mode by system preference =====<br />
<br />
[https://bugs.chromium.org/p/chromium/issues/detail?id=998903 This Chromium issue] aims to bring dark mode based on GTK theme selection into Chromium.<br />
<br />
In the future, all that will be required to properly use system preference, is setting ''Designs'' to GTK in {{ic|chrome://settings/appearance}}.<br />
<br />
==== Enable Side Panel ====<br />
<br />
The Side Panel can be enabled through {{ic|chrome://flags}}. You can enable or disable '''Side panel''', and change options such as '''Side panel border''' and '''Side panel drag and drop'''.<br />
<br />
=== Profile maintenance ===<br />
<br />
Chromium uses [[SQLite]] databases to manage history and the like. Sqlite databases become fragmented over time and empty spaces appear all around. But, since there are no managing processes checking and optimizing the database, these factors eventually result in a performance hit. A good way to improve startup and some other bookmarks- and history-related tasks is to defragment and trim unused space from these databases.<br />
<br />
{{Pkg|profile-cleaner}} and {{AUR|browser-vacuum}} in the [[AUR]] do just this.<br />
<br />
=== Security ===<br />
<br />
==== Disable JIT ====<br />
<br />
At the cost of reduced performance, you can disable just-in-time compilation of JavaScript to native code, which is responsible for [https://microsoftedge.github.io/edgevr/posts/Super-Duper-Secure-Mode/ roughtly half of the security vulnerabilities in the JS engine], using the flag {{ic|1=--js-flags=--jitless}}.<br />
<br />
==== WebRTC ====<br />
<br />
WebRTC is a communication protocol that relies on JavaScript that can leak one's actual IP address and hardware hash from behind a VPN. While some software may prevent the leaking scripts from running, it's probably a good idea to block this protocol directly as well, just to be safe. As of October 2016, there is no way to disable WebRTC on Chromium on desktop, there are extensions available to disable local IP address leak, one is this [https://chrome.google.com/webstore/detail/webrtc-network-limiter/npeicpdbkakmehahjeeohfdhnlpdklia extension].<br />
<br />
One can test WebRTC via https://browserleaks.com/webrtc.<br />
<br />
{{Warning|Even though IP leak can be prevented, Chromium still sends your unique hash, and there is no way to prevent this. Read more on https://www.browserleaks.com/webrtc#webrtc-disable}}<br />
<br />
==== SSL certificates ====<br />
<br />
Chromium does not have an SSL certificate manager. It relies on the NSS Shared DB {{ic|~/.pki/nssdb}}. In order to add SSL certificates to the database, users will have to use the shell.<br />
<br />
===== Adding CAcert certificates for self-signed certificates =====<br />
<br />
Grab the CAcerts and create an {{ic|nssdb}}, if one does not already exist. To do this, first install the {{Pkg|nss}} package, then complete these steps:<br />
<br />
$ mkdir -p $HOME/.pki/nssdb<br />
$ cd $HOME/.pki/nssdb<br />
$ certutil -N -d sql:.<br />
<br />
$ curl -k -o "cacert-root.crt" "http://www.cacert.org/certs/root.crt"<br />
$ curl -k -o "cacert-class3.crt" "http://www.cacert.org/certs/class3.crt"<br />
$ certutil -d sql:$HOME/.pki/nssdb -A -t TC -n "CAcert.org" -i cacert-root.crt <br />
$ certutil -d sql:$HOME/.pki/nssdb -A -t TC -n "CAcert.org Class 3" -i cacert-class3.crt<br />
<br />
{{Note|Users will need to create a password for the database, if it does not exist.}}<br />
<br />
Now users may manually import a self-signed certificate.<br />
<br />
===== Example 1: Using a shell script to isolate the certificate from TomatoUSB =====<br />
<br />
Below is a simple script that will extract and add a certificate to the user's {{ic|nssdb}}:<br />
<br />
#!/bin/sh<br />
#<br />
# usage: import-cert.sh remote.host.name [port]<br />
#<br />
REMHOST=$1<br />
REMPORT=${2:-443}<br />
exec 6>&1<br />
exec > $REMHOST<br />
echo | openssl s_client -connect ${REMHOST}:${REMPORT} 2>&1 |sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p'<br />
certutil -d sql:$HOME/.pki/nssdb -A -t "P,," -n "$REMHOST" -i $REMHOST <br />
exec 1>&6 6>&-<br />
<br />
Syntax is advertised in the commented lines.<br />
<br />
References:<br />
*https://web.archive.org/web/20180718193807/https://blog.avirtualhome.com/adding-ssl-certificates-to-google-chrome-linux-ubuntu<br />
*https://chromium.googlesource.com/chromium/src/+/master/docs/linux/cert_management.md<br />
<br />
===== Example 2: Using Firefox to isolate the certificate from TomatoUSB =====<br />
<br />
The {{Pkg|firefox}} browser can be used to save the certificate to a file for manual import into the database.<br />
<br />
Using firefox:<br />
#Browse to the target URL.<br />
#Upon seeing the "This Connection is Untrusted" warning screen, click: ''I understand the Risks > Add Exception...''<br />
#Click: ''View > Details > Export'' and save the certificate to a temporary location ({{ic|/tmp/easy.pem}} in this example).<br />
<br />
Now import the certificate for use in Chromium:<br />
$ certutil -d sql:$HOME/.pki/nssdb -A -t TC -n "easy" -i /tmp/easy.pem<br />
<br />
{{Note|Adjust the name to match that of the certificate. In the example above, "easy" is the name of the certificate.}}<br />
<br />
Reference:<br />
*https://sahissam.blogspot.com/2012/06/new-ssl-certificates-for-tomatousb-and.html<br />
<br />
==== Canvas Fingerprinting ====<br />
<br />
Canvas fingerprinting is a technique that allows websites to identify users by detecting differences when rendering to an HTML5 canvas. This information can be made inaccessible by using the {{ic|--disable-reading-from-canvas}} flag.<br />
<br />
To confirm this is working run [https://panopticlick.eff.org this test] and make sure "hash of canvas fingerprint" is reported as undetermined in the full results.<br />
<br />
{{Note|1=<nowiki></nowiki><br />
* Some extensions require reading from canvas and may be broken by setting {{ic|--disable-reading-from-canvas}}.<br />
* YouTube player does not work properly without canvas reading. [https://github.com/qutebrowser/qutebrowser/issues/5345][https://bbs.archlinux.org/viewtopic.php?pid=1907406]<br />
}}<br />
<br />
==== Privacy extensions ====<br />
<br />
See [[Browser extensions#Privacy]].<br />
<br />
{{Tip|Installing too many extensions might take up much space in the toolbar. Those extensions which you would not interact with anyway (e.g. [https://chrome.google.com/webstore/detail/gcbommkclmclpchllfjekcdonpmejbdp HTTPS Everywhere]) can be hidden by right-clicking on the extension and choosing ''Hide in Chromium menu''.}}<br />
<br />
==== Do Not Track ====<br />
<br />
To enable [[wikipedia:Do Not Track|Do Not Track]], visit {{ic|chrome://settings}}, scroll down to ''Advanced'' and under ''Privacy and security'', check ''Send a "Do Not Track" request with your browsing traffic''.<br />
<br />
==== Force a password store ====<br />
<br />
Chromium uses a password store to store your passwords and the ''Chromium Safe Storage'' key, which is used to encrypt cookie values. [https://codereview.chromium.org/24734007]<br />
<br />
By default Chromium auto-detects which password store to use, which can lead to you apparently losing your passwords and cookies when switching to another desktop environment or window manager.<br />
<br />
You can force Chromium to use a specific password store by launching it with the {{ic|--password-store}} flag with one of following the values [https://chromium.googlesource.com/chromium/src/+/master/docs/linux/password_storage.md]:<br />
<br />
* {{ic|gnome}}, uses [[Gnome Keyring]]<br />
* {{ic|kwallet5}}, uses [[KDE Wallet]]<br />
* {{ic|basic}}, saves the passwords and the cookies' encryption key as plain text in the file {{ic|Login Data}}<br />
* {{ic|detect}}, the default auto-detect behavior<br />
<br />
For example, to force Chromium to use Gnome Keyring in another desktop or WM use {{ic|1=--password-store=gnome}}, see [[#Making flags persistent]] for making it permanent.<br />
<br />
When using a password store of another desktop environment you probably also want to unlock it automatically see: [[GNOME/Keyring#Using the keyring outside of GNOME]]{{Broken section link}} and [[KDE Wallet#Unlock KDE Wallet automatically on login]].<br />
<br />
== Troubleshooting ==<br />
<br />
=== Fonts ===<br />
<br />
{{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].}}<br />
<br />
==== Tab font size is too large ====<br />
<br />
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}}.<br />
<br />
=== WebGL ===<br />
<br />
There is the possibility that your graphics card has been blacklisted by Chromium. See [[#Force GPU acceleration]].<br />
<br />
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}}.<br />
<br />
Visit {{ic|chrome://gpu/}} for debugging information about WebGL support.<br />
<br />
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 are 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}}.<br />
<br />
=== Incorrect HiDPI rendering ===<br />
<br />
Chromium will automatically scale for a [[HiDPI]] display, however, this may cause an incorrect rendered GUI.<br />
<br />
The flag {{ic|1=--force-device-scale-factor=1}} may be used to overrule the automatic scaling factor.<br />
<br />
When [[#Native Wayland support|native Wayland support]] is enabled, Chromium will automatically scale based on the configured scale of each monitor.<br />
<br />
=== Password prompt on every start with GNOME Keyring ===<br />
<br />
See [[GNOME/Keyring#Passwords are not remembered]].<br />
<br />
=== Chromecasts in the network are not discovered ===<br />
<br />
You will need to enable the Media Router Component Extension in {{ic|chrome://flags/#load-media-router-component-extension}}.<br />
<br />
=== Everything is syncing except for password ===<br />
<br />
If synchronization is not working for password only (you can check it on {{ic|chrome://sync-internals/}}) delete profile login data:<br />
<br />
$ rm ~/.config/chromium/Default/Login\ Data*<br />
<br />
See [https://support.google.com/chrome/thread/9947763?hl=en&msgid=23687608 Google Chrome Help forum] for details.<br />
<br />
=== Losing cookies and passwords when switching between desktop environments ===<br />
<br />
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.<br />
<br />
See [[#Force a password store]].<br />
<br />
=== Hang on startup when Google Sync enabled ===<br />
<br />
Try launching Chrome with {{ic|1=--password-store=basic}} or another appropriate password store.<br />
<br />
See [[#Force a password store]].<br />
<br />
=== Chromium asks to be set as the default browser every time it starts ===<br />
<br />
If you are using KDE and have once set Firefox as the default browser (by clicking the button inside Firefox), you might find Chromium asks to be set as the default browser every time it starts, even if you click the "set as default" button.<br />
<br />
Chromium checks for this status by running {{ic|xdg-settings check default-web-browser chromium.desktop}}. If the output is "no", it is not considering itself to be the default browser. The script {{ic|xdg-settings}} checks for the following MIME associations and expect all of them to be {{ic|chromium.desktop}}:<br />
<br />
{{bc|<br />
x-scheme-handler/http<br />
x-scheme-handler/https<br />
text/html}}<br />
<br />
To fix it, go to ''System settings > Applications > Default applications > Web browser'' and choose Chromium. Then, set the MIME association for {{ic|text/html}}:<br />
<br />
$ xdg-mime default chromium.desktop text/html<br />
<br />
Finally, [[XDG_MIME_Applications#New_MIME_types|update the MIME database]]:<br />
<br />
$ update-mime-database ~/.local/share/mime<br />
<br />
=== "This browser or app may not be secure" error logging in to Google ===<br />
<br />
As of 2020.04.20 if you run chromium with {{ic|1=--remote-debugging-port=9222}} flag for web development, you cannot log in to your Google account. Temporarily disable this flag to login and then you can enable it back.<br />
<br />
=== Chromium stuck at 60fps when using a 144Hz + 60Hz monitor ===<br />
<br />
There is a suitable workaround for this issue, [[append]] the following flags to [[#Making flags persistent|persistent configuration]]:<br />
<br />
{{hc|1=~/.config/chromium-flags.conf|2=<br />
--use-gl=egl<br />
--ignore-gpu-blocklist<br />
--enable-gpu-rasterization<br />
}}<br />
<br />
This should make Chromium run at 144fps when used on your 144hz display, assuming your compositor is refreshing at 144fps. <br />
Keep in mind it might be a little choppy {{Bug|67035}}, but this is way better than it being stuck at 60fps.<br />
<br />
=== Chromium low scroll speed ===<br />
<br />
Mouse whell scrolling in chromium and electron based applications may be too slow for daily usage. Here are some solutions.<br />
<br />
[[Libinput#Mouse wheel scrolling speed scaling]] injects {{ic|libinput_event_pointer_get_axis_value}} function in libinput and provides an interface to change scale factor. This is not a application level injection, so an addition script for application specific scale factor tuning is needed. Note that scroll on chromium's small height developer tools may be too fast when scale factor is large enough.<br />
<br />
[[IMWheel]] increases scroll distance by replaying X wheel button event for multiple times. However, chromium assumes the real scroll and the replayed ones as two events. There is a small but noticeable delay tween them, so one mouse wheel scroll leads to twice page jumps. Also, touchpad scroll needs addition care.<br />
<br />
[https://chrome.google.com/webstore/detail/linux-scroll-speed-fix/mlboohjioameadaedfjcpemcaangkkbp Linux Scroll Speed Fix] and [https://chrome.google.com/webstore/detail/smoothscroll/nbokbjkabcmbfdlbddjidfmibcpneigj SmoothScroll] are two chromium extensions with suppport for scroll distance modification. Upon wheel scroll in a web page, the closest scrollable ancestor of current focused node will be found, then a scroll method with given pixel distance will be called on it, even if it has been scrolled to bottom. So once you scroll into a text editor or any scrollable element, you can never scroll out of it, except moving mouse. Also, extension based methods can not be used outside chromium.<br />
<br />
== See also ==<br />
<br />
* [https://www.chromium.org/ Chromium homepage]<br />
* [https://chromereleases.googleblog.com/ Google Chrome release notes]<br />
* [https://chrome.google.com/webstore/ Chrome web store]<br />
* [[Wikipedia:Chromium (web browser)#Differences from Google Chrome|Differences between Chromium and Google Chrome]]<br />
* [https://peter.sh/experiments/chromium-command-line-switches/ List of Chromium command-line switches]<br />
* [[Profile-sync-daemon]] - Systemd service that saves Chromium profile in tmpfs and syncs to disk<br />
* [[Tmpfs]] - Tmpfs Filesystem in {{ic|/etc/fstab}}<br />
* [https://www.kernel.org/doc/html/latest/filesystems/tmpfs.html Official tmpfs kernel Documentation]</div>GloriousYellowhttps://wiki.archlinux.org/index.php?title=Chromium&diff=700919Chromium2021-11-05T20:58:21Z<p>GloriousYellow: /* Enable Side Panel */ add more information about side panel options</p>
<hr />
<div>[[Category:Web browser]]<br />
[[Category:Google]]<br />
[[de:Chromium]]<br />
[[es:Chromium]]<br />
[[ja:Chromium]]<br />
[[zh-hans:Chromium]]<br />
{{Related articles start}}<br />
{{Related|Browser extensions}}<br />
{{Related|Firefox}}<br />
{{Related|Opera}}<br />
{{Related articles end}}<br />
<br />
[[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.<br />
<br />
See [https://chromium.googlesource.com/chromium/src/+/master/docs/chromium_browser_vs_google_chrome.md this page] for an explanation of the differences between Chromium and Google Chrome. Additionally:<br />
<br />
* Sync is unavailable in Chromium 89+ (2021-03-02) [https://archlinux.org/news/chromium-losing-sync-support-in-early-march/]<br />
<br />
{{Note|Sync can be temporarily restored by [https://gist.github.com/foutrelis/14e339596b89813aa9c37fd1b4e5d9d5 using Chrome's OAuth2 credentials] or [https://www.chromium.org/developers/how-tos/api-keys getting your own], but pay attention to the disclaimers and do not consider this to be a long-term solution.<br />
Consider switching to [https://xbrowsersync.org xbrowsersync] for bookmarks syncing as long term solution.<br />
}}<br />
<br />
See [[List of applications/Internet#Blink-based]] for other browsers based on Chromium.<br />
<br />
== Installation ==<br />
<br />
There are several packages available to [[install]] Chromium with:<br />
<br />
* {{Pkg|chromium}} — stable release;<br />
* {{AUR|chromium-dev}} — development release;<br />
* {{AUR|chromium-snapshot-bin}} — nightly build.<br />
<br />
Google Chrome packages:<br />
<br />
* {{AUR|google-chrome}} — stable release;<br />
* {{AUR|google-chrome-beta}} — beta release;<br />
* {{AUR|google-chrome-dev}} — development release.<br />
<br />
{{Note|From the [https://www.chromium.org/Home/chromium-privacy Chromium privacy page]: "Features that communicate with Google made available through the compilation of code in Chromium are subject to the [https://www.google.com/policies/privacy/ Google Privacy Policy]." For those who want to avoid all integration with Google services, there are some [[List of applications/Internet#Privacy-focused chromium spin-offs|privacy-focused spin-offs]].}}<br />
<br />
== Configuration ==<br />
<br />
=== Default applications ===<br />
<br />
To set Chromium as the default browser and to change which applications Chromium launches when opening downloaded files, see [[default applications]].<br />
<br />
=== Certificates ===<br />
<br />
Chromium uses [[Network Security Services]] for certificate management. Certificates can be managed in {{ic|chrome://settings/certificates}}.<br />
<br />
=== Making flags persistent ===<br />
<br />
{{Note|The {{ic|chromium-flags.conf}} file and the accompanying custom launcher script are specific to the Arch Linux {{Pkg|chromium}} package. For {{AUR|google-chrome}} and {{AUR|google-chrome-dev}}, use {{ic|chrome-flags.conf}} and {{ic|chrome-dev-flags.conf}} instead.}}<br />
<br />
You can put your flags in a {{ic|chromium-flags.conf}} file under {{ic|$HOME/.config/}} (or under {{ic|$XDG_CONFIG_HOME}} if you have configured that environment variable).<br />
<br />
No special syntax is used; flags are defined as if they were written in a terminal.<br />
<br />
* The arguments are split on whitespace and shell quoting rules apply, but no further parsing is performed.<br />
* In case of improper quoting anywhere in the file, a fatal error is raised.<br />
* Flags can be placed in separate lines for readability, but this is not required.<br />
* Lines starting with a hash symbol (#) are skipped. (This is only supported by the {{Pkg|chromium}} launcher script and will not work when using {{ic|chrome-flags.conf}} with the {{AUR|google-chrome}} package.)<br />
<br />
Below is an example {{ic|chromium-flags.conf}} file that defines the flags {{ic|--start-maximized --incognito}}:<br />
<br />
{{hc|~/.config/chromium-flags.conf|<br />
# This line will be ignored.<br />
--start-maximized<br />
--incognito<br />
}}<br />
<br />
=== Force GPU acceleration ===<br />
<br />
{{Warning|Disabling the rendering blacklist may cause unstable behavior, including crashes of the host. See the bug reports in {{ic|chrome://gpu}} for details.}}<br />
<br />
By default Chromium on Linux does not use any GPU acceleration. To force GPU acceleration, [[append]] the following flags to [[/Tips and tricks#Making flags persistent|persistent configuration]]:<br />
<br />
{{hc|~/.config/chromium-flags.conf|<br />
--ignore-gpu-blocklist<br />
--enable-gpu-rasterization<br />
--enable-zero-copy<br />
}}<br />
<br />
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.<br />
<br />
{{Out of date|A fix has been merged into mesa as of May 2021. [https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10850]}}<br />
<br />
{{ic|--enable-native-gpu-memory-buffers}} is broken since mesa 20.1.1 [https://gitlab.freedesktop.org/mesa/mesa/-/issues/3119#note_533902]<br />
<br />
=== Hardware video acceleration ===<br />
<br />
{{Note|1=<nowiki/><br />
* There is no official support from Chromium or Arch Linux for this feature [https://chromium.googlesource.com/chromium/src/+/master/docs/gpu/vaapi.md#vaapi-on-linux]. However, {{Pkg|chromium}} from official repositories is compiled with VA-API support and you may ask for help in [https://bbs.archlinux.org/viewtopic.php?id=244031 the dedicated forum thread].<br />
* Wayland is not supported.<br />
}}<br />
<br />
To enable VA-API support in Chromium:<br />
<br />
* Install the correct VA-API driver for your video card and verify VA-API has been enabled and working correctly, see [[Hardware video acceleration]]. For proprietary NVIDIA support, installing {{AUR|libva-vdpau-driver-chromium}} or {{AUR|libva-vdpau-driver-vp9-git}} is required.<br />
* Set the option {{ic|1=--enable-features=VaapiVideoDecoder}}. This is enough when using ANGLE GL renderer and {{Pkg|libva-intel-driver}}.<br />
* When using ANGLE, Chromium forces the older i965 driver and fails when {{Pkg|intel-media-driver}} is used. As a workaround, [[Hardware video acceleration#Configuring VA-API|configure VA-API manually]]. See [https://github.com/intel/media-driver/issues/818] for details.<br />
* To use the system GL renderer on Xorg, use either {{ic|1=--use-gl=egl}} or {{ic|1=--use-gl=desktop}}. On XWayland, use the {{ic|1=--use-gl=egl}} flag (Currently exhibits choppiness {{Bug|67035}} on some systems).<br />
<br />
==== Tips and tricks ====<br />
<br />
To check if it's working play a video which is using a codec supported by your VA-API driver (''vainfo'' tells you which codecs are supported, but Chromium will only support VP9 and h264):<br />
<br />
* Open the DevTools by pressing {{ic|Ctrl+Shift+I}} or on the ''Inspect'' button of the context (right-click) menu<br />
* Add the Media inspection tab: ''Hamburger menu > More tools > Media''<br />
* In the newly opened Media tab, look at the hardware decoder state of the video decoder<br />
<br />
Test on a large enough video. Starting with version 86, Chromium on desktop [https://bugs.chromium.org/p/chromium/issues/detail?id=684792 will only accelerate videos larger than 720p].<br />
<br />
To reduce CPU usage while watching YouTube where VP8/VP9 hardware decoding is not available use the [https://chrome.google.com/webstore/detail/h264ify/aleakchihdccplidncghkekgioiakgal h264ify] or [https://chrome.google.com/webstore/detail/enhanced-h264ify/omkfmpieigblcllmkgbflkikinpkodlk enhanced-h264ify] extension.<br />
<br />
On some systems (especially on XWayland) you might need to [[#Force GPU acceleration]]. Only {{ic|--ignore-gpu-blocklist}} is enough for our purposes.<br />
<br />
{{Expansion|Provide a link to some bug report.}}<br />
<br />
You might need to disable the Skia renderer, as it is currently not compatible with video decode acceleration: {{ic|1=--disable-features=UseSkiaRenderer}}<br />
<br />
=== PDF viewer plugin ===<br />
<br />
Chromium and Google Chrome are bundled with the ''Chromium PDF Viewer'' plugin. If you do not want to use this plugin, check ''Open PDFs using a different application'' in {{ic|chrome://settings/content/pdfDocuments}}.<br />
<br />
=== Flash Player plugin ===<br />
<br />
Support for Flash Player was removed in Chromium 88.[https://www.chromium.org/flash-roadmap#TOC-Flash-Support-Removed-from-Chromium-Target:-Chrome-88---Jan-2021-]<br />
<br />
=== Running on XWayland ===<br />
<br />
If you are using NVIDIA's proprietary driver, running Chromium on XWayland may cause the GPU process to occasionally crash. To prevent the GPU process from crashing, add the following flags:<br />
<br />
--use-angle=vulkan --use-cmd-decoder=passthrough<br />
<br />
=== Native Wayland support ===<br />
<br />
Since version 87, native [[Wayland]] support in Chromium can be enabled with the following flags [https://bugs.chromium.org/p/chromium/issues/detail?id=1085700]:<br />
<br />
--enable-features=UseOzonePlatform --ozone-platform=wayland<br />
<br />
See [[#Making flags persistent]] for a permanent configuration.<br />
<br />
If you switch between X11 and Wayland often, you can edit the Exec line in desktop file to the following:<br />
if [ "$XDG_SESSION_TYPE" = "wayland" ]; then /usr/bin/chromium --enable-features=UseOzonePlatform --ozone-platform=wayland %U ; else /usr/bin/chromium %U ; fi<br />
This will apply wayland flags only when in wayland session, so you can use a single desktop entry which is working for both session types.<br />
<br />
== Tips and tricks ==<br />
<br />
The following tips and tricks should work for both Chromium and Chrome unless explicitly stated.<br />
<br />
=== Browsing experience ===<br />
<br />
==== chrome:// URLs ====<br />
<br />
A number of tweaks can be accessed via Chrome URLs. See '''chrome://chrome-urls''' for a complete list.<br />
<br />
* '''chrome://flags''' - access experimental features such as WebGL and rendering webpages with GPU, etc.<br />
* '''chrome://extensions''' - view, enable and disable the currently used Chromium extensions.<br />
* '''chrome://gpu''' - status of different GPU options.<br />
* '''chrome://sandbox''' - indicate sandbox status.<br />
* '''chrome://version''' - display version and switches used to invoke the active {{ic|/usr/bin/chromium}}.<br />
<br />
An automatically updated, complete listing of Chromium switches (command line parameters) is available [https://peter.sh/experiments/chromium-command-line-switches/ here].<br />
<br />
==== Chromium task manager ====<br />
<br />
Shift+ESC can be used to bring up the browser task manager wherein memory, CPU, and network usage can be viewed.<br />
<br />
==== Chromium overrides/overwrites Preferences file ====<br />
<br />
If you enabled syncing with a Google Account, then Chromium will override any direct edits to the Preferences file found under {{ic|~/.config/chromium/Default/Preferences}}. To work around this, start Chromium with the {{ic|--disable-sync-preferences}} switch:<br />
$ chromium --disable-sync-preferences<br />
<br />
If Chromium is started in the background when you login in to your desktop environment, make sure the command your desktop environment uses is:<br />
$ chromium --disable-sync-preferences --no-startup-window<br />
<br />
==== Search engines ====<br />
<br />
Make sites like [https://wiki.archlinux.org wiki.archlinux.org] and [https://en.wikipedia.org wikipedia.org] easily searchable by first executing a search on those pages, then going to ''Settings > Search'' and click the ''Manage search engines..'' button. From there, "Edit" the Wikipedia entry and change its keyword to '''w''' (or some other shortcut you prefer). Now searching Wikipedia for "Arch Linux" from the address bar is done simply by entering "'''w arch linux'''".<br />
<br />
{{Note| Google search is used automatically when typing something into the URL bar. A hard-coded keyword trigger is also available using the '''?''' prefix.}}<br />
<br />
==== Tmpfs ====<br />
<br />
===== Cache in tmpfs =====<br />
<br />
{{Note|Chromium stores its cache separate from its browser profile directory.}}<br />
<br />
To limit Chromium from writing its cache to a physical disk, one can define an alternative location via the {{ic|--disk-cache-dir}} flag:<br />
$ chromium --disk-cache-dir="$XDG_RUNTIME_DIR/chromium-cache"<br />
<br />
Cache should be considered temporary and will '''not''' be saved after a reboot or hard lock. Another option is to setup the space in {{ic|/etc/fstab}}:<br />
<br />
{{hc|/etc/fstab|2=<br />
tmpfs /home/''username''/.cache tmpfs noatime,nodev,nosuid,size=400M 0 0<br />
}}<br />
<br />
===== Profile in tmpfs =====<br />
<br />
Relocate the browser profile to a [[Wikipedia:Tmpfs|tmpfs]] filesystem, including {{ic|/tmp}}, or {{ic|/dev/shm}} for improvements in application response as the entire profile is now stored in RAM.<br />
<br />
Use an active profile management tool such as {{Pkg|profile-sync-daemon}} for maximal reliability and ease of use. It symlinks or bind mounts and syncs the browser profile directories to RAM. For more, see [[Profile-sync-daemon]].<br />
<br />
==== Launch a new browser instance ====<br />
<br />
When you launch the browser, it first checks if another instance using the same data directory is already running. If there is one, the new window is associated with the old instance. If you want to launch an independent instance of the browser, you must specify separate directory using the {{ic|--user-data-dir}} parameter:<br />
<br />
$ chromium --user-data-dir=''/path/to/some/directory''<br />
<br />
{{Note|The default location of the user data is {{ic|~/.config/chromium/}}.}}<br />
<br />
==== Directly open *.torrent files and magnet links with a torrent client ====<br />
<br />
By default, Chromium downloads {{ic|*.torrent}} files directly and you need to click the notification from the bottom-left corner of the screen in order for the file to be opened with your default torrent client. This can be avoided with the following method:<br />
<br />
* Download a {{ic|*.torrent}} file.<br />
* Right-click the notification displayed at the bottom-left corner of the screen.<br />
* Check the "''Always Open Files of This Type''" checkbox.<br />
<br />
See [[xdg-open]] to change the default assocation.<br />
<br />
==== Touch Scrolling on touchscreen devices ====<br />
<br />
You may need to specify which touch device to use. Find your touchscreen device with {{ic| xinput list}} then launch Chromium with the {{ic|1=--touch-devices='''x'''}} parameter, where "'''x'''" is the id of your device. {{Note|If the device is designated as a slave pointer, using this may not work, use the master pointer's ID instead.}}<br />
<br />
==== Reduce memory usage ====<br />
<br />
By default, Chromium uses a separate OS process for each ''instance'' of a visited web site. [https://www.chromium.org/developers/design-documents/process-models#Supported_Models] However, you can specify command-line switches when starting Chromium to modify this behaviour.<br />
<br />
For example, to share one process for all instances of a website:<br />
<br />
$ chromium --process-per-site<br />
<br />
To use a single process model:<br />
<br />
$ chromium --single-process<br />
<br />
{{Warning|The single-process model is discouraged because it is unsafe and may contain bugs not present in other models.[https://www.chromium.org/developers/design-documents/process-models#TOC-Single-process]}}<br />
<br />
In addition, you can suspend or store inactive Tabs with extensions such as [https://chrome.google.com/webstore/detail/tab-suspender/fiabciakcmgepblmdkmemdbbkilneeeh?hl=en Tab Suspender] and [https://chrome.google.com/webstore/detail/onetab/chphlpgkkbolifaimnlloiipkdnihall?hl=en OneTab].<br />
<br />
==== User Agent ====<br />
<br />
The User Agent can be arbitrarily modified at the start of Chromium's base instance via its {{Ic|<nowiki>--user-agent="[string]"</nowiki>}} parameter.<br />
<br />
==== DOM Distiller ====<br />
<br />
Chromium has a similar reader mode to Firefox. In this case it's called DOM Distiller, which is an [https://github.com/chromium/dom-distiller open source project].<br />
It is disabled by default, but can be enabled using the {{Ic|chrome://flags/#enable-reader-mode}} flag, which you can also make [[#Making flags persistent|persistent]].<br />
Not only does DOM Distiller provide a better reading experience by distilling the content of the page, it also simplifies pages for print. Even though the latter checkbox option has been removed from the print dialog, you can still print the distilled page, which basically has the same effect.<br />
<br />
After enabling the flag, you will find a new "Toggle reader mode" menu item and corresponding icon in the address bar when Chromium thinks the website you are visiting could do with some distilling.<br />
<br />
==== Forcing specific GPU ====<br />
<br />
In multi-GPU systems, Chromium automatically detects which GPU should be used for rendering (discrete or integrated). This works 99% of the time, except when it does not - if a unavailable GPU is picked (for example, discrete graphics on VFIO GPU passthrough-enabled systems), {{ic|chrome://gpu}} will complain about not being able to initialize the GPU process. On the same page below '''Driver Information''' there will be multiple GPUs shown (GPU0, GPU1, ...). There is no way to switch between them in a user-friendly way, but you can read the device/vendor IDs present there and configure Chromium to use a specific GPU with flags:<br />
<br />
$ chromium --gpu-testing-vendor-id=0x8086 --gpu-testing-device-id=0x1912<br />
<br />
...where {{ic|0x8086}} and {{ic|0x1912}} is replaced by the IDs of the GPU you want to use (as shown on the {{ic|chrome://gpu}} page).<br />
<br />
==== Import bookmarks from Firefox ====<br />
<br />
To ease the transition, you can import bookmarks from [[Firefox]] into Chromium.<br />
<br />
Navigate Chromium to {{ic|chrome://settings/importData}}<br />
<br />
If Firefox is already installed on your computer, you can directly import bookmarks as well as many other things from Firefox.<br />
<br />
Make sure '''Mozilla Firefox''' is selected. Optionally, you can uncheck some unwanted items here. Click the '''Import''' and then '''Done'''. You are done with it.<br />
<br />
{{note|If you have not created any bookmarks in Chromium yet, the bookmarks will show up in your bookmarks bar. If you already have bookmarks, the bookmarks will be in a new folder labeled "Imported From Firefox"}}<br />
<br />
If you import bookmarks from another PC, you have to export bookmarks from Firefox first.<br />
<br />
{{ic|''Ctrl + Shift + O > Import and Backup > Export Bookmarks To HTML}} in Firefox''<br />
<br />
The procedure is pretty much the same. You need to go to {{ic|chrome://settings/importData}}. However, this time, in the '''From''' drop-down menu, select '''Bookmarks HTML File''' and click the '''Choose File''' button and upload the desired bookmark file.<br />
<br />
==== Enabling native notifications ====<br />
<br />
Go to {{ic|chrome://flags#enable-system-notifications}} and select ''Enabled''.<br />
<br />
==== U2F authentication ====<br />
<br />
Install {{Pkg|libfido2}} library. This provides the udev rules required to enable access to the [[U2F]] key as a user.<br />
U2F keys are by default only accessible by root, and without these rules Chromium will give an error.<br />
<br />
==== Dark mode ====<br />
<br />
To enable dark mode (used in ''prefers-color-scheme'' in CSS, JavaScript, Settings and Dev-Tools) and enable the dark theme (normally used for incognito mode) [[append]] the following flag to [[#Making flags persistent|persistent configuration]]:<br />
<br />
{{hc|1=~/.config/chromium-flags.conf|2=<br />
--force-dark-mode<br />
--enable-features=WebUIDarkMode<br />
}}<br />
<br />
===== Dark mode by system preference =====<br />
<br />
[https://bugs.chromium.org/p/chromium/issues/detail?id=998903 This Chromium issue] aims to bring dark mode based on GTK theme selection into Chromium.<br />
<br />
In the future, all that will be required to properly use system preference, is setting ''Designs'' to GTK in {{ic|chrome://settings/appearance}}.<br />
<br />
==== Enable Side Panel ====<br />
<br />
The Side Panel can be enabled through {{ic|chrome://flags}}. You can enable or disable '''Side panel''', and change options such as '''Side panel border''' and '''Side panel drag and drop'''.<br />
<br />
=== Profile maintenance ===<br />
<br />
Chromium uses [[SQLite]] databases to manage history and the like. Sqlite databases become fragmented over time and empty spaces appear all around. But, since there are no managing processes checking and optimizing the database, these factors eventually result in a performance hit. A good way to improve startup and some other bookmarks- and history-related tasks is to defragment and trim unused space from these databases.<br />
<br />
{{Pkg|profile-cleaner}} and {{AUR|browser-vacuum}} in the [[AUR]] do just this.<br />
<br />
=== Security ===<br />
<br />
==== Disable JIT ====<br />
<br />
At the cost of reduced performance, you can disable just-in-time compilation of JavaScript to native code, which is responsible for [https://microsoftedge.github.io/edgevr/posts/Super-Duper-Secure-Mode/ roughtly half of the security vulnerabilities in the JS engine], using the flag {{ic|1=--js-flags=--jitless}}.<br />
<br />
==== WebRTC ====<br />
<br />
WebRTC is a communication protocol that relies on JavaScript that can leak one's actual IP address and hardware hash from behind a VPN. While some software may prevent the leaking scripts from running, it's probably a good idea to block this protocol directly as well, just to be safe. As of October 2016, there is no way to disable WebRTC on Chromium on desktop, there are extensions available to disable local IP address leak, one is this [https://chrome.google.com/webstore/detail/webrtc-network-limiter/npeicpdbkakmehahjeeohfdhnlpdklia extension].<br />
<br />
One can test WebRTC via https://browserleaks.com/webrtc.<br />
<br />
{{Warning|Even though IP leak can be prevented, Chromium still sends your unique hash, and there is no way to prevent this. Read more on https://www.browserleaks.com/webrtc#webrtc-disable}}<br />
<br />
==== SSL certificates ====<br />
<br />
Chromium does not have an SSL certificate manager. It relies on the NSS Shared DB {{ic|~/.pki/nssdb}}. In order to add SSL certificates to the database, users will have to use the shell.<br />
<br />
===== Adding CAcert certificates for self-signed certificates =====<br />
<br />
Grab the CAcerts and create an {{ic|nssdb}}, if one does not already exist. To do this, first install the {{Pkg|nss}} package, then complete these steps:<br />
<br />
$ mkdir -p $HOME/.pki/nssdb<br />
$ cd $HOME/.pki/nssdb<br />
$ certutil -N -d sql:.<br />
<br />
$ curl -k -o "cacert-root.crt" "http://www.cacert.org/certs/root.crt"<br />
$ curl -k -o "cacert-class3.crt" "http://www.cacert.org/certs/class3.crt"<br />
$ certutil -d sql:$HOME/.pki/nssdb -A -t TC -n "CAcert.org" -i cacert-root.crt <br />
$ certutil -d sql:$HOME/.pki/nssdb -A -t TC -n "CAcert.org Class 3" -i cacert-class3.crt<br />
<br />
{{Note|Users will need to create a password for the database, if it does not exist.}}<br />
<br />
Now users may manually import a self-signed certificate.<br />
<br />
===== Example 1: Using a shell script to isolate the certificate from TomatoUSB =====<br />
<br />
Below is a simple script that will extract and add a certificate to the user's {{ic|nssdb}}:<br />
<br />
#!/bin/sh<br />
#<br />
# usage: import-cert.sh remote.host.name [port]<br />
#<br />
REMHOST=$1<br />
REMPORT=${2:-443}<br />
exec 6>&1<br />
exec > $REMHOST<br />
echo | openssl s_client -connect ${REMHOST}:${REMPORT} 2>&1 |sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p'<br />
certutil -d sql:$HOME/.pki/nssdb -A -t "P,," -n "$REMHOST" -i $REMHOST <br />
exec 1>&6 6>&-<br />
<br />
Syntax is advertised in the commented lines.<br />
<br />
References:<br />
*https://web.archive.org/web/20180718193807/https://blog.avirtualhome.com/adding-ssl-certificates-to-google-chrome-linux-ubuntu<br />
*https://chromium.googlesource.com/chromium/src/+/master/docs/linux/cert_management.md<br />
<br />
===== Example 2: Using Firefox to isolate the certificate from TomatoUSB =====<br />
<br />
The {{Pkg|firefox}} browser can be used to save the certificate to a file for manual import into the database.<br />
<br />
Using firefox:<br />
#Browse to the target URL.<br />
#Upon seeing the "This Connection is Untrusted" warning screen, click: ''I understand the Risks > Add Exception...''<br />
#Click: ''View > Details > Export'' and save the certificate to a temporary location ({{ic|/tmp/easy.pem}} in this example).<br />
<br />
Now import the certificate for use in Chromium:<br />
$ certutil -d sql:$HOME/.pki/nssdb -A -t TC -n "easy" -i /tmp/easy.pem<br />
<br />
{{Note|Adjust the name to match that of the certificate. In the example above, "easy" is the name of the certificate.}}<br />
<br />
Reference:<br />
*https://sahissam.blogspot.com/2012/06/new-ssl-certificates-for-tomatousb-and.html<br />
<br />
==== Canvas Fingerprinting ====<br />
<br />
Canvas fingerprinting is a technique that allows websites to identify users by detecting differences when rendering to an HTML5 canvas. This information can be made inaccessible by using the {{ic|--disable-reading-from-canvas}} flag.<br />
<br />
To confirm this is working run [https://panopticlick.eff.org this test] and make sure "hash of canvas fingerprint" is reported as undetermined in the full results.<br />
<br />
{{Note|1=<nowiki></nowiki><br />
* Some extensions require reading from canvas and may be broken by setting {{ic|--disable-reading-from-canvas}}.<br />
* YouTube player does not work properly without canvas reading. [https://github.com/qutebrowser/qutebrowser/issues/5345][https://bbs.archlinux.org/viewtopic.php?pid=1907406]<br />
}}<br />
<br />
==== Privacy extensions ====<br />
<br />
See [[Browser extensions#Privacy]].<br />
<br />
{{Tip|Installing too many extensions might take up much space in the toolbar. Those extensions which you would not interact with anyway (e.g. [https://chrome.google.com/webstore/detail/gcbommkclmclpchllfjekcdonpmejbdp HTTPS Everywhere]) can be hidden by right-clicking on the extension and choosing ''Hide in Chromium menu''.}}<br />
<br />
==== Do Not Track ====<br />
<br />
To enable [[wikipedia:Do Not Track|Do Not Track]], visit {{ic|chrome://settings}}, scroll down to ''Advanced'' and under ''Privacy and security'', check ''Send a "Do Not Track" request with your browsing traffic''.<br />
<br />
==== Force a password store ====<br />
<br />
Chromium uses a password store to store your passwords and the ''Chromium Safe Storage'' key, which is used to encrypt cookie values. [https://codereview.chromium.org/24734007]<br />
<br />
By default Chromium auto-detects which password store to use, which can lead to you apparently losing your passwords and cookies when switching to another desktop environment or window manager.<br />
<br />
You can force Chromium to use a specific password store by launching it with the {{ic|--password-store}} flag with one of following the values [https://chromium.googlesource.com/chromium/src/+/master/docs/linux/password_storage.md]:<br />
<br />
* {{ic|gnome}}, uses [[Gnome Keyring]]<br />
* {{ic|kwallet5}}, uses [[KDE Wallet]]<br />
* {{ic|basic}}, saves the passwords and the cookies' encryption key as plain text in the file {{ic|Login Data}}<br />
* {{ic|detect}}, the default auto-detect behavior<br />
<br />
For example, to force Chromium to use Gnome Keyring in another desktop or WM use {{ic|1=--password-store=gnome}}, see [[#Making flags persistent]] for making it permanent.<br />
<br />
When using a password store of another desktop environment you probably also want to unlock it automatically see: [[GNOME/Keyring#Using the keyring outside of GNOME]]{{Broken section link}} and [[KDE Wallet#Unlock KDE Wallet automatically on login]].<br />
<br />
== Troubleshooting ==<br />
<br />
=== Fonts ===<br />
<br />
{{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].}}<br />
<br />
==== Tab font size is too large ====<br />
<br />
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}}.<br />
<br />
=== WebGL ===<br />
<br />
There is the possibility that your graphics card has been blacklisted by Chromium. See [[#Force GPU acceleration]].<br />
<br />
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}}.<br />
<br />
Visit {{ic|chrome://gpu/}} for debugging information about WebGL support.<br />
<br />
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 are 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}}.<br />
<br />
=== Incorrect HiDPI rendering ===<br />
<br />
Chromium will automatically scale for a [[HiDPI]] display, however, this may cause an incorrect rendered GUI.<br />
<br />
The flag {{ic|1=--force-device-scale-factor=1}} may be used to overrule the automatic scaling factor.<br />
<br />
When [[#Native Wayland support|native Wayland support]] is enabled, Chromium will automatically scale based on the configured scale of each monitor.<br />
<br />
=== Password prompt on every start with GNOME Keyring ===<br />
<br />
See [[GNOME/Keyring#Passwords are not remembered]].<br />
<br />
=== Chromecasts in the network are not discovered ===<br />
<br />
You will need to enable the Media Router Component Extension in {{ic|chrome://flags/#load-media-router-component-extension}}.<br />
<br />
=== Everything is syncing except for password ===<br />
<br />
If synchronization is not working for password only (you can check it on {{ic|chrome://sync-internals/}}) delete profile login data:<br />
<br />
$ rm ~/.config/chromium/Default/Login\ Data*<br />
<br />
See [https://support.google.com/chrome/thread/9947763?hl=en&msgid=23687608 Google Chrome Help forum] for details.<br />
<br />
=== Losing cookies and passwords when switching between desktop environments ===<br />
<br />
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.<br />
<br />
See [[#Force a password store]].<br />
<br />
=== Hang on startup when Google Sync enabled ===<br />
<br />
Try launching Chrome with {{ic|1=--password-store=basic}} or another appropriate password store.<br />
<br />
See [[#Force a password store]].<br />
<br />
=== Chromium asks to be set as the default browser every time it starts ===<br />
<br />
If you are using KDE and have once set Firefox as the default browser (by clicking the button inside Firefox), you might find Chromium asks to be set as the default browser every time it starts, even if you click the "set as default" button.<br />
<br />
Chromium checks for this status by running {{ic|xdg-settings check default-web-browser chromium.desktop}}. If the output is "no", it is not considering itself to be the default browser. The script {{ic|xdg-settings}} checks for the following MIME associations and expect all of them to be {{ic|chromium.desktop}}:<br />
<br />
{{bc|<br />
x-scheme-handler/http<br />
x-scheme-handler/https<br />
text/html}}<br />
<br />
To fix it, go to ''System settings > Applications > Default applications > Web browser'' and choose Chromium. Then, set the MIME association for {{ic|text/html}}:<br />
<br />
$ xdg-mime default chromium.desktop text/html<br />
<br />
Finally, [[XDG_MIME_Applications#New_MIME_types|update the MIME database]]:<br />
<br />
$ update-mime-database ~/.local/share/mime<br />
<br />
=== "This browser or app may not be secure" error logging in to Google ===<br />
<br />
As of 2020.04.20 if you run chromium with {{ic|1=--remote-debugging-port=9222}} flag for web development, you cannot log in to your Google account. Temporarily disable this flag to login and then you can enable it back.<br />
<br />
=== Chromium stuck at 60fps when using a 144Hz + 60Hz monitor ===<br />
<br />
There is a suitable workaround for this issue, [[append]] the following flags to [[#Making flags persistent|persistent configuration]]:<br />
<br />
{{hc|1=~/.config/chromium-flags.conf|2=<br />
--use-gl=egl<br />
--ignore-gpu-blocklist<br />
--enable-gpu-rasterization<br />
}}<br />
<br />
This should make Chromium run at 144fps when used on your 144hz display, assuming your compositor is refreshing at 144fps. <br />
Keep in mind it might be a little choppy {{Bug|67035}}, but this is way better than it being stuck at 60fps.<br />
<br />
=== Chromium low scroll speed ===<br />
<br />
Mouse whell scrolling in chromium and electron based applications may be too slow for daily usage. Here are some solutions.<br />
<br />
[[Libinput#Mouse wheel scrolling speed scaling]] injects {{ic|libinput_event_pointer_get_axis_value}} function in libinput and provides an interface to change scale factor. This is not a application level injection, so an addition script for application specific scale factor tuning is needed. Note that scroll on chromium's small height developer tools may be too fast when scale factor is large enough.<br />
<br />
[[IMWheel]] increases scroll distance by replaying X wheel button event for multiple times. However, chromium assumes the real scroll and the replayed ones as two events. There is a small but noticeable delay tween them, so one mouse wheel scroll leads to twice page jumps. Also, touchpad scroll needs addition care.<br />
<br />
[https://chrome.google.com/webstore/detail/linux-scroll-speed-fix/mlboohjioameadaedfjcpemcaangkkbp Linux Scroll Speed Fix] and [https://chrome.google.com/webstore/detail/smoothscroll/nbokbjkabcmbfdlbddjidfmibcpneigj SmoothScroll] are two chromium extensions with suppport for scroll distance modification. Upon wheel scroll in a web page, the closest scrollable ancestor of current focused node will be found, then a scroll method with given pixel distance will be called on it, even if it has been scrolled to bottom. So once you scroll into a text editor or any scrollable element, you can never scroll out of it, except moving mouse. Also, extension based methods can not be used outside chromium.<br />
<br />
== See also ==<br />
<br />
* [https://www.chromium.org/ Chromium homepage]<br />
* [https://chromereleases.googleblog.com/ Google Chrome release notes]<br />
* [https://chrome.google.com/webstore/ Chrome web store]<br />
* [[Wikipedia:Chromium (web browser)#Differences from Google Chrome|Differences between Chromium and Google Chrome]]<br />
* [https://peter.sh/experiments/chromium-command-line-switches/ List of Chromium command-line switches]<br />
* [[Profile-sync-daemon]] - Systemd service that saves Chromium profile in tmpfs and syncs to disk<br />
* [[Tmpfs]] - Tmpfs Filesystem in {{ic|/etc/fstab}}<br />
* [https://www.kernel.org/doc/html/latest/filesystems/tmpfs.html Official tmpfs kernel Documentation]</div>GloriousYellowhttps://wiki.archlinux.org/index.php?title=Chromium&diff=700647Chromium2021-11-03T20:56:48Z<p>GloriousYellow: /* Disable JIT */ make it more clear that the flag does not need to be saved to the chromium-flags.conf file to work</p>
<hr />
<div>[[Category:Web browser]]<br />
[[Category:Google]]<br />
[[de:Chromium]]<br />
[[es:Chromium]]<br />
[[ja:Chromium]]<br />
[[zh-hans:Chromium]]<br />
{{Related articles start}}<br />
{{Related|Browser extensions}}<br />
{{Related|Firefox}}<br />
{{Related|Opera}}<br />
{{Related articles end}}<br />
<br />
[[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.<br />
<br />
See [https://chromium.googlesource.com/chromium/src/+/master/docs/chromium_browser_vs_google_chrome.md this page] for an explanation of the differences between Chromium and Google Chrome. Additionally:<br />
<br />
* Sync is unavailable in Chromium 89+ (2021-03-02) [https://archlinux.org/news/chromium-losing-sync-support-in-early-march/]<br />
<br />
{{Note|Sync can be temporarily restored by [https://gist.github.com/foutrelis/14e339596b89813aa9c37fd1b4e5d9d5 using Chrome's OAuth2 credentials] or [https://www.chromium.org/developers/how-tos/api-keys getting your own], but pay attention to the disclaimers and do not consider this to be a long-term solution.<br />
Consider switching to [https://xbrowsersync.org xbrowsersync] for bookmarks syncing as long term solution.<br />
}}<br />
<br />
See [[List of applications/Internet#Blink-based]] for other browsers based on Chromium.<br />
<br />
== Installation ==<br />
<br />
There are several packages available to [[install]] Chromium with:<br />
<br />
* {{Pkg|chromium}} — stable release;<br />
* {{AUR|chromium-dev}} — development release;<br />
* {{AUR|chromium-snapshot-bin}} — nightly build.<br />
<br />
Google Chrome packages:<br />
<br />
* {{AUR|google-chrome}} — stable release;<br />
* {{AUR|google-chrome-beta}} — beta release;<br />
* {{AUR|google-chrome-dev}} — development release.<br />
<br />
{{Note|From the [https://www.chromium.org/Home/chromium-privacy Chromium privacy page]: "Features that communicate with Google made available through the compilation of code in Chromium are subject to the [https://www.google.com/policies/privacy/ Google Privacy Policy]." For those who want to avoid all integration with Google services, there are some [[List of applications/Internet#Privacy-focused chromium spin-offs|privacy-focused spin-offs]].}}<br />
<br />
== Configuration ==<br />
<br />
=== Default applications ===<br />
<br />
To set Chromium as the default browser and to change which applications Chromium launches when opening downloaded files, see [[default applications]].<br />
<br />
=== Certificates ===<br />
<br />
Chromium uses [[Network Security Services]] for certificate management. Certificates can be managed in {{ic|chrome://settings/certificates}}.<br />
<br />
=== Making flags persistent ===<br />
<br />
{{Note|The {{ic|chromium-flags.conf}} file and the accompanying custom launcher script are specific to the Arch Linux {{Pkg|chromium}} package. For {{AUR|google-chrome}} and {{AUR|google-chrome-dev}}, use {{ic|chrome-flags.conf}} and {{ic|chrome-dev-flags.conf}} instead.}}<br />
<br />
You can put your flags in a {{ic|chromium-flags.conf}} file under {{ic|$HOME/.config/}} (or under {{ic|$XDG_CONFIG_HOME}} if you have configured that environment variable).<br />
<br />
No special syntax is used; flags are defined as if they were written in a terminal.<br />
<br />
* The arguments are split on whitespace and shell quoting rules apply, but no further parsing is performed.<br />
* In case of improper quoting anywhere in the file, a fatal error is raised.<br />
* Flags can be placed in separate lines for readability, but this is not required.<br />
* Lines starting with a hash symbol (#) are skipped. (This is only supported by the {{Pkg|chromium}} launcher script and will not work when using {{ic|chrome-flags.conf}} with the {{AUR|google-chrome}} package.)<br />
<br />
Below is an example {{ic|chromium-flags.conf}} file that defines the flags {{ic|--start-maximized --incognito}}:<br />
<br />
{{hc|~/.config/chromium-flags.conf|<br />
# This line will be ignored.<br />
--start-maximized<br />
--incognito<br />
}}<br />
<br />
=== Force GPU acceleration ===<br />
<br />
{{Warning|Disabling the rendering blacklist may cause unstable behavior, including crashes of the host. See the bug reports in {{ic|chrome://gpu}} for details.}}<br />
<br />
By default Chromium on Linux does not use any GPU acceleration. To force GPU acceleration, [[append]] the following flags to [[/Tips and tricks#Making flags persistent|persistent configuration]]:<br />
<br />
{{hc|~/.config/chromium-flags.conf|<br />
--ignore-gpu-blocklist<br />
--enable-gpu-rasterization<br />
--enable-zero-copy<br />
}}<br />
<br />
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.<br />
<br />
{{Out of date|A fix has been merged into mesa as of May 2021. [https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10850]}}<br />
<br />
{{ic|--enable-native-gpu-memory-buffers}} is broken since mesa 20.1.1 [https://gitlab.freedesktop.org/mesa/mesa/-/issues/3119#note_533902]<br />
<br />
=== Hardware video acceleration ===<br />
<br />
{{Note|1=<nowiki/><br />
* There is no official support from Chromium or Arch Linux for this feature [https://chromium.googlesource.com/chromium/src/+/master/docs/gpu/vaapi.md#vaapi-on-linux]. However, {{Pkg|chromium}} from official repositories is compiled with VA-API support and you may ask for help in [https://bbs.archlinux.org/viewtopic.php?id=244031 the dedicated forum thread].<br />
* Wayland is not supported.<br />
}}<br />
<br />
To enable VA-API support in Chromium:<br />
<br />
* Install the correct VA-API driver for your video card and verify VA-API has been enabled and working correctly, see [[Hardware video acceleration]]. For proprietary NVIDIA support, installing {{AUR|libva-vdpau-driver-chromium}} or {{AUR|libva-vdpau-driver-vp9-git}} is required.<br />
* Set the option {{ic|1=--enable-features=VaapiVideoDecoder}}. This is enough when using ANGLE GL renderer and {{Pkg|libva-intel-driver}}.<br />
* When using ANGLE, Chromium forces the older i965 driver and fails when {{Pkg|intel-media-driver}} is used. As a workaround, [[Hardware video acceleration#Configuring VA-API|configure VA-API manually]]. See [https://github.com/intel/media-driver/issues/818] for details.<br />
* To use the system GL renderer on Xorg, use either {{ic|1=--use-gl=egl}} or {{ic|1=--use-gl=desktop}}. On XWayland, use the {{ic|1=--use-gl=egl}} flag (Currently exhibits choppiness {{Bug|67035}} on some systems).<br />
<br />
==== Tips and tricks ====<br />
<br />
To check if it's working play a video which is using a codec supported by your VA-API driver (''vainfo'' tells you which codecs are supported, but Chromium will only support VP9 and h264):<br />
<br />
* Open the DevTools by pressing {{ic|Ctrl+Shift+I}} or on the ''Inspect'' button of the context (right-click) menu<br />
* Add the Media inspection tab: ''Hamburger menu > More tools > Media''<br />
* In the newly opened Media tab, look at the hardware decoder state of the video decoder<br />
<br />
Test on a large enough video. Starting with version 86, Chromium on desktop [https://bugs.chromium.org/p/chromium/issues/detail?id=684792 will only accelerate videos larger than 720p].<br />
<br />
To reduce CPU usage while watching YouTube where VP8/VP9 hardware decoding is not available use the [https://chrome.google.com/webstore/detail/h264ify/aleakchihdccplidncghkekgioiakgal h264ify] or [https://chrome.google.com/webstore/detail/enhanced-h264ify/omkfmpieigblcllmkgbflkikinpkodlk enhanced-h264ify] extension.<br />
<br />
On some systems (especially on XWayland) you might need to [[#Force GPU acceleration]]. Only {{ic|--ignore-gpu-blocklist}} is enough for our purposes.<br />
<br />
{{Expansion|Provide a link to some bug report.}}<br />
<br />
You might need to disable the Skia renderer, as it is currently not compatible with video decode acceleration: {{ic|1=--disable-features=UseSkiaRenderer}}<br />
<br />
=== PDF viewer plugin ===<br />
<br />
Chromium and Google Chrome are bundled with the ''Chromium PDF Viewer'' plugin. If you do not want to use this plugin, check ''Open PDFs using a different application'' in {{ic|chrome://settings/content/pdfDocuments}}.<br />
<br />
=== Flash Player plugin ===<br />
<br />
Support for Flash Player was removed in Chromium 88.[https://www.chromium.org/flash-roadmap#TOC-Flash-Support-Removed-from-Chromium-Target:-Chrome-88---Jan-2021-]<br />
<br />
=== Running on XWayland ===<br />
<br />
If you are using NVIDIA's proprietary driver, running Chromium on XWayland may cause the GPU process to occasionally crash. To prevent the GPU process from crashing, add the following flags:<br />
<br />
--use-angle=vulkan --use-cmd-decoder=passthrough<br />
<br />
=== Native Wayland support ===<br />
<br />
Since version 87, native [[Wayland]] support in Chromium can be enabled with the following flags [https://bugs.chromium.org/p/chromium/issues/detail?id=1085700]:<br />
<br />
--enable-features=UseOzonePlatform --ozone-platform=wayland<br />
<br />
See [[#Making flags persistent]] for a permanent configuration.<br />
<br />
If you switch between X11 and Wayland often, you can edit the Exec line in desktop file to the following:<br />
if [ "$XDG_SESSION_TYPE" = "wayland" ]; then /usr/bin/chromium --enable-features=UseOzonePlatform --ozone-platform=wayland %U ; else /usr/bin/chromium %U ; fi<br />
This will apply wayland flags only when in wayland session, so you can use a single desktop entry which is working for both session types.<br />
<br />
== Tips and tricks ==<br />
<br />
The following tips and tricks should work for both Chromium and Chrome unless explicitly stated.<br />
<br />
=== Browsing experience ===<br />
<br />
==== chrome:// URLs ====<br />
<br />
A number of tweaks can be accessed via Chrome URLs. See '''chrome://chrome-urls''' for a complete list.<br />
<br />
* '''chrome://flags''' - access experimental features such as WebGL and rendering webpages with GPU, etc.<br />
* '''chrome://extensions''' - view, enable and disable the currently used Chromium extensions.<br />
* '''chrome://gpu''' - status of different GPU options.<br />
* '''chrome://sandbox''' - indicate sandbox status.<br />
* '''chrome://version''' - display version and switches used to invoke the active {{ic|/usr/bin/chromium}}.<br />
<br />
An automatically updated, complete listing of Chromium switches (command line parameters) is available [https://peter.sh/experiments/chromium-command-line-switches/ here].<br />
<br />
==== Chromium task manager ====<br />
<br />
Shift+ESC can be used to bring up the browser task manager wherein memory, CPU, and network usage can be viewed.<br />
<br />
==== Chromium overrides/overwrites Preferences file ====<br />
<br />
If you enabled syncing with a Google Account, then Chromium will override any direct edits to the Preferences file found under {{ic|~/.config/chromium/Default/Preferences}}. To work around this, start Chromium with the {{ic|--disable-sync-preferences}} switch:<br />
$ chromium --disable-sync-preferences<br />
<br />
If Chromium is started in the background when you login in to your desktop environment, make sure the command your desktop environment uses is:<br />
$ chromium --disable-sync-preferences --no-startup-window<br />
<br />
==== Search engines ====<br />
<br />
Make sites like [https://wiki.archlinux.org wiki.archlinux.org] and [https://en.wikipedia.org wikipedia.org] easily searchable by first executing a search on those pages, then going to ''Settings > Search'' and click the ''Manage search engines..'' button. From there, "Edit" the Wikipedia entry and change its keyword to '''w''' (or some other shortcut you prefer). Now searching Wikipedia for "Arch Linux" from the address bar is done simply by entering "'''w arch linux'''".<br />
<br />
{{Note| Google search is used automatically when typing something into the URL bar. A hard-coded keyword trigger is also available using the '''?''' prefix.}}<br />
<br />
==== Tmpfs ====<br />
<br />
===== Cache in tmpfs =====<br />
<br />
{{Note|Chromium stores its cache separate from its browser profile directory.}}<br />
<br />
To limit Chromium from writing its cache to a physical disk, one can define an alternative location via the {{ic|--disk-cache-dir}} flag:<br />
$ chromium --disk-cache-dir="$XDG_RUNTIME_DIR/chromium-cache"<br />
<br />
Cache should be considered temporary and will '''not''' be saved after a reboot or hard lock. Another option is to setup the space in {{ic|/etc/fstab}}:<br />
<br />
{{hc|/etc/fstab|2=<br />
tmpfs /home/''username''/.cache tmpfs noatime,nodev,nosuid,size=400M 0 0<br />
}}<br />
<br />
===== Profile in tmpfs =====<br />
<br />
Relocate the browser profile to a [[Wikipedia:Tmpfs|tmpfs]] filesystem, including {{ic|/tmp}}, or {{ic|/dev/shm}} for improvements in application response as the entire profile is now stored in RAM.<br />
<br />
Use an active profile management tool such as {{Pkg|profile-sync-daemon}} for maximal reliability and ease of use. It symlinks or bind mounts and syncs the browser profile directories to RAM. For more, see [[Profile-sync-daemon]].<br />
<br />
==== Launch a new browser instance ====<br />
<br />
When you launch the browser, it first checks if another instance using the same data directory is already running. If there is one, the new window is associated with the old instance. If you want to launch an independent instance of the browser, you must specify separate directory using the {{ic|--user-data-dir}} parameter:<br />
<br />
$ chromium --user-data-dir=''/path/to/some/directory''<br />
<br />
{{Note|The default location of the user data is {{ic|~/.config/chromium/}}.}}<br />
<br />
==== Directly open *.torrent files and magnet links with a torrent client ====<br />
<br />
By default, Chromium downloads {{ic|*.torrent}} files directly and you need to click the notification from the bottom-left corner of the screen in order for the file to be opened with your default torrent client. This can be avoided with the following method:<br />
<br />
* Download a {{ic|*.torrent}} file.<br />
* Right-click the notification displayed at the bottom-left corner of the screen.<br />
* Check the "''Always Open Files of This Type''" checkbox.<br />
<br />
See [[xdg-open]] to change the default assocation.<br />
<br />
==== Touch Scrolling on touchscreen devices ====<br />
<br />
You may need to specify which touch device to use. Find your touchscreen device with {{ic| xinput list}} then launch Chromium with the {{ic|1=--touch-devices='''x'''}} parameter, where "'''x'''" is the id of your device. {{Note|If the device is designated as a slave pointer, using this may not work, use the master pointer's ID instead.}}<br />
<br />
==== Reduce memory usage ====<br />
<br />
By default, Chromium uses a separate OS process for each ''instance'' of a visited web site. [https://www.chromium.org/developers/design-documents/process-models#Supported_Models] However, you can specify command-line switches when starting Chromium to modify this behaviour.<br />
<br />
For example, to share one process for all instances of a website:<br />
<br />
$ chromium --process-per-site<br />
<br />
To use a single process model:<br />
<br />
$ chromium --single-process<br />
<br />
{{Warning|The single-process model is discouraged because it is unsafe and may contain bugs not present in other models.[https://www.chromium.org/developers/design-documents/process-models#TOC-Single-process]}}<br />
<br />
In addition, you can suspend or store inactive Tabs with extensions such as [https://chrome.google.com/webstore/detail/tab-suspender/fiabciakcmgepblmdkmemdbbkilneeeh?hl=en Tab Suspender] and [https://chrome.google.com/webstore/detail/onetab/chphlpgkkbolifaimnlloiipkdnihall?hl=en OneTab].<br />
<br />
==== User Agent ====<br />
<br />
The User Agent can be arbitrarily modified at the start of Chromium's base instance via its {{Ic|<nowiki>--user-agent="[string]"</nowiki>}} parameter.<br />
<br />
==== DOM Distiller ====<br />
<br />
Chromium has a similar reader mode to Firefox. In this case it's called DOM Distiller, which is an [https://github.com/chromium/dom-distiller open source project].<br />
It is disabled by default, but can be enabled using the {{Ic|chrome://flags/#enable-reader-mode}} flag, which you can also make [[#Making flags persistent|persistent]].<br />
Not only does DOM Distiller provide a better reading experience by distilling the content of the page, it also simplifies pages for print. Even though the latter checkbox option has been removed from the print dialog, you can still print the distilled page, which basically has the same effect.<br />
<br />
After enabling the flag, you will find a new "Toggle reader mode" menu item and corresponding icon in the address bar when Chromium thinks the website you are visiting could do with some distilling.<br />
<br />
==== Forcing specific GPU ====<br />
<br />
In multi-GPU systems, Chromium automatically detects which GPU should be used for rendering (discrete or integrated). This works 99% of the time, except when it does not - if a unavailable GPU is picked (for example, discrete graphics on VFIO GPU passthrough-enabled systems), {{ic|chrome://gpu}} will complain about not being able to initialize the GPU process. On the same page below '''Driver Information''' there will be multiple GPUs shown (GPU0, GPU1, ...). There is no way to switch between them in a user-friendly way, but you can read the device/vendor IDs present there and configure Chromium to use a specific GPU with flags:<br />
<br />
$ chromium --gpu-testing-vendor-id=0x8086 --gpu-testing-device-id=0x1912<br />
<br />
...where {{ic|0x8086}} and {{ic|0x1912}} is replaced by the IDs of the GPU you want to use (as shown on the {{ic|chrome://gpu}} page).<br />
<br />
==== Import bookmarks from Firefox ====<br />
<br />
To ease the transition, you can import bookmarks from [[Firefox]] into Chromium.<br />
<br />
Navigate Chromium to {{ic|chrome://settings/importData}}<br />
<br />
If Firefox is already installed on your computer, you can directly import bookmarks as well as many other things from Firefox.<br />
<br />
Make sure '''Mozilla Firefox''' is selected. Optionally, you can uncheck some unwanted items here. Click the '''Import''' and then '''Done'''. You are done with it.<br />
<br />
{{note|If you have not created any bookmarks in Chromium yet, the bookmarks will show up in your bookmarks bar. If you already have bookmarks, the bookmarks will be in a new folder labeled "Imported From Firefox"}}<br />
<br />
If you import bookmarks from another PC, you have to export bookmarks from Firefox first.<br />
<br />
{{ic|''Ctrl + Shift + O > Import and Backup > Export Bookmarks To HTML}} in Firefox''<br />
<br />
The procedure is pretty much the same. You need to go to {{ic|chrome://settings/importData}}. However, this time, in the '''From''' drop-down menu, select '''Bookmarks HTML File''' and click the '''Choose File''' button and upload the desired bookmark file.<br />
<br />
==== Enabling native notifications ====<br />
<br />
Go to {{ic|chrome://flags#enable-system-notifications}} and select ''Enabled''.<br />
<br />
==== U2F authentication ====<br />
<br />
Install {{Pkg|libfido2}} library. This provides the udev rules required to enable access to the [[U2F]] key as a user.<br />
U2F keys are by default only accessible by root, and without these rules Chromium will give an error.<br />
<br />
==== Dark mode ====<br />
<br />
To enable dark mode (used in ''prefers-color-scheme'' in CSS, JavaScript, Settings and Dev-Tools) and enable the dark theme (normally used for incognito mode) [[append]] the following flag to [[#Making flags persistent|persistent configuration]]:<br />
<br />
{{hc|1=~/.config/chromium-flags.conf|2=<br />
--force-dark-mode<br />
--enable-features=WebUIDarkMode<br />
}}<br />
<br />
===== Dark mode by system preference =====<br />
<br />
[https://bugs.chromium.org/p/chromium/issues/detail?id=998903 This Chromium issue] aims to bring dark mode based on GTK theme selection into Chromium.<br />
<br />
In the future, all that will be required to properly use system preference, is setting ''Designs'' to GTK in {{ic|chrome://settings/appearance}}.<br />
<br />
=== Profile maintenance ===<br />
<br />
Chromium uses [[SQLite]] databases to manage history and the like. Sqlite databases become fragmented over time and empty spaces appear all around. But, since there are no managing processes checking and optimizing the database, these factors eventually result in a performance hit. A good way to improve startup and some other bookmarks- and history-related tasks is to defragment and trim unused space from these databases.<br />
<br />
{{Pkg|profile-cleaner}} and {{AUR|browser-vacuum}} in the [[AUR]] do just this.<br />
<br />
=== Security ===<br />
<br />
==== Disable JIT ====<br />
<br />
At the cost of reduced performance, you can disable just-in-time compilation of JavaScript to native code, which is responsible for [https://microsoftedge.github.io/edgevr/posts/Super-Duper-Secure-Mode/ roughtly half of the security vulnerabilities in the JS engine], using the flag {{ic|1=--js-flags=--jitless}}.<br />
<br />
==== WebRTC ====<br />
<br />
WebRTC is a communication protocol that relies on JavaScript that can leak one's actual IP address and hardware hash from behind a VPN. While some software may prevent the leaking scripts from running, it's probably a good idea to block this protocol directly as well, just to be safe. As of October 2016, there is no way to disable WebRTC on Chromium on desktop, there are extensions available to disable local IP address leak, one is this [https://chrome.google.com/webstore/detail/webrtc-network-limiter/npeicpdbkakmehahjeeohfdhnlpdklia extension].<br />
<br />
One can test WebRTC via https://browserleaks.com/webrtc.<br />
<br />
{{Warning|Even though IP leak can be prevented, Chromium still sends your unique hash, and there is no way to prevent this. Read more on https://www.browserleaks.com/webrtc#webrtc-disable}}<br />
<br />
==== SSL certificates ====<br />
<br />
Chromium does not have an SSL certificate manager. It relies on the NSS Shared DB {{ic|~/.pki/nssdb}}. In order to add SSL certificates to the database, users will have to use the shell.<br />
<br />
===== Adding CAcert certificates for self-signed certificates =====<br />
<br />
Grab the CAcerts and create an {{ic|nssdb}}, if one does not already exist. To do this, first install the {{Pkg|nss}} package, then complete these steps:<br />
<br />
$ mkdir -p $HOME/.pki/nssdb<br />
$ cd $HOME/.pki/nssdb<br />
$ certutil -N -d sql:.<br />
<br />
$ curl -k -o "cacert-root.crt" "http://www.cacert.org/certs/root.crt"<br />
$ curl -k -o "cacert-class3.crt" "http://www.cacert.org/certs/class3.crt"<br />
$ certutil -d sql:$HOME/.pki/nssdb -A -t TC -n "CAcert.org" -i cacert-root.crt <br />
$ certutil -d sql:$HOME/.pki/nssdb -A -t TC -n "CAcert.org Class 3" -i cacert-class3.crt<br />
<br />
{{Note|Users will need to create a password for the database, if it does not exist.}}<br />
<br />
Now users may manually import a self-signed certificate.<br />
<br />
===== Example 1: Using a shell script to isolate the certificate from TomatoUSB =====<br />
<br />
Below is a simple script that will extract and add a certificate to the user's {{ic|nssdb}}:<br />
<br />
#!/bin/sh<br />
#<br />
# usage: import-cert.sh remote.host.name [port]<br />
#<br />
REMHOST=$1<br />
REMPORT=${2:-443}<br />
exec 6>&1<br />
exec > $REMHOST<br />
echo | openssl s_client -connect ${REMHOST}:${REMPORT} 2>&1 |sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p'<br />
certutil -d sql:$HOME/.pki/nssdb -A -t "P,," -n "$REMHOST" -i $REMHOST <br />
exec 1>&6 6>&-<br />
<br />
Syntax is advertised in the commented lines.<br />
<br />
References:<br />
*https://web.archive.org/web/20180718193807/https://blog.avirtualhome.com/adding-ssl-certificates-to-google-chrome-linux-ubuntu<br />
*https://chromium.googlesource.com/chromium/src/+/master/docs/linux/cert_management.md<br />
<br />
===== Example 2: Using Firefox to isolate the certificate from TomatoUSB =====<br />
<br />
The {{Pkg|firefox}} browser can be used to save the certificate to a file for manual import into the database.<br />
<br />
Using firefox:<br />
#Browse to the target URL.<br />
#Upon seeing the "This Connection is Untrusted" warning screen, click: ''I understand the Risks > Add Exception...''<br />
#Click: ''View > Details > Export'' and save the certificate to a temporary location ({{ic|/tmp/easy.pem}} in this example).<br />
<br />
Now import the certificate for use in Chromium:<br />
$ certutil -d sql:$HOME/.pki/nssdb -A -t TC -n "easy" -i /tmp/easy.pem<br />
<br />
{{Note|Adjust the name to match that of the certificate. In the example above, "easy" is the name of the certificate.}}<br />
<br />
Reference:<br />
*https://sahissam.blogspot.com/2012/06/new-ssl-certificates-for-tomatousb-and.html<br />
<br />
==== Canvas Fingerprinting ====<br />
<br />
Canvas fingerprinting is a technique that allows websites to identify users by detecting differences when rendering to an HTML5 canvas. This information can be made inaccessible by using the {{ic|--disable-reading-from-canvas}} flag.<br />
<br />
To confirm this is working run [https://panopticlick.eff.org this test] and make sure "hash of canvas fingerprint" is reported as undetermined in the full results.<br />
<br />
{{Note|1=<nowiki></nowiki><br />
* Some extensions require reading from canvas and may be broken by setting {{ic|--disable-reading-from-canvas}}.<br />
* YouTube player does not work properly without canvas reading. [https://github.com/qutebrowser/qutebrowser/issues/5345][https://bbs.archlinux.org/viewtopic.php?pid=1907406]<br />
}}<br />
<br />
==== Privacy extensions ====<br />
<br />
See [[Browser extensions#Privacy]].<br />
<br />
{{Tip|Installing too many extensions might take up much space in the toolbar. Those extensions which you would not interact with anyway (e.g. [https://chrome.google.com/webstore/detail/gcbommkclmclpchllfjekcdonpmejbdp HTTPS Everywhere]) can be hidden by right-clicking on the extension and choosing ''Hide in Chromium menu''.}}<br />
<br />
==== Do Not Track ====<br />
<br />
To enable [[wikipedia:Do Not Track|Do Not Track]], visit {{ic|chrome://settings}}, scroll down to ''Advanced'' and under ''Privacy and security'', check ''Send a "Do Not Track" request with your browsing traffic''.<br />
<br />
==== Force a password store ====<br />
<br />
Chromium uses a password store to store your passwords and the ''Chromium Safe Storage'' key, which is used to encrypt cookie values. [https://codereview.chromium.org/24734007]<br />
<br />
By default Chromium auto-detects which password store to use, which can lead to you apparently losing your passwords and cookies when switching to another desktop environment or window manager.<br />
<br />
You can force Chromium to use a specific password store by launching it with the {{ic|--password-store}} flag with one of following the values [https://chromium.googlesource.com/chromium/src/+/master/docs/linux/password_storage.md]:<br />
<br />
* {{ic|gnome}}, uses [[Gnome Keyring]]<br />
* {{ic|kwallet5}}, uses [[KDE Wallet]]<br />
* {{ic|basic}}, saves the passwords and the cookies' encryption key as plain text in the file {{ic|Login Data}}<br />
* {{ic|detect}}, the default auto-detect behavior<br />
<br />
For example, to force Chromium to use Gnome Keyring in another desktop or WM use {{ic|1=--password-store=gnome}}, see [[#Making flags persistent]] for making it permanent.<br />
<br />
When using a password store of another desktop environment you probably also want to unlock it automatically see: [[GNOME/Keyring#Using the keyring outside of GNOME]]{{Broken section link}} and [[KDE Wallet#Unlock KDE Wallet automatically on login]].<br />
<br />
== Troubleshooting ==<br />
<br />
=== Fonts ===<br />
<br />
{{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].}}<br />
<br />
==== Tab font size is too large ====<br />
<br />
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}}.<br />
<br />
=== WebGL ===<br />
<br />
There is the possibility that your graphics card has been blacklisted by Chromium. See [[#Force GPU acceleration]].<br />
<br />
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}}.<br />
<br />
Visit {{ic|chrome://gpu/}} for debugging information about WebGL support.<br />
<br />
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 are 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}}.<br />
<br />
=== Incorrect HiDPI rendering ===<br />
<br />
Chromium will automatically scale for a [[HiDPI]] display, however, this may cause an incorrect rendered GUI.<br />
<br />
The flag {{ic|1=--force-device-scale-factor=1}} may be used to overrule the automatic scaling factor.<br />
<br />
When [[#Native Wayland support|native Wayland support]] is enabled, Chromium will automatically scale based on the configured scale of each monitor.<br />
<br />
=== Password prompt on every start with GNOME Keyring ===<br />
<br />
See [[GNOME/Keyring#Passwords are not remembered]].<br />
<br />
=== Chromecasts in the network are not discovered ===<br />
<br />
You will need to enable the Media Router Component Extension in {{ic|chrome://flags/#load-media-router-component-extension}}.<br />
<br />
=== Everything is syncing except for password ===<br />
<br />
If synchronization is not working for password only (you can check it on {{ic|chrome://sync-internals/}}) delete profile login data:<br />
<br />
$ rm ~/.config/chromium/Default/Login\ Data*<br />
<br />
See [https://support.google.com/chrome/thread/9947763?hl=en&msgid=23687608 Google Chrome Help forum] for details.<br />
<br />
=== Losing cookies and passwords when switching between desktop environments ===<br />
<br />
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.<br />
<br />
See [[#Force a password store]].<br />
<br />
=== Hang on startup when Google Sync enabled ===<br />
<br />
Try launching Chrome with {{ic|1=--password-store=basic}} or another appropriate password store.<br />
<br />
See [[#Force a password store]].<br />
<br />
=== Chromium asks to be set as the default browser every time it starts ===<br />
<br />
If you are using KDE and have once set Firefox as the default browser (by clicking the button inside Firefox), you might find Chromium asks to be set as the default browser every time it starts, even if you click the "set as default" button.<br />
<br />
Chromium checks for this status by running {{ic|xdg-settings check default-web-browser chromium.desktop}}. If the output is "no", it is not considering itself to be the default browser. The script {{ic|xdg-settings}} checks for the following MIME associations and expect all of them to be {{ic|chromium.desktop}}:<br />
<br />
{{bc|<br />
x-scheme-handler/http<br />
x-scheme-handler/https<br />
text/html}}<br />
<br />
To fix it, go to ''System settings > Applications > Default applications > Web browser'' and choose Chromium. Then, set the MIME association for {{ic|text/html}}:<br />
<br />
$ xdg-mime default chromium.desktop text/html<br />
<br />
Finally, [[XDG_MIME_Applications#New_MIME_types|update the MIME database]]:<br />
<br />
$ update-mime-database ~/.local/share/mime<br />
<br />
=== "This browser or app may not be secure" error logging in to Google ===<br />
<br />
As of 2020.04.20 if you run chromium with {{ic|1=--remote-debugging-port=9222}} flag for web development, you cannot log in to your Google account. Temporarily disable this flag to login and then you can enable it back.<br />
<br />
=== Chromium stuck at 60fps when using a 144Hz + 60Hz monitor ===<br />
<br />
There is a suitable workaround for this issue, [[append]] the following flags to [[#Making flags persistent|persistent configuration]]:<br />
<br />
{{hc|1=~/.config/chromium-flags.conf|2=<br />
--use-gl=egl<br />
--ignore-gpu-blocklist<br />
--enable-gpu-rasterization<br />
}}<br />
<br />
This should make Chromium run at 144fps when used on your 144hz display, assuming your compositor is refreshing at 144fps. <br />
Keep in mind it might be a little choppy {{Bug|67035}}, but this is way better than it being stuck at 60fps.<br />
<br />
=== Chromium low scroll speed ===<br />
<br />
Mouse whell scrolling in chromium and electron based applications may be too slow for daily usage. Here are some solutions.<br />
<br />
[[Libinput#Mouse wheel scrolling speed scaling]] injects {{ic|libinput_event_pointer_get_axis_value}} function in libinput and provides an interface to change scale factor. This is not a application level injection, so an addition script for application specific scale factor tuning is needed. Note that scroll on chromium's small height developer tools may be too fast when scale factor is large enough.<br />
<br />
[[IMWheel]] increases scroll distance by replaying X wheel button event for multiple times. However, chromium assumes the real scroll and the replayed ones as two events. There is a small but noticeable delay tween them, so one mouse wheel scroll leads to twice page jumps. Also, touchpad scroll needs addition care.<br />
<br />
[https://chrome.google.com/webstore/detail/linux-scroll-speed-fix/mlboohjioameadaedfjcpemcaangkkbp Linux Scroll Speed Fix] and [https://chrome.google.com/webstore/detail/smoothscroll/nbokbjkabcmbfdlbddjidfmibcpneigj SmoothScroll] are two chromium extensions with suppport for scroll distance modification. Upon wheel scroll in a web page, the closest scrollable ancestor of current focused node will be found, then a scroll method with given pixel distance will be called on it, even if it has been scrolled to bottom. So once you scroll into a text editor or any scrollable element, you can never scroll out of it, except moving mouse. Also, extension based methods can not be used outside chromium.<br />
<br />
== See also ==<br />
<br />
* [https://www.chromium.org/ Chromium homepage]<br />
* [https://chromereleases.googleblog.com/ Google Chrome release notes]<br />
* [https://chrome.google.com/webstore/ Chrome web store]<br />
* [[Wikipedia:Chromium (web browser)#Differences from Google Chrome|Differences between Chromium and Google Chrome]]<br />
* [https://peter.sh/experiments/chromium-command-line-switches/ List of Chromium command-line switches]<br />
* [[Profile-sync-daemon]] - Systemd service that saves Chromium profile in tmpfs and syncs to disk<br />
* [[Tmpfs]] - Tmpfs Filesystem in {{ic|/etc/fstab}}<br />
* [https://www.kernel.org/doc/html/latest/filesystems/tmpfs.html Official tmpfs kernel Documentation]</div>GloriousYellowhttps://wiki.archlinux.org/index.php?title=Chromium&diff=700646Chromium2021-11-03T20:54:27Z<p>GloriousYellow: /* Force GPU acceleration */ add out of date template for --enable-native-gpu-memory-buffers being broken since mesa 20.1.1</p>
<hr />
<div>[[Category:Web browser]]<br />
[[Category:Google]]<br />
[[de:Chromium]]<br />
[[es:Chromium]]<br />
[[ja:Chromium]]<br />
[[zh-hans:Chromium]]<br />
{{Related articles start}}<br />
{{Related|Browser extensions}}<br />
{{Related|Firefox}}<br />
{{Related|Opera}}<br />
{{Related articles end}}<br />
<br />
[[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.<br />
<br />
See [https://chromium.googlesource.com/chromium/src/+/master/docs/chromium_browser_vs_google_chrome.md this page] for an explanation of the differences between Chromium and Google Chrome. Additionally:<br />
<br />
* Sync is unavailable in Chromium 89+ (2021-03-02) [https://archlinux.org/news/chromium-losing-sync-support-in-early-march/]<br />
<br />
{{Note|Sync can be temporarily restored by [https://gist.github.com/foutrelis/14e339596b89813aa9c37fd1b4e5d9d5 using Chrome's OAuth2 credentials] or [https://www.chromium.org/developers/how-tos/api-keys getting your own], but pay attention to the disclaimers and do not consider this to be a long-term solution.<br />
Consider switching to [https://xbrowsersync.org xbrowsersync] for bookmarks syncing as long term solution.<br />
}}<br />
<br />
See [[List of applications/Internet#Blink-based]] for other browsers based on Chromium.<br />
<br />
== Installation ==<br />
<br />
There are several packages available to [[install]] Chromium with:<br />
<br />
* {{Pkg|chromium}} — stable release;<br />
* {{AUR|chromium-dev}} — development release;<br />
* {{AUR|chromium-snapshot-bin}} — nightly build.<br />
<br />
Google Chrome packages:<br />
<br />
* {{AUR|google-chrome}} — stable release;<br />
* {{AUR|google-chrome-beta}} — beta release;<br />
* {{AUR|google-chrome-dev}} — development release.<br />
<br />
{{Note|From the [https://www.chromium.org/Home/chromium-privacy Chromium privacy page]: "Features that communicate with Google made available through the compilation of code in Chromium are subject to the [https://www.google.com/policies/privacy/ Google Privacy Policy]." For those who want to avoid all integration with Google services, there are some [[List of applications/Internet#Privacy-focused chromium spin-offs|privacy-focused spin-offs]].}}<br />
<br />
== Configuration ==<br />
<br />
=== Default applications ===<br />
<br />
To set Chromium as the default browser and to change which applications Chromium launches when opening downloaded files, see [[default applications]].<br />
<br />
=== Certificates ===<br />
<br />
Chromium uses [[Network Security Services]] for certificate management. Certificates can be managed in {{ic|chrome://settings/certificates}}.<br />
<br />
=== Making flags persistent ===<br />
<br />
{{Note|The {{ic|chromium-flags.conf}} file and the accompanying custom launcher script are specific to the Arch Linux {{Pkg|chromium}} package. For {{AUR|google-chrome}} and {{AUR|google-chrome-dev}}, use {{ic|chrome-flags.conf}} and {{ic|chrome-dev-flags.conf}} instead.}}<br />
<br />
You can put your flags in a {{ic|chromium-flags.conf}} file under {{ic|$HOME/.config/}} (or under {{ic|$XDG_CONFIG_HOME}} if you have configured that environment variable).<br />
<br />
No special syntax is used; flags are defined as if they were written in a terminal.<br />
<br />
* The arguments are split on whitespace and shell quoting rules apply, but no further parsing is performed.<br />
* In case of improper quoting anywhere in the file, a fatal error is raised.<br />
* Flags can be placed in separate lines for readability, but this is not required.<br />
* Lines starting with a hash symbol (#) are skipped. (This is only supported by the {{Pkg|chromium}} launcher script and will not work when using {{ic|chrome-flags.conf}} with the {{AUR|google-chrome}} package.)<br />
<br />
Below is an example {{ic|chromium-flags.conf}} file that defines the flags {{ic|--start-maximized --incognito}}:<br />
<br />
{{hc|~/.config/chromium-flags.conf|<br />
# This line will be ignored.<br />
--start-maximized<br />
--incognito<br />
}}<br />
<br />
=== Force GPU acceleration ===<br />
<br />
{{Warning|Disabling the rendering blacklist may cause unstable behavior, including crashes of the host. See the bug reports in {{ic|chrome://gpu}} for details.}}<br />
<br />
By default Chromium on Linux does not use any GPU acceleration. To force GPU acceleration, [[append]] the following flags to [[/Tips and tricks#Making flags persistent|persistent configuration]]:<br />
<br />
{{hc|~/.config/chromium-flags.conf|<br />
--ignore-gpu-blocklist<br />
--enable-gpu-rasterization<br />
--enable-zero-copy<br />
}}<br />
<br />
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.<br />
<br />
{{Out of date|A fix has been merged into mesa as of May 2021. [https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10850]}}<br />
<br />
{{ic|--enable-native-gpu-memory-buffers}} is broken since mesa 20.1.1 [https://gitlab.freedesktop.org/mesa/mesa/-/issues/3119#note_533902]<br />
<br />
=== Hardware video acceleration ===<br />
<br />
{{Note|1=<nowiki/><br />
* There is no official support from Chromium or Arch Linux for this feature [https://chromium.googlesource.com/chromium/src/+/master/docs/gpu/vaapi.md#vaapi-on-linux]. However, {{Pkg|chromium}} from official repositories is compiled with VA-API support and you may ask for help in [https://bbs.archlinux.org/viewtopic.php?id=244031 the dedicated forum thread].<br />
* Wayland is not supported.<br />
}}<br />
<br />
To enable VA-API support in Chromium:<br />
<br />
* Install the correct VA-API driver for your video card and verify VA-API has been enabled and working correctly, see [[Hardware video acceleration]]. For proprietary NVIDIA support, installing {{AUR|libva-vdpau-driver-chromium}} or {{AUR|libva-vdpau-driver-vp9-git}} is required.<br />
* Set the option {{ic|1=--enable-features=VaapiVideoDecoder}}. This is enough when using ANGLE GL renderer and {{Pkg|libva-intel-driver}}.<br />
* When using ANGLE, Chromium forces the older i965 driver and fails when {{Pkg|intel-media-driver}} is used. As a workaround, [[Hardware video acceleration#Configuring VA-API|configure VA-API manually]]. See [https://github.com/intel/media-driver/issues/818] for details.<br />
* To use the system GL renderer on Xorg, use either {{ic|1=--use-gl=egl}} or {{ic|1=--use-gl=desktop}}. On XWayland, use the {{ic|1=--use-gl=egl}} flag (Currently exhibits choppiness {{Bug|67035}} on some systems).<br />
<br />
==== Tips and tricks ====<br />
<br />
To check if it's working play a video which is using a codec supported by your VA-API driver (''vainfo'' tells you which codecs are supported, but Chromium will only support VP9 and h264):<br />
<br />
* Open the DevTools by pressing {{ic|Ctrl+Shift+I}} or on the ''Inspect'' button of the context (right-click) menu<br />
* Add the Media inspection tab: ''Hamburger menu > More tools > Media''<br />
* In the newly opened Media tab, look at the hardware decoder state of the video decoder<br />
<br />
Test on a large enough video. Starting with version 86, Chromium on desktop [https://bugs.chromium.org/p/chromium/issues/detail?id=684792 will only accelerate videos larger than 720p].<br />
<br />
To reduce CPU usage while watching YouTube where VP8/VP9 hardware decoding is not available use the [https://chrome.google.com/webstore/detail/h264ify/aleakchihdccplidncghkekgioiakgal h264ify] or [https://chrome.google.com/webstore/detail/enhanced-h264ify/omkfmpieigblcllmkgbflkikinpkodlk enhanced-h264ify] extension.<br />
<br />
On some systems (especially on XWayland) you might need to [[#Force GPU acceleration]]. Only {{ic|--ignore-gpu-blocklist}} is enough for our purposes.<br />
<br />
{{Expansion|Provide a link to some bug report.}}<br />
<br />
You might need to disable the Skia renderer, as it is currently not compatible with video decode acceleration: {{ic|1=--disable-features=UseSkiaRenderer}}<br />
<br />
=== PDF viewer plugin ===<br />
<br />
Chromium and Google Chrome are bundled with the ''Chromium PDF Viewer'' plugin. If you do not want to use this plugin, check ''Open PDFs using a different application'' in {{ic|chrome://settings/content/pdfDocuments}}.<br />
<br />
=== Flash Player plugin ===<br />
<br />
Support for Flash Player was removed in Chromium 88.[https://www.chromium.org/flash-roadmap#TOC-Flash-Support-Removed-from-Chromium-Target:-Chrome-88---Jan-2021-]<br />
<br />
=== Running on XWayland ===<br />
<br />
If you are using NVIDIA's proprietary driver, running Chromium on XWayland may cause the GPU process to occasionally crash. To prevent the GPU process from crashing, add the following flags:<br />
<br />
--use-angle=vulkan --use-cmd-decoder=passthrough<br />
<br />
=== Native Wayland support ===<br />
<br />
Since version 87, native [[Wayland]] support in Chromium can be enabled with the following flags [https://bugs.chromium.org/p/chromium/issues/detail?id=1085700]:<br />
<br />
--enable-features=UseOzonePlatform --ozone-platform=wayland<br />
<br />
See [[#Making flags persistent]] for a permanent configuration.<br />
<br />
If you switch between X11 and Wayland often, you can edit the Exec line in desktop file to the following:<br />
if [ "$XDG_SESSION_TYPE" = "wayland" ]; then /usr/bin/chromium --enable-features=UseOzonePlatform --ozone-platform=wayland %U ; else /usr/bin/chromium %U ; fi<br />
This will apply wayland flags only when in wayland session, so you can use a single desktop entry which is working for both session types.<br />
<br />
== Tips and tricks ==<br />
<br />
The following tips and tricks should work for both Chromium and Chrome unless explicitly stated.<br />
<br />
=== Browsing experience ===<br />
<br />
==== chrome:// URLs ====<br />
<br />
A number of tweaks can be accessed via Chrome URLs. See '''chrome://chrome-urls''' for a complete list.<br />
<br />
* '''chrome://flags''' - access experimental features such as WebGL and rendering webpages with GPU, etc.<br />
* '''chrome://extensions''' - view, enable and disable the currently used Chromium extensions.<br />
* '''chrome://gpu''' - status of different GPU options.<br />
* '''chrome://sandbox''' - indicate sandbox status.<br />
* '''chrome://version''' - display version and switches used to invoke the active {{ic|/usr/bin/chromium}}.<br />
<br />
An automatically updated, complete listing of Chromium switches (command line parameters) is available [https://peter.sh/experiments/chromium-command-line-switches/ here].<br />
<br />
==== Chromium task manager ====<br />
<br />
Shift+ESC can be used to bring up the browser task manager wherein memory, CPU, and network usage can be viewed.<br />
<br />
==== Chromium overrides/overwrites Preferences file ====<br />
<br />
If you enabled syncing with a Google Account, then Chromium will override any direct edits to the Preferences file found under {{ic|~/.config/chromium/Default/Preferences}}. To work around this, start Chromium with the {{ic|--disable-sync-preferences}} switch:<br />
$ chromium --disable-sync-preferences<br />
<br />
If Chromium is started in the background when you login in to your desktop environment, make sure the command your desktop environment uses is:<br />
$ chromium --disable-sync-preferences --no-startup-window<br />
<br />
==== Search engines ====<br />
<br />
Make sites like [https://wiki.archlinux.org wiki.archlinux.org] and [https://en.wikipedia.org wikipedia.org] easily searchable by first executing a search on those pages, then going to ''Settings > Search'' and click the ''Manage search engines..'' button. From there, "Edit" the Wikipedia entry and change its keyword to '''w''' (or some other shortcut you prefer). Now searching Wikipedia for "Arch Linux" from the address bar is done simply by entering "'''w arch linux'''".<br />
<br />
{{Note| Google search is used automatically when typing something into the URL bar. A hard-coded keyword trigger is also available using the '''?''' prefix.}}<br />
<br />
==== Tmpfs ====<br />
<br />
===== Cache in tmpfs =====<br />
<br />
{{Note|Chromium stores its cache separate from its browser profile directory.}}<br />
<br />
To limit Chromium from writing its cache to a physical disk, one can define an alternative location via the {{ic|--disk-cache-dir}} flag:<br />
$ chromium --disk-cache-dir="$XDG_RUNTIME_DIR/chromium-cache"<br />
<br />
Cache should be considered temporary and will '''not''' be saved after a reboot or hard lock. Another option is to setup the space in {{ic|/etc/fstab}}:<br />
<br />
{{hc|/etc/fstab|2=<br />
tmpfs /home/''username''/.cache tmpfs noatime,nodev,nosuid,size=400M 0 0<br />
}}<br />
<br />
===== Profile in tmpfs =====<br />
<br />
Relocate the browser profile to a [[Wikipedia:Tmpfs|tmpfs]] filesystem, including {{ic|/tmp}}, or {{ic|/dev/shm}} for improvements in application response as the entire profile is now stored in RAM.<br />
<br />
Use an active profile management tool such as {{Pkg|profile-sync-daemon}} for maximal reliability and ease of use. It symlinks or bind mounts and syncs the browser profile directories to RAM. For more, see [[Profile-sync-daemon]].<br />
<br />
==== Launch a new browser instance ====<br />
<br />
When you launch the browser, it first checks if another instance using the same data directory is already running. If there is one, the new window is associated with the old instance. If you want to launch an independent instance of the browser, you must specify separate directory using the {{ic|--user-data-dir}} parameter:<br />
<br />
$ chromium --user-data-dir=''/path/to/some/directory''<br />
<br />
{{Note|The default location of the user data is {{ic|~/.config/chromium/}}.}}<br />
<br />
==== Directly open *.torrent files and magnet links with a torrent client ====<br />
<br />
By default, Chromium downloads {{ic|*.torrent}} files directly and you need to click the notification from the bottom-left corner of the screen in order for the file to be opened with your default torrent client. This can be avoided with the following method:<br />
<br />
* Download a {{ic|*.torrent}} file.<br />
* Right-click the notification displayed at the bottom-left corner of the screen.<br />
* Check the "''Always Open Files of This Type''" checkbox.<br />
<br />
See [[xdg-open]] to change the default assocation.<br />
<br />
==== Touch Scrolling on touchscreen devices ====<br />
<br />
You may need to specify which touch device to use. Find your touchscreen device with {{ic| xinput list}} then launch Chromium with the {{ic|1=--touch-devices='''x'''}} parameter, where "'''x'''" is the id of your device. {{Note|If the device is designated as a slave pointer, using this may not work, use the master pointer's ID instead.}}<br />
<br />
==== Reduce memory usage ====<br />
<br />
By default, Chromium uses a separate OS process for each ''instance'' of a visited web site. [https://www.chromium.org/developers/design-documents/process-models#Supported_Models] However, you can specify command-line switches when starting Chromium to modify this behaviour.<br />
<br />
For example, to share one process for all instances of a website:<br />
<br />
$ chromium --process-per-site<br />
<br />
To use a single process model:<br />
<br />
$ chromium --single-process<br />
<br />
{{Warning|The single-process model is discouraged because it is unsafe and may contain bugs not present in other models.[https://www.chromium.org/developers/design-documents/process-models#TOC-Single-process]}}<br />
<br />
In addition, you can suspend or store inactive Tabs with extensions such as [https://chrome.google.com/webstore/detail/tab-suspender/fiabciakcmgepblmdkmemdbbkilneeeh?hl=en Tab Suspender] and [https://chrome.google.com/webstore/detail/onetab/chphlpgkkbolifaimnlloiipkdnihall?hl=en OneTab].<br />
<br />
==== User Agent ====<br />
<br />
The User Agent can be arbitrarily modified at the start of Chromium's base instance via its {{Ic|<nowiki>--user-agent="[string]"</nowiki>}} parameter.<br />
<br />
==== DOM Distiller ====<br />
<br />
Chromium has a similar reader mode to Firefox. In this case it's called DOM Distiller, which is an [https://github.com/chromium/dom-distiller open source project].<br />
It is disabled by default, but can be enabled using the {{Ic|chrome://flags/#enable-reader-mode}} flag, which you can also make [[#Making flags persistent|persistent]].<br />
Not only does DOM Distiller provide a better reading experience by distilling the content of the page, it also simplifies pages for print. Even though the latter checkbox option has been removed from the print dialog, you can still print the distilled page, which basically has the same effect.<br />
<br />
After enabling the flag, you will find a new "Toggle reader mode" menu item and corresponding icon in the address bar when Chromium thinks the website you are visiting could do with some distilling.<br />
<br />
==== Forcing specific GPU ====<br />
<br />
In multi-GPU systems, Chromium automatically detects which GPU should be used for rendering (discrete or integrated). This works 99% of the time, except when it does not - if a unavailable GPU is picked (for example, discrete graphics on VFIO GPU passthrough-enabled systems), {{ic|chrome://gpu}} will complain about not being able to initialize the GPU process. On the same page below '''Driver Information''' there will be multiple GPUs shown (GPU0, GPU1, ...). There is no way to switch between them in a user-friendly way, but you can read the device/vendor IDs present there and configure Chromium to use a specific GPU with flags:<br />
<br />
$ chromium --gpu-testing-vendor-id=0x8086 --gpu-testing-device-id=0x1912<br />
<br />
...where {{ic|0x8086}} and {{ic|0x1912}} is replaced by the IDs of the GPU you want to use (as shown on the {{ic|chrome://gpu}} page).<br />
<br />
==== Import bookmarks from Firefox ====<br />
<br />
To ease the transition, you can import bookmarks from [[Firefox]] into Chromium.<br />
<br />
Navigate Chromium to {{ic|chrome://settings/importData}}<br />
<br />
If Firefox is already installed on your computer, you can directly import bookmarks as well as many other things from Firefox.<br />
<br />
Make sure '''Mozilla Firefox''' is selected. Optionally, you can uncheck some unwanted items here. Click the '''Import''' and then '''Done'''. You are done with it.<br />
<br />
{{note|If you have not created any bookmarks in Chromium yet, the bookmarks will show up in your bookmarks bar. If you already have bookmarks, the bookmarks will be in a new folder labeled "Imported From Firefox"}}<br />
<br />
If you import bookmarks from another PC, you have to export bookmarks from Firefox first.<br />
<br />
{{ic|''Ctrl + Shift + O > Import and Backup > Export Bookmarks To HTML}} in Firefox''<br />
<br />
The procedure is pretty much the same. You need to go to {{ic|chrome://settings/importData}}. However, this time, in the '''From''' drop-down menu, select '''Bookmarks HTML File''' and click the '''Choose File''' button and upload the desired bookmark file.<br />
<br />
==== Enabling native notifications ====<br />
<br />
Go to {{ic|chrome://flags#enable-system-notifications}} and select ''Enabled''.<br />
<br />
==== U2F authentication ====<br />
<br />
Install {{Pkg|libfido2}} library. This provides the udev rules required to enable access to the [[U2F]] key as a user.<br />
U2F keys are by default only accessible by root, and without these rules Chromium will give an error.<br />
<br />
==== Dark mode ====<br />
<br />
To enable dark mode (used in ''prefers-color-scheme'' in CSS, JavaScript, Settings and Dev-Tools) and enable the dark theme (normally used for incognito mode) [[append]] the following flag to [[#Making flags persistent|persistent configuration]]:<br />
<br />
{{hc|1=~/.config/chromium-flags.conf|2=<br />
--force-dark-mode<br />
--enable-features=WebUIDarkMode<br />
}}<br />
<br />
===== Dark mode by system preference =====<br />
<br />
[https://bugs.chromium.org/p/chromium/issues/detail?id=998903 This Chromium issue] aims to bring dark mode based on GTK theme selection into Chromium.<br />
<br />
In the future, all that will be required to properly use system preference, is setting ''Designs'' to GTK in {{ic|chrome://settings/appearance}}.<br />
<br />
=== Profile maintenance ===<br />
<br />
Chromium uses [[SQLite]] databases to manage history and the like. Sqlite databases become fragmented over time and empty spaces appear all around. But, since there are no managing processes checking and optimizing the database, these factors eventually result in a performance hit. A good way to improve startup and some other bookmarks- and history-related tasks is to defragment and trim unused space from these databases.<br />
<br />
{{Pkg|profile-cleaner}} and {{AUR|browser-vacuum}} in the [[AUR]] do just this.<br />
<br />
=== Security ===<br />
<br />
==== Disable JIT ====<br />
<br />
At the cost of reduced performance, you can disable just-in-time compilation of JavaScript to native code, which is responsible for [https://microsoftedge.github.io/edgevr/posts/Super-Duper-Secure-Mode/ roughtly half of the security vulnerabilities in the JS engine], by passing {{ic|1=--js-flags=--jitless}} in {{ic|$HOME/.config/chromium-flags.conf}}.<br />
<br />
==== WebRTC ====<br />
<br />
WebRTC is a communication protocol that relies on JavaScript that can leak one's actual IP address and hardware hash from behind a VPN. While some software may prevent the leaking scripts from running, it's probably a good idea to block this protocol directly as well, just to be safe. As of October 2016, there is no way to disable WebRTC on Chromium on desktop, there are extensions available to disable local IP address leak, one is this [https://chrome.google.com/webstore/detail/webrtc-network-limiter/npeicpdbkakmehahjeeohfdhnlpdklia extension].<br />
<br />
One can test WebRTC via https://browserleaks.com/webrtc.<br />
<br />
{{Warning|Even though IP leak can be prevented, Chromium still sends your unique hash, and there is no way to prevent this. Read more on https://www.browserleaks.com/webrtc#webrtc-disable}}<br />
<br />
==== SSL certificates ====<br />
<br />
Chromium does not have an SSL certificate manager. It relies on the NSS Shared DB {{ic|~/.pki/nssdb}}. In order to add SSL certificates to the database, users will have to use the shell.<br />
<br />
===== Adding CAcert certificates for self-signed certificates =====<br />
<br />
Grab the CAcerts and create an {{ic|nssdb}}, if one does not already exist. To do this, first install the {{Pkg|nss}} package, then complete these steps:<br />
<br />
$ mkdir -p $HOME/.pki/nssdb<br />
$ cd $HOME/.pki/nssdb<br />
$ certutil -N -d sql:.<br />
<br />
$ curl -k -o "cacert-root.crt" "http://www.cacert.org/certs/root.crt"<br />
$ curl -k -o "cacert-class3.crt" "http://www.cacert.org/certs/class3.crt"<br />
$ certutil -d sql:$HOME/.pki/nssdb -A -t TC -n "CAcert.org" -i cacert-root.crt <br />
$ certutil -d sql:$HOME/.pki/nssdb -A -t TC -n "CAcert.org Class 3" -i cacert-class3.crt<br />
<br />
{{Note|Users will need to create a password for the database, if it does not exist.}}<br />
<br />
Now users may manually import a self-signed certificate.<br />
<br />
===== Example 1: Using a shell script to isolate the certificate from TomatoUSB =====<br />
<br />
Below is a simple script that will extract and add a certificate to the user's {{ic|nssdb}}:<br />
<br />
#!/bin/sh<br />
#<br />
# usage: import-cert.sh remote.host.name [port]<br />
#<br />
REMHOST=$1<br />
REMPORT=${2:-443}<br />
exec 6>&1<br />
exec > $REMHOST<br />
echo | openssl s_client -connect ${REMHOST}:${REMPORT} 2>&1 |sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p'<br />
certutil -d sql:$HOME/.pki/nssdb -A -t "P,," -n "$REMHOST" -i $REMHOST <br />
exec 1>&6 6>&-<br />
<br />
Syntax is advertised in the commented lines.<br />
<br />
References:<br />
*https://web.archive.org/web/20180718193807/https://blog.avirtualhome.com/adding-ssl-certificates-to-google-chrome-linux-ubuntu<br />
*https://chromium.googlesource.com/chromium/src/+/master/docs/linux/cert_management.md<br />
<br />
===== Example 2: Using Firefox to isolate the certificate from TomatoUSB =====<br />
<br />
The {{Pkg|firefox}} browser can be used to save the certificate to a file for manual import into the database.<br />
<br />
Using firefox:<br />
#Browse to the target URL.<br />
#Upon seeing the "This Connection is Untrusted" warning screen, click: ''I understand the Risks > Add Exception...''<br />
#Click: ''View > Details > Export'' and save the certificate to a temporary location ({{ic|/tmp/easy.pem}} in this example).<br />
<br />
Now import the certificate for use in Chromium:<br />
$ certutil -d sql:$HOME/.pki/nssdb -A -t TC -n "easy" -i /tmp/easy.pem<br />
<br />
{{Note|Adjust the name to match that of the certificate. In the example above, "easy" is the name of the certificate.}}<br />
<br />
Reference:<br />
*https://sahissam.blogspot.com/2012/06/new-ssl-certificates-for-tomatousb-and.html<br />
<br />
==== Canvas Fingerprinting ====<br />
<br />
Canvas fingerprinting is a technique that allows websites to identify users by detecting differences when rendering to an HTML5 canvas. This information can be made inaccessible by using the {{ic|--disable-reading-from-canvas}} flag.<br />
<br />
To confirm this is working run [https://panopticlick.eff.org this test] and make sure "hash of canvas fingerprint" is reported as undetermined in the full results.<br />
<br />
{{Note|1=<nowiki></nowiki><br />
* Some extensions require reading from canvas and may be broken by setting {{ic|--disable-reading-from-canvas}}.<br />
* YouTube player does not work properly without canvas reading. [https://github.com/qutebrowser/qutebrowser/issues/5345][https://bbs.archlinux.org/viewtopic.php?pid=1907406]<br />
}}<br />
<br />
==== Privacy extensions ====<br />
<br />
See [[Browser extensions#Privacy]].<br />
<br />
{{Tip|Installing too many extensions might take up much space in the toolbar. Those extensions which you would not interact with anyway (e.g. [https://chrome.google.com/webstore/detail/gcbommkclmclpchllfjekcdonpmejbdp HTTPS Everywhere]) can be hidden by right-clicking on the extension and choosing ''Hide in Chromium menu''.}}<br />
<br />
==== Do Not Track ====<br />
<br />
To enable [[wikipedia:Do Not Track|Do Not Track]], visit {{ic|chrome://settings}}, scroll down to ''Advanced'' and under ''Privacy and security'', check ''Send a "Do Not Track" request with your browsing traffic''.<br />
<br />
==== Force a password store ====<br />
<br />
Chromium uses a password store to store your passwords and the ''Chromium Safe Storage'' key, which is used to encrypt cookie values. [https://codereview.chromium.org/24734007]<br />
<br />
By default Chromium auto-detects which password store to use, which can lead to you apparently losing your passwords and cookies when switching to another desktop environment or window manager.<br />
<br />
You can force Chromium to use a specific password store by launching it with the {{ic|--password-store}} flag with one of following the values [https://chromium.googlesource.com/chromium/src/+/master/docs/linux/password_storage.md]:<br />
<br />
* {{ic|gnome}}, uses [[Gnome Keyring]]<br />
* {{ic|kwallet5}}, uses [[KDE Wallet]]<br />
* {{ic|basic}}, saves the passwords and the cookies' encryption key as plain text in the file {{ic|Login Data}}<br />
* {{ic|detect}}, the default auto-detect behavior<br />
<br />
For example, to force Chromium to use Gnome Keyring in another desktop or WM use {{ic|1=--password-store=gnome}}, see [[#Making flags persistent]] for making it permanent.<br />
<br />
When using a password store of another desktop environment you probably also want to unlock it automatically see: [[GNOME/Keyring#Using the keyring outside of GNOME]]{{Broken section link}} and [[KDE Wallet#Unlock KDE Wallet automatically on login]].<br />
<br />
== Troubleshooting ==<br />
<br />
=== Fonts ===<br />
<br />
{{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].}}<br />
<br />
==== Tab font size is too large ====<br />
<br />
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}}.<br />
<br />
=== WebGL ===<br />
<br />
There is the possibility that your graphics card has been blacklisted by Chromium. See [[#Force GPU acceleration]].<br />
<br />
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}}.<br />
<br />
Visit {{ic|chrome://gpu/}} for debugging information about WebGL support.<br />
<br />
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 are 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}}.<br />
<br />
=== Incorrect HiDPI rendering ===<br />
<br />
Chromium will automatically scale for a [[HiDPI]] display, however, this may cause an incorrect rendered GUI.<br />
<br />
The flag {{ic|1=--force-device-scale-factor=1}} may be used to overrule the automatic scaling factor.<br />
<br />
When [[#Native Wayland support|native Wayland support]] is enabled, Chromium will automatically scale based on the configured scale of each monitor.<br />
<br />
=== Password prompt on every start with GNOME Keyring ===<br />
<br />
See [[GNOME/Keyring#Passwords are not remembered]].<br />
<br />
=== Chromecasts in the network are not discovered ===<br />
<br />
You will need to enable the Media Router Component Extension in {{ic|chrome://flags/#load-media-router-component-extension}}.<br />
<br />
=== Everything is syncing except for password ===<br />
<br />
If synchronization is not working for password only (you can check it on {{ic|chrome://sync-internals/}}) delete profile login data:<br />
<br />
$ rm ~/.config/chromium/Default/Login\ Data*<br />
<br />
See [https://support.google.com/chrome/thread/9947763?hl=en&msgid=23687608 Google Chrome Help forum] for details.<br />
<br />
=== Losing cookies and passwords when switching between desktop environments ===<br />
<br />
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.<br />
<br />
See [[#Force a password store]].<br />
<br />
=== Hang on startup when Google Sync enabled ===<br />
<br />
Try launching Chrome with {{ic|1=--password-store=basic}} or another appropriate password store.<br />
<br />
See [[#Force a password store]].<br />
<br />
=== Chromium asks to be set as the default browser every time it starts ===<br />
<br />
If you are using KDE and have once set Firefox as the default browser (by clicking the button inside Firefox), you might find Chromium asks to be set as the default browser every time it starts, even if you click the "set as default" button.<br />
<br />
Chromium checks for this status by running {{ic|xdg-settings check default-web-browser chromium.desktop}}. If the output is "no", it is not considering itself to be the default browser. The script {{ic|xdg-settings}} checks for the following MIME associations and expect all of them to be {{ic|chromium.desktop}}:<br />
<br />
{{bc|<br />
x-scheme-handler/http<br />
x-scheme-handler/https<br />
text/html}}<br />
<br />
To fix it, go to ''System settings > Applications > Default applications > Web browser'' and choose Chromium. Then, set the MIME association for {{ic|text/html}}:<br />
<br />
$ xdg-mime default chromium.desktop text/html<br />
<br />
Finally, [[XDG_MIME_Applications#New_MIME_types|update the MIME database]]:<br />
<br />
$ update-mime-database ~/.local/share/mime<br />
<br />
=== "This browser or app may not be secure" error logging in to Google ===<br />
<br />
As of 2020.04.20 if you run chromium with {{ic|1=--remote-debugging-port=9222}} flag for web development, you cannot log in to your Google account. Temporarily disable this flag to login and then you can enable it back.<br />
<br />
=== Chromium stuck at 60fps when using a 144Hz + 60Hz monitor ===<br />
<br />
There is a suitable workaround for this issue, [[append]] the following flags to [[#Making flags persistent|persistent configuration]]:<br />
<br />
{{hc|1=~/.config/chromium-flags.conf|2=<br />
--use-gl=egl<br />
--ignore-gpu-blocklist<br />
--enable-gpu-rasterization<br />
}}<br />
<br />
This should make Chromium run at 144fps when used on your 144hz display, assuming your compositor is refreshing at 144fps. <br />
Keep in mind it might be a little choppy {{Bug|67035}}, but this is way better than it being stuck at 60fps.<br />
<br />
=== Chromium low scroll speed ===<br />
<br />
Mouse whell scrolling in chromium and electron based applications may be too slow for daily usage. Here are some solutions.<br />
<br />
[[Libinput#Mouse wheel scrolling speed scaling]] injects {{ic|libinput_event_pointer_get_axis_value}} function in libinput and provides an interface to change scale factor. This is not a application level injection, so an addition script for application specific scale factor tuning is needed. Note that scroll on chromium's small height developer tools may be too fast when scale factor is large enough.<br />
<br />
[[IMWheel]] increases scroll distance by replaying X wheel button event for multiple times. However, chromium assumes the real scroll and the replayed ones as two events. There is a small but noticeable delay tween them, so one mouse wheel scroll leads to twice page jumps. Also, touchpad scroll needs addition care.<br />
<br />
[https://chrome.google.com/webstore/detail/linux-scroll-speed-fix/mlboohjioameadaedfjcpemcaangkkbp Linux Scroll Speed Fix] and [https://chrome.google.com/webstore/detail/smoothscroll/nbokbjkabcmbfdlbddjidfmibcpneigj SmoothScroll] are two chromium extensions with suppport for scroll distance modification. Upon wheel scroll in a web page, the closest scrollable ancestor of current focused node will be found, then a scroll method with given pixel distance will be called on it, even if it has been scrolled to bottom. So once you scroll into a text editor or any scrollable element, you can never scroll out of it, except moving mouse. Also, extension based methods can not be used outside chromium.<br />
<br />
== See also ==<br />
<br />
* [https://www.chromium.org/ Chromium homepage]<br />
* [https://chromereleases.googleblog.com/ Google Chrome release notes]<br />
* [https://chrome.google.com/webstore/ Chrome web store]<br />
* [[Wikipedia:Chromium (web browser)#Differences from Google Chrome|Differences between Chromium and Google Chrome]]<br />
* [https://peter.sh/experiments/chromium-command-line-switches/ List of Chromium command-line switches]<br />
* [[Profile-sync-daemon]] - Systemd service that saves Chromium profile in tmpfs and syncs to disk<br />
* [[Tmpfs]] - Tmpfs Filesystem in {{ic|/etc/fstab}}<br />
* [https://www.kernel.org/doc/html/latest/filesystems/tmpfs.html Official tmpfs kernel Documentation]</div>GloriousYellowhttps://wiki.archlinux.org/index.php?title=Chromium&diff=700645Chromium2021-11-03T20:48:33Z<p>GloriousYellow: add info about GPU process crashing on XWayland and NVIDIA's proprietary driver</p>
<hr />
<div>[[Category:Web browser]]<br />
[[Category:Google]]<br />
[[de:Chromium]]<br />
[[es:Chromium]]<br />
[[ja:Chromium]]<br />
[[zh-hans:Chromium]]<br />
{{Related articles start}}<br />
{{Related|Browser extensions}}<br />
{{Related|Firefox}}<br />
{{Related|Opera}}<br />
{{Related articles end}}<br />
<br />
[[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.<br />
<br />
See [https://chromium.googlesource.com/chromium/src/+/master/docs/chromium_browser_vs_google_chrome.md this page] for an explanation of the differences between Chromium and Google Chrome. Additionally:<br />
<br />
* Sync is unavailable in Chromium 89+ (2021-03-02) [https://archlinux.org/news/chromium-losing-sync-support-in-early-march/]<br />
<br />
{{Note|Sync can be temporarily restored by [https://gist.github.com/foutrelis/14e339596b89813aa9c37fd1b4e5d9d5 using Chrome's OAuth2 credentials] or [https://www.chromium.org/developers/how-tos/api-keys getting your own], but pay attention to the disclaimers and do not consider this to be a long-term solution.<br />
Consider switching to [https://xbrowsersync.org xbrowsersync] for bookmarks syncing as long term solution.<br />
}}<br />
<br />
See [[List of applications/Internet#Blink-based]] for other browsers based on Chromium.<br />
<br />
== Installation ==<br />
<br />
There are several packages available to [[install]] Chromium with:<br />
<br />
* {{Pkg|chromium}} — stable release;<br />
* {{AUR|chromium-dev}} — development release;<br />
* {{AUR|chromium-snapshot-bin}} — nightly build.<br />
<br />
Google Chrome packages:<br />
<br />
* {{AUR|google-chrome}} — stable release;<br />
* {{AUR|google-chrome-beta}} — beta release;<br />
* {{AUR|google-chrome-dev}} — development release.<br />
<br />
{{Note|From the [https://www.chromium.org/Home/chromium-privacy Chromium privacy page]: "Features that communicate with Google made available through the compilation of code in Chromium are subject to the [https://www.google.com/policies/privacy/ Google Privacy Policy]." For those who want to avoid all integration with Google services, there are some [[List of applications/Internet#Privacy-focused chromium spin-offs|privacy-focused spin-offs]].}}<br />
<br />
== Configuration ==<br />
<br />
=== Default applications ===<br />
<br />
To set Chromium as the default browser and to change which applications Chromium launches when opening downloaded files, see [[default applications]].<br />
<br />
=== Certificates ===<br />
<br />
Chromium uses [[Network Security Services]] for certificate management. Certificates can be managed in {{ic|chrome://settings/certificates}}.<br />
<br />
=== Making flags persistent ===<br />
<br />
{{Note|The {{ic|chromium-flags.conf}} file and the accompanying custom launcher script are specific to the Arch Linux {{Pkg|chromium}} package. For {{AUR|google-chrome}} and {{AUR|google-chrome-dev}}, use {{ic|chrome-flags.conf}} and {{ic|chrome-dev-flags.conf}} instead.}}<br />
<br />
You can put your flags in a {{ic|chromium-flags.conf}} file under {{ic|$HOME/.config/}} (or under {{ic|$XDG_CONFIG_HOME}} if you have configured that environment variable).<br />
<br />
No special syntax is used; flags are defined as if they were written in a terminal.<br />
<br />
* The arguments are split on whitespace and shell quoting rules apply, but no further parsing is performed.<br />
* In case of improper quoting anywhere in the file, a fatal error is raised.<br />
* Flags can be placed in separate lines for readability, but this is not required.<br />
* Lines starting with a hash symbol (#) are skipped. (This is only supported by the {{Pkg|chromium}} launcher script and will not work when using {{ic|chrome-flags.conf}} with the {{AUR|google-chrome}} package.)<br />
<br />
Below is an example {{ic|chromium-flags.conf}} file that defines the flags {{ic|--start-maximized --incognito}}:<br />
<br />
{{hc|~/.config/chromium-flags.conf|<br />
# This line will be ignored.<br />
--start-maximized<br />
--incognito<br />
}}<br />
<br />
=== Force GPU acceleration ===<br />
<br />
{{Warning|Disabling the rendering blacklist may cause unstable behavior, including crashes of the host. See the bug reports in {{ic|chrome://gpu}} for details.}}<br />
<br />
By default Chromium on Linux does not use any GPU acceleration. To force GPU acceleration, [[append]] the following flags to [[/Tips and tricks#Making flags persistent|persistent configuration]]:<br />
<br />
{{hc|~/.config/chromium-flags.conf|<br />
--ignore-gpu-blocklist<br />
--enable-gpu-rasterization<br />
--enable-zero-copy<br />
}}<br />
<br />
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.<br />
<br />
{{ic|--enable-native-gpu-memory-buffers}} is broken since mesa 20.1.1 [https://gitlab.freedesktop.org/mesa/mesa/-/issues/3119#note_533902]<br />
<br />
=== Hardware video acceleration ===<br />
<br />
{{Note|1=<nowiki/><br />
* There is no official support from Chromium or Arch Linux for this feature [https://chromium.googlesource.com/chromium/src/+/master/docs/gpu/vaapi.md#vaapi-on-linux]. However, {{Pkg|chromium}} from official repositories is compiled with VA-API support and you may ask for help in [https://bbs.archlinux.org/viewtopic.php?id=244031 the dedicated forum thread].<br />
* Wayland is not supported.<br />
}}<br />
<br />
To enable VA-API support in Chromium:<br />
<br />
* Install the correct VA-API driver for your video card and verify VA-API has been enabled and working correctly, see [[Hardware video acceleration]]. For proprietary NVIDIA support, installing {{AUR|libva-vdpau-driver-chromium}} or {{AUR|libva-vdpau-driver-vp9-git}} is required.<br />
* Set the option {{ic|1=--enable-features=VaapiVideoDecoder}}. This is enough when using ANGLE GL renderer and {{Pkg|libva-intel-driver}}.<br />
* When using ANGLE, Chromium forces the older i965 driver and fails when {{Pkg|intel-media-driver}} is used. As a workaround, [[Hardware video acceleration#Configuring VA-API|configure VA-API manually]]. See [https://github.com/intel/media-driver/issues/818] for details.<br />
* To use the system GL renderer on Xorg, use either {{ic|1=--use-gl=egl}} or {{ic|1=--use-gl=desktop}}. On XWayland, use the {{ic|1=--use-gl=egl}} flag (Currently exhibits choppiness {{Bug|67035}} on some systems).<br />
<br />
==== Tips and tricks ====<br />
<br />
To check if it's working play a video which is using a codec supported by your VA-API driver (''vainfo'' tells you which codecs are supported, but Chromium will only support VP9 and h264):<br />
<br />
* Open the DevTools by pressing {{ic|Ctrl+Shift+I}} or on the ''Inspect'' button of the context (right-click) menu<br />
* Add the Media inspection tab: ''Hamburger menu > More tools > Media''<br />
* In the newly opened Media tab, look at the hardware decoder state of the video decoder<br />
<br />
Test on a large enough video. Starting with version 86, Chromium on desktop [https://bugs.chromium.org/p/chromium/issues/detail?id=684792 will only accelerate videos larger than 720p].<br />
<br />
To reduce CPU usage while watching YouTube where VP8/VP9 hardware decoding is not available use the [https://chrome.google.com/webstore/detail/h264ify/aleakchihdccplidncghkekgioiakgal h264ify] or [https://chrome.google.com/webstore/detail/enhanced-h264ify/omkfmpieigblcllmkgbflkikinpkodlk enhanced-h264ify] extension.<br />
<br />
On some systems (especially on XWayland) you might need to [[#Force GPU acceleration]]. Only {{ic|--ignore-gpu-blocklist}} is enough for our purposes.<br />
<br />
{{Expansion|Provide a link to some bug report.}}<br />
<br />
You might need to disable the Skia renderer, as it is currently not compatible with video decode acceleration: {{ic|1=--disable-features=UseSkiaRenderer}}<br />
<br />
=== PDF viewer plugin ===<br />
<br />
Chromium and Google Chrome are bundled with the ''Chromium PDF Viewer'' plugin. If you do not want to use this plugin, check ''Open PDFs using a different application'' in {{ic|chrome://settings/content/pdfDocuments}}.<br />
<br />
=== Flash Player plugin ===<br />
<br />
Support for Flash Player was removed in Chromium 88.[https://www.chromium.org/flash-roadmap#TOC-Flash-Support-Removed-from-Chromium-Target:-Chrome-88---Jan-2021-]<br />
<br />
=== Running on XWayland ===<br />
<br />
If you are using NVIDIA's proprietary driver, running Chromium on XWayland may cause the GPU process to occasionally crash. To prevent the GPU process from crashing, add the following flags:<br />
<br />
--use-angle=vulkan --use-cmd-decoder=passthrough<br />
<br />
=== Native Wayland support ===<br />
<br />
Since version 87, native [[Wayland]] support in Chromium can be enabled with the following flags [https://bugs.chromium.org/p/chromium/issues/detail?id=1085700]:<br />
<br />
--enable-features=UseOzonePlatform --ozone-platform=wayland<br />
<br />
See [[#Making flags persistent]] for a permanent configuration.<br />
<br />
If you switch between X11 and Wayland often, you can edit the Exec line in desktop file to the following:<br />
if [ "$XDG_SESSION_TYPE" = "wayland" ]; then /usr/bin/chromium --enable-features=UseOzonePlatform --ozone-platform=wayland %U ; else /usr/bin/chromium %U ; fi<br />
This will apply wayland flags only when in wayland session, so you can use a single desktop entry which is working for both session types.<br />
<br />
== Tips and tricks ==<br />
<br />
The following tips and tricks should work for both Chromium and Chrome unless explicitly stated.<br />
<br />
=== Browsing experience ===<br />
<br />
==== chrome:// URLs ====<br />
<br />
A number of tweaks can be accessed via Chrome URLs. See '''chrome://chrome-urls''' for a complete list.<br />
<br />
* '''chrome://flags''' - access experimental features such as WebGL and rendering webpages with GPU, etc.<br />
* '''chrome://extensions''' - view, enable and disable the currently used Chromium extensions.<br />
* '''chrome://gpu''' - status of different GPU options.<br />
* '''chrome://sandbox''' - indicate sandbox status.<br />
* '''chrome://version''' - display version and switches used to invoke the active {{ic|/usr/bin/chromium}}.<br />
<br />
An automatically updated, complete listing of Chromium switches (command line parameters) is available [https://peter.sh/experiments/chromium-command-line-switches/ here].<br />
<br />
==== Chromium task manager ====<br />
<br />
Shift+ESC can be used to bring up the browser task manager wherein memory, CPU, and network usage can be viewed.<br />
<br />
==== Chromium overrides/overwrites Preferences file ====<br />
<br />
If you enabled syncing with a Google Account, then Chromium will override any direct edits to the Preferences file found under {{ic|~/.config/chromium/Default/Preferences}}. To work around this, start Chromium with the {{ic|--disable-sync-preferences}} switch:<br />
$ chromium --disable-sync-preferences<br />
<br />
If Chromium is started in the background when you login in to your desktop environment, make sure the command your desktop environment uses is:<br />
$ chromium --disable-sync-preferences --no-startup-window<br />
<br />
==== Search engines ====<br />
<br />
Make sites like [https://wiki.archlinux.org wiki.archlinux.org] and [https://en.wikipedia.org wikipedia.org] easily searchable by first executing a search on those pages, then going to ''Settings > Search'' and click the ''Manage search engines..'' button. From there, "Edit" the Wikipedia entry and change its keyword to '''w''' (or some other shortcut you prefer). Now searching Wikipedia for "Arch Linux" from the address bar is done simply by entering "'''w arch linux'''".<br />
<br />
{{Note| Google search is used automatically when typing something into the URL bar. A hard-coded keyword trigger is also available using the '''?''' prefix.}}<br />
<br />
==== Tmpfs ====<br />
<br />
===== Cache in tmpfs =====<br />
<br />
{{Note|Chromium stores its cache separate from its browser profile directory.}}<br />
<br />
To limit Chromium from writing its cache to a physical disk, one can define an alternative location via the {{ic|--disk-cache-dir}} flag:<br />
$ chromium --disk-cache-dir="$XDG_RUNTIME_DIR/chromium-cache"<br />
<br />
Cache should be considered temporary and will '''not''' be saved after a reboot or hard lock. Another option is to setup the space in {{ic|/etc/fstab}}:<br />
<br />
{{hc|/etc/fstab|2=<br />
tmpfs /home/''username''/.cache tmpfs noatime,nodev,nosuid,size=400M 0 0<br />
}}<br />
<br />
===== Profile in tmpfs =====<br />
<br />
Relocate the browser profile to a [[Wikipedia:Tmpfs|tmpfs]] filesystem, including {{ic|/tmp}}, or {{ic|/dev/shm}} for improvements in application response as the entire profile is now stored in RAM.<br />
<br />
Use an active profile management tool such as {{Pkg|profile-sync-daemon}} for maximal reliability and ease of use. It symlinks or bind mounts and syncs the browser profile directories to RAM. For more, see [[Profile-sync-daemon]].<br />
<br />
==== Launch a new browser instance ====<br />
<br />
When you launch the browser, it first checks if another instance using the same data directory is already running. If there is one, the new window is associated with the old instance. If you want to launch an independent instance of the browser, you must specify separate directory using the {{ic|--user-data-dir}} parameter:<br />
<br />
$ chromium --user-data-dir=''/path/to/some/directory''<br />
<br />
{{Note|The default location of the user data is {{ic|~/.config/chromium/}}.}}<br />
<br />
==== Directly open *.torrent files and magnet links with a torrent client ====<br />
<br />
By default, Chromium downloads {{ic|*.torrent}} files directly and you need to click the notification from the bottom-left corner of the screen in order for the file to be opened with your default torrent client. This can be avoided with the following method:<br />
<br />
* Download a {{ic|*.torrent}} file.<br />
* Right-click the notification displayed at the bottom-left corner of the screen.<br />
* Check the "''Always Open Files of This Type''" checkbox.<br />
<br />
See [[xdg-open]] to change the default assocation.<br />
<br />
==== Touch Scrolling on touchscreen devices ====<br />
<br />
You may need to specify which touch device to use. Find your touchscreen device with {{ic| xinput list}} then launch Chromium with the {{ic|1=--touch-devices='''x'''}} parameter, where "'''x'''" is the id of your device. {{Note|If the device is designated as a slave pointer, using this may not work, use the master pointer's ID instead.}}<br />
<br />
==== Reduce memory usage ====<br />
<br />
By default, Chromium uses a separate OS process for each ''instance'' of a visited web site. [https://www.chromium.org/developers/design-documents/process-models#Supported_Models] However, you can specify command-line switches when starting Chromium to modify this behaviour.<br />
<br />
For example, to share one process for all instances of a website:<br />
<br />
$ chromium --process-per-site<br />
<br />
To use a single process model:<br />
<br />
$ chromium --single-process<br />
<br />
{{Warning|The single-process model is discouraged because it is unsafe and may contain bugs not present in other models.[https://www.chromium.org/developers/design-documents/process-models#TOC-Single-process]}}<br />
<br />
In addition, you can suspend or store inactive Tabs with extensions such as [https://chrome.google.com/webstore/detail/tab-suspender/fiabciakcmgepblmdkmemdbbkilneeeh?hl=en Tab Suspender] and [https://chrome.google.com/webstore/detail/onetab/chphlpgkkbolifaimnlloiipkdnihall?hl=en OneTab].<br />
<br />
==== User Agent ====<br />
<br />
The User Agent can be arbitrarily modified at the start of Chromium's base instance via its {{Ic|<nowiki>--user-agent="[string]"</nowiki>}} parameter.<br />
<br />
==== DOM Distiller ====<br />
<br />
Chromium has a similar reader mode to Firefox. In this case it's called DOM Distiller, which is an [https://github.com/chromium/dom-distiller open source project].<br />
It is disabled by default, but can be enabled using the {{Ic|chrome://flags/#enable-reader-mode}} flag, which you can also make [[#Making flags persistent|persistent]].<br />
Not only does DOM Distiller provide a better reading experience by distilling the content of the page, it also simplifies pages for print. Even though the latter checkbox option has been removed from the print dialog, you can still print the distilled page, which basically has the same effect.<br />
<br />
After enabling the flag, you will find a new "Toggle reader mode" menu item and corresponding icon in the address bar when Chromium thinks the website you are visiting could do with some distilling.<br />
<br />
==== Forcing specific GPU ====<br />
<br />
In multi-GPU systems, Chromium automatically detects which GPU should be used for rendering (discrete or integrated). This works 99% of the time, except when it does not - if a unavailable GPU is picked (for example, discrete graphics on VFIO GPU passthrough-enabled systems), {{ic|chrome://gpu}} will complain about not being able to initialize the GPU process. On the same page below '''Driver Information''' there will be multiple GPUs shown (GPU0, GPU1, ...). There is no way to switch between them in a user-friendly way, but you can read the device/vendor IDs present there and configure Chromium to use a specific GPU with flags:<br />
<br />
$ chromium --gpu-testing-vendor-id=0x8086 --gpu-testing-device-id=0x1912<br />
<br />
...where {{ic|0x8086}} and {{ic|0x1912}} is replaced by the IDs of the GPU you want to use (as shown on the {{ic|chrome://gpu}} page).<br />
<br />
==== Import bookmarks from Firefox ====<br />
<br />
To ease the transition, you can import bookmarks from [[Firefox]] into Chromium.<br />
<br />
Navigate Chromium to {{ic|chrome://settings/importData}}<br />
<br />
If Firefox is already installed on your computer, you can directly import bookmarks as well as many other things from Firefox.<br />
<br />
Make sure '''Mozilla Firefox''' is selected. Optionally, you can uncheck some unwanted items here. Click the '''Import''' and then '''Done'''. You are done with it.<br />
<br />
{{note|If you have not created any bookmarks in Chromium yet, the bookmarks will show up in your bookmarks bar. If you already have bookmarks, the bookmarks will be in a new folder labeled "Imported From Firefox"}}<br />
<br />
If you import bookmarks from another PC, you have to export bookmarks from Firefox first.<br />
<br />
{{ic|''Ctrl + Shift + O > Import and Backup > Export Bookmarks To HTML}} in Firefox''<br />
<br />
The procedure is pretty much the same. You need to go to {{ic|chrome://settings/importData}}. However, this time, in the '''From''' drop-down menu, select '''Bookmarks HTML File''' and click the '''Choose File''' button and upload the desired bookmark file.<br />
<br />
==== Enabling native notifications ====<br />
<br />
Go to {{ic|chrome://flags#enable-system-notifications}} and select ''Enabled''.<br />
<br />
==== U2F authentication ====<br />
<br />
Install {{Pkg|libfido2}} library. This provides the udev rules required to enable access to the [[U2F]] key as a user.<br />
U2F keys are by default only accessible by root, and without these rules Chromium will give an error.<br />
<br />
==== Dark mode ====<br />
<br />
To enable dark mode (used in ''prefers-color-scheme'' in CSS, JavaScript, Settings and Dev-Tools) and enable the dark theme (normally used for incognito mode) [[append]] the following flag to [[#Making flags persistent|persistent configuration]]:<br />
<br />
{{hc|1=~/.config/chromium-flags.conf|2=<br />
--force-dark-mode<br />
--enable-features=WebUIDarkMode<br />
}}<br />
<br />
===== Dark mode by system preference =====<br />
<br />
[https://bugs.chromium.org/p/chromium/issues/detail?id=998903 This Chromium issue] aims to bring dark mode based on GTK theme selection into Chromium.<br />
<br />
In the future, all that will be required to properly use system preference, is setting ''Designs'' to GTK in {{ic|chrome://settings/appearance}}.<br />
<br />
=== Profile maintenance ===<br />
<br />
Chromium uses [[SQLite]] databases to manage history and the like. Sqlite databases become fragmented over time and empty spaces appear all around. But, since there are no managing processes checking and optimizing the database, these factors eventually result in a performance hit. A good way to improve startup and some other bookmarks- and history-related tasks is to defragment and trim unused space from these databases.<br />
<br />
{{Pkg|profile-cleaner}} and {{AUR|browser-vacuum}} in the [[AUR]] do just this.<br />
<br />
=== Security ===<br />
<br />
==== Disable JIT ====<br />
<br />
At the cost of reduced performance, you can disable just-in-time compilation of JavaScript to native code, which is responsible for [https://microsoftedge.github.io/edgevr/posts/Super-Duper-Secure-Mode/ roughtly half of the security vulnerabilities in the JS engine], by passing {{ic|1=--js-flags=--jitless}} in {{ic|$HOME/.config/chromium-flags.conf}}.<br />
<br />
==== WebRTC ====<br />
<br />
WebRTC is a communication protocol that relies on JavaScript that can leak one's actual IP address and hardware hash from behind a VPN. While some software may prevent the leaking scripts from running, it's probably a good idea to block this protocol directly as well, just to be safe. As of October 2016, there is no way to disable WebRTC on Chromium on desktop, there are extensions available to disable local IP address leak, one is this [https://chrome.google.com/webstore/detail/webrtc-network-limiter/npeicpdbkakmehahjeeohfdhnlpdklia extension].<br />
<br />
One can test WebRTC via https://browserleaks.com/webrtc.<br />
<br />
{{Warning|Even though IP leak can be prevented, Chromium still sends your unique hash, and there is no way to prevent this. Read more on https://www.browserleaks.com/webrtc#webrtc-disable}}<br />
<br />
==== SSL certificates ====<br />
<br />
Chromium does not have an SSL certificate manager. It relies on the NSS Shared DB {{ic|~/.pki/nssdb}}. In order to add SSL certificates to the database, users will have to use the shell.<br />
<br />
===== Adding CAcert certificates for self-signed certificates =====<br />
<br />
Grab the CAcerts and create an {{ic|nssdb}}, if one does not already exist. To do this, first install the {{Pkg|nss}} package, then complete these steps:<br />
<br />
$ mkdir -p $HOME/.pki/nssdb<br />
$ cd $HOME/.pki/nssdb<br />
$ certutil -N -d sql:.<br />
<br />
$ curl -k -o "cacert-root.crt" "http://www.cacert.org/certs/root.crt"<br />
$ curl -k -o "cacert-class3.crt" "http://www.cacert.org/certs/class3.crt"<br />
$ certutil -d sql:$HOME/.pki/nssdb -A -t TC -n "CAcert.org" -i cacert-root.crt <br />
$ certutil -d sql:$HOME/.pki/nssdb -A -t TC -n "CAcert.org Class 3" -i cacert-class3.crt<br />
<br />
{{Note|Users will need to create a password for the database, if it does not exist.}}<br />
<br />
Now users may manually import a self-signed certificate.<br />
<br />
===== Example 1: Using a shell script to isolate the certificate from TomatoUSB =====<br />
<br />
Below is a simple script that will extract and add a certificate to the user's {{ic|nssdb}}:<br />
<br />
#!/bin/sh<br />
#<br />
# usage: import-cert.sh remote.host.name [port]<br />
#<br />
REMHOST=$1<br />
REMPORT=${2:-443}<br />
exec 6>&1<br />
exec > $REMHOST<br />
echo | openssl s_client -connect ${REMHOST}:${REMPORT} 2>&1 |sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p'<br />
certutil -d sql:$HOME/.pki/nssdb -A -t "P,," -n "$REMHOST" -i $REMHOST <br />
exec 1>&6 6>&-<br />
<br />
Syntax is advertised in the commented lines.<br />
<br />
References:<br />
*https://web.archive.org/web/20180718193807/https://blog.avirtualhome.com/adding-ssl-certificates-to-google-chrome-linux-ubuntu<br />
*https://chromium.googlesource.com/chromium/src/+/master/docs/linux/cert_management.md<br />
<br />
===== Example 2: Using Firefox to isolate the certificate from TomatoUSB =====<br />
<br />
The {{Pkg|firefox}} browser can be used to save the certificate to a file for manual import into the database.<br />
<br />
Using firefox:<br />
#Browse to the target URL.<br />
#Upon seeing the "This Connection is Untrusted" warning screen, click: ''I understand the Risks > Add Exception...''<br />
#Click: ''View > Details > Export'' and save the certificate to a temporary location ({{ic|/tmp/easy.pem}} in this example).<br />
<br />
Now import the certificate for use in Chromium:<br />
$ certutil -d sql:$HOME/.pki/nssdb -A -t TC -n "easy" -i /tmp/easy.pem<br />
<br />
{{Note|Adjust the name to match that of the certificate. In the example above, "easy" is the name of the certificate.}}<br />
<br />
Reference:<br />
*https://sahissam.blogspot.com/2012/06/new-ssl-certificates-for-tomatousb-and.html<br />
<br />
==== Canvas Fingerprinting ====<br />
<br />
Canvas fingerprinting is a technique that allows websites to identify users by detecting differences when rendering to an HTML5 canvas. This information can be made inaccessible by using the {{ic|--disable-reading-from-canvas}} flag.<br />
<br />
To confirm this is working run [https://panopticlick.eff.org this test] and make sure "hash of canvas fingerprint" is reported as undetermined in the full results.<br />
<br />
{{Note|1=<nowiki></nowiki><br />
* Some extensions require reading from canvas and may be broken by setting {{ic|--disable-reading-from-canvas}}.<br />
* YouTube player does not work properly without canvas reading. [https://github.com/qutebrowser/qutebrowser/issues/5345][https://bbs.archlinux.org/viewtopic.php?pid=1907406]<br />
}}<br />
<br />
==== Privacy extensions ====<br />
<br />
See [[Browser extensions#Privacy]].<br />
<br />
{{Tip|Installing too many extensions might take up much space in the toolbar. Those extensions which you would not interact with anyway (e.g. [https://chrome.google.com/webstore/detail/gcbommkclmclpchllfjekcdonpmejbdp HTTPS Everywhere]) can be hidden by right-clicking on the extension and choosing ''Hide in Chromium menu''.}}<br />
<br />
==== Do Not Track ====<br />
<br />
To enable [[wikipedia:Do Not Track|Do Not Track]], visit {{ic|chrome://settings}}, scroll down to ''Advanced'' and under ''Privacy and security'', check ''Send a "Do Not Track" request with your browsing traffic''.<br />
<br />
==== Force a password store ====<br />
<br />
Chromium uses a password store to store your passwords and the ''Chromium Safe Storage'' key, which is used to encrypt cookie values. [https://codereview.chromium.org/24734007]<br />
<br />
By default Chromium auto-detects which password store to use, which can lead to you apparently losing your passwords and cookies when switching to another desktop environment or window manager.<br />
<br />
You can force Chromium to use a specific password store by launching it with the {{ic|--password-store}} flag with one of following the values [https://chromium.googlesource.com/chromium/src/+/master/docs/linux/password_storage.md]:<br />
<br />
* {{ic|gnome}}, uses [[Gnome Keyring]]<br />
* {{ic|kwallet5}}, uses [[KDE Wallet]]<br />
* {{ic|basic}}, saves the passwords and the cookies' encryption key as plain text in the file {{ic|Login Data}}<br />
* {{ic|detect}}, the default auto-detect behavior<br />
<br />
For example, to force Chromium to use Gnome Keyring in another desktop or WM use {{ic|1=--password-store=gnome}}, see [[#Making flags persistent]] for making it permanent.<br />
<br />
When using a password store of another desktop environment you probably also want to unlock it automatically see: [[GNOME/Keyring#Using the keyring outside of GNOME]]{{Broken section link}} and [[KDE Wallet#Unlock KDE Wallet automatically on login]].<br />
<br />
== Troubleshooting ==<br />
<br />
=== Fonts ===<br />
<br />
{{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].}}<br />
<br />
==== Tab font size is too large ====<br />
<br />
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}}.<br />
<br />
=== WebGL ===<br />
<br />
There is the possibility that your graphics card has been blacklisted by Chromium. See [[#Force GPU acceleration]].<br />
<br />
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}}.<br />
<br />
Visit {{ic|chrome://gpu/}} for debugging information about WebGL support.<br />
<br />
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 are 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}}.<br />
<br />
=== Incorrect HiDPI rendering ===<br />
<br />
Chromium will automatically scale for a [[HiDPI]] display, however, this may cause an incorrect rendered GUI.<br />
<br />
The flag {{ic|1=--force-device-scale-factor=1}} may be used to overrule the automatic scaling factor.<br />
<br />
When [[#Native Wayland support|native Wayland support]] is enabled, Chromium will automatically scale based on the configured scale of each monitor.<br />
<br />
=== Password prompt on every start with GNOME Keyring ===<br />
<br />
See [[GNOME/Keyring#Passwords are not remembered]].<br />
<br />
=== Chromecasts in the network are not discovered ===<br />
<br />
You will need to enable the Media Router Component Extension in {{ic|chrome://flags/#load-media-router-component-extension}}.<br />
<br />
=== Everything is syncing except for password ===<br />
<br />
If synchronization is not working for password only (you can check it on {{ic|chrome://sync-internals/}}) delete profile login data:<br />
<br />
$ rm ~/.config/chromium/Default/Login\ Data*<br />
<br />
See [https://support.google.com/chrome/thread/9947763?hl=en&msgid=23687608 Google Chrome Help forum] for details.<br />
<br />
=== Losing cookies and passwords when switching between desktop environments ===<br />
<br />
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.<br />
<br />
See [[#Force a password store]].<br />
<br />
=== Hang on startup when Google Sync enabled ===<br />
<br />
Try launching Chrome with {{ic|1=--password-store=basic}} or another appropriate password store.<br />
<br />
See [[#Force a password store]].<br />
<br />
=== Chromium asks to be set as the default browser every time it starts ===<br />
<br />
If you are using KDE and have once set Firefox as the default browser (by clicking the button inside Firefox), you might find Chromium asks to be set as the default browser every time it starts, even if you click the "set as default" button.<br />
<br />
Chromium checks for this status by running {{ic|xdg-settings check default-web-browser chromium.desktop}}. If the output is "no", it is not considering itself to be the default browser. The script {{ic|xdg-settings}} checks for the following MIME associations and expect all of them to be {{ic|chromium.desktop}}:<br />
<br />
{{bc|<br />
x-scheme-handler/http<br />
x-scheme-handler/https<br />
text/html}}<br />
<br />
To fix it, go to ''System settings > Applications > Default applications > Web browser'' and choose Chromium. Then, set the MIME association for {{ic|text/html}}:<br />
<br />
$ xdg-mime default chromium.desktop text/html<br />
<br />
Finally, [[XDG_MIME_Applications#New_MIME_types|update the MIME database]]:<br />
<br />
$ update-mime-database ~/.local/share/mime<br />
<br />
=== "This browser or app may not be secure" error logging in to Google ===<br />
<br />
As of 2020.04.20 if you run chromium with {{ic|1=--remote-debugging-port=9222}} flag for web development, you cannot log in to your Google account. Temporarily disable this flag to login and then you can enable it back.<br />
<br />
=== Chromium stuck at 60fps when using a 144Hz + 60Hz monitor ===<br />
<br />
There is a suitable workaround for this issue, [[append]] the following flags to [[#Making flags persistent|persistent configuration]]:<br />
<br />
{{hc|1=~/.config/chromium-flags.conf|2=<br />
--use-gl=egl<br />
--ignore-gpu-blocklist<br />
--enable-gpu-rasterization<br />
}}<br />
<br />
This should make Chromium run at 144fps when used on your 144hz display, assuming your compositor is refreshing at 144fps. <br />
Keep in mind it might be a little choppy {{Bug|67035}}, but this is way better than it being stuck at 60fps.<br />
<br />
=== Chromium low scroll speed ===<br />
<br />
Mouse whell scrolling in chromium and electron based applications may be too slow for daily usage. Here are some solutions.<br />
<br />
[[Libinput#Mouse wheel scrolling speed scaling]] injects {{ic|libinput_event_pointer_get_axis_value}} function in libinput and provides an interface to change scale factor. This is not a application level injection, so an addition script for application specific scale factor tuning is needed. Note that scroll on chromium's small height developer tools may be too fast when scale factor is large enough.<br />
<br />
[[IMWheel]] increases scroll distance by replaying X wheel button event for multiple times. However, chromium assumes the real scroll and the replayed ones as two events. There is a small but noticeable delay tween them, so one mouse wheel scroll leads to twice page jumps. Also, touchpad scroll needs addition care.<br />
<br />
[https://chrome.google.com/webstore/detail/linux-scroll-speed-fix/mlboohjioameadaedfjcpemcaangkkbp Linux Scroll Speed Fix] and [https://chrome.google.com/webstore/detail/smoothscroll/nbokbjkabcmbfdlbddjidfmibcpneigj SmoothScroll] are two chromium extensions with suppport for scroll distance modification. Upon wheel scroll in a web page, the closest scrollable ancestor of current focused node will be found, then a scroll method with given pixel distance will be called on it, even if it has been scrolled to bottom. So once you scroll into a text editor or any scrollable element, you can never scroll out of it, except moving mouse. Also, extension based methods can not be used outside chromium.<br />
<br />
== See also ==<br />
<br />
* [https://www.chromium.org/ Chromium homepage]<br />
* [https://chromereleases.googleblog.com/ Google Chrome release notes]<br />
* [https://chrome.google.com/webstore/ Chrome web store]<br />
* [[Wikipedia:Chromium (web browser)#Differences from Google Chrome|Differences between Chromium and Google Chrome]]<br />
* [https://peter.sh/experiments/chromium-command-line-switches/ List of Chromium command-line switches]<br />
* [[Profile-sync-daemon]] - Systemd service that saves Chromium profile in tmpfs and syncs to disk<br />
* [[Tmpfs]] - Tmpfs Filesystem in {{ic|/etc/fstab}}<br />
* [https://www.kernel.org/doc/html/latest/filesystems/tmpfs.html Official tmpfs kernel Documentation]</div>GloriousYellowhttps://wiki.archlinux.org/index.php?title=GDM&diff=683943GDM2021-06-26T18:30:46Z<p>GloriousYellow: /* Wayland and the proprietary NVIDIA driver */ add info about integrated graphics</p>
<hr />
<div>[[Category:Display managers]]<br />
[[Category:GNOME]]<br />
[[de:Login-Manager#GDM]]<br />
[[es:GDM]]<br />
[[fr:GDM]]<br />
[[ja:GDM]]<br />
[[pt:GDM]]<br />
[[zh-hans:GDM]]<br />
{{Related articles start}}<br />
{{Related|GNOME}}<br />
{{Related|Display manager}}<br />
{{Related articles end}}<br />
From [https://wiki.gnome.org/Projects/GDM GDM - GNOME Display Manager]: "The GNOME Display Manager (GDM) is a program that manages graphical display servers and handles graphical user logins."<br />
<br />
[[Display manager]]s provide [[X Window System]] and [[Wayland]] users with a graphical login prompt.<br />
<br />
== Installation ==<br />
<br />
GDM can be [[install]]ed with the {{Pkg|gdm}} package, and it is installed as part of the {{grp|gnome}} group.<br />
<br />
If you would prefer to use legacy GDM which was used in GNOME 2 and has its own configuration utility, install the {{AUR|gdm-old}} package. Note that the rest of this article discusses current GDM, not legacy GDM, unless indicated otherwise.<br />
<br />
You might also wish to install the following:<br />
<br />
* {{App|loginized|Gnome GDM Login Theme Manager.|https://github.com/juhaku/loginized|{{AUR|loginized}}}}<br />
<br />
== Starting ==<br />
<br />
To start GDM at boot time [[enable]] {{ic|gdm.service}}.<br />
<br />
=== Autostarting applications ===<br />
<br />
{{accuracy|this works only with X desktop environments|section=GDM with wayland does not use xprofile for autostarting}}<br />
<br />
One might want to autostart certain commands, such as ''xrandr'' for instance, on login. This can be achieved by adding a command or script to a location that is sourced by the display manager. See [[Display manager#Autostarting]] for a list of supported locations. <br />
<br />
{{Note|1=The {{ic|/etc/gdm/Init}} directory is no longer a supported location, see [https://bugzilla.gnome.org/show_bug.cgi?id=751602#c2].}}<br />
<br />
== Configuration ==<br />
<br />
=== Log-in screen background image ===<br />
<br />
{{Accuracy|Configuration is not persistent and will be gone after gdm update. Needs to be rewritten to enable user-themes gnome-shell extension for gdm user and use custom theme and set gsetting to use that theme}}<br />
<br />
{{Note|<br />
* Since GNOME 3.16, GNOME Shell themes are now stored as binary files (gresource).<br />
* This change will be overwritten on subsequent updates of {{Pkg|gnome-shell}}.<br />
}}<br />
<br />
Firstly, you need to extract the existing GNOME Shell theme to a folder in your home directory. You can do this using the following script:<br />
<br />
{{hc|extractgst.sh|2=<br />
#!/bin/sh<br />
gst=/usr/share/gnome-shell/gnome-shell-theme.gresource<br />
workdir=${HOME}/shell-theme<br />
<br />
for r in `gresource list $gst`; do<br />
r=${r#\/org\/gnome\/shell/}<br />
if [ ! -d $workdir/${r%/*} ]; then<br />
mkdir -p $workdir/${r%/*}<br />
fi<br />
done<br />
<br />
for r in `gresource list $gst`; do<br />
gresource extract $gst $r >$workdir/${r#\/org\/gnome\/shell/}<br />
done<br />
}}<br />
<br />
Navigate to the created directory. You should find that the theme files have been extracted to it. Now copy your preferred background image to this directory.<br />
<br />
Next, you need to create a file in the directory with the following content:<br />
<br />
{{hc|1=gnome-shell-theme.gresource.xml|2=<br />
<?xml version="1.0" encoding="UTF-8"?><br />
<gresources><br />
<gresource prefix="/org/gnome/shell/theme"><br />
<file>calendar-today.svg</file><br />
<file>checkbox-focused.svg</file><br />
<file>checkbox-off-focused.svg</file><br />
<file>checkbox-off.svg</file><br />
<file>checkbox.svg</file><br />
<file>dash-placeholder.svg</file><br />
<file>gnome-shell.css</file><br />
<file>gnome-shell-high-contrast.css</file><br />
<file>icons/scalable/status/eye-not-looking-symbolic.svg</file><br />
<file>icons/scalable/status/eye-open-negative-filled-symbolic.svg</file><br />
<file>icons/scalable/status/message-indicator-symbolic.svg</file><br />
<file>icons/scalable/status/keyboard-enter-symbolic.svg</file><br />
<file>icons/scalable/status/keyboard-hide-symbolic.svg</file><br />
<file>icons/scalable/status/keyboard-layout-filled-symbolic.svg</file><br />
<file>icons/scalable/status/keyboard-shift-filled-symbolic.svg</file><br />
<file>icons/scalable/status/keyboard-caps-lock-filled-symbolic.svg</file><br />
<file>icons/scalable/actions/color-pick.svg</file><br />
<file>icons/scalable/actions/pointer-double-click-symbolic.svg</file><br />
<file>icons/scalable/actions/pointer-drag-symbolic.svg</file><br />
<file>icons/scalable/actions/pointer-primary-click-symbolic.svg</file><br />
<file>icons/scalable/actions/pointer-secondary-click-symbolic.svg</file><br />
<file>'''filename'''</file><br />
<file>no-events.svg</file><br />
<file>no-notifications.svg</file><br />
<file>pad-osd.css</file><br />
<file>process-working.svg</file><br />
<file>toggle-off-dark.svg</file><br />
<file>toggle-off-hc.svg</file><br />
<file>toggle-off.svg</file><br />
<file>toggle-on-dark.svg</file><br />
<file>toggle-on-hc.svg</file><br />
<file>toggle-on.svg</file><br />
</gresource><br />
</gresources><br />
}}<br />
<br />
Replace '''filename''' with the filename of your background image or remove the line to use a hex color value instead.<br />
<br />
Now, open the {{ic|gnome-shell.css}} file in the directory and change the {{ic|#lockDialogGroup}} definition as follows:<br />
<br />
#lockDialogGroup {<br />
background: url('''filename''');<br />
background-size: '''[WIDTH]'''px '''[HEIGHT]'''px;<br />
background-repeat: no-repeat;<br />
}<br />
<br />
Set {{ic|background-size}} to the resolution that GDM uses, this might not necessarily be the resolution of the image. For a list of display resolutions see [[wikipedia:Display_resolution#Computer_monitors|Display resolution]]. Again, set '''filename''' to be the name of the background image.<br />
<br />
If you only want to change the background color, adjust the {{ic|#lockDialogGroup}} definition as follows:<br />
<br />
#lockDialogGroup {<br />
background-color: #[COLOR];<br />
}<br />
<br />
where '''[COLOR]''' is the new hex-encoded background color.<br />
<br />
Finally, compile the theme using the following command:<br />
<br />
$ glib-compile-resources gnome-shell-theme.gresource.xml<br />
<br />
Then copy the resulting {{ic|gnome-shell-theme.gresource}} file to the {{ic|/usr/share/gnome-shell}} directory.<br />
<br />
Then restart {{ic|gdm.service}} (note that simply logging out is not enough) and you should find that it is using your preferred background image.<br />
<br />
For more information, please see the following [https://bbs.archlinux.org/viewtopic.php?id&#61;197036 forum thread]. A shell script to automate the above steps is available on [https://github.com/DimaZirix/fedora-gdm-wallpaper DimaZirix's github repository].<br />
<br />
=== dconf configuration ===<br />
<br />
Some GDM settings are stored in a dconf database. They can be configured either by adding ''keyfiles'' to the {{ic|/etc/dconf/db/gdm.d}} directory and then recompiling the GDM database by running {{ic|dconf update}} as root or by logging into the GDM user on the system and changing the setting directly using the ''gsettings'' command line tool. Note that for the former approach, a GDM profile file is required—this must be created manually as it is no longer shipped upstream, see below:<br />
<br />
{{hc|/etc/dconf/profile/gdm|<br />
user-db:user<br />
system-db:gdm<br />
file-db:/usr/share/gdm/greeter-dconf-defaults<br />
}}<br />
<br />
For the latter approach, you can log into the GDM user with the command below:<br />
<br />
# machinectl shell gdm@ /bin/bash<br />
<br />
==== Log-in screen logo ====<br />
<br />
Either create the following keyfile<br />
<br />
{{hc|/etc/dconf/db/gdm.d/02-logo|2=<br />
[org/gnome/login-screen]<br />
logo=<nowiki>'</nowiki>''/path/to/logo.png''<nowiki>'</nowiki><br />
}}<br />
<br />
and then recompile the GDM database or alternatively log in to the GDM user and execute the following:<br />
<br />
$ gsettings set org.gnome.login-screen logo <nowiki>'</nowiki>''/path/to/logo.png''<nowiki>'</nowiki><br />
<br />
==== Changing the cursor theme ====<br />
<br />
GDM disregards [[GNOME]] cursor theme settings and it also ignores the cursor theme set according to the [[Cursor themes#XDG specification|XDG specification]]. To change the cursor theme used in GDM, either create the following keyfile<br />
<br />
{{hc|/etc/dconf/db/gdm.d/10-cursor-settings|<br />
<nowiki>[org/gnome/desktop/interface]<br />
cursor-theme='</nowiki>''theme-name'''<br />
}}<br />
<br />
and then recompile the GDM database or alternatively log in to the GDM user and execute the following:<br />
<br />
$ gsettings set org.gnome.desktop.interface cursor-theme <nowiki>'</nowiki>''theme-name''<nowiki>'</nowiki><br />
<br />
==== Larger font for log-in screen ====<br />
<br />
Click on the accessibility icon at the top right of the screen (a white circle with the silhouette of a person in the centre) and check the ''Large Text'' option.<br />
<br />
To set a specific scaling factor, you can create the following keyfile:<br />
<br />
{{hc|/etc/dconf/db/gdm.d/03-scaling|2=<br />
[org/gnome/desktop/interface]<br />
text-scaling-factor=<nowiki>'</nowiki>''1.25''<nowiki>'</nowiki><br />
}}<br />
<br />
and then recompile the GDM database or alternatively log in to the GDM user and execute the following:<br />
<br />
$ gsettings set org.gnome.desktop.interface text-scaling-factor <nowiki>'</nowiki>''1.25''<nowiki>'</nowiki><br />
<br />
==== Turning off the sound ====<br />
<br />
This tweak disables the audible feedback heard when the system volume is adjusted (via keyboard) on the login screen.<br />
<br />
Either create the following keyfile:<br />
<br />
{{hc|/etc/dconf/db/gdm.d/04-sound|2=<br />
[org/gnome/desktop/sound]<br />
event-sounds=false<br />
}}<br />
<br />
and then recompile the GDM database or alternatively log in to the GDM user and execute the following:<br />
<br />
$ gsettings set org.gnome.desktop.sound event-sounds 'false'<br />
<br />
==== Configure power button behavior ====<br />
<br />
{{Note|1=<nowiki/><br />
* The [[Power management#ACPI events|logind settings]] for the power button are overriden by GNOME Settings Daemon. [https://bugzilla.gnome.org/show_bug.cgi?id=755953#c4]<br />
* As of GDM 3.18, the power button cannot be set to ''interactive''. [https://bugzilla.gnome.org/show_bug.cgi?id=753713#c6]<br />
* In some cases, this setting will be ignored and hardcoded defaults will be used. [https://bugzilla.gnome.org/show_bug.cgi?id=755953#c17]<br />
}}<br />
<br />
{{Warning|Please note that the [[acpid]] daemon also handles the "power button" and "hibernate button" events. Running both systems at the same time may lead to unexpected behaviour.}}<br />
<br />
Either create the following keyfile:<br />
<br />
{{hc|/etc/dconf/db/gdm.d/05-power|2=<br />
[org/gnome/settings-daemon/plugins/power]<br />
power-button-action=<nowiki>'</nowiki>''action''<nowiki>'</nowiki><br />
}}<br />
<br />
and then recompile the GDM database or alternatively log in to the GDM user and execute the following:<br />
<br />
$ gsettings set org.gnome.settings-daemon.plugins.power power-button-action <nowiki>'</nowiki>''action''<nowiki>'</nowiki><br />
<br />
where ''action'' can be one of {{ic|nothing}}, {{ic|suspend}} or {{ic|hibernate}}.<br />
<br />
==== Enabling tap-to-click ====<br />
<br />
Tap-to-click is disabled in GDM (and GNOME) by default, but you can easily enable it with a dconf setting.<br />
<br />
{{Note|If you want to do this under X, you have to first set up correct X server access permissions—see [[#Configure X server access permission]].}}<br />
<br />
To enable tap-to-click, either create the following keyfile:<br />
<br />
{{hc|/etc/dconf/db/gdm.d/06-tap-to-click|2=<br />
[org/gnome/desktop/peripherals/touchpad]<br />
tap-to-click=true<br />
}}<br />
<br />
and then recompile the GDM database or alternatively log in to the GDM user and execute the following:<br />
<br />
$ gsettings set org.gnome.desktop.peripherals.touchpad tap-to-click 'true'<br />
<br />
==== Disable/Enable Accessibility Menu ====<br />
<br />
To disable or enable the Accessibility Menu, either create the following keyfile:<br />
<br />
{{hc|/etc/dconf/db/gdm.d/07-accessibility|2=<br />
[org/gnome/desktop/interface]<br />
toolkit-accessibility=<nowiki>'</nowiki>''boolean''<nowiki>'</nowiki><br />
}}<br />
<br />
and then recompile the GDM database or alternatively log in to the GDM user and execute the following:<br />
<br />
$ gsettings set org.gnome.desktop.interface toolkit-accessibility <nowiki>'</nowiki>''boolean''<nowiki>'</nowiki><br />
<br />
The menu is disabled when the key is {{ic|false}}, enabled when it is {{ic|true}}.<br />
<br />
==== Enable Night Light on GDM ====<br />
<br />
To enable [[GNOME#Night Light|Night Light]] on GDM, run<br />
<br />
{{bc|$ sudo -u gdm dbus-launch gsettings set org.gnome.settings-daemon.plugins.color night-light-enabled true}}<br />
<br />
=== Keyboard layout ===<br />
<br />
The system keyboard layout will be applied to GDM. See [[Keyboard configuration in Xorg#Using X configuration files]].<br />
<br />
{{Tip|See [[Wikipedia:ISO 3166-1]] for a list of keymaps.}}<br />
<br />
When using Wayland, you may need to specify the X keyboard layout manually with ''localectl'':<br />
<br />
$ localectl set-x11-keymap ''fr''<br />
<br />
If a system has multiple users, it is possible to specify a keyboard layout for GDM to use which is different from the system keyboard layout. Firstly, ensure the package {{Pkg|gnome-control-center}} is installed. Then start ''gnome-control-center'' and navigate to ''Region & Language > Input Sources''. In the header bar, hit the ''Login Screen'' toggle button and then choose a keyboard layout from the list. Note that the ''Login Screen'' button will not be visible in the header bar unless multiple users are present on the system [https://bugzilla.gnome.org/show_bug.cgi?id=741500].<br />
<br />
Users of GDM 2.x (legacy GDM) may need to edit {{ic|~/.dmrc}} as shown below:<br />
<br />
{{hc|~/.dmrc|2=<br />
[Desktop]<br />
Language=de_DE.UTF-8 # change to your default lang<br />
Layout=de nodeadkeys # change to your keyboard layout<br />
}}<br />
<br />
=== Change the language ===<br />
<br />
The system language will be applied to GDM. If a system has multiple users, it is possible to set a language for GDM different to the system language. In this case, firstly ensure that {{Pkg|gnome-control-center}} is installed. Then, start ''gnome-control-center'' and choose ''Region & Language''. In the header bar, check the ''Login Screen'' toggle button. Finally, click on ''Language'' and choose your language from the list. You will be prompted for your root password. Note that the ''Login Screen'' button will not be visible in the header bar unless multiple users are present on the system [https://bugzilla.gnome.org/show_bug.cgi?id=741500].<br />
<br />
{{Tip|By adding 2 different input languages, logging out then selecting your default language GDM will remember your choice once the second option is removed.}}<br />
<br />
=== Users and login ===<br />
<br />
==== Automatic login ====<br />
<br />
To enable automatic login with GDM, add the following to {{ic|/etc/gdm/custom.conf}} (replace ''username'' with your own):<br />
<br />
{{hc|1=/etc/gdm/custom.conf|<br />
2=# Enable automatic login for user<br />
[daemon]<br />
AutomaticLogin=''username''<br />
AutomaticLoginEnable=True<br />
}}<br />
<br />
{{Tip|If GDM fails after adding these lines, comment them out from a TTY.}}<br />
<br />
or for an automatic login with a delay:<br />
<br />
{{hc|1=/etc/gdm/custom.conf|<br />
2=[daemon]<br />
<br />
TimedLoginEnable=true<br />
TimedLogin=''username''<br />
TimedLoginDelay=1<br />
}}<br />
<br />
You can set the session used for automatic login (replace {{ic|gnome-xorg}} with desired session):<br />
<br />
{{hc|1=/var/lib/AccountsService/users/''username''|<br />
2=XSession=gnome-xorg<br />
}}<br />
<br />
==== Passwordless login ====<br />
<br />
If you want to bypass the password prompt in GDM then simply add the following line on the first line of {{ic|/etc/pam.d/gdm-password}}:<br />
<br />
auth sufficient pam_succeed_if.so user ingroup nopasswdlogin<br />
<br />
Then, add the group {{ic|nopasswdlogin}} to your system. See [[User group]] for group descriptions and group management commands.<br />
<br />
Now, add your user to the {{ic|nopasswdlogin}} group and you will only have to click on your username to login.<br />
<br />
{{Warning|<br />
* Do '''not''' do this for a '''root''' account.<br />
* You will not be able to change your session type at login with GDM anymore. If you want to change your default session type, you will first need to remove your user from the {{ic|nopasswdlogin}} group.<br />
}}<br />
<br />
==== Passwordless shutdown for multiple sessions ====<br />
<br />
GDM uses polkit and logind to gain permissions for shutdown. You can shutdown the system when multiple users are logged in by setting:<br />
<br />
{{hc|1=/etc/polkit-1/localauthority.conf.d/org.freedesktop.logind.policy|2=<nowiki><br />
<?xml version="1.0" encoding="UTF-8"?><br />
<!DOCTYPE policyconfig PUBLIC<br />
"-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN"<br />
"http://www.freedesktop.org/software/polkit/policyconfig-1.dtd"><br />
<br />
<!-- <br />
Policy definitions for logind<br />
--><br />
<br />
<policyconfig><br />
<br />
<action id="org.freedesktop.login1.power-off-multiple-sessions"><br />
<description>Shutdown the system when multiple users are logged in</description><br />
<message>System policy prevents shutting down the system when other users are logged in</message><br />
<defaults><br />
<allow_inactive>yes</allow_inactive><br />
<allow_active>yes</allow_active><br />
</defaults><br />
</action><br />
<br />
</policyconfig><br />
</nowiki>}}<br />
<br />
You can find all available logind options (e.g. reboot-multiple-sessions) in {{man|5|org.freedesktop.login1}}.<br />
<br />
==== Enable root login in GDM ====<br />
<br />
It is not advised to login as root, but if necessary you can edit {{ic|/etc/pam.d/gdm-password}} and add the following line before the line {{ic|auth required pam_deny.so}}:<br />
<br />
{{hc|/etc/pam.d/gdm-password|<br />
auth sufficient pam_succeed_if.so uid eq 0 quiet<br />
}}<br />
<br />
The file should look something like this:<br />
<br />
{{hc|/etc/pam.d/gdm-password|2=<br />
...<br />
auth sufficient pam_succeed_if.so uid eq 0 quiet<br />
auth sufficient pam_succeed_if.so uid >= 1000 quiet<br />
auth required pam_deny.so<br />
...<br />
}}<br />
<br />
You should be able to login as root after restarting GDM.<br />
<br />
==== Hide user from login list ====<br />
<br />
The users for the gdm user list are gathered by [https://www.freedesktop.org/wiki/Software/AccountsService/ AccountsService]. It will automatically hide system users (UID < 1000). To hide ordinary users from the login list create or edit a file named after the user to hide in {{ic|/var/lib/AccountsService/users/}} to contain at least:<br />
<br />
{{hc|/var/lib/AccountsService/users/''username''|<br />
[User]<br />
<nowiki>SystemAccount=true</nowiki><br />
}}<br />
<br />
=== Setup default monitor settings ===<br />
<br />
Some [[desktop environments]] store display settings in {{ic|~/.config/monitors.xml}}. ''xrandr'' commands are then generated on the base of the file content. GDM has a similar file stored in {{ic|/var/lib/gdm/.config/monitors.xml}}. <br />
<br />
If you have your monitors setup as you like (resolution, refresh rate, orientation, scaling, primary and so on) in {{ic|~/.config/monitors.xml}} and want GDM to honor those settings:<br />
<br />
# cp ~/.config/monitors.xml /var/lib/gdm/.config/<br />
# chown gdm:gdm /var/lib/gdm/.config/monitors.xml<br />
<br />
The relevant parts of {{ic|monitors.xml}} for screen rotation and scaling are:<br />
<br />
<monitors version="2"><br />
<configuration><br />
<logicalmonitor><br />
...<br />
<scale>2</scale><br />
...<br />
<transform><br />
<rotation>right</rotation><br />
<flipped>no</flipped><br />
</transform><br />
...<br />
</logicalmonitor><br />
</configuration><br />
</monitors><br />
<br />
Changes will take effect on logout. This is necessary because GDM does not respect {{ic|xorg.conf}}.<br />
<br />
{{Note|1=If you use GDM under Wayland, you must also use a {{ic|monitors.xml}} that was created under Wayland. See [https://gitlab.gnome.org/GNOME/gdm/issues/224 GDM bug 224] for more info. Alternatively, you can force GDM to [[#Use Xorg backend]], and use a {{ic|monitors.xml}} that was created under Xorg.}}<br />
<br />
{{Note|If you use [[HiDPI#Fractional_scaling|fractional scaling]], you need to enable it for user {{ic|gdm}}.}}<br />
<br />
=== Configure X server access permission ===<br />
<br />
You can use the {{ic|xhost}} command to configure X server access permissions.<br />
<br />
For instance, to grant GDM the right to access the X server, use the following command:<br />
<br />
{{bc|# xhost +SI:localuser:gdm}}<br />
<br />
== Troubleshooting ==<br />
<br />
=== Wayland and the proprietary NVIDIA driver ===<br />
<br />
GDM does not work well in Wayland mode with the proprietary [[NVIDIA]] driver. When using this driver, GDM will use Xorg instead.[https://gitlab.gnome.org/GNOME/gdm/merge_requests/46]<br />
<br />
To force-enable Wayland, disable the [[udev]] rule responsible for disabling Wayland in GDM:<br />
<br />
# ln -s /dev/null /etc/udev/rules.d/61-gdm.rules<br />
<br />
If you get a black screen when GDM should appear instead, disable integrated graphics in your computer's BIOS settings.<br />
<br />
=== Failure on logout ===<br />
<br />
If GDM starts up properly on boot, but fails after repeated attempts on logout, try adding this line to the daemon section of {{ic|/etc/gdm/custom.conf}}:<br />
<br />
GdmXserverTimeout=60<br />
<br />
=== Rootless Xorg ===<br />
<br />
See [[Xorg#Rootless Xorg]].<br />
<br />
=== Use Xorg backend ===<br />
<br />
The [[Wayland]] backend is used by default, and the [[Xorg]] backend is used only if the Wayland backend cannot be started. You may wish to use the Xorg backend instead if, for example:<br />
<br />
* The screen [https://bugzilla.redhat.com/show_bug.cgi?id=1199890 flickers]<br />
* GDM [https://bbs.archlinux.org/viewtopic.php?id=249334 crashes]<br />
<br />
To use the Xorg backend by default, uncomment the following line in {{ic|/etc/gdm/custom.conf}}:<br />
<br />
#WaylandEnable=false<br />
<br />
=== GDM shows black screen with blinking white cursor ===<br />
<br />
{{Out of date|It appears the issue regarding "GDM starting before graphics drivers are fully initialized" is fixed as of GDM 40.0. See [https://gitlab.gnome.org/GNOME/gdm/-/merge_requests/133 M!133] and [https://gitlab.gnome.org/GNOME/gdm/-/blob/815e03a1/NEWS NEWS] for more information. This template's author can also personally verify that starting KMS early is no longer required for resolving this issue.}}<br />
<br />
After booting, GDM may present you with a black screen with a blinking white cursor in the top left. This may be caused by GDM starting before graphics drivers are fully initialized. One possible workaround is to [[Kernel mode setting#Early KMS start|start KMS early.]] Another possible workaround is to [[Systemd#Editing provided units|edit the systemd service]] and either set its type to {{ic|idle}} or add a small delay:<br />
<br />
[Service]<br />
Type=idle<br />
<br />
or<br />
<br />
[Service]<br />
ExecStartPre=/bin/sleep 2<br />
<br />
If a longer delay is required, increase the delay time.<br />
<br />
=== GDM does not start until input is provided ===<br />
<br />
If, after booting, the screen stays black and GDM does not start until the mouse is moved or something is typed on the keyboard, it may be due to a lack of entropy required for random number generation. To confirm, check that the following line appears inside ''systemd-random-seed''’s log (which can be read by running {{ic|journalctl --unit systemd-random-seed}} with root privileges):<br />
<br />
Kernel entropy pool is not initialized yet, waiting until it is.<br />
<br />
To fix this, you can pass the {{ic|<nowiki>random.trust_cpu=on</nowiki>}} [[kernel parameter]] if your CPU supports the ''RDRAND'' instruction, or you can use [[haveged]] which also provides entropy, albeit it is of allegedly low quality. See [[debian:BoottimeEntropyStarvation|Debian’s article on the topic]] for other solutions.<br />
<br />
=== Incomplete removal of gdm ===<br />
<br />
After removing {{Pkg|gdm}}, [[systemd]] may report the following:<br />
<br />
user 'gdm': directory '/var/lib/gdm' does not exist<br />
<br />
To remove this warning, login as root and delete the primary user {{ic|gdm}} and then delete the group {{ic|gdm}}:<br />
<br />
# userdel gdm<br />
# groupdel gdm<br />
<br />
Verify that gdm is successfully removed via {{ic|pwck}} and {{ic|grpck}}. To round it off, you may want to double-check no [[Pacman/Tips_and_tricks#Identify_files_not_owned_by_any_package|unowned files]] for gdm remain.<br />
<br />
=== GDM auto-suspend (GNOME 3.28) ===<br />
<br />
GDM uses a separate dconf database to control power management. To apply your user's power settings, copy them to GDM's dconf database:<br />
<br />
$ IFS=$'\n'; for x in $(sudo -u ''username'' gsettings list-recursively org.gnome.settings-daemon.plugins.power); do eval "sudo -u gdm dbus-launch gsettings set $x"; done; unset IFS<br />
<br />
where {{ic|''username''}} is your username.<br />
<br />
To only disable auto-suspend on AC, run:<br />
<br />
$ sudo -u gdm dbus-launch gsettings set org.gnome.settings-daemon.plugins.power sleep-inactive-ac-type 'nothing'<br />
<br />
(To also disable auto-suspend on battery, run the command with {{ic|battery}} instead of {{ic|ac}}.)<br />
<br />
Restart GDM to activate your changes.<br />
<br />
=== GDM ignores Wayland and uses X.Org by default ===<br />
<br />
Wayland requires Kernel Mode Setting (KMS) running in order to work, and on some machines the GDM process start earlier than KMS, resulting in GDM unable to see Wayland and working only with X.Org. This might result in messages like the following showing up in your log:<br />
<br />
gnome-shell[569]: Failed to open gpu '/dev/dri/card0': GDBus.Error:org.freedesktop.DBus.Error.AccessDenied: Operation not permitted<br />
gnome-shell[569]: Failed to create backend: No GPUs found<br />
systemd[505]: org.gnome.Shell@wayland.service: Failed with result 'protocol'.<br />
systemd[505]: Failed to start GNOME Shell on Wayland.<br />
<br />
Alternatively, the same issue may lead to GDM not appearing or monitor only displaying the TTY output.<br />
<br />
You can solve this problem by [[Kernel mode setting#Early KMS start|starting KMS earlier]].<br />
<br />
Also, if you use a [[NVIDIA]] driver, the Wayland session might be blocked by a [[udev]] rule (see the notes under [[GNOME#Wayland sessions]]). This might result in messages like the following:<br />
<br />
systemd[1022]: Condition check resulted in GNOME Shell on Wayland being skipped.<br />
systemd[1022]: org.gnome.Shell@wayland.service: Skipped due to 'exec-condition'.<br />
systemd[1022]: org.gnome.Shell@wayland.service: Control process exited, code=exited, status=2/INVALIDARGUMENT<br />
<br />
In this case, you might see lines like this in {{ic|/usr/lib/udev/rules.d/61-gdm.rules}}:<br />
<br />
# disable Wayland when using the proprietary nvidia driver<br />
DRIVER=="nvidia", RUN+="/usr/lib/gdm-disable-wayland"<br />
<br />
To let GDM use Wayland, copy {{ic|61-gdm.rules}} from {{ic|/usr/lib/udev/rules.d/}} to {{ic|/etc/udev/rules.d/}} (where the latter file will override the former) and comment out the related line:<br />
<br />
# DRIVER=="nvidia", RUN+="/usr/lib/gdm-disable-wayland"<br />
<br />
=== Black screen on AMD or Intel GPUs when an NVidia (e)GPU is present ===<br />
<br />
At first, without an NVidia device, GDM starts and works normally on Wayland, but stops working once an NVidia eGPU is plugged in (or the {{ic|nvidia}} module is loaded for other reasons). A typical symptom of the problem is a black screen with a blinking cursor upon logouts and GDM restarts and the following message in GDM's logs (accessed by running {{ic|journalctl -u gdm -b}} as root):<br />
<br />
Gdm: Child process -<some PID> was already dead.<br />
<br />
The solution is the same as [[#GDM ignores Wayland and uses X.Org by default|above]]: Prevent {{ic|/usr/lib/gdm-disable-wayland}} from running upon {{ic|nvidia}} module loading.<br />
<br />
Notice that GDM on Wayland will no longer work once {{ic|/usr/lib/gdm-disable-wayland}} has run. This is because {{ic|1=WaylandEnable=false}} has been written into {{ic|/run/gdm/custom.conf}}, which overrides {{ic|/etc/gdm/custom.conf}}. To fix the situation without a reboot, remove {{ic|/run/gdm/custom.conf}} and then restart GDM.<br />
<br />
=== GDM cannot be enabled ===<br />
<br />
See [[systemd/FAQ#Failure to enable unit due to preexisting symlink]].<br />
<br />
== See also ==<br />
<br />
* [https://help.gnome.org/admin/gdm/stable/index.html.en GDM Reference Manual]</div>GloriousYellowhttps://wiki.archlinux.org/index.php?title=NVIDIA&diff=670814NVIDIA2021-05-12T22:39:44Z<p>GloriousYellow: /* Enabling brightness control */ typo</p>
<hr />
<div>[[Category:Graphics]]<br />
[[Category:X server]]<br />
[[cs:NVIDIA]]<br />
[[de:Nvidia]]<br />
[[es:NVIDIA]]<br />
[[fa:اِنویدیا]]<br />
[[fr:Nvidia]]<br />
[[it:NVIDIA]]<br />
[[ja:NVIDIA]]<br />
[[nl:NVIDIA]]<br />
[[ru:NVIDIA]]<br />
[[zh-hans:NVIDIA]]<br />
{{Related articles start}}<br />
{{Related|NVIDIA/Tips and tricks}}<br />
{{Related|NVIDIA/Troubleshooting}}<br />
{{Related|Nouveau}}<br />
{{Related|NVIDIA Optimus}}<br />
{{Related|PRIME}}<br />
{{Related|Bumblebee}}<br />
{{Related|nvidia-xrun}}<br />
{{Related|Xorg}}<br />
{{Related|Vulkan}}<br />
{{Related articles end}}<br />
<br />
This article covers the proprietary [https://www.nvidia.com NVIDIA] graphics card driver. For the open-source driver, see [[Nouveau]]. If you have a laptop with hybrid Intel/NVIDIA graphics, see [[NVIDIA Optimus]] instead.<br />
<br />
== Installation ==<br />
<br />
{{Warning|Avoid installing the NVIDIA driver through the package provided from the NVIDIA website. Installation through [[pacman]] allows upgrading the driver together with the rest of the system.}}<br />
<br />
These instructions are for those using the stock {{Pkg|linux}} or {{Pkg|linux-lts}} packages. For custom kernel setup, skip to the [[#Custom kernel|next]] subsection.<br />
<br />
1. If you do not know what graphics card you have, find out by issuing:<br />
:{{bc|<nowiki>$ lspci -k | grep -A 2 -E "(VGA|3D)"</nowiki>}}<br />
<br />
2. Determine the necessary driver version for your card by:<br />
:* finding the code name (e.g. NV50, NVC0, etc.) on [https://nouveau.freedesktop.org/wiki/CodeNames/ Nouveau wiki's code names page] or [https://gitlab.freedesktop.org/nouveau/wiki/-/blob/master/sources/CodeNames.mdwn]<br />
:* looking up the name in NVIDIA's [https://www.nvidia.com/object/IO_32667.html legacy card list]: if your card is not there you can use the latest driver<br />
:* visiting NVIDIA's [https://www.nvidia.com/Download/index.aspx driver download site]<br />
<br />
3. Install the appropriate driver for your card:<br />
:* For GeForce 630-900, 10-20, and Quadro/Tesla/Tegra K-series cards and newer [NVE0, NV110 and newer family cards from around 2010 and later], [[install]] the {{Pkg|nvidia}} package (for use with the {{Pkg|linux}} kernel) or {{Pkg|nvidia-lts}} (for use with the {{Pkg|linux-lts}} kernel) package.<br />
::* If these packages do not work, {{AUR|nvidia-beta}} may have a newer driver version that offers support.<br />
:* For GeForce 400/500/600 series cards [NVCx and NVDx] from around 2010-2011, [[install]] the {{AUR|nvidia-390xx-dkms}} package.<br />
<br />
:* For even older cards (released in 2010 or earlier), have a look at [[#Unsupported drivers]].<br />
<br />
4. For 32-bit application support, also install the corresponding ''lib32'' nvidia package from the [[multilib]] repository (e.g. {{Pkg|lib32-nvidia-utils}}).<br />
<br />
5. Reboot. The {{Pkg|nvidia}} package contains a file which blacklists the ''nouveau'' module, so rebooting is necessary.<br />
<br />
Once the driver has been installed, continue to [[#Xorg configuration]].<br />
<br />
=== Unsupported drivers ===<br />
<br />
If you have a GeForce 300 series card or older (released in 2010 or earlier), Nvidia no longer supports drivers for your card. This means that these drivers [https://nvidia.custhelp.com/app/answers/detail/a_id/3142/ do not support the current Xorg version]. It thus might be easier if you use the [[Nouveau]] driver, which supports the old cards with the current Xorg.<br />
<br />
However, Nvidia's legacy drivers are still available and might provide better 3D performance/stability.<br />
<br />
* For GeForce 8/9, ION and 100-300 series cards [NV5x, NV8x, NV9x and NVAx], [[install]] the {{AUR|nvidia-340xx-dkms}} package.<br />
* GeForce 7 series cards and older [NV6x, NV4x and lower] do not have a driver packaged for Arch Linux.<br />
<br />
=== Custom kernel ===<br />
<br />
If you are using a custom kernel, compilation of the Nvidia kernel modules can be automated with [[DKMS]].<br />
<br />
Install the {{Pkg|nvidia-dkms}} package (or a specific branch). The Nvidia module will be rebuilt after every Nvidia or kernel update thanks to the DKMS [[pacman hook]].<br />
<br />
=== DRM kernel mode setting ===<br />
<br />
{{Pkg|nvidia}} 364.16 adds support for DRM (Direct Rendering Manager) [[kernel mode setting]]. To enable this feature, add the {{ic|1=nvidia-drm.modeset=1}} [[kernel parameter]]. For basic functionality that should suffice, if you want to ensure it's loaded at the earliest possible occasion, or are noticing startup issues (such as the {{ic|nvidia}} kernel module being loaded after the [[display manager]]) you can add {{ic|nvidia}}, {{ic|nvidia_modeset}}, {{ic|nvidia_uvm}} and {{ic|nvidia_drm}} to the initramfs according to [[Mkinitcpio#MODULES]].<br />
<br />
If added to the initramfs do not forget to run [[mkinitcpio]] every time there is a {{Pkg|nvidia}} driver update. See [[#Pacman hook]] to automate these steps.<br />
<br />
{{Warning|1=Enabling [[KMS]] causes [[GNOME]] to default to [[Wayland]]. Non-Wayland-native applications suffer from poor performance in Wayland sessions because of the lack of hardware accelerated XWayland. This is [https://www.phoronix.com/scan.php?page=news_item&px=NVIDIA-GL-VLK-XWayland expected to be resolved "soon"], but there is no committed timeline from NVIDIA. Use the ''GNOME on Xorg'' session instead.}}<br />
<br />
{{Note|1=The NVIDIA driver does '''not''' provide an {{ic|fbdev}} driver for the high-resolution console for the kernel compiled-in {{ic|vesafb}} module. However, the kernel compiled-in {{ic|efifb}} module supports a high-resolution console on EFI systems. This method requires GRUB or rEFInd and is described in [[NVIDIA/Tips and tricks#Fixing terminal resolution]].[https://forums.fedoraforum.org/showthread.php?t=306271][https://www.reddit.com/r/archlinux/comments/4gwukx/nvidia_drivers_and_high_resolution_tty_possible/][https://www.reddit.com/r/archlinux/comments/86lqc5/tty_resolution_nvidia_psaish/].}}<br />
<br />
==== Pacman hook ====<br />
<br />
To avoid the possibility of forgetting to update [[initramfs]] after an NVIDIA driver upgrade, you may want to use a [[pacman hook]]:<br />
<br />
{{hc|/etc/pacman.d/hooks/nvidia.hook|2=<br />
[Trigger]<br />
Operation=Install<br />
Operation=Upgrade<br />
Operation=Remove<br />
Type=Package<br />
Target=nvidia<br />
Target=linux<br />
# Change the linux part above and in the Exec line if a different kernel is used<br />
<br />
[Action]<br />
Description=Update Nvidia module in initcpio<br />
Depends=mkinitcpio<br />
When=PostTransaction<br />
NeedsTargets<br />
Exec=/bin/sh -c 'while read -r trg; do case $trg in linux) exit 0; esac; done; /usr/bin/mkinitcpio -P'}}<br />
<br />
Make sure the {{ic|Target}} package set in this hook is the one you have installed in steps above (e.g. {{ic|nvidia}}, {{ic|nvidia-dkms}}, {{ic|nvidia-lts}} or {{ic|nvidia-ck-something}}).<br />
<br />
{{Note|The complication in the {{ic|Exec}} line above is in order to avoid running {{ic|mkinitcpio}} multiple times if both {{ic|nvidia}} and {{ic|linux}} get updated. In case this does not bother you, the {{ic|1=Target=linux}} and {{ic|NeedsTargets}} lines may be dropped, and the {{ic|Exec}} line may be reduced to simply {{ic|1=Exec=/usr/bin/mkinitcpio -P}}.}}<br />
<br />
=== Hardware accelerated video decoding ===<br />
<br />
Accelerated video decoding with VDPAU is supported on GeForce 8 series cards and newer. Accelerated video decoding with NVDEC is supported on Fermi (~400 series) cards and newer. See [[hardware video acceleration]] for details.<br />
<br />
== Xorg configuration ==<br />
<br />
The proprietary NVIDIA graphics card driver does not need any Xorg server configuration file. You can [[Xorg#Running|start X]] to see if the Xorg server will function correctly without a configuration file. However, it may be required to create a configuration file (prefer {{ic|/etc/X11/xorg.conf.d/20-nvidia.conf}} over {{ic|/etc/X11/xorg.conf}}) in order to adjust various settings. This configuration can be generated by the NVIDIA Xorg configuration tool, or it can be created manually. If created manually, it can be a minimal configuration (in the sense that it will only pass the basic options to the [[Xorg]] server), or it can include a number of settings that can bypass Xorg's auto-discovered or pre-configured options.<br />
<br />
{{Tip|For more configuration options, see [[NVIDIA/Troubleshooting]].}}<br />
<br />
=== Automatic configuration ===<br />
<br />
The NVIDIA package includes an automatic configuration tool to create an Xorg server configuration file ({{ic|xorg.conf}}) and can be run by:<br />
# nvidia-xconfig<br />
<br />
This command will auto-detect and create (or edit, if already present) the {{ic|/etc/X11/xorg.conf}} configuration according to present hardware.<br />
<br />
If there are instances of DRI, ensure they are commented out:<br />
# Load "dri"<br />
Double check your {{ic|/etc/X11/xorg.conf}} to make sure your default depth, horizontal sync, vertical refresh, and resolutions are acceptable.<br />
<br />
=== nvidia-settings ===<br />
<br />
The {{Pkg|nvidia-settings}} tool lets you configure many options using either CLI or GUI. Running {{ic|nvidia-settings}} without any options launches the GUI, for CLI options see {{man|1|nvidia-settings}}.<br />
<br />
You can run the CLI/GUI as a non-root user and save the settings to {{ic|~/.nvidia-settings-rc}} or save it as [[Xorg#Using_xorg.conf|xorg.conf]] by using the option ''Save to X configuration File'' for a multi-user environment.<br />
<br />
To load the {{ic|~/.nvidia-settings-rc}} for the current user:<br />
<br />
$ nvidia-settings --load-config-only<br />
<br />
See [[Autostarting]] to start this command on every boot.<br />
<br />
{{Note|[[Xorg]] may not start or crash on startup after saving {{ic|nvidia-settings}} changes. Adjusting or deleting the generated {{ic|~/.nvidia-settings-rc}} and/or [[Xorg]] file(s) should recover normal startup.}}<br />
<br />
=== Manual configuration ===<br />
<br />
Several tweaks (which cannot be enabled [[#Automatic configuration|automatically]] or with [[#nvidia-settings|nvidia-settings]]) can be performed by editing your configuration file. The Xorg server will need to be restarted before any changes are applied.<br />
<br />
See [https://download.nvidia.com/XFree86/Linux-x86_64/450.80.02/README/index.html NVIDIA Accelerated Linux Graphics Driver README and Installation Guide] for additional details and options.<br />
<br />
==== Minimal configuration ====<br />
<br />
A basic configuration block in {{ic|20-nvidia.conf}} (or deprecated in {{ic|xorg.conf}}) would look like this:<br />
<br />
{{hc|/etc/X11/xorg.conf.d/20-nvidia.conf|<br />
Section "Device"<br />
Identifier "Nvidia Card"<br />
Driver "nvidia"<br />
VendorName "NVIDIA Corporation"<br />
BoardName "GeForce GTX 1050 Ti"<br />
EndSection<br />
}}<br />
<br />
==== Disabling the logo on startup ====<br />
<br />
Add the {{ic|"NoLogo"}} option under section {{ic|Device}}:<br />
Option "NoLogo" "1"<br />
<br />
==== Overriding monitor detection ====<br />
<br />
The {{ic|"ConnectedMonitor"}} option under section {{ic|Device}} allows to override monitor detection when X server starts, which may save a significant amount of time at start up. The available options are: {{ic|"CRT"}} for analog connections, {{ic|"DFP"}} for digital monitors and {{ic|"TV"}} for televisions.<br />
<br />
The following statement forces the NVIDIA driver to bypass startup checks and recognize the monitor as DFP:<br />
Option "ConnectedMonitor" "DFP"<br />
{{Note| Use "CRT" for all analog 15 pin VGA connections, even if the display is a flat panel. "DFP" is intended for DVI, HDMI, or DisplayPort digital connections only.}}<br />
<br />
==== Enabling brightness control ====<br />
<br />
{{Out of date|Potentially obsolete[https://lists.archlinux.org/pipermail/aur-requests/2021-April/051047.html], upstream package also seems to be ancient.}}<br />
<br />
Add to kernel paremeters:<br />
nvidia.NVreg_RegistryDwords=EnableBrightnessControl=1<br />
<br />
Alternatively, add the following under section {{ic|Device}}:<br />
Option "RegistryDwords" "EnableBrightnessControl=1"<br />
<br />
If brightness control still does not work with this option, try installing {{AUR|nvidia-bl-dkms}}.<br />
<br />
{{Note|Installing {{AUR|nvidia-bl-dkms}} will provide a {{ic|/sys/class/backlight/nvidia_backlight/}} interface to backlight brightness control, but your system may continue to issue backlight control changes on {{ic|/sys/class/backlight/acpi_video0/}}. One solution in this case is to watch for changes on, e.g. {{ic|acpi_video0/brightness}} with ''inotifywait'' and to translate and write to {{ic|nvidia_backlight/brightness}} accordingly. See [[Backlight#sysfs modified but no brightness change]].}}<br />
<br />
==== Enabling SLI ====<br />
<br />
{{Warning|Since the GTX 10xx Series (1080, 1070, 1060, etc) only 2-way SLI is supported. 3-way and 4-way SLI may work for CUDA/OpenCL applications, but will most likely break all OpenGL applications.}}<br />
<br />
Taken from the NVIDIA driver's [ftp://download.nvidia.com/XFree86/Linux-x86/355.11/README/xconfigoptions.html README] Appendix B: ''This option controls the configuration of SLI rendering in supported configurations.'' A "supported configuration" is a computer equipped with an SLI-Certified Motherboard and 2 or 3 SLI-Certified GeForce GPUs.<br />
<br />
Find the first GPU's PCI Bus ID using {{ic|lspci}}:<br />
<br />
{{hc|<nowiki># lspci | grep "VGA|3D controller"</nowiki>|<br />
00:02.0 VGA compatible controller: Intel Corporation Xeon E3-1200 v2/3rd Gen Core processor Graphics Controller (rev 09)<br />
03:00.0 VGA compatible controller: NVIDIA Corporation GK107 [GeForce GTX 650] (rev a1)<br />
04:00.0 VGA compatible controller: NVIDIA Corporation GK107 [GeForce GTX 650] (rev a1)<br />
08:00.0 3D controller: NVIDIA Corporation GM108GLM [Quadro K620M / Quadro M500M] (rev a2)<br />
}}<br />
<br />
Add the BusID (3 in the previous example) under section {{ic|Device}}:<br />
BusID "PCI:3:0:0"<br />
<br />
{{Note|The format is important. The BusID value must be specified as {{ic|"PCI:<BusID>:0:0"}}}}<br />
<br />
Add the desired SLI rendering mode value under section {{ic|Screen}}:<br />
Option "SLI" "AA"<br />
<br />
The following table presents the available rendering modes.<br />
<br />
{| class="wikitable"<br />
! Value !! Behavior<br />
|-<br />
| 0, no, off, false, Single || Use only a single GPU when rendering.<br />
|-<br />
| 1, yes, on, true, Auto || Enable SLI and allow the driver to automatically select the appropriate rendering mode.<br />
|-<br />
| AFR || Enable SLI and use the alternate frame rendering mode.<br />
|-<br />
| SFR || Enable SLI and use the split frame rendering mode.<br />
|-<br />
| AA || Enable SLI and use SLI antialiasing. Use this in conjunction with full scene antialiasing to improve visual quality.<br />
|}<br />
<br />
Alternatively, you can use the {{ic|nvidia-xconfig}} utility to insert these changes into {{ic|xorg.conf}} with a single command:<br />
# nvidia-xconfig --busid=PCI:3:0:0 --sli=AA<br />
<br />
To verify that SLI mode is enabled from a shell:<br />
{{hc|<nowiki>$ nvidia-settings -q all | grep SLIMode</nowiki>|<br />
Attribute 'SLIMode' (arch:0.0): AA <br />
'SLIMode' is a string attribute.<br />
'SLIMode' is a read-only attribute.<br />
'SLIMode' can use the following target types: X Screen.<br />
}}<br />
<br />
{{Warning| After enabling SLI, your system may become frozen/non-responsive upon starting xorg. It is advisable that you disable your display manager before restarting.}}<br />
<br />
{{Tip|If this configuration does not work, you may need to use the PCI Bus ID provided by {{ic|nvidia-settings}},<br />
{{hc|<nowiki>$ nvidia-settings -q all | grep -i pcibus</nowiki>|<br />
Attribute 'PCIBus' (host:0[gpu:0]): 101.<br />
'PCIBus' is an integer attribute.<br />
'PCIBus' is a read-only attribute.<br />
'PCIBus' can use the following target types: GPU, SDI Input Device.<br />
Attribute 'PCIBus' (host:0[gpu:1]): 23.<br />
'PCIBus' is an integer attribute.<br />
'PCIBus' is a read-only attribute.<br />
'PCIBus' can use the following target types: GPU, SDI Input Device.}}<br />
<br />
and comment out the PrimaryGPU option in your xorg.d configuration,<br />
{{hc|/usr/share/X11/xorg.conf.d/10-nvidia-drm-outputclass.conf|<br />
...<br />
<br />
Section "OutputClass"<br />
...<br />
# Option "PrimaryGPU" "yes"<br />
...}}<br />
Using this configuration may also solve any graphical boot issues.<br />
}}<br />
<br />
=== Multiple monitors ===<br />
<br />
See [[Multihead]] for more general information.<br />
<br />
==== Using nvidia-settings ====<br />
<br />
The [[#nvidia-settings|nvidia-settings]] tool can configure multiple monitors.<br />
<br />
For CLI configuration, first get the {{ic|CurrentMetaMode}} by running:<br />
<br />
{{hc|$ nvidia-settings -q CurrentMetaMode|2=<br />
Attribute 'CurrentMetaMode' (hostnmae:0.0): id=50, switchable=no, source=nv-control :: DPY-1: 2880x1620 @2880x1620 +0+0 {ViewPortIn=2880x1620, ViewPortOut=2880x1620+0+0}<br />
}}<br />
<br />
Save everything after the {{ic|::}} to the end of the attribute (in this case: {{ic|1=DPY-1: 2880x1620 @2880x1620 +0+0 {ViewPortIn=2880x1620, ViewPortOut=2880x1620+0+0&#125;}}) and use to reconfigure your displays with {{ic|1=nvidia-settings --assign "CurrentMetaMode=''your_meta_mode''"}}.<br />
<br />
{{Tip|You can create shell aliases for the different monitor and resolution configurations you use.}}<br />
<br />
==== ConnectedMonitor ====<br />
<br />
If the driver does not properly detect a second monitor, you can force it to do so with ConnectedMonitor. <br />
<br />
{{hc|/etc/X11/xorg.conf|<br />
<br />
Section "Monitor"<br />
Identifier "Monitor1"<br />
VendorName "Panasonic"<br />
ModelName "Panasonic MICRON 2100Ex"<br />
HorizSync 30.0 - 121.0 # this monitor has incorrect EDID, hence Option "UseEDIDFreqs" "false"<br />
VertRefresh 50.0 - 160.0<br />
Option "DPMS"<br />
EndSection<br />
<br />
Section "Monitor"<br />
Identifier "Monitor2"<br />
VendorName "Gateway"<br />
ModelName "GatewayVX1120"<br />
HorizSync 30.0 - 121.0<br />
VertRefresh 50.0 - 160.0<br />
Option "DPMS"<br />
EndSection<br />
<br />
Section "Device"<br />
Identifier "Device1"<br />
Driver "nvidia"<br />
Option "NoLogo"<br />
Option "UseEDIDFreqs" "false"<br />
Option "ConnectedMonitor" "CRT,CRT"<br />
VendorName "NVIDIA Corporation"<br />
BoardName "GeForce 6200 LE"<br />
BusID "PCI:3:0:0"<br />
Screen 0<br />
EndSection<br />
<br />
Section "Device"<br />
Identifier "Device2"<br />
Driver "nvidia"<br />
Option "NoLogo"<br />
Option "UseEDIDFreqs" "false"<br />
Option "ConnectedMonitor" "CRT,CRT"<br />
VendorName "NVIDIA Corporation"<br />
BoardName "GeForce 6200 LE"<br />
BusID "PCI:3:0:0"<br />
Screen 1<br />
EndSection<br />
<br />
}}<br />
<br />
The duplicated device with {{ic|Screen}} is how you get X to use two monitors on one card without {{ic|TwinView}}. Note that {{ic|nvidia-settings}} will strip out any {{ic|ConnectedMonitor}} options you have added.<br />
<br />
==== TwinView ====<br />
<br />
You want only one big screen instead of two. Set the {{ic|TwinView}} argument to {{ic|1}}. This option should be used if you desire compositing. TwinView only works on a per card basis, when all participating monitors are connected to the same card.<br />
Option "TwinView" "1"<br />
<br />
Example configuration:<br />
{{hc|/etc/X11/xorg.conf.d/10-monitor.conf|<br />
Section "ServerLayout"<br />
Identifier "TwinLayout"<br />
Screen 0 "metaScreen" 0 0<br />
EndSection<br />
<br />
Section "Monitor"<br />
Identifier "Monitor0"<br />
Option "Enable" "true"<br />
EndSection<br />
<br />
Section "Monitor"<br />
Identifier "Monitor1"<br />
Option "Enable" "true"<br />
EndSection<br />
<br />
Section "Device"<br />
Identifier "Card0"<br />
Driver "nvidia"<br />
VendorName "NVIDIA Corporation"<br />
<br />
#refer to the link below for more information on each of the following options.<br />
Option "HorizSync" "DFP-0: 28-33; DFP-1: 28-33"<br />
Option "VertRefresh" "DFP-0: 43-73; DFP-1: 43-73"<br />
Option "MetaModes" "1920x1080, 1920x1080"<br />
Option "ConnectedMonitor" "DFP-0, DFP-1"<br />
Option "MetaModeOrientation" "DFP-1 LeftOf DFP-0"<br />
EndSection<br />
<br />
Section "Screen"<br />
Identifier "metaScreen"<br />
Device "Card0"<br />
Monitor "Monitor0"<br />
DefaultDepth 24<br />
Option "TwinView" "True"<br />
SubSection "Display"<br />
Modes "1920x1080"<br />
EndSubSection<br />
EndSection<br />
}}<br />
<br />
[https://download.nvidia.com/XFree86/Linux-x86_64/440.31/README/configtwinview.html Device option information].<br />
<br />
If you have multiple cards that are SLI capable, it is possible to run more than one monitor attached to separate cards (for example: two cards in SLI with one monitor attached to each). The "MetaModes" option in conjunction with SLI Mosaic mode enables this. Below is a configuration which works for the aforementioned example and runs [[GNOME]] flawlessly.<br />
{{hc|/etc/X11/xorg.conf.d/10-monitor.conf|<br />
Section "Device"<br />
Identifier "Card A"<br />
Driver "nvidia"<br />
BusID "PCI:1:00:0"<br />
EndSection<br />
<br />
Section "Device"<br />
Identifier "Card B"<br />
Driver "nvidia"<br />
BusID "PCI:2:00:0"<br />
EndSection<br />
<br />
Section "Monitor"<br />
Identifier "Right Monitor"<br />
EndSection<br />
<br />
Section "Monitor"<br />
Identifier "Left Monitor"<br />
EndSection<br />
<br />
Section "Screen"<br />
Identifier "Right Screen"<br />
Device "Card A"<br />
Monitor "Right Monitor"<br />
DefaultDepth 24<br />
Option "SLI" "Mosaic"<br />
Option "Stereo" "0"<br />
Option "BaseMosaic" "True"<br />
Option "MetaModes" "GPU-0.DFP-0: 1920x1200+4480+0, GPU-1.DFP-0:1920x1200+0+0"<br />
SubSection "Display"<br />
Depth 24<br />
EndSubSection<br />
EndSection<br />
<br />
Section "Screen"<br />
Identifier "Left Screen"<br />
Device "Card B"<br />
Monitor "Left Monitor"<br />
DefaultDepth 24<br />
Option "SLI" "Mosaic"<br />
Option "Stereo" "0"<br />
Option "BaseMosaic" "True"<br />
Option "MetaModes" "GPU-0.DFP-0: 1920x1200+4480+0, GPU-1.DFP-0:1920x1200+0+0"<br />
SubSection "Display"<br />
Depth 24<br />
EndSubSection<br />
EndSection<br />
<br />
Section "ServerLayout"<br />
Identifier "Default"<br />
Screen 0 "Right Screen" 0 0<br />
Option "Xinerama" "0"<br />
EndSection}}<br />
<br />
===== Vertical sync using TwinView =====<br />
<br />
If you are using TwinView and vertical sync (the "Sync to VBlank" option in '''nvidia-settings'''), you will notice that only one screen is being properly synced, unless you have two identical monitors. Although '''nvidia-settings''' does offer an option to change which screen is being synced (the "Sync to this display device" option), this does not always work. A solution is to add the following environment variables at startup, for example append in {{ic|/etc/profile}}:<br />
<br />
export __GL_SYNC_TO_VBLANK=1<br />
export __GL_SYNC_DISPLAY_DEVICE=DFP-0<br />
export VDPAU_NVIDIA_SYNC_DISPLAY_DEVICE=DFP-0<br />
<br />
You can change {{ic|DFP-0}} with your preferred screen ({{ic|DFP-0}} is the DVI port and {{ic|CRT-0}} is the VGA port). You can find the identifier for your display from '''nvidia-settings''' in the "X Server XVideoSettings" section.<br />
<br />
===== Gaming using TwinView =====<br />
<br />
In case you want to play fullscreen games when using TwinView, you will notice that games recognize the two screens as being one big screen. While this is technically correct (the virtual X screen really is the size of your screens combined), you probably do not want to play on both screens at the same time. <br />
<br />
To correct this behavior for SDL, try:<br />
export SDL_VIDEO_FULLSCREEN_HEAD=1<br />
<br />
For OpenGL, add the appropriate Metamodes to your xorg.conf in section {{ic|Device}} and restart X:<br />
Option "Metamodes" "1680x1050,1680x1050; 1280x1024,1280x1024; 1680x1050,NULL; 1280x1024,NULL;"<br />
<br />
Another method that may either work alone or in conjunction with those mentioned above is [[Gaming#Starting_games_in_a_separate_X_server|starting games in a separate X server]].<br />
<br />
==== Mosaic mode ====<br />
<br />
Mosaic mode is the only way to use more than 2 monitors across multiple graphics cards with compositing. Your window manager may or may not recognize the distinction between each monitor. Mosaic mode requires a valid SLI configuration. Even if using Base mode without SLI, the GPUs must still be SLI capable/compatible.<br />
<br />
===== Base Mosaic =====<br />
<br />
Base Mosaic mode works on any set of Geforce 8000 series or higher GPUs. It cannot be enabled from within the nvidia-setting GUI. You must either use the {{ic|nvidia-xconfig}} command line program or edit {{ic|xorg.conf}} by hand. Metamodes must be specified. The following is an example for four DFPs in a 2x2 configuration, each running at 1920x1024, with two DFPs connected to two cards:<br />
$ nvidia-xconfig --base-mosaic --metamodes="GPU-0.DFP-0: 1920x1024+0+0, GPU-0.DFP-1: 1920x1024+1920+0, GPU-1.DFP-0: 1920x1024+0+1024, GPU-1.DFP-1: 1920x1024+1920+1024"<br />
<br />
{{Note|While the documentation lists a 2x2 configuration of monitors, [https://devtalk.nvidia.com/default/topic/579449/linux/basemosaic-v295-vs-v310-vs-v325-only-up-to-three-screens-/post/3954733/#3954733 GeForce cards are artificially limited to 3 monitors] in Base Mosaic mode. Quadro cards support more than 3 monitors. As of September 2014, the Windows driver has dropped this artificial restriction, but it remains in the Linux driver.}}<br />
<br />
===== SLI Mosaic =====<br />
<br />
If you have an SLI configuration and each GPU is a Quadro FX 5800, Quadro Fermi or newer then you can use SLI Mosaic mode. It can be enabled from within the nvidia-settings GUI or from the command line with:<br />
$ nvidia-xconfig --sli=Mosaic --metamodes="GPU-0.DFP-0: 1920x1024+0+0, GPU-0.DFP-1: 1920x1024+1920+0, GPU-1.DFP-0: 1920x1024+0+1024, GPU-1.DFP-1: 1920x1024+1920+1024"<br />
<br />
== Wayland ==<br />
<br />
For now only a few [[Wayland#Compositors|Wayland compositors]] support NVIDIA's buffer API, see [[Wayland#Requirements]] for more information.<br />
<br />
For further configuration options, take a look at the wiki pages or documentation of the respective compositor.<br />
<br />
{{Note | For now XWayland does not support GPU acceleration with the Nvidia proprietary driver, see [[Wayland#XWayland]] for details.}}<br />
<br />
== Tips and tricks ==<br />
<br />
See [[NVIDIA/Tips and tricks]].<br />
<br />
== Troubleshooting ==<br />
<br />
See [[NVIDIA/Troubleshooting]].<br />
<br />
== See also ==<br />
<br />
* [https://forums.developer.nvidia.com/t/current-graphics-driver-releases/28500 Current graphics driver releases in official Nvidia Forum]<br />
* [https://forums.developer.nvidia.com/c/gpu-unix-graphics/linux/148 NVIDIA Developers Forum - Linux Subforum]</div>GloriousYellowhttps://wiki.archlinux.org/index.php?title=NVIDIA&diff=670813NVIDIA2021-05-12T22:38:39Z<p>GloriousYellow: /* Enabling brightness control */ add instructions not using x server</p>
<hr />
<div>[[Category:Graphics]]<br />
[[Category:X server]]<br />
[[cs:NVIDIA]]<br />
[[de:Nvidia]]<br />
[[es:NVIDIA]]<br />
[[fa:اِنویدیا]]<br />
[[fr:Nvidia]]<br />
[[it:NVIDIA]]<br />
[[ja:NVIDIA]]<br />
[[nl:NVIDIA]]<br />
[[ru:NVIDIA]]<br />
[[zh-hans:NVIDIA]]<br />
{{Related articles start}}<br />
{{Related|NVIDIA/Tips and tricks}}<br />
{{Related|NVIDIA/Troubleshooting}}<br />
{{Related|Nouveau}}<br />
{{Related|NVIDIA Optimus}}<br />
{{Related|PRIME}}<br />
{{Related|Bumblebee}}<br />
{{Related|nvidia-xrun}}<br />
{{Related|Xorg}}<br />
{{Related|Vulkan}}<br />
{{Related articles end}}<br />
<br />
This article covers the proprietary [https://www.nvidia.com NVIDIA] graphics card driver. For the open-source driver, see [[Nouveau]]. If you have a laptop with hybrid Intel/NVIDIA graphics, see [[NVIDIA Optimus]] instead.<br />
<br />
== Installation ==<br />
<br />
{{Warning|Avoid installing the NVIDIA driver through the package provided from the NVIDIA website. Installation through [[pacman]] allows upgrading the driver together with the rest of the system.}}<br />
<br />
These instructions are for those using the stock {{Pkg|linux}} or {{Pkg|linux-lts}} packages. For custom kernel setup, skip to the [[#Custom kernel|next]] subsection.<br />
<br />
1. If you do not know what graphics card you have, find out by issuing:<br />
:{{bc|<nowiki>$ lspci -k | grep -A 2 -E "(VGA|3D)"</nowiki>}}<br />
<br />
2. Determine the necessary driver version for your card by:<br />
:* finding the code name (e.g. NV50, NVC0, etc.) on [https://nouveau.freedesktop.org/wiki/CodeNames/ Nouveau wiki's code names page] or [https://gitlab.freedesktop.org/nouveau/wiki/-/blob/master/sources/CodeNames.mdwn]<br />
:* looking up the name in NVIDIA's [https://www.nvidia.com/object/IO_32667.html legacy card list]: if your card is not there you can use the latest driver<br />
:* visiting NVIDIA's [https://www.nvidia.com/Download/index.aspx driver download site]<br />
<br />
3. Install the appropriate driver for your card:<br />
:* For GeForce 630-900, 10-20, and Quadro/Tesla/Tegra K-series cards and newer [NVE0, NV110 and newer family cards from around 2010 and later], [[install]] the {{Pkg|nvidia}} package (for use with the {{Pkg|linux}} kernel) or {{Pkg|nvidia-lts}} (for use with the {{Pkg|linux-lts}} kernel) package.<br />
::* If these packages do not work, {{AUR|nvidia-beta}} may have a newer driver version that offers support.<br />
:* For GeForce 400/500/600 series cards [NVCx and NVDx] from around 2010-2011, [[install]] the {{AUR|nvidia-390xx-dkms}} package.<br />
<br />
:* For even older cards (released in 2010 or earlier), have a look at [[#Unsupported drivers]].<br />
<br />
4. For 32-bit application support, also install the corresponding ''lib32'' nvidia package from the [[multilib]] repository (e.g. {{Pkg|lib32-nvidia-utils}}).<br />
<br />
5. Reboot. The {{Pkg|nvidia}} package contains a file which blacklists the ''nouveau'' module, so rebooting is necessary.<br />
<br />
Once the driver has been installed, continue to [[#Xorg configuration]].<br />
<br />
=== Unsupported drivers ===<br />
<br />
If you have a GeForce 300 series card or older (released in 2010 or earlier), Nvidia no longer supports drivers for your card. This means that these drivers [https://nvidia.custhelp.com/app/answers/detail/a_id/3142/ do not support the current Xorg version]. It thus might be easier if you use the [[Nouveau]] driver, which supports the old cards with the current Xorg.<br />
<br />
However, Nvidia's legacy drivers are still available and might provide better 3D performance/stability.<br />
<br />
* For GeForce 8/9, ION and 100-300 series cards [NV5x, NV8x, NV9x and NVAx], [[install]] the {{AUR|nvidia-340xx-dkms}} package.<br />
* GeForce 7 series cards and older [NV6x, NV4x and lower] do not have a driver packaged for Arch Linux.<br />
<br />
=== Custom kernel ===<br />
<br />
If you are using a custom kernel, compilation of the Nvidia kernel modules can be automated with [[DKMS]].<br />
<br />
Install the {{Pkg|nvidia-dkms}} package (or a specific branch). The Nvidia module will be rebuilt after every Nvidia or kernel update thanks to the DKMS [[pacman hook]].<br />
<br />
=== DRM kernel mode setting ===<br />
<br />
{{Pkg|nvidia}} 364.16 adds support for DRM (Direct Rendering Manager) [[kernel mode setting]]. To enable this feature, add the {{ic|1=nvidia-drm.modeset=1}} [[kernel parameter]]. For basic functionality that should suffice, if you want to ensure it's loaded at the earliest possible occasion, or are noticing startup issues (such as the {{ic|nvidia}} kernel module being loaded after the [[display manager]]) you can add {{ic|nvidia}}, {{ic|nvidia_modeset}}, {{ic|nvidia_uvm}} and {{ic|nvidia_drm}} to the initramfs according to [[Mkinitcpio#MODULES]].<br />
<br />
If added to the initramfs do not forget to run [[mkinitcpio]] every time there is a {{Pkg|nvidia}} driver update. See [[#Pacman hook]] to automate these steps.<br />
<br />
{{Warning|1=Enabling [[KMS]] causes [[GNOME]] to default to [[Wayland]]. Non-Wayland-native applications suffer from poor performance in Wayland sessions because of the lack of hardware accelerated XWayland. This is [https://www.phoronix.com/scan.php?page=news_item&px=NVIDIA-GL-VLK-XWayland expected to be resolved "soon"], but there is no committed timeline from NVIDIA. Use the ''GNOME on Xorg'' session instead.}}<br />
<br />
{{Note|1=The NVIDIA driver does '''not''' provide an {{ic|fbdev}} driver for the high-resolution console for the kernel compiled-in {{ic|vesafb}} module. However, the kernel compiled-in {{ic|efifb}} module supports a high-resolution console on EFI systems. This method requires GRUB or rEFInd and is described in [[NVIDIA/Tips and tricks#Fixing terminal resolution]].[https://forums.fedoraforum.org/showthread.php?t=306271][https://www.reddit.com/r/archlinux/comments/4gwukx/nvidia_drivers_and_high_resolution_tty_possible/][https://www.reddit.com/r/archlinux/comments/86lqc5/tty_resolution_nvidia_psaish/].}}<br />
<br />
==== Pacman hook ====<br />
<br />
To avoid the possibility of forgetting to update [[initramfs]] after an NVIDIA driver upgrade, you may want to use a [[pacman hook]]:<br />
<br />
{{hc|/etc/pacman.d/hooks/nvidia.hook|2=<br />
[Trigger]<br />
Operation=Install<br />
Operation=Upgrade<br />
Operation=Remove<br />
Type=Package<br />
Target=nvidia<br />
Target=linux<br />
# Change the linux part above and in the Exec line if a different kernel is used<br />
<br />
[Action]<br />
Description=Update Nvidia module in initcpio<br />
Depends=mkinitcpio<br />
When=PostTransaction<br />
NeedsTargets<br />
Exec=/bin/sh -c 'while read -r trg; do case $trg in linux) exit 0; esac; done; /usr/bin/mkinitcpio -P'}}<br />
<br />
Make sure the {{ic|Target}} package set in this hook is the one you have installed in steps above (e.g. {{ic|nvidia}}, {{ic|nvidia-dkms}}, {{ic|nvidia-lts}} or {{ic|nvidia-ck-something}}).<br />
<br />
{{Note|The complication in the {{ic|Exec}} line above is in order to avoid running {{ic|mkinitcpio}} multiple times if both {{ic|nvidia}} and {{ic|linux}} get updated. In case this does not bother you, the {{ic|1=Target=linux}} and {{ic|NeedsTargets}} lines may be dropped, and the {{ic|Exec}} line may be reduced to simply {{ic|1=Exec=/usr/bin/mkinitcpio -P}}.}}<br />
<br />
=== Hardware accelerated video decoding ===<br />
<br />
Accelerated video decoding with VDPAU is supported on GeForce 8 series cards and newer. Accelerated video decoding with NVDEC is supported on Fermi (~400 series) cards and newer. See [[hardware video acceleration]] for details.<br />
<br />
== Xorg configuration ==<br />
<br />
The proprietary NVIDIA graphics card driver does not need any Xorg server configuration file. You can [[Xorg#Running|start X]] to see if the Xorg server will function correctly without a configuration file. However, it may be required to create a configuration file (prefer {{ic|/etc/X11/xorg.conf.d/20-nvidia.conf}} over {{ic|/etc/X11/xorg.conf}}) in order to adjust various settings. This configuration can be generated by the NVIDIA Xorg configuration tool, or it can be created manually. If created manually, it can be a minimal configuration (in the sense that it will only pass the basic options to the [[Xorg]] server), or it can include a number of settings that can bypass Xorg's auto-discovered or pre-configured options.<br />
<br />
{{Tip|For more configuration options, see [[NVIDIA/Troubleshooting]].}}<br />
<br />
=== Automatic configuration ===<br />
<br />
The NVIDIA package includes an automatic configuration tool to create an Xorg server configuration file ({{ic|xorg.conf}}) and can be run by:<br />
# nvidia-xconfig<br />
<br />
This command will auto-detect and create (or edit, if already present) the {{ic|/etc/X11/xorg.conf}} configuration according to present hardware.<br />
<br />
If there are instances of DRI, ensure they are commented out:<br />
# Load "dri"<br />
Double check your {{ic|/etc/X11/xorg.conf}} to make sure your default depth, horizontal sync, vertical refresh, and resolutions are acceptable.<br />
<br />
=== nvidia-settings ===<br />
<br />
The {{Pkg|nvidia-settings}} tool lets you configure many options using either CLI or GUI. Running {{ic|nvidia-settings}} without any options launches the GUI, for CLI options see {{man|1|nvidia-settings}}.<br />
<br />
You can run the CLI/GUI as a non-root user and save the settings to {{ic|~/.nvidia-settings-rc}} or save it as [[Xorg#Using_xorg.conf|xorg.conf]] by using the option ''Save to X configuration File'' for a multi-user environment.<br />
<br />
To load the {{ic|~/.nvidia-settings-rc}} for the current user:<br />
<br />
$ nvidia-settings --load-config-only<br />
<br />
See [[Autostarting]] to start this command on every boot.<br />
<br />
{{Note|[[Xorg]] may not start or crash on startup after saving {{ic|nvidia-settings}} changes. Adjusting or deleting the generated {{ic|~/.nvidia-settings-rc}} and/or [[Xorg]] file(s) should recover normal startup.}}<br />
<br />
=== Manual configuration ===<br />
<br />
Several tweaks (which cannot be enabled [[#Automatic configuration|automatically]] or with [[#nvidia-settings|nvidia-settings]]) can be performed by editing your configuration file. The Xorg server will need to be restarted before any changes are applied.<br />
<br />
See [https://download.nvidia.com/XFree86/Linux-x86_64/450.80.02/README/index.html NVIDIA Accelerated Linux Graphics Driver README and Installation Guide] for additional details and options.<br />
<br />
==== Minimal configuration ====<br />
<br />
A basic configuration block in {{ic|20-nvidia.conf}} (or deprecated in {{ic|xorg.conf}}) would look like this:<br />
<br />
{{hc|/etc/X11/xorg.conf.d/20-nvidia.conf|<br />
Section "Device"<br />
Identifier "Nvidia Card"<br />
Driver "nvidia"<br />
VendorName "NVIDIA Corporation"<br />
BoardName "GeForce GTX 1050 Ti"<br />
EndSection<br />
}}<br />
<br />
==== Disabling the logo on startup ====<br />
<br />
Add the {{ic|"NoLogo"}} option under section {{ic|Device}}:<br />
Option "NoLogo" "1"<br />
<br />
==== Overriding monitor detection ====<br />
<br />
The {{ic|"ConnectedMonitor"}} option under section {{ic|Device}} allows to override monitor detection when X server starts, which may save a significant amount of time at start up. The available options are: {{ic|"CRT"}} for analog connections, {{ic|"DFP"}} for digital monitors and {{ic|"TV"}} for televisions.<br />
<br />
The following statement forces the NVIDIA driver to bypass startup checks and recognize the monitor as DFP:<br />
Option "ConnectedMonitor" "DFP"<br />
{{Note| Use "CRT" for all analog 15 pin VGA connections, even if the display is a flat panel. "DFP" is intended for DVI, HDMI, or DisplayPort digital connections only.}}<br />
<br />
==== Enabling brightness control ====<br />
<br />
{{Out of date|Potentially obsolete[https://lists.archlinux.org/pipermail/aur-requests/2021-April/051047.html], upstream package also seems to be ancient.}}<br />
<br />
Add to kernel paremeters:<br />
nvidia.NVreg_RegistryDwords=EnableBrightnessControl=1<br />
<br />
Alternatively, add the following under section {{ic|Device}}:<br />
Option "RegistryDwords" "EnableBrightnessControl=1"<br />
<br />
If brightness control still does not work with this option, try installing {{AUR|nvidia-bl-dkms}}.<br />
<br />
{{Note|Installing {{AUR|nvidia-bl-dkms}} will provide a {{ic|/sys/class/backlight/nvidia_backlight/}} interface to backlight brightness control, but your system may continue to issue backlight control changes on {{ic|/sys/class/backlight/acpi_video0/}}. One solution in this case is to watch for changes on, e.g. {{ic|acpi_video0/brightness}} with ''inotifywait'' and to translate and write to {{ic|nvidia_backlight/brightness}} accordingly. See [[Backlight#sysfs modified but no brightness change]].}}<br />
<br />
==== Enabling SLI ====<br />
<br />
{{Warning|Since the GTX 10xx Series (1080, 1070, 1060, etc) only 2-way SLI is supported. 3-way and 4-way SLI may work for CUDA/OpenCL applications, but will most likely break all OpenGL applications.}}<br />
<br />
Taken from the NVIDIA driver's [ftp://download.nvidia.com/XFree86/Linux-x86/355.11/README/xconfigoptions.html README] Appendix B: ''This option controls the configuration of SLI rendering in supported configurations.'' A "supported configuration" is a computer equipped with an SLI-Certified Motherboard and 2 or 3 SLI-Certified GeForce GPUs.<br />
<br />
Find the first GPU's PCI Bus ID using {{ic|lspci}}:<br />
<br />
{{hc|<nowiki># lspci | grep "VGA|3D controller"</nowiki>|<br />
00:02.0 VGA compatible controller: Intel Corporation Xeon E3-1200 v2/3rd Gen Core processor Graphics Controller (rev 09)<br />
03:00.0 VGA compatible controller: NVIDIA Corporation GK107 [GeForce GTX 650] (rev a1)<br />
04:00.0 VGA compatible controller: NVIDIA Corporation GK107 [GeForce GTX 650] (rev a1)<br />
08:00.0 3D controller: NVIDIA Corporation GM108GLM [Quadro K620M / Quadro M500M] (rev a2)<br />
}}<br />
<br />
Add the BusID (3 in the previous example) under section {{ic|Device}}:<br />
BusID "PCI:3:0:0"<br />
<br />
{{Note|The format is important. The BusID value must be specified as {{ic|"PCI:<BusID>:0:0"}}}}<br />
<br />
Add the desired SLI rendering mode value under section {{ic|Screen}}:<br />
Option "SLI" "AA"<br />
<br />
The following table presents the available rendering modes.<br />
<br />
{| class="wikitable"<br />
! Value !! Behavior<br />
|-<br />
| 0, no, off, false, Single || Use only a single GPU when rendering.<br />
|-<br />
| 1, yes, on, true, Auto || Enable SLI and allow the driver to automatically select the appropriate rendering mode.<br />
|-<br />
| AFR || Enable SLI and use the alternate frame rendering mode.<br />
|-<br />
| SFR || Enable SLI and use the split frame rendering mode.<br />
|-<br />
| AA || Enable SLI and use SLI antialiasing. Use this in conjunction with full scene antialiasing to improve visual quality.<br />
|}<br />
<br />
Alternatively, you can use the {{ic|nvidia-xconfig}} utility to insert these changes into {{ic|xorg.conf}} with a single command:<br />
# nvidia-xconfig --busid=PCI:3:0:0 --sli=AA<br />
<br />
To verify that SLI mode is enabled from a shell:<br />
{{hc|<nowiki>$ nvidia-settings -q all | grep SLIMode</nowiki>|<br />
Attribute 'SLIMode' (arch:0.0): AA <br />
'SLIMode' is a string attribute.<br />
'SLIMode' is a read-only attribute.<br />
'SLIMode' can use the following target types: X Screen.<br />
}}<br />
<br />
{{Warning| After enabling SLI, your system may become frozen/non-responsive upon starting xorg. It is advisable that you disable your display manager before restarting.}}<br />
<br />
{{Tip|If this configuration does not work, you may need to use the PCI Bus ID provided by {{ic|nvidia-settings}},<br />
{{hc|<nowiki>$ nvidia-settings -q all | grep -i pcibus</nowiki>|<br />
Attribute 'PCIBus' (host:0[gpu:0]): 101.<br />
'PCIBus' is an integer attribute.<br />
'PCIBus' is a read-only attribute.<br />
'PCIBus' can use the following target types: GPU, SDI Input Device.<br />
Attribute 'PCIBus' (host:0[gpu:1]): 23.<br />
'PCIBus' is an integer attribute.<br />
'PCIBus' is a read-only attribute.<br />
'PCIBus' can use the following target types: GPU, SDI Input Device.}}<br />
<br />
and comment out the PrimaryGPU option in your xorg.d configuration,<br />
{{hc|/usr/share/X11/xorg.conf.d/10-nvidia-drm-outputclass.conf|<br />
...<br />
<br />
Section "OutputClass"<br />
...<br />
# Option "PrimaryGPU" "yes"<br />
...}}<br />
Using this configuration may also solve any graphical boot issues.<br />
}}<br />
<br />
=== Multiple monitors ===<br />
<br />
See [[Multihead]] for more general information.<br />
<br />
==== Using nvidia-settings ====<br />
<br />
The [[#nvidia-settings|nvidia-settings]] tool can configure multiple monitors.<br />
<br />
For CLI configuration, first get the {{ic|CurrentMetaMode}} by running:<br />
<br />
{{hc|$ nvidia-settings -q CurrentMetaMode|2=<br />
Attribute 'CurrentMetaMode' (hostnmae:0.0): id=50, switchable=no, source=nv-control :: DPY-1: 2880x1620 @2880x1620 +0+0 {ViewPortIn=2880x1620, ViewPortOut=2880x1620+0+0}<br />
}}<br />
<br />
Save everything after the {{ic|::}} to the end of the attribute (in this case: {{ic|1=DPY-1: 2880x1620 @2880x1620 +0+0 {ViewPortIn=2880x1620, ViewPortOut=2880x1620+0+0&#125;}}) and use to reconfigure your displays with {{ic|1=nvidia-settings --assign "CurrentMetaMode=''your_meta_mode''"}}.<br />
<br />
{{Tip|You can create shell aliases for the different monitor and resolution configurations you use.}}<br />
<br />
==== ConnectedMonitor ====<br />
<br />
If the driver does not properly detect a second monitor, you can force it to do so with ConnectedMonitor. <br />
<br />
{{hc|/etc/X11/xorg.conf|<br />
<br />
Section "Monitor"<br />
Identifier "Monitor1"<br />
VendorName "Panasonic"<br />
ModelName "Panasonic MICRON 2100Ex"<br />
HorizSync 30.0 - 121.0 # this monitor has incorrect EDID, hence Option "UseEDIDFreqs" "false"<br />
VertRefresh 50.0 - 160.0<br />
Option "DPMS"<br />
EndSection<br />
<br />
Section "Monitor"<br />
Identifier "Monitor2"<br />
VendorName "Gateway"<br />
ModelName "GatewayVX1120"<br />
HorizSync 30.0 - 121.0<br />
VertRefresh 50.0 - 160.0<br />
Option "DPMS"<br />
EndSection<br />
<br />
Section "Device"<br />
Identifier "Device1"<br />
Driver "nvidia"<br />
Option "NoLogo"<br />
Option "UseEDIDFreqs" "false"<br />
Option "ConnectedMonitor" "CRT,CRT"<br />
VendorName "NVIDIA Corporation"<br />
BoardName "GeForce 6200 LE"<br />
BusID "PCI:3:0:0"<br />
Screen 0<br />
EndSection<br />
<br />
Section "Device"<br />
Identifier "Device2"<br />
Driver "nvidia"<br />
Option "NoLogo"<br />
Option "UseEDIDFreqs" "false"<br />
Option "ConnectedMonitor" "CRT,CRT"<br />
VendorName "NVIDIA Corporation"<br />
BoardName "GeForce 6200 LE"<br />
BusID "PCI:3:0:0"<br />
Screen 1<br />
EndSection<br />
<br />
}}<br />
<br />
The duplicated device with {{ic|Screen}} is how you get X to use two monitors on one card without {{ic|TwinView}}. Note that {{ic|nvidia-settings}} will strip out any {{ic|ConnectedMonitor}} options you have added.<br />
<br />
==== TwinView ====<br />
<br />
You want only one big screen instead of two. Set the {{ic|TwinView}} argument to {{ic|1}}. This option should be used if you desire compositing. TwinView only works on a per card basis, when all participating monitors are connected to the same card.<br />
Option "TwinView" "1"<br />
<br />
Example configuration:<br />
{{hc|/etc/X11/xorg.conf.d/10-monitor.conf|<br />
Section "ServerLayout"<br />
Identifier "TwinLayout"<br />
Screen 0 "metaScreen" 0 0<br />
EndSection<br />
<br />
Section "Monitor"<br />
Identifier "Monitor0"<br />
Option "Enable" "true"<br />
EndSection<br />
<br />
Section "Monitor"<br />
Identifier "Monitor1"<br />
Option "Enable" "true"<br />
EndSection<br />
<br />
Section "Device"<br />
Identifier "Card0"<br />
Driver "nvidia"<br />
VendorName "NVIDIA Corporation"<br />
<br />
#refer to the link below for more information on each of the following options.<br />
Option "HorizSync" "DFP-0: 28-33; DFP-1: 28-33"<br />
Option "VertRefresh" "DFP-0: 43-73; DFP-1: 43-73"<br />
Option "MetaModes" "1920x1080, 1920x1080"<br />
Option "ConnectedMonitor" "DFP-0, DFP-1"<br />
Option "MetaModeOrientation" "DFP-1 LeftOf DFP-0"<br />
EndSection<br />
<br />
Section "Screen"<br />
Identifier "metaScreen"<br />
Device "Card0"<br />
Monitor "Monitor0"<br />
DefaultDepth 24<br />
Option "TwinView" "True"<br />
SubSection "Display"<br />
Modes "1920x1080"<br />
EndSubSection<br />
EndSection<br />
}}<br />
<br />
[https://download.nvidia.com/XFree86/Linux-x86_64/440.31/README/configtwinview.html Device option information].<br />
<br />
If you have multiple cards that are SLI capable, it is possible to run more than one monitor attached to separate cards (for example: two cards in SLI with one monitor attached to each). The "MetaModes" option in conjunction with SLI Mosaic mode enables this. Below is a configuration which works for the aforementioned example and runs [[GNOME]] flawlessly.<br />
{{hc|/etc/X11/xorg.conf.d/10-monitor.conf|<br />
Section "Device"<br />
Identifier "Card A"<br />
Driver "nvidia"<br />
BusID "PCI:1:00:0"<br />
EndSection<br />
<br />
Section "Device"<br />
Identifier "Card B"<br />
Driver "nvidia"<br />
BusID "PCI:2:00:0"<br />
EndSection<br />
<br />
Section "Monitor"<br />
Identifier "Right Monitor"<br />
EndSection<br />
<br />
Section "Monitor"<br />
Identifier "Left Monitor"<br />
EndSection<br />
<br />
Section "Screen"<br />
Identifier "Right Screen"<br />
Device "Card A"<br />
Monitor "Right Monitor"<br />
DefaultDepth 24<br />
Option "SLI" "Mosaic"<br />
Option "Stereo" "0"<br />
Option "BaseMosaic" "True"<br />
Option "MetaModes" "GPU-0.DFP-0: 1920x1200+4480+0, GPU-1.DFP-0:1920x1200+0+0"<br />
SubSection "Display"<br />
Depth 24<br />
EndSubSection<br />
EndSection<br />
<br />
Section "Screen"<br />
Identifier "Left Screen"<br />
Device "Card B"<br />
Monitor "Left Monitor"<br />
DefaultDepth 24<br />
Option "SLI" "Mosaic"<br />
Option "Stereo" "0"<br />
Option "BaseMosaic" "True"<br />
Option "MetaModes" "GPU-0.DFP-0: 1920x1200+4480+0, GPU-1.DFP-0:1920x1200+0+0"<br />
SubSection "Display"<br />
Depth 24<br />
EndSubSection<br />
EndSection<br />
<br />
Section "ServerLayout"<br />
Identifier "Default"<br />
Screen 0 "Right Screen" 0 0<br />
Option "Xinerama" "0"<br />
EndSection}}<br />
<br />
===== Vertical sync using TwinView =====<br />
<br />
If you are using TwinView and vertical sync (the "Sync to VBlank" option in '''nvidia-settings'''), you will notice that only one screen is being properly synced, unless you have two identical monitors. Although '''nvidia-settings''' does offer an option to change which screen is being synced (the "Sync to this display device" option), this does not always work. A solution is to add the following environment variables at startup, for example append in {{ic|/etc/profile}}:<br />
<br />
export __GL_SYNC_TO_VBLANK=1<br />
export __GL_SYNC_DISPLAY_DEVICE=DFP-0<br />
export VDPAU_NVIDIA_SYNC_DISPLAY_DEVICE=DFP-0<br />
<br />
You can change {{ic|DFP-0}} with your preferred screen ({{ic|DFP-0}} is the DVI port and {{ic|CRT-0}} is the VGA port). You can find the identifier for your display from '''nvidia-settings''' in the "X Server XVideoSettings" section.<br />
<br />
===== Gaming using TwinView =====<br />
<br />
In case you want to play fullscreen games when using TwinView, you will notice that games recognize the two screens as being one big screen. While this is technically correct (the virtual X screen really is the size of your screens combined), you probably do not want to play on both screens at the same time. <br />
<br />
To correct this behavior for SDL, try:<br />
export SDL_VIDEO_FULLSCREEN_HEAD=1<br />
<br />
For OpenGL, add the appropriate Metamodes to your xorg.conf in section {{ic|Device}} and restart X:<br />
Option "Metamodes" "1680x1050,1680x1050; 1280x1024,1280x1024; 1680x1050,NULL; 1280x1024,NULL;"<br />
<br />
Another method that may either work alone or in conjunction with those mentioned above is [[Gaming#Starting_games_in_a_separate_X_server|starting games in a separate X server]].<br />
<br />
==== Mosaic mode ====<br />
<br />
Mosaic mode is the only way to use more than 2 monitors across multiple graphics cards with compositing. Your window manager may or may not recognize the distinction between each monitor. Mosaic mode requires a valid SLI configuration. Even if using Base mode without SLI, the GPUs must still be SLI capable/compatible.<br />
<br />
===== Base Mosaic =====<br />
<br />
Base Mosaic mode works on any set of Geforce 8000 series or higher GPUs. It cannot be enabled from within the nvidia-setting GUI. You must either use the {{ic|nvidia-xconfig}} command line program or edit {{ic|xorg.conf}} by hand. Metamodes must be specified. The following is an example for four DFPs in a 2x2 configuration, each running at 1920x1024, with two DFPs connected to two cards:<br />
$ nvidia-xconfig --base-mosaic --metamodes="GPU-0.DFP-0: 1920x1024+0+0, GPU-0.DFP-1: 1920x1024+1920+0, GPU-1.DFP-0: 1920x1024+0+1024, GPU-1.DFP-1: 1920x1024+1920+1024"<br />
<br />
{{Note|While the documentation lists a 2x2 configuration of monitors, [https://devtalk.nvidia.com/default/topic/579449/linux/basemosaic-v295-vs-v310-vs-v325-only-up-to-three-screens-/post/3954733/#3954733 GeForce cards are artificially limited to 3 monitors] in Base Mosaic mode. Quadro cards support more than 3 monitors. As of September 2014, the Windows driver has dropped this artificial restriction, but it remains in the Linux driver.}}<br />
<br />
===== SLI Mosaic =====<br />
<br />
If you have an SLI configuration and each GPU is a Quadro FX 5800, Quadro Fermi or newer then you can use SLI Mosaic mode. It can be enabled from within the nvidia-settings GUI or from the command line with:<br />
$ nvidia-xconfig --sli=Mosaic --metamodes="GPU-0.DFP-0: 1920x1024+0+0, GPU-0.DFP-1: 1920x1024+1920+0, GPU-1.DFP-0: 1920x1024+0+1024, GPU-1.DFP-1: 1920x1024+1920+1024"<br />
<br />
== Wayland ==<br />
<br />
For now only a few [[Wayland#Compositors|Wayland compositors]] support NVIDIA's buffer API, see [[Wayland#Requirements]] for more information.<br />
<br />
For further configuration options, take a look at the wiki pages or documentation of the respective compositor.<br />
<br />
{{Note | For now XWayland does not support GPU acceleration with the Nvidia proprietary driver, see [[Wayland#XWayland]] for details.}}<br />
<br />
== Tips and tricks ==<br />
<br />
See [[NVIDIA/Tips and tricks]].<br />
<br />
== Troubleshooting ==<br />
<br />
See [[NVIDIA/Troubleshooting]].<br />
<br />
== See also ==<br />
<br />
* [https://forums.developer.nvidia.com/t/current-graphics-driver-releases/28500 Current graphics driver releases in official Nvidia Forum]<br />
* [https://forums.developer.nvidia.com/c/gpu-unix-graphics/linux/148 NVIDIA Developers Forum - Linux Subforum]</div>GloriousYellow