https://wiki.archlinux.org/api.php?action=feedcontributions&user=Misaka+0x34ca&feedformat=atom
ArchWiki - User contributions [en]
2024-03-29T04:55:45Z
User contributions
MediaWiki 1.41.0
https://wiki.archlinux.org/index.php?title=Talk:GNOME&diff=790039
Talk:GNOME
2023-10-15T13:56:49Z
<p>Misaka 0x34ca: /* Gnome Tweaks 45 update */ new section</p>
<hr />
<div>== GNOME applications blocking window manager keyboard shortcuts? Drawing over everything? ==<br />
<br />
Seen on Fluxbox, using evince, totem, baobab.(as of 3.14.1-2, 3.14.1-1, 3.14.1-1, well, earlier) Makes these programs near-useless.[[User:Jasper1984|Jasper1984]] ([[User talk:Jasper1984|talk]]) 15:31, 8 December 2014 (UTC)<br />
<br />
:I believe this is not just about GNOME, but all [[GTK+]] and [[Qt]] applications [https://bugzilla.gnome.org/show_bug.cgi?id=344059] [https://bugs.kde.org/show_bug.cgi?id=70063]. Haven't read through the reports, but it appears to be some flaw in [[Xorg]]. Not much we can do about this, so unless you want to discuss a workaround this can be closed. -- [[User:Alad|Alad]] ([[User talk:Alad|talk]]) 19:50, 8 December 2014 (UTC)<br />
<br />
:Can you confirm this with another toolkit than GTK3 ? -- [[User:Alad|Alad]] ([[User talk:Alad|talk]]) 17:35, 10 January 2015 (UTC)<br />
<br />
== GNOME and fontconfig settings ==<br />
<br />
Since there isn't a section dedicated to fonts in GNOME 3 I was thinking about writing one, but I put it here first:<br />
<br />
GNOME doesn't use the dpi settings set by xorg server to scale fonts, instead it uses a fixed dpi of 96 that cannot be changed unlike previous versions:<br />
<br />
/* As we cannot rely on the X server giving us good DPI information, and<br />
* that we don't want multi-monitor screens to have different DPIs (thus<br />
* different text sizes), we'll hard-code the value of the DPI<br />
*<br />
* See also:<br />
* https://bugzilla.novell.com/show_bug.cgi?id=217790•<br />
* https://bugzilla.gnome.org/show_bug.cgi?id=643704<br />
*/<br />
<br />
The gnome-settings-daemon plugin xsettings relies on this hardcoded value for some calculations and there is currently no way of changing it beside customizing the code in abs. The dimension of text can be tweaked changing the text-scaling-factor (1.0 by default), using gnome-tweak-tool or editing the following key in dconf-editor:<br />
<br />
org.gnome.desktop.interface.text-scaling-factor<br />
<br />
The xsettings plugins will also merge some Xft values in the X resources db overwriting values set in .Xresources od .Xdefaults files. The defaults are:<br />
<br />
Xft.antialias: 1<br />
Xft.dpi: 96<br />
Xft.hinting: 1<br />
Xft.hintstyle: hintmedium<br />
Xft.lcdfilter: lcddefault<br />
Xft.rgba: none<br />
<br />
Some of those values can be changed using dconf-editor (org.gnome.settings-daemon.plugins.xsettings) or gnome-tweak-tool. It is possible to change this values using xrdb -merge ~/.Xresources after gnome is started but gnome will still use its values internally so it is not a good idea.<br />
<br />
It is a good idea to configure your fonts.conf in a way consistent with the gnome settings otherwise, at least on my laptop, fonts will looks weird in some gnome apps. <br />
<br />
The dpi setting of the Xserver can be changed to 96 following [https://wiki.archlinux.org/index.php/Xorg#Display_Size_and_DPI this] guide, this way it will be the same for all applications, the drawback is that fonts might look too small or too big in other application if the real DPI of your monitor differs too much from 96.<br />
<br />
For and LCD monitor it is a good idea to activate the lcd filter setting the following keys in dconf-editor:<br />
<br />
org.gnome.settings-daemon.plugins.xsettings.antialiasing rgba<br />
org.gnome.settings-daemon.plugins.xsettings.rgba-order rgb, bgr, vrgb or vbgr (as your monitor requires)<br />
<br />
Since the lcdfilter is not designed to work together with autohinting it is a good idea to disable it also in fonts.conf.<br />
It is also a good idea to use the same hinting value as in your font.conf, the default in gnome is medium:<br />
<br />
org.gnome.settings-daemon.plugins.xsettings.hinting medium<br />
<br />
This values in fonts.conf will match the gnome settings:<br />
<br />
<match target="font"><br />
<edit mode="assign" name="rgba"><const>rgb</const></edit><br />
<edit mode="assign" name="autohint"><bool>false</bool></edit><br />
<edit mode="assign" name="hinting"><bool>true</bool></edit><br />
<edit mode="assign" name="hintstyle"><const>hintmedium</const></edit><br />
<edit mode="assign" name="antialias"><bool>true</bool></edit><br />
<edit mode="assign" name="lcdfilter"><const>lcddefault</const></edit><br />
</match><br />
<br />
(to be finished, please comment or fix) {{Unsigned|23:58, 8 January 2012|Erm67}}<br />
<br />
:I think that info must be in [[Font configuration]], linked from there if needed -- [[User:Kycok|Kycok]] ([[User talk:Kycok|talk]]) 10:57, 3 June 2014 (UTC)<br />
<br />
::Well, it is very GNOME specific and complex at the same time. I would vote for putting it into [[GNOME tips]] and crosslink it from [[GNOME#Fonts]] as well as from [[Font configuration]]. But first: Above contribution of Erm67 is a couple of years back. Does someone know whether the instructions still work like that? --[[User:Indigo|Indigo]] ([[User talk:Indigo|talk]]) 09:04, 10 November 2014 (UTC)<br />
::Update to note: [[GNOME tips]] was cleaned up removing GNOME content after I suggested above. It does not make sense to put these instructions there anymore. --[[User:Indigo|Indigo]] ([[User talk:Indigo|talk]]) 12:41, 15 January 2015 (UTC)<br />
<br />
== Natural scrolling ==<br />
<br />
I can't get reverse natural scrolling on my trackpath to work (scroll with fingers in same direction as if it was a mouse wheel). I am happy to propose some text for the wiki if someone can tell me how to do it ... --[[User:Bronze|Bronze]] ([[User talk:Bronze|talk]]) 04:33, 26 February 2017 (UTC)<br />
<br />
:Is there not a natural scrolling setting under Settings -> Mouse & Touchpad that you can toggle? -- [[User:Chazza|Chazza]] ([[User talk:Chazza|talk]]) 09:57, 26 February 2017 (UTC)<br />
:: i saw this with computers which have a keyboard with integrated touchpads like the logitech k400, and no mouse connected. not sure what makes gnome than display nothing ... --[[User:Soloturn|Soloturn]] ([[User talk:Soloturn|talk]]) 05:11, 1 April 2017 (UTC)<br />
<br />
== Manually start a Wayland session ==<br />
<br />
Under: ''Starting Gnome -> Manually -> Wayland Session'' the article lists<br />
<br />
XDG_SESSION_TYPE=wayland dbus-run-session gnome-session<br />
<br />
as the command to start a {{ic|gnome-session}}. But {{ic|dbus-run-session}} starts a new dbus session and this somehow prevents for example evolution to access my default keyring. I dont know why, but simply starting {{ic|gnome-session}} works. I dont know with which dbus instance the gnome-keyring starts through its .desktop files in {{ic|/etc/xdg}} but the problem seems to be that these 2 would run on different instances of dbus.<br />
<br />
I do not want to edit the wiki page as long as i dont know if this is my mistake or really a mistake on the page. I will look into this in the next week, until then, any guidance is appreciated.<br />
[[User:Tornado|Tornado]] ([[User talk:Tornado|talk]]) 12:55, 6 April 2018 (UTC)<br />
<br />
<br />
_________<br />
<br />
I am experiencing this problem https://github.com/systemd/systemd/issues/5247 and I guess that this command is problematic as is, it should be replaced {{Unsigned|14:20, 2020 April 7|Nsqm}}<br />
<br />
I am also having issues with the command on the page. I get ''A connection to the bus can't be made''. [[User:Silverhammermba|Silverhammermba]] ([[User talk:Silverhammermba|talk]]) 12:57, 17 April 2021 (UTC)<br />
<br />
== redundancy of XDG_SESSION_TYPE and GDK_BACKEND variables "Xorg sessions" section ==<br />
<br />
In the "Xorg sessions" section, it suggests putting {{ic|1=XDG_SESSION_TYPE=x11 GDK_BACKEND=x11 exec startx}} in {{ic|~/.bash_profile}}. But previously, it suggests setting {{ic|XDG_SESSION_TYPE}} and {{ic|GDK_BACKEND}} in {{ic|~/.xinitrc}}. So isn't it redundant to set them again? {{Unsigned|03:13, 24 August 2020 (UTC)|TDA}}<br />
<br />
== gnome-session: alternative sessions ==<br />
<br />
Should this article mention that {{ic|gnome-session}} can be used to initiate non-GNOME sessions (technically GNOME-derivative), such as Pantheon, GNOME/Openbox, something users came up with on their own, etc.? [[User:Quequotion|quequotion]] ([[User talk:Quequotion|talk]]) 11:23, 14 January 2021 (UTC)<br />
<br />
== Troubleshooting no Wayland on nVidia driver ==<br />
<br />
If Wayland is expected, but X11 session type is received when using {{ic|echo $XDG_SESSION_TYPE)}} or when using {{ic|loginctl show-session <sessionnum> -p Type}}, there might be missing kernel configuration parameter for nVidia driver.<br />
<br />
{{ic|journalctl}} log entry will report error:<br />
<br />
systemd[753]: org.gnome.Shell@wayland.service: Skipped due to 'exec-condition'.<br />
systemd[753]: Condition check resulted in GNOME Shell on Wayland being skipped.<br />
<br />
Starting Wayland manually <br />
<br />
dbus-run-session -- gnome-shell --display-server --wayland<br />
<br />
will produce error messages:<br />
<br />
mutter-Message: 14:33:45.804: Adding device '/dev/dri/card0' (nvidia-drm) using non-atomic mode setting (using atomic mode setting not allowed).<br />
(gnome-shell:11885): GLib-CRITICAL **: 14:33:45.804: g_hash_table_destroy: assertion 'hash_table != NULL' failed<br />
(gnome-shell:11885): mutter-WARNING **: 14:33:45.805: Failed to open gpu '/dev/dri/card0': Failed to activate universal planes: Operation not permitted<br />
(gnome-shell:11885): mutter-WARNING **: 14:33:45.805: Failed to create backend: No GPUs found<br />
<br />
The key error message is 1st line which includes nvidia-drm.<br />
<br />
Enable {{ic|nvidia-drm}} support with kernel configuration parameter. <br />
<br />
For GRUB update {{ic|boot/grub/grub.cfg}} file by appending to {{ic|linux}} line: <br />
<br />
nvidia-drm.modeset=1<br />
<br />
{{Unsigned|00:13, 20 September 2021 (UTC)|Kulak}}<br />
<br />
== Removed subsection that discusses changing backgrounds of the desktop and the lock screen ==<br />
<br />
Previously, GNOME only allowed backgrounds to be picked from the ~/Pictures folder. The subsection I removed used to discuss how to pick backgrounds from different directories for both the desktop and the lock screen. Today, GNOME allows backgrounds to be picked from any directory. But, you can't choose a custom lock screen background because the lock screen is just a blurred version of the desktop background. However, you can use a custom lock screen background using this extension: https://extensions.gnome.org/extension/1476/unlock-dialog-background/.<br />
If anyone finds it necessary to add a subsection for this extension in this wiki article, feel free to do so.<br />
{{Unsigned|2022-08-20T17:30:41|Cont999}}<br />
<br />
== Requesting a rewrite for GNOME#Extensions ==<br />
<br />
The current description is very inconsistent:<br />
* We should expand on both methods to install extensions (system-wide with pacman/AUR, and current user only with https://extensions.gnome.org/) and describe their ups and downs.<br />
* A more up to date description of these methods would help, since they're outdated. E.g. currently, when using the site to install and update extensions with {{ic|gnome-browser-extension}}, you get update notifications for extensions on your desktop, and you can use the built-in Gnome extensions app to update them as well if they were installed from extensions.gnome.org.<br />
* However, using the site to install extensions will ''override'' the same system-extensions (if they are installed), it will ask to update all current extensions installed from the AUR and the official repositories (gnome-shell-extension-appindicator and gnome-shell-extension-gtile, as well as gnome-shell-extensions which comes shipped with GNOME) on https://extensions.gnome.org/local/, even if these system-extensions are already up to date. After you press the update on all of them, these system-extensions will be "hidden" and new user extensions will be created in place of them, which you have to update through the site as well. Making the entire description of using pacman or an AUR helper for automated updates useless when using this method, and overriding the system package gnome-shell-extensions as it will be replaced by a user extension that you have to update on the site.<br />
* Lastly, I think it'd be better if we take all advanced configuration sections that rely on extensions and make them subsections under extensions.<br />
<br />
This has always been an argument in the Arch Forums and Reddit, so I think we should come up with a solution to solve all these problems. If anyone's got the time to take care of all this, please do so. [[User:Cont999|Cont999]] ([[User talk:Cont999|talk]]) 23:35, 29 September 2022 (UTC)<br />
: Hi, I wanted to do exactly that yesterday when I moved it up but couldn't secure enough time, and wanted to think it through first. <br />
: Another thing that definitely needs to be included is [https://aur.archlinux.org/packages?O=0&K=extension-manager Extension Manager] (from [https://github.com/mjakeman/extension-manager here]), which adds an argument to splitting the article between "system-wide" and "user-only"<br />
: -- [[User:Cvlc|Cvlc]] ([[User talk:Cvlc|talk]]) 00:06, 30 September 2022 (UTC)<br />
<br />
:: i agree that the current description does need a rw. however, i think that adding '''extension manager''' to this section is not as important and possibly useless since what we're aiming for is gonna do the exact same thing.<br />
:: this discussion should come to light, please participate and voice your opinion [[User:BOURNE86|BOURNE86]] ([[User talk:BOURNE86|talk]]) 20:52, 30 September 2022 (UTC)<br />
<br />
== Gnome Integration with Arch ==<br />
<br />
I'd like to add this section to main Gnome page.<br />
<br />
=== Gnome Software with Arch Repositories ===<br />
<br />
[[Install]] the {{Pkg|gnome-software-packagekit-plugin}} package. Package provides access to software available in Arch Linux repositories.<br />
<br />
=== Gnome Settings Networking Support ===<br />
<br />
[[Install]] the {{Pkg|networkmanager}} package. <br />
<br />
This means that if you use other way of managing network it most likely has to be disabled.<br />
<br />
== Gnome Tweaks 45 update ==<br />
<br />
In the [[GNOME#Do not suspend when laptop lid is closed|Do_not_suspend_when_laptop_lid_is_closed]] section, the gnome tweaks option does not seem to be found in GNOME 45. [[User:Misaka 0x34ca|Misaka 0x34ca]] ([[User talk:Misaka 0x34ca|talk]]) 13:56, 15 October 2023 (UTC)</div>
Misaka 0x34ca
https://wiki.archlinux.org/index.php?title=Intel_NUC_X15&diff=782163
Intel NUC X15
2023-06-29T06:16:13Z
<p>Misaka 0x34ca: function keys work after installing {{AUR|tuxedo-keyboard-dkms}}</p>
<hr />
<div>[[Category:Intel]]<br />
{| class="wikitable" style="float: right;"<br />
|-<br />
! Hardware !! PCI/USB ID !! Working?<br />
|-<br />
| Bluetooth || {{ic|8087:0026}} || {{Yes}}<br />
|-<br />
| Webcam || {{ic|04f2:b71a}} || {{Yes}}<br />
|-<br />
| Ethernet || {{ic|8086:15f3}} || {{Yes}}<br />
|-<br />
| WiFi || {{ic|8086:43f0}} || {{Yes}}<br />
|-<br />
| GPU (Intel) || {{ic|8086:9a60}} || {{Yes}}<br />
|-<br />
| GPU (NVIDIA) || {{ic|10de:249d}} || {{Yes}}<br />
|-<br />
| Touchpad || || {{Yes}}<br />
|-<br />
| Keyboard || || {{Yes}}<br />
|-<br />
| TPM || || {{Yes}}<br />
|-<br />
| SD-card reader || {{ic|0bda:0316}} || {{Yes}}<br />
|-<br />
| Audio || {{ic|8086:43c8}} || {{Yes}}<br />
|}<br />
<br />
== Installation ==<br />
<br />
This device can only boot in [[UEFI]] mode.<br />
<br />
This device has an IR camera that can be used for face recognition authentication, try [[Howdy]] if you want to use that feature.<br />
<br />
To control the keyboard RGB backlighting, you can try {{AUR|python-ite8291r3-ctl}}.<br />
<br />
To have touchpad toggle and Airplane mode toggle working, you can try {{ic|uniwill_wmi}} module in {{AUR|tuxedo-keyboard-dkms}}.<br />
<br />
Additional steps may be required to get the screen to use a high refresh rate, see [[Intel graphics#Add support for 165Hz monitor]] and [[Kernel mode setting#Forcing modes and EDID]].<br />
<br />
== Accessibility ==<br />
<br />
The appearance of the UEFI is simple and not very colorful, so it might work well with OCR software. Navigation can be controlled by keyboard or mouse.<br />
<br />
{{Note|<br />
* By default, this device requires manual installation of memory and hard disk. Ask for help if you cannot do it yourself. <br />
* Blind users should request the help of a sighted person to change UEFI settings. <br />
}}<br />
<br />
* System Setup: {{ic|F2}}<br />
* Update BIOS: {{ic|F7}}<br />
* Windows Recovery Mode: {{ic|F8}}<br />
* Boot Menu: {{ic|F10}}<br />
* Network Boot: {{ic|F12}}<br />
<br />
== Firmware ==<br />
<br />
[[Secure Boot]] custom keys work well on this device.<br />
<br />
[[fwupd]] does not support this device yet.<br />
<br />
== Function keys ==<br />
<br />
{| class="wikitable"<br />
|-<br />
! Key<br />
! Visible?<sup>1</sup><br />
! Marked?<sup>2</sup><br />
! Effect<br />
|-<br />
| {{ic|Fn+Esc}} || {{No}} || {{Yes}} || Toggles Fn lock<br />
|-<br />
| {{ic|Fn+F1}} || {{Yes}}<sup>3</sup> || {{Yes}} || {{ic|XF86Sleep}}<br />
|-<br />
| {{ic|Fn+F2}} || {{Yes}} || {{Yes}} || {{ic|XF86AudioMute}}<br />
|-<br />
| {{ic|Fn+F3}} || {{Yes}} || {{Yes}} || {{ic|XF86AudioLowerVolume}}<br />
|-<br />
| {{ic|Fn+F4}} || {{Yes}} || {{Yes}} || {{ic|XF86AudioRaiseVolume}}<br />
|-<br />
| {{ic|Fn+F5}} || {{No}} || {{Yes}} || {{ic|XF86AudioMicMute}}, does not work.<br />
|-<br />
| {{ic|Fn+F7}} || {{Yes}} || {{Yes}} || {{ic|XF86TouchpadToggle}}<br />
|-<br />
| {{ic|Fn+F8}} || {{No}} || {{Yes}} || Toggles keyboard backlight brightness<br />
|-<br />
| {{ic|Fn+F9}} || {{Yes}} || {{Yes}} || {{ic|XF86MonBrightnessDown}}<br />
|-<br />
| {{ic|Fn+F10}} || {{Yes}} || {{Yes}} || {{ic|XF86MonBrightnessUp}}<br />
|-<br />
| {{ic|Fn+F11}} || {{Yes}} || {{Yes}} || Inputs {{ic|Super_L+P}}<br />
|-<br />
| {{ic|Fn+F12}} || {{Yes}} || {{Yes}} || {{ic|XF86RFKill}}<br />
|-<br />
| {{ic|Fn+Insert}} || {{Yes}} || {{Yes}} || {{ic|Print}}<br />
|-<br />
| {{ic|Fn+Scroll_Lock}} || {{Yes}} || {{Yes}} || {{ic|Num_Lock}}<br />
|}<br />
<br />
# The key is visible to {{ic|xev}} and similar tools<br />
# The physical key has a symbol on it, which describes its function<br />
# systemd-logind handles this by default<br />
<br />
<!-- == See also == --></div>
Misaka 0x34ca
https://wiki.archlinux.org/index.php?title=Talk:Wayland&diff=777799
Talk:Wayland
2023-05-11T15:45:31Z
<p>Misaka 0x34ca: /* Does Electron support to be run with GTK4 currently */ add related upstream issue</p>
<hr />
<div>== Window managers and desktop shells ==<br />
<br />
=== Enlightenment? ===<br />
<br />
I read [https://phab.enlightenment.org/w/wayland/ here] that they already had good support for Wayland two years ago. Doesn't that make it an important addition to this list?<br />
[[User:Johnchfr|Johnchfr]] ([[User talk:Johnchfr|talk]]) 17:49, 11 October 2014 (UTC)<br />
<br />
:Yes, you are free to add it. -- [[User:Kynikos|Kynikos]] ([[User talk:Kynikos|talk]]) 04:06, 13 October 2014 (UTC)<br />
<br />
::But, I tried it out (pkg from aur) and it seems very rough. The desktop comes up but when I try launching an app, displays an error dialog and when I close the dialog, it froze my system (I could not even switch ttys)! I didn't do much testing through different compile-options, though. -- [[User:Johnchfr|Johnchfr]] ([[User talk:Johnchfr|talk]]) 11:17, 14 October 2014 (UTC)<br />
<br />
:::It seems they're working on it, so it's worth being documented here, together with any relevant note about the state of the implementation. We don't decide what's good and what's bad for users here, we just give objective information to let the users make their own decisions. -- [[User:Kynikos|Kynikos]] ([[User talk:Kynikos|talk]]) 00:02, 15 October 2014 (UTC)<br />
<br />
:since it's years later now, a quick update: enlightenment is usable (like gnome) with few minor issues --[[User:Ubone|Ubone]] ([[User talk:Ubone|talk]]) 14:22, 4 February 2019 (UTC)<br />
<br />
== Graphics driver section ==<br />
<br />
Would be cool to have some graphics driver section, just like the Xorg page. Maybe a common page? [[User:Emersion|Emersion]] ([[User talk:Emersion|talk]]) 10:26, 15 December 2017 (UTC)<br />
<br />
== Troubleshooting "Running graphical applications as root" ==<br />
<br />
I think that the https://wiki.archlinux.org/index.php/Wayland#Running_graphical_applications_as_root<br />
section should warn that it might be a bug in the application, not a bug in Wayland if the user needs to run a GUI app as root, see https://bugzilla.redhat.com/show_bug.cgi?id=1274451#c76. The wording in https://fedoraproject.org/wiki/How_to_debug_Wayland_problems#Graphical_applications_can.27t_be_run_as_root_from_terminal is pretty good, so maybe we should link to that. --[[User:Wikizian|Wikizian]] ([[User talk:Wikizian|talk]]) 09:27, 5 April 2018 (UTC)<br />
<br />
===The easiest solution is to write an simple wladmin_exec script.===<br />
<br />
'''Containing this bash code'''<br />
<br />
#!/usr/bin/bash<br />
<br />
trap exit INT<br />
<br />
which sudo &> /dev/null<br />
if [ $? -ne 0 ] ; then<br />
printf "No sudo are installed.\n\nIf you want a better runtime perfomance you should install sudo!\n\nFallback to using slower xhost localuser method!\n"<br />
xhost +si:localuser:root &> /dev/null && sh -c "su -c ${@}" && xhost -si:localuser:root &> /dev/null<br />
exit<br />
fi<br />
<br />
printf "Trying to use sudo enviroment load method!\n\nExecuting: sudo -E ${@}\n" && sudo -E ${@} || printf "Lools like it fails!\nUsing slower fallback xhost localuser method!\n\n" xhost +si:localuser:root &> /dev/null && sh -c "sudo ${@} || su -c ${@}" && xhost -si:localuser:root &> /dev/null<br />
<br />
[[User:Nonie689|Nonie689]] ([[User talk:Nonie689|talk]]) 19:23, 18 July 2022 (UTC)<br />
<br />
== Move Weston section to its own page & cleanup? ==<br />
<br />
I think its a little odd that Weston is front and center on the Wayland page, and that it takes up 1/3 of the article.<br />
<br />
The Weston section comes before the relevant discussion on/list of Wayland compositors which might mislead users into thinking they need Weston for Wayland in the same way they need X.org for X. Especially with the way the page somewhat mirrors the X.org page which starts with xorg-server installation instructions, and that Weston is not listed along with the other Wayland compositors in the compositors section.<br />
<br />
In my opinion, the description of compositors should at least come first, and Weston should be listed among them. The Weston section should probably move to its own page. Additionally, some general and important info like XWayland is currently ensconced in the Weston section, so even users who know it is not relevant to them might miss it.<br />
<br />
Less important, but I also find it odd that there is no mention of the wayland or wayland-protocols packages on the Wayland page, even though they're just dependencies for some compositors.<br />
<br />
Finally, I think there should be a new section discussing application specific configuration as well, e.g. MOZ_ENABLE_WAYLAND or Wayland alternative software like xclip -> wl-clipboard.<br />
<br />
{{Unsigned|00:08, October 18 2019 (UTC)|Brocellous}}<br />
<br />
:Splitting is done: [[Weston]]. Sections were reordered: [https://wiki.archlinux.org/index.php?title=Wayland&diff=586478&oldid=586477] -- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 06:52, 18 October 2019 (UTC)<br />
<br />
== GDM and NVIDIA proprietary drivers ==<br />
<br />
This section is a candidate for merging with https://wiki.archlinux.org/index.php/GDM#Wayland_and_the_proprietary_NVIDIA_driver<br />
<br />
It took about an hour of digging through forum posts to answer the simple question "how do I force GDM to just use Wayland if I have an nvidia GPU?". This information wasn't anywhere on the wiki before, and without this specific action, Wayland is unusable for any desktop session launched via GDM. <br />
<br />
The GDM page currently makes it sound like GDM just doesn't support Wayland, but that is not true any more, and in fact, it appears to be working pretty well at the time of writing. I've added the meat of this section to the GDM page, but I think it's no harm to have the info in both places. If someone is trying to find out why GDM won't launch Wayland sessions, as I was, they might just as well go looking on the Wayland page in the wiki as on the GDM page.<br />
<br />
[[User:Andrew-wja|Andrew-wja]] ([[User talk:Andrew-wja|talk]]) 11:51, 11 November 2019 (UTC)<br />
<br />
:The information should be kept only in one place. The other place can say at most something like "See the first place for details." -- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 18:52, 15 November 2019 (UTC)<br />
<br />
== Compositors: Improvements ==<br />
<br />
Maybe the section could be improved, though that would be some work...<br />
<br />
* Explain differences (especially between tiling and stacking)<br />
* Create a table with more columns to explain features & status(?)<br />
<br />
[[User:G3ro|G3ro]] ([[User talk:G3ro|talk]]) 22:01, 14 October 2020 (UTC) G3ro<br />
<br />
:The tiling and stacking types are explained in [[Window manager#Types]], you can just link to that section.<br />
:I'm against creating a table, the features are already so diverse and numerous that it would not be readable.<br />
:-- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 12:24, 15 October 2020 (UTC)<br />
<br />
:: Ok, I added a link to that.<br />
:: Still I would like to see a bit more information:<br />
:: # Introduction: like what are compositors<br />
:: # More information in the list to make it easier for users to decide: which projects are active, mature, can be used with the following desktop environments etc.<br />
:: I am not saying it is easy to do, but maybe someone has the knowledge and could provide it.<br />
:: [[User:G3ro|G3ro]] ([[User talk:G3ro|talk]]) 15:14, 15 October 2020 (UTC) G3ro<br />
<br />
:::Obviously the most important thing that some compositors are missing is links to Arch packages... -- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 07:12, 16 October 2020 (UTC)<br />
<br />
:::: I don't know what you mean, I just checked and every compositor in Packages or AUR has a link, all others don't seem to have packages, or they are named very differently so the search does not show them. <br />
:::: [[User:G3ro|G3ro]] ([[User talk:G3ro|talk]]) 13:40, 17 October 2020 (UTC) G3ro<br />
<br />
:::::I mean that some items in [[Wayland#Compositors]] do not have a link to an Arch package (e.g. dwl, waymonad etc). -- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 13:49, 17 October 2020 (UTC)<br />
<br />
:::::: There is no package (at least I searched and found none), so they don't have a link. <br />
:::::: [[User:G3ro|G3ro]] ([[User talk:G3ro|talk]]) 13:54, 17 October 2020 (UTC) G3ro<br />
<br />
== Requirements: Better description or links for EGLstream ==<br />
<br />
Just as placeholder until someone does it.<br />
Right now there is only a link to an old Phoronix article.<br />
<br />
One suggestion: Even though it is a bit political it might be worth to mention the "conflict" between the Xorg Team & others on side and Nvidia on the other side over these buffer APIs.<br />
Otherwise people might not understand, why there is not one standard (yet).<br />
<br />
[[User:G3ro|G3ro]] ([[User talk:G3ro|talk]]) 15:28, 15 October 2020 (UTC) G3ro<br />
<br />
== Weston doesn't officially support EGLStreams ==<br />
<br />
Regarding [https://wiki.archlinux.org/index.php?title=Wayland&curid=10625&diff=649628&oldid=649126 this]: I would rather add a note to the linked section in the weston article, than mention the third party patch in the overview here.<br />
<br />
[[User:G3ro|G3ro]] ([[User talk:G3ro|talk]]) 19:53, 26 January 2021 (UTC)<br />
<br />
== wlroots and EGLStreams ==<br />
<br />
Unlike added in [[Special:Diff/652770]], wlroots does not support EGLStreams. The words "EGLStreams" or "Nvidia" are never mentioned in the readme, and [https://drewdevault.com/2017/10/26/Fuck-you-nvidia.html this blog post] from it's author explains why it isn't supported.<br />
<br />
I don't know where [[User:Drich]] got this info but it seems to be incorrect. -- [[User:Lonaowna|Lonaowna]] ([[User talk:Lonaowna|talk]]) 21:51, 19 February 2021 (UTC)<br />
<br />
:EGL are a '''dependency''' of wlroots, which is mentioned further down; I also never disputed the '''support'''. I disputed '''compatibilty''' which is simply not true. You can run [[sway]] perfectly fine with an Nvidia Card. Also the Readme mentions "unopinionated" modularity, which can be interpreted towards a broader compatibilty in consensus with the build dependencies. I disputed this section simply to make it of more granular wording instead of "its not supported" suggesting that I won't work ''' which isn't true'''. The sway's switch along the lines of "--no-i-wont-buy-nvidia-next-time" also suggest a general aversion towards locking out a majority of users. So filed a dispute to make it clear that this matter isn't exactly as straightforward as the compat table presents it. I intended to start a discussion to improve the sections style of writing. Just reversing the commit, doesn't improve the state of unclarity.<br />
: [[User:Drich|Drich]] ([[User talk:Drich|talk]]) 23:37, 19 February 2021 (UTC)<br />
<br />
::First of all, EGL is something different than EGLStreams. Using EGL does not mean using or supporting EGLStreams. GBM also uses EGL.<br />
::The table states that the proprietary [[NVIDIA]] graphics driver is incompatible with sway, which I believe to be correct. (meaning that you are actually not able to run it) It does not state that it is completely incompatible with Nvidia ''cards'', but it does state that it is incompatible with the [[NVIDIA]] ''driver''.<br />
::Yes you are kinda correct that "You can run [[sway]] perfectly fine with an Nvidia Card", but only when using the [[Nouveau]] driver.<br />
::If you think we should clarify that the table talks about ''drivers'' instead of ''cards'', I'm all for that. Also, there's nothing wrong with starting a discussion; that's what we're having right now!<br />
::--[[User:Lonaowna|Lonaowna]] ([[User talk:Lonaowna|talk]]) 10:18, 20 February 2021 (UTC)<br />
<br />
::: Well, I might have jumped the gun on that topic. I am in fact an Nvidia User, but I think my ability to run wlroots compositors might be due to the fact that Iam a PRIME user. I never considered the fact that EGL might not be a abbreviation for EGLStream. I don't think an edit is necessary anymore. Driver politics are irritating...<br />
:::[[User:Drich|Drich]] ([[User talk:Drich|talk]]) 12:01, 20 February 2021 (UTC)<br />
<br />
:::: I clarified the name to "proprietary [[NVIDIA | Nvidia driver]]" in the table. <br />
:::: [[User:G3ro|G3ro]] ([[User talk:G3ro|talk]]) 19:30, 20 February 2021 (UTC)<br />
<br />
:::::The column header as well as surrounding text already talk about a GPU ''driver'' which should be clear enough. -- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 08:35, 21 February 2021 (UTC)<br />
<br />
== The setting of environment variables may be unnecessary for Qt apps under Wayland ==<br />
<br />
The '''Qt''' subsection of the '''GUI''' libraries section states,<br />
<br />
"To run a Qt application with the Wayland plugin [4], use -platform wayland or QT_QPA_PLATFORM=wayland environment variable."<br />
<br />
But I was able to run both [[dooble]] and [[falkon]] under Wayland without having to set the variable. I merely had to install [[qt5-wayland]].<br />
<br />
Are these instructions still relevant?<br />
<br />
[[User:Pound Hash|Pound Hash]] ([[User talk:Pound Hash|talk]]) 21:10, 20 December 2021 (UTC)<br />
<br />
:Maybe your desktop environment had those already otherwise you could edit this mildly with "maybe" -- [[User:Ubone|Ubone]] ([[User talk:Ubone|talk]]) 10:44, 16 January 2022 (UTC)<br />
<br />
::I don't have a desktop environment; I use Sway. Also, I already wrote ''maybe'' in the OP. [[User:Pound Hash|Pound Hash]] ([[User talk:Pound Hash|talk]]) 06:10, 25 January 2022 (UTC)<br />
<br />
== Isn't GBM used by default instead of EGLStreams on NVIDIA cards now? ==<br />
<br />
I found no information regarding whether GBM is used instead of EGLStreams for popular compositors like Mutter and KWin. If anyone knows which one is used by default, then it might be necessary to add a note under the environment variables in [[Wayland#Requirements]] to clarify which compositors don't need those environment variables to use GBM as a backend.<br />
{{Unsigned|2022-08-20T12:46:51|Cont999}}<br />
<br />
== Does Electron support to be run with GTK4 currently ==<br />
<br />
In this [https://wiki.archlinux.org/index.php?title=Wayland&diff=767667&oldid=767592 edit], The following paragraph was added:<br />
<br />
"''Use {{ic|1=--gtk-version=4}} to solve fcitx input issue.''"<br />
<br />
However, after trying to run an Electron program with flag {{ic|1=--gtk-version=4}}, the following error was thrown:<br />
<br />
{{bc|<nowiki><br />
(process:39254): Gtk-ERROR **: 22:59:05.179: GTK 2/3 symbols detected. Using GTK 2/3 and GTK 4 in the same process is not supported<br />
</nowiki>}}<br />
<br />
Does Electron actually have the support to be run with GTK4 currently?<br />
<br />
Currently I have deleted the instruction content about the flag of {{ic|1=--gtk-version=4}} in this wiki page. I'd like to have the content added back if there is some solution to allow Electron to work properly with GTK4.<br />
<br />
[[User:白羊李志远|白羊李志远]] ([[User talk:白羊李志远|talk]]) 15:35, 11 May 2023 (UTC)<br />
<br />
:[https://github.com/electron/electron/issues/33662 Related upstream issue] --[[User:Misaka 0x34ca|Misaka 0x34ca]] ([[User talk:Misaka 0x34ca|talk]]) 15:45, 11 May 2023 (UTC)</div>
Misaka 0x34ca
https://wiki.archlinux.org/index.php?title=PCI_passthrough_via_OVMF&diff=775391
PCI passthrough via OVMF
2023-04-12T13:51:16Z
<p>Misaka 0x34ca: /* "Error 43: Driver failed to load" with mobile (Optimus/max-q) nvidia GPUs */ save SSDT1.dat without Internet</p>
<hr />
<div>[[Category:Virtualization]]<br />
[[ja:OVMF による PCI パススルー]]<br />
[[zh-hans:PCI passthrough via OVMF]]<br />
{{Related articles start}}<br />
{{Related|Intel GVT-g}}<br />
{{Related|PCI passthrough via OVMF/Examples}}<br />
{{Related|QEMU/Guest graphics acceleration}}<br />
{{Related articles end}}<br />
<br />
The Open Virtual Machine Firmware ([https://github.com/tianocore/tianocore.github.io/wiki/OVMF OVMF]) is a project to enable UEFI support for virtual machines. Starting with Linux 3.9 and recent versions of [[QEMU]], it is now possible to passthrough a graphics card, offering the virtual machine native graphics performance which is useful for graphic-intensive tasks.<br />
<br />
Provided you have a desktop computer with a spare GPU you can dedicate to the host (be it an integrated GPU or an old OEM card, the brands do not even need to match) and that your hardware supports it (see [[#Prerequisites]]), it is possible to have a virtual machine of any OS with its own dedicated GPU and near-native performance. For more information on techniques see the background [https://www.linux-kvm.org/images/b/b3/01x09b-VFIOandYou-small.pdf presentation (pdf)].<br />
<br />
== Prerequisites ==<br />
<br />
A VGA Passthrough relies on a number of technologies that are not ubiquitous as of today and might not be available on your hardware. You will not be able to do this on your machine unless the following requirements are met :<br />
<br />
* Your CPU must support hardware virtualization (for kvm) and IOMMU (for the passthrough itself)<br />
** [https://ark.intel.com/Search/FeatureFilter?productType=873&0_VTD=True List of compatible Intel CPUs (Intel VT-x and Intel VT-d)]<br />
** All AMD CPUs from the Bulldozer generation and up (including Zen) should be compatible.<br />
*** CPUs from the K10 generation (2007) do not have an IOMMU, so you '''need''' to have a motherboard with a [https://support.amd.com/TechDocs/43403.pdf#page=18 890FX] or [https://support.amd.com/TechDocs/48691.pdf#page=21 990FX] chipset to make it work, as those have their own IOMMU.<br />
* Your motherboard must also support IOMMU<br />
** Both the chipset and the BIOS must support it. It is not always easy to tell at a glance whether or not this is the case, but there is a fairly comprehensive list on the matter on the [https://wiki.xen.org/wiki/VTd_HowTo Xen wiki] as well as [[Wikipedia:List of IOMMU-supporting hardware]].<br />
* Your guest GPU ROM must support UEFI.<br />
** If you can find [https://www.techpowerup.com/vgabios/ any ROM in this list] that applies to your specific GPU and is said to support UEFI, you are generally in the clear. All GPUs from 2012 and later should support this, as Microsoft made UEFI a requirement for devices to be marketed as compatible with Windows 8.<br />
<br />
You will probably want to have a spare monitor or one with multiple input ports connected to different GPUs (the passthrough GPU will not display anything if there is no screen plugged in and using a VNC or Spice connection will not help your performance), as well as a mouse and a keyboard you can pass to your virtual machine. If anything goes wrong, you will at least have a way to control your host machine this way.<br />
<br />
{{Tip|You can do steps 1-3 with {{AUR|gpu-passthrough-manager}}. This is a simple graphical interface that lets you choose what graphics drivers you want to load on your system. This can also set up IOMMU and adds VFIO modules, but is limited to GRUB only. Select the graphics and audio devices you want to passthrough and then select LOAD VFIO. Reboot when prompted and then continue to step 4.}}<br />
<br />
== Setting up IOMMU ==<br />
<br />
{{Note|<br />
* IOMMU is a generic name for Intel VT-d and AMD-Vi.<br />
* VT-d stands for ''Intel Virtualization Technology for Directed I/O'' and should not be confused with VT-x ''Intel Virtualization Technology''. VT-x allows one hardware platform to function as multiple “virtual” platforms while VT-d improves security and reliability of the systems and also improves performance of I/O devices in virtualized environments.<br />
}}<br />
<br />
Using IOMMU opens to features like PCI passthrough and memory protection from faulty or malicious devices, see [[Wikipedia:Input-output memory management unit#Advantages]] and [https://www.quora.com/Memory-Management-computer-programming/Could-you-explain-IOMMU-in-plain-English Memory Management (computer programming): Could you explain IOMMU in plain English?].<br />
<br />
=== Enabling IOMMU ===<br />
<br />
Ensure that AMD-Vi/Intel VT-d is supported by the CPU and enabled in the BIOS settings. Both normally show up alongside other CPU features (meaning they could be in an overclocking-related menu) either with their actual names ("VT-d" or "AMD-Vi") or in more ambiguous terms such as "Virtualization technology", which may or may not be explained in the manual.<br />
<br />
{{Accuracy| IOMMU might already be enabled by default on some systems|Talk:PCI passthrough via OVMF#intel iommu kernel parameter might no be necessary on some systems}}<br />
<br />
Manually enable IOMMU support by setting the correct [[kernel parameter]] depending on the type of CPU in use:<br />
<br />
* For Intel CPUs (VT-d) set {{ic|1=intel_iommu=on}}. Since the kernel config option CONFIG_INTEL_IOMMU_DEFAULT_ON is not set in {{Pkg|linux}}.<br />
* For AMD CPUs (AMD-Vi), it is on if kernel detects IOMMU hardware support from BIOS.<br />
<br />
You should also append the {{ic|1=iommu=pt}} parameter. This will prevent Linux from touching devices which cannot be passed through.<br />
<br />
After rebooting, check [[dmesg]] to confirm that IOMMU has been correctly enabled:<br />
<br />
{{hc|# dmesg {{!}} grep -i -e DMAR -e IOMMU|<br />
[ 0.000000] ACPI: DMAR 0x00000000BDCB1CB0 0000B8 (v01 INTEL BDW 00000001 INTL 00000001)<br />
[ 0.000000] Intel-IOMMU: enabled<br />
[ 0.028879] dmar: IOMMU 0: reg_base_addr fed90000 ver 1:0 cap c0000020660462 ecap f0101a<br />
[ 0.028883] dmar: IOMMU 1: reg_base_addr fed91000 ver 1:0 cap d2008c20660462 ecap f010da<br />
[ 0.028950] IOAPIC id 8 under DRHD base 0xfed91000 IOMMU 1<br />
[ 0.536212] DMAR: No ATSR found<br />
[ 0.536229] IOMMU 0 0xfed90000: using Queued invalidation<br />
[ 0.536230] IOMMU 1 0xfed91000: using Queued invalidation<br />
[ 0.536231] IOMMU: Setting RMRR:<br />
[ 0.536241] IOMMU: Setting identity map for device 0000:00:02.0 [0xbf000000 - 0xcf1fffff]<br />
[ 0.537490] IOMMU: Setting identity map for device 0000:00:14.0 [0xbdea8000 - 0xbdeb6fff]<br />
[ 0.537512] IOMMU: Setting identity map for device 0000:00:1a.0 [0xbdea8000 - 0xbdeb6fff]<br />
[ 0.537530] IOMMU: Setting identity map for device 0000:00:1d.0 [0xbdea8000 - 0xbdeb6fff]<br />
[ 0.537543] IOMMU: Prepare 0-16MiB unity mapping for LPC<br />
[ 0.537549] IOMMU: Setting identity map for device 0000:00:1f.0 [0x0 - 0xffffff]<br />
[ 2.182790] [drm] DMAR active, disabling use of stolen memory<br />
}}<br />
<br />
=== Ensuring that the groups are valid ===<br />
<br />
The following script should allow you to see how your various PCI devices are mapped to IOMMU groups. If it does not return anything, you either have not enabled IOMMU support properly or your hardware does not support it.<br />
<br />
#!/bin/bash<br />
shopt -s nullglob<br />
for g in $(find /sys/kernel/iommu_groups/* -maxdepth 0 -type d | sort -V); do<br />
echo "IOMMU Group ${g##*/}:"<br />
for d in $g/devices/*; do<br />
echo -e "\t$(lspci -nns ${d##*/})"<br />
done;<br />
done;<br />
<br />
Example output:<br />
<br />
IOMMU Group 1:<br />
00:01.0 PCI bridge: Intel Corporation Xeon E3-1200 v2/3rd Gen Core processor PCI Express Root Port [8086:0151] (rev 09)<br />
IOMMU Group 2:<br />
00:14.0 USB controller: Intel Corporation 7 Series/C210 Series Chipset Family USB xHCI Host Controller [8086:0e31] (rev 04)<br />
IOMMU Group 4:<br />
00:1a.0 USB controller: Intel Corporation 7 Series/C210 Series Chipset Family USB Enhanced Host Controller #2 [8086:0e2d] (rev 04)<br />
IOMMU Group 10:<br />
00:1d.0 USB controller: Intel Corporation 7 Series/C210 Series Chipset Family USB Enhanced Host Controller #1 [8086:0e26] (rev 04)<br />
IOMMU Group 13:<br />
06:00.0 VGA compatible controller: NVIDIA Corporation GM204 [GeForce GTX 970] [10de:13c2] (rev a1)<br />
06:00.1 Audio device: NVIDIA Corporation GM204 High Definition Audio Controller [10de:0fbb] (rev a1)<br />
<br />
An IOMMU group is the smallest set of physical devices that can be passed to a virtual machine. For instance, in the example above, both the GPU in 06:00.0 and its audio controller in 6:00.1 belong to IOMMU group 13 and can only be passed together. The frontal USB controller, however, has its own group (group 2) which is separate from both the USB expansion controller (group 10) and the rear USB controller (group 4), meaning that [[#USB controller|any of them could be passed to a virtual machine without affecting the others]].<br />
<br />
=== Gotchas ===<br />
<br />
==== Plugging your guest GPU in an unisolated CPU-based PCIe slot ====<br />
<br />
Not all PCI-E slots are the same. Most motherboards have PCIe slots provided by both the CPU and the PCH. Depending on your CPU, it is possible that your processor-based PCIe slot does not support isolation properly, in which case the PCI slot itself will appear to be grouped with the device that is connected to it.<br />
<br />
IOMMU Group 1:<br />
00:01.0 PCI bridge: Intel Corporation Xeon E3-1200 v2/3rd Gen Core processor PCI Express Root Port (rev 09)<br />
01:00.0 VGA compatible controller: NVIDIA Corporation GM107 [GeForce GTX 750] (rev a2)<br />
01:00.1 Audio device: NVIDIA Corporation Device 0fbc (rev a1)<br />
<br />
This is fine so long as only your guest GPU is included in here, such as above. Depending on what is plugged in to your other PCIe slots and whether they are allocated to your CPU or your PCH, you may find yourself with additional devices within the same group, which would force you to pass those as well. If you are ok with passing everything that is in there to your virtual machine, you are free to continue. Otherwise, you will either need to try and plug your GPU in your other PCIe slots (if you have any) and see if those provide isolation from the rest or to install the ACS override patch, which comes with its own drawbacks. See [[#Bypassing the IOMMU groups (ACS override patch)]] for more information.<br />
<br />
{{Note|If they are grouped with other devices in this manner, pci root ports and bridges should neither be bound to vfio at boot, nor be added to the virtual machine.}}<br />
<br />
== Isolating the GPU ==<br />
<br />
In order to assign a device to a virtual machine, this device and all those sharing the same IOMMU group must have their driver replaced by a stub driver or a VFIO driver in order to prevent the host machine from interacting with them. In the case of most devices, this can be done on the fly right before the virtual machine starts.<br />
<br />
However, due to their size and complexity, GPU drivers do not tend to support dynamic rebinding very well, so you cannot just have some GPU you use on the host be transparently passed to a virtual machine without having both drivers conflict with each other. Because of this, it is generally advised to bind those placeholder drivers manually before starting the virtual machine, in order to stop other drivers from attempting to claim it.<br />
<br />
The following section details how to configure a GPU so those placeholder drivers are bound early during the boot process, which makes said device inactive until a virtual machine claims it or the driver is switched back. This is the preferred method, considering it has less caveats than switching drivers once the system is fully online.<br />
<br />
{{Warning|Once you reboot after this procedure, whatever GPU you have configured will no longer be usable on the host until you reverse the manipulation. Make sure the GPU you intend to use on the host is properly configured before doing this - your motherboard should be set to display using the host GPU.}}<br />
<br />
Starting with Linux 4.1, the kernel includes vfio-pci. This is a VFIO driver, meaning it fulfills the same role as pci-stub did, but it can also control devices to an extent, such as by switching them into their D3 state when they are not in use.<br />
<br />
=== Binding vfio-pci via device ID ===<br />
<br />
Vfio-pci normally targets PCI devices by ID, meaning you only need to specify the IDs of the devices you intend to passthrough. For the following IOMMU group, you would want to bind vfio-pci with {{ic|10de:13c2}} and {{ic|10de:0fbb}}, which will be used as example values for the rest of this section.<br />
<br />
IOMMU Group 13:<br />
06:00.0 VGA compatible controller: NVIDIA Corporation GM204 [GeForce GTX 970] [10de:13c2] (rev a1)<br />
06:00.1 Audio device: NVIDIA Corporation GM204 High Definition Audio Controller [10de:0fbb] (rev a1)}}<br />
<br />
{{Note|<br />
* You cannot specify which device to isolate using vendor-device ID pairs if the host GPU and the guest GPU share the same pair (i.e : if both are the same model). If this is your case, read [[#Using identical guest and host GPUs]] instead.<br />
* If, as noted in [[#Plugging your guest GPU in an unisolated CPU-based PCIe slot]], your pci root port is part of your IOMMU group, you '''must not''' pass its ID to {{ic|vfio-pci}}, as it needs to remain attached to the host to function properly. Any other device within that group, however, should be left for {{ic|vfio-pci}} to bind with.<br />
* Binding the audio device ({{ic|10de:0fbb}} in above's example) is optional. Libvirt is able to unbind it from the {{ic|snd_hda_intel}} driver on its own.<br />
}}<br />
<br />
Two methods exist for providing the device IDs. Specifying them via [[kernel parameters]] has the advantage of being able to easily edit, remove, or undo any breaking changes via your boot loader:<br />
<br />
vfio-pci.ids=10de:13c2,10de:0fbb<br />
<br />
Alternatively, the IDs may be added to a modprobe conf file. Since these conf files are embedded in the initramfs image, any changes require regenerating a new image each time:<br />
<br />
{{hc|/etc/modprobe.d/vfio.conf|2=<br />
options vfio-pci ids=10de:13c2,10de:0fbb<br />
}}<br />
<br />
=== Loading vfio-pci early ===<br />
<br />
==== mkinitcpio ====<br />
<br />
Since Arch's {{Pkg|linux}} has vfio-pci built as a module, we need to force it to load early before the graphics drivers have a chance to bind to the card. To ensure that, add {{ic|vfio_pci}}, {{ic|vfio}}, and {{ic|vfio_iommu_type1}} to [[mkinitcpio]]:<br />
<br />
{{hc|/etc/mkinitcpio.conf|2=<br />
MODULES=(... vfio_pci vfio vfio_iommu_type1 ...)<br />
}}<br />
<br />
{{Note|<br />
* As of kernel 6.2, the {{ic|vfio_virqfd}} functionality has been folded into the base {{ic|vfio}} module.<br />
* If you also have another driver loaded this way for [[Kernel mode setting#Early KMS start|early modesetting]] (such as {{ic|nouveau}}, {{ic|radeon}}, {{ic|amdgpu}}, {{ic|i915}}, etc.), all of the aforementioned VFIO modules must precede it.<br />
* If you are modesetting the {{ic|nvidia}} driver, the {{ic|vfio-pci.ids}} must be embedded in the initramfs image. If given via kernel arguments, they will be read too late to take effect. Follow the instructions in [[#Binding vfio-pci via device ID]] for adding the ids to a modprobe conf file.<br />
}}<br />
<br />
Also, ensure that the modconf hook is included in the HOOKS list of {{ic|mkinitcpio.conf}}:<br />
<br />
{{hc|/etc/mkinitcpio.conf|2=<br />
HOOKS=(... modconf ...)<br />
}}<br />
<br />
Since new modules have been added to the initramfs configuration, you must [[regenerate the initramfs]].<br />
<br />
==== booster ====<br />
<br />
Similar to mkinitcpio you need to specify modules to load early:<br />
{{hc|/etc/booster.yaml|2=<br />
modules_force_load: vfio_pci,vfio,vfio_iommu_type1<br />
}}<br />
<br />
and then [[Booster#Regenerate booster images|regenerate the initramfs]].<br />
<br />
==== dracut ====<br />
<br />
Following the same idea, we need to ensure all vfio drivers are in the initramfs. Add the following file to {{ic|/etc/dracut.conf.d}}:<br />
<br />
{{hc|10-vfio.conf|2=<br />
force_drivers+=" vfio_pci vfio vfio_iommu_type1 "<br />
}}<br />
<br />
Note that we used {{ic|force_drivers}} instead the usual {{ic|add_drivers}} option, which will ensure that the drivers are tried to be loaded early via modprobe ([[Dracut#Early kernel module loading]]).<br />
<br />
As with mkinitcpio, you must regenerate the initramfs afterwards. See [[dracut]] for more details.<br />
<br />
=== Verifying that the configuration worked ===<br />
<br />
Reboot and verify that vfio-pci has loaded properly and that it is now bound to the right devices.<br />
<br />
{{hc|# dmesg {{!}} grep -i vfio|<br />
[ 0.329224] VFIO - User Level meta-driver version: 0.3<br />
[ 0.341372] vfio_pci: add [10de:13c2[ffff:ffff]] class 0x000000/00000000<br />
[ 0.354704] vfio_pci: add [10de:0fbb[ffff:ffff]] class 0x000000/00000000<br />
[ 2.061326] vfio-pci 0000:06:00.0: enabling device (0100 -> 0103)<br />
}}<br />
<br />
It is not necessary for all devices (or even expected device) from {{ic|vfio.conf}} to be in ''dmesg'' output.<br />
Even if a device does not appear, it might still be visible and usable in the guest virtual machine.<br />
<br />
{{hc|$ lspci -nnk -d 10de:13c2|<br />
06:00.0 VGA compatible controller: NVIDIA Corporation GM204 [GeForce GTX 970] [10de:13c2] (rev a1)<br />
Kernel driver in use: vfio-pci<br />
Kernel modules: nouveau nvidia<br />
}}<br />
<br />
{{hc|$ lspci -nnk -d 10de:0fbb|<br />
06:00.1 Audio device: NVIDIA Corporation GM204 High Definition Audio Controller [10de:0fbb] (rev a1)<br />
Kernel driver in use: vfio-pci<br />
Kernel modules: snd_hda_intel<br />
}}<br />
<br />
== Setting up an OVMF-based guest virtual machine ==<br />
<br />
OVMF is an open-source UEFI firmware for QEMU virtual machines. While it is possible to use SeaBIOS to get similar results to an actual PCI passthrough, the setup process is different and it is generally preferable to use the EFI method if your hardware supports it.<br />
<br />
=== Configuring libvirt ===<br />
<br />
[[Libvirt]] is a wrapper for a number of virtualization utilities that greatly simplifies the configuration and deployment process of virtual machines. In the case of KVM and QEMU, the frontend it provides allows us to avoid dealing with the permissions for QEMU and make it easier to add and remove various devices on a live virtual machine. Its status as a wrapper, however, means that it might not always support all of the latest qemu features, which could end up requiring the use of a wrapper script to provide some extra arguments to QEMU.<br />
<br />
Install {{Pkg|qemu-desktop}}, {{Pkg|libvirt}}, {{Pkg|edk2-ovmf}}, and {{Pkg|virt-manager}}. For the default network connection {{pkg|dnsmasq}} is required.<br />
<br />
You can now [[enable]] and [[start]] {{ic|libvirtd.service}} and its logging component {{ic|virtlogd.socket}}.<br />
<br />
You may also need to [https://wiki.libvirt.org/page/Networking#NAT_forwarding_.28aka_.22virtual_networks.22.29 activate the default libvirt network]:<br />
# virsh net-autostart default<br />
# virsh net-start default<br />
<br />
{{Note|The default libvirt network will only be listed if the virsh command is run as root.}}<br />
<br />
=== Setting up the guest OS ===<br />
<br />
The process of setting up a virtual machine using {{ic|virt-manager}} is mostly self-explanatory, as most of the process comes with fairly comprehensive on-screen instructions.<br />
<br />
However, you should pay special attention to the following steps:<br />
<br />
* When the virtual machine creation wizard asks you to name your virtual machine (final step before clicking "Finish"), check the "Customize before install" checkbox.<br />
* In the "Overview" section, [https://i.imgur.com/73r2ctM.png set your firmware to "UEFI"]. If the option is grayed out, make sure that:<br />
** Your hypervisor is running as a system session and not a user session. This can be verified [https://i.ibb.co/N1XZCdp/Deepin-Screenshot-select-area-20190125113216.png by clicking, then hovering] over the session in virt-manager. If you are accidentally running it as a user session, you must open a new connection by clicking "File" > "Add Connection..", then select the option from the drop-down menu station "QEMU/KVM" and not "QEMU/KVM user session".<br />
* In the "CPUs" section, change your CPU model to "host-passthrough". If it is not in the list, you will have to either type it by hand or by using {{ic|virt-xml ''vmname'' --edit --cpu host-passthrough}}. This will ensure that your CPU is detected properly, since it causes libvirt to expose your CPU capabilities exactly as they are instead of only those it recognizes (which is the preferred default behavior to make CPU behavior easier to reproduce). Without it, some applications may complain about your CPU being of an unknown model.<br />
* If you want to minimize IO overhead, it is easier to setup [[#Virtio disk]] before installing<br />
<br />
The rest of the installation process will take place as normal using a standard QXL video adapter running in a window. At this point, there is no need to install additional drivers for the rest of the virtual devices, since most of them will be removed later on. Once the guest OS is done installing, simply turn off the virtual machine. It is possible you will be dropped into the UEFI menu instead of starting the installation upon powering your virtual machine for the first time. Sometimes the correct ISO file was not automatically detected and you will need to manually specify the drive to boot. By typing exit and navigating to "boot manager" you will enter a menu that allows you to choose between devices.<br />
<br />
=== Attaching the PCI devices ===<br />
<br />
With the installation done, it is now possible to edit the hardware details in libvirt and remove virtual integration devices, such as the spice channel and virtual display, the QXL video adapter, the emulated mouse and keyboard and the USB tablet device. For example, remove the following sections from your XML file:<br />
<br />
{{bc|1=<nowiki/><br />
<channel type="spicevmc"><br />
...<br />
</channel><br />
<input type="tablet" bus="usb"><br />
...<br />
</input><br />
<input type="mouse" bus="ps2"/><br />
<input type="keyboard" bus="ps2"/><br />
<graphics type="spice" autoport="yes"><br />
...<br />
</graphics><br />
<video><br />
<model type="qxl" .../><br />
...<br />
</video><br />
}}<br />
<br />
Since that leaves you with no input devices, you may want to bind a few USB host devices to your virtual machine as well, but remember to '''leave at least one mouse and/or keyboard assigned to your host''' in case something goes wrong with the guest. This may be done by using {{ic|Add Hardware > USB Host Device}}.<br />
<br />
At this point, it also becomes possible to attach the PCI device that was isolated earlier; simply click on "Add Hardware" and select the PCI Host Devices you want to passthrough. If everything went well, the screen plugged into your GPU should show the OVMF splash screen and your virtual machine should start up normally. From there, you can setup the drivers for the rest of your virtual machine.<br />
<br />
=== Video card driver virtualisation detection ===<br />
<br />
Video card drivers by AMD incorporate very basic virtual machine detection targeting Hyper-V extensions. Should this detection mechanism trigger, the drivers will refuse to run, resulting in a black screen.<br />
<br />
If this is the case, it is required to modify the reported Hyper-V vendor ID:<br />
<br />
{{hc|$ virsh edit ''vmname''|2=<br />
...<br />
<features><br />
...<br />
<hyperv><br />
...<br />
<vendor_id state='on' value='randomid'/><br />
...<br />
</hyperv><br />
...<br />
</features><br />
...<br />
}}<br />
<br />
Nvidia guest drivers prior to version 465 exhibited a similar behaviour which resulted in a generic error 43 in the card's device manager status. Systems using these older drivers therefore also need the above modification. In addition, they also require hiding the KVM CPU leaf:<br />
<br />
{{hc|$ virsh edit ''vmname''|2=<br />
...<br />
<features><br />
...<br />
<kvm><br />
<hidden state='on'/><br />
</kvm><br />
...<br />
</features><br />
...<br />
}}<br />
<br />
Note that the above steps do not equate 'hiding' the virtual machine from Windows or any drivers/programs running in the virtual machine. Also, various other issues not related to any detection mechanism referred to here can also trigger error 43.<br />
<br />
=== Passing keyboard/mouse via Evdev ===<br />
<br />
If you do not have a spare mouse or keyboard to dedicate to your guest, and you do not want to suffer from the video overhead of Spice, you can setup evdev to share them between your Linux host and your virtual machine.<br />
<br />
{{Note|By default, press both left and right {{ic|Ctrl}} keys at the same time to swap control between the host and the guest.<br />
You can change this hotkeys. You need to set {{ic|grabToggle}} variable to one of available combination {{ic|Ctrl+Ctrl}}, {{ic|Alt+Alt}}, {{ic|Shift+Shift}}, {{ic|Meta+Meta}}, {{ic|ScrollLock}} or {{ic|Ctrl+ScrollLock}} for your keyboard.<br />
More information: https://github.com/libvirt/libvirt/blob/master/docs/formatdomain.rst#input-devices<br />
}}<br />
<br />
First, find your keyboard and mouse devices in {{ic|/dev/input/by-id/}}. Only devices with {{ic|event}} in their name are valid. You may find multiple devices associated to your mouse or keyboard, so try {{ic|cat /dev/input/by-id/''device_id''}} and either hit some keys on the keyboard or wiggle your mouse to see if input comes through, if so you have got the right device. Now add those devices to your configuration:<br />
<br />
{{hc|$ virsh edit ''vmname''|2=<br />
...<br />
<devices><br />
...<br />
<input type='evdev'><br />
<source dev='/dev/input/by-id/MOUSE_NAME'/><br />
</input><br />
<input type='evdev'><br />
<source dev='/dev/input/by-id/KEYBOARD_NAME' grab='all' repeat='on' grabToggle='ctrl-ctrl'/><br />
</input><br />
...<br />
</devices><br />
}}<br />
<br />
Replace {{ic|MOUSE_NAME}} and {{ic|KEYBOARD_NAME}} with your device path. Now you can startup the guest OS and test swapping control of your mouse and keyboard between the host and guest by pressing both the left and right control keys at the same time.<br />
<br />
You may also consider switching from PS/2 to Virtio inputs in your configurations. Add these two devices:<br />
<br />
{{hc|$ virsh edit ''vmname''|2=<br />
...<br />
<input type='mouse' bus='virtio'/><br />
<input type='keyboard' bus='virtio'/><br />
...<br />
}}<br />
<br />
The virtio input devices will not actually be used until the guest drivers are installed. QEMU will continue to send key events to the PS2 devices until it detects the virtio input driver initialization. Note that the PS2 devices cannot be removed as they are an internal function of the emulated Q35/440FX chipsets.<br />
<br />
=== Gotchas ===<br />
<br />
==== Using a non-EFI image on an OVMF-based virtual machine ====<br />
<br />
The OVMF firmware does not support booting off non-EFI mediums. If the installation process drops you in a UEFI shell right after booting, you may have an invalid EFI boot media. Try using an alternate Linux/Windows image to determine if you have an invalid media.<br />
<br />
== Performance tuning ==<br />
<br />
Most use cases for PCI passthroughs relate to performance-intensive domains such as video games and GPU-accelerated tasks. While a PCI passthrough on its own is a step towards reaching native performance, there are still a few ajustments on the host and guest to get the most out of your virtual machine.<br />
<br />
=== CPU pinning ===<br />
<br />
The default behavior for KVM guests is to run operations coming from the guest as a number of threads representing virtual processors. Those threads are managed by the Linux scheduler like any other thread and are dispatched to any available CPU cores based on niceness and priority queues. As such, the local CPU cache benefits (L1/L2/L3) are lost each time the host scheduler reschedules the virtual CPU thread on a different physical CPU. This can noticeably harm performance on the guest. CPU pinning aims to resolve this by limiting which physical CPUs the virtual CPUs are allowed to run on. The ideal setup is a one to one mapping such that the virtual CPU cores match physical CPU cores while taking hyperthreading/SMT into account.<br />
<br />
In addition, in some modern CPUs, groups of cores often share a common L3 cache. In such cases, care should be taken to pin exactly those physical cores that share a particular L3. Failing to do so might lead to cache evictions which could result in microstutters.<br />
<br />
{{Note|For certain users enabling CPU pinning may introduce stuttering and short hangs, especially with the MuQSS scheduler (present in linux-ck and linux-zen kernels). You might want to try disabling pinning first if you experience similar issues, which effectively trades maximum performance for responsiveness at all times.}}<br />
<br />
==== CPU topology ====<br />
<br />
Most modern CPUs support hardware multitasking, also known as hyper-threading on Intel CPUs or SMT on AMD CPUs. Hyper-threading/SMT is simply a very efficient way of running two threads on one CPU core at any given time. You will want to take into consideration that the CPU pinning you choose will greatly depend on what you do with your host while your virtual machine is running.<br />
<br />
To find the topology for your CPU run {{ic|1=lscpu -e}}:<br />
<br />
{{Note|Pay special attention to the 4th column '''"CORE"''' as this shows the association of the Physical/Logical CPU cores as well as the 8th column '''"L3"''' which shows which cores are connected to which L3 cache.}}<br />
<br />
{{ic|lscpu -e}} on a 6c/12t Ryzen 5 1600:<br />
<br />
CPU NODE SOCKET CORE L1d:L1i:L2:L3 ONLINE MAXMHZ MINMHZ<br />
0 0 0 0 0:0:0:0 yes 3800.0000 1550.0000<br />
1 0 0 0 0:0:0:0 yes 3800.0000 1550.0000<br />
2 0 0 1 1:1:1:0 yes 3800.0000 1550.0000<br />
3 0 0 1 1:1:1:0 yes 3800.0000 1550.0000<br />
4 0 0 2 2:2:2:0 yes 3800.0000 1550.0000<br />
5 0 0 2 2:2:2:0 yes 3800.0000 1550.0000<br />
6 0 0 3 3:3:3:1 yes 3800.0000 1550.0000<br />
7 0 0 3 3:3:3:1 yes 3800.0000 1550.0000<br />
8 0 0 4 4:4:4:1 yes 3800.0000 1550.0000<br />
9 0 0 4 4:4:4:1 yes 3800.0000 1550.0000<br />
10 0 0 5 5:5:5:1 yes 3800.0000 1550.0000<br />
11 0 0 5 5:5:5:1 yes 3800.0000 1550.0000<br />
<br />
Considering the L3 mapping, it is recommended to pin and isolate CPUs 6–11. Pinning and isolating fewer than these (e.g. 8–11) would result in the host system making use of the L3 cache in core 6 and 7 which would eventually lead to cache evictions and therefore bad performance.<br />
<br />
{{Note|Ryzen 3000 ComboPi AGESA changes topology to match Intel example, even on prior generation CPUs. Above valid only on older AGESA.}}<br />
<br />
{{ic|lscpu -e}} on a 6c/12t Intel 8700k:<br />
<br />
CPU NODE SOCKET CORE L1d:L1i:L2:L3 ONLINE MAXMHZ MINMHZ<br />
0 0 0 0 0:0:0:0 yes 4600.0000 800.0000<br />
1 0 0 1 1:1:1:0 yes 4600.0000 800.0000<br />
2 0 0 2 2:2:2:0 yes 4600.0000 800.0000<br />
3 0 0 3 3:3:3:0 yes 4600.0000 800.0000<br />
4 0 0 4 4:4:4:0 yes 4600.0000 800.0000<br />
5 0 0 5 5:5:5:0 yes 4600.0000 800.0000<br />
6 0 0 0 0:0:0:0 yes 4600.0000 800.0000<br />
7 0 0 1 1:1:1:0 yes 4600.0000 800.0000<br />
8 0 0 2 2:2:2:0 yes 4600.0000 800.0000<br />
9 0 0 3 3:3:3:0 yes 4600.0000 800.0000<br />
10 0 0 4 4:4:4:0 yes 4600.0000 800.0000<br />
11 0 0 5 5:5:5:0 yes 4600.0000 800.0000<br />
<br />
Since all cores are connected to the same L3 in this example, it does not matter much how many CPUs you pin and isolate as long as you do it in the proper thread pairs. For instance, (0, 6), (1, 7), etc.<br />
<br />
As we see above, with AMD '''Core 0''' is sequential with '''CPU 0 & 1''', whereas Intel places '''Core 0''' on '''CPU 0 & 6'''.<br />
<br />
{{Tip|You can view your systems topology in diagram form, which may help some users. If you have {{Pkg|hwloc}} installed, run {{ic|lstopo}} to generate a helpful image of your CPU/Thread groupings.}}<br />
<br />
If you do not need all cores for the guest, it would then be preferable to leave at the very least one core for the host. Choosing which cores one to use for the host or guest should be based on the specific hardware characteristics of your CPU, however '''Core 0''' is a good choice for the host in most cases. If any cores are reserved for the host, it is recommended to pin the emulator and iothreads, if used, to the host cores rather than the VCPUs. This may improve performance and reduce latency for the guest since those threads will not pollute the cache or contend for scheduling with the guest VCPU threads. If all cores are passed to the guest, there is no need or benefit to pinning the emulator or iothreads.<br />
<br />
==== XML examples ====<br />
<br />
{{Note|Do not use the '''iothread''' lines from the XML examples shown below if you have not added an '''iothread''' to your disk controller. '''iothread''''s only work on '''virtio-scsi''' or '''virtio-blk''' devices.}}<br />
<br />
===== 4c/1t CPU w/o Hyperthreading Example =====<br />
<br />
{{hc|$ virsh edit ''vmname''|2=<br />
...<br />
<vcpu placement='static'>4</vcpu><br />
<cputune><br />
<vcpupin vcpu='0' cpuset='0'/><br />
<vcpupin vcpu='1' cpuset='1'/><br />
<vcpupin vcpu='2' cpuset='2'/><br />
<vcpupin vcpu='3' cpuset='3'/><br />
</cputune><br />
...<br />
}}<br />
<br />
===== 4c/2t Intel/AMD CPU example (after ComboPI AGESA bios update) =====<br />
<br />
{{hc|$ virsh edit ''vmname''|2=<br />
...<br />
<vcpu placement='static'>8</vcpu><br />
<iothreads>1</iothreads><br />
<cputune><br />
<vcpupin vcpu='0' cpuset='2'/><br />
<vcpupin vcpu='1' cpuset='8'/><br />
<vcpupin vcpu='2' cpuset='3'/><br />
<vcpupin vcpu='3' cpuset='9'/><br />
<vcpupin vcpu='4' cpuset='4'/><br />
<vcpupin vcpu='5' cpuset='10'/><br />
<vcpupin vcpu='6' cpuset='5'/><br />
<vcpupin vcpu='7' cpuset='11'/><br />
<emulatorpin cpuset='0,6'/><br />
<iothreadpin iothread='1' cpuset='0,6'/><br />
</cputune><br />
...<br />
<cpu mode='host-passthrough'><br />
<topology sockets='1' cores='4' threads='2'/><br />
</cpu><br />
...<br />
}}<br />
<br />
===== 4c/2t AMD CPU example (Before ComboPi AGESA bios update) =====<br />
<br />
{{hc|$ virsh edit ''vmname''|2=<br />
...<br />
<vcpu placement='static'>8</vcpu><br />
<iothreads>1</iothreads><br />
<cputune><br />
<vcpupin vcpu='0' cpuset='2'/><br />
<vcpupin vcpu='1' cpuset='3'/><br />
<vcpupin vcpu='2' cpuset='4'/><br />
<vcpupin vcpu='3' cpuset='5'/><br />
<vcpupin vcpu='4' cpuset='6'/><br />
<vcpupin vcpu='5' cpuset='7'/><br />
<vcpupin vcpu='6' cpuset='8'/><br />
<vcpupin vcpu='7' cpuset='9'/><br />
<emulatorpin cpuset='0-1'/><br />
<iothreadpin iothread='1' cpuset='0-1'/><br />
</cputune><br />
...<br />
<cpu mode='host-passthrough'><br />
<topology sockets='1' cores='4' threads='2'/><br />
</cpu><br />
...<br />
}}<br />
<br />
{{Note|If further CPU isolation is needed, consider using the '''isolcpus''' kernel command-line parameter on the unused physical/logical cores.}}<br />
<br />
If you do not intend to be doing any computation-heavy work on the host (or even anything at all) at the same time as you would on the virtual machine, you may want to pin your virtual machine threads across all of your cores, so that the virtual machine can fully take advantage of the spare CPU time the host has available. Be aware that pinning all physical and logical cores of your CPU could induce latency in the guest virtual machine.<br />
<br />
=== Huge memory pages ===<br />
<br />
When dealing with applications that require large amounts of memory, memory latency can become a problem since the more memory pages are being used, the more likely it is that this application will attempt to access information across multiple memory "pages", which is the base unit for memory allocation. Resolving the actual address of the memory page takes multiple steps, and so CPUs normally cache information on recently used memory pages to make subsequent uses on the same pages faster. Applications using large amounts of memory run into a problem where, for instance, a virtual machine uses 4 GiB of memory divided into 4 KiB pages (which is the default size for normal pages) for a total of 1.04 million pages, meaning that such cache misses can become extremely frequent and greatly increase memory latency. Huge pages exist to mitigate this issue by giving larger individual pages to those applications, increasing the odds that multiple operations will target the same page in succession.<br />
<br />
==== Transparent huge pages ====<br />
<br />
QEMU will use 2MiB sized transparent huge pages automatically without any explicit configuration in QEMU or Libvirt, subject to some important caveats. When using VFIO the pages are locked in at boot time and transparent huge pages are allocated up front when the virtual machine first boots. If the kernel memory is highly fragmented, or the virtual machine is using a majority of the remaining free memory, it is likely that the kernel will not have enough 2MiB pages to fully satisfy the allocation. In such a case, it silently fails by using a mix of 2MiB and 4KiB pages. Since the pages are locked in VFIO mode, the kernel will not be able to convert those 4KiB pages to huge after the virtual machine starts either. The number of available 2MiB huge pages available to THP is the same as via the [[#Dynamic huge pages]] mechanism described in the following sections.<br />
<br />
To check how much memory THP is using globally:<br />
<br />
{{hc|$ grep AnonHugePages /proc/meminfo|<br />
AnonHugePages: 8091648 kB<br />
}}<br />
<br />
To check a specific QEMU instance. QEMU's PID must be substituted in the grep command:<br />
<br />
{{hc|$ grep -P 'AnonHugePages:\s+(?!0)\d+' /proc/[PID]/smaps|<br />
AnonHugePages: 8087552 kB<br />
}}<br />
<br />
In this example, the virtual machine was allocated 8388608KiB of memory, but only 8087552KiB was available via THP. The remaining 301056KiB are allocated as 4KiB pages. Aside from manually checking, there is no indication when partial allocations occur. As such, THP's effectiveness is very much dependent on the host system's memory fragmentation at the time of virtual machine startup. If this trade off is unacceptable or strict guarantees are required, [[#Static huge pages]] is recommended.<br />
<br />
Arch kernels have THP compiled in and enabled by default with {{ic|1=/sys/kernel/mm/transparent_hugepage/enabled}} set to {{ic|1=madvise}} mode.<br />
<br />
==== Static huge pages ====<br />
<br />
While transparent huge pages should work in the vast majority of cases, they can also be allocated statically during boot. This should only be needed to make use 1 GiB hugepages on machines that support it, since transparent huge pages normally only go up to 2 MiB.<br />
<br />
{{Warning|Static huge pages lock down the allocated amount of memory, making it unavailable for applications that are not configured to use them. Allocating 4 GiBs worth of huge pages on a machine with 8 GiB of memory will only leave you with 4 GiB of available memory on the host '''even when the virtual machine is not running'''.}}<br />
<br />
{{Note|The described procedures have some drawbacks but will not necessarily net you a great performance advantage. According to [https://developers.redhat.com/blog/2021/04/27/benchmarking-transparent-versus-1gib-static-huge-page-performance-in-linux-virtual-machines#benchmarks Red Hat benchmarks], you should not expect more than a 2% performance gain from this over [[#Transparent huge pages]].}}<br />
<br />
To allocate huge pages at boot, one must simply specify the desired amount on their kernel command line with {{ic|1=hugepages=''x''}}. For instance, reserving 1024 pages with {{ic|1=hugepages=1024}} and the default size of 2048 KiB per huge page creates 2 GiB worth of memory for the virtual machine to use.<br />
<br />
If supported by CPU page size could be set manually. 1 GiB huge page support could be verified by {{ic|grep pdpe1gb /proc/cpuinfo}}. Setting 1 GiB huge page size via kernel parameters : {{ic|1=default_hugepagesz=1G hugepagesz=1G hugepages=X}}.<br />
<br />
Also, since static huge pages can only be used by applications that specifically request it, you must add this section in your libvirt domain configuration to allow kvm to benefit from them :<br />
<br />
{{hc|$ virsh edit ''vmname''|2=<br />
...<br />
<memoryBacking><br />
<hugepages/><br />
</memoryBacking><br />
...<br />
}}<br />
<br />
==== Dynamic huge pages ====<br />
<br />
{{Accuracy|Need futher testing if this variant as effective as static one}}<br />
<br />
Hugepages could be allocated manually via {{ic|vm.nr_overcommit_hugepages}} [[sysctl]] parameter.<br />
<br />
{{hc|/etc/sysctl.d/10-kvm.conf|2=<br />
vm.nr_hugepages = 0<br />
vm.nr_overcommit_hugepages = ''num''<br />
}}<br />
<br />
Where {{ic|''num''}} - is the number of huge pages, which default size if 2 MiB.<br />
Pages will be automatically allocated, and freed after the virtual machine stops.<br />
<br />
More manual way:<br />
<br />
# echo ''num'' > /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages<br />
# echo ''num'' > /sys/kernel/mm/hugepages/hugepages-1048576kB/nr_hugepages<br />
<br />
For 2 MiB and 1 GiB page size respectively.<br />
And they should be manually freed in the same way.<br />
<br />
It is hardly recommended to drop caches, compact memory and wait a couple of seconds before starting the virtual machine, as there could be not enough free contiguous memory for required huge pages blocks. Especially after some uptime of the host system.<br />
<br />
# echo 3 > /proc/sys/vm/drop_caches<br />
# echo 1 > /proc/sys/vm/compact_memory<br />
<br />
Theoretically, 1 GiB pages works as 2 MiB. But practically - no guaranteed way was found to get contiguous 1 GiB memory blocks. Each consequent request of 1 GiB blocks lead to lesser and lesser dynamically allocated count.<br />
<br />
=== CPU frequency governor ===<br />
<br />
Depending on the way your [[CPU frequency scaling|CPU governor]] is configured, the virtual machine threads may not hit the CPU load thresholds for the frequency to ramp up. Indeed, KVM cannot actually change the CPU frequency on its own, which can be a problem if it does not scale up with vCPU usage as it would result in underwhelming performance. An easy way to see if it behaves correctly is to check if the frequency reported by {{ic|watch lscpu}} goes up when running a CPU-intensive task on the guest. If you are indeed experiencing stutter and the frequency does not go up to reach its reported maximum, it may be due to [https://lime-technology.com/forum/index.php?topic=46664.msg447678#msg447678 cpu scaling being controlled by the host OS]. In this case, try setting all cores to maximum frequency to see if this improves performance. Note that if you are using a modern intel chip with the default pstate driver, cpupower commands will be [[CPU frequency scaling#Scaling drivers|ineffective]], so monitor {{ic|/proc/cpuinfo}} to make sure your cpu is actually at max frequency.<br />
<br />
{{Warning|Depending on your processor, it might actually be detrimental to performance to force the whole CPU to run at full frequency at all times. For instance, modern AMD processors (Zen 2 and Zen 3) depend heavily on being able to scale individual cores in separate core complexes for optimal thermal distribution. If the whole CPU is running at full frequency at all times, there is less headroom for invididual cores to clock high, resulting in worse performance for processes that are not heavily multithreaded such as games. This should be benchmarked in your virtual machine.}}<br />
<br />
=== Isolating pinned CPUs ===<br />
<br />
CPU pinning by itself will not prevent other host processes from running on the pinned CPUs. Properly isolating the pinned CPUs can reduce latency in the guest virtual machine.<br />
<br />
==== With isolcpus kernel parameter ====<br />
<br />
In this example, let us assume you are using CPUs 4-7.<br />
Use the [[kernel parameters]] {{ic|isolcpus nohz_full}} to completely isolate the CPUs from the kernel. For example:<br />
<br />
isolcpus=4-7 nohz_full=4-7<br />
<br />
Then, run {{ic|qemu-system-x86_64}} with taskset and chrt:<br />
<br />
# chrt -r 1 taskset -c 4-7 qemu-system-x86_64 ...<br />
<br />
The {{ic|chrt}} command will ensure that the task scheduler will round-robin distribute work (otherwise it will all stay on the first cpu). For {{ic|taskset}}, the CPU numbers can be comma- and/or dash-separated, like "0,1,2,3" or "0-4" or "1,7-8,10" etc.<br />
<br />
See [https://web.archive.org/web/20210520061110/https://www.removeddit.com/r/VFIO/comments/6vgtpx/high_dpc_latency_and_audio_stuttering_on_windows/dm0sfto/ this Internet Archive copy of a Removeddit mirror of a Reddit thread] for more info. ([https://www.reddit.com/r/VFIO/comments/6vgtpx/high_dpc_latency_and_audio_stuttering_on_windows/dm0sfto/ The original thread] is worthless because of deleted comments, and Removeddit not longer works.)<br />
<br />
==== Dynamically isolating CPUs ====<br />
<br />
The isolcpus kernel parameter will permanently reserve CPU cores, even when the guest is not running. A more flexible alternative is to dynamically isolate CPUs when starting the guest. This can be achieved with the following alternatives:<br />
<br />
* {{AUR|cpuset-git}} ([https://www.redhat.com/archives/vfio-users/2016-September/msg00072.html vfio-users post], [https://rokups.github.io/#!pages/gaming-vm-performance.md blog post], [https://github.com/PassthroughPOST/VFIO-Tools/blob/master/libvirt_hooks/hooks/cset.sh example script])<br />
* {{AUR|vfio-isolate}}<br />
* systemd<br />
<br />
===== Example with systemd =====<br />
<br />
In this example, we assume a host with 12 CPUs, where CPUs 2-5 and 8-11 are [[#CPU pinning|pinned]] to the guest. Then run the following to isolate the host to CPUs 0, 1, 6, and 7:<br />
<br />
# systemctl set-property --runtime -- user.slice AllowedCPUs=0,1,6,7<br />
# systemctl set-property --runtime -- system.slice AllowedCPUs=0,1,6,7<br />
# systemctl set-property --runtime -- init.scope AllowedCPUs=0,1,6,7<br />
<br />
After shutting down the guest, run the following to reallocate all 12 CPUs back to the host:<br />
<br />
# systemctl set-property --runtime -- user.slice AllowedCPUs=0-11<br />
# systemctl set-property --runtime -- system.slice AllowedCPUs=0-11<br />
# systemctl set-property --runtime -- init.scope AllowedCPUs=0-11<br />
<br />
You can use a [https://libvirt.org/hooks.html libvirt hook] to automatically run the above at startup/shutdown of the guest like so:<br />
<br />
Create or edit {{ic|/etc/libvirt/hooks/qemu}} with the following content.<br />
<br />
{{hc|/etc/libvirt/hooks/qemu|2=<br />
#!/bin/sh<br />
<br />
command=$2<br />
<br />
if [ "$command" = "started" ]; then<br />
systemctl set-property --runtime -- system.slice AllowedCPUs=0,1,6,7<br />
systemctl set-property --runtime -- user.slice AllowedCPUs=0,1,6,7<br />
systemctl set-property --runtime -- init.scope AllowedCPUs=0,1,6,7<br />
elif [ "$command" = "release" ]; then<br />
systemctl set-property --runtime -- system.slice AllowedCPUs=0-11<br />
systemctl set-property --runtime -- user.slice AllowedCPUs=0-11<br />
systemctl set-property --runtime -- init.scope AllowedCPUs=0-11<br />
fi<br />
}}<br />
<br />
Afterwards make it [[executable]].<br />
<br />
[[Restart]] {{ic|libvirtd.service}} and then start your virtual machine. If you create some heavily multithreaded load on your host now, you should see that it keeps your chosen CPUs free from load while the virtual machine can still make use of it. You should also see those CPUs automatically getting fully used by your host once you terminate the virtual machine.<br />
<br />
More examples are contained in the following reddit threads: [https://www.reddit.com/r/VFIO/comments/ebe3l5/deprecated_isolcpus_workaround/fem8jgk] [https://www.reddit.com/r/VFIO/comments/gyem88/noob_question_how_to_isolate_cpu_cores/ftaqno1/] [https://www.reddit.com/r/VFIO/comments/ij25rg/splitting_ht_cores_between_host_and_vm/]<br />
<br />
Note that this requires systemd 244 or higher, and [[cgroups|cgroups v2]], which is now enabled by default.<br />
<br />
=== Improving performance on AMD CPUs ===<br />
<br />
Starting with QEMU 3.1 the TOPOEXT cpuid flag is disabled by default. In order to use hyperthreading (SMT) on AMD CPUs you need to manually enable it:<br />
<br />
<cpu mode='host-passthrough' check='none'><br />
<topology sockets='1' cores='4' threads='2'/><br />
<feature policy='require' name='topoext'/><br />
</cpu><br />
<br />
commit: https://git.qemu.org/?p=qemu.git;a=commit;h=7210a02c58572b2686a3a8d610c6628f87864aed<br />
<br />
=== Virtio disk ===<br />
<br />
{{Merge|QEMU#Installing virtio drivers|Off-topic.|section=Moving virtio disk section to QEMU}}<br />
<br />
The default disk types are SATA or IDE emulation out of the box. These controllers offer maximum compatibility but are not suited for efficient virtualization. Two accelerated models exist: {{ic|1=virtio-scsi}} for SCSI emulation and passthrough, or {{ic|1=virtio-blk}} for a more basic block device emulation.<br />
<br />
==== Drivers ====<br />
<br />
* Linux guests should support these out of the box on any modern kernel<br />
* macOS has {{ic|1=virtio-blk}} support starting in Mojave via {{ic|1=AppleVirtIO.kext}}<br />
* Windows needs the [https://docs.fedoraproject.org/en-US/quick-docs/creating-windows-virtual-machines-using-virtio-drivers/ Windows virtio drivers]. {{ic|1=virtio-scsi}} uses the {{ic|1=vioscsi}} driver. {{ic|1=virtio-blk}} uses the {{ic|1=viostor}} driver<br />
* Windows can be installed directly onto these disks by selecting 'load driver' on the installer disk selection menu. The windows iso and virtio driver iso should both be attached as regular SATA/IDE cdroms during the installation process<br />
* To switch boot disks to virtio on an existing Windows installation:<br />
** {{ic|1=virtio-blk}}: Add a temporary disk with bus {{ic|1=virtio}}, boot windows & load the driver for the disk, then shutdown and switch the boot disk disk bus to {{ic|1=virtio}}<br />
** {{ic|1=virtio-scsi}}: Add a scsi controller with model {{ic|1=virtio}}, boot windows & load the driver for the controller, then shutdown and switch the boot disk bus to {{ic|1=scsi}} (not virtio)<br />
<br />
==== Considerations ====<br />
<br />
* {{ic|1=virtio-scsi}} TRIM support is mature, all versions should support it. Traditionally, {{ic|1=virtio-scsi}} has been the preferred approach for this reason<br />
* {{ic|1=virtio-blk}} TRIM support is new, this requires requires qemu 4.0+, guest linux kernel 5.0+, guest windows drivers 0.1.173+<br />
* Thin provisioning works by enabling TRIM on a sparse image file: {{ic|1=discard='unmap'}}. Unused blocks will be freed and the disk usage will drop (works on both raw and qcow2). Actual on-disk size of a sparse image file may be checked with {{ic|1=du /path/to/disk.img}}<br />
* Thin provisioning can also work with block storage such as zfs zvols or thin lvm<br />
* Virt queue count will influence the number of threads inside the guest kernel used for IO processing, suggest using {{ic|1=queues='4'}} or more<br />
* Native mode ({{ic|1=io='native'}}) uses a single threaded model based on linux AIO, is a bit more CPU efficient but may have lower peak performance and does not allow host side caching to be used<br />
* Threaded mode ({{ic|1=io='threads'}}) will spawn dozens of threads on demand as the disk is used. This is less efficient but may perform better if there are enough host cores available to run them, and allows for host side caching to be used<br />
* Modern versions of libvirt will group the dynamic worker threads created when using threaded mode in with the iothread=1 cgroup for pinning purposes. Very old versions of libvirt left these in the emulator cgroup<br />
<br />
==== IO threads ====<br />
<br />
An IO thread is a dedicated thread for processing disk events, rather than using the main qemu emulator loop. This should not be confused with the worker threads spawned on demand with {{ic|1=io='threads'}}.<br />
<br />
* You can only use one iothread per disk controller. The thread must be assigned to a specific controller with {{ic|1=iothread='X'}} in the {{ic|1=<driver>}} tag. Furthermore, extra & unassigned iothreads will not be used and do nothing<br />
* In the case of {{ic|1=virtio-scsi}}, there is one controller for multiple scsi disks. The iothread is assigned on the controller: {{ic|1=<controller><driver iothread='X'>}}<br />
* In the case of {{ic|1=virtio-blk}}, each disk has its own controller. The iothread is assigned in the driver tag under the disk itself: {{ic|1=<disk><driver iothread='X'>}}<br />
* Since emulated disks incur a significant amount of CPU overhead, that can lead to vcpu stuttering under high disk load (especially high random IOPS). In this case it helps to pin the IO to different core(s) than your vcpus with {{ic|1=<iothreadpin>}}<br />
<br />
==== Examples with libvirt ====<br />
<br />
virtio-scsi + iothread + worker threads + host side writeback caching + full disk block device backend:<br />
<domain><br />
<devices><br />
<disk type='block' device='disk'><br />
<driver name='qemu' type='raw' cache='writeback' io='threads' discard='unmap'/><br />
<source dev='/dev/disk/by-id/ata-Samsung_SSD_840_EVO_1TB_S1D9NSAF206396F'/><br />
<target dev='sda' bus='scsi'/><br />
</disk><br />
<controller type='scsi' index='0' model='virtio-scsi'><br />
<driver iothread='1' queues='8'/><br />
</controller><br />
<br />
virtio-blk + iothread + native aio + no host caching + raw sparse image backend:<br />
<domain><br />
<devices><br />
<disk type='file' device='disk'><br />
<driver name='qemu' type='raw' cache='none' io='native' discard='unmap' iothread='1' queues='8'/><br />
<source file='/var/lib/libvirt/images/pool/win10.img'/><br />
<target dev='vda' bus='virtio'/><br />
</disk><br />
<br />
Creating the iothreads:<br />
<domain><br />
<iothreads>1</iothreads><br />
<br />
Pinning iothreads:<br />
<domain><br />
<cputune><br />
<iothreadpin iothread='1' cpuset='0-1,6-7'/><br />
<br />
==== Example with virt-manager ====<br />
<br />
This will create a {{ic|1=virtio-blk}} device:<br />
# Open the virtual machine preferences<br />
# Go to {{ic|Add Hardware > Storage}}<br />
# Create or choose a storage file<br />
# Select {{ic|Device Type: Disk device}} and {{ic|Bus type: VirtIO}}<br />
# Click Finish<br />
<br />
=== Virtio network ===<br />
<br />
The default NIC models rtl8139 or e1000 can be a bottleneck for gigabit+ speeds and have a significant amount of CPU overhead compared to {{ic|1=virtio-net}}.<br />
<br />
* Select {{ic|1=virtio}} as the model for the NIC with libvirt or use the {{ic|1=virtio-net-pci}} device in bare qemu<br />
* Windows needs the {{ic|1=NetKVM}} driver from [https://docs.fedoraproject.org/en-US/quick-docs/creating-windows-virtual-machines-using-virtio-drivers/ Windows virtio drivers]<br />
* Virtio uses vhost-net by default for in-kernel packet processing without exiting to userspace<br />
* Multiqueue can enabled for a further speedup with multiple connections but typically will not boost single stream speeds. For libvirt add {{ic|1=<driver queues='8'/>}} under the interface tag<br />
* Zero copy transmit may also be enabled on macvtap by setting the module parameter {{ic|1=vhost_net.experimental_zcopytx=1}} but this may actually have worse performance, see [https://github.com/torvalds/linux/commit/098eadce3c622c07b328d0a43dda379b38cf7c5e commit]<br />
<br />
Libvirt example with a bridge:<br />
<br />
<interface type='bridge'><br />
<mac address="52:54:00:6d:6e:2e"/><br />
<source bridge='br0'/><br />
<model type='virtio'/><br />
<driver queues='8'/><br />
</interface><br />
<br />
MACVTAP example with a bridge:<br />
<br />
<interface type="direct"><br />
<source dev="'''eno1'''" mode="vepa"/><br />
<target dev="macvtap0"/><br />
<model type="virtio"/><br />
<alias name="net0"/><br />
</interface><br />
Possible options for mode are 'vepa', 'bridge', 'private', and 'passthrough'. A guide with decriptions of the differences is available from redhat[https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/virtualization_deployment_and_administration_guide/sect-virtual_networking-directly_attaching_to_physical_interface].<br />
<br />
Replace the source {{ic|/dev}} device with your own device address. You can get your local address with the following command:<br />
<br />
{{hc|$ ip link|<br />
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000<br />
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00<br />
2: '''eno1''': <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP mode DEFAULT group default qlen 1000<br />
link/ether 30:9c:23:ac:51:d0 brd ff:ff:ff:ff:ff:ff<br />
altname enp0s31f6<br />
}}<br />
<br />
=== Further tuning ===<br />
<br />
More specialized virtual machine tuning tips are available at [https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html-single/virtualization_tuning_and_optimization_guide/index Red Hat's Virtualization Tuning and Optimization Guide].<br />
<br />
== Special procedures ==<br />
<br />
Certain setups require specific configuration tweaks in order to work properly. If you are having problems getting your host or your virtual machine to work properly, see if your system matches one of the cases below and try adjusting your configuration accordingly.<br />
<br />
=== Using identical guest and host GPUs ===<br />
<br />
{{Expansion|A number of users have been having issues with this, it should probably be adressed by the article.|Talk:PCI passthrough via OVMF#Additionnal sections}}<br />
<br />
Due to how vfio-pci uses your vendor and device id pair to identify which device they need to bind to at boot, if you have two GPUs sharing such an ID pair you will not be able to get your passthrough driver to bind with just one of them. This sort of setup makes it necessary to use a script, so that whichever driver you are using is instead assigned by pci bus address using the {{ic|driver_override}} mechanism.<br />
<br />
==== Script variants ====<br />
<br />
===== Passthrough all GPUs but the boot GPU =====<br />
<br />
Here, we will make a script to bind vfio-pci to all GPUs but the boot gpu. Create the script {{ic|/usr/local/bin/vfio-pci-override.sh}}:<br />
<br />
{{bc|1=<br />
#!/bin/sh<br />
<br />
for i in /sys/bus/pci/devices/*/boot_vga; do<br />
if [ $(cat "$i") -eq 0 ]; then<br />
GPU="${i%/boot_vga}"<br />
AUDIO="$(echo "$GPU" {{!}} sed -e "s/0$/1/")"<br />
USB="$(echo "$GPU" {{!}} sed -e "s/0$/2/")"<br />
echo "vfio-pci" > "$GPU/driver_override"<br />
if [ -d "$AUDIO" ]; then<br />
echo "vfio-pci" > "$AUDIO/driver_override"<br />
fi<br />
if [ -d "$USB" ]; then<br />
echo "vfio-pci" > "$USB/driver_override"<br />
fi<br />
fi<br />
done<br />
<br />
modprobe -i vfio-pci<br />
}}<br />
<br />
===== Passthrough selected GPU =====<br />
<br />
In this case we manually specify the GPU to bind.<br />
<br />
{{bc|1=<br />
#!/bin/sh<br />
<br />
DEVS="0000:03:00.0 0000:03:00.1"<br />
<br />
if [ ! -z "$(ls -A /sys/class/iommu)" ]; then<br />
for DEV in $DEVS; do<br />
echo "vfio-pci" > /sys/bus/pci/devices/$DEV/driver_override<br />
done<br />
fi<br />
<br />
modprobe -i vfio-pci<br />
}}<br />
<br />
===== Passthrough IOMMU Group based of GPU =====<br />
<br />
Simplifying the passthrough of other necessary devices from selected GPU(s). <br />
Things like the graphicscard's onboard Audio, USB and RGB controllers.<br />
<br />
{{bc|1=<br />
#!/bin/sh<br />
<br />
DEVS="0000:03:00.0"<br />
<br />
if [ ! -z "$(ls -A /sys/class/iommu)" ]; then<br />
for DEV in $DEVS; do<br />
for IOMMUDEV in $(ls /sys/bus/pci/devices/$DEV/iommu_group/devices) ; do<br />
echo "vfio-pci" > /sys/bus/pci/devices/$IOMMUDEV/driver_override<br />
done<br />
done<br />
fi<br />
<br />
modprobe -i vfio-pci<br />
}}<br />
<br />
==== Script installation ====<br />
<br />
Edit {{ic|/etc/mkinitcpio.conf}}:<br />
<br />
# Add {{ic|modconf}} to the [[mkinitcpio#HOOKS|HOOKS]] array and {{ic|/usr/local/bin/vfio-pci-override.sh}} to the [[mkinitcpio#BINARIES and FILES|FILES]] array.<br />
<br />
Edit {{ic|/etc/modprobe.d/vfio.conf}}:<br />
<br />
# Add the following line: {{ic|install vfio-pci /usr/local/bin/vfio-pci-override.sh}}<br />
# [[Regenerate the initramfs]] and reboot.<br />
<br />
=== Passing the boot GPU to the guest ===<br />
<br />
{{Expansion|This is related to VBIOS issues and should be moved into a separate section regarding VBIOS compatibility.|section=UEFI (OVMF) Compatibility in VBIOS}}<br />
<br />
The GPU marked as {{ic|boot_vga}} is a special case when it comes to doing PCI passthroughs, since the BIOS needs to use it in order to display things like boot messages or the BIOS configuration menu. To do that, it makes [https://www.redhat.com/archives/vfio-users/2016-May/msg00224.html a copy of the VGA boot ROM which can then be freely modified]. This modified copy is the version the system gets to see, which the passthrough driver may reject as invalid. As such, it is generally recommended to change the boot GPU in the BIOS configuration so the host GPU is used instead or, if that is not possible, to swap the host and guest cards in the machine itself.<br />
<br />
=== Using Looking Glass to stream guest screen to the host ===<br />
<br />
It is possible to make a virtual machine share the monitor, and optionally a keyboard and a mouse with a help of [https://looking-glass.io/ Looking Glass].<br />
<br />
==== Adding IVSHMEM Device to virtual machines ====<br />
<br />
Looking glass works by creating a shared memory buffer between a host and a guest. This is a lot faster than streaming frames via localhost, but requires additional setup. <br />
<br />
With your virtual machine turned off open the machine configuration<br />
<br />
{{hc|$ virsh edit ''vmname''|2=<br />
...<br />
<devices><br />
...<br />
<shmem name='looking-glass'><br />
<model type='ivshmem-plain'/><br />
<size unit='M'>32</size><br />
</shmem><br />
</devices><br />
...<br />
}}<br />
<br />
You should replace 32 with your own calculated value based on what resolution you are going to pass through. It can be calculated like this:<br />
<br />
width x height x 4 x 2 = total bytes<br />
total bytes / 1024 / 1024 = total mebibytes + 10<br />
<br />
For example, in case of 1920x1080<br />
<br />
1920 x 1080 x 4 x 2 = 16,588,800 bytes<br />
16,588,800 / 1024 / 1024 = 15.82 MiB + 10 = 25.82<br />
<br />
The result must be '''rounded up''' to the nearest power of two, and since 25.82 is bigger than 16 we should choose 32.<br />
<br />
Next create a configuration file to create the shared memory file on boot<br />
<br />
{{hc|/etc/tmpfiles.d/10-looking-glass.conf|2=<br />
f /dev/shm/looking-glass 0660 '''user''' kvm -<br />
}}<br />
<br />
Replace user with your username.<br />
<br />
Ask systemd-tmpfiles to create the shared memory file now without waiting to next boot<br />
<br />
# systemd-tmpfiles --create /etc/tmpfiles.d/10-looking-glass.conf<br />
<br />
==== Installing the IVSHMEM Host to Windows guest ====<br />
<br />
Currently Windows would not notify users about a new IVSHMEM device, it would silently install a dummy driver. To actually enable the device you have to go into device manager and update the driver for the device under the "System Devices" node for '''"PCI standard RAM Controller"'''. Download the signed driver [https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/upstream-virtio/ from Red Hat].<br />
<br />
Once the driver is installed you must download a matching [https://looking-glass.io/downloads looking-glass-host] package that matches the client you will install from AUR, and install it on your guest. In order to run it you would also need to install Microsoft Visual C++ Redistributable from [https://www.visualstudio.com/downloads/ Microsoft]. The recent version will automatically install a service that starts the daemon on boot. The logs of the host daemon are located at {{ic|%ProgramData%\Looking Glass (host)\looking-glass-host.txt}} on the guest system.<br />
<br />
==== Setting up the null video device ====<br />
<br />
(Retrieved from: https://looking-glass.io/docs/stable/install/#spice-server)<br />
<br />
If you would like to use Spice to give you keyboard and mouse input along with clipboard sync support, make sure you have a {{ic|1=<graphics type='spice'>}} device, then:<br />
<br />
* Find your {{ic|<video>}} device, and set {{ic|1=<model type='none'/>}}<br />
* If you cannot find it, make sure you have a {{ic|<graphics>}} device, save and edit again<br />
<br />
==== Getting a client ====<br />
<br />
Looking glass client can be installed from AUR using {{AUR|looking-glass}} or {{AUR|looking-glass-git}} packages.<br />
<br />
You can start it once the virtual machine is set up and running<br />
<br />
$ looking-glass-client<br />
<br />
If you do not want to use Spice to control the guest mouse and keyboard you can disable the Spice server.<br />
<br />
$ looking-glass-client -s<br />
<br />
Additionally you may want to start Looking Glass Client in full screen, otherwise the image may be scaled down resulting in poor image fidelity.<br />
<br />
$ looking-glass-client -F<br />
<br />
To inhibit your host's screensaver start Looking Glass with the {{ic|-S}} flag.<br />
<br />
$ looking-glass-client -S<br />
<br />
This does not work on some DEs, including KDE. The issue with KDE is likely related to [https://bugs.kde.org/show_bug.cgi?id=383575 this behaviour]. To temporarily disable the host's screensaver while using Looking Glass and KDE you can wrap Looking Glass in the following script:<br />
{{bc|<br />
#!/bin/sh<br />
kwriteconfig5 --file kscreenlockerrc --group Daemon --key Autolock false<br />
qdbus org.freedesktop.ScreenSaver /ScreenSaver configure<br />
looking-glass-client<br />
kwriteconfig5 --file kscreenlockerrc --group Daemon --key Autolock true<br />
qdbus org.freedesktop.ScreenSaver /ScreenSaver configure<br />
}}<br />
<br />
Launch with the {{ic|--help}} option for further information.<br />
<br />
==== Additional information ====<br />
<br />
Refer to the [https://looking-glass.io/docs/ upstream documentation] for further details.<br />
<br />
=== Swap peripherals to and from the Host ===<br />
<br />
Looking Glass includes a Spice client in order to control mouse movement on the Windows guest. However this may have too much latency for certain applications, such as gaming. An alternative method is passing through specific USB devices for minimal latency. This allows for switching the devices between host and guest.<br />
<br />
First create a .xml file for the device(s) you wish to pass-through, which libvirt will use to identify the device.<br />
<br />
{{hc|~/.VFIOinput/input_1.xml|2=<br />
<hostdev mode='subsystem' type='usb' managed='no'><br />
<source><br />
<vendor id='0x[Before Colon]'/><br />
<product id='0x[After Colon]'/><br />
</source><br />
</hostdev><br />
}}<br />
<br />
Replace [Before/After Colon] with the contents of the 'lsusb' command, specific to the device you want to pass-through.<br />
<br />
For instance my mouse is {{ic|Bus 005 Device 002: ID 1532:0037 Razer USA, Ltd}} so I would replace {{ic|vendor id}} with 1532, and {{ic|product id}} with 0037.<br />
<br />
Repeat this process for any additional USB devices you want to pass-through. If your mouse / keyboard has multiple entries in {{ic|lsusb}}, perhaps if it is wireless, then create additional xml files for each.<br />
<br />
{{Note|Do not forget to change the path & name of the script(s) above and below to match your user and specific system.}}<br />
<br />
Next a bash script file is needed to tell libvirt what to attach/detach the USB devices to the guest.<br />
<br />
{{hc|~/.VFIOinput/input_attach.sh|2=<br />
#!/bin/sh<br />
<br />
virsh attach-device [VirtualMachine-Name] [USBdevice]<br />
}}<br />
<br />
Replace [VirtualMachine-Name] with the name of your virtual machine, which can be seen under virt-manager. Additionally replace [USBdevice] with the '''full''' path to the .xml file for the device you wish to pass-through. Add additional lines for more than 1 device. For example here is my script:<br />
<br />
{{hc|~/.VFIOinput/input_attach.sh|2=<br />
#!/bin/sh<br />
<br />
virsh attach-device win10 /home/$USER/.VFIOinput/input_mouse.xml<br />
virsh attach-device win10 /home/$USER/.VFIOinput/input_keyboard.xml<br />
}}<br />
<br />
Next duplicate the script file and replace {{ic|attach-device}} with {{ic|detach-device}}. Ensure both scripts are [[executable]].<br />
<br />
This 2 script files can now be executed to attach or detach your USB devices from the host to the guest virtual machine. It is important to note that they may need to be executed as root. To run the script from the Windows virtual machine, one possibility is using [[PuTTY]] to [[SSH]] into the host, and execute the script. On Windows PuTTY comes with plink.exe which can execute singular commands over SSH before then logging out, instead of opening a SSH terminal, all in the background.<br />
<br />
{{hc|detach_devices.bat|2=<br />
"C:\Program Files\PuTTY\plink.exe" root@$HOST_IP -pw $ROOTPASSWORD /home/$USER/.VFIOinput/input_detach.sh<br />
}}<br />
<br />
Replace {{ic|$HOST_IP}} with the Host [[Network configuration#IP addresses|IP Address]] and $ROOTPASSWORD with the root password.<br />
<br />
{{warning|This method is insecure if somebody has access to your virtual machine, since they could open the file and read your password. It is advisable to use [[SSH keys]] instead!}}<br />
<br />
You may also want to execute the script files using key binds. On Windows one option is [https://autohotkey.com/ Autohotkey], and on the Host [[Xbindkeys]]. Because of the need to run the scripts as root, you may also need to use [[Polkit]] or [[Sudo]] which can both be used to authenticate specific executables as able to run as root without needing a password.<br />
<br />
=== Bypassing the IOMMU groups (ACS override patch) ===<br />
<br />
If you find your PCI devices grouped among others that you do not wish to pass through, you may be able to seperate them using Alex Williamson's ACS override patch. Make sure you understand [https://vfio.blogspot.com/2014/08/iommu-groups-inside-and-out.html the potential risk] of doing so. <br />
<br />
You will need a kernel with the patch applied. The easiest method to acquiring this is through the {{pkg|linux-zen}} or {{AUR|linux-vfio}} package.<br />
<br />
In addition, the ACS override patch needs to be enabled with kernel command line options. The patch file adds the following documentation:<br />
<br />
pcie_acs_override =<br />
[PCIE] Override missing PCIe ACS support for:<br />
downstream<br />
All downstream ports - full ACS capabilties<br />
multifunction<br />
All multifunction devices - multifunction ACS subset<br />
id:nnnn:nnnn<br />
Specfic device - full ACS capabilities<br />
Specified as vid:did (vendor/device ID) in hex<br />
<br />
The option {{ic|1=pcie_acs_override=downstream,multifunction}} should break up as many devices as possible.<br />
<br />
After installation and configuration, reconfigure your [[kernel parameters]] to load the new kernel with the {{ic|1=pcie_acs_override=}} option enabled.<br />
<br />
== Plain QEMU without libvirt ==<br />
<br />
Instead of setting up a virtual machine with the help of libvirt, plain QEMU commands with custom parameters can be used for running the virtual machine intended to be used with PCI passthrough. This is desirable for some use cases like scripted setups, where the flexibility for usage with other scripts is needed.<br />
<br />
To achieve this after [[#Setting up IOMMU]] and [[#Isolating the GPU]], follow the [[QEMU]] article to setup the virtualized environment, [[QEMU#Enabling KVM|enable KVM]] on it and use the flag {{ic|1=-device vfio-pci,host=07:00.0}} replacing the identifier (07:00.0) with your actual device's ID that you used for the GPU isolation earlier.<br />
<br />
For utilizing the OVMF firmware, make sure the {{Pkg|edk2-ovmf}} package is installed, copy the UEFI variables from {{ic|/usr/share/edk2-ovmf/x64/OVMF_VARS.fd}} to temporary location like {{ic|/tmp/MY_VARS.fd}} and finally specify the OVMF paths by appending the following parameters to the QEMU command (order matters):<br />
<br />
* {{ic|1=-drive if=pflash,format=raw,readonly=on,file=/usr/share/edk2-ovmf/x64/OVMF_CODE.fd}} for the actual OVMF firmware binary, note the readonly option<br />
* {{ic|1=-drive if=pflash,format=raw,file=/tmp/MY_VARS.fd}} for the variables<br />
<br />
{{Note|<br />
* Make sure that {{ic|1=OVMF_CODE.fd}} is given as a command line parameter before {{ic|1=MY_VARS.fd}}. The boot sequence will fail otherwise.<br />
* QEMU's default SeaBIOS can be used instead of OVMF, but it is not recommended as it can cause issues with passthrough setups.<br />
}}<br />
<br />
It is recommended to study the QEMU article for ways to enhance the performance by using the [[QEMU#Installing virtio drivers|virtio drivers]] and other further configurations for the setup.<br />
<br />
You also might have to use the {{ic|1=-cpu host,kvm=off}} parameter to forward the host's CPU model info to the virtual machine and fool the virtualization detection used by Nvidia's and possibly other manufacturers' device drivers trying to block the full hardware usage inside a virtualized system.<br />
<br />
== Passing through other devices ==<br />
<br />
=== USB controller ===<br />
<br />
If your motherboard has multiple USB controllers mapped to multiple groups, it is possible to pass those instead of USB devices. Passing an actual controller over an individual USB device provides the following advantages : <br />
<br />
* If a device disconnects or changes ID over the course of an given operation (such as a phone undergoing an update), the virtual machine will not suddenly stop seeing it.<br />
* Any USB port managed by this controller is directly handled by the virtual machine and can have its devices unplugged, replugged and changed without having to notify the hypervisor.<br />
* Libvirt will not complain if one of the USB devices you usually pass to the guest is missing when starting the virtual machine.<br />
<br />
Unlike with GPUs, drivers for most USB controllers do not require any specific configuration to work on a virtual machine and control can normally be passed back and forth between the host and guest systems with no side effects.<br />
<br />
{{Warning|Make sure your USB controller supports resetting: [[#Passing through a device that does not support resetting]]}}<br />
<br />
You can find out which USB devices correspond to which controller and how various ports and devices are assigned to each one of them using this command:<br />
<br />
{{hc|1=$ for usb_ctrl in /sys/bus/pci/devices/*/usb*; do pci_path=${usb_ctrl%/*}; iommu_group=$(readlink $pci_path/iommu_group); echo "Bus $(cat $usb_ctrl/busnum) --> ${pci_path##*/} (IOMMU group ${iommu_group##*/})"; lsusb -s ${usb_ctrl#*/usb}:; echo; done|2=<br />
Bus 1 --> 0000:00:1a.0 (IOMMU group 4)<br />
Bus 001 Device 004: ID 04f2:b217 Chicony Electronics Co., Ltd Lenovo Integrated Camera (0.3MP)<br />
Bus 001 Device 007: ID 0a5c:21e6 Broadcom Corp. BCM20702 Bluetooth 4.0 [ThinkPad]<br />
Bus 001 Device 008: ID 0781:5530 SanDisk Corp. Cruzer<br />
Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub<br />
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub<br />
<br />
Bus 2 --> 0000:00:1d.0 (IOMMU group 9)<br />
Bus 002 Device 006: ID 0451:e012 Texas Instruments, Inc. TI-Nspire Calculator<br />
Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub<br />
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub<br />
}}<br />
<br />
This laptop has 3 USB ports managed by 2 USB controllers, each with their own IOMMU group. In this example, Bus 001 manages a single USB port (with a SanDisk USB pendrive plugged into it so it appears on the list), but also a number of internal devices, such as the internal webcam and the bluetooth card. Bus 002, on the other hand, does not apprear to manage anything except for the calculator that is plugged into it. The third port is empty, which is why it does not show up on the list, but is actually managed by Bus 002.<br />
<br />
Once you have identified which controller manages which ports by plugging various devices into them and decided which one you want to passthrough, simply add it to the list of PCI host devices controlled by the virtual machine in your guest configuration. No other configuration should be needed.<br />
<br />
{{Note|If your USB controller does not support resetting, is not in an isolated group, or is otherwise unable to be passed through then it may still be possible to accomplish similar results through [[udev]] rules. See [https://github.com/olavmrk/usb-libvirt-hotplug] which allows any device connected to specified USB ports to be automatically attached to a virtual machine.}}<br />
<br />
=== Passing audio from virtual machine to host via PulseAudio ===<br />
<br />
It is possible to route the virtual machine's audio to the host as an application using libvirt. This has the advantage of multiple audio streams being routable to one host output, and working with audio output devices that do not support passthrough. This requires [[PulseAudio]] to be running on the host system.<br />
<br />
First, [[install]] {{Pkg|qemu-audio-pa}}.<br />
<br />
Then, remove the comment from the {{ic|1=#user = ""}} line. Then add your username in the quotations. This tells QEMU which user's pulseaudio stream to route through.<br />
<br />
{{hc|/etc/libvirt/qemu.conf|2=<br />
user = "example"<br />
}}<br />
<br />
An emulated audio setup consists of two components: An emulated sound device exposed to the guest and an audio backend connecting the sound device to the host's PulseAudio.<br />
<br />
Of the emulated sound devices available, two are of main interest: ICH9 and usb-audio. ICH9 features both output and input but is limited to stereo. usb-audio only features audio output but supports up to 6 channels in 5.1 configuration. For ICH9 remove any pre-existing audio backend in the {{ic|<devices>}} section and add:<br />
<br />
{{hc|$ virsh edit ''vmname''|2=<nowiki/><br />
<sound model='ich9'><br />
<codec type='micro'/><br />
<audio id='1'/><br />
</sound><br />
<audio id='1' type='pulseaudio' serverName='/run/user/1000/pulse/native'/><br />
}}<br />
<br />
Note the matching {{ic|id}} elements. The example above assumes a single-user system with user ID 1000. Use the {{ic|id}} command to find the correct ID. You can also use the {{ic|/tmp}} directory if you have multiple users accessing PulseAudio:<br />
<br />
{{hc|$ virsh edit ''vmname''|2=<nowiki/><br />
<audio id='1' type='pulseaudio' serverName='unix:/tmp/pulse-socket'/><br />
}}<br />
<br />
If you get crackling or distorted sound, try experimenting with some latency settings. The following example uses 20000 microseconds:<br />
<br />
{{hc|$ virsh edit ''vmname''|2=<nowiki/><br />
<audio id="1" type="pulseaudio" serverName="/run/user/1000/pulse/native"><br />
<input latency="20000"/><br />
<output latency="20000"/><br />
</audio><br />
}}<br />
<br />
You can also try disabling the software mixer included in QEMU. This should, in theory, be more efficient and allow for lower latencies since mixing will then take place on your host only:<br />
<br />
{{hc|$ virsh edit ''vmname''|2=<nowiki/><br />
<audio id="1" type="pulseaudio" serverName="/run/user/1000/pulse/native"><br />
<input mixingEngine="no"/><br />
<output mixingEngine="no"/><br />
</audio><br />
}}<br />
<br />
For usb-audio, the corresponding elements read<br />
<br />
{{hc|$ virsh edit ''vmname''|2=<nowiki/><br />
<sound model='usb'><br />
<audio id='1'/><br />
</sound><br />
<audio id='1' type='pulseaudio' serverName='/run/user/1000/pulse/native'/><br />
}}<br />
<br />
However, if a 5.1 configuration is required the sound device needs to be configured via QEMU command line arguments:<br />
<br />
{{hc|$ virsh edit ''vmname''|2=<nowiki/><br />
</devices><br />
<qemu:commandline><br />
<qemu:arg value='-device'/><br />
<qemu:arg value='usb-audio,id=sound0,audiodev=audio1,multi=on'/><br />
</qemu:commandline><br />
</domain><br />
}}<br />
<br />
The {{ic|audiodev}} tag has to be set to match the audio backend's {{ic|id}} element. {{ic|1=id='1'|2==}} corresponds to {{ic|audio1}} and so on. <br />
<br />
{{Note|1=<nowiki/><br />
* You can have multiple audio backends, by simply specifying {{ic|<audio>}}/{{ic|-audiodev}} multiple times in your XML and by assigning them different ids. This can be useful for a use case of having two identical backends. With PulseAudio each backend is a separate stream and can be routed to different output devices on the host (using a pulse mixer like {{Pkg|pavucontrol}} or {{Pkg|pulsemixer}}).<br />
* USB 3 emulation is needed in Libvirt/QEMU to enable the usb-audio.<br />
* It is recommended to enable MSI interrupts with a tool such as [https://forums.guru3d.com/threads/windows-line-based-vs-message-signaled-based-interrupts-msi-tool.378044/] on the ICH9 audio device to mitigate any crackling, stuttering, speedup, or no audio at all after virtual machine restart.<br />
* If audio is crackling/stuttering/speedup etc. is still present you may want to adjust parameters such as {{ic|buffer-length}} and {{ic|timer-period}}, more information on these parameters and more can be found in the {{man|1|qemu}} manual.<br />
* Some audio chipsets such as [https://bugzilla.kernel.org/show_bug.cgi?id=195303 Realtek alc1220] may also have issues out of the box so do consider this when using any audio emulation with QEMU.<br />
* Improper pinning or heavy host usage without using [[#Isolating pinned CPUs|isolcpus]] can also influence sound bugs, especially while gaming in a virtual machine.<br />
}}<br />
<br />
=== Passing audio from virtual machine to host via JACK and PipeWire ===<br />
<br />
It is also possible to pass the virtual machine's audio to the host via JACK and PipeWire.<br />
<br />
First, make sure you have a working [[PipeWire]] setup with [[PipeWire#JACK clients|JACK support]].<br />
<br />
Next, you will need to tell libvirt to run QEMU as your user:<br />
<br />
{{hc|/etc/libvirt/qemu.conf|2=<br />
user = "example"<br />
}}<br />
<br />
As a final preparation, the XML scheme has to be extended to allow passing of environment variables. For this, modify the virtual machine domain configuration<br />
<br />
{{hc|$ virsh edit ''vmname''|2=<br />
<domain type='kvm'><br />
}}<br />
<br />
to<br />
<br />
{{hc|$ virsh edit ''vmname''|2=<br />
<domain type='kvm' xmlns:qemu='<nowiki>http://libvirt.org/schemas/domain/qemu/1.0</nowiki>'><br />
}}<br />
<br />
Then, you can add the actual audio config to your virtual machine:<br />
<br />
{{hc|$ virsh edit ''vmname''|2=<nowiki/><br />
<devices><br />
...<br />
<audio id="1" type="jack"><br />
<input clientName="vm-win10" connectPorts="your-input"/><br />
<output clientName="vm-win10" connectPorts="your-output"/><br />
</audio><br />
</devices><br />
<qemu:commandline><br />
<qemu:env name="PIPEWIRE_RUNTIME_DIR" value="/run/user/1000"/><br />
<qemu:env name="PIPEWIRE_LATENCY" value="512/48000"/><br />
</qemu:commandline><br />
</domain><br />
}}<br />
{{Note|Use a tool like {{Pkg|carla}} to figure out which input and outputs you want.}}<br />
<br />
Note the matching {{ic|id}} elements. Above's example assumes a single-user system with user ID 1000. Use the {{ic|id}} command to find the correct ID.<br />
<br />
You might have to play with the {{ic|PIPEWIRE_LATENCY}} values to get to the desired latency without crackling.<br />
<br />
=== Passing audio from virtual machine to host via Scream ===<br />
<br />
It is possible to pass the virtual machine's audio through a bridged network such as the one provided by Libvirt or by adding a IVSHMEM device to the host by using a application called [https://github.com/duncanthrax/scream Scream]. This section will only cover using PulseAudio as a receiver on the host.<br />
See the project page for more details and instructions on other methods.<br />
<br />
==== Using Scream with a bridged network ====<br />
<br />
{{Note|<br />
* This is the ''preferred'' way to use this, although results may vary per user<br />
* It is recommend to use the [[#Virtio network]] adapter while using Scream, other virtual adapters provided by QEMU such as '''e1000e''' may lead to poor performance<br />
}}<br />
<br />
To use scream via your network you will want to find your bridge name via {{ic|1=ip a}}, in most cases it will be called '''br0''' or '''virbr0'''. Below is a example of the command needed to start the Scream application:<br />
<br />
$ scream -o pulse -i virbr0 &<br />
<br />
{{Warning| This will not work with a '''macvtap bridge''' as that does not allow host to guest communication, also make sure you have the proper firewall ports open for it to communicate with the virtual machine}}<br />
<br />
==== Adding the IVSHMEM device to use Scream with IVSHMEM ====<br />
<br />
With the virtual machine turned off, edit the machine configuration<br />
<br />
{{hc|$ virsh edit ''vmname''|2=<br />
...<br />
<devices><br />
...<br />
<shmem name='scream-ivshmem'><br />
<model type='ivshmem-plain'/><br />
<size unit='M'>2</size><br />
</shmem><br />
</devices><br />
...<br />
}}<br />
<br />
In the above configuration, the size of the IVSHMEM device is 2MB (the recommended amount). Change this as needed.<br />
<br />
Now refer to [[#Adding IVSHMEM Device to virtual machines]] to configure the host to create the shared memory file on boot, replacing {{ic|looking-glass}} with {{ic|scream-ivshmem}}.<br />
<br />
===== Configuring the Windows guest for IVSHMEM =====<br />
<br />
The correct driver must be installed for the IVSHMEM device on the guest. <br />
See [[#Installing the IVSHMEM Host to Windows guest]]. Ignore the part about {{ic|looking-glass-host}}.<br />
<br />
Install the [https://github.com/duncanthrax/scream/releases Scream] virtual audio driver on the guest. <br />
If you have secure boot enabled for your virtual machine, you may need to disable it. <br />
<br />
Using the registry editor, set the DWORD {{ic|HKLM\SYSTEM\CurrentControlSet\Services\Scream\Options\UseIVSHMEM}} to the size of the IVSHMEM device in MB.<br />
Note that scream identifies its IVSHMEM device using its size, so make sure there is only one device of that size (the suggested default is {{ic|2}} for 2MB).<br />
<br />
Use the following command in an admin CMD shell to create both key and DWORD: {{ic|REG ADD HKLM\SYSTEM\CurrentControlSet\Services\Scream\Options /v UseIVSHMEM /t REG_DWORD /d 2}} ([https://github.com/duncanthrax/scream sourced from scream on Github])<br />
<br />
====== Configuring the host ======<br />
<br />
Install {{AUR|scream}}.<br />
<br />
Create a [[systemd/User|systemd user service]] to control the receiver:<br />
<br />
{{hc|~/.config/systemd/user/scream-ivshmem-pulse.service|2=<br />
[Unit]<br />
Description=Scream IVSHMEM pulse receiver<br />
After=pulseaudio.service<br />
Wants=pulseaudio.service<br />
<br />
[Service]<br />
Type=simple<br />
ExecStartPre=/usr/bin/truncate -s 0 /dev/shm/scream-ivshmem<br />
ExecStartPre=/usr/bin/dd if=/dev/zero of=/dev/shm/scream-ivshmem bs=1M count=2<br />
ExecStart=/usr/bin/scream -m /dev/shm/scream-ivshmem<br />
<br />
[Install]<br />
WantedBy=default.target<br />
}}<br />
<br />
Edit {{ic|1=count=2}} with the size of the IVSHMEM device in MiB.<br />
<br />
{{Tip|If you are using [[PipeWire]], replace {{ic|pulseaudio.service}} with {{ic|pipewire-pulse.service}} and add {{ic|1=After=wireplumber.service}}.}}<br />
<br />
Now [[start]] the {{ic|scream-ivshmem-pulse.service}} [[user unit]].<br />
<br />
To have it automatically start on next login, [[enable]] the [[user unit]].<br />
<br />
=== Physical disk/partition ===<br />
<br />
Raw and qcow2 especially can have noticeable overhead for heavy IO. A whole disk or a partition may be used directly to bypass the filesystem and improve I/O performance. If you wish to dual boot the guest OS natively you would need to pass the entire disk without any partitioning. It is suggested to use /dev/disk/by- paths to refer to the disk since /dev/sdX entries can change between boots. To find out which disk/partition is associated with the one you would like to pass:<br />
<br />
{{hc|$ ls -l /dev/disk/by-id/*|<br />
/dev/disk/by-id/ata-ST1000LM002-9VQ14L_Z0501SZ9 -> ../../sdd<br />
}}<br />
<br />
See [[#Virtio disk]] on how to add these with libvirt XML. You can also add the disk with Virt-Manager's '''Add Hardware''' menu and then type the disk you want in the '''Select or create custom storage''' box, e.g. '''/dev/disk/by-id/ata-ST1000LM002-9VQ14L_Z0501SZ9'''<br />
<br />
=== Gotchas ===<br />
<br />
==== Passing through a device that does not support resetting ====<br />
<br />
When the virtual machine shuts down, all devices used by the guest are deinitialized by its OS in preparation for shutdown. In this state, those devices are no longer functional and must then be power-cycled before they can resume normal operation. Linux can handle this power-cycling on its own, but when a device has no known reset methods, it remains in this disabled state and becomes unavailable. Since Libvirt and Qemu both expect all host PCI devices to be ready to reattach to the host before completely stopping the virtual machine, when encountering a device that will not reset, they will hang in a "Shutting down" state where they will not be able to be restarted until the host system has been rebooted. It is therefore recommended to only pass through PCI devices which the kernel is able to reset, as evidenced by the presence of a {{ic|reset}} file in the PCI device sysfs node, such as {{ic|/sys/bus/pci/devices/0000:00:1a.0/reset}}.<br />
<br />
The following bash command shows which devices can and cannot be reset.<br />
<br />
{{hc|<nowiki>for iommu_group in $(find /sys/kernel/iommu_groups/ -maxdepth 1 -mindepth 1 -type d);do echo "IOMMU group $(basename "$iommu_group")"; for device in $(\ls -1 "$iommu_group"/devices/); do if [[ -e "$iommu_group"/devices/"$device"/reset ]]; then echo -n "[RESET]"; fi; echo -n $'\t';lspci -nns "$device"; done; done</nowiki>|<br />
IOMMU group 0<br />
00:00.0 Host bridge [0600]: Intel Corporation Xeon E3-1200 v2/Ivy Bridge DRAM Controller [8086:0158] (rev 09)<br />
IOMMU group 1<br />
00:01.0 PCI bridge [0604]: Intel Corporation Xeon E3-1200 v2/3rd Gen Core processor PCI Express Root Port [8086:0151] (rev 09)<br />
01:00.0 VGA compatible controller [0300]: NVIDIA Corporation GK208 [GeForce GT 720] [10de:1288] (rev a1)<br />
01:00.1 Audio device [0403]: NVIDIA Corporation GK208 HDMI/DP Audio Controller [10de:0e0f] (rev a1)<br />
IOMMU group 2<br />
00:14.0 USB controller [0c03]: Intel Corporation 7 Series/C210 Series Chipset Family USB xHCI Host Controller [8086:1e31] (rev 04)<br />
IOMMU group 4<br />
[RESET] 00:1a.0 USB controller [0c03]: Intel Corporation 7 Series/C210 Series Chipset Family USB Enhanced Host Controller #2 [8086:1e2d] (rev 04)<br />
IOMMU group 5<br />
[RESET] 00:1b.0 Audio device [0403]: Intel Corporation 7 Series/C210 Series Chipset Family High Definition Audio Controller [8086:1e20] (rev 04)<br />
IOMMU group 10<br />
[RESET] 00:1d.0 USB controller [0c03]: Intel Corporation 7 Series/C210 Series Chipset Family USB Enhanced Host Controller #1 [8086:1e26] (rev 04)<br />
IOMMU group 13<br />
06:00.0 VGA compatible controller [0300]: NVIDIA Corporation GM204 [GeForce GTX 970] [10de:13c2] (rev a1)<br />
06:00.1 Audio device [0403]: NVIDIA Corporation GM204 High Definition Audio Controller [10de:0fbb] (rev a1)<br />
}}<br />
<br />
This signals that the xHCI USB controller in 00:14.0 cannot be reset and will therefore stop the virtual machine from shutting down properly, while the integrated sound card in 00:1b.0 and the other two controllers in 00:1a.0 and 00:1d.0 do not share this problem and can be passed without issue.<br />
<br />
== Complete setups and examples ==<br />
<br />
For many reasons users may seek to see [[PCI passthrough via OVMF/Examples|complete passthrough setup examples]].<br />
<br />
These examples offer a supplement to existing hardware compatibility lists. Additionally, if you have trouble configuring a certain mechanism in your setup, you might find these examples very valuable. Users there have described their setups in detail, and some have provided examples of their configuration files as well. <br />
<br />
We encourage those who successfully build their system from this resource to help improve it by contributing their builds. Due to the many different hardware manufacturers involved, the seemingly significant lack of sufficient documentation, as well as other issues due to the nature of this process, community contributions are necessary.<br />
<br />
== Troubleshooting ==<br />
<br />
{{Merge|PCI passthrough via OVMF/Troubleshooting|This section is long enough to be split into a dedicated subpage.}}<br />
<br />
If your issue is not mentioned below, you may want to browse [[QEMU#Troubleshooting]].<br />
<br />
=== QEMU 4.0: Unable to load graphics drivers/BSOD/Graphics stutter after driver install using Q35 ===<br />
<br />
Starting with QEMU 4.0, the Q35 machine type changes the default {{ic|kernel_irqchip}} from {{ic|off}} to {{ic|split}} which breaks some guest devices, such as nVidia graphics (the driver fails to load / black screen / code 43 / graphics stutters, usually when mouse moving). Switch to full KVM mode instead by adding {{ic|1=<ioapic driver='kvm'/>}} under libvirt's {{ic|<features>}} tag in your virtual machine configuration or by adding {{ic|1=kernel_irqchip=on}} in the {{ic|-machine}} QEMU arg.<br />
<br />
=== QEMU 5.0: host-passthrough with kernel version 5.5 to 5.8.1 when using Zen 2 processors: Windows 10 BSOD loop 'KERNEL SECURITY CHECK FAILURE' ===<br />
<br />
{{Note|As of kernel version 5.8.2, disabling STIBP is not required anymore.}}<br />
<br />
Starting with QEMU 5.0 virtual machines running on Zen 2 and newer kernels than 5.4 will cause a BSOD loop of: 'KERNEL SECURITY CHECK FAILURE'. This can be fixed by either updating to kernel version 5.8.2 or higher, or disabling STIBP:<br />
<cpu mode='host-passthrough' ...><br />
...<br />
<feature policy='disable' name='amd-stibp'/><br />
...<br />
</cpu><br />
This requires libvirt 6.5 or higher. On older versions, several workarounds exist:<br />
* Switch CPU mode from {{ic|host-passthrough}} to {{ic|host-model}}. This only works on libvirt 6.4 or lower.<br />
* Manually patch {{Pkg|qemu-desktop}} in order to revert [https://github.com/qemu/qemu/commit/143c30d4d346831a09e59e9af45afdca0331e819 this] commit.<br />
* On qemu commandline, add {{ic|1=amd-stibp=off}} to the cpu flags string. This can also be invoked through libvirt via a {{ic|<qemu:commandline>}} entry.<br />
<br />
=== "Error 43: Driver failed to load" with mobile (Optimus/max-q) nvidia GPUs ===<br />
<br />
This error occurs because the Nvidia driver wants to check the status of the power supply. If no battery is present, the driver does not work. Whether Libvirt or QEMU, by default none of them provide the possibility to simulate a battery. This might also result in a reduced screen resolution and the Nvidia Desktop Manager refusing to load when right-clicking the desktop, saying it requires Windows 10, a compatible GPU and the Nvidia graphics driver.<br />
<br />
You can however create and add a custom acpi table file to the virtual machine which will do the work.<br />
<br />
First you have to create the custom acpi table file by saving the following file as SSDT1.dat (base64 encoded here):<br />
{{bc|<nowiki><br />
echo 'U1NEVKEAAAAB9EJPQ0hTAEJYUENTU0RUAQAAAElOVEwYEBkgoA8AFVwuX1NCX1BDSTAGABBMBi5f<br />
U0JfUENJMFuCTwVCQVQwCF9ISUQMQdAMCghfVUlEABQJX1NUQQCkCh8UK19CSUYApBIjDQELcBcL<br />
cBcBC9A5C1gCCywBCjwKPA0ADQANTElPTgANABQSX0JTVACkEgoEAAALcBcL0Dk=' | base64 -d > SSDT1.dat<br />
</nowiki>}}<br />
<br />
Next you must add the processed file to the main domain of the virtual machine:<br />
{{bc|<nowiki><br />
<domain xmlns:qemu="http://libvirt.org/schemas/domain/qemu/1.0" type="kvm"><br />
...<br />
<qemu:commandline><br />
<qemu:arg value="-acpitable"/><br />
<qemu:arg value="file=/path/to/your/SSDT1.dat"/><br />
</qemu:commandline><br />
</domain><br />
</nowiki>}}<br />
<br />
Make sure your XML file has the correct namespace in the {{ic|<domain>}} tag as visible above, otherwise the XML verification will fail.<br />
<br />
[https://www.reddit.com/r/VFIO/comments/ebo2uk/nvidia_geforce_rtx_2060_mobile_success_qemu_ovmf/ Source]<br />
<br />
=== "BAR 3: cannot reserve [mem]" error in dmesg after starting virtual machine ===<br />
<br />
{{Expansion|This error is actually related to the boot_vgs issue and should be merged together with everything else concerning GPU ROMs.|section=UEFI (OVMF) Compatibility in VBIOS}}<br />
<br />
With respect to [https://www.linuxquestions.org/questions/linux-kernel-70/kernel-fails-to-assign-memory-to-pcie-device-4175487043/ this article]:<br />
<br />
If you still have code 43 check ''dmesg'' for memory reservation errors after starting up your virtual machine, if you have similar it could be the case:<br />
<br />
vfio-pci 0000:09:00.0: BAR 3: cannot reserve [mem 0xf0000000-0xf1ffffff 64bit pref]<br />
<br />
Find out a PCI Bridge your graphic card is connected to. This will give actual hierarchy of devices:<br />
<br />
$ lspci -t<br />
<br />
Before starting the virtual machine run the following lines, replacing IDs with actual values from previous output.<br />
<br />
# echo 1 > /sys/bus/pci/devices/0000\:00\:03.1/remove<br />
# echo 1 > /sys/bus/pci/rescan<br />
<br />
{{Note|Probably setting [[kernel parameter]] {{ic|1=video=efifb:off}} is required as well. [https://pve.proxmox.com/wiki/Pci_passthrough#BAR_3:_can.27t_reserve_.5Bmem.5D_error Source]}}<br />
<br />
In addition try adding kernel parameter {{ic|1=pci=realloc}} which also [https://github.com/Dunedan/mbp-2016-linux/issues/60#issuecomment-396311301 helps with hotplugging issues].<br />
<br />
=== UEFI (OVMF) compatibility in VBIOS ===<br />
<br />
{{Remove|Flashing you guest GPU for the purpose of a GPU passthrough is '''never''' good advice. A full section should be dedicated to VBIOS compatibility.|section= UEFI (OVMF) Compatibility in VBIOS}}<br />
<br />
With respect to [https://pve.proxmox.com/wiki/Pci_passthrough#How_to_known_if_card_is_UEFI_.28ovmf.29_compatible this article]:<br />
<br />
Error 43 can be caused by the GPU's VBIOS without UEFI support. To check whenever your VBIOS supports it, you will have to use {{ic|rom-parser}}:<br />
<br />
$ git clone https://github.com/awilliam/rom-parser<br />
$ cd rom-parser && make<br />
<br />
Dump the GPU VBIOS:<br />
<br />
# echo 1 > /sys/bus/pci/devices/0000:01:00.0/rom<br />
# cat /sys/bus/pci/devices/0000:01:00.0/rom > /tmp/image.rom<br />
# echo 0 > /sys/bus/pci/devices/0000:01:00.0/rom<br />
<br />
And test it for compatibility:<br />
<br />
{{hc|$ ./rom-parser /tmp/image.rom|<br />
Valid ROM signature found @600h, PCIR offset 190h<br />
PCIR: type 0 (x86 PC-AT), vendor: 10de, device: 1184, class: 030000<br />
PCIR: revision 0, vendor revision: 1<br />
Valid ROM signature found @fa00h, PCIR offset 1ch<br />
PCIR: type 3 (EFI), vendor: 10de, device: 1184, class: 030000<br />
PCIR: revision 3, vendor revision: 0<br />
EFI: Signature Valid, Subsystem: Boot, Machine: X64<br />
Last image<br />
}}<br />
<br />
To be UEFI compatible, you need a "type 3 (EFI)" in the result. If it is not there, try updating your GPU VBIOS. GPU manufacturers often share VBIOS upgrades on their support pages. A large database of known compatible and working VBIOSes (along with their UEFI compatibility status!) is available on [https://www.techpowerup.com/vgabios/ TechPowerUp].<br />
<br />
Updated VBIOS can be used in the virtual machine without flashing. To load it in QEMU:<br />
<br />
-device vfio-pci,host=07:00.0,......,romfile=/path/to/your/gpu/bios.bin \<br />
<br />
And in libvirt:<br />
<br />
{{bc|1=<br />
<hostdev><br />
...<br />
<rom file='/path/to/your/gpu/bios.bin'/><br />
...<br />
</hostdev><br />
}}<br />
<br />
One should compare VBIOS versions between host and guest systems using [https://www.techpowerup.com/download/nvidia-nvflash/ nvflash] (Linux versions under ''Show more versions'') or <br />
[https://www.techpowerup.com/download/techpowerup-gpu-z/ GPU-Z] (in Windows guest). To check the currently loaded VBIOS:<br />
<br />
{{hc|$ ./nvflash --version|<br />
...<br />
Version : 80.04.XX.00.97<br />
...<br />
UEFI Support : No<br />
UEFI Version : N/A<br />
UEFI Variant Id : N/A ( Unknown )<br />
UEFI Signer(s) : Unsigned<br />
...<br />
}}<br />
<br />
And to check a given VBIOS file:<br />
<br />
{{hc|$ ./nvflash --version NV299MH.rom|<br />
...<br />
Version : 80.04.XX.00.95<br />
...<br />
UEFI Support : Yes<br />
UEFI Version : 0x10022 (Jul 2 2013 @ 16377903 )<br />
UEFI Variant Id : 0x0000000000000004 ( GK1xx )<br />
UEFI Signer(s) : Microsoft Corporation UEFI CA 2011<br />
...<br />
}}<br />
<br />
If the external ROM did not work as it should in the guest, you will have to flash the newer VBIOS image to the GPU. In some cases it is possible to create your own VBIOS image with UEFI support using [https://www.win-raid.com/t892f16-AMD-and-Nvidia-GOP-update-No-requests-DIY.html GOPUpd] tool, however this is risky and may result in GPU brick.<br />
<br />
{{Warning|Failure during flashing may "brick" your GPU - recovery may be possible, but rarely easy and often requires additional hardware. '''DO NOT''' flash VBIOS images for other GPU models (different boards may use different VBIOSes, clocks, fan configuration). If it breaks, you get to keep all the pieces.}}<br />
<br />
In order to avoid the irreparable damage to your graphics adapter it is necessary to unload the NVIDIA kernel driver first:<br />
<br />
# modprobe -r nvidia_modeset nvidia <br />
<br />
Flashing the VBIOS can be done with:<br />
<br />
# ./nvflash romfile.bin<br />
<br />
{{Warning|'''DO NOT''' interrupt the flashing process, even if it looks like it is stuck. Flashing should take about a minute on most GPUs, but may take longer.}}<br />
<br />
=== Slowed down audio pumped through HDMI on the video card ===<br />
<br />
For some users, the virtual machine's audio slows down/starts stuttering/becomes demonic after a while when it is pumped through HDMI on the video card. This usually also slows down graphics.<br />
A possible solution consists of enabling MSI (Message Signaled-Based Interrupts) instead of the default (Line-Based Interrupts).<br />
<br />
In order to check whether MSI is supported or enabled, run the following command as root:<br />
<br />
# lspci -vs $device | grep 'MSI:'<br />
<br />
where `$device` is the card's address (e.g. `01:00.0`).<br />
<br />
The output should be similar to:<br />
<br />
Capabilities: [60] MSI: Enable'''-''' Count=1/1 Maskable- 64bit+<br />
<br />
A {{ic|-}} after {{ic|Enable}} means MSI is supported, but not used by the virtual machine, while a {{ic|+}} says that the virtual machine is using it.<br />
<br />
The procedure to enable it is quite complex, instructions and an overview of the setting can be found [https://forums.guru3d.com/showthread.php?t=378044 here].<br />
<br />
On a linux guest you can use modinfo to see if there is option to enable MSI (for example: "modinfo snd_hda_intel |grep msi"). If there is, one can enable it by adding the relevant option to a custom omdprobe file - in "/etc/modprobe.d/snd-hda-intel.conf" inserting "options snd-hda-intel enable_msi=1"<br />
<br />
Other hints can be found on the [https://lime-technology.com/wiki/index.php/UnRAID_6/VM_Guest_Support#Enable_MSI_for_Interrupts_to_Fix_HDMI_Audio_Support lime-technology's wiki], or on this article on [https://vfio.blogspot.it/2014/09/vfio-interrupts-and-how-to-coax-windows.html VFIO tips and tricks].<br />
<br />
A UI tool called [https://forums.guru3d.com/threads/windows-line-based-vs-message-signaled-based-interrupts-msi-tool.378044/ MSI Utility (FOSS Version 2)] works with Windows 10 64-bit and simplifies the process.<br />
<br />
In order to fix the issues enabling MSI on the 0 function of a nVidia card ({{ic|01:00.0 VGA compatible controller: NVIDIA Corporation GM206 [GeForce GTX 960] (rev a1) (prog-if 00 [VGA controller])}}) was not enough; it will also be required to enable it on the other function ({{ic|01:00.1 Audio device: NVIDIA Corporation Device 0fba (rev a1)}}) to fix the issue.<br />
<br />
=== No HDMI audio output on host when intel_iommu is enabled ===<br />
<br />
If after enabling {{ic|intel_iommu}} the HDMI output device of Intel GPU becomes unusable on the host then setting the option {{ic|igfx_off}} (i.e. {{ic|1=intel_iommu=on,igfx_off}}) might bring the audio back, please read [https://docs.kernel.org/x86/iommu.html#graphics-problems iommu.html] for details about setting {{ic|igfx_off}}.<br />
<br />
=== X does not start after enabling vfio_pci ===<br />
<br />
This is related to the host GPU being detected as a secondary GPU, which causes X to fail/crash when it tries to load a driver for the guest GPU. To circumvent this, a Xorg configuration file specifying the BusID for the host GPU is required. The correct BusID can be acquired from {{ic|lspci -n}} or the Xorg log [https://www.redhat.com/archives/vfio-users/2016-August/msg00025.html]. Note that the value from the ''lspci'' output is hexadecimal and should be converted to decimal in the ''.conf'' file.<br />
<br />
{{hc|/etc/X11/xorg.conf.d/10-intel.conf|<br />
Section "Device"<br />
Identifier "Intel GPU"<br />
Driver "modesetting"<br />
BusID "PCI:0:2:0"<br />
EndSection<br />
}}<br />
<br />
=== Chromium ignores integrated graphics for acceleration ===<br />
<br />
Chromium and friends will try to detect as many GPUs as they can in the system and pick which one is preferred (usually discrete NVIDIA/AMD graphics). It tries to pick a GPU by looking at PCI devices, not OpenGL renderers available in the system - the result is that Chromium may ignore the integrated GPU available for rendering and try to use the dedicated GPU bound to the {{ic|vfio-pci}} driver, and unusable on the host system, regardless of whenever a guest virtual machine is running or not. This results in software rendering being used (leading to higher CPU load, which may also result in choppy video playback, scrolling and general un-smoothness).<br />
<br />
This can be fixed by [[Chromium/Tips and tricks#Forcing specific GPU|explicitly telling Chromium which GPU you want to use]].<br />
<br />
=== Virtual machine only uses one core ===<br />
<br />
For some users, even if IOMMU is enabled and the core count is set to more than 1, the virtual machine still only uses one CPU core and thread. To solve this enable "Manually set CPU topology" in {{ic|virt-manager}} and set it to the desirable amount of CPU sockets, cores and threads. Keep in mind that "Threads" refers to the thread count per CPU, not the total count.<br />
<br />
=== Passthrough seems to work but no output is displayed ===<br />
<br />
Make sure if you are using virt-manager that UEFI firmware is selected for your virtual machine. Also, make sure you have passed the correct device to the virtual machine.<br />
<br />
=== Host lockup after virtual machine shutdown ===<br />
<br />
This issue seems to primarily affect users running a Windows 10 guest and usually after the virtual machine has been run for a prolonged period of time: the host will experience multiple CPU core lockups (see [https://bbs.archlinux.org/viewtopic.php?id=206050&p=2]). To fix this try enabling Message Signal Interrupts on the GPU passed through to the guest. A good guide for how to do this can be found in [https://forums.guru3d.com/threads/windows-line-based-vs-message-signaled-based-interrupts.378044/]. You can also download this application for windows here [https://github.com/TechtonicSoftware/MSIInturruptEnabler] that should make the process easier.<br />
<br />
=== Host lockup if guest is left running during sleep ===<br />
<br />
VFIO-enabled virtual machines tend to become unstable if left running through a sleep/wakeup cycle and have been known to cause the host machine to lockup when an attempt is then made to shut them down. In order to avoid this, one can simply prevent the host from going into sleep while the guest is running using the following libvirt hook script and systemd unit. The hook file needs executable permissions to work.<br />
<br />
{{hc|/etc/libvirt/hooks/qemu|2=<br />
#!/bin/sh<br />
<br />
OBJECT="$1"<br />
OPERATION="$2"<br />
SUBOPERATION="$3"<br />
EXTRA_ARG="$4"<br />
<br />
case "$OPERATION" in<br />
"prepare")<br />
systemctl start libvirt-nosleep@"$OBJECT"<br />
;;<br />
"release")<br />
systemctl stop libvirt-nosleep@"$OBJECT"<br />
;;<br />
esac<br />
}}<br />
<br />
{{hc|/etc/systemd/system/libvirt-nosleep@.service|2=<br />
[Unit]<br />
Description=Preventing sleep while libvirt domain "%i" is running<br />
<br />
[Service]<br />
Type=simple<br />
ExecStart=/usr/bin/systemd-inhibit --what=sleep --why="Libvirt domain \"%i\" is running" --who=%U --mode=block sleep infinity<br />
}}<br />
<br />
=== Cannot boot after upgrading ovmf ===<br />
<br />
If you cannot boot after upgrading from {{Pkg|edk2-ovmf}} version 1:r23112.018432f0ce-1 then you need to remove the old {{ic|*VARS.fd}} file in {{ic|/var/lib/libvirt/qemu/nvram/}}:<br />
<br />
# mv /var/lib/libvirt/qemu/nvram/vmname_VARS.fd /var/lib/libvirt/qemu/nvram/vmname_VARS.fd.old<br />
<br />
See {{Bug|57825}} for further details.<br />
<br />
=== Bluescreen at boot since Windows 10 1803 ===<br />
<br />
Since Windows 10 1803 there is a problem when you are using "host-passthrough" as cpu model. The machine cannot boot and is either boot looping or you get a bluescreen.<br />
You can workaround this by:<br />
<br />
# echo 1 > /sys/module/kvm/parameters/ignore_msrs<br />
<br />
To make it permanently you can create a modprobe file {{ic|kvm.conf}}:<br />
<br />
options kvm ignore_msrs=1<br />
<br />
To prevent clogging up ''dmesg'' with "ignored rdmsr" messages you can additionally add:<br />
<br />
options kvm report_ignored_msrs=0<br />
<br />
=== AMD Ryzen / BIOS updates (AGESA) yields "Error: internal error: Unknown PCI header type ‘127’" ===<br />
<br />
AMD users have been experiencing breakage of their KVM setups after updating the BIOS on their motherboard. There is a kernel [https://clbin.com/VCiYJ patch], (see [[Kernel/Arch Build System]] for instruction on compiling kernels with custom patches) that can resolve the issue as of now (7/28/19), but this is not the first time AMD has made an error of this very nature, so take this into account if you are considering updating your BIOS in the future as a VFIO user.<br />
<br />
=== AMD GPU not resetting properly yielding "Error: internal error: Unknown PCI header type ‘127’" (Separate issue from the one above) ===<br />
<br />
Passing through an AMD GPU may result into a problem known as the "AMD reset bug". Upon power cycling the guest, the GPU does not properly reset its state which causes the device to malfunction until the host is also rebooted. This is usually paired with a "code 43" driver error in a Windows guest, and the message "Error: internal error: Unknown PCI header type '127'" in the libvirt log on the host.<br />
<br />
In the past, this meant having to use work-arounds to manually reset the GPU, or resorting to the use of kernel patches that were unlikely to land in upstream. Currently, the recommended solution that does not require patching of the kernel is to install {{AUR|vendor-reset-git}} or {{AUR|vendor-reset-dkms-git}} and making sure the 'vendor-reset' kernel module is loaded before booting the guest. For convenience, you can [[Kernel module#systemd|load the module automatically]].<br />
<br />
{{Note| Make sure you do not have any of the AMD reset bug kernel patches installed if you are using {{AUR|vendor-reset-git}} or {{AUR|vendor-reset-dkms-git}}.}}<br />
<br />
=== Host crashes when hotplugging Nvidia card with USB ===<br />
<br />
If attempting to hotplug an Nvidia card with a USB port, you may have to blacklist the {{ic|i2c_nvidia_gpu}} driver. Do this by adding the line {{ic|blacklist i2c_nvidia_gpu}} to {{ic|/etc/modprobe.d/blacklist.conf}}.<br />
<br />
=== Host unable to boot and stuck in black screen after enabling vfio ===<br />
<br />
If debug kernel messages during boot are enabled by adding with the {{ic|debug ignore_loglevel}} [[kernel parameters]], you may see boot stuck with the last message similar to:<br />
<br />
vfio-pci 0000:01:00.0: vgaarb: changed VGA decodes: olddecodes=io+mem,decodes=io+mem:owns=none<br />
<br />
This can be mitigated by disconnecting the passed-through GPU from your monitor. You may reconnect the passed-through GPU to a monitor after the host has booted.<br />
<br />
If you do not want to plug the cable in each time you boot the host. You can disable the framebuffer in your boot loader to bypass this message. For [[UEFI]] systems you can add {{ic|1=video=efifb:off}} as a kernel parameter. For legacy support, use {{ic|1=video=vesafb:off}} instead or in conjunction. Note that doing this may cause issues with [[Xorg]]. <br />
<br />
If you encounter problems with [[Xorg]], the following solution may help (remember to substitute with your own values if needed).<br />
<br />
{{hc|/etc/X11/xorg.conf.d/10-amd.conf|<br />
Section "Device"<br />
Identifier "AMD GPU"<br />
Driver "amdgpu"<br />
BusID "PCI:0:2:0"<br />
EndSection}}<br />
<br />
=== AER errors when passing through PCIe USB hub ===<br />
<br />
In some cases passing through a PCIe USB hub, such as one connected to the guest GPU, might fail with AER errors similar to the following:<br />
<br />
kernel: pcieport 0000:00:01.1: AER: Uncorrected (Non-Fatal) error received: 0000:00:01.1<br />
kernel: pcieport 0000:00:01.1: AER: PCIe Bus Error: severity=Uncorrected (Non-Fatal), type=Transaction Layer, (Requester ID)<br />
kernel: pcieport 0000:00:01.1: AER: device [8086:1905] error status/mask=00100000/00000000<br />
kernel: pcieport 0000:00:01.1: AER: [20] UnsupReq (First)<br />
kernel: pcieport 0000:00:01.1: AER: TLP Header: 00000000 00000000 00000000 00000000<br />
kernel: pcieport 0000:00:01.1: AER: device recovery successful<br />
<br />
=== Reserved Memory Region Reporting (RMRR) Conflict ===<br />
<br />
If you run into an issue passing through a device because of the BIOS's usage of RMRR, like the error below.<br />
<br />
vfio-pci 0000:01:00.1: Device is ineligible for IOMMU domain attach due to platform RMRR requirement. Contact your platform vendor.<br />
<br />
You can try the patches here: https://github.com/kiler129/relax-intel-rmrr<br />
<br />
=== Too-low frequency limit for AMD GPU passed-through to virtual machine ===<br />
<br />
On some machines with AMD GPUs, binding the devices to vfio-pci may be insufficient to prevent interference from the host, since the amdgpu driver on the host may query global ATIF methods which can alter the behavior of the GPU. For example, a user with a Dell Precision 7540 laptop containing a Radon Pro WX 3200 AMD GPU reported that, with the AMD GPU bound to vfio-pci, the passed-through AMD GPU was limited to 501 MHz instead of the correct 1295 MHz limit. [[Blacklisting]] the amdgpu kernel module using the kernel command line was a workaround.<br />
<br />
See [https://lore.kernel.org/regressions/092b825a-10ff-e197-18a1-d3e3a097b0e3@leemhuis.info/T/ this kernel mailing list discussion] for further details.<br />
<br />
=== Host clocksource is HPET rather than TSC ===<br />
<br />
If the clocksource of your host machine is HPET you may see severely crippled performance in games. While this issue also occurs when running games outside of a virtual machine, unaware users will likely begin troubleshooting their virtual machine when the issue is actually with their host system.<br />
<br />
To see your current clocksource, run this command on your host machine:<br />
<br />
$ cat /sys/devices/system/clocksource/clocksource*/current_clocksource<br />
<br />
If your clocksource is HPET you can try to force it to TSC by setting the [[kernel parameters]] {{ic|1=clocksource=tsc}} and {{ic|1=tsc=reliable}}. See [https://www.reddit.com/r/linux_gaming/comments/rsvjqb/psa_if_your_clocksource_is_hpet_rather_than_tsc/ this Reddit thread] for more information.<br />
<br />
=== Code 43 while Resizable Bar is turned on in the bios ===<br />
<br />
If you own a GPU that supports Resizable BAR / SAM and have the corresponding BIOS option enabled, you might get code 43 because this feature is disabled in QEMU [https://github.com/qemu/qemu/commit/3412d8ec9810b819f8b79e8e0c6b87217c876e32]. Linux Kernel release 6.1 added option to manipulate PCIe Resizable BARs through [[Wikipedia:sysfs|sysfs]], so you can try permanently resizing it using a [[udev]] rule:<br />
<br />
{{hc|/etc/udev/rules.d/01-amd.rules|2=<br />
ACTION=="add", SUBSYSTEM=="pci", ATTR{vendor}=="0x1002", ATTR{device}=="0x73bf", ATTR{resource0_resize}="14"<br />
ACTION=="add", SUBSYSTEM=="pci", ATTR{vendor}=="0x1002", ATTR{device}=="0x73bf", ATTR{resource2_resize}="8"<br />
}}<br />
<br />
Alternatively, to temporarily resize the PCIe BAR, you can write the new size to {{ic|/sys/bus/pci/devices/''device_address''/resource''number''_resize}}, where ''device_address'' is the address of your GPU, such as {{ic|0000:03:00.0}} (note that for changing this parameter, no driver can be loaded for the device).<br />
<br />
You can confirm values using {{ic|lspci -vvvxxxx}}.<br />
<br />
=== Operating system hangs ===<br />
<br />
If your virtualized OS (particularly Windows) hangs when the GPU is attached, you can also try opening your motherboard's settings and:<br />
<br />
* disabling {{ic|Re-Size BAR Support}},<br />
* disabling {{ic|Above 4G memory / Crypto Currency mining}},<br />
* enabling {{ic|SR-IOV}},<br />
* changing {{ic|Max TOLUD}} from {{ic|dynamic}} to a specific value,<br />
* switching your {{ic|Initiate Graphic Adapter}} from {{ic|PEG}} to {{ic|IGD}}.<br />
<br />
At the very least, VEGA cards seem to be picky about those settings and won't actually work unless you change them.<br />
<br />
== See also ==<br />
<br />
* [https://www.redhat.com/archives/vfio-users/ VFIO users mailing list]<br />
* [https://www.reddit.com/r/VFIO /r/VFIO: A subreddit focused on vfio]<br />
* [https://github.com/intel/gvt-linux/wiki/GVTd_Setup_Guide GVT-d: passthrough of an entire integrated GPU]</div>
Misaka 0x34ca
https://wiki.archlinux.org/index.php?title=ArchWiki_talk:Translation_Team&diff=758688
ArchWiki talk:Translation Team
2022-12-03T06:37:49Z
<p>Misaka 0x34ca: /* Remove Fcitx5 from the Page list */ new section</p>
<hr />
<div>== Comments on “Create a new page and its translation” section ==<br />
<br />
For step 7, you should not save changes that add interlanguage links, but you should preview those changes. Because the translated article does not exist at this time, if people who want to browse (rather than create) that language version Click the interlanguage link, they will get the information of "there was no content here", this is no doubt bad, and translation takes time, and this state will last for a period of time. -- [[User:Blackteahamburger|Blackteahamburger]] ([[User talk:Blackteahamburger|talk]]) 15:58, 12 May 2020 (UTC)<br />
<br />
:Or, tag the text to be translated with a language tag, and then search and create it. -- [[User:Blackteahamburger|Blackteahamburger]] ([[User talk:Blackteahamburger|talk]]) 23:37, 12 May 2020 (UTC)<br />
<br />
::If we ask to preview and not save, we then have to remind to go back and save the interlanguage link once the translation has been initialised, I think 16 steps are already quite many, and if somebody is following them they're going to save the page say in the next hour hopefully, so the period while the new interlanguage link is broken is very short. -- [[User:Kynikos|Kynikos]] ([[User talk:Kynikos|talk]]) 16:49, 13 May 2020 (UTC)<br />
<br />
:::The problem is that it takes a long time to translate a long page, such as [[Arch is the best]], which exceeds one hour, resulting in a long chain break time. -- [[User:Blackteahamburger|Blackteahamburger]] ([[User talk:Blackteahamburger|talk]]) 08:42, 14 May 2020 (UTC)<br />
<br />
::::+1. I personally used preview myself when translating Ukrainian pages and saved only when finished, so I already followed your procedure before it has been proposed here :) -- [[User:Svito|Svito]] ([[User talk:Svito|talk]]) 13:23, 14 May 2020 (UTC)<br />
<br />
:::::If you guys feel like adding a preview step to the procedure, go ahead :) -- [[User:Kynikos|Kynikos]] ([[User talk:Kynikos|talk]]) 16:04, 14 May 2020 (UTC)<br />
<br />
::::::I have changed the steps. -- [[User:Blackteahamburger|Blackteahamburger]] ([[User talk:Blackteahamburger|talk]]) 16:42, 14 May 2020 (UTC)<br />
<br />
:Reopen. If a user wants to translate a page that the user does not have permission to edit, these steps are invalid. -- [[User:Blackteahamburger|Blackteahamburger]] ([[User talk:Blackteahamburger|talk]]) 14:46, 18 May 2020 (UTC)<br />
<br />
::And, if a language does not have interlanguage link, then these steps are also invalid. -- [[User:Blackteahamburger|Blackteahamburger]] ([[User talk:Blackteahamburger|talk]]) 10:12, 24 June 2020 (UTC)<br />
<br />
== Add mention to translating Table of Contents ==<br />
<br />
There is no mention of intructions for translating [[Table of contents]] pages. Personally, it took me a while to know it was available for translation after reading [[ArchWiki:Bots#Table of contents]]. How about adding instructions in here? -- [[User:Josephgbr|Josephgbr]] ([[User talk:Josephgbr|talk]]) 10:41, 19 June 2020 (UTC)<br />
<br />
:Agree. -- [[User:Blackteahamburger|Blackteahamburger]] ([[User talk:Blackteahamburger|talk]]) 11:25, 19 June 2020 (UTC)<br />
<br />
::In case further development of the bot involves upgrading the entry point, keeping all its ArchWiki documentation in the same page may ease keeping it in sync, I suggest just linking to [[ArchWiki:Bots#Table of contents]] as by the way we also wanted to do in [[Help talk:I18n#Checklist to add a new language]]. -- [[User:Kynikos|Kynikos]] ([[User talk:Kynikos|talk]]) 14:10, 20 June 2020 (UTC)<br />
<br />
== Regarding Translating Wiki Pages ==<br />
<br />
Hello, I want to translate Archwiki pages into Bangla. But, wiki tells to inform translation team. Bangla language has no translation team. Now, whom should I inform? There is no interlanguage link, too. And also, how do I translate pages like Installation Guide, Arch Linux etc.? Would anybody please help me with these matters? I am new in ArchWiki translating.<br />
<br />
{{unsigned|16:17, 2 September 2020|FOSS ভক্ত}}<br />
<br />
:The correct place for discussion about how to add a new language is [[Help talk:I18n#Add Bangla Language]]. – [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 17:49, 2 September 2020 (UTC)<br />
<br />
== Swedish translations ==<br />
<br />
Hi, I was told I should come here and talk about the state of Swedish ArchWiki translations.<br />
<br />
As of right now there's only 2 translated pages, one of which is [[Main page (Svenska)]], which literally just excuses itself for being empty and nothing more.<br />
The second page is [[Installation guide (Svenska)]], which I took to fully re-doing as it was severely outdated, missing pieces and was seemingly written by someone who wasn't a native speaker.<br />
<br />
After doing this page I'm quite exhausted and probably won't do much translating in the near future, at least not such a big project.<br />
<br />
Either way I thought it'd be good to share my view on this and possibly get attention from others wanting to do Swedish translations!<br />
[[User:DerpishCat|DerpishCat]] ([[User talk:DerpishCat|talk]]) 19:28, 25 March 2021 (UTC)<br />
<br />
== Lack of best practices documentations ==<br />
<br />
There are a lot of practices for translation that a lot of newbies are not aware of, such as the use of [[Template:Translateme]]. In fact, a lot of points are unclear. Information is also scattered everywhere, including [[ArchWiki:Translation Team]], [[Help:i18n]], [[Help_talk:i18n]], [[ArchWiki:Contributing]], [[Help:Editing]], and [[Help:Style]]. As we know [[General recommendations]] exists, we ''really really'' need a ''Translation recommendations''.<br />
<br />
* Things like [[Help:I18n#Localized_redirects]] is utterly useless since the reader is required to read excessive articles to know how to create a redirection page. We can point them to a "centre" (like "Read here for more info").<br />
* The fact is, [[Help:i18n]] is incomplete in my opinion. Contributors still need to read [[Help_talk:i18n]] to get more info.<br />
* It is unclear whenever (partially) machine-translations are accepted.<br />
<br />
So, I think merging those points into a (new) page might be good.<br />
— [[User:Windowsboy111|windowsboy111]] ([[User Talk:Windowsboy111|talk]]) 01:59, 2 May 2021 (UTC)<br />
<br />
: ArchWiki:Contributing, Help:Editing, and Help:Style have a broader scope than only translation. Not only translators edit and contribute to ArchWiki.<br />
<br />
: I agree, that Help:i18n does not look complete enough. It must be a complete guide for translators, the only place where they seek advice. We can merge critical topics from Help talk:i18n into Help:i18n, as well as the majority of ArchWiki:Translation Team sections, as [[ArchWiki:Translation Team#Create a new page and its translation|#Create a new page and its translation]] and the sections about template usage.<br />
<br />
: After all, I see ArchWiki:Translation Team as a reference page which contains 1) links to important for translators pages (Help:i18n etc.); 2) technical issues like [[ArchWiki:Translation Team#Page list|#Page list]].<br />
<br />
: This allows to avoid both unnesessary splitting and duplicating content. -- [[User:Duodai|Duodai]] ([[User talk:Duodai|talk]]) 09:10, 7 May 2021 (UTC)<br />
<br />
== Interlanguage links are not visible anymore in the preview ==<br />
<br />
"5. Preview the page with the new interlanguage link. / 6. Visit the interlanguage link you have just created" — After recent MediaWiki upgrades, this is no longer possible. I guess there is a bug somewhere in the ''vector-2022'' skin (the ''vector'' skin works fine). (If anyone cares, it does not work in the ''monobook'' skin either.) -- [[User:Andreymal|andreymal]] ([[User talk:Andreymal|talk]]) 10:50, 18 July 2022 (UTC)<br />
<br />
: To me they still appear during the preview with ''vector-2022''… but on the left, at the bottom of the main menu, where they were before the update of MediaWiki. --[[User:Erus Iluvatar|Erus Iluvatar]] ([[User talk:Erus Iluvatar|talk]]) 11:43, 18 July 2022 (UTC)<br />
<br />
:: It works with ''vector'', but with ''vector-2022'' it is just empty. https://i.imgur.com/rmfAQf4.png (Btw, why are there two almost identical skins?) -- [[User:Andreymal|andreymal]] ([[User talk:Andreymal|talk]]) 11:55, 18 July 2022 (UTC)<br />
<br />
::: Here's what it looks like on my side (new Vector on the left, old one on the right: https://imgur.com/a/e6ljapB) but maybe it's something to do with me using a custom CSS? The vector-2022 version is linked to MediaWiki's [[mw:Reading/Web/Desktop Improvements]] from what I understand. --[[User:Erus Iluvatar|Erus Iluvatar]] ([[User talk:Erus Iluvatar|talk]]) 12:13, 18 July 2022 (UTC)<br />
<br />
== Some translate team add their own pages. ==<br />
<br />
Some language's user add their own new page to list the maintenance list,I think we need to add a new english page to storage them.[[User:KirisameMarisa|霧雨 魔理沙 です]] ([[User talk:KirisameMarisa|talk]]) 13:19, 20 August 2022 (UTC)<br />
<br />
== Whether to keep Drcom in the Page list ==<br />
<br />
I just found out that I manually reverted [[User:Fengchao]]'s edit because in page [[ArchWiki:Translation Team (简体中文)#需要同步到英文_Wiki_的页面]] Drcom is still in the list. Maybe it would be better to keep Drcom on the list for international students in Mainland China?--[[User:Misaka 0x34ca|Misaka 0x34ca]] ([[User talk:Misaka 0x34ca|talk]]) 06:30, 3 December 2022 (UTC)<br />
<br />
== Remove Fcitx5 from the Page list ==<br />
<br />
I recently translated [[Fcitx5]] to English. Currently [[Fcitx5]] contains all the content of [[zh-hans:Fcitx5]], so I'm considering removing it from the list. (It would be better if someone reviews it for me.)--[[User:Misaka 0x34ca|Misaka 0x34ca]] ([[User talk:Misaka 0x34ca|talk]]) 06:37, 3 December 2022 (UTC)</div>
Misaka 0x34ca
https://wiki.archlinux.org/index.php?title=ArchWiki_talk:Translation_Team&diff=758687
ArchWiki talk:Translation Team
2022-12-03T06:30:38Z
<p>Misaka 0x34ca: /* Whether to keep Drcom in the Page list */ new section</p>
<hr />
<div>== Comments on “Create a new page and its translation” section ==<br />
<br />
For step 7, you should not save changes that add interlanguage links, but you should preview those changes. Because the translated article does not exist at this time, if people who want to browse (rather than create) that language version Click the interlanguage link, they will get the information of "there was no content here", this is no doubt bad, and translation takes time, and this state will last for a period of time. -- [[User:Blackteahamburger|Blackteahamburger]] ([[User talk:Blackteahamburger|talk]]) 15:58, 12 May 2020 (UTC)<br />
<br />
:Or, tag the text to be translated with a language tag, and then search and create it. -- [[User:Blackteahamburger|Blackteahamburger]] ([[User talk:Blackteahamburger|talk]]) 23:37, 12 May 2020 (UTC)<br />
<br />
::If we ask to preview and not save, we then have to remind to go back and save the interlanguage link once the translation has been initialised, I think 16 steps are already quite many, and if somebody is following them they're going to save the page say in the next hour hopefully, so the period while the new interlanguage link is broken is very short. -- [[User:Kynikos|Kynikos]] ([[User talk:Kynikos|talk]]) 16:49, 13 May 2020 (UTC)<br />
<br />
:::The problem is that it takes a long time to translate a long page, such as [[Arch is the best]], which exceeds one hour, resulting in a long chain break time. -- [[User:Blackteahamburger|Blackteahamburger]] ([[User talk:Blackteahamburger|talk]]) 08:42, 14 May 2020 (UTC)<br />
<br />
::::+1. I personally used preview myself when translating Ukrainian pages and saved only when finished, so I already followed your procedure before it has been proposed here :) -- [[User:Svito|Svito]] ([[User talk:Svito|talk]]) 13:23, 14 May 2020 (UTC)<br />
<br />
:::::If you guys feel like adding a preview step to the procedure, go ahead :) -- [[User:Kynikos|Kynikos]] ([[User talk:Kynikos|talk]]) 16:04, 14 May 2020 (UTC)<br />
<br />
::::::I have changed the steps. -- [[User:Blackteahamburger|Blackteahamburger]] ([[User talk:Blackteahamburger|talk]]) 16:42, 14 May 2020 (UTC)<br />
<br />
:Reopen. If a user wants to translate a page that the user does not have permission to edit, these steps are invalid. -- [[User:Blackteahamburger|Blackteahamburger]] ([[User talk:Blackteahamburger|talk]]) 14:46, 18 May 2020 (UTC)<br />
<br />
::And, if a language does not have interlanguage link, then these steps are also invalid. -- [[User:Blackteahamburger|Blackteahamburger]] ([[User talk:Blackteahamburger|talk]]) 10:12, 24 June 2020 (UTC)<br />
<br />
== Add mention to translating Table of Contents ==<br />
<br />
There is no mention of intructions for translating [[Table of contents]] pages. Personally, it took me a while to know it was available for translation after reading [[ArchWiki:Bots#Table of contents]]. How about adding instructions in here? -- [[User:Josephgbr|Josephgbr]] ([[User talk:Josephgbr|talk]]) 10:41, 19 June 2020 (UTC)<br />
<br />
:Agree. -- [[User:Blackteahamburger|Blackteahamburger]] ([[User talk:Blackteahamburger|talk]]) 11:25, 19 June 2020 (UTC)<br />
<br />
::In case further development of the bot involves upgrading the entry point, keeping all its ArchWiki documentation in the same page may ease keeping it in sync, I suggest just linking to [[ArchWiki:Bots#Table of contents]] as by the way we also wanted to do in [[Help talk:I18n#Checklist to add a new language]]. -- [[User:Kynikos|Kynikos]] ([[User talk:Kynikos|talk]]) 14:10, 20 June 2020 (UTC)<br />
<br />
== Regarding Translating Wiki Pages ==<br />
<br />
Hello, I want to translate Archwiki pages into Bangla. But, wiki tells to inform translation team. Bangla language has no translation team. Now, whom should I inform? There is no interlanguage link, too. And also, how do I translate pages like Installation Guide, Arch Linux etc.? Would anybody please help me with these matters? I am new in ArchWiki translating.<br />
<br />
{{unsigned|16:17, 2 September 2020|FOSS ভক্ত}}<br />
<br />
:The correct place for discussion about how to add a new language is [[Help talk:I18n#Add Bangla Language]]. – [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 17:49, 2 September 2020 (UTC)<br />
<br />
== Swedish translations ==<br />
<br />
Hi, I was told I should come here and talk about the state of Swedish ArchWiki translations.<br />
<br />
As of right now there's only 2 translated pages, one of which is [[Main page (Svenska)]], which literally just excuses itself for being empty and nothing more.<br />
The second page is [[Installation guide (Svenska)]], which I took to fully re-doing as it was severely outdated, missing pieces and was seemingly written by someone who wasn't a native speaker.<br />
<br />
After doing this page I'm quite exhausted and probably won't do much translating in the near future, at least not such a big project.<br />
<br />
Either way I thought it'd be good to share my view on this and possibly get attention from others wanting to do Swedish translations!<br />
[[User:DerpishCat|DerpishCat]] ([[User talk:DerpishCat|talk]]) 19:28, 25 March 2021 (UTC)<br />
<br />
== Lack of best practices documentations ==<br />
<br />
There are a lot of practices for translation that a lot of newbies are not aware of, such as the use of [[Template:Translateme]]. In fact, a lot of points are unclear. Information is also scattered everywhere, including [[ArchWiki:Translation Team]], [[Help:i18n]], [[Help_talk:i18n]], [[ArchWiki:Contributing]], [[Help:Editing]], and [[Help:Style]]. As we know [[General recommendations]] exists, we ''really really'' need a ''Translation recommendations''.<br />
<br />
* Things like [[Help:I18n#Localized_redirects]] is utterly useless since the reader is required to read excessive articles to know how to create a redirection page. We can point them to a "centre" (like "Read here for more info").<br />
* The fact is, [[Help:i18n]] is incomplete in my opinion. Contributors still need to read [[Help_talk:i18n]] to get more info.<br />
* It is unclear whenever (partially) machine-translations are accepted.<br />
<br />
So, I think merging those points into a (new) page might be good.<br />
— [[User:Windowsboy111|windowsboy111]] ([[User Talk:Windowsboy111|talk]]) 01:59, 2 May 2021 (UTC)<br />
<br />
: ArchWiki:Contributing, Help:Editing, and Help:Style have a broader scope than only translation. Not only translators edit and contribute to ArchWiki.<br />
<br />
: I agree, that Help:i18n does not look complete enough. It must be a complete guide for translators, the only place where they seek advice. We can merge critical topics from Help talk:i18n into Help:i18n, as well as the majority of ArchWiki:Translation Team sections, as [[ArchWiki:Translation Team#Create a new page and its translation|#Create a new page and its translation]] and the sections about template usage.<br />
<br />
: After all, I see ArchWiki:Translation Team as a reference page which contains 1) links to important for translators pages (Help:i18n etc.); 2) technical issues like [[ArchWiki:Translation Team#Page list|#Page list]].<br />
<br />
: This allows to avoid both unnesessary splitting and duplicating content. -- [[User:Duodai|Duodai]] ([[User talk:Duodai|talk]]) 09:10, 7 May 2021 (UTC)<br />
<br />
== Interlanguage links are not visible anymore in the preview ==<br />
<br />
"5. Preview the page with the new interlanguage link. / 6. Visit the interlanguage link you have just created" — After recent MediaWiki upgrades, this is no longer possible. I guess there is a bug somewhere in the ''vector-2022'' skin (the ''vector'' skin works fine). (If anyone cares, it does not work in the ''monobook'' skin either.) -- [[User:Andreymal|andreymal]] ([[User talk:Andreymal|talk]]) 10:50, 18 July 2022 (UTC)<br />
<br />
: To me they still appear during the preview with ''vector-2022''… but on the left, at the bottom of the main menu, where they were before the update of MediaWiki. --[[User:Erus Iluvatar|Erus Iluvatar]] ([[User talk:Erus Iluvatar|talk]]) 11:43, 18 July 2022 (UTC)<br />
<br />
:: It works with ''vector'', but with ''vector-2022'' it is just empty. https://i.imgur.com/rmfAQf4.png (Btw, why are there two almost identical skins?) -- [[User:Andreymal|andreymal]] ([[User talk:Andreymal|talk]]) 11:55, 18 July 2022 (UTC)<br />
<br />
::: Here's what it looks like on my side (new Vector on the left, old one on the right: https://imgur.com/a/e6ljapB) but maybe it's something to do with me using a custom CSS? The vector-2022 version is linked to MediaWiki's [[mw:Reading/Web/Desktop Improvements]] from what I understand. --[[User:Erus Iluvatar|Erus Iluvatar]] ([[User talk:Erus Iluvatar|talk]]) 12:13, 18 July 2022 (UTC)<br />
<br />
== Some translate team add their own pages. ==<br />
<br />
Some language's user add their own new page to list the maintenance list,I think we need to add a new english page to storage them.[[User:KirisameMarisa|霧雨 魔理沙 です]] ([[User talk:KirisameMarisa|talk]]) 13:19, 20 August 2022 (UTC)<br />
<br />
== Whether to keep Drcom in the Page list ==<br />
<br />
I just found out that I manually reverted [[User:Fengchao]]'s edit because in page [[ArchWiki:Translation Team (简体中文)#需要同步到英文_Wiki_的页面]] Drcom is still in the list. Maybe it would be better to keep Drcom on the list for international students in Mainland China?--[[User:Misaka 0x34ca|Misaka 0x34ca]] ([[User talk:Misaka 0x34ca|talk]]) 06:30, 3 December 2022 (UTC)</div>
Misaka 0x34ca
https://wiki.archlinux.org/index.php?title=Fcitx5&diff=758686
Fcitx5
2022-12-03T06:14:31Z
<p>Misaka 0x34ca: /* RIME/Zhongzhou rhyme */ fix template name</p>
<hr />
<div>[[Category:Input methods]]<br />
[[ja:Fcitx5]]<br />
[[zh-hans:Fcitx5]]<br />
{{Related articles start}}<br />
{{Related|Fcitx}}<br />
{{Related|IBus}}<br />
{{Related articles end}}<br />
<br />
[https://fcitx-im.org/wiki/Fcitx_5 Fcitx5] is an [[input method]] framework with a lightweight core, offering additional language support via addons. It is the successor to [[Fcitx]].<br />
<br />
== Installation ==<br />
<br />
[[Install]] the {{Pkg|fcitx5}} package.<br />
<br />
{{Grp|fcitx5-im}} group provides {{Pkg|fcitx5}} ontology, [[#Configuration tool]], and necessary [[#Input method module]].<br />
<br />
{{Note|{{Pkg|fcitx5}} has only a basic framework, it just gives English support. If you want to input other languages, such as Chinese or Japanese, you need an Input Method Engine (IME).}}<br />
<br />
=== Chinese ===<br />
<br />
* {{Pkg|fcitx5-chewing}} is a popular Bopomofo (Zhuyin) input engine for Traditional Chinese based on {{Pkg|libchewing}}.<br />
* {{Pkg|fcitx5-chinese-addons}} contains addons related to Chinese, such pinyin, shuangpin, wubi.<br />
* {{Pkg|fcitx5-rime}}, using the [[Rime]] engine.<br />
* {{AUR|fcitx5-mcbopomofo-git}} [https://github.com/openvanilla/fcitx5-mcbopomofo McBopomofo] for fcitx5.<br />
<br />
=== Japanese ===<br />
<br />
* {{Pkg|fcitx5-anthy}}, a popular Japanese input engine. However, it is not actively developed anymore.<br />
* {{Pkg|fcitx5-kkc}}, a Japanese Kana Kanji input engine, based on {{Pkg|libkkc}}.<br />
* {{Pkg|fcitx5-mozc}}, based on [[Mozc]], the Open Source Edition of Google Japanese Input.<br />
* {{Pkg|fcitx5-skk}}, a Japanese Kana Kanji input engine, based on {{Pkg|libskk}}.<br />
<br />
=== Other languages ===<br />
<br />
* {{Pkg|fcitx5-hangul}}, for typing Korean hangul, based on {{Pkg|libhangul}}.<br />
* {{Pkg|fcitx5-unikey}} or {{Pkg|fcitx5-bamboo}}, for typing Vietnamese characters.<br />
* {{Pkg|fcitx5-m17n}} or {{Pkg|fcitx5-table-other}}, for typing other miscellaneous languages — use the latter for typing IPA (X-SAMPA).<br />
<br />
=== Input method module ===<br />
<br />
To get a better experience, you should install the following modules as per your needs. Without them, the input method may still work on most applications but you might experience input method hang up, preview window screen location error, or no preview error.<br />
<br />
* For [[Qt]] programs, install {{Pkg|fcitx5-qt}}.<br />
* For [[GTK]] programs, install {{Pkg|fcitx5-gtk}}.<br />
* For Qt4 programs, install {{AUR|fcitx5-qt4-git}}.<br />
* For Qt5 programs, install {{AUR|fcitx5-qt5-git}}.<br />
* For Qt6 programs, install {{AUR|fcitx5-qt6-git}}.<br />
* For date and time support, install {{Pkg|fcitx5-lua}}.<br />
<br />
{{Tip|Generally, installing {{Pkg|fcitx5-qt}} and {{Pkg|fcitx5-gtk}} is enough to handle all situations.}}<br />
<br />
== Usage ==<br />
<br />
=== Integration ===<br />
<br />
Set the following [[environment variables]][https://fcitx-im.org/wiki/Setup_Fcitx_5#Environment_variables]:<br />
<br />
GTK_IM_MODULE=fcitx<br />
QT_IM_MODULE=fcitx<br />
XMODIFIERS=@im=fcitx<br />
<br />
{{Note|<br />
*[[Append]] {{ic|1=SDL_IM_MODULE=fcitx}} for some games that use a vendor-modified version of SDL2 library.<br />
*[[Append]] {{ic|1=GLFW_IM_MODULE=ibus}} for [[kitty]].[https://fcitx-im.org/wiki/Setup_Fcitx_5#Other_less_common_setup]<br />
}}<br />
<br />
If your locale is {{ic|en_US.UTF-8}}, and your GTK2 application cannot activate fcitx5, you can set the input method to xim specifically for it, for example:<br />
<br />
$ env GTK_IM_MODULE=xim ''<your_gtk2_application>''<br />
<br />
Do not set {{ic|GTK_IM_MODULE}} to xim globally as it affects GTK3 programs as well. XIM has various problems (such as the input method cannot input after restarting), so try not to use it.<br />
<br />
=== Desktop Environment Autostart ===<br />
<br />
{{Note|<br />
* If you are using any XDG compatible desktop environment such as [[KDE]], [[GNOME]], [[Xfce]], [[LXDE]], after you re-login, the autostart should work out of the box.<br />
* If you are using [[i3]], [[awesome]] or other window managers, you need to add Fcitx5 to its script to achieve autostart. For example, if you use i3 or sway, you can add {{ic|exec --no-startup-id fcitx5 -d}} to the configuration file.<br />
* If you are using [[dwm]], you need to add the [https://dwm.suckless.org/patches/autostart autostart] patch. Add {{ic|fcitx5 -d}} in {{ic|~/.dwm/autostart.sh}}<br />
}}<br />
If you want Fcitx5 to [[autostart]] when you start your desktop, execute the following command:<br />
<br />
$ cp /usr/share/applications/org.fcitx.Fcitx5.desktop ~/.config/autostart/<br />
<br />
{{Tip|To see if Fcitx5 is working correctly, open an application and press {{ic|Ctrl+Space}} to switch between input methods (when configured), and input some words.}}<br />
<br />
=== Words Library ===<br />
<br />
==== Chinese ====<br />
<br />
For the Chinese input method of Fcitx5, several words libraries are currently provided in the repository:<br />
<br />
* {{Pkg|fcitx5-pinyin-zhwiki}}: A words library created by felixonmars based on Chinese Wikipedia. Applicable to '''Pinyin input method'''.<br />
* {{AUR|fcitx5-pinyin-zhwiki-rime}}: A words library for [[Rime]] input method<br />
* {{AUR|fcitx5-pinyin-moegirl-rime}}: A words library for [[Rime]] input method<br />
* [https://github.com/cathaysia/fcitx5_dicts/releases/tag/0.0.1 cedict]: A words library converted from [https://www.mdbg.net/chinese/dictionary?page=cc-cedict cedict dictionary].<br />
* [https://github.com/outloudvi/fcitx5-pinyin-moegirl moegirl]: A words library created by outloudvi based on Moegirlpedia<br />
<br />
{{Note|Manually downloaded words library files can be directly placed in the path of {{ic|~/.local/share/fcitx5/pinyin/dictionaries}}. The suffix of the words library file should be .dict}}<br />
<br />
=== Custom Words Library ===<br />
<br />
==== Chinese ====<br />
<br />
Generally speaking, since {{Pkg|fcitx5}} supports [[#import Sogou words library|import Sogou words library]], there is no need to customize words library to a large extent, but {{Pkg|fcitx5}} still provides related tools.<br />
<br />
* Install {{Pkg|libime}}<br />
<br />
The original words library file is a text file, its format is: {{ic|Character Pinyin Frequency}}<br />
<br />
After getting the original dictionary file, execute {{ic|libime_pinyindict ''words-library.txt'' ''words-library.dict'' }}.<br />
<br />
The custom dictionary file can be placed in {{ic|~/.local/share/fcitx5/pinyin/dictionaries}}<br />
<br />
{{Note|The following projects may help:<br />
* [https://pypi.org/project/pypinyin/ Chinese characters to Pinyin]<br />
* [https://pypi.org/project/OpenCC/ Simplified and Traditional Chinese Conversion]<br />
}}<br />
<br />
== Configuration ==<br />
<br />
=== Configuration tool ===<br />
<br />
The configuration file of {{Pkg|fcitx5}} is located at {{ic|~/.config/fcitx5}}. Although you can use a text editor to edit the configuration file, you might find a GUI configuration tool much more convenient, so install the {{Pkg|fcitx5-configtool}} package.<br />
<br />
=== Disable overriding XKB settings ===<br />
<br />
By default Fcitx5 overrides X keyboard settings. (The ones you can set with {{ic|setxkbmap}} command or graphical tools provided by [[desktop environment]]s.) If you do not want that, run {{ic|fcitx5-configtool}} and uncheck ''Addons → XCB → Allow Overriding System XKB Settings''.<br />
<br />
=== Themes and appearance ===<br />
<br />
==== Themes ====<br />
<br />
{{Style|Use [[Template:App]].}}<br />
<br />
The number of default themes is limited, you can find more themes on [https://github.com/search?q=fcitx5+theme&type=Repositories GitHub].<br />
* {{AUR|fcitx5-breeze}}: Fcitx5 theme to match the KDE Breeze style.<br />
* {{Pkg|fcitx5-nord}}: [https://github.com/tonyfettes/fcitx5-nord Nord Color Themes].<br />
* {{Pkg|fcitx5-material-color}}: This theme gives a feeling like Microsoft PinYin. Its official repository is located at [https://github.com/hosxy/Fcitx5-Material-Color GitHub: Fcitx5-Material-Color]. Its README.md file shows some beautiful configurations of one-line mode.<br />
* {{AUR|fcitx5-solarized}}: [https://github.com/mingyech/fcitx5-solarized Solarized] color theme for Fcitx5.<br />
* {{AUR|fcitx5-skin-fluentdark-git}}: Fluent-Design dark theme with blur effects and shadows.<br />
<br />
{{Tip|If you are using KCM, then switch themes with: ''Setting -> Location -> input method -> Configure addons -> Classic user interface -> Theme''.}}<br />
<br />
{{Note|Theming does not work for Fcitx5 if you are using {{AUR|gnome-shell-extension-kimpanel-git}} with GNOME environment. [https://yanqiyu.info/2020/11/06/fcitx5-fedora-updated/#60d50c0a87a8c64ae965e403]}}<br />
<br />
==== Enable single-line mode ====<br />
<br />
In the settings of the Pinyin input method (or Rime input method), enable ''Show preedit within application'' to enable single-line mode.<br />
<br />
== Troubleshooting ==<br />
<br />
=== Diagnose problems ===<br />
<br />
If you have problems using fcitx5, eg. if {{ic|Ctrl+Space}} fails to work in all applications, then the first thing you should try is to diagnose using {{ic|fcitx5-diagnose}}. The output of {{ic|fcitx5-diagnose}} should contain clues for the most common problems.<br />
<br />
=== Cannot use fcitx5 single-line mode in some applications ===<br />
<br />
1. If the single-line mode does not work in gtk applications such as [[Firefox]], please install {{Pkg|fcitx5-gtk}}<br />
<br />
2. The single-line mode does not work in [[WPS Office]] and Sublime Text, this is a problem of [[WPS Office]] and Sublime Text itself, not a problem of {{Pkg|fcitx5}}. [https://github.com/fcitx/fcitx5/issues/60]<br />
<br />
=== Cannot use fcitx5 in WPS ===<br />
<br />
See [[WPS Office#Fcitx5 cannot input Chinese]].<br />
<br />
=== Fcitx5 has position errors in JetBrains IDEs ===<br />
<br />
The cause of this issue is that the JBR shipped with the IDE is not correct, to fix this issue you need to:<br />
<br />
1. Download [https://github.com/RikudouPatrickstar/JetBrainsRuntime-for-Linux-x64/releases this jbr] and extract it.<br />
<br />
2. Follow [https://intellij-support.jetbrains.com/hc/en-us/articles/206544879-Selecting-the-JDK-version-the-IDE-will-run-under this guide] to change IDE's JBR.<br />
<br />
=== Emoji show abnormally in the candidate box ===<br />
<br />
* Confirm you have a font with emoji support installed (such as {{Pkg|noto-fonts-emoji}})<br />
<br />
* Set the system font as {{ic|Noto Sans CJK SC}} for Simplified Chinese, for example.<br />
<br />
* Restart Fcitx5 by the following command:<br />
<br />
$ kill `ps -A | grep fcitx5 | awk '{print $1}'` && fcitx5&<br />
<br />
=== Cannot use fcitx5 in Netease Cloud Music ===<br />
<br />
{{Remove|The fix has landed in {{AUR|netease-cloud-music}} according to https://lists.archlinux.org/archives/list/aur-requests@lists.archlinux.org/message/O42RWOBVDES2JEXXVWPYKJBWHAC3VPHO/.}}<br />
<br />
There are two methods to solve this problem:<br />
<br />
* Install {{AUR|netease-cloud-music-imfix}}{{Broken package link|package not found}}<br />
* Install [[flatpak]] version of [https://flathub.org/apps/details/com.netease.CloudMusic Netease Cloud Music]<br />
<br />
=== Cannot use fcitx5 in RStudio ===<br />
<br />
Run the following command:<br />
<br />
$ strings /usr/lib/rstudio/lib/libQt5Core.so.5 | grep "Qt 5"<br />
<br />
Find out the version of the Qt library, use this version to recompile {{ic|libfcitx5platforminputcontextplugin.so}} in {{Pkg|fcitx5-qt}}, and put it into {{ic|/usr/lib/rstudio/plugins/platforminputcontexts/}} directory.<br />
<br />
If you are using {{AUR|rstudio-desktop-bin}}, you can install {{AUR|rstudio-fcitx5}} directly.<br />
<br />
=== Cannot use fcitx5 in Steam and Dota2 ===<br />
<br />
In fact, Fcitx5 can be used in Steam big screen mode and Dota2. But need to use {{ic|Ctrl+Space}} to activate IME instead of {{ic|Ctrl+Shift}} [https://github.com/fcitx/fcitx5/issues/442]<br />
<br />
=== Candidate popup misaligned in HiDPI mode of Gtk environments ===<br />
<br />
If the position of your candidate popup is not anchored at your cursor position, [[install]] {{Pkg|fcitx5-gtk}}.<br />
<br />
=== fcitx5 unavailable for kitty ===<br />
<br />
See [[Kitty#Enable IME support]].<br />
<br />
== Tips and tricks ==<br />
<br />
=== Customizing Traditional and Simplified Chinese conversion ===<br />
<br />
Some IMEs assume Simplified Chinese by default, resulting in incorrect characters being displayed when using Traditional input, e.g. 爲什麼 instead of 為什麼. To fix this, the usage of the {{ic|Simplified and Traditional Chinese Translation}} can be customized. <br />
<br />
To configure conversion, set {{ic|OpenCC profile for Simplified to Traditional}} to one of the following values:<br />
* s2t - Simplified to Traditional (OpenCC) (this is the default and probably not what you are looking for)<br />
* s2tw - Simplified to Traditional (Taiwan)<br />
* s2twp - Simplified to Traditional (Taiwan) with Taiwanese idiom<br />
* s2hk - Simplified to Traditional (Hong Kong)<br />
<br />
To configure the reverse, set {{ic|OpenCC profile for Traditional to Simplified}} to one of the following values:<br />
* t2s - Traditional (OpenCC) to Simplified (OpenCC) (this is the default and probably not what you are looking for)<br />
* tw2s - Traditional (Taiwan) to Simplified (OpenCC)<br />
* tw2sp - Traditional (Taiwan) to Simplified (OpenCC) with Mainland Chinese idiom<br />
* t2hk - Traditional (OpenCC) to Hong Kong variant<br />
* t2tw - Traditional (OpenCC) to Taiwan Standard<br />
* tw2t - Traditional (Taiwan) to Traditional (OpenCC)<br />
* hk2s - Traditional (Hong Kong) to Simplified (OpenCC)<br />
* hk2t - Traditional (Hong Kong) to Traditional Chinese (OpenCC)<br />
* t2jp - Traditional (Kyūjitai) to New Japanese Kanji (Shinjitai)<br />
* jp2t - New Japanese Kanji (Shinjitai) to Traditional (Kyūjitai)<br />
<br />
Up to date list here: [https://github.com/BYVoid/OpenCC OpenCC]<br />
<br />
=== How to view the Unicode encoding of selected characters ===<br />
<br />
* If you want to view the Unicode encoding of the selected text in a text editor, then directly select the text, and then use the shortcut keys {{ic|Ctrl+Alt+Shift+u}} to view the encoding of the selected text.<br />
<br />
* If you want to view the Unicode encoding of some text in a non-editable area (such as this wiki), you need to first copy the text to the clipboard, then click on any editable area (such as the search box), and then use the shortcut keys {{ic|Ctrl+Alt+Shift+u}} to view the encoding of the text in the clipboard.<br />
<br />
=== Input special characters ===<br />
<br />
In general, for some simple symbols, such as {{ic|≤}}, {{ic|ā}}, {{ic|á}}, {{ic|©}}, etc., you can enter them through [[Xorg/Keyboard configuration#Configuring compose key|Configuring compose key]], but for more special symbols, such as {{ic|②}}, {{ic|③}}, {{ic|④}}, etc., you Either customize {{ic|~/.XCompose}}, or use Fcitx5's Unicode function to achieve.<br />
<br />
Take {{ic|①}} as an example:<br />
<br />
Position the cursor in any input box, and then press {{ic|Ctrl+Alt+Shift+u}}, and then enter {{ic|circle one}}, you will see a variety of {{ic|①}}, other special characters are similar here.<br />
<br />
=== Switching Halfwidth / Fullwidth Punctuation ===<br />
<br />
For {{Pkg|fcitx5-chinese-addons}}, fullwidth punctuation is used by default, one may use {{ic|Ctrl+.}} to switch between halfwidth and fullwidth punctuation.<br />
<br />
=== Automatically switch input methods in vim ===<br />
<br />
Additional code: [https://www.zhihu.com/question/341748857/answer/1739052604][https://sur.moe/post/vim%E8%BE%93%E5%85%A5%E6%B3%95%E5%88%87%E6%8D%A2%E4%B8%8D%E4%BD%BF%E7%94%A8%E6%8F%92%E4%BB%B6/]<br />
<br />
{{hc|~/.vimrc|<nowiki><br />
let fcitx5state=system("fcitx5-remote")<br />
autocmd InsertLeave * :silent let fcitx5state=system("fcitx5-remote")[0] | silent !fcitx5-remote -c " Disable the input method when exiting insert mode and save the state<br />
autocmd InsertEnter * :silent if fcitx5state == 2 | call system("fcitx5-remote -o") | endif " 2 means that the input method was opened in the previous state, and the input method is started when entering the insert mode<br />
</nowiki><br />
}}<br />
<br />
If you are using {{Pkg|neovim}}, then append the above code to {{ic|~/.config/nvim/init.vim}}<br />
<br />
{{Note|If you add this code in vim.cmd, you may need to uncomment it.}}<br />
<br />
=== Pinyin input method ===<br />
<br />
{{Note|The following functions are only valid for the Pinyin input method in {{Pkg|fcitx5-chinese-addons}}, please explore other input methods by yourself. }}<br />
<br />
==== Import Sogou words library ====<br />
<br />
* For [[KDE]] users, you can import Sogou words library through {{ic|Settings -> Regional Settings -> Input Method -> Pinyin -> Dictionary -> Import}}<br />
<br />
* For users who use {{Pkg|fcitx5-configtool}}, you need to manually open the software "Fcitx5 Configuration" and manually configure it in the Pinyin input method.<br />
<br />
You can import local words library or browse and import online words library<br />
<br />
==== Cloud Pinyin ====<br />
<br />
On the settings page of the Pinyin input method, you can enable Cloud Pinyin. But if you need to change the default backend of Cloud Pinyin, you need to change it in the global settings of {{Pkg|fcitx5}}. Provided backends are {{ic|Google}}, {{ic|Baidu}}, {{ic|GoogleCN}}<br />
<br />
==== Stroke Filter ====<br />
<br />
Set the shortcut key after the "stroke filter" of the pinyin input method you set (the default is {{ic|`}})<br />
Then after entering the text, press the shortcut key, the words '''stroke filter''' will appear in the candidate box of the input method, and the words can be filtered by strokes. The specific rules are: h horizontal stroke, s vertical stroke, p left-falling stroke, n right-falling stroke, z turning stroke<br />
<br />
By default, the stroke filter is to filter the first character of a sentence, but you can switch between different characters in a sentence by using '''determining characters by word'''.<br />
<br />
For example, to perform stroke filtering on the third character in the word 中华人民共和国, you can press {{ic|]}} twice in a row after enabling stroke filtering to let {{Pkg|fcitx5}} perform stroke filtering on it.<br />
<br />
{{Note|By default, the shortcut keys of '''Determining characters with words''' are {{ic|[}} and {{ic|]}}, and the shortcut keys can be viewed in the settings of '''Pinyin input method'''.}}<br />
<br />
=== RIME/Zhongzhou rhyme ===<br />
<br />
{{Tip|All changes need to be redeployed to take effect}}<br />
<br />
==== Import words library ====<br />
<br />
Take importing words library {{AUR|fcitx5-pinyin-zhwiki-rime}} and {{AUR|fcitx5-pinyin-moegirl-rime}} as an example.<br />
<br />
{{Tip|It is also possible to put the custom words library into {{ic|~/.local/share/fcitx5/rime/}}, and the file name (filename.dict.yaml) should be the same as the words library name ([https://github.com/rime/home/wiki/RimeWithSchemata#%E7%A2%BC%E8%A1%A8%E8%88%87%E8%A9%9E%E5%85%B8 words library format]) }}<br />
<br />
1. Change the {{ic|~/.local/share/fcitx5/rime/luna_pinyin.custom.yaml}} file (take {{ic|luna_pinyin}} as an example, and modify the name of the other input schemes)<br />
<br />
{{hc|~/.local/share/fcitx5/rime/luna_pinyin.custom.yaml|<br />
# There should only be one "patch:" in the file, if it already exists, just paste the following code<br />
# This file is used to modify a specific input scheme, change the above luna_pinyin to other input scheme names to complete the modification of other input schemes<br />
patch:<br />
"translator/dictionary": extended #The dictionary name can be customized, just keep the same as the file name below<br />
}}<br />
<br />
2. Create a new {{ic|~/.local/share/fcitx5/rime/extended.dict.yaml}} file<br />
<br />
{{Tip|Import custom words library just add the words library name after "import_tables:"}}<br />
<br />
{{hc|~/.local/share/fcitx5/rime/extended.dict.yaml|<br />
# The following disables the default words library and does not enable the default "Baguwen" words library and word frequency system, if you do not want traditional characters and box characters to appear in candidate words<br />
---<br />
name: extended<br />
version: "2021.02.19"<br />
sort: by_weight<br />
use_preset_vocabulary: false #Whether to enable the default "Baguwen" words library and word frequency system, if you want to enable it, please set it to true.<br />
import_tables:<br />
# - luna_pinyin #Default words library, please uncomment if you want to enable it<br />
- zhwiki<br />
- moegirl<br />
# - custom words library name<br />
...<br />
}}<br />
<br />
==== Fuzzy sound settings ====<br />
<br />
Please comment (#) or delete unnecessary fuzzy sounds as needed. If you need to add other fuzzy sounds, please refer to [https://gist.github.com/2320943 Mingyue Pinyin fuzzy sound custom template]<br />
<br />
If the {{ic|luna_pinyin.custom.yaml}} file does not exist<br />
<br />
{{hc|~/.local/share/fcitx5/rime/luna_pinyin.custom.yaml|<br />
patch:<br />
"speller/algebra":<br />
- derive/^([zcs])h/$1/ #zh,ch,sh->z,c,s<br />
- derive/^([zcs])([^h])/$1h$2/ #z,c,s->zh,ch,sh<br />
- derive/^n/l #n->l<br />
- derive/^l/n #l->n<br />
- derive/([ei])n$/$1ng/ # en -> eng, in -> ing<br />
- derive/([ei])ng$/$1n/ # eng->en, ing -> in<br />
- abbrev/^([a-z]).+$/$1/ #Jianpin support<br />
- abbrev/^([zcs]h).+$/$1/ #fuzzy sounds support for Jianpin<br />
delimiter: " '" #delimiter<br />
}}<br />
<br />
If the file exists, paste the part below {{ic|patch:}} to the end of the file (there is only one {{ic|patch:}} in {{ic|luna_pinyin.custom.yaml}})<br />
<br />
==== Special Symbols ====<br />
<br />
{{Note|Fcitx5 has built-in support for special symbols. See [[#Input special characters]]}}<br />
<br />
Import the {{ic|symbols.dict.yaml}} words library in the [https://github.com/yangshann/rime-dict rime-dict] project to input Greek letters, some mathematical symbols and Emoji expressions in Pinyin<br />
<br />
Example:<br />
<br />
* Greek letters: input {{ic|alpha}} to output {{ic|α}}<br />
<br />
* Mathematical symbols: input {{ic|jifen}} to output {{ic|∫}}<br />
<br />
* Special symbols: Input {{ic|cha}} to output {{ic|✕,✖}}<br />
<br />
* Serial number: input {{ic|qi}} to output {{ic|Ⅶ,⑦}}<br />
<br />
* Emoji expression: Input {{ic|haha}} to output {{ic|😃,😆}}<br />
<br />
==== Load librime-lua plugin ====<br />
<br />
If you want to load the librime-lua plugin, you must add the {{ic|lua}} module in the Rime input method settings of the fcitx configuration tool.</div>
Misaka 0x34ca
https://wiki.archlinux.org/index.php?title=ArchWiki:Translation_Team&diff=758684
ArchWiki:Translation Team
2022-12-03T04:19:33Z
<p>Misaka 0x34ca: /* Page list */ Add Drcom from ArchWiki:Translation Team (简体中文)#需要同步到英文_Wiki_的页面</p>
<hr />
<div>[[Category:ArchWiki]]<br />
[[Category:Teams]]<br />
[[ar:ArchWiki:Translation Team]]<br />
[[cs:ArchWiki:Translation Team]]<br />
[[el:ArchWiki:Translation Team]]<br />
[[es:ArchWiki:Translation Team]]<br />
[[fi:ArchWiki:Translation Team]]<br />
[[fr:ArchWiki:Translation Team]]<br />
[[hr:ArchWiki:Translation Team]]<br />
[[it:ArchWiki:Translation Team]]<br />
[[ja:ArchWiki:翻訳チーム]]<br />
[[ko:ArchWiki:Translation Team]]<br />
[[nl:ArchWiki:Translation Team]]<br />
[[pl:ArchWiki:Translation Team]]<br />
[[pt:ArchWiki:Translation Team]]<br />
[[ru:ArchWiki:Translation Team]]<br />
[[sk:ArchWiki:Translation Team]]<br />
[[tr:ArchWiki:Translation Team]]<br />
[[uk:ArchWiki:Translation Team]]<br />
[[zh-hant:ArchWiki:Translation Team]]<br />
{{Style|Instructions lack clarity}}<br />
{{Related articles start}}<br />
{{Related|Help:i18n}}<br />
{{Related|International communities}}<br />
{{Related articles end}}<br />
<br />
{{Note|[[:Category:Disambiguation pages|Disambiguation pages]] should not be translated.}}<br />
<br />
== Create a new page and its translation ==<br />
<br />
{{Tip|[https://www.deepl.com/en/translator DeepL] can be used for machine-''assisted'' translations, which save a great amount of time, if it supports the target language. '''Make sure to proofread everything if you use it.'''}}<br />
<br />
# Choose a page to translate. You can use the [[Special:Random|random page function]] to find untranslated pages. Let us take this very page as an example: [[ArchWiki Translation Team]].<br />
# At the top of the page, click the '''{{int:edit}}''' tab in the horizontal menu.<br />
# Add an [[Help:i18n#Interlanguage links|interlanguage link]] for the language you are going to create, but do not save the page yet.<br />
# Copy the entire page's source code.<br />
# Preview the page with the new interlanguage link.<br />
# Visit the interlanguage link you have just created which will lead you to [[ArchWiki Translation Team (Language)]] (open new tab, do not close preview page), where "Language" is the [[Help:i18n#Languages|language name]] associated with the translation you are about to create.<br />
# Since the new page does not exist, create it by clicking on '''{{int:create}}''' in the horizontal menu.<br />
## If the page already exists because it was redirected to the English version due to being a bad translation, check the revision history to find out what it lacked and replace the redirect with your translation. Depending on how insufficient the old translation was, you might be able to salvage parts of it to save some time.<br />
# You will be shown a simple text editor. Paste here the source code of the page you copied earlier.<br />
# Localize the Category links. For example, change {{ic|<nowiki>[[Category:ArchWiki]]</nowiki>}} to {{ic|<nowiki>[[Category:ArchWiki (Language)]]</nowiki>}}. See [[Help:Category]] for more information.<br />
# Change the interlanguage link that you created earlier to point to the article ''from'' which you are translating.<br />
# Translate the copied page text and save everything, also adding a proper [[Help:Style#Edit summary|edit summary]] such as {{ic|translate <nowiki>[[ArchWiki Translation Team]]</nowiki>}}.<br />
# At the bottom of the translated page, there is a list of categories the page is included in. Check that all these categories exist, i.e. the links should not be red. Otherwise create all missing categories following the red links - categories are created the same way as regular pages.<br />
# Return to the preview page and save the page.<br />
# Add [[Template:TranslationStatus]] to the translated page. For usage, see [[Template:TranslationStatus#Usage]].<br />
# (optional) Create another page, e.g. [[Translated title of ArchWiki Translation Team]], whose title will be a localized version of [[ArchWiki Translation Team (Language)]]. Enter {{ic|<nowiki>#redirect [[ArchWiki Translation Team (Language)</nowiki>]]}} as its only content and save it.<br />
<br />
== Maintaining translations ==<br />
<br />
Use [[Template:TranslationStatus]] to make it easier keeping track of any untranslated new changes.<br />
<br />
Special attention should be paid to important articles such as the [[Installation guide]], [[Arch Linux]] and similar. English typo fixes, which are not part of e.g a command or its output, do not have to apply to your translation can usually be safely ignored.<br />
<br />
Translations of new content do not have to happen immediately. Since reverts can happen quite frequently, you are free to wait before translating potentially low quality or dubious edits to not spend time on something that will be undone eventually.<br />
<br />
=== Dealing with old translations ===<br />
<br />
Unfortunately, there are many outdated or insufficient translations. If you find any of these, flag them with either [[Template:Translateme]] or [[Template:Bad translation]] if they have not been flagged yet. The former is used on translations which are not yet critically outdated. Change [[Template:Translateme]] to [[Template:Bad translation]] if the translation has become critically outdated.<br />
<br />
If a bad translation has been flagged for a while, preferably 6-12 months, but no one updated it, you may [[Help:Editing#Redirects|redirect]] it to the English article. You may redirect translations without flagging first when they:<br />
<br />
* Contain dangerous information (includes but is not limited to destructive commands or wrong/missing security-related instructions).<br />
* Have been obviously abandoned since its creation (which has to be at least 2 years ago, to give translators plenty of time).<br />
** You may ignore later minor edits not related to the translation (bot edits, changing categories, fixing grammar and so on) to determine if a translation has been abandoned.<br />
* Are ancient (last translated over 5 years ago ''and'' is significantly out of sync with the English page).<br />
<br />
This does only partially apply to small articles where only the English version is rarely updated. If the translation is fine but only contains e.g one critically outdated command, fix it instead of redirecting.<br />
<br />
== Templates that can be translated ==<br />
<br />
The following table lists all [[Help:Template|templates]] that may be translated. Translations of this section should add a column to the table linking their translated templates in their preferred usage form (possibly using Template redirects).<br />
<br />
{| class=wikitable<br />
! English template<br />
|-<br />
! colspan=2| Article templates<br />
|-<br />
| [[Template:Related articles start]]<br />
|-<br />
| [[Template:Unsupported]]<br />
|-<br />
| [[Template:Yes]]<br />
|-<br />
| [[Template:No]]<br />
|-<br />
| [[Template:Tip]]<br />
|-<br />
| [[Template:Note]]<br />
|-<br />
| [[Template:Warning]]<br />
|-<br />
| [[Template:Dead link]]<br />
|-<br />
| [[Template:Broken package link]]<br />
|-<br />
| [[Template:Broken section link]]<br />
|-<br />
! colspan=2| Translation status templates<br />
|-<br />
| [[Template:Bad translation]]<br />
|-<br />
| [[Template:Translateme]]<br />
|-<br />
| [[Template:TranslationStatus]]<br />
|-<br />
! colspan=2| Navigation templates<br />
|-<br />
| [[Template:Laptops table header]]<br />
|-<br />
| [[Template:Laptops navigation]]<br />
|-<br />
| [[Template:List of applications navigation]]<br />
|-<br />
| [[Template:Package guidelines]]<br />
|-<br />
! colspan=2| Special templates<br />
|-<br />
| [[Template:Cat main]]<br />
|-<br />
| [[Template:Template]]<br />
|-<br />
| [[Template:META Error]]<br />
|-<br />
| [[Template:META Unexplained Status Template]]<br />
|-<br />
| [[Template:Comment]]<br />
|-<br />
| [[Template:Committed identity]]<br />
|-<br />
| [[Template:Unsigned]]<br />
|}<br />
<br />
== Templates that should be omitted from translations ==<br />
<br />
When page or section is flagged with [[Template:Accuracy]], [[Template:Style]], [[Template:Archive]], [[Template:Remove]] or [[Template:Out of date]] — do not translate pages/sections in question until offending issues have been fixed and template removed.<br />
<br />
If you see [[Template:Expansion]], [[Template:Merge]], [[Template:Move]] or [[Template:Redirect]] you can safely translate the page, but do not copy these templates over to the translated article.<br />
<br />
If you see [[Template:Broken package link]], [[Template:Broken section link]] or [[Template:Dead link]], do not copy those templates over to the translated article. Either fix them in original text, then copy and/or translate fixed links, or omit whole sentence or section concerning them when translating.<br />
<br />
== Page list ==<br />
<br />
List here articles that only exist in non-English languages, or that exist in English but are either not fully translated, or are in a worse state than the non-English version. Keep alphabetical order.<br />
<br />
{| class="wikitable sortable collapsible" border="1"<br />
|-<br />
! Page<br />
! Language<br />
! class="unsortable" | Notes<br />
|-<br />
| [[Alfis (Русский)]]<br />
| Russian<br />
|<br />
|-<br />
| [[Apache OpenMeetings (Русский)]]<br />
| Russian<br />
|<br />
|-<br />
| [[Bépo (Français)]]<br />
| French<br />
|<br />
|-<br />
| [[Drcom (简体中文)]]<br />
| Chinese (Simplified)<br />
|<br />
|-<br />
| [[Fcitx5 (简体中文)]]<br />
| Chinese (Simplified)<br />
| Not fully translated into English.<br />
|-<br />
| [[Koreader (简体中文)]]<br />
| Chinese (Simplified)<br />
|<br />
|-<br />
| [[Localization (正體中文)/Traditional Chinese (正體中文)]]<br />
| Chinese (Traditional)<br />
|<br />
|-<br />
| [[Qv2ray (简体中文)]]<br />
| Chinese (Simplified)<br />
|<br />
|}</div>
Misaka 0x34ca
https://wiki.archlinux.org/index.php?title=Fcitx5&diff=758513
Fcitx5
2022-12-01T08:11:20Z
<p>Misaka 0x34ca: translate and merge zh-hans:Fcitx5</p>
<hr />
<div>[[Category:Input methods]]<br />
[[ja:Fcitx5]]<br />
[[zh-hans:Fcitx5]]<br />
{{Related articles start}}<br />
{{Related|Fcitx}}<br />
{{Related|IBus}}<br />
{{Related articles end}}<br />
<br />
[https://fcitx-im.org/wiki/Fcitx_5 Fcitx5] is an [[input method]] framework with a lightweight core, offering additional language support via addons. It is the successor to [[Fcitx]].<br />
<br />
== Installation ==<br />
<br />
[[Install]] the {{Pkg|fcitx5}} package.<br />
<br />
{{Grp|fcitx5-im}} group provides {{Pkg|fcitx5}} ontology, [[#Configuration tool]], and necessary [[#Input method module]].<br />
<br />
{{Note|{{Pkg|fcitx5}} has only a basic framework, it just gives English support. If you want to input other languages, such as Chinese or Japanese, you need an Input Method Engine (IME).}}<br />
<br />
=== Chinese ===<br />
<br />
* {{Pkg|fcitx5-chewing}} is a popular Bopomofo (Zhuyin) input engine for Traditional Chinese based on {{Pkg|libchewing}}.<br />
* {{Pkg|fcitx5-chinese-addons}} contains addons related to Chinese, such pinyin, shuangpin, wubi.<br />
* {{Pkg|fcitx5-rime}}, using the [[Rime]] engine.<br />
* {{AUR|fcitx5-mcbopomofo-git}} [https://github.com/openvanilla/fcitx5-mcbopomofo McBopomofo] for fcitx5.<br />
<br />
=== Japanese ===<br />
<br />
* {{Pkg|fcitx5-anthy}}, a popular Japanese input engine. However, it is not actively developed anymore.<br />
* {{Pkg|fcitx5-kkc}}, a Japanese Kana Kanji input engine, based on {{Pkg|libkkc}}.<br />
* {{Pkg|fcitx5-mozc}}, based on [[Mozc]], the Open Source Edition of Google Japanese Input.<br />
* {{Pkg|fcitx5-skk}}, a Japanese Kana Kanji input engine, based on {{Pkg|libskk}}.<br />
<br />
=== Other languages ===<br />
<br />
* {{Pkg|fcitx5-hangul}}, for typing Korean hangul, based on {{Pkg|libhangul}}.<br />
* {{Pkg|fcitx5-unikey}} or {{Pkg|fcitx5-bamboo}}, for typing Vietnamese characters.<br />
* {{Pkg|fcitx5-m17n}} or {{Pkg|fcitx5-table-other}}, for typing other miscellaneous languages — use the latter for typing IPA (X-SAMPA).<br />
<br />
=== Input method module ===<br />
<br />
To get a better experience, you should install the following modules as per your needs. Without them, the input method may still work on most applications but you might experience input method hang up, preview window screen location error, or no preview error.<br />
<br />
* For [[Qt]] programs, install {{Pkg|fcitx5-qt}}.<br />
* For [[GTK]] programs, install {{Pkg|fcitx5-gtk}}.<br />
* For Qt4 programs, install {{AUR|fcitx5-qt4-git}}.<br />
* For Qt5 programs, install {{AUR|fcitx5-qt5-git}}.<br />
* For Qt6 programs, install {{AUR|fcitx5-qt6-git}}.<br />
* For date and time support, install {{Pkg|fcitx5-lua}}.<br />
<br />
{{Tip|Generally, installing {{Pkg|fcitx5-qt}} and {{Pkg|fcitx5-gtk}} is enough to handle all situations.}}<br />
<br />
== Usage ==<br />
<br />
=== Integration ===<br />
<br />
Set the following [[environment variables]][https://fcitx-im.org/wiki/Setup_Fcitx_5#Environment_variables]:<br />
<br />
GTK_IM_MODULE=fcitx<br />
QT_IM_MODULE=fcitx<br />
XMODIFIERS=@im=fcitx<br />
<br />
{{Note|<br />
*[[Append]] {{ic|1=SDL_IM_MODULE=fcitx}} for some games that use a vendor-modified version of SDL2 library.<br />
*[[Append]] {{ic|1=GLFW_IM_MODULE=ibus}} for [[kitty]].[https://fcitx-im.org/wiki/Setup_Fcitx_5#Other_less_common_setup]<br />
}}<br />
<br />
If your locale is {{ic|en_US.UTF-8}}, and your GTK2 application cannot activate fcitx5, you can set the input method to xim specifically for it, for example:<br />
<br />
$ env GTK_IM_MODULE=xim ''<your_gtk2_application>''<br />
<br />
Do not set {{ic|GTK_IM_MODULE}} to xim globally as it affects GTK3 programs as well. XIM has various problems (such as the input method cannot input after restarting), so try not to use it.<br />
<br />
=== Desktop Environment Autostart ===<br />
<br />
{{Note|<br />
* If you are using any XDG compatible desktop environment such as [[KDE]], [[GNOME]], [[Xfce]], [[LXDE]], after you re-login, the autostart should work out of the box.<br />
* If you are using [[i3]], [[awesome]] or other window managers, you need to add Fcitx5 to its script to achieve autostart. For example, if you use i3 or sway, you can add {{ic|exec --no-startup-id fcitx5 -d}} to the configuration file.<br />
* If you are using [[dwm]], you need to add the [https://dwm.suckless.org/patches/autostart autostart] patch. Add {{ic|fcitx5 -d}} in {{ic|~/.dwm/autostart.sh}}<br />
}}<br />
If you want Fcitx5 to [[autostart]] when you start your desktop, execute the following command:<br />
<br />
$ cp /usr/share/applications/org.fcitx.Fcitx5.desktop ~/.config/autostart/<br />
<br />
{{Tip|To see if Fcitx5 is working correctly, open an application and press {{ic|Ctrl+Space}} to switch between input methods (when configured), and input some words.}}<br />
<br />
=== Words Library ===<br />
<br />
==== Chinese ====<br />
<br />
For the Chinese input method of Fcitx5, several words libraries are currently provided in the repository:<br />
<br />
* {{Pkg|fcitx5-pinyin-zhwiki}}: A words library created by felixonmars based on Chinese Wikipedia. Applicable to '''Pinyin input method'''.<br />
* {{AUR|fcitx5-pinyin-sougou}}{{Broken package link|package not found}}: Sogou words library for Pinyin input method<br />
* {{AUR|fcitx5-pinyin-zhwiki-rime}}: A words library for [[Rime]] input method<br />
* {{AUR|fcitx5-pinyin-moegirl-rime}}: A words library for [[Rime]] input method<br />
* [https://github.com/cathaysia/fcitx5_dicts/releases/tag/0.0.1 cedict]: A words library converted from [https://www.mdbg.net/chinese/dictionary?page=cc-cedict cedict dictionary].<br />
* [https://github.com/outloudvi/fcitx5-pinyin-moegirl moegirl]: A words library created by outloudvi based on Moegirlpedia<br />
<br />
{{Note|Manually downloaded words library files can be directly placed in the path of {{ic|~/.local/share/fcitx5/pinyin/dictionaries}}. The suffix of the words library file should be .dict}}<br />
<br />
=== Custom Words Library ===<br />
<br />
==== Chinese ====<br />
<br />
Generally speaking, since {{Pkg|fcitx5}} supports [[#import Sogou words library|import Sogou words library]], there is no need to customize words library to a large extent, but {{Pkg|fcitx5}} still provides related tools.<br />
<br />
* Install {{Pkg|libime}}<br />
<br />
The original words library file is a text file, its format is: {{ic|Character Pinyin Frequency}}<br />
<br />
After getting the original dictionary file, execute {{ic|libime_pinyindict ''words-library.txt'' ''words-library.dict'' }}.<br />
<br />
The custom dictionary file can be placed in {{ic|~/.local/share/fcitx5/pinyin/dictionaries}}<br />
<br />
{{Note|The following projects may help:<br />
* [https://pypi.org/project/pypinyin/ Chinese characters to Pinyin]<br />
* [https://pypi.org/project/OpenCC/ Simplified and Traditional Chinese Conversion]<br />
}}<br />
<br />
== Configuration ==<br />
<br />
=== Configuration tool ===<br />
<br />
The configuration file of {{Pkg|fcitx5}} is located at {{ic|~/.config/fcitx5}}. Although you can use a text editor to edit the configuration file, you might find a GUI configuration tool much more convenient, so install the {{Pkg|fcitx5-configtool}} package.<br />
<br />
=== Disable overriding XKB settings ===<br />
<br />
By default Fcitx5 overrides X keyboard settings. (The ones you can set with {{ic|setxkbmap}} command or graphical tools provided by [[desktop environment]]s.) If you do not want that, run {{ic|fcitx5-configtool}} and uncheck ''Addons → XCB → Allow Overriding System XKB Settings''.<br />
<br />
=== Themes and Appearance ===<br />
<br />
==== Themes ===<br />
<br />
{{Style|Use [[Template:App]].}}<br />
<br />
The number of default themes is limited, you can find more themes on [https://github.com/search?q=fcitx5+theme&type=Repositories GitHub].<br />
* {{AUR|fcitx5-breeze}}: Fcitx5 theme to match the KDE Breeze style.<br />
* {{Pkg|fcitx5-nord}}: [https://github.com/tonyfettes/fcitx5-nord Nord Color Themes].<br />
* {{Pkg|fcitx5-material-color}}: This theme gives a feeling like Microsoft PinYin. Its official repository is located at [https://github.com/hosxy/Fcitx5-Material-Color GitHub: Fcitx5-Material-Color]. Its README.md file shows some beautiful configurations of one-line mode.<br />
* {{AUR|fcitx5-solarized}}: [https://github.com/mingyech/fcitx5-solarized Solarized] color theme for Fcitx5.<br />
* {{AUR|fcitx5-skin-fluentdark-git}}: Fluent-Design dark theme with blur effects and shadows.<br />
<br />
{{Tip|If you are using KCM, then switch themes with: ''Setting -> Location -> input method -> Configure addons -> Classic user interface -> Theme''.}}<br />
<br />
{{Note|Theming does not work for Fcitx5 if you are using {{AUR|gnome-shell-extension-kimpanel-git}} with GNOME environment. [https://yanqiyu.info/2020/11/06/fcitx5-fedora-updated/#60d50c0a87a8c64ae965e403]}}<br />
<br />
==== Enable single-line mode ====<br />
<br />
In the settings of the Pinyin input method (or Rime input method), enable ''Show preedit within application'' to enable single-line mode.<br />
<br />
== Troubleshooting ==<br />
<br />
=== Diagnose problems ===<br />
<br />
If you have problems using fcitx5, eg. if {{ic|Ctrl+Space}} fails to work in all applications, then the first thing you should try is to diagnose using {{ic|fcitx5-diagnose}}. The output of {{ic|fcitx5-diagnose}} should contain clues for the most common problems.<br />
<br />
=== Cannot use fcitx5 single-line mode in some applications ===<br />
<br />
1. If the single-line mode does not work in gtk applications such as [[Firefox]], please install {{Pkg|fcitx5-gtk}}<br />
<br />
2. The single-line mode does not work in [[WPS Office]] and Sublime Text, this is a problem of [[WPS Office]] and Sublime Text itself, not a problem of {{Pkg|fcitx5}}. [https://github.com/fcitx/fcitx5/issues/60]<br />
<br />
=== Cannot use fcitx5 in WPS ===<br />
<br />
See [[WPS Office#Fcitx5 cannot input Chinese]].<br />
<br />
=== Fcitx5 has position errors in JetBrains IDEs ===<br />
<br />
The cause of this issue is that the JBR shipped with the IDE is not correct, to fix this issue you need to:<br />
<br />
1. Download [https://github.com/RikudouPatrickstar/JetBrainsRuntime-for-Linux-x64/releases this jbr] and extract it.<br />
<br />
2. Follow [https://intellij-support.jetbrains.com/hc/en-us/articles/206544879-Selecting-the-JDK-version-the-IDE-will-run-under this guide] to change IDE's JBR.<br />
<br />
=== Emoji show abnormally in the candidate box ===<br />
<br />
* Confirm you have a font with emoji support installed (such as {{Pkg|noto-fonts-emoji}})<br />
<br />
* Set the system font as {{ic|Noto Sans CJK SC}} for Simplified Chinese, for example.<br />
<br />
* Restart Fcitx5 by the following command:<br />
<br />
$ kill `ps -A | grep fcitx5 | awk '{print $1}'` && fcitx5&<br />
<br />
=== Cannot use fcitx5 in Netease Cloud Music ===<br />
<br />
There are two methods to solve this problem:<br />
<br />
* Install {{AUR|netease-cloud-music-imfix}}{{Broken package link|package not found}}<br />
* Install [[flatpak]] version of [https://flathub.org/apps/details/com.netease.CloudMusic Netease Cloud Music]<br />
<br />
=== Cannot use fcitx5 in RStudio ===<br />
<br />
Run the following command:<br />
<br />
$ strings /usr/lib/rstudio/lib/libQt5Core.so.5 | grep "Qt 5"<br />
<br />
Find out the version of the Qt library, use this version to recompile {{ic|libfcitx5platforminputcontextplugin.so}} in {{Pkg|fcitx5-qt}}, and put it into {{ic|/usr/lib/rstudio/plugins/platforminputcontexts/}} directory.<br />
<br />
If you are using {{AUR|rstudio-desktop-bin}}, you can install {{AUR|rstudio-fcitx5}} directly.<br />
<br />
=== Cannot use fcitx5 in Steam and Dota2 ===<br />
<br />
In fact, Fcitx5 can be used in Steam big screen mode and Dota2. But need to use {{ic|Ctrl+Space}} to activate IME instead of {{ic|Ctrl+Shift}} [https://github.com/fcitx/fcitx5/issues/442]<br />
<br />
=== Candidate popup misaligned in HiDPI mode of Gtk environments ===<br />
<br />
If the position of your candidate popup is not anchored at your cursor position, [[install]] {{Pkg|fcitx5-gtk}}.<br />
<br />
=== fcitx5 unavailable for kitty ===<br />
<br />
See [[Kitty#Enable IME support]].<br />
<br />
== Tips and tricks ==<br />
<br />
=== Customizing Traditional and Simplified Chinese conversion ===<br />
<br />
Some IMEs assume Simplified Chinese by default, resulting in incorrect characters being displayed when using Traditional input, e.g. 爲什麼 instead of 為什麼. To fix this, the usage of the {{ic|Simplified and Traditional Chinese Translation}} can be customized. <br />
<br />
To configure conversion, set {{ic|OpenCC profile for Simplified to Traditional}} to one of the following values:<br />
* s2t - Simplified to Traditional (OpenCC) (this is the default and probably not what you are looking for)<br />
* s2tw - Simplified to Traditional (Taiwan)<br />
* s2twp - Simplified to Traditional (Taiwan) with Taiwanese idiom<br />
* s2hk - Simplified to Traditional (Hong Kong)<br />
<br />
To configure the reverse, set {{ic|OpenCC profile for Traditional to Simplified}} to one of the following values:<br />
* t2s - Traditional (OpenCC) to Simplified (OpenCC) (this is the default and probably not what you are looking for)<br />
* tw2s - Traditional (Taiwan) to Simplified (OpenCC)<br />
* tw2sp - Traditional (Taiwan) to Simplified (OpenCC) with Mainland Chinese idiom<br />
* t2hk - Traditional (OpenCC) to Hong Kong variant<br />
* t2tw - Traditional (OpenCC) to Taiwan Standard<br />
* tw2t - Traditional (Taiwan) to Traditional (OpenCC)<br />
* hk2s - Traditional (Hong Kong) to Simplified (OpenCC)<br />
* hk2t - Traditional (Hong Kong) to Traditional Chinese (OpenCC)<br />
* t2jp - Traditional (Kyūjitai) to New Japanese Kanji (Shinjitai)<br />
* jp2t - New Japanese Kanji (Shinjitai) to Traditional (Kyūjitai)<br />
<br />
Up to date list here: [https://github.com/BYVoid/OpenCC OpenCC]<br />
<br />
=== How to view the Unicode encoding of selected characters ===<br />
<br />
* If you want to view the Unicode encoding of the selected text in a text editor, then directly select the text, and then use the shortcut keys {{ic|Ctrl+Alt+Shift+u}} to view the encoding of the selected text.<br />
<br />
* If you want to view the Unicode encoding of some text in a non-editable area (such as this wiki), you need to first copy the text to the clipboard, then click on any editable area (such as the search box), and then use the shortcut keys {{ic|Ctrl+Alt+Shift+u}} to view the encoding of the text in the clipboard.<br />
<br />
=== Input special characters ===<br />
<br />
In general, for some simple symbols, such as {{ic|≤}}, {{ic|ā}}, {{ic|á}}, {{ic|©}}, etc., you can enter them through [[Xorg/Keyboard configuration#Configuring compose key|Configuring compose key]], but for more special symbols, such as {{ic|②}}, {{ic|③}}, {{ic|④}}, etc., you Either customize {{ic|~/.XCompose}}, or use Fcitx5's Unicode function to achieve.<br />
<br />
Take {{ic|①}} as an example:<br />
<br />
Position the cursor in any input box, and then press {{ic|Ctrl+Alt+Shift+u}}, and then enter {{ic|circle one}}, you will see a variety of {{ic|①}}, other special characters are similar here.<br />
<br />
=== Switching Halfwidth / Fullwidth Punctuation ===<br />
<br />
For {{Pkg|fcitx5-chinese-addons}}, fullwidth punctuation is used by default, one may use {{ic|Ctrl+.}} to switch between halfwidth and fullwidth punctuation.<br />
<br />
=== Automatically switch input methods in vim ===<br />
<br />
Additional code: [https://www.zhihu.com/question/341748857/answer/1739052604][https://sur.moe/post/vim%E8%BE%93%E5%85%A5%E6%B3%95%E5%88%87%E6%8D%A2%E4%B8%8D%E4%BD%BF%E7%94%A8%E6%8F%92%E4%BB%B6/]<br />
<br />
{{hc|~/.vimrc|<nowiki><br />
let fcitx5state=system("fcitx5-remote")<br />
autocmd InsertLeave * :silent let fcitx5state=system("fcitx5-remote")[0] | silent !fcitx5-remote -c " Disable the input method when exiting insert mode and save the state<br />
autocmd InsertEnter * :silent if fcitx5state == 2 | call system("fcitx5-remote -o") | endif " 2 means that the input method was opened in the previous state, and the input method is started when entering the insert mode<br />
</nowiki><br />
}}<br />
<br />
If you are using {{Pkg|neovim}}, then append the above code to {{ic|~/.config/nvim/init.vim}}<br />
<br />
{{Note|If you add this code in vim.cmd, you may need to uncomment it.}}<br />
<br />
=== Pinyin input method ===<br />
<br />
{{Note|The following functions are only valid for the Pinyin input method in {{Pkg|fcitx5-chinese-addons}}, please explore other input methods by yourself. }}<br />
<br />
==== Import Sogou words library ====<br />
<br />
* For [[KDE]] users, you can import Sogou words library through {{ic|Settings -> Regional Settings -> Input Method -> Pinyin -> Dictionary -> Import}}<br />
<br />
* For users who use {{Pkg|fcitx5-configtool}}, you need to manually open the software "Fcitx5 Configuration" and manually configure it in the Pinyin input method.<br />
<br />
You can import local words library or browse and import online words library<br />
<br />
==== Cloud Pinyin ====<br />
<br />
On the settings page of the Pinyin input method, you can enable Cloud Pinyin. But if you need to change the default backend of Cloud Pinyin, you need to change it in the global settings of {{Pkg|fcitx5}}. Provided backends are {{ic|Google}}, {{ic|Baidu}}, {{ic|GoogleCN}}<br />
<br />
==== Stroke Filter ====<br />
<br />
Set the shortcut key after the "stroke filter" of the pinyin input method you set (the default is {{ic|`}})<br />
Then after entering the text, press the shortcut key, the words '''stroke filter''' will appear in the candidate box of the input method, and the words can be filtered by strokes. The specific rules are: h horizontal stroke, s vertical stroke, p left-falling stroke, n right-falling stroke, z turning stroke<br />
<br />
By default, the stroke filter is to filter the first character of a sentence, but you can switch between different characters in a sentence by using '''determining characters by word'''.<br />
<br />
For example, to perform stroke filtering on the third character in the word 中华人民共和国, you can press {{ic|]}} twice in a row after enabling stroke filtering to let {{Pkg|fcitx5}} perform stroke filtering on it.<br />
<br />
{{Note|By default, the shortcut keys of '''Determining characters with words''' are {{ic|[}} and {{ic|]}}, and the shortcut keys can be viewed in the settings of '''Pinyin input method'''.}}<br />
<br />
=== RIME/Zhongzhou rhyme ===<br />
<br />
{{Reminder|All changes need to be redeployed to take effect}}<br />
<br />
==== Import words library ====<br />
<br />
Take importing words library {{AUR|fcitx5-pinyin-zhwiki-rime}} and {{AUR|fcitx5-pinyin-moegirl-rime}} as an example.<br />
<br />
{{Note|It is also possible to put the custom words library into {{ic|~/.local/share/fcitx5/rime/}}, and the file name (filename.dict.yaml) should be the same as the words library name ([https://github.com/rime/home/wiki/RimeWithSchemata#%E7%A2%BC%E8%A1%A8%E8%88%87%E8%A9%9E%E5%85%B8 words library format]) }}<br />
<br />
1. Change the {{ic|~/.local/share/fcitx5/rime/luna_pinyin.custom.yaml}} file (take {{ic|luna_pinyin}} as an example, and modify the name of the other input schemes)<br />
<br />
{{hc|~/.local/share/fcitx5/rime/luna_pinyin.custom.yaml|<br />
# There should only be one "patch:" in the file, if it already exists, just paste the following code<br />
# This file is used to modify a specific input scheme, change the above luna_pinyin to other input scheme names to complete the modification of other input schemes<br />
patch:<br />
"translator/dictionary": extended #The dictionary name can be customized, just keep the same as the file name below<br />
}}<br />
<br />
2. Create a new {{ic|~/.local/share/fcitx5/rime/extended.dict.yaml}} file<br />
<br />
{{Tip|Import custom words library just add the words library name after "import_tables:"}}<br />
<br />
{{hc|~/.local/share/fcitx5/rime/extended.dict.yaml|<br />
# The following disables the default words library and does not enable the default "Baguwen" words library and word frequency system, if you do not want traditional characters and box characters to appear in candidate words<br />
---<br />
name: extended<br />
version: "2021.02.19"<br />
sort: by_weight<br />
use_preset_vocabulary: false #Whether to enable the default "Baguwen" words library and word frequency system, if you want to enable it, please set it to true.<br />
import_tables:<br />
# - luna_pinyin #Default words library, please uncomment if you want to enable it<br />
- zhwiki<br />
- moegirl<br />
# - custom words library name<br />
...<br />
}}<br />
<br />
==== Fuzzy sound settings ====<br />
<br />
Please comment (#) or delete unnecessary fuzzy sounds as needed. If you need to add other fuzzy sounds, please refer to [https://gist.github.com/2320943 Mingyue Pinyin fuzzy sound custom template]<br />
<br />
If the {{ic|luna_pinyin.custom.yaml}} file does not exist<br />
<br />
{{hc|~/.local/share/fcitx5/rime/luna_pinyin.custom.yaml|<br />
patch:<br />
"speller/algebra":<br />
- derive/^([zcs])h/$1/ #zh,ch,sh->z,c,s<br />
- derive/^([zcs])([^h])/$1h$2/ #z,c,s->zh,ch,sh<br />
- derive/^n/l #n->l<br />
- derive/^l/n #l->n<br />
- derive/([ei])n$/$1ng/ # en -> eng, in -> ing<br />
- derive/([ei])ng$/$1n/ # eng->en, ing -> in<br />
- abbrev/^([a-z]).+$/$1/ #Jianpin support<br />
- abbrev/^([zcs]h).+$/$1/ #fuzzy sounds support for Jianpin<br />
delimiter: " '" #delimiter<br />
}}<br />
<br />
If the file exists, paste the part below {{ic|patch:}} to the end of the file (there is only one {{ic|patch:}} in {{ic|luna_pinyin.custom.yaml}})<br />
<br />
==== Special Symbols ====<br />
<br />
{{Note|Fcitx5 has built-in support for special symbols. See [[#Input special characters]]}}<br />
<br />
Import the {{ic|symbols.dict.yaml}} words library in the [https://github.com/yangshann/rime-dict rime-dict] project to input Greek letters, some mathematical symbols and Emoji expressions in Pinyin<br />
<br />
Example:<br />
<br />
* Greek letters: input {{ic|alpha}} to output {{ic|α}}<br />
<br />
* Mathematical symbols: input {{ic|jifen}} to output {{ic|∫}}<br />
<br />
* Special symbols: Input {{ic|cha}} to output {{ic|✕,✖}}<br />
<br />
* Serial number: input {{ic|qi}} to output {{ic|Ⅶ,⑦}}<br />
<br />
* Emoji expression: Input {{ic|haha}} to output {{ic|😃,😆}}<br />
<br />
==== Load librime-lua plugin ====<br />
<br />
If you want to load the librime-lua plugin, you must add the {{ic|lua}} module in the Rime input method settings of the fcitx configuration tool.</div>
Misaka 0x34ca
https://wiki.archlinux.org/index.php?title=Paperkey&diff=756936
Paperkey
2022-11-14T07:20:31Z
<p>Misaka 0x34ca: unify the file extensions (gpg for not armored data; asc for armored data)</p>
<hr />
<div>[[Category:Encryption]]<br />
[[ja:Paperkey]]<br />
{{Related articles start}}<br />
{{Related|GnuPG}}<br />
{{Related articles end}}<br />
<br />
[https://www.jabberwocky.com/software/paperkey/ Paperkey] is a command line tool to export GnuPG keys on paper. It reduces the size of the exported key, by removing the public key parts from the private key. Paperkey also includes CRC-24 checksums in the key to allow the user to check whether their private key has been restored correctly.<br />
<br />
== Installation ==<br />
<br />
[[Install]] the {{Pkg|paperkey}} package.<br />
<br />
== Usage ==<br />
<br />
=== Backup ===<br />
<br />
{{Warning| You need to have the public key available when restoring the paperkey backup! Since it is safe to have your public key available publicly, consider uploading it to a [[GnuPG#Use a keyserver|keyserver]]. }}<br />
To create a backup of your GnuPG key, pipe the private key to paperkey:<br />
$ gpg --export-secret-key ''key-id'' | paperkey --output ''secret-key-paper''.asc<br />
<br />
=== Restore secret key ===<br />
<br />
To restore the secret key you need to have a file with the paperkey data and the public key. Then run the following command to import the private key to {{ic|~/.gnupg}}:<br />
$ paperkey --pubring ''public-key''.gpg --secrets ''secret-key-paper''.asc | gpg --import<br />
Alternatively, restore the private key to a file:<br />
$ paperkey --pubring ''public-key''.gpg --secrets ''secret-key-paper''.asc --output ''secret-key''.gpg<br />
<br />
==== Error: unable to parse OpenPGP packets (is this armored data?) ====<br />
<br />
If you receive this error while restoring your key, you need to dearmor your public key first:<br />
$ gpg --dearmor ''public-key''.asc<br />
<br />
== Tips and tricks ==<br />
<br />
=== Print secret key directly ===<br />
<br />
If no {{ic|--output}} argument is given, paperkey will print its output to {{ic|stdout}}. It is possible to print the key directly without intermediate file, which might have security implications. To do so, install [[CUPS]], and pipe to {{ic|lpr}}:<br />
<br />
$ gpg --export-secret-key ''key-id'' | paperkey | lpr<br />
<br />
=== Encode the secret key as QR Code ===<br />
<br />
By default, paperkey will output the secret key as human readable text. While this format guarantees the ability to read and restore the printed information, it is not very convenient. The {{ic|--output-type raw}} option tells paperkey to output the raw secret key data instead. This enables the use of other encodings, including machine-readable ones such as the [[Wikipedia:QR_code|QR code]].<br />
<br />
The {{Pkg|qrencode}} program can be used for this:<br />
<br />
$ gpg --export-secret-key ''key-id'' | paperkey --output-type raw | qrencode --8bit --output ''secret-key.qr.png''<br />
<br />
It is possible to increase the [https://www.qrcode.com/en/about/error_correction.html error correction level] to maximum with the {{ic|--level H}} option. This provides a lost data restoration rate of about 30% at the cost of reduced [https://www.qrcode.com/en/about/version.html capacity]. Should the secret key not fit in the QR code, the lower {{ic|Q}} and {{ic|M}} error correction levels are also available and give restoration rates of about 25% and 15% respectively. The default error correction level is {{ic|L}} which allows restoration of about 7% of lost data.<br />
<br />
=== Restore the secret key from QR code ===<br />
<br />
With {{Pkg|zbar}} it is possible to restore the key using a [[Webcam setup|camera]]:<br />
<br />
$ zbarcam -1 --raw -Sbinary | paperkey --pubring ''public-key''.gpg | gpg --import<br />
<br />
The same options can also be applied to {{ic|zbarimg}}:<br />
<br />
$ zbarimg -1 --raw -q -Sbinary ''secret-key.qr.png'' | paperkey --pubring ''public-key''.gpg | gpg --import<br />
<br />
{{Tip|Running zbarimg with the {{ic|-q}} option suppresses status text printing after the decoded data is printed. Without it, the data passed into paperkey could be contaminated.}}<br />
<br />
If you are using a scanned image, you might have to blur it by<br />
<br />
$ convert secret-key.qr.png -blur 0 secret-key-blurred.qr.png</div>
Misaka 0x34ca
https://wiki.archlinux.org/index.php?title=GnuPG&diff=756935
GnuPG
2022-11-14T07:14:37Z
<p>Misaka 0x34ca: unify the file extensions (gpg for not armored data; asc for armored data)</p>
<hr />
<div>[[Category:Encryption]]<br />
[[Category:Email]]<br />
[[Category:GNU]]<br />
[[de:GnuPG]]<br />
[[ja:GnuPG]]<br />
[[pl:GnuPG]]<br />
[[ru:GnuPG]]<br />
[[zh-hans:GnuPG]]<br />
{{Related articles start}}<br />
{{Related|pacman/Package signing}}<br />
{{Related|Data-at-rest encryption}}<br />
{{Related|List of applications/Security#Encryption, signing, steganography}}<br />
{{Related articles end}}<br />
<br />
According to the [https://www.gnupg.org/ official website]:<br />
<br />
:GnuPG is a complete and free implementation of the [https://openpgp.org/about/ OpenPGP] standard as defined by [[RFC:4880|RFC 4880]] (also known as PGP). GnuPG allows you to encrypt and sign your data and communications; it features a versatile key management system, along with access modules for all kinds of public key directories. GnuPG, also known as GPG, is a command line tool with features for easy integration with other applications. A wealth of frontend applications and libraries are available. GnuPG also provides support for S/MIME and Secure Shell (ssh).<br />
<br />
== Installation ==<br />
<br />
[[Install]] the {{Pkg|gnupg}} package.<br />
<br />
This will also install {{Pkg|pinentry}}, a collection of simple PIN or passphrase entry dialogs which GnuPG uses for passphrase entry. The shell script {{ic|/usr/bin/pinentry}} determines which ''pinentry'' dialog is used, in the order described at [[#pinentry]].<br />
<br />
If you want to use a graphical frontend or program that integrates with GnuPG, see [[List of applications/Security#Encryption, signing, steganography]].<br />
<br />
== Configuration ==<br />
<br />
=== Home directory ===<br />
<br />
The GnuPG home directory is where the GnuPG suite stores its keyrings and private keys, and reads configurations from. By default, the path used is {{ic|~/.gnupg}}. There are two ways to override this:<br />
<br />
* Set the {{ic|$GNUPGHOME}} [[environment variable]].<br />
* Use the {{ic|--homedir}} argument, e.g. {{ic|$ gpg --homedir ''path/to/file''}} [https://www.gnupg.org/documentation/manuals/gnupg/GPG-Configuration-Options.html].<br />
<br />
By default, the home directory has its [[permissions]] set to {{ic|700}} and the files it contains have their permissions set to {{ic|600}}. Only the owner of the directory has permission to read, write, and access the files. This is for security purposes and should not be changed. In case this directory or any file inside it does not follow this security measure, you will get warnings about unsafe file and home directory permissions.<br />
<br />
=== Configuration files ===<br />
<br />
All of GnuPG's behavior is configurable via command line arguments. For arguments you would like to be the default, you can add them to the respective configuration file:<br />
<br />
* ''gpg'' checks {{ic|''gnupg_home''/gpg.conf}} (user) and {{ic|/etc/gnupg/gpg.conf}} (global) [https://dev.gnupg.org/T4788]. Since ''gpg'' is the main entrypoint for GnuPG, most configuration of interest will be here. See [https://www.gnupg.org/documentation/manuals/gnupg/GPG-Options.html GPG Options] for possible options.<br />
* ''dirmngr'' checks {{ic|''gnupg_home''/dirmngr.conf}} and {{ic|/etc/gnupg/dirmngr.conf}}. ''dirmngr'' is a program internally invoked by {{ic|gpg}} to access PGP keyservers [https://www.gnupg.org/documentation/manuals/gnupg/Invoking-DIRMNGR.html]. See [https://www.gnupg.org/documentation/manuals/gnupg/Dirmngr-Options.html Dirmngr Options] for possible options.<br />
<br />
These two configuration files cover the common usecases, but there are more auxiliary programs in the GnuPG suite with their own options. See the [https://www.gnupg.org/documentation/manuals/gnupg/index.html GnuPG manual] for a comprehensive list.<br />
<br />
Create the desired file(s), and set their permissions to {{ic|600}} as discussed in [[#Home directory]].<br />
<br />
Add to these files any long options you want. Do not write the two dashes, but simply the name of the option and required arguments. For example, to make GnuPG always use a keyring at a specific path, as if it was invoked as {{ic|gpg --no-default-keyring --keyring ''keyring-path'' ...}}:<br />
<br />
{{hc|''gnupg_home''/gpg.conf (or /etc/gnupg/gpg.conf)|<br />
no-default-keyring<br />
keyring ''keyring-path''<br />
}}<br />
<br />
Other examples are found in [[#See also]].<br />
<br />
Additionally, [[pacman]] uses a different set of configuration files for package signature verification. See [[Pacman/Package signing]] for details.<br />
<br />
=== Default options for new users ===<br />
<br />
If you want to setup some default options for new users, put configuration files in {{ic|/etc/skel/.gnupg/}}. When the new user is added in system, files from here will be copied to its GnuPG home directory. There is also a simple script called ''addgnupghome'' which you can use to create new GnuPG home directories for existing users:<br />
<br />
# addgnupghome user1 user2<br />
<br />
This will add the respective {{ic|/home/user1/.gnupg/}} and {{ic|/home/user2/.gnupg/}} and copy the files from the skeleton directory to it. Users with existing GnuPG home directory are simply skipped.<br />
<br />
== Usage ==<br />
<br />
{{Note|<br />
* Whenever a ''{{ic|user-id}}'' is required in a command, it can be specified with your key ID, fingerprint, a part of your name or email address, etc. GnuPG is flexible on this.<br />
* Whenever a {{ic|''key-id''}} is needed, it can be found adding the {{ic|1=--keyid-format=long}} flag to the command. To show the master secret key for example, run {{ic|1=gpg --list-secret-keys --keyid-format=long ''user-id''}}, the ''key-id'' is the hexadecimal hash provided on the same line as ''sec''.<br />
}}<br />
<br />
=== Create a key pair ===<br />
<br />
Generate a key pair by typing in a terminal:<br />
<br />
$ gpg --full-gen-key<br />
<br />
Also add the {{ic|--expert}} option to the command line to access more ciphers and in particular the newer ECC cipher ([[Wikipedia:Elliptic-curve cryptography]]).<br />
<br />
The command will prompt for answers to several questions. For general use most people will want: <br />
<br />
* The default ''RSA and RSA'' for sign and encrypt keys.<br />
* A keysize of the default 3072 value. A larger keysize of 4096 "gives us almost nothing, while costing us quite a lot" (see [https://www.gnupg.org/faq/gnupg-faq.html#no_default_of_rsa4096 why doesn’t GnuPG default to using RSA-4096]).<br />
* An expiration date: a period of one year is good enough for the average user. This way even if access is lost to the keyring, it will allow others to know that it is no longer valid. At a later stage, if necessary, the expiration date can be extended without having to re-issue a new key.<br />
* Your name and email address. You can add multiple identities to the same key later (''e.g.'', if you have multiple email addresses you want to associate with this key).<br />
* ''no'' optional comment. Since the semantics of the comment field are [https://lists.gnupg.org/pipermail/gnupg-devel/2015-July/030150.html not well-defined], it has limited value for identification.<br />
* A secure passphrase, find some guidelines in [[Security#Choosing secure passwords]].<br />
<br />
{{Note|The name and email address you enter here will be seen by anybody who imports your key.}}<br />
<br />
{{Tip|The simpler {{ic|--gen-key}} option uses default parameters for the key cipher, size and expiry and only asks for ''real name'' and ''email address''.}}<br />
<br />
=== List keys ===<br />
<br />
To list keys in your public key ring:<br />
<br />
$ gpg --list-keys<br />
<br />
To list keys in your secret key ring:<br />
<br />
$ gpg --list-secret-keys<br />
<br />
=== Export your public key ===<br />
<br />
GnuPG's main usage is to ensure confidentiality of exchanged messages via public-key cryptography. With it each user distributes the public key of their keyring, which can be used by others to encrypt messages to the user. The private key must ''always'' be kept private, otherwise confidentiality is broken. See [[Wikipedia:Public-key cryptography]] for examples about the message exchange. <br />
<br />
So, in order for others to send encrypted messages to you, they need your public key. <br />
<br />
To generate an ASCII version of a user's public key to file {{ic|''public-key''.asc}} (e.g. to distribute it by e-mail):<br />
<br />
$ gpg --export --armor --output ''public-key''.asc ''user-id''<br />
<br />
Alternatively, or in addition, you can [[#Use a keyserver]] to share your key. <br />
<br />
{{Tip|<br />
* Add {{ic|--no-emit-version}} to avoid printing the version number, or add the corresponding setting to your configuration file.<br />
* You can omit the {{ic|user-id}} to export all public keys within your keyring. This is useful if you want to share multiple identities at once, or for importing in another application, e.g. [[Thunderbird#Use OpenPGP with external GnuPG|Thunderbird]].<br />
}}<br />
<br />
=== Import a public key ===<br />
<br />
In order to encrypt messages to others, as well as verify their signatures, you need their public key. To import a public key with file name {{ic|''public.key''}} to your public key ring:<br />
<br />
$ gpg --import ''public-key''.asc<br />
<br />
Alternatively, [[#Use a keyserver]] to find a public key.<br />
<br />
If you wish to import a key ID to install a specific Arch Linux package, see [[pacman/Package signing#Managing the keyring]] and [[Makepkg#Signature checking]].<br />
<br />
=== Use a keyserver ===<br />
<br />
==== Sending keys ====<br />
<br />
You can register your key with a public PGP key server, so that others can retrieve it without having to contact you directly:<br />
<br />
$ gpg --send-keys ''key-id''<br />
<br />
{{Warning|Once a key has been submitted to a keyserver, it cannot be deleted from the server. The reason is explained in the [https://pgp.mit.edu/faq.html MIT PGP Public Key Server FAQ].}}<br />
{{Note|The associated email address, once published publicly, could be the target of spammers and in this case anti-spam filtering may be necessary.}}<br />
<br />
==== Searching and receiving keys ====<br />
<br />
To find out details of a key on the keyserver, without importing it, do:<br />
<br />
$ gpg --search-keys ''user-id''<br />
<br />
To import a key from a key server:<br />
<br />
$ gpg --recv-keys ''key-id''<br />
<br />
{{Warning|<br />
* You should verify the authenticity of the retrieved public key by comparing its fingerprint with one that the owner published on an independent source(s) (e.g., contacting the person directly). See [[Wikipedia:Public key fingerprint]] for more information.<br />
* It is recommended to use the long key ID or the full fingerprint when receiving a key. Using a short ID may encounter collisions. All keys will be imported that have the short ID, see [https://lore.kernel.org/lkml/20160815153401.9EC2BADC2C@smtp.postman.i2p/ fake keys found in the wild] for such example.<br />
}}<br />
<br />
{{Tip|Adding {{ic|auto-key-retrieve}} to the [[#Configuration files|GPG configuration file]] will automatically fetch keys from the key server as needed. This is not a compromise on security, but it can be considered a '''privacy violation'''; see "web bug" in {{man|1|gpg}}.}}<br />
<br />
==== Key servers ====<br />
<br />
The most common keyservers are:<br />
<br />
* [https://keyserver.ubuntu.com Ubuntu Keyserver]: federated, no verification, keys cannot be deleted.<br />
* [https://keys.mailvelope.com Mailvelope Keyserver]: central, verification of email IDs, keys can be deleted.<br />
* [https://keys.openpgp.org keys.openpgp.org]: central, verification of email IDs, keys can be deleted, no third-party signatures (i.e. no Web of Trust support).<br />
<br />
More are listed at [[Wikipedia:Key server (cryptographic)#Keyserver examples]].<br />
<br />
An alternative key server can be specified with the {{ic|keyserver}} option in one of the [[#Configuration files]], for instance:<br />
{{hc|~/.gnupg/dirmngr.conf|<br />
keyserver hkp://keyserver.ubuntu.com<br />
}}<br />
A temporary use of another server is handy when the regular one does not work as it should. It can be achieved by, for example,<br />
<br />
$ gpg --keyserver ''hkps://keys.openpgp.org/'' --search-keys ''user-id''<br />
<br />
{{Tip|<br />
* If receiving fails with the message {{ic|gpg: keyserver receive failed: General error}}, and you use the default hkps keyserver pool, make sure set the HKPS pool verification certificate with {{ic|hkp-cacert /usr/share/gnupg/sks-keyservers.netCA.pem}} in your {{ic|dirmngr.conf}} and kill the old dirmngr process.<br />
* If receiving fails with the message {{ic|gpg: keyserver receive failed: Connection refused}}, try using a different DNS server.<br />
* You can connect to the keyserver over [[Tor]] with [[Tor#Torsocks]]. Or using the {{ic|--use-tor}} command line option. See [https://gnupg.org/blog/20151224-gnupg-in-november-and-december.html] for more information.<br />
* You can connect to a keyserver using a proxy by setting the {{ic|http_proxy}} [[environment variable]] and setting {{ic|honor-http-proxy}} in {{ic|dirmngr.conf}}. Alternatively, set {{ic|http-proxy ''host[:port]''}} in the configuration file to override the environment variable of the same name. [[Restart]] the {{ic|dirmngr.service}} [[systemd/User|user service]] for the changes to take effect.}}<br />
<br />
=== Web Key Directory ===<br />
<br />
The Web Key Service (WKS) protocol is a new [https://datatracker.ietf.org/doc/draft-koch-openpgp-webkey-service/ standard] for key distribution, where the email domain provides its own key server called [https://wiki.gnupg.org/WKD Web Key Directory (WKD)]. When encrypting to an email address (e.g. {{ic|user@example.com}}), GnuPG (>=2.1.16) will query the domain ({{ic|example.com}}) via HTTPS for the public OpenPGP key if it is not already in the local keyring. The option {{ic|auto-key-locate}} will locate a key using the WKD protocol if there is no key on the local keyring for this email address.<br />
<br />
# gpg --recipient ''user@example.org'' --auto-key-locate --encrypt ''doc''<br />
<br />
See the [https://wiki.gnupg.org/WKD#Implementations GnuPG Wiki] for a list of email providers that support WKD. If you control the domain of your email address yourself, you can follow [https://wiki.gnupg.org/WKDHosting this guide] to enable WKD for your domain. To check if your key can be found in the WKD you can use [https://metacode.biz/openpgp/web-key-directory this webinterface].<br />
<br />
=== Encrypt and decrypt ===<br />
<br />
==== Asymmetric ====<br />
<br />
You need to [[#Import a public key]] of a user before encrypting (option {{ic|-e}}/{{ic|--encrypt}}) a file or message to that recipient (option {{ic|-r}}/{{ic|--recipient}}). Additionally you need to [[#Create a key pair]] if you have not already done so.<br />
<br />
To encrypt a file with the name ''doc'', use:<br />
<br />
$ gpg --recipient ''user-id'' --encrypt ''doc''<br />
<br />
To decrypt (option {{ic|-d}}/{{ic|--decrypt}}) a file with the name ''doc''.gpg encrypted with your public key, use:<br />
<br />
$ gpg --output ''doc'' --decrypt ''doc''.gpg<br />
<br />
''gpg'' will prompt you for your passphrase and then decrypt and write the data from ''doc''.gpg to ''doc''. If you omit the {{ic|-o}}/{{ic|--output}} option, ''gpg'' will write the decrypted data to stdout.<br />
<br />
{{Tip|<br />
* Add {{ic|--armor}} to encrypt a file using ASCII armor, suitable for copying and pasting a message in text format.<br />
* Use {{ic|-R ''user-id''}} or {{ic|--hidden-recipient ''user-id''}} instead of {{ic|-r}} to not put the recipient key IDs in the encrypted message. This helps to hide the receivers of the message and is a limited countermeasure against traffic analysis.<br />
* Add {{ic|--no-emit-version}} to avoid printing the version number, or add the corresponding setting to your configuration file.<br />
* You can use GnuPG to encrypt your sensitive documents by using your own user-id as recipient or by using the {{ic|--default-recipient-self}} flag; however, you can only do this one file at a time, although you can always tarball various files and then encrypt the tarball. See also [[Data-at-rest encryption#Available methods]] if you want to encrypt directories or a whole file-system.}}<br />
<br />
==== Symmetric ====<br />
<br />
Symmetric encryption does not require the generation of a key pair and can be used to simply encrypt data with a passphrase. Simply use {{ic|-c}}/{{ic|--symmetric}} to perform symmetric encryption:<br />
<br />
$ gpg -c ''doc''<br />
<br />
The following example:<br />
<br />
* Encrypts {{ic|''doc''}} with a symmetric cipher using a passphrase<br />
* Uses the AES-256 cipher algorithm to encrypt the data<br />
* Uses the SHA-512 digest algorithm to mangle the passphrase and generate the encryption key<br />
* Mangles the passphrase for 65536 iterations<br />
<br />
$ gpg -c --s2k-cipher-algo AES256 --s2k-digest-algo SHA512 --s2k-count 65536 ''doc''<br />
<br />
To decrypt a symmetrically encrypted {{ic|''doc''.gpg}} using a passphrase and output decrypted contents into the same directory as {{ic|''doc''}} do:<br />
<br />
$ gpg --output ''doc'' --decrypt ''doc''.gpg<br />
<br />
==== Directory ====<br />
<br />
Encrypting/decrypting a directory can be done with {{man|1|gpgtar}}.<br />
<br />
Encrypt:<br />
$ gpgtar -c -o ''dir''.gpg ''dir''<br />
<br />
Decrypt:<br />
$ gpgtar -d ''dir''.gpg<br />
<br />
== Key maintenance ==<br />
<br />
=== Backup your private key ===<br />
<br />
To backup your private key do the following:<br />
<br />
$ gpg --export-secret-keys --armor --output ''private-key''.asc ''user-id''<br />
<br />
Note the above command will require that you enter the passphrase for the key. This is because otherwise anyone who gains access to the above exported file would be able to encrypt and sign documents as if they were you ''without'' needing to know your passphrase. <br />
<br />
{{Warning|<br />
* The passphrase is usually the weakest link in protecting your secret key. Place the private key in a safe place on a different system/device, such as a locked container or encrypted drive. It is the only safety you have to regain control to your keyring in case of, for example, a drive failure, theft or worse.<br />
* This method of backing up key has some security limitations. See https://web.archive.org/web/20210803213236/https://habd.as/post/moving-gpg-keys-privately/ for a more secure way to back up and import key using ''gpg''.<br />
}}<br />
<br />
To import the backup of your private key:<br />
<br />
$ gpg --import ''private-key''.asc<br />
<br />
{{Tip|[[Paperkey]] can be used to export private keys as human readable text or machine readable barcodes that can be printed on paper and archived.}}<br />
<br />
=== Backup your revocation certificate ===<br />
<br />
Revocation certificates are automatically generated for newly generated keys. These are by default located in {{ic|~/.gnupg/openpgp-revocs.d/}}. The filename of the certificate is the fingerprint of the key it will revoke.<br />
The revocation certificates can also be generated manually by the user later using:<br />
<br />
$ gpg --gen-revoke --armor --output ''revcert''.asc ''user-id''<br />
<br />
This certificate can be used to [[#Revoke a key]] if it is ever lost or compromised. The backup will be useful if you have no longer access to the secret key and are therefore not able to generate a new revocation certificate with the above command. It is short enough to be printed out and typed in by hand if necessary.<br />
<br />
{{Warning|Anyone with access to the revocation certificate can revoke the key publicly, this action cannot be undone. Protect your revocation certificate like you protect your secret key.}}<br />
<br />
=== Edit your key ===<br />
<br />
Running the {{ic|gpg --edit-key ''user-id''}} command will present a menu which enables you to do most of your key management related tasks.<br />
<br />
Type {{ic|help}} in the edit key sub menu to show the complete list of commands. Some useful ones:<br />
<br />
> passwd # change the passphrase<br />
> clean # compact any user ID that is no longer usable (e.g revoked or expired)<br />
> revkey # revoke a key<br />
> addkey # add a subkey to this key<br />
> expire # change the key expiration time<br />
> adduid # add additional names, comments, and email addresses<br />
> addphoto # add photo to key (must be JPG, 240x288 recommended, enter full path to image when prompted)<br />
<br />
{{Tip|If you have multiple email accounts you can add each one of them as an identity, using {{ic|adduid}} command. You can then set your favourite one as {{ic|primary}}.}}<br />
<br />
=== Exporting subkey ===<br />
<br />
If you plan to use the same key across multiple devices, you may want to strip out your master key and only keep the bare minimum encryption subkey on less secure systems.<br />
<br />
First, find out which subkey you want to export.<br />
<br />
$ gpg --list-secret-keys --with-subkey-fingerprint<br />
<br />
Select only that subkey to export.<br />
<br />
$ gpg -a --export-secret-subkeys [subkey id]! > /tmp/subkey.gpg<br />
<br />
{{Warning|If you forget to add the !, all of your subkeys will be exported.}}<br />
<br />
At this point you could stop, but it is most likely a good idea to change the passphrase as well. Import the key into a temporary folder. <br />
<br />
$ gpg --homedir /tmp/gpg --import /tmp/subkey.gpg<br />
$ gpg --homedir /tmp/gpg --edit-key ''user-id''<br />
> passwd<br />
> save<br />
$ gpg --homedir /tmp/gpg -a --export-secret-subkeys ''[subkey id]''! > /tmp/subkey.altpass.gpg<br />
<br />
{{Note|You will get a warning that the master key was not available and the password was not changed, but that can safely be ignored as the subkey password was.}}<br />
<br />
At this point, you can now use {{ic|/tmp/subkey.altpass.gpg}} on your other devices.<br />
<br />
=== Extending expiration date ===<br />
<br />
{{Warning|'''Never''' delete your expired or revoked subkeys unless you have a good reason. Doing so will cause you to lose the ability to decrypt files encrypted with the old subkey. Please '''only''' delete expired or revoked keys from other users to clean your keyring.}}<br />
<br />
It is good practice to set an expiration date on your subkeys, so that if you lose access to the key (e.g. you forget the passphrase) the key will not continue to be used indefinitely by others. When the key expires, it is relatively straight-forward to extend the expiration date:<br />
<br />
$ gpg --edit-key ''user-id''<br />
> expire<br />
<br />
You will be prompted for a new expiration date, as well as the passphrase for your secret key, which is used to sign the new expiration date.<br />
<br />
Repeat this for any further subkeys that have expired:<br />
<br />
> key 1<br />
> expire<br />
<br />
Finally, save the changes and quit:<br />
<br />
> save<br />
<br />
Update it to a keyserver.<br />
<br />
$ gpg --keyserver keyserver.ubuntu.com --send-keys ''key-id''<br />
<br />
Alternatively, if you use this key on multiple computers, you can export the public key (with new signed expiration dates) and import it on those machines:<br />
<br />
$ gpg --export --output pubkey.gpg ''user-id''<br />
$ gpg --import pubkey.gpg<br />
<br />
There is no need to re-export your secret key or update your backups: the master secret key itself never expires, and the signature of the expiration date left on the public key and subkeys is all that is needed.<br />
<br />
=== Rotating subkeys ===<br />
<br />
{{Warning|'''Never''' delete your expired or revoked subkeys unless you have a good reason. Doing so will cause you to lose the ability to decrypt files encrypted with the old subkey. Please '''only''' delete expired or revoked keys from other users to clean your keyring.}}<br />
<br />
Alternatively, if you prefer to stop using subkeys entirely once they have expired, you can create new ones. Do this a few weeks in advance to allow others to update their keyring.<br />
<br />
{{Tip|You do not need to create a new key simply because it is expired. You can extend the expiration date, see the section [[#Extending expiration date]].}}<br />
<br />
Create new subkey (repeat for both signing and encrypting key)<br />
<br />
$ gpg --edit-key ''user-id''<br />
> addkey<br />
<br />
And answer the following questions it asks (see [[#Create a key pair]] for suggested settings).<br />
<br />
Save changes<br />
<br />
> save<br />
<br />
Update it to a keyserver.<br />
<br />
$ gpg --keyserver ''pgp.mit.edu'' --send-keys ''user-id''<br />
<br />
You will also need to export a fresh copy of your secret keys for backup purposes. See the section [[#Backup your private key]] for details on how to do this.<br />
<br />
{{Tip|Revoking expired subkeys is unnecessary and arguably bad form. If you are constantly revoking keys, it may cause others to lack confidence in you.}}<br />
<br />
=== Revoke a key ===<br />
<br />
Key revocation should be performed if the key is compromised, superseded, no longer used, or you forget your passphrase. This is done by merging the key with the revocation certificate of the key.<br />
<br />
If you have no longer access to your keypair, first [[#Import a public key]] to import your own key.<br />
Then, to revoke the key, import the file saved in [[#Backup your revocation certificate]]:<br />
<br />
$ gpg --import ''revcert''.asc<br />
<br />
Now the revocation needs to be made public. [[#Use a keyserver]] to send the revoked key to a public PGP server if you used one in the past, otherwise, export the revoked key to a file and distribute it to your communication partners.<br />
<br />
== Signatures ==<br />
<br />
Signatures certify and timestamp documents. If the document is modified, verification of the signature will fail. Unlike encryption which uses public keys to encrypt a document, signatures are created with the user's private key. The recipient of a signed document then verifies the signature using the sender's public key.<br />
<br />
=== Create a signature ===<br />
<br />
==== Sign a file ====<br />
<br />
To sign a file use the {{ic|-s}}/{{ic|--sign}} flag:<br />
<br />
$ gpg --output ''doc''.sig --sign ''doc''<br />
<br />
{{ic|''doc''.sig}} contains both the compressed content of the original file {{ic|''doc''}} and the signature in a binary format, but the file is not encrypted. However, you can combine signing with [[#Encrypt and decrypt|encrypting]].<br />
<br />
==== Clearsign a file or message ====<br />
<br />
To sign a file without compressing it into binary format use:<br />
<br />
$ gpg --output ''doc''.sig --clearsign ''doc''<br />
<br />
Here both the content of the original file {{ic|''doc''}} and the signature are stored in human-readable form in {{ic|''doc''.sig}}.<br />
<br />
==== Make a detached signature ====<br />
<br />
To create a separate signature file to be distributed separately from the document or file itself, use the {{ic|--detach-sig}} flag:<br />
<br />
$ gpg --output ''doc''.sig --detach-sig ''doc''<br />
<br />
Here the signature is stored in {{ic|''doc''.sig}}, but the contents of {{ic|''doc''}} are not stored in it. This method is often used in distributing software projects to allow users to verify that the program has not been modified by a third party.<br />
<br />
=== Verify a signature ===<br />
<br />
To verify a signature use the {{ic|--verify}} flag:<br />
<br />
$ gpg --verify ''doc''.sig<br />
<br />
where {{ic|''doc''.sig}} is the signed file containing the signature you wish to verify.<br />
<br />
If you are verifying a detached signature, both the signed data file and the signature file must be present when verifying. For example, to verify Arch Linux's latest iso you would do:<br />
<br />
$ gpg --verify archlinux-''version''.iso.sig<br />
<br />
where {{ic|archlinux-''version''.iso}} must be located in the same directory.<br />
<br />
You can also specify the signed data file with a second argument:<br />
<br />
$ gpg --verify archlinux-''version''.iso.sig ''/path/to/''archlinux-''version''.iso<br />
<br />
If a file has been encrypted in addition to being signed, simply [[#Encrypt and decrypt|decrypt]] the file and its signature will also be verified.<br />
<br />
== gpg-agent ==<br />
<br />
''gpg-agent'' is mostly used as daemon to request and cache the password for the keychain. This is useful if GnuPG is used from an external program like a mail client. {{Pkg|gnupg}} comes with [[systemd/User|systemd user]] sockets which are enabled by default. These sockets are {{ic|gpg-agent.socket}}, {{ic|gpg-agent-extra.socket}}, {{ic|gpg-agent-browser.socket}}, {{ic|gpg-agent-ssh.socket}}, and {{ic|dirmngr.socket}}.<br />
<br />
* The main {{ic|gpg-agent.socket}} is used by ''gpg'' to connect to the ''gpg-agent'' daemon.<br />
* The intended use for the {{ic|gpg-agent-extra.socket}} on a local system is to set up a Unix domain socket forwarding from a remote system. This enables to use ''gpg'' on the remote system without exposing the private keys to the remote system. See {{man|1|gpg-agent}} for details.<br />
* The {{ic|gpg-agent-browser.socket}} allows web browsers to access the ''gpg-agent'' daemon.<br />
* The {{ic|gpg-agent-ssh.socket}} can be used by [[SSH]] to cache [[SSH keys]] added by the ''ssh-add'' program. See [[#SSH agent]] for the necessary configuration.<br />
* The {{ic|dirmngr.socket}} starts a GnuPG daemon handling connections to keyservers.<br />
<br />
{{Note|If you use non-default GnuPG [[#Home directory]], you will need to [[edit]] all socket files to use the values of {{ic|gpgconf --list-dirs}}. The socket names use the hash of the non-default GnuPG home directory [https://github.com/gpg/gnupg/blob/260bbb4ab27eab0a8d4fb68592b0d1c20d80179c/common/homedir.c#L710-L713], so you can hardcode it without worrying about it changing.}}<br />
<br />
=== Configuration ===<br />
<br />
gpg-agent can be configured via {{ic|~/.gnupg/gpg-agent.conf}} file. The configuration options are listed in {{man|1|gpg-agent}}. For example you can change cache ttl for unused keys:<br />
<br />
{{hc|~/.gnupg/gpg-agent.conf|<br />
default-cache-ttl 3600<br />
}}<br />
<br />
{{Tip|1=<br />
To cache your passphrase for the whole session, please run the following command:<br />
<br />
$ /usr/lib/gnupg/gpg-preset-passphrase --preset XXXXX<br />
<br />
where XXXXX is the keygrip. You can get its value when running {{ic|gpg --with-keygrip -K}}. The passphrase will be stored until {{ic|gpg-agent}} is restarted. If you set up {{ic|default-cache-ttl}} value, it will take precedence.<br />
}}<br />
<br />
=== Reload the agent ===<br />
<br />
After changing the configuration, reload the agent using ''gpg-connect-agent'':<br />
<br />
$ gpg-connect-agent reloadagent /bye<br />
<br />
The command should print {{ic|OK}}.<br />
<br />
However in some cases only the restart may not be sufficient, like when {{ic|keep-screen}} has been added to the agent configuration.<br />
In this case you firstly need to kill the ongoing gpg-agent process and then you can restart it as was explained above.<br />
<br />
=== pinentry ===<br />
<br />
{{ic|gpg-agent}} can be configured via the {{ic|pinentry-program}} stanza to use a particular {{Pkg|pinentry}} user interface when prompting the user for a passphrase. For example:<br />
{{hc|~/.gnupg/gpg-agent.conf|<br />
pinentry-program /usr/bin/pinentry-curses<br />
}}<br />
<br />
There are other pinentry programs that you can choose from - see {{ic|pacman -Ql pinentry {{!}} grep /usr/bin/}}.<br />
<br />
{{Tip|<br />
* In order to use {{ic|/usr/bin/pinentry-kwallet}} you have to install the {{AUR|kwalletcli}} package.<br />
* {{ic|/usr/bin/pinentry-gtk-2}} and {{ic|/usr/bin/pinentry-gnome3}} support the [https://specifications.freedesktop.org/secret-service/ DBus Secret Service API], which allows for remembering passwords via a compliant manager such as [[GNOME Keyring]] or [[KeePass#Secret Service|KeePassXC]].<br />
}}<br />
<br />
Remember to [[#Reload the agent|reload the agent]] after making changes to the configuration.<br />
<br />
=== Cache passwords ===<br />
<br />
{{ic|max-cache-ttl}} and {{ic|default-cache-ttl}} defines how many seconds gpg-agent should cache the passwords. To enter a password once a session, set them to something very high, for instance:<br />
<br />
{{hc|gpg-agent.conf|<br />
max-cache-ttl 60480000<br />
default-cache-ttl 60480000<br />
}}<br />
<br />
For password caching in SSH emulation mode, set {{ic|default-cache-ttl-ssh}} and {{ic|max-cache-ttl-ssh}} instead, for example:<br />
<br />
{{hc|gpg-agent.conf|<br />
default-cache-ttl-ssh 60480000<br />
max-cache-ttl-ssh 60480000<br />
}}<br />
<br />
=== Unattended passphrase ===<br />
<br />
Starting with GnuPG 2.1.0 the use of gpg-agent and pinentry is required, which may break backwards compatibility for passphrases piped in from STDIN using the {{ic|--passphrase-fd 0}} commandline option. In order to have the same type of functionality as the older releases two things must be done:<br />
<br />
First, edit the gpg-agent configuration to allow ''loopback'' pinentry mode:<br />
<br />
{{hc|~/.gnupg/gpg-agent.conf|<br />
allow-loopback-pinentry<br />
}}<br />
<br />
[[#Reload the agent|Reload the agent]] if it is running to let the change take effect.<br />
<br />
Second, either the application needs to be updated to include a commandline parameter to use loopback mode like so:<br />
<br />
$ gpg --pinentry-mode loopback ...<br />
<br />
...or if this is not possible, add the option to the configuration:<br />
<br />
{{hc|~/.gnupg/gpg.conf|<br />
pinentry-mode loopback<br />
}}<br />
<br />
{{Note|The upstream author indicates setting {{ic|pinentry-mode loopback}} in {{ic|gpg.conf}} may break other usage, using the commandline option should be preferred if at all possible. [https://dev.gnupg.org/T1772]}}<br />
<br />
=== SSH agent ===<br />
<br />
''gpg-agent'' has OpenSSH agent emulation. If you already use the GnuPG suite, you might consider using its agent to also cache your [[SSH keys]]. Additionally, some users may prefer the PIN entry dialog GnuPG agent provides as part of its passphrase management.<br />
<br />
==== Set SSH_AUTH_SOCK ====<br />
<br />
<br />
[[Environment variables#Per user|Set]] the following variables to communicate with ''gpg-agent'' instead of the default ''ssh-agent''.<br />
<br />
{{bc|1=<br />
SSH_AGENT_PID=""<br />
SSH_AUTH_SOCK="${XDG_RUNTIME_DIR}/gnupg/S.gpg-agent.ssh"<br />
}}<br />
<br />
{{Note|<br />
* If you are using a script to manage your variables, you may also unset {{ic|SSH_AGENT_PID}} rather than setting it to {{ic|""}}, via {{ic|unset SSH_AGENT_PID}}.<br />
* If you set your {{ic|SSH_AUTH_SOCK}} manually, keep in mind that your socket location may be different if you are using a custom {{ic|GNUPGHOME}}. You can use the following bash example, or change {{ic|SSH_AUTH_SOCK}} to the value of {{ic|gpgconf --list-dirs agent-ssh-socket}}.<br />
* If GNOME Keyring is installed, it is necessary to [[GNOME/Keyring#Disable keyring daemon components|deactivate]] its ssh component. Otherwise, it will overwrite {{ic|SSH_AUTH_SOCK}}.<br />
}}<br />
<br />
Alternatively, depend on Bash. This works for non-standard socket locations as well:<br />
<br />
{{hc|~/.bashrc|2=<br />
unset SSH_AGENT_PID<br />
if [ "${gnupg_SSH_AUTH_SOCK_by:-0}" -ne $$ ]; then<br />
export SSH_AUTH_SOCK="$(gpgconf --list-dirs agent-ssh-socket)"<br />
fi<br />
}}<br />
<br />
{{Note|1=The test involving the {{ic|gnupg_SSH_AUTH_SOCK_by}} variable is for the case where the agent is started as {{ic|gpg-agent --daemon /bin/sh}}, in which case the shell inherits the {{ic|SSH_AUTH_SOCK}} variable from the parent, ''gpg-agent'' [https://git.gnupg.org/cgi-bin/gitweb.cgi?p=gnupg.git;a=blob;f=agent/gpg-agent.c;hb=7bca3be65e510eda40572327b87922834ebe07eb#l1307].}}<br />
<br />
==== Configure pinentry to use the correct TTY ====<br />
<br />
Also set the GPG_TTY and refresh the TTY in case user has switched into an X session as stated in {{man|1|gpg-agent}}. For example:<br />
<br />
{{hc|~/.bashrc|2=<br />
export GPG_TTY=$(tty)<br />
gpg-connect-agent updatestartuptty /bye >/dev/null<br />
}}<br />
<br />
If you use multiple terminals simultaneously and want ''gpg-agent'' to ask for passphrase via ''pinentry-curses'' from the same terminal where the ''ssh'' command was run, add the following to the SSH configuration file. This will make the TTY to be refreshed every time an ''ssh'' command is run [https://unix.stackexchange.com/a/499133]:<br />
<br />
{{hc|~/.ssh/config|2=<br />
Match host * exec "gpg-connect-agent UPDATESTARTUPTTY /bye"<br />
}}<br />
<br />
Note that GPG_TTY environment variable has to be set for this to work.<br />
<br />
==== Add SSH keys ====<br />
<br />
Once ''gpg-agent'' is running you can use ''ssh-add'' to approve keys, following the same steps as for [[SSH keys#ssh-agent|ssh-agent]]. The list of approved keys is stored in the {{ic|~/.gnupg/sshcontrol}} file. <br />
<br />
Once your key is approved, you will get a ''pinentry'' dialog every time your passphrase is needed. For password caching see [[#Cache passwords]].<br />
<br />
==== Using a PGP key for SSH authentication ====<br />
<br />
You can also use your PGP key as an SSH key. This requires a key with the {{ic|Authentication}} capability (see [[#Custom capabilities]]). There are various benefits gained by using a PGP key for SSH authentication, including:<br />
<br />
* Reduced key maintenance, as you will no longer need to maintain an SSH key.<br />
* The ability to store the authentication key on a smartcard. GnuPG will automatically detect the key when the card is available, and add it to the agent (check with {{ic|ssh-add -l}} or {{ic|ssh-add -L}}). The comment for the key should be something like: {{ic|openpgp:''key-id''}} or {{ic|cardno:''card-id''}}. <br />
<br />
To retrieve the public key part of your GPG/SSH key, run {{ic|gpg --export-ssh-key ''gpg-key''}}. If your key is authentication-capable but this command still fails with "Unusable public key", add a {{ic|!}} suffix ([https://dev.gnupg.org/T2957]). <br />
<br />
Unless you have your GPG key on a keycard, you need to add your key to {{ic|$GNUPGHOME/sshcontrol}} to be recognized as a SSH key. If your key is on a keycard, its keygrip is added to {{ic|sshcontrol}} implicitly. If not, get the keygrip of your key this way:<br />
<br />
{{hc|$ gpg --list-keys --with-keygrip|2=<br />
sub rsa4096 2018-07-25 [A]<br />
Keygrip = ''1531C8084D16DC4C36911F1585AF0ACE7AAFD7E7''<br />
}}<br />
<br />
Then edit {{ic|sshcontrol}} like this. Adding the keygrip is a one-time action; you will not need to edit the file again, unless you are adding additional keys.<br />
<br />
{{hc|$GNUPGHOME/sshcontrol|<br />
''1531C8084D16DC4C36911F1585AF0ACE7AAFD7E7''<br />
}}<br />
<br />
=== Forwarding gpg-agent and ssh-agent to remote ===<br />
<br />
It is possible to forward one's gpg-agent to a remote machine by forwarding gpg sockets to the remote machine, as explained by the [https://wiki.gnupg.org/AgentForwarding GnuPG wiki].<br />
<br />
First, add the following line to {{ic|/etc/ssh/sshd_config}} on the remote machine to enable automatic removal of stale sockets on connect. Without this, the socket(s) on the remote machine will need to removed manually before connecting with forwarding enabled for agent forwarding to work:<br />
<br />
{{hc|/etc/ssh/sshd_config|<br />
...<br />
StreamLocalBindUnlink yes<br />
...<br />
}}<br />
<br />
{{Note|You will have to invoke {{ic|systemctl reload sshd}} on the remote machine for the new configuration to be loaded by sshd.}}<br />
<br />
On the client, use the {{ic|RemoteForward}} SSH directive to forward traffic destined for a remote port, to a port on your local host. As described in {{Man|5|ssh_config|RemoteForward}}, this directive's parameters are the listening socket path on the remote, and then the destination socket path on the local host. Your configuration should look something like this:<br />
<br />
{{hc|$HOME/.ssh/config|<br />
Host ''remote_name''<br />
...<br />
RemoteForward ''remote_agent_socket'' ''local_agent_extra_socket''<br />
RemoteForward ''remote_agent_ssh_socket'' ''local_agent_ssh_socket''<br />
}}<br />
<br />
The first line configures gpg-agent forwarding:<br />
<br />
* ''remote_agent_socket'' is the output of {{ic|gpgconf --list-dir agent-socket}} on the remote host.<br />
* ''local_agent_extra_socket'' is {{ic|gpgconf --list-dir agent-extra-socket}} on the local host.<br />
<br />
The second line is optional. It configures ssh-agent forwarding:<br />
<br />
* ''local_agent_ssh_socket'' is {{ic|gpgconf --list-dir agent-ssh-socket}} on the remote host.<br />
* ''remote_agent_ssh_socket'' is {{ic|gpgconf --list-dir agent-ssh-socket}} on the local host.<br />
<br />
{{Note|If using ssh-agent forwarding, the remote should have {{ic|SSH_AUTH_SOCK}} set to the output of {{ic|gpgconf --list-dir agent-ssh-socket}} as mentioned in [[#SSH agent]]).}}<br />
<br />
So, with the default paths, it would be:<br />
{{bc|<br />
RemoteForward /run/user/1000/gnupg/S.gpg-agent /run/user/1000/gnupg/S.gpg-agent.extra<br />
RemoteForward /run/user/1000/gnupg/S.gpg-agent.ssh {{ic|/run/user/1000/gnupg/S.gpg-agent.ssh}}<br />
}}<br />
<br />
With this configuration in place, invoking {{ic|ssh myremote}} should automatically forward the gpg-agent to the remote, and allow the use of your gpg key(s) for both decryption/signing (and allows the use of ssh-agent with gpg if the second {{ic|RemoteForward}} line is included).<br />
<br />
== Smartcards ==<br />
<br />
GnuPG uses ''scdaemon'' as an interface to your smartcard reader, please refer to the [[man page]] {{man|1|scdaemon}} for details.<br />
<br />
=== GnuPG only setups ===<br />
<br />
{{Note| To allow scdaemon direct access to USB smartcard readers the optional dependency {{Pkg|libusb-compat}} must be installed}}<br />
<br />
If you do not plan to use other cards but those based on GnuPG, you should check the {{Ic|reader-port}} parameter in {{ic|~/.gnupg/scdaemon.conf}}. The value '0' refers to the first available serial port reader and a value of '32768' (default) refers to the first USB reader.<br />
<br />
=== GnuPG with pcscd (PCSC Lite) ===<br />
<br />
{{man|8|pcscd}} is a daemon which handles access to smartcard (SCard API). If GnuPG's scdaemon fails to connect the smartcard directly (e.g. by using its integrated CCID support), it will fallback and try to find a smartcard using the PCSC Lite driver.<br />
<br />
To use pscsd [[install]] {{Pkg|pcsclite}} and {{Pkg|ccid}}. Then [[start]] and/or [[enable]] {{ic|pcscd.service}}. Alternatively start and/or enable {{ic|pcscd.socket}} to activate the daemon when needed.<br />
<br />
==== Always use pcscd ====<br />
<br />
If you are using any smartcard with an opensc driver (e.g.: ID cards from some countries) you should pay some attention to GnuPG configuration. Out of the box you might receive a message like this when using {{Ic|gpg --card-status}}<br />
<br />
gpg: selecting openpgp failed: ec=6.108<br />
<br />
By default, scdaemon will try to connect directly to the device. This connection will fail if the reader is being used by another process. For example: the pcscd daemon used by OpenSC. To cope with this situation we should use the same underlying driver as opensc so they can work well together. In order to point scdaemon to use pcscd you should remove {{Ic|reader-port}} from {{ic|~/.gnupg/scdaemon.conf}}, specify the location to {{ic|libpcsclite.so}} library and disable ccid so we make sure that we use pcscd:<br />
<br />
{{hc|~/.gnupg/scdaemon.conf|<nowiki><br />
pcsc-driver /usr/lib/libpcsclite.so<br />
card-timeout 5<br />
disable-ccid<br />
</nowiki>}}<br />
<br />
Please check {{man|1|scdaemon}} if you do not use OpenSC.<br />
<br />
==== Shared access with pcscd ====<br />
<br />
GnuPG {{ic|scdaemon}} is the only popular {{ic|pcscd}} client that uses {{ic|PCSC_SHARE_EXCLUSIVE}} flag when connecting to {{ic|pcscd}}. Other clients like OpenSC PKCS#11 that are used by browsers and programs listed in [[Electronic identification]] are using {{ic|PCSC_SHARE_SHARED}} that allows simultaneous access to single smartcard. {{ic|pcscd}} will not give exclusive access to smartcard while there are other clients connected. This means that to use GnuPG smartcard features you must before have to close all your open browser windows or do some other inconvenient operations. Starting from version 2.2.28 LTS and 2.3.0 you can enable shared access by modifying your {{ic|scdaemon.conf}} file and adding {{ic|pcsc-shared}} line end of it.<br />
<br />
===== Multi applet smart cards =====<br />
<br />
When using [[YubiKey]]s or other multi applet USB dongles with OpenSC PKCS#11 may run into problems where OpenSC switches your Yubikey from OpenPGP to PIV applet, breaking the {{ic|scdaemon}}. <br />
<br />
You can hack around the problem by forcing OpenSC to also use the OpenPGP applet. Open {{ic|/etc/opensc.conf}} file, search for Yubikey and change the {{ic|1=driver = "PIV-II";}} line to {{ic|1=driver = "openpgp";}}. If there is no such entry, use {{ic|pcsc_scan}}. Search for the Answer to Reset {{ic|ATR: 12 34 56 78 90 AB CD ...}}. Then create a new entry.<br />
<br />
{{hc|/etc/opensc.conf|2=<br />
...<br />
card_atr 12:23:34:45:67:89:ab:cd:... {<br />
name = "YubiKey Neo";<br />
driver = "openpgp"<br />
}<br />
...<br />
}}<br />
<br />
After that you can test with {{ic|pkcs11-tool -O --login}} that the OpenPGP applet is selected by default. Other PKCS#11 clients like browsers may need to be restarted for that change to be applied.<br />
<br />
== Tips and tricks ==<br />
<br />
=== Different algorithm ===<br />
<br />
You may want to use stronger algorithms:<br />
<br />
{{hc|~/.gnupg/gpg.conf|<br />
...<br />
<br />
personal-digest-preferences SHA512<br />
cert-digest-algo SHA512<br />
default-preference-list SHA512 SHA384 SHA256 SHA224 AES256 AES192 AES CAST5 ZLIB BZIP2 ZIP Uncompressed<br />
personal-cipher-preferences TWOFISH CAMELLIA256 AES 3DES<br />
}}<br />
<br />
In the latest version of GnuPG, the default algorithms used are SHA256 and AES, both of which are secure enough for most people. However, if you are using a version of GnuPG older than 2.1, or if you want an even higher level of security, then you should follow the above step.<br />
<br />
=== Encrypt a password ===<br />
<br />
It can be useful to encrypt some password, so it will not be written in clear on a configuration file. A good example is your email password.<br />
<br />
First create a file with your password. You '''need''' to leave '''one''' empty line after the password, otherwise gpg will return an error message when evaluating the file.<br />
<br />
Then run:<br />
<br />
$ gpg -e -a -r ''user-id'' ''your_password_file''<br />
<br />
{{ic|-e}} is for encrypt, {{ic|-a}} for armor (ASCII output), {{ic|-r}} for recipient user ID.<br />
<br />
You will be left with a new {{ic|''your_password_file''.asc}} file.<br />
<br />
{{Tip|[[pass]] automates this process.}}<br />
<br />
=== Change trust model ===<br />
<br />
By default GnuPG uses the [[Wikipedia::Web of Trust|Web of Trust]] as the trust model. You can change this to [[Wikipedia::Trust on first use|Trust on first use]] by adding {{ic|1=--trust-model=tofu}} when adding a key or adding this option to your GnuPG configuration file. More details are in [https://lists.gnupg.org/pipermail/gnupg-devel/2015-October/030341.html this email to the GnuPG list].<br />
<br />
=== Hide all recipient id's ===<br />
<br />
By default the recipient's key ID is in the encrypted message. This can be removed at encryption time for a recipient by using {{ic|hidden-recipient ''user-id''}}. To remove it for all recipients add {{ic|throw-keyids}} to your configuration file. This helps to hide the receivers of the message and is a limited countermeasure against traffic analysis (i.e. using a little social engineering, anyone who is able to decrypt the message can check whether one of the other recipients is the one they suspect). On the receiving side, it may slow down the decryption process because all available secret keys must be tried (e.g. with {{ic|--try-secret-key ''user-id''}}).<br />
<br />
=== Using caff for keysigning parties ===<br />
<br />
To allow users to validate keys on the keyservers and in their keyrings (i.e. make sure they are from whom they claim to be), PGP/GPG uses the [[Wikipedia::Web of Trust|Web of Trust]]. Keysigning parties allow users to get together at a physical location to validate keys. The [[Wikipedia:Zimmermann–Sassaman key-signing protocol|Zimmermann-Sassaman]] key-signing protocol is a way of making these very effective. [https://www.cryptnet.net/fdp/crypto/keysigning_party/en/keysigning_party.html Here] you will find a how-to article.<br />
<br />
For an easier process of signing keys and sending signatures to the owners after a keysigning party, you can use the tool ''caff''. It can be installed from the AUR with the package {{AUR|caff-git}}.<br />
<br />
To send the signatures to their owners you need a working [[Wikipedia:Message transfer agent|MTA]]. If you do not have already one, install [[msmtp]].<br />
<br />
=== Always show long ID's and fingerprints ===<br />
<br />
To always show long key ID's add {{ic|keyid-format 0xlong}} to your configuration file. To always show full fingerprints of keys, add {{ic|with-fingerprint}} to your configuration file.<br />
<br />
=== Custom capabilities ===<br />
<br />
For further customization also possible to set custom capabilities to your keys. The following capabilities are available:<br />
<br />
* Certify (only for master keys) - allows the key to create subkeys, mandatory for master keys.<br />
* Sign - allows the key to create cryptographic signatures that others can verify with the public key.<br />
* Encrypt - allows anyone to encrypt data with the public key, that only the private key can decrypt.<br />
* Authenticate - allows the key to authenticate with various non-GnuPG programs. The key can be used as e.g. an SSH key. <br />
<br />
It is possible to specify the capabilities of the master key, by running: <br />
<br />
$ gpg --full-generate-key --expert<br />
<br />
And select an option that allows you to set your own capabilities.<br />
<br />
Comparably, to specify custom capabilities for subkeys, add the {{ic|--expert}} flag to {{ic|gpg --edit-key}}, see [[#Edit your key]] for more information.<br />
<br />
== Troubleshooting ==<br />
<br />
=== Not enough random bytes available ===<br />
<br />
When generating a key, gpg can run into this error:<br />
<br />
Not enough random bytes available. Please do some other work to give the OS a chance to collect more entropy!<br />
<br />
To check the available entropy, check the kernel parameters:<br />
<br />
$ cat /proc/sys/kernel/random/entropy_avail<br />
<br />
A healthy Linux system with a lot of entropy available will have return close to the full 4,096 bits of entropy. If the value returned is less than 200, the system is running low on entropy. <br />
<br />
To solve it, remember you do not often need to create keys and best just do what the message suggests (e.g. create disk activity, move the mouse, edit the wiki - all will create entropy). If that does not help, check which service is using up the entropy and consider stopping it for the time. If that is no alternative, see [[Random number generation#Alternatives]].<br />
<br />
=== su ===<br />
<br />
When using {{Ic|pinentry}}, you must have the proper permissions of the terminal device (e.g. {{Ic|/dev/tty1}}) in use. However, with ''su'' (or ''sudo''), the ownership stays with the original user, not the new one. This means that pinentry will fail with a {{ic|Permission denied}} error, even as root. If this happens when attempting to use ssh, an error like {{ic|sign_and_send_pubkey: signing failed: agent refused operation}} will be returned. The fix is to change the permissions of the device at some point before the use of pinentry (i.e. using gpg with an agent). If doing gpg as root, simply change the ownership to root right before using gpg:<br />
<br />
# chown root /dev/ttyN # where N is the current tty<br />
<br />
and then change it back after using gpg the first time. The equivalent is true with {{Ic|/dev/pts/}}.<br />
<br />
{{Note|The owner of tty ''must'' match with the user for which pinentry is running. Being part of the group {{Ic|tty}} '''is not''' enough.}}<br />
<br />
{{Tip|If you run gpg with {{ic|script}} it will use a new tty with the correct ownership:<br />
<br />
# script -q -c "gpg --gen-key" /dev/null<br />
}}<br />
<br />
=== Agent complains end of file ===<br />
<br />
If the pinentry program is {{ic|/usr/bin/pinentry-gnome3}}, it needs a DBus session bus to run properly. See [[General troubleshooting#Session permissions]] for details.<br />
<br />
Alternatively, you can use a variety of different options described in [[#pinentry]].<br />
<br />
=== KGpg configuration permissions ===<br />
<br />
There have been issues with {{Pkg|kgpg}} being able to access the {{ic|~/.gnupg/}} options. One issue might be a result of a deprecated ''options'' file, see the [https://bugs.kde.org/show_bug.cgi?id=290221 bug] report.<br />
<br />
=== GNOME on Wayland overrides SSH agent socket ===<br />
<br />
For Wayland sessions, {{Ic|gnome-session}} sets {{Ic|SSH_AUTH_SOCK}} to the standard gnome-keyring socket, {{Ic|$XDG_RUNTIME_DIR/keyring/ssh}}. This overrides any value set elsewhere.<br />
<br />
See [[GNOME/Keyring#Disable keyring daemon components]] on how to disable this behavior.<br />
<br />
=== mutt ===<br />
<br />
Mutt might not use ''gpg-agent'' correctly, you need to set an [[environment variable]] {{ic|GPG_AGENT_INFO}} (the content does not matter) when running mutt. Be also sure to enable password caching correctly, see [[#Cache passwords]].<br />
<br />
See [https://bbs.archlinux.org/viewtopic.php?pid=1490821#p1490821 this forum thread].<br />
<br />
=== "Lost" keys, upgrading to gnupg version 2.1 ===<br />
<br />
When {{ic|gpg --list-keys}} fails to show keys that used to be there, and applications complain about missing or invalid keys, some keys may not have been migrated to the new format.<br />
<br />
Please read [https://web.archive.org/web/20160502052025/http://jo-ke.name/wp/?p=111 GnuPG invalid packet workaround]. Basically, it says that there is a bug with keys in the old {{ic|pubring.gpg}} and {{ic|secring.gpg}} files, which have now been superseded by the new {{ic|pubring.kbx}} file and the {{ic|private-keys-v1.d/}} subdirectory and files. Your missing keys can be recovered with the following commands:<br />
<br />
$ cd<br />
$ cp -r .gnupg gnupgOLD<br />
$ gpg --export-ownertrust > otrust.txt<br />
$ gpg --import .gnupg/pubring.gpg<br />
$ gpg --import-ownertrust otrust.txt<br />
$ gpg --list-keys<br />
<br />
=== gpg hanged for all keyservers (when trying to receive keys) ===<br />
<br />
If gpg hanged with a certain keyserver when trying to receive keys, you might need to kill dirmngr in order to get access to other keyservers which are actually working, otherwise it might keeping hanging for all of them.<br />
<br />
=== Smartcard not detected ===<br />
<br />
Your user might not have the permission to access the smartcard which results in a {{ic|card error}} to be thrown, even though the card is correctly set up and inserted.<br />
<br />
One possible solution is to add a new group {{ic|scard}} including the users who need access to the smartcard.<br />
<br />
Then use [[udev rules]], similar to the following:<br />
<br />
{{hc|/etc/udev/rules.d/71-gnupg-ccid.rules|<nowiki><br />
ACTION=="add", SUBSYSTEM=="usb", ENV{ID_VENDOR_ID}=="1050", ENV{ID_MODEL_ID}=="0116|0111", MODE="660", GROUP="scard"<br />
</nowiki>}}<br />
<br />
One needs to adapt VENDOR and MODEL according to the {{ic|lsusb}} output, the above example is for a YubikeyNEO.<br />
<br />
=== server 'gpg-agent' is older than us (x < y) ===<br />
<br />
This warning appears if {{ic|gnupg}} is upgraded and the old gpg-agent is still running. [[Restart]] the ''user'''s {{ic|gpg-agent.socket}} (i.e., use the {{ic|--user}} flag when restarting).<br />
<br />
=== IPC connect call failed ===<br />
<br />
Make sure {{ic|gpg-agent}} and {{ic|dirmngr}} are not running with {{ic|killall gpg-agent dirmngr}} and the {{ic|$GNUPGHOME/crls.d/}} folder has permission set to {{ic|700}}.<br />
<br />
By default, the {{Pkg|gnupg}} package uses the directory {{ic|/run/user/$UID/gnupg/}} for sockets. [https://github.com/gpg/gnupg/blob/25ae80b8eb6e9011049d76440ad7d250c1d02f7c/README#L121-L122 GnuPG documentation] states this is the preferred directory (not all file systems are supported for sockets). Validate that your {{ic|agent-socket}} configuration specifies a path that has an appropriate file system. You can find the your path settings for {{ic|agent-socket}} by running {{ic|gpgconf --list-dirs agent-socket}}.<br />
<br />
Test that {{ic|gpg-agent}} starts successfully with {{ic|gpg-agent --daemon}}.<br />
<br />
=== Mitigating Poisoned PGP Certificates ===<br />
<br />
In June 2019, an unknown attacker spammed several high-profile PGP certificates with tens of thousands (or hundreds of thousands) of signatures (CVE-2019-13050) and uploaded these signatures to the SKS keyservers.<br />
The existence of these poisoned certificates in a keyring causes gpg to hang with the following message:<br />
<br />
gpg: removing stale lockfile (created by 7055)<br />
<br />
Possible mitigation involves removing the poisoned certificate as per this [https://tech.michaelaltfield.net/2019/07/14/mitigating-poisoned-pgp-certificates/ blog post].<br />
<br />
=== Invalid IPC response and Inappropriate ioctl for device ===<br />
<br />
The default pinentry program is {{ic|/usr/bin/pinentry-gtk-2}}. If {{Pkg|gtk2}} is unavailable, pinentry falls back to {{ic|/usr/bin/pinentry-curses}} and causes signing to fail:<br />
<br />
gpg: signing failed: Inappropriate ioctl for device<br />
gpg: [stdin]: clear-sign failed: Inappropriate ioctl for device<br />
<br />
You need to set the {{ic|GPG_TTY}} environment variable for the pinentry programs {{ic|/usr/bin/pinentry-tty}} and {{ic|/usr/bin/pinentry-curses}}.<br />
<br />
$ export GPG_TTY=$(tty)<br />
<br />
=== Keyblock resource does not exist ===<br />
<br />
If you get an error like this when trying to import keys<br />
<br />
gpg: keyblock resource '''gnupg_home''/pubring.kbx': No such file or directory<br />
<br />
it is because GnuPG will not create its home directory if it does not yet exist. Simply create it manually<br />
<br />
$ mkdir -m 700 ''gnupg_home''<br />
<br />
== See also ==<br />
<br />
* [https://gnupg.org/ GNU Privacy Guard Homepage]<br />
* [https://futureboy.us/pgp.html Alan Eliasen's GPG Tutorial]<br />
* [[RFC:4880|RFC 4880]] — "OpenPGP Message Format"<br />
* [https://help.riseup.net/en/security/message-security/openpgp/gpg-best-practices gpg.conf recommendations and best practices]<br />
* [[Fedora:Creating GPG Keys]]<br />
* [[Debian:Subkeys]]<br />
* [https://github.com/lfit/itpol/blob/master/protecting-code-integrity.md Protecting code integrity with PGP]<br />
* [https://sanctum.geek.nz/arabesque/series/gnu-linux-crypto/ A more comprehensive gpg Tutorial]<br />
* [https://www.reddit.com/r/GPGpractice/ /r/GPGpractice - a subreddit to practice using GnuPG.]</div>
Misaka 0x34ca
https://wiki.archlinux.org/index.php?title=GNOME/Troubleshooting&diff=753908
GNOME/Troubleshooting
2022-10-20T15:47:51Z
<p>Misaka 0x34ca: remove duplicated part `Right click does not work in touchpad` (fix Revision 731394)</p>
<hr />
<div>[[Category:GNOME]]<br />
[[it:GNOME (Italiano)/Troubleshooting]]<br />
[[ja:GNOME/トラブルシューティング]]<br />
== Shell freezes ==<br />
<br />
In the event of a shell freeze (which might be caused by certain appearance tweaks, malfunctioning extensions or perhaps a lack of available memory), restarting the shell by pressing {{ic|Alt+F2}} and then entering {{ic|r}} may not be possible.<br />
<br />
In this case, try switching to another TTY ({{ic|Ctrl+Alt+F2}}) and entering the following command: {{ic|pkill -HUP gnome-shell}}. It may take a few seconds before the shell successfully restarts. On X11, restarting the shell in this fashion should not log the user out, but it is a good idea to try and ensure that all work is saved anyway; on Wayland (currently the default), restarting the shell kills the whole session, so everything will be lost.<br />
<br />
If this fails, the [[Xorg]] server will need to be restarted either by {{ic|pkill X}} for console logins or by [[restart]]ing {{ic|gdm.service}} for GDM logins. Bear in mind that restarting the Xorg server will log the user out, so try to ensure that all work is saved before attempting this.<br />
<br />
== Shell segfaults ==<br />
<br />
If ''gnome-shell'' keeps disappearing and reappearing, then it has segfaulted (likely due to an extension). GNOME Shell extensions are written in Javascript, so to enable extension debugging, the appropriate Javascript-related packages, {{Pkg|gjs}} and {{Pkg|js78}}, must be [[Debugging/Getting traces#General|rebuilt with debug symbols]]{{Broken section link}}.<br />
<br />
Enabling debugging for ''js78'' requires a few more steps than ''gjs'' since the former uses [[Clang]] and explicitly disables debugging in the {{ic|configure_args}} array in its {{ic|PKGBUILD}}. For ''js78'', you will also need to heed the note about Clang in [[Debugging/Getting traces#General]]{{Broken section link}} and '''remove''' the following configuration options from {{ic|configure_args}}:<br />
<br />
--disable-debug<br />
--disable-debug-symbols<br />
<br />
Once the newly rebuilt ''gjs'' and ''js78'' packages have been installed and ''gnome-shell'' has been restarted (with {{ic|Alt+F2}} {{ic|r}} or by logging out and logging back in), debug symbols will be available in the resulting core dump whenever ''gnome-shell'' crashes:<br />
<br />
{{hc|1=$ coredumpctl -1|2=<br />
TIME PID UID GID SIG COREFILE EXE<br />
Mon 2017-07-17 15:34:49 CEST 27368 1000 1000 11 present /usr/bin/gnome-shell<br />
$ coredumpctl gdb 27368<br />
(gdb) bt<br />
#0 0x00007fbc7b997945 in js::GCMethods<JSObject*>::needsPostBarrier(JSObject*) (v=0x7fbc0a9548c0) at /usr/include/mozjs-38/js/RootingAPI.h:663<br />
#1 0x00007fbc7b997945 in JS::Heap<JSObject*>::set(JSObject*) (newPtr=0x0, this=0x254c260) at /usr/include/mozjs-38/js/RootingAPI.h:296<br />
#2 0x00007fbc7b997945 in JS::Heap<JSObject*>::operator=(JSObject* const&) (p=<optimized out>, this=0x254c260) at /usr/include/mozjs-38/js/RootingAPI.h:266<br />
#3 0x00007fbc7b997945 in GjsMaybeOwned<JSObject*>::reset() (this=0x254c250) at ./gjs/jsapi-util-root.h:267<br />
#4 0x00007fbc7b997945 in closure_clear_idle(void*) (data=0x254c220) at gi/closure.cpp:133<br />
#5 0x00007fbc79abd8c5 in g_main_context_dispatch () at /usr/lib/libglib-2.0.so.0<br />
#6 0x00007fbc79abdc88 in () at /usr/lib/libglib-2.0.so.0<br />
#7 0x00007fbc79abdfa2 in g_main_loop_run () at /usr/lib/libglib-2.0.so.0<br />
#8 0x00007fbc7b27508c in meta_run () at /usr/lib/libmutter-0.so.0<br />
#9 0x0000000000401ff7 in main ()<br />
}}<br />
<br />
The core dump can then be filed as an issue on [https://gitlab.gnome.org/GNOME/gnome-shell/issues GNOME Shell's issue tracker]. See [https://wiki.gnome.org/GettingInTouch/Bugzilla/GettingTraces/Details Getting Stack Traces -- Detailed Version] on the GNOME Wiki for more details.<br />
<br />
== Incorrect application defaults ==<br />
<br />
When installing applications for the first time you may find that GNOME has the wrong application associated to a certain protocols - for instance, ''easytag'' becomes the folder handler instead of [[GNOME Files]].<br />
<br />
For GNOME Files see the following page: [[GNOME Files#Files is no longer the default file manager]].<br />
<br />
For Document Viewer, run the following command:<br />
$ xdg-mime default evince.desktop application/pdf<br />
<br />
For other applications, default handler settings are detailed on the following page: [[Default applications]].<br />
<br />
Optionally, you can [[install]] {{AUR|gnome-defaults-list}}. It will place your configuration file at {{ic|/usr/share/applications/gnome-mimeapps.list}}.<br />
<br />
== Tracker & Documents do not list any local files ==<br />
<br />
In order for Tracker (and, therefore, Documents) to detect your local files, they must be stored in an [https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html XDG compliant directory] (such as 'Documents' or 'Music'). For more information, see [[XDG user directories]].<br />
<br />
You can also configure Tracker to recursively search inside specific directories such as your home directory. These settings can be made using {{ic|tracker-preferences}}.<br />
<br />
== GNOME Online Accounts settings page does not show properly ==<br />
<br />
In some cases, due to interactions with Alacarte (menu editor), GNOME Online accounts settings page would not show. If that happens, "Restore System Configuration" in Alacarte can restore missing functions to gnome-control-center. (See https://bugzilla.redhat.com/show_bug.cgi?id=1520431.)<br />
<br />
== Cannot change settings in dconf-editor ==<br />
<br />
When one cannot set settings in {{Pkg|dconf}}, it is possible their dconf user settings are corrupt. In this case it is best to delete the user dconf files in {{ic|~/.config/dconf/user*}} and set the settings in dconf-editor after.<br />
<br />
== When an extension breaks the shell ==<br />
<br />
When enabling shell extensions causes GNOME breakage, you should first remove the ''user-theme'' and ''auto-move-windows'' extensions from their installation directory.<br />
<br />
The installation directory could be one of {{ic|~/.local/share/gnome‑shell/extensions}}, {{ic|/usr/share/gnome‑shell/extensions}} or {{ic|/usr/local/share/gnome‑shell/extensions}}. Removing these two extension-containing folders may fix the breakage. Otherwise, isolate the problem extension with trial‑and‑error.<br />
<br />
Removing or adding an extension-containing folder to the aforementioned directories removes or adds the corresponding extension to your system. Details on GNOME Shell extensions are available at the [https://wiki.gnome.org/Projects/GnomeShell/Extensions GNOME web site.]<br />
<br />
If you have trouble with uninstalling an extension via [https://extensions.gnome.org/local/ extensions.gnome.org/local], then probably they have been installed as system-wide extensions with the {{Pkg|gnome-shell-extensions}} package. Removing the package again obviously affects all user accounts.<br />
<br />
== Extensions do not work after GNOME 3 update ==<br />
<br />
{{Note|Please bear in mind that whilst the methods below will allow you to '''try''' and activate an extension with an unsupported version of GNOME Shell, it is by no means a guarantee that the extension will work successfully. The most likely outcome of trying to activate such an extension is that GNOME Shell will crash and then restart.}}<br />
<br />
Before trying the workarounds below, check if an update is available for the extension by visiting [https://extensions.gnome.org/local extensions.gnome.org/local]. <br />
<br />
If there is no update for your current GNOME version yet, use the following command to disable version validation for extensions:<br />
$ gsettings set org.gnome.shell disable-extension-version-validation true<br />
<br />
Alternatively, you could modify the extension itself, changing the supported shell version to satisfy the version validation. See the method below.<br />
<br />
Locate the folder where your extensions are installed. It might be {{ic|~/.local/share/gnome-shell/extensions}} or {{ic|/usr/share/gnome-shell/extensions}}.<br />
<br />
Edit each occurrence of {{ic|metadata.json}} which appears in each extension sub-folder.<br />
<br />
{| border="0"<br />
| Insert: || {{ic|"shell-version": ["3.x"]}}<br />
|-<br />
| Instead of (for example): || {{ic|"shell-version": ["3.4"]}}<br />
|}<br />
<br />
{{ic|"3.x"}} indicates the extension works with every shell version. If it breaks, you will know to change it back.<br />
<br />
== Keyboard shortcut do not work with only conky running ==<br />
<br />
The GNOME shell keyboard shortcuts like {{ic|Alt+F2}}, {{ic|Alt+F1}}, and the media key shortcuts do not work if conky is the only program running. However, if another application like ''gedit'' is running, then the keyboard shortcuts work.<br />
<br />
Solution: edit {{ic|.conkyrc}}<br />
<br />
own_window yes<br />
own_window_transparent yes<br />
own_window_argb_visual yes<br />
own_window_type dock<br />
own_window_class Conky<br />
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager<br />
<br />
== Unable to apply stored configuration for monitors ==<br />
<br />
If you encounter this message try to disable the ''xrandr'' {{ic|gnome-settings-daemon plugin}}:<br />
<br />
$ dconf write /org/gnome/settings-daemon/plugins/xrandr/active false<br />
<br />
== Consistent cursor theme ==<br />
<br />
See [[Cursor themes#Desktop environments]].<br />
<br />
== Windows cannot be modified with Alt-Key + mouse-button ==<br />
<br />
In GNOME 3.6 and above, the mouse button modifier (the key that allows you to drag a window from a location other than the titlebar) is the {{ic|Super}} key instead of the {{ic|Alt}} key which was used in the past. The change was made in response to the following [https://bugzilla.gnome.org/show_bug.cgi?id=607797 bug report]. <br />
<br />
To change the mouse button modifier back to the {{ic|Alt}} key, execute the following:<br />
$ gsettings set org.gnome.desktop.wm.preferences mouse-button-modifier '<Alt>' <br />
<br />
{{Note|It is not possible to change this with ''System settings'' > ''Keyboard'' > ''Shortcuts''}}<br />
<br />
== Slow loading of system icons/slow GDM login ==<br />
<br />
Problems with the loading of system icons, such the ones in the title bar of Files, might be solved by executing the following command:<br />
# gdk-pixbuf-query-loaders --update-cache<br />
<br />
Running the aforementioned command may also fix repeated occurrences of the "Oh no! Something has gone wrong!" error screen and/or very slow loading and login with GDM as described in the following [https://bbs.archlinux.org/viewtopic.php?pid=1414157 forum thread].<br />
<br />
== Artifacts when maximizing windows ==<br />
<br />
Maximizing windows may cause artifacts as of GNOME 3.12.0 - see the following [https://bbs.archlinux.org/viewtopic.php?id=183617 forum thread] and [https://bugzilla.gnome.org/show_bug.cgi?id=728385 bug report]. A solution is detailed in the following section: [[#Tear-free video with Intel HD Graphics]].<br />
<br />
== Tear-free video with Intel HD Graphics ==<br />
<br />
;DRI3<br />
According to a [https://bugzilla.gnome.org/show_bug.cgi?id=711028#c2 bug report], DRI3 includes the {{ic|buffer_age}} extension that allows GNOME Shell's Mutter compositor to sync windows to vblank in an efficient way. Since version {{ic|1:2.99.917+682+g4eaab17-1}}, DRI3 is enabled by default in {{Pkg|xf86-video-intel}} [https://github.com/archlinux/svntogit-packages/commit/cd3de9bb45a9ab84383541ed45ee6f0c10ea8798].<br />
<br />
;Intel TearFree<br />
Enabling the [[Intel graphics#Tearing|Xorg Intel TearFree option]] is a known workaround for tearing problems on Intel adapters. However, the way this option acts increases memory consumption and lowers performance, see [https://bugs.freedesktop.org/show_bug.cgi?id=37686#c123 the original bug report's final comment].<br />
<br />
;Mutter tweaks<br />
{{Note|1=This workaround has been [https://bugzilla.gnome.org/show_bug.cgi?id=711028#c0 reported] to have side effects and may not fix tearing in all cases.}}<br />
GNOME Shell's Mutter compositor has a tweak known to address tearing problems (see [https://bugzilla.gnome.org/show_bug.cgi?id=657071#c1 the original suggestion for this fix] and its mention in [https://bugs.freedesktop.org/show_bug.cgi?id=37686#c59 the Freedesktop bug report]). To enable this tweak, append the following line to {{ic|/etc/environment}}: {{ic|1=CLUTTER_PAINT=disable-clipped-redraws:disable-culling}}. Then restart the Xorg server.<br />
<br />
;Disable fullscreen unredirect<br />
GNOME Shell does by default unredirect fullscreen applications. This may result in tearing. You can disable this with the gnome shell extension {{AUR|gnome-shell-extension-disable-unredirect}}.<br />
<br />
== Window opens behind other windows when using multiple monitors ==<br />
<br />
This is possibly a bug in GNOME Shell which causes new windows to open behind others. To fix this issue, one can run the following command:<br />
$ gsettings set org.gnome.shell.overrides workspaces-only-on-primary false<br />
<br />
== Lock button fails to re-enable touchpad ==<br />
<br />
Some laptops have a touchpad lock button that disables the touchpad so that users can type without worrying about touching the touchpad. Currently, it appears that although GNOME can lock the touchpad by pressing this button, it cannot unlock it. If the touchpad gets locked you can run the following to unlock it:<br />
<br />
$ xinput set-prop "SynPS/2 Synaptics TouchPad" "Device Enabled" 1<br />
<br />
== GNOME Shell keyboard sources menu not visible ==<br />
<br />
A menu showing the keyboard input sources (for example 'en' for an English keyboard layout) should be visible next to the status area containing icons for network, volume and power sources. If the keyboard sources menu is not visible, this is probably because you have configured your [[Xorg]] keyboard layout in a way which GNOME does not recognise.<br />
<br />
To ensure that the menu is visible, remove any Xorg keyboard configuration you might have created and set the keyboard locale using [[Keyboard configuration in Xorg#Using localectl|localectl]].<br />
<br />
Upon running the command and then logging out, you should find that the keyboard input sources menu is visible in GDM and in the GNOME Shell desktop. See [https://blogs.gnome.org/mclasen/2012/09/21/input-sources-in-gnome/ Input sources in GNOME] for more information.<br />
<br />
== Mouse cursor missing ==<br />
<br />
When using a separate [[window manager]] with ''gnome-settings-daemon'', the mouse cursor may vanish. Run:<br />
<br />
$ gsettings set org.gnome.settings-daemon.plugins.cursor active false<br />
<br />
== No restart button in session menu when screen is locked ==<br />
<br />
If [[XScreenSaver]] is installed, ensure that it is not running at startup, see [[GNOME#Autostart]].<br />
<br />
== PulseAudio system-wide causes delay in GNOME and GDM ==<br />
<br />
If you are running [[PulseAudio]] in system-wide mode, the PulseAudio 7.0 upgrade breaks [[GDM]] and GNOME.<br />
See [https://bbs.archlinux.org/viewtopic.php?id=203051 this forum post] for more information.<br />
<br />
== GNOME crashes when trying to reorder applications in the GNOME Shell Dash ==<br />
<br />
The dash is the "toolbar" that appears, by default, [[wikipedia:GNOME_Shell#Design_components|on the left]] when you click Activities. Applications can be reordered in the dash by dragging and dropping. If this fails, and/or causes GNOME to crash, try [https://bbs.archlinux.org/viewtopic.php?id=171689 changing your icon theme].<br />
<br />
== GNOME Crashes while installing gnome-extra ==<br />
<br />
{{Expansion|Is there a related bug report?}}<br />
<br />
Attempting to install the gnome-extra group while a gnome environment is running will crash gnome while installing gnome-getting-started-docs. X will continue to run, but gnome will not work until fixed. To fix, simply install gnome-extra from a terminal rather than inside gnome. When complete, gnome should work again.<br />
<br />
== No H264 Video in GNOME Video Player (Totem) ==<br />
<br />
[[Codecs#Tips and tricks|See Codecs]]<br />
<br />
== No suspend on LID closure ==<br />
<br />
GNOME defaults to this behaviour about suspension:<br />
* No external monitor attached, computer goes in suspension when LID closes.<br />
* External monitor attached, computer does not go in suspension when LID closes.<br />
Currently {{Pkg|gnome-tweaks}} is not able to modify the behaviour on the second case, when a monitor is connected to the computer. While it can inhibit suspension with no monitor attached.<br />
{{Note|Behaviour on LID closure is controlled also by systemd. See [[Power management#Power management with systemd]].}}<br />
<br />
== gnome-shell / gnome-session crashes on session startup ==<br />
<br />
Sometimes {{ic|gnome-session}} crashes immediately after login. This might be more visible on wayland and it might seem as if every second login attempt fails. The problem can be temporarily worked around by removing the files in {{ic|~/.config/gnome-session/saved-session}}. A more lasting work-around is to disable the session manager's {{ic|auto-save-session}} feature:<br />
<br />
$ gsettings set org.gnome.SessionManager auto-save-session false<br />
<br />
== Low OpenGL performance and stuttering ==<br />
<br />
* With proprietary NVIDIA driver<br />
<br />
[https://bugzilla.gnome.org/show_bug.cgi?id=781835 This] bug is much likely the cause of it. You should revert {{ic|383ba566bd7c2a76d0856015a66e47caedef06b6 }} commit in {{Pkg|mutter}}. Use [[ABS]] for this and add {{ic|git revert -n 383ba566bd7c2a76d0856015a66e47caedef06b6}} to the {{ic|prepare()}} function in the [[PKGBUILD]] or simply install {{Aur|mutter-performance}} instead.<br />
<br />
* With free drivers<br />
<br />
If video playback stutters (a bit), try ''GNOME on Xorg'' instead of Wayland.<br />
<br />
== GNOME Wayland session not available ==<br />
<br />
GNOME Wayland does not support more than one GPU for output yet, [https://bugzilla.gnome.org/show_bug.cgi?id=771442 falling back] on GNOME X11.<br />
<br />
If your displays are only connected to one of your video devices, add this to your [[Environment variables#Using pam_env|system environment variables]]:<br />
<br />
MUTTER_ALLOW_HYBRID_GPUS=1<br />
<br />
To avoid [https://bbs.archlinux.org/viewtopic.php?pid=1744592#p1744592 problems] with some chipsets enable [[Kernel mode setting#Early KMS start|Early KMS]].<br />
<br />
== gnome-control-center is empty and does not list any categories ==<br />
<br />
Under alternative window managers (i3 for example), ''gnome-control-center'' starts as an empty window.<br />
You need to set the variable {{ic|XDG_CURRENT_DESKTOP}} to {{ic|GNOME}} to start it (either in a script or exporting the variable in {{ic|~/.profile}}).<br />
<br />
export XDG_CURRENT_DESKTOP=GNOME<br />
gnome-control-center &<br />
<br />
== GNOME freezes for a second after using a Function (Fn) key shortcut ==<br />
<br />
This is a problem with the brazilian portuguese ABNT 2 keyboard. If you have the brazilian portuguese enabled, GNOME might experience this problem. To fix this issue and keep using this keyboard layout, un-map the scroll lock button by commenting this line at {{ic|/usr/share/X11/xkb/symbols/br}}:<br />
<br />
modifier_map Mod3 { Scroll_Lock };<br />
<br />
And restart the session (log out and in).<br />
<br />
== Zoom in/out keyboard shortcuts do not work on some applications ==<br />
<br />
{{ic|Ctrl+Plus}} and {{ic|Ctrl+Minus}} keyboard shortcuts for zoom in/out functions do not work out of the box on some GNOME applications, such as Files and GNOME Terminal.<br />
<br />
In such cases, open up GNOME Tweaks ({{Pkg|gnome-tweaks}}) and navigate to Keyboard & Mouse > Additional Layout Options button > Layout of numeric keypad. Change the {{ic|Disabled}} value to {{ic|Hexadecimal}}.<br />
<br />
== Printers configuration does not work in GNOME settings ==<br />
<br />
[[CUPS]] and {{Pkg|system-config-printer}} should be installed<br />
<br />
== Screen reader does not work ==<br />
<br />
Install {{Pkg|espeak-ng}}. Alternatively, {{Pkg|festival}} can be used<br />
<br />
== GNOME Software does not show Arch Linux packages ==<br />
<br />
Install {{Pkg|gnome-software-packagekit-plugin}}.<br />
<br />
== Right click does not work in touchpad ==<br />
<br />
In touchpads where the buttons are divided (e.g. buttonless touchpads), tapping with one finger on the right side - or any other place - of the touchpad can give you the behavior of the left button, when right button is expected.<br />
<br />
As of GNOME 3.28, the default behavior of touchpads is a two-finger tap emulate the mouse's right button. This behavior can be changed in GNOME Tweaks ({Pkg|gnome-tweaks}) by going in ''Keyboard & Mouse'' in the left-side menu and then ''Mouse Click Emulation'' option.<br />
<br />
The following values are available for click method:<br />
<br />
* ''Fingers'' -- default value, two-fingers top to emulate right click button (default) <br />
* ''Area'' -- tap button-right for the right click behavior and button-middle for middle click<br />
* ''Disabled'' -- no mouse click emulation<br />
<br />
Alternatively, this behavior can be changed in the command-line interface using ''gsettings''. For instance, to set ''areas'' click method:<br />
<br />
gsettings set org.gnome.desktop.peripherals.touchpad click-method areas</div>
Misaka 0x34ca
https://wiki.archlinux.org/index.php?title=Intel_NUC_X15&diff=746015
Intel NUC X15
2022-09-13T01:32:36Z
<p>Misaka 0x34ca: Tested TPM & add a period & use `cannot` instead of `can not`</p>
<hr />
<div>[[Category:Intel]]<br />
{| class="wikitable" style="float: right;"<br />
|-<br />
! Hardware !! PCI/USB ID !! Working?<br />
|-<br />
| Bluetooth || {{ic|8087:0026}} || {{Yes}}<br />
|-<br />
| Webcam || {{ic|04f2:b71a}} || {{Yes}}<br />
|-<br />
| Ethernet || {{ic|8086:15f3}} || {{Yes}}<br />
|-<br />
| WiFi || {{ic|8086:43f0}} || {{Yes}}<br />
|-<br />
| GPU (Intel) || {{ic|8086:9a60}} || {{Yes}}<br />
|-<br />
| GPU (NVIDIA) || {{ic|10de:249d}} || {{Yes}}<br />
|-<br />
| Touchpad || || {{Yes}}<br />
|-<br />
| Keyboard || || {{Yes}}<br />
|-<br />
| TPM || || {{Yes}}<br />
|-<br />
| SD-card reader || {{ic|0bda:0316}} || {{Yes}}<br />
|-<br />
| Audio || {{ic|8086:43c8}} || {{Yes}}<br />
|}<br />
<br />
== Installation ==<br />
<br />
This device can only boot in [[UEFI]] mode.<br />
<br />
This device has an IR camera that can be used for face recognition authentication, try [[Howdy]] if you want to use that feature.<br />
<br />
To control the keyboard RGB backlighting, you can try {{AUR|python-ite8291r3-ctl}}.<br />
<br />
Additional steps may be required to get the screen to use a high refresh rate, see [[Intel graphics#Add support for 165Hz monitor]] and [[Kernel mode setting#Forcing modes and EDID]].<br />
<br />
Double-tap to toggle the touchpad and some function keys may require additional drivers to work.<br />
<br />
== Accessibility ==<br />
<br />
The appearance of the UEFI is simple and not very colorful, so it might work well with OCR software. Navigation can be controlled by keyboard or mouse.<br />
<br />
{{Note|<br />
* By default, this device requires manual installation of memory and hard disk. Ask for help if you cannot do it yourself. <br />
* Blind users should request the help of a sighted person to change UEFI settings. <br />
}}<br />
<br />
* System Setup : {{ic|F2}}<br />
* Boot Menu: {{ic|F10}}<br />
<br />
== Firmware ==<br />
<br />
[[Secure Boot]] custom keys work well on this device.<br />
<br />
[[fwupd]] does not support this device yet.<br />
<br />
== Function keys ==<br />
<br />
{| class="wikitable"<br />
|-<br />
! Key<br />
! Visible?<sup>1</sup><br />
! Marked?<sup>2</sup><br />
! Effect<br />
|-<br />
| {{ic|Fn+Esc}} || {{No}} || {{Yes}} || Toggles Fn lock<br />
|-<br />
| {{ic|Fn+F1}} || {{Yes}}<sup>3</sup> || {{Yes}} || {{ic|XF86Sleep}}<br />
|-<br />
| {{ic|Fn+F2}} || {{Yes}} || {{Yes}} || {{ic|XF86AudioMute}}<br />
|-<br />
| {{ic|Fn+F3}} || {{Yes}} || {{Yes}} || {{ic|XF86AudioLowerVolume}}<br />
|-<br />
| {{ic|Fn+F4}} || {{Yes}} || {{Yes}} || {{ic|XF86AudioRaiseVolume}}<br />
|-<br />
| {{ic|Fn+F5}} || {{No}} || {{Yes}} || {{ic|XF86AudioMicMute}}, does not work.<br />
|-<br />
| {{ic|Fn+F7}} || {{Yes}} || {{Yes}} || Inputs {{ic|Super_L+Ctrl_L+Keycode 93}} for toggling the touchpad, does not work.<br />
|-<br />
| {{ic|Fn+F8}} || {{No}} || {{Yes}} || Toggles keyboard backlight brightness<br />
|-<br />
| {{ic|Fn+F9}} || {{Yes}} || {{Yes}} || {{ic|XF86MonBrightnessDown}}<br />
|-<br />
| {{ic|Fn+F10}} || {{Yes}} || {{Yes}} || {{ic|XF86MonBrightnessUp}}<br />
|-<br />
| {{ic|Fn+F11}} || {{Yes}} || {{Yes}} || Inputs {{ic|Super_L+P}}<br />
|-<br />
| {{ic|Fn+F12}} || {{No}} || {{Yes}} || For disabling the WiFi & Bluetooth, does not work.<br />
|-<br />
| {{ic|Fn+Insert}} || {{Yes}} || {{Yes}} || {{ic|Print}}<br />
|-<br />
| {{ic|Fn+Scroll_Lock}} || {{Yes}} || {{Yes}} || {{ic|Num_Lock}}<br />
|}<br />
<br />
# The key is visible to {{ic|xev}} and similar tools<br />
# The physical key has a symbol on it, which describes its function<br />
# systemd-logind handles this by default<br />
<br />
<!-- == See also == --></div>
Misaka 0x34ca
https://wiki.archlinux.org/index.php?title=Talk:Xiaomi_Mi_Notebook_Pro_15.6&diff=737168
Talk:Xiaomi Mi Notebook Pro 15.6
2022-07-10T14:55:52Z
<p>Misaka 0x34ca: /* Wrong information on fingerprint reader */ talk about fingerprint reader status</p>
<hr />
<div>== Needs clarification on which versions this handles ==<br />
<br />
I don't know which Xiaomi Mi Notebook Pro 15.6 this page refers to.<br />
<br />
For my Xiaomi Mi Notebook Pro 15.6 2017 TM1701, the hardware PCI/USB ID are as below.<br />
<br />
$ lspci -nn<br />
00:00.0 Host bridge [0600]: Intel Corporation Xeon E3-1200 v6/7th Gen Core Processor Host Bridge/DRAM Registers [8086:5914] (rev 08)<br />
00:02.0 VGA compatible controller [0300]: Intel Corporation UHD Graphics 620 [8086:5917] (rev 07)<br />
00:08.0 System peripheral [0880]: Intel Corporation Xeon E3-1200 v5/v6 / E3-1500 v5 / 6th/7th/8th Gen Core Processor Gaussian Mixture Model [8086:1911]<br />
00:14.0 USB controller [0c03]: Intel Corporation Sunrise Point-LP USB 3.0 xHCI Controller [8086:9d2f] (rev 21)<br />
00:14.2 Signal processing controller [1180]: Intel Corporation Sunrise Point-LP Thermal subsystem [8086:9d31] (rev 21)<br />
00:15.0 Signal processing controller [1180]: Intel Corporation Sunrise Point-LP Serial IO I2C Controller #0 [8086:9d60] (rev 21)<br />
00:15.1 Signal processing controller [1180]: Intel Corporation Sunrise Point-LP Serial IO I2C Controller #1 [8086:9d61] (rev 21)<br />
00:16.0 Communication controller [0780]: Intel Corporation Sunrise Point-LP CSME HECI #1 [8086:9d3a] (rev 21)<br />
00:1c.0 PCI bridge [0604]: Intel Corporation Sunrise Point-LP PCI Express Root Port #1 [8086:9d10] (rev f1)<br />
00:1c.4 PCI bridge [0604]: Intel Corporation Sunrise Point-LP PCI Express Root Port #5 [8086:9d14] (rev f1)<br />
00:1c.7 PCI bridge [0604]: Intel Corporation Sunrise Point-LP PCI Express Root Port #8 [8086:9d17] (rev f1)<br />
00:1d.0 PCI bridge [0604]: Intel Corporation Sunrise Point-LP PCI Express Root Port #9 [8086:9d18] (rev f1)<br />
00:1f.0 ISA bridge [0601]: Intel Corporation Sunrise Point LPC Controller/eSPI Controller [8086:9d4e] (rev 21)<br />
00:1f.2 Memory controller [0580]: Intel Corporation Sunrise Point-LP PMC [8086:9d21] (rev 21)<br />
00:1f.3 Audio device [0403]: Intel Corporation Sunrise Point-LP HD Audio [8086:9d71] (rev 21)<br />
00:1f.4 SMBus [0c05]: Intel Corporation Sunrise Point-LP SMBus [8086:9d23] (rev 21)<br />
01:00.0 3D controller [0302]: NVIDIA Corporation GP108M [GeForce MX150] [10de:1d12] (rev a1)<br />
02:00.0 Non-Volatile memory controller [0108]: Samsung Electronics Co Ltd NVMe SSD Controller SM961/PM961/SM963 [144d:a804]<br />
03:00.0 Network controller [0280]: Intel Corporation Wireless 8265 / 8275 [8086:24fd] (rev 78)<br />
<br />
$ lsusb <br />
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub<br />
Bus 001 Device 006: ID 04f3:0c1a Elan Microelectronics Corp. ELAN:Fingerprint<br />
Bus 001 Device 005: ID 0bda:0129 Realtek Semiconductor Corp. RTS5129 Card Reader Controller<br />
Bus 001 Device 004: ID 05c8:03b7 Cheng Uei Precision Industry Co., Ltd (Foxlink) XiaoMi USB 2.0 Webcam<br />
Bus 001 Device 003: ID 8087:0a2b Intel Corp. Bluetooth wireless interface<br />
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub<br />
<br />
--[[User:Misaka 0x34ca|Misaka 0x34ca]] ([[User talk:Misaka 0x34ca|talk]]) 03:04, 14 November 2021 (UTC)<br />
<br />
== Wrong information on fingerprint reader ==<br />
<br />
"Fingerprint reader 04f3:0c1a Yes"<br />
I have this laptop now with this fingerprint reader. He does not work. Verification always fails in all Linux distributions.<br />
<br />
{{Unsigned|2022-06-17T15:47:27|Tahl}}<br />
<br />
<br />
My Fingerprint reader works well with [[fprint]].<br />
<br />
--[[User:Misaka 0x34ca|Misaka 0x34ca]] ([[User talk:Misaka 0x34ca|talk]]) 14:55, 10 July 2022 (UTC)</div>
Misaka 0x34ca
https://wiki.archlinux.org/index.php?title=Intel_NUC_X15&diff=732422
Intel NUC X15
2022-06-11T03:27:51Z
<p>Misaka 0x34ca: /* Installation */ add merge destination of Intel graphics#Add support for 165Hz monitor</p>
<hr />
<div>[[Category:Intel]]<br />
{| class="wikitable" style="float: right;"<br />
|-<br />
! Hardware !! PCI/USB ID !! Working?<br />
|-<br />
| Bluetooth || {{ic|8087:0026}} || {{Yes}}<br />
|-<br />
| Webcam || {{ic|04f2:b71a}} || {{Yes}}<br />
|-<br />
| Ethernet || {{ic|8086:15f3}} || {{Yes}}<br />
|-<br />
| Wifi || {{ic|8086:43f0}} || {{Yes}}<br />
|-<br />
| GPU (Intel) || {{ic|8086:9a60}} || {{Yes}}<br />
|-<br />
| GPU (nvidia)<!-- C71FBx--> || {{ic|10de:249d}} || {{Yes}}<br />
|-<br />
| Touchpad || || {{Yes}}<br />
|-<br />
| Keyboard || || {{Yes}}<br />
|-<br />
| TPM || || {{Y|Untested}}<br />
|-<br />
| SD-card reader || {{ic|0bda:0316}} || {{Yes}}<br />
|-<br />
| Speakers || {{ic|8086:43c8}} || {{Yes}}<br />
|-<br />
| Microphone || || {{Yes}}<br />
|}<br />
<br />
== Installation ==<br />
<br />
This device can only boot in [[UEFI]] mode.<br />
<br />
This device has an IR camera that can be used for face recognition authentication, try [[Howdy]] if you want to use that feature.<br />
<br />
To control the keyboard RGB backlighting, you can try {{AUR|python-ite8291r3-ctl}}.<br />
<br />
Additional steps may be required to get the screen to use a high refresh rate, see [[Intel graphics#Add support for 165Hz monitor]] and [[Kernel mode setting#Forcing modes and EDID]].<br />
<br />
Double-tap to toggle the touchpad and some function keys may require additional drivers to work.<br />
<br />
== Accessibility ==<br />
<br />
The appearance of the UEFI is simple and not very colorful, so it might work well with OCR software. Navigation can be controlled by keyboard or mouse.<br />
<br />
{{Note|<br />
* By default, this device requires manual installation of memory and hard disk. Ask for help if you can not do it yourself. <br />
* Blind users should request the help of a sighted person to change UEFI settings. <br />
}}<br />
<br />
* System Setup : {{ic|F2}}<br />
* Boot Menu: {{ic|F10}}<br />
<br />
== Firmware ==<br />
<br />
[[Secure Boot]] custom keys work well on this device.<br />
<br />
[[fwupd]] does not support this device yet.<br />
<br />
== Function keys ==<br />
<br />
{| class="wikitable"<br />
|-<br />
! Key<br />
! Visible?<sup>1</sup><br />
! Marked?<sup>2</sup><br />
! Effect<br />
|-<br />
| {{ic|Fn+Esc}} || {{No}} || {{Yes}} || Toggles Fn lock<br />
|-<br />
| {{ic|Fn+F1}} || {{Yes}}<sup>3</sup> || {{Yes}} || {{ic|XF86Sleep}}<br />
|-<br />
| {{ic|Fn+F2}} || {{Yes}} || {{Yes}} || {{ic|XF86AudioMute}}<br />
|-<br />
| {{ic|Fn+F3}} || {{Yes}} || {{Yes}} || {{ic|XF86AudioLowerVolume}}<br />
|-<br />
| {{ic|Fn+F4}} || {{Yes}} || {{Yes}} || {{ic|XF86AudioRaiseVolume}}<br />
|-<br />
| {{ic|Fn+F5}} || {{No}} || {{Yes}} || {{ic|XF86AudioMicMute}}, does not work.<br />
|-<br />
| {{ic|Fn+F7}} || {{Yes}} || {{Yes}} || Inputs {{ic|Super_L+Ctrl_L+Keycode 93}} for toggling the touchpad, does not work<br />
|-<br />
| {{ic|Fn+F8}} || {{No}} || {{Yes}} || Toggles keyboard backlight brightness<br />
|-<br />
| {{ic|Fn+F9}} || {{Yes}} || {{Yes}} || {{ic|XF86MonBrightnessDown}}<br />
|-<br />
| {{ic|Fn+F10}} || {{Yes}} || {{Yes}} || {{ic|XF86MonBrightnessUp}}<br />
|-<br />
| {{ic|Fn+F11}} || {{Yes}} || {{Yes}} || Inputs {{ic|Super_L+P}}<br />
|-<br />
| {{ic|Fn+F12}} || {{No}} || {{Yes}} || For disabling the WiFi & Bluetooth, does not work.<br />
|-<br />
| {{ic|Fn+Insert}} || {{Yes}} || {{Yes}} || {{ic|Print}}<br />
|-<br />
| {{ic|Fn+Scroll_Lock}} || {{Yes}} || {{Yes}} || {{ic|Num_Lock}}<br />
|}<br />
<br />
# The key is visible to {{ic|xev}} and similar tools<br />
# The physical key has a symbol on it, which describes its function<br />
# systemd-logind handles this by default<br />
<br />
<!-- == See also == --></div>
Misaka 0x34ca
https://wiki.archlinux.org/index.php?title=Intel_NUC_X15&diff=732421
Intel NUC X15
2022-06-11T03:14:09Z
<p>Misaka 0x34ca: /* Installation */ add info to make face recognition and keyboard backlight work</p>
<hr />
<div>[[Category:Intel]]<br />
{| class="wikitable" style="float: right;"<br />
|-<br />
! Hardware !! PCI/USB ID !! Working?<br />
|-<br />
| Bluetooth || {{ic|8087:0026}} || {{Yes}}<br />
|-<br />
| Webcam || {{ic|04f2:b71a}} || {{Yes}}<br />
|-<br />
| Ethernet || {{ic|8086:15f3}} || {{Yes}}<br />
|-<br />
| Wifi || {{ic|8086:43f0}} || {{Yes}}<br />
|-<br />
| GPU (Intel) || {{ic|8086:9a60}} || {{Yes}}<br />
|-<br />
| GPU (nvidia)<!-- C71FBx--> || {{ic|10de:249d}} || {{Yes}}<br />
|-<br />
| Touchpad || || {{Yes}}<br />
|-<br />
| Keyboard || || {{Yes}}<br />
|-<br />
| TPM || || {{Y|Untested}}<br />
|-<br />
| SD-card reader || {{ic|0bda:0316}} || {{Yes}}<br />
|-<br />
| Speakers || {{ic|8086:43c8}} || {{Yes}}<br />
|-<br />
| Microphone || || {{Yes}}<br />
|}<br />
<br />
== Installation ==<br />
<br />
This device can only boot in [[UEFI]] mode.<br />
<br />
This device has an IR camera that can be used for face recognition authentication, try [[Howdy]] if you want to use that feature.<br />
<br />
To control the keyboard RGB backlighting, you can try {{AUR|python-ite8291r3-ctl}}.<br />
<br />
Additional steps may be required to get the screen to use a high refresh rate, see [[Intel_graphics#Add_support_for_165Hz_monitor]].<br />
<br />
Double-tap to toggle the touchpad and some function keys may require additional drivers to work.<br />
<br />
== Accessibility ==<br />
<br />
The appearance of the UEFI is simple and not very colorful, so it might work well with OCR software. Navigation can be controlled by keyboard or mouse.<br />
<br />
{{Note|<br />
* By default, this device requires manual installation of memory and hard disk. Ask for help if you can not do it yourself. <br />
* Blind users should request the help of a sighted person to change UEFI settings. <br />
}}<br />
<br />
* System Setup : {{ic|F2}}<br />
* Boot Menu: {{ic|F10}}<br />
<br />
== Firmware ==<br />
<br />
[[Secure Boot]] custom keys work well on this device.<br />
<br />
[[fwupd]] does not support this device yet.<br />
<br />
== Function keys ==<br />
<br />
{| class="wikitable"<br />
|-<br />
! Key<br />
! Visible?<sup>1</sup><br />
! Marked?<sup>2</sup><br />
! Effect<br />
|-<br />
| {{ic|Fn+Esc}} || {{No}} || {{Yes}} || Toggles Fn lock<br />
|-<br />
| {{ic|Fn+F1}} || {{Yes}}<sup>3</sup> || {{Yes}} || {{ic|XF86Sleep}}<br />
|-<br />
| {{ic|Fn+F2}} || {{Yes}} || {{Yes}} || {{ic|XF86AudioMute}}<br />
|-<br />
| {{ic|Fn+F3}} || {{Yes}} || {{Yes}} || {{ic|XF86AudioLowerVolume}}<br />
|-<br />
| {{ic|Fn+F4}} || {{Yes}} || {{Yes}} || {{ic|XF86AudioRaiseVolume}}<br />
|-<br />
| {{ic|Fn+F5}} || {{No}} || {{Yes}} || {{ic|XF86AudioMicMute}}, does not work.<br />
|-<br />
| {{ic|Fn+F7}} || {{Yes}} || {{Yes}} || Inputs {{ic|Super_L+Ctrl_L+Keycode 93}} for toggling the touchpad, does not work<br />
|-<br />
| {{ic|Fn+F8}} || {{No}} || {{Yes}} || Toggles keyboard backlight brightness<br />
|-<br />
| {{ic|Fn+F9}} || {{Yes}} || {{Yes}} || {{ic|XF86MonBrightnessDown}}<br />
|-<br />
| {{ic|Fn+F10}} || {{Yes}} || {{Yes}} || {{ic|XF86MonBrightnessUp}}<br />
|-<br />
| {{ic|Fn+F11}} || {{Yes}} || {{Yes}} || Inputs {{ic|Super_L+P}}<br />
|-<br />
| {{ic|Fn+F12}} || {{No}} || {{Yes}} || For disabling the WiFi & Bluetooth, does not work.<br />
|-<br />
| {{ic|Fn+Insert}} || {{Yes}} || {{Yes}} || {{ic|Print}}<br />
|-<br />
| {{ic|Fn+Scroll_Lock}} || {{Yes}} || {{Yes}} || {{ic|Num_Lock}}<br />
|}<br />
<br />
# The key is visible to {{ic|xev}} and similar tools<br />
# The physical key has a symbol on it, which describes its function<br />
# systemd-logind handles this by default<br />
<br />
<!-- == See also == --></div>
Misaka 0x34ca
https://wiki.archlinux.org/index.php?title=Intel_NUC_X15&diff=732241
Intel NUC X15
2022-06-09T13:46:41Z
<p>Misaka 0x34ca: remove usb id of RGB keyboard backlight controller actually</p>
<hr />
<div>[[Category:Intel]]<br />
{| class="wikitable" style="float: right;"<br />
|-<br />
! Hardware !! PCI/USB ID !! Working?<br />
|-<br />
| Bluetooth || {{ic|8087:0026}} || {{Yes}}<br />
|-<br />
| Webcam || {{ic|04f2:b71a}} || {{Yes}}<br />
|-<br />
| Ethernet || {{ic|8086:15f3}} || {{Yes}}<br />
|-<br />
| Wifi || {{ic|8086:43f0}} || {{Yes}}<br />
|-<br />
| GPU (Intel) || {{ic|8086:9a60}} || {{Yes}}<br />
|-<br />
| GPU (nvidia)<!-- C71FBx--> || {{ic|10de:249d}} || {{Yes}}<br />
|-<br />
| Touchpad || || {{Yes}}<br />
|-<br />
| Keyboard || || {{Yes}}<br />
|-<br />
| TPM || || {{Y|Untested}}<br />
|-<br />
| SD-card reader || {{ic|0bda:0316}} || {{Yes}}<br />
|-<br />
| Speakers || {{ic|8086:43c8}} || {{Yes}}<br />
|-<br />
| Microphone || || {{Yes}}<br />
|}<br />
<br />
== Installation ==<br />
<br />
This device can only boot in [[UEFI]] mode.<br />
<br />
Additional steps may be required to get the screen to use a high refresh rate.<br />
<br />
Additional drivers may be required for RGB light control, double tap toggle touchpad and some function keys to work.<br />
<br />
== Accessibility ==<br />
<br />
The appearance of the UEFI is simple and not very colorful, so it might work well with OCR software. Navigation can be controlled by keyboard or mouse.<br />
<br />
{{Note|<br />
* By default, this device requires manual installation of memory and hard disk. Ask for help if you can not do it yourself. <br />
* Blind users should request the help of a sighted person to change UEFI settings. <br />
}}<br />
<br />
* System Setup : {{ic|F2}}<br />
* Boot Menu: {{ic|F10}}<br />
<br />
== Firmware ==<br />
<br />
[[Secure Boot]] custom keys work well on this device.<br />
<br />
[[fwupd]] does not support this device yet.<br />
<br />
== Function keys ==<br />
<br />
{| class="wikitable"<br />
|-<br />
! Key<br />
! Visible?<sup>1</sup><br />
! Marked?<sup>2</sup><br />
! Effect<br />
|-<br />
| {{ic|Fn+Esc}} || {{No}} || {{Yes}} || Toggles Fn lock<br />
|-<br />
| {{ic|Fn+F1}} || {{Yes}}<sup>3</sup> || {{Yes}} || {{ic|XF86Sleep}}<br />
|-<br />
| {{ic|Fn+F2}} || {{Yes}} || {{Yes}} || {{ic|XF86AudioMute}}<br />
|-<br />
| {{ic|Fn+F3}} || {{Yes}} || {{Yes}} || {{ic|XF86AudioLowerVolume}}<br />
|-<br />
| {{ic|Fn+F4}} || {{Yes}} || {{Yes}} || {{ic|XF86AudioRaiseVolume}}<br />
|-<br />
| {{ic|Fn+F5}} || {{No}} || {{Yes}} || {{ic|XF86AudioMicMute}}, does not work.<br />
|-<br />
| {{ic|Fn+F7}} || {{Yes}} || {{Yes}} || Inputs {{ic|Super_L+Ctrl_L+Keycode 93}} for toggling the touchpad, does not work<br />
|-<br />
| {{ic|Fn+F8}} || {{No}} || {{Yes}} || Toggles keyboard backlight brightness<br />
|-<br />
| {{ic|Fn+F9}} || {{Yes}} || {{Yes}} || {{ic|XF86MonBrightnessDown}}<br />
|-<br />
| {{ic|Fn+F10}} || {{Yes}} || {{Yes}} || {{ic|XF86MonBrightnessUp}}<br />
|-<br />
| {{ic|Fn+F11}} || {{Yes}} || {{Yes}} || Inputs {{ic|Super_L+P}}<br />
|-<br />
| {{ic|Fn+F12}} || {{No}} || {{Yes}} || For disabling the WiFi & Bluetooth, does not work.<br />
|-<br />
| {{ic|Fn+Insert}} || {{Yes}} || {{Yes}} || {{ic|Print}}<br />
|-<br />
| {{ic|Fn+Scroll_Lock}} || {{Yes}} || {{Yes}} || {{ic|Num_Lock}}<br />
|}<br />
<br />
# The key is visible to {{ic|xev}} and similar tools<br />
# The physical key has a symbol on it, which describes its function<br />
# systemd-logind handles this by default<br />
<br />
<!-- == See also == --></div>
Misaka 0x34ca
https://wiki.archlinux.org/index.php?title=Intel_NUC_X15&diff=731732
Intel NUC X15
2022-06-05T13:01:24Z
<p>Misaka 0x34ca: /* Installation */ rgb light also doesn't work, openrgb doesn't support this device yet</p>
<hr />
<div>[[Category:Intel]]<br />
{| class="wikitable" style="float: right;"<br />
|-<br />
! Hardware !! PCI/USB ID !! Working?<br />
|-<br />
| Bluetooth || {{ic|8087:0026}} || {{Yes}}<br />
|-<br />
| Webcam || {{ic|04f2:b71a}} || {{Yes}}<br />
|-<br />
| Ethernet || {{ic|8086:15f3}} || {{Yes}}<br />
|-<br />
| Wifi || {{ic|8086:43f0}} || {{Yes}}<br />
|-<br />
| GPU(Intel) || {{ic|8086:9a60}} || {{Yes}}<br />
|-<br />
| GPU(nvidia)<!-- C71FBx--> || {{ic|10de:249d}} || {{Yes}}<br />
|-<br />
| Touchpad || || {{Yes}}<br />
|-<br />
| Keyboard || {{ic|048d:6006}} || {{Yes}}<br />
|-<br />
| TPM || || {{Y|Untested}}<br />
|-<br />
| SD-card reader || {{ic|0bda:0316}} || {{Yes}}<br />
|-<br />
| Speakers || {{ic|8086:43c8}} || {{Yes}}<br />
|-<br />
| Microphone || || {{Yes}}<br />
|}<br />
<br />
== Installation ==<br />
<br />
This device can only boot in [[Unified Extensible Firmware Interfacet|UEFI]] mode.<br />
<br />
Additional steps may be required to get the screen to use a high refresh rate.<br />
<br />
Additional drivers may be required for RGB light control, double tap toggle touchpad and some function keys to work.<br />
<br />
== Accessibility ==<br />
<br />
{{Note|By default, this device requires manual installation of memory and hard disk. Ask for help if you can't do it yourself.}}<br />
<br />
The appearance of the BIOS is simple and not very colorful, so it might work well with OCR software. Navigation can be controlled by keyboard or mouse.<br />
<br />
{{Note|Blind users should request the help of a sighted person to change BIOS settings}}<br />
<br />
* System Setup : {{ic|F2}}<br />
* Boot Menu: {{ic|F10}}<br />
<br />
== Firmware ==<br />
<br />
[[Unified Extensible Firmware Interface/Secure Boot|SecureBoot]] custom keys work well on this device.<br />
<br />
[[fwupd]] does not support this device yet.<br />
<br />
== Function keys ==<br />
<br />
{| class="wikitable"<br />
|-<br />
! Key<br />
! Visible?<sup>1</sup><br />
! Marked?<sup>2</sup><br />
! Effect<br />
|-<br />
| {{ic|Fn+Esc}} || {{No}} || {{Yes}} || Toggles Fn lock<br />
|-<br />
| {{ic|Fn+F1}} || {{Yes}}<sup>3</sup> || {{Yes}} || {{ic|XF86Sleep}}<br />
|-<br />
| {{ic|Fn+F2}} || {{Yes}} || {{Yes}} || {{ic|XF86AudioMute}}<br />
|-<br />
| {{ic|Fn+F3}} || {{Yes}} || {{Yes}} || {{ic|XF86AudioLowerVolume}}<br />
|-<br />
| {{ic|Fn+F4}} || {{Yes}} || {{Yes}} || {{ic|XF86AudioRaiseVolume}}<br />
|-<br />
| {{ic|Fn+F5}} || {{No}} || {{Yes}} || For disabling the mic but doesn't work<br />
|-<br />
| {{ic|Fn+F6}} || {{No}} || {{No}} || No change, unmarked keybinds<br />
|-<br />
| {{ic|Fn+F7}} || {{Yes}} || {{Yes}} || Inputs {{ic|Super_L+Ctrl_L+Keycode 93}} for toggling the touchpad but doesn't work<br />
|-<br />
| {{ic|Fn+F8}} || {{No}} || {{Yes}} || Toggles keyboard backlight brightness<br />
|-<br />
| {{ic|Fn+F9}} || {{Yes}} || {{Yes}} || {{ic|XF86MonBrightnessDown}}<br />
|-<br />
| {{ic|Fn+F10}} || {{Yes}} || {{Yes}} || {{ic|XF86MonBrightnessUp}}<br />
|-<br />
| {{ic|Fn+F11}} || {{Yes}} || {{Yes}} || Inputs {{ic|Super_L+P}}<br />
|-<br />
| {{ic|Fn+F12}} || {{No}} || {{Yes}} || For disabling the wifi&bluetooth but doesn't work<br />
|-<br />
| {{ic|Fn+Insert}} || {{Yes}} || {{Yes}} || {{ic|Print}}<br />
|-<br />
| {{ic|Fn+Scroll_Lock}} || {{Yes}} || {{Yes}} || {{ic|Num_Lock}}<br />
|}<br />
<br />
# The key is visible to {{ic|xev}} and similar tools<br />
# The physical key has a symbol on it, which describes its function<br />
# systemd-logind handles this by default<br />
<br />
<!-- == See also == --></div>
Misaka 0x34ca
https://wiki.archlinux.org/index.php?title=Intel_NUC_X15&diff=731731
Intel NUC X15
2022-06-05T12:49:53Z
<p>Misaka 0x34ca: Create page Intel NUC X15 for LAPKC51E/LAPKC71E/LAPKC71F</p>
<hr />
<div>[[Category:Intel]]<br />
{| class="wikitable" style="float: right;"<br />
|-<br />
! Hardware !! PCI/USB ID !! Working?<br />
|-<br />
| Bluetooth || {{ic|8087:0026}} || {{Yes}}<br />
|-<br />
| Webcam || {{ic|04f2:b71a}} || {{Yes}}<br />
|-<br />
| Ethernet || {{ic|8086:15f3}} || {{Yes}}<br />
|-<br />
| Wifi || {{ic|8086:43f0}} || {{Yes}}<br />
|-<br />
| GPU(Intel) || {{ic|8086:9a60}} || {{Yes}}<br />
|-<br />
| GPU(nvidia)<!-- C71FBx--> || {{ic|10de:249d}} || {{Yes}}<br />
|-<br />
| Touchpad || || {{Yes}}<br />
|-<br />
| Keyboard || {{ic|048d:6006}} || {{Yes}}<br />
|-<br />
| TPM || || {{Y|Untested}}<br />
|-<br />
| SD-card reader || {{ic|0bda:0316}} || {{Yes}}<br />
|-<br />
| Speakers || {{ic|8086:43c8}} || {{Yes}}<br />
|-<br />
| Microphone || || {{Yes}}<br />
|}<br />
<br />
== Installation ==<br />
<br />
This device can only boot in [[Unified Extensible Firmware Interfacet|UEFI]] mode.<br />
<br />
Additional steps may be required to get the screen to use a high refresh rate.<br />
<br />
Additional drivers may be required for double tap switch touchpads and some function keys to work.<br />
<br />
== Accessibility ==<br />
<br />
{{Note|By default, this device requires manual installation of memory and hard disk. Ask for help if you can't do it yourself.}}<br />
<br />
The appearance of the BIOS is simple and not very colorful, so it might work well with OCR software. Navigation can be controlled by keyboard or mouse.<br />
<br />
{{Note|Blind users should request the help of a sighted person to change BIOS settings}}<br />
<br />
* System Setup : {{ic|F2}}<br />
* Boot Menu: {{ic|F10}}<br />
<br />
== Firmware ==<br />
<br />
[[Unified Extensible Firmware Interface/Secure Boot|SecureBoot]] custom keys work well on this device.<br />
<br />
[[fwupd]] does not support this device yet.<br />
<br />
== Function keys ==<br />
<br />
{| class="wikitable"<br />
|-<br />
! Key<br />
! Visible?<sup>1</sup><br />
! Marked?<sup>2</sup><br />
! Effect<br />
|-<br />
| {{ic|Fn+Esc}} || {{No}} || {{Yes}} || Toggles Fn lock<br />
|-<br />
| {{ic|Fn+F1}} || {{Yes}}<sup>3</sup> || {{Yes}} || {{ic|XF86Sleep}}<br />
|-<br />
| {{ic|Fn+F2}} || {{Yes}} || {{Yes}} || {{ic|XF86AudioMute}}<br />
|-<br />
| {{ic|Fn+F3}} || {{Yes}} || {{Yes}} || {{ic|XF86AudioLowerVolume}}<br />
|-<br />
| {{ic|Fn+F4}} || {{Yes}} || {{Yes}} || {{ic|XF86AudioRaiseVolume}}<br />
|-<br />
| {{ic|Fn+F5}} || {{No}} || {{Yes}} || For disabling the mic but doesn't work<br />
|-<br />
| {{ic|Fn+F6}} || {{No}} || {{No}} || No change, unmarked keybinds<br />
|-<br />
| {{ic|Fn+F7}} || {{Yes}} || {{Yes}} || Inputs {{ic|Super_L+Ctrl_L+Keycode 93}} for toggling the touchpad but doesn't work<br />
|-<br />
| {{ic|Fn+F8}} || {{No}} || {{Yes}} || Toggles keyboard backlight brightness<br />
|-<br />
| {{ic|Fn+F9}} || {{Yes}} || {{Yes}} || {{ic|XF86MonBrightnessDown}}<br />
|-<br />
| {{ic|Fn+F10}} || {{Yes}} || {{Yes}} || {{ic|XF86MonBrightnessUp}}<br />
|-<br />
| {{ic|Fn+F11}} || {{Yes}} || {{Yes}} || Inputs {{ic|Super_L+P}}<br />
|-<br />
| {{ic|Fn+F12}} || {{No}} || {{Yes}} || For disabling the wifi&bluetooth but doesn't work<br />
|-<br />
| {{ic|Fn+Insert}} || {{Yes}} || {{Yes}} || {{ic|Print}}<br />
|-<br />
| {{ic|Fn+Scroll_Lock}} || {{Yes}} || {{Yes}} || {{ic|Num_Lock}}<br />
|}<br />
<br />
# The key is visible to {{ic|xev}} and similar tools<br />
# The physical key has a symbol on it, which describes its function<br />
# systemd-logind handles this by default<br />
<br />
<!-- == See also == --></div>
Misaka 0x34ca
https://wiki.archlinux.org/index.php?title=Xiaomi_Mi_Notebook_Pro_15.6&diff=731306
Xiaomi Mi Notebook Pro 15.6
2022-06-02T00:56:35Z
<p>Misaka 0x34ca: fill hardware information table</p>
<hr />
<div>[[Category:Xiaomi]]<br />
[[ja:Xiaomi Mi Notebook Pro 15.6 (TM1701)]]<br />
{{Laptop style|Needs PCI/USB IDs, firmware secion and an improved function keys table}}<br />
{| class="wikitable" style="float: right;"<br />
|-<br />
! Hardware !! PCI/USB ID !! Working?<br />
|-<br />
| Bluetooth || {{ic|8087:0a2b}} || {{Yes}}<br />
|-<br />
| Webcam || {{ic|05c8:03b7}} || {{Yes}}<br />
|-<br />
| Wifi || {{ic|8086:24fd}} || {{Yes}}<br />
|-<br />
| GPU (Intel) || {{ic|8086:5917}} || {{Yes}}<br />
|-<br />
| GPU (nvidia) || {{ic|10de:1d12}} || {{Yes}}<br />
|-<br />
| Touchpad || || {{Yes}}<br />
|-<br />
| Keyboard || || {{Yes}}<br />
|-<br />
| TPM || || {{Yes}}<br />
|-<br />
| Fingerprint reader || {{ic|04f3:0c1a}} || {{Yes}}<br />
|-<br />
| SD-card reader || {{ic|0bda:0129}} || {{Yes}}<br />
|-<br />
| Speakers || {{ic|8086:9d71}} || {{Yes}}<br />
|-<br />
| Microphone || || {{Yes}}<br />
|}<br />
<br />
== Installation ==<br />
<br />
Enter the UEFI menu by pressing F2 during Boot and disable the password and Secure Boot.<br />
<br />
* Security -> set password<br />
* Security -> Disable Secure Boot<br />
* reset the password by setting the password again but letting the "New Password" fields blank<br />
<br />
== Function keys ==<br />
<br />
{| class="wikitable"<br />
! Key<br />
! Effect<br />
|-<br />
| {{ic|Esc}}<br />
| Enables/disables Fn lock<br />
|-<br />
| {{ic|F1}}<br />
| {{ic|XF86AudioMute}}<br />
|-<br />
| {{ic|F2}}<br />
| {{ic|XF86AudioLowerVolume}}<br />
|-<br />
| {{ic|F3}}<br />
| {{ic|XF86AudioRaiseVolume}}<br />
|-<br />
| {{ic|F4}}<br />
| {{ic|XF86MonBrightnessDown}}<br />
|-<br />
| {{ic|F5}}<br />
| {{ic|XF86MonBrightnessUp}}<br />
|-<br />
| {{ic|F6}}<br />
| {{ic|Super_L + P}}<br />
|-<br />
| {{ic|F7}}<br />
| Invokes user-defined action if "xiaomi_wmi" module is loaded<br />
|-<br />
| {{ic|F8}}<br />
| {{ic|Super_L + Tab}}<br />
|-<br />
| {{ic|F9}}<br />
| Enables/disables touchpad<br />
|-<br />
| {{ic|F10}}<br />
| Enables/disables keyboard backlight<br />
|-<br />
| {{ic|F11}}<br />
| {{ic|Print}}<br />
|-<br />
| {{ic|F12}}<br />
| {{ic|Insert}}<br />
|}<br />
<br />
== Display ==<br />
<br />
Factory display calibration is poor. Check the panel model:<br />
<br />
$ edid-decode < /sys/class/drm/card0-eDP-1/edid | grep Alphanumeric<br />
<br />
If it is NV156FHM-N61, try the [[ICC profiles]] at [https://www.notebookcheck.net/uploads/tx_nbc2/NV156FHM_N61.icm].<br />
<br />
The path to the backlight is non-standard and causes tools like {{pkg|xorg-xbacklight}} to not work. To fix this issue, you have to setup Intel driver and add Backlight option to respective X-Org configuration file:<br />
<br />
{{hc|/etc/X11/xorg.conf.d/10-backlight.conf|2=<br />
Section "Device" <br />
Identifier "Card0" <br />
Driver "intel" <br />
Option "Backlight" "intel_backlight" <br />
BusID "PCI:0:2:0" <br />
EndSection <br />
}}<br />
<br />
== Touchpad troubles ==<br />
<br />
You may face a problem when the kernel sees 2 touchpad devices<br />
if you have multiple touchpad devices displayed in libinput list-devices<br />
Try to add i8042.noaux kernel param<br />
<br />
== TPM issues ==<br />
<br />
BIOS used in this model does not allow enabling SHA256 PCR bank, all measurements are done to SHA1 PCR bank only.</div>
Misaka 0x34ca
https://wiki.archlinux.org/index.php?title=Xiaomi_Mi_Notebook_Pro_15.6&diff=731305
Xiaomi Mi Notebook Pro 15.6
2022-06-02T00:46:00Z
<p>Misaka 0x34ca: reorder hardware information table</p>
<hr />
<div>[[Category:Xiaomi]]<br />
[[ja:Xiaomi Mi Notebook Pro 15.6 (TM1701)]]<br />
{{Laptop style|Needs PCI/USB IDs, firmware secion and an improved function keys table}}<br />
{| class="wikitable" style="float: right;"<br />
|-<br />
! Hardware !! PCI/USB ID !! Working?<br />
|-<br />
| Bluetooth || {{ic|8086:0a2b}} || {{Yes}}<br />
|-<br />
| Webcam || || {{Yes}}<br />
|-<br />
| Wireless || {{ic|8086:24fd}} || {{Yes}}<br />
|-<br />
| GPU (Intel) || {{ic|8086:5917}} || {{Yes}}<br />
|-<br />
| GPU (nvidia) || {{ic|10de:1d12}} || {{Yes}}<br />
|-<br />
| Touchpad || || {{Yes}}<br />
|-<br />
| Keyboard || || {{Yes}}<br />
|-<br />
| TPM || || {{Yes}}<br />
|-<br />
| Audio || {{ic|8086:9d71}} || {{Yes}}<br />
|-<br />
| Function Keys || || {{Yes}}<br />
|}<br />
<br />
== Installation ==<br />
<br />
Enter the UEFI menu by pressing F2 during Boot and disable the password and Secure Boot.<br />
<br />
* Security -> set password<br />
* Security -> Disable Secure Boot<br />
* reset the password by setting the password again but letting the "New Password" fields blank<br />
<br />
== Function keys ==<br />
<br />
{| class="wikitable"<br />
! Key<br />
! Effect<br />
|-<br />
| {{ic|Esc}}<br />
| Enables/disables Fn lock<br />
|-<br />
| {{ic|F1}}<br />
| {{ic|XF86AudioMute}}<br />
|-<br />
| {{ic|F2}}<br />
| {{ic|XF86AudioLowerVolume}}<br />
|-<br />
| {{ic|F3}}<br />
| {{ic|XF86AudioRaiseVolume}}<br />
|-<br />
| {{ic|F4}}<br />
| {{ic|XF86MonBrightnessDown}}<br />
|-<br />
| {{ic|F5}}<br />
| {{ic|XF86MonBrightnessUp}}<br />
|-<br />
| {{ic|F6}}<br />
| {{ic|Super_L + P}}<br />
|-<br />
| {{ic|F7}}<br />
| Invokes user-defined action if "xiaomi_wmi" module is loaded<br />
|-<br />
| {{ic|F8}}<br />
| {{ic|Super_L + Tab}}<br />
|-<br />
| {{ic|F9}}<br />
| Enables/disables touchpad<br />
|-<br />
| {{ic|F10}}<br />
| Enables/disables keyboard backlight<br />
|-<br />
| {{ic|F11}}<br />
| {{ic|Print}}<br />
|-<br />
| {{ic|F12}}<br />
| {{ic|Insert}}<br />
|}<br />
<br />
== Display ==<br />
<br />
Factory display calibration is poor. Check the panel model:<br />
<br />
$ edid-decode < /sys/class/drm/card0-eDP-1/edid | grep Alphanumeric<br />
<br />
If it is NV156FHM-N61, try the [[ICC profiles]] at [https://www.notebookcheck.net/uploads/tx_nbc2/NV156FHM_N61.icm].<br />
<br />
The path to the backlight is non-standard and causes tools like {{pkg|xorg-xbacklight}} to not work. To fix this issue, you have to setup Intel driver and add Backlight option to respective X-Org configuration file:<br />
<br />
{{hc|/etc/X11/xorg.conf.d/10-backlight.conf|2=<br />
Section "Device" <br />
Identifier "Card0" <br />
Driver "intel" <br />
Option "Backlight" "intel_backlight" <br />
BusID "PCI:0:2:0" <br />
EndSection <br />
}}<br />
<br />
== Touchpad troubles ==<br />
<br />
You may face a problem when the kernel sees 2 touchpad devices<br />
if you have multiple touchpad devices displayed in libinput list-devices<br />
Try to add i8042.noaux kernel param<br />
<br />
== TPM issues ==<br />
<br />
BIOS used in this model does not allow enabling SHA256 PCR bank, all measurements are done to SHA1 PCR bank only.</div>
Misaka 0x34ca
https://wiki.archlinux.org/index.php?title=Talk:Xiaomi_Mi_Notebook_Pro_15.6&diff=701914
Talk:Xiaomi Mi Notebook Pro 15.6
2021-11-14T03:15:43Z
<p>Misaka 0x34ca: remove the nvme ssd I installed myself</p>
<hr />
<div>I don't know which Xiaomi Mi Notebook Pro 15.6 this page refers to.<br />
<br />
For my Xiaomi Mi Notebook Pro 15.6 2017 TM1701, the hardware PCI/USB ID are as below.<br />
<br />
$ lspci -nn<br />
00:00.0 Host bridge [0600]: Intel Corporation Xeon E3-1200 v6/7th Gen Core Processor Host Bridge/DRAM Registers [8086:5914] (rev 08)<br />
00:02.0 VGA compatible controller [0300]: Intel Corporation UHD Graphics 620 [8086:5917] (rev 07)<br />
00:08.0 System peripheral [0880]: Intel Corporation Xeon E3-1200 v5/v6 / E3-1500 v5 / 6th/7th/8th Gen Core Processor Gaussian Mixture Model [8086:1911]<br />
00:14.0 USB controller [0c03]: Intel Corporation Sunrise Point-LP USB 3.0 xHCI Controller [8086:9d2f] (rev 21)<br />
00:14.2 Signal processing controller [1180]: Intel Corporation Sunrise Point-LP Thermal subsystem [8086:9d31] (rev 21)<br />
00:15.0 Signal processing controller [1180]: Intel Corporation Sunrise Point-LP Serial IO I2C Controller #0 [8086:9d60] (rev 21)<br />
00:15.1 Signal processing controller [1180]: Intel Corporation Sunrise Point-LP Serial IO I2C Controller #1 [8086:9d61] (rev 21)<br />
00:16.0 Communication controller [0780]: Intel Corporation Sunrise Point-LP CSME HECI #1 [8086:9d3a] (rev 21)<br />
00:1c.0 PCI bridge [0604]: Intel Corporation Sunrise Point-LP PCI Express Root Port #1 [8086:9d10] (rev f1)<br />
00:1c.4 PCI bridge [0604]: Intel Corporation Sunrise Point-LP PCI Express Root Port #5 [8086:9d14] (rev f1)<br />
00:1c.7 PCI bridge [0604]: Intel Corporation Sunrise Point-LP PCI Express Root Port #8 [8086:9d17] (rev f1)<br />
00:1d.0 PCI bridge [0604]: Intel Corporation Sunrise Point-LP PCI Express Root Port #9 [8086:9d18] (rev f1)<br />
00:1f.0 ISA bridge [0601]: Intel Corporation Sunrise Point LPC Controller/eSPI Controller [8086:9d4e] (rev 21)<br />
00:1f.2 Memory controller [0580]: Intel Corporation Sunrise Point-LP PMC [8086:9d21] (rev 21)<br />
00:1f.3 Audio device [0403]: Intel Corporation Sunrise Point-LP HD Audio [8086:9d71] (rev 21)<br />
00:1f.4 SMBus [0c05]: Intel Corporation Sunrise Point-LP SMBus [8086:9d23] (rev 21)<br />
01:00.0 3D controller [0302]: NVIDIA Corporation GP108M [GeForce MX150] [10de:1d12] (rev a1)<br />
02:00.0 Non-Volatile memory controller [0108]: Samsung Electronics Co Ltd NVMe SSD Controller SM961/PM961/SM963 [144d:a804]<br />
03:00.0 Network controller [0280]: Intel Corporation Wireless 8265 / 8275 [8086:24fd] (rev 78)<br />
<br />
$ lsusb <br />
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub<br />
Bus 001 Device 006: ID 04f3:0c1a Elan Microelectronics Corp. ELAN:Fingerprint<br />
Bus 001 Device 005: ID 0bda:0129 Realtek Semiconductor Corp. RTS5129 Card Reader Controller<br />
Bus 001 Device 004: ID 05c8:03b7 Cheng Uei Precision Industry Co., Ltd (Foxlink) XiaoMi USB 2.0 Webcam<br />
Bus 001 Device 003: ID 8087:0a2b Intel Corp. Bluetooth wireless interface<br />
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub<br />
<br />
--[[User:Misaka 0x34ca|Misaka 0x34ca]] ([[User talk:Misaka 0x34ca|talk]]) 03:04, 14 November 2021 (UTC)</div>
Misaka 0x34ca
https://wiki.archlinux.org/index.php?title=Talk:Xiaomi_Mi_Notebook_Pro_15.6&diff=701913
Talk:Xiaomi Mi Notebook Pro 15.6
2021-11-14T03:04:31Z
<p>Misaka 0x34ca: Created page with "I don't know which Xiaomi Mi Notebook Pro 15.6 this page refers to. For my Xiaomi Mi Notebook Pro 15.6 2017 TM1701, the hardware PCI/USB ID are as below. $ lspci -nn 00:00..."</p>
<hr />
<div>I don't know which Xiaomi Mi Notebook Pro 15.6 this page refers to.<br />
<br />
For my Xiaomi Mi Notebook Pro 15.6 2017 TM1701, the hardware PCI/USB ID are as below.<br />
<br />
$ lspci -nn<br />
00:00.0 Host bridge [0600]: Intel Corporation Xeon E3-1200 v6/7th Gen Core Processor Host Bridge/DRAM Registers [8086:5914] (rev 08)<br />
00:02.0 VGA compatible controller [0300]: Intel Corporation UHD Graphics 620 [8086:5917] (rev 07)<br />
00:08.0 System peripheral [0880]: Intel Corporation Xeon E3-1200 v5/v6 / E3-1500 v5 / 6th/7th/8th Gen Core Processor Gaussian Mixture Model [8086:1911]<br />
00:14.0 USB controller [0c03]: Intel Corporation Sunrise Point-LP USB 3.0 xHCI Controller [8086:9d2f] (rev 21)<br />
00:14.2 Signal processing controller [1180]: Intel Corporation Sunrise Point-LP Thermal subsystem [8086:9d31] (rev 21)<br />
00:15.0 Signal processing controller [1180]: Intel Corporation Sunrise Point-LP Serial IO I2C Controller #0 [8086:9d60] (rev 21)<br />
00:15.1 Signal processing controller [1180]: Intel Corporation Sunrise Point-LP Serial IO I2C Controller #1 [8086:9d61] (rev 21)<br />
00:16.0 Communication controller [0780]: Intel Corporation Sunrise Point-LP CSME HECI #1 [8086:9d3a] (rev 21)<br />
00:1c.0 PCI bridge [0604]: Intel Corporation Sunrise Point-LP PCI Express Root Port #1 [8086:9d10] (rev f1)<br />
00:1c.4 PCI bridge [0604]: Intel Corporation Sunrise Point-LP PCI Express Root Port #5 [8086:9d14] (rev f1)<br />
00:1c.7 PCI bridge [0604]: Intel Corporation Sunrise Point-LP PCI Express Root Port #8 [8086:9d17] (rev f1)<br />
00:1d.0 PCI bridge [0604]: Intel Corporation Sunrise Point-LP PCI Express Root Port #9 [8086:9d18] (rev f1)<br />
00:1f.0 ISA bridge [0601]: Intel Corporation Sunrise Point LPC Controller/eSPI Controller [8086:9d4e] (rev 21)<br />
00:1f.2 Memory controller [0580]: Intel Corporation Sunrise Point-LP PMC [8086:9d21] (rev 21)<br />
00:1f.3 Audio device [0403]: Intel Corporation Sunrise Point-LP HD Audio [8086:9d71] (rev 21)<br />
00:1f.4 SMBus [0c05]: Intel Corporation Sunrise Point-LP SMBus [8086:9d23] (rev 21)<br />
01:00.0 3D controller [0302]: NVIDIA Corporation GP108M [GeForce MX150] [10de:1d12] (rev a1)<br />
02:00.0 Non-Volatile memory controller [0108]: Samsung Electronics Co Ltd NVMe SSD Controller SM961/PM961/SM963 [144d:a804]<br />
03:00.0 Network controller [0280]: Intel Corporation Wireless 8265 / 8275 [8086:24fd] (rev 78)<br />
04:00.0 Non-Volatile memory controller [0108]: Sandisk Corp Device [15b7:5019] (rev 01)<br />
<br />
$ lsusb <br />
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub<br />
Bus 001 Device 006: ID 04f3:0c1a Elan Microelectronics Corp. ELAN:Fingerprint<br />
Bus 001 Device 005: ID 0bda:0129 Realtek Semiconductor Corp. RTS5129 Card Reader Controller<br />
Bus 001 Device 004: ID 05c8:03b7 Cheng Uei Precision Industry Co., Ltd (Foxlink) XiaoMi USB 2.0 Webcam<br />
Bus 001 Device 003: ID 8087:0a2b Intel Corp. Bluetooth wireless interface<br />
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub<br />
<br />
--[[User:Misaka 0x34ca|Misaka 0x34ca]] ([[User talk:Misaka 0x34ca|talk]]) 03:04, 14 November 2021 (UTC)</div>
Misaka 0x34ca