https://wiki.archlinux.org/api.php?action=feedcontributions&user=Goetzc&feedformat=atomArchWiki - User contributions [en]2024-03-29T06:43:53ZUser contributionsMediaWiki 1.41.0https://wiki.archlinux.org/index.php?title=Makepkg&diff=789475Makepkg2023-10-07T15:58:54Z<p>Goetzc: add additional option to specify MAKEFLAGS</p>
<hr />
<div>{{Lowercase title}}<br />
[[Category:Package development]]<br />
[[Category:About Arch]]<br />
[[Category:Commands]]<br />
[[es:Makepkg]]<br />
[[fa:Makepkg]]<br />
[[fr:Makepkg]]<br />
[[ja:Makepkg]]<br />
[[pt:Makepkg]]<br />
[[ru:Makepkg]]<br />
[[zh-hans:Makepkg]]<br />
{{Related articles start}}<br />
{{Related|Creating packages}}<br />
{{Related|PKGBUILD}}<br />
{{Related|.SRCINFO}}<br />
{{Related|Arch User Repository}}<br />
{{Related|pacman}}<br />
{{Related|Official repositories}}<br />
{{Related|Arch build system}}<br />
{{Related articles end}}<br />
<br />
[https://gitlab.archlinux.org/pacman/pacman/blob/master/scripts/makepkg.sh.in makepkg] is a script to automate the building of packages. The requirements for using the script are a build-capable Unix platform and a [[PKGBUILD]].<br />
<br />
''makepkg'' is provided by the {{Pkg|pacman}} package.<br />
<br />
== Configuration ==<br />
<br />
See {{man|5|makepkg.conf}} for details on configuration options for ''makepkg''.<br />
<br />
The system configuration is available in {{ic|/etc/makepkg.conf}}, but user-specific changes can be made in {{ic|$XDG_CONFIG_HOME/pacman/makepkg.conf}} or {{ic|~/.makepkg.conf}}. It is recommended to review the configuration prior to building packages.<br />
<br />
=== Packager information ===<br />
<br />
Each package is tagged with metadata identifying amongst others also the ''packager''. By default, user-compiled packages are marked with {{ic|Unknown Packager}}. If multiple users will be compiling packages on a system, or if one is otherwise distributing packages to other users, it is convenient to provide real contact. This can be done by setting the {{ic|PACKAGER}} variable in {{ic|makepkg.conf}}.<br />
<br />
To check this on an installed package:<br />
<br />
{{hc|$ pacman -Qi ''package''|<nowiki><br />
...<br />
Packager : John Doe <john@doe.com><br />
...<br />
</nowiki>}}<br />
<br />
To automatically produce signed packages, also set the {{ic|GPGKEY}} variable in {{ic|makepkg.conf}}.<br />
<br />
=== Package output ===<br />
<br />
By default, ''makepkg'' creates the package tarballs in the working directory and downloads source data directly to the {{ic|src/}} directory. Custom paths can be configured, for example to keep all built packages in {{ic|~/build/packages/}} and all sources in {{ic|~/build/sources/}}.<br />
<br />
Configure the following {{ic|makepkg.conf}} variables if needed:<br />
<br />
* {{ic|PKGDEST}} — directory for storing resulting packages<br />
* {{ic|SRCDEST}} — directory for storing [[PKGBUILD#source|source]] data (symbolic links will be placed to {{ic|src/}} if it points elsewhere)<br />
* {{ic|SRCPKGDEST}} — directory for storing resulting source packages (built with {{ic|makepkg -S}})<br />
<br />
{{Tip|The {{ic|PKGDEST}} directory can be cleaned up with e.g. {{ic|paccache -c ~/build/packages/}} as described in [[pacman#Cleaning the package cache]].}}<br />
<br />
=== Signature checking ===<br />
<br />
{{Note|The signature checking implemented in ''makepkg'' does not use pacman's keyring, instead relying on the user's keyring.[http://allanmcrae.com/2015/01/two-pgp-keyrings-for-package-management-in-arch-linux/]}}<br />
<br />
If a signature file in the form of ''.sig'' or ''.asc'' is part of the [[PKGBUILD]] source array, ''makepkg'' automatically attempts to [[GnuPG#Verify a signature|verify]] it. In case the user's keyring does not contain the needed public key for signature verification, ''makepkg'' will abort the installation with a message that the PGP key could not be verified. <br />
<br />
If a needed public key for a package is missing, the [[PKGBUILD]] will most likely contain a [[PKGBUILD#validpgpkeys|validpgpkeys]] entry with the required key IDs. [[GnuPG#Import a public key|Import]] it manually, or find it [[GnuPG#Use a keyserver|on a keyserver]] and import it from there. To temporarily disable signature checking, run ''makepkg'' with the {{ic|--skippgpcheck}} option.<br />
<br />
== Usage ==<br />
<br />
Before continuing, [[install]] the {{Pkg|base-devel}} [[meta package]]. Dependencies of this package are '''not''' required to be listed as build-time dependencies (''makedepends'') in [[PKGBUILD]] files.<br />
<br />
{{Note|1=<nowiki></nowiki><br />
* Make sure [[sudo]] is configured properly for commands passed to [[pacman]].<br />
* Running ''makepkg'' itself as root is [https://lists.archlinux.org/archives/list/pacman-dev@lists.archlinux.org/message/ZLRXMUGXULDHLTGSRYVGVWG3BVATV3OY/ disallowed].[https://gitlab.archlinux.org/pacman/pacman/blob/master/NEWS] Besides how a {{ic|PKGBUILD}} may contain arbitrary commands, building as root is generally considered unsafe.[https://bbs.archlinux.org/viewtopic.php?id=67561] Users who have no access to a regular user account should run makepkg as the [http://allanmcrae.com/2015/01/replacing-makepkg-asroot/ nobody user].<br />
}}<br />
<br />
To build a package, one must first create a [[PKGBUILD]], or build script, as described in [[Creating packages]]. Existing scripts are available from the [[Arch build system]] ''(ABS)'' tree or the [[AUR]]. Once in possession of a {{ic|PKGBUILD}}, change to the directory where it is saved and run the following command to build the package:<br />
<br />
$ makepkg<br />
<br />
If required dependencies are missing, ''makepkg'' will issue a warning before failing. To build the package and install needed dependencies, add the flag {{ic|-s}}/{{ic|--syncdeps}}:<br />
<br />
$ makepkg --syncdeps<br />
<br />
Adding the {{ic|-r}}/{{ic|--rmdeps}} flag causes ''makepkg'' to remove the make dependencies later, which are no longer needed. If constantly building packages, consider using [[Pacman/Tips and tricks#Removing unused packages (orphans)]] once in a while instead.<br />
<br />
{{Note|<br />
* These dependencies must be available in the configured repositories; see [[pacman#Repositories and mirrors]] for details. Alternatively, one can manually install dependencies prior to building ({{ic|pacman -S --asdeps ''dep1'' ''dep2''}}).<br />
* Only global values are used when installing dependencies, i.e any override done in a split package's packaging function will not be used.<br />
}}<br />
<br />
Once all dependencies are satisfied and the package builds successfully, a package file ({{ic|''pkgname''-''pkgver''.pkg.tar.zst}}) will be created in the working directory. To install, use {{ic|-i}}/{{ic|--install}} (same as {{ic|pacman -U ''pkgname''-''pkgver''.pkg.tar.zst}}):<br />
<br />
$ makepkg --install<br />
<br />
To clean up leftover files and directories, such as files extracted to the {{ic|$srcdir}}, add the option {{ic|-c}}/{{ic|--clean}}. This is useful for multiple builds of the same package or updating the package version, while using the same build directory. It prevents obsolete and remnant files from carrying over to the new builds:<br />
<br />
$ makepkg --clean<br />
<br />
For more, see {{man|8|makepkg}}.<br />
<br />
== Tips and tricks ==<br />
<br />
=== Reduce source download and extraction times ===<br />
<br />
==== Defining the sources location ====<br />
<br />
Make use of {{ic|SRCDEST}}, especially when building [[VCS package guidelines|VCS packages]], to save time acquiring and unpacking sources in subsequent rebuilds.<br />
<br />
==== Overriding git flags ====<br />
<br />
The other possibility for a considerable speedup is to use partial clone. Git {{ic|--filter{{=}}tree:0}} flag allows to update the source tree only on demand. You can pass it to {{ic|makepkg}} using {{ic|GITFLAGS}} variable.<br />
{{Note|As of pacman 6.0.2, support for {{ic|GITFLAGS}} was not merged into current stable version of Makepkg yet. You need development version of Pacman (e.g. {{AUR|pacman-git}}) to use it.}}<br />
<br />
Example:<br />
<br />
$ GITFLAGS="--filter=tree:0" makepkg<br />
<br />
Or to apply it for every build:<br />
{{hc|/etc/makepkg.conf|<br />
GITFLAGS{{=}}"--filter{{=}}tree:0"<br />
}}<br />
<br />
{{Note|For now (in 2023) still not all git servers support this flag.}}<br />
<br />
Also {{ic|--single-branch}} generally should be safe, but saves not so much. See {{man|1|git-clone}} for details about flags.<br />
<br />
{{Warning|Be aware that '''any''' change in git flags may introduce breakage. PKGBUILDs may utilize git in unpredictable ways, relying on current Makepkg defaults.<br />
<br />
Some people also propose to use shallow clone (e.g. {{ic|--depth{{=}}1}}), but in fact it '''will''' break {{ic|pkgver()}} in VCS packages and more. This was discussed many times already, like [https://lists.archlinux.org/archives/list/arch-general@lists.archlinux.org/thread/YTATAXLNOTE2X45CQMSSJHK3HNEUNN5P/ here].}}<br />
<br />
=== Building optimized binaries ===<br />
<br />
A performance improvement of the packaged software can be achieved by enabling compiler optimizations for the host machine. The downside is that binaries compiled for a specific processor architecture will not run correctly on other machines. On x86_64 machines, there are rarely significant enough real world performance gains that would warrant investing the time to rebuild official packages.<br />
<br />
However, it is very easy to reduce performance by using "nonstandard" compiler flags. Many compiler optimizations are only useful in certain situations and should not be indiscriminately applied to every package. Unless benchmark data are available to prove that something is faster, there is a very good chance it is not! The Gentoo [[Gentoo:GCC optimization|GCC optimization]] and [[Gentoo:Safe CFLAGS|Safe CFLAGS]] wiki articles provide more in-depth information about compiler optimization.<br />
<br />
The options passed to a C/C++ compiler (e.g. {{Pkg|gcc}} or {{Pkg|clang}}) are controlled by the {{ic|CFLAGS}}, {{ic|CXXFLAGS}}, and {{ic|CPPFLAGS}} environment variables. For use in the Arch build system, ''makepkg'' exposes these environment variables as configuration options in {{ic|makepkg.conf}}. The default values are configured to produce generic binaries that can be installed on a wide range of machines.<br />
<br />
{{Note|<br />
* Keep in mind that not all build systems use the variables configured in {{ic|makepkg.conf}}. For example, ''cmake'' disregards the preprocessor options environment variable, {{ic|CPPFLAGS}}. Consequently, many [[PKGBUILD]]s contain workarounds with options specific to the build system used by the packaged software.<br />
* The configuration provided with the source code in the {{ic|Makefile}} or a specific argument in the compilation command line takes precedence and can potentially override the one in {{ic|makepkg.conf}}.<br />
}}<br />
<br />
GCC can automatically detect and enable safe architecture-specific optimizations. To use this feature, first remove any {{ic|-march}} and {{ic|-mtune}} flags, then add {{ic|1=-march=native}}. For example:<br />
<br />
{{hc|/etc/makepkg.conf|2=<br />
CFLAGS="'''-march=native''' -O2 -pipe ..."<br />
CXXFLAGS="${CFLAGS} ..."<br />
}}<br />
<br />
To see what flags this enables, run:<br />
<br />
$ gcc -march=native -v -Q --help=target<br />
<br />
{{Note|1=Specifying different values instead of {{ic|1=-march=native}}, then {{ic|1=-Q --help=target}} '''will not''' work as expected.[https://bbs.archlinux.org/viewtopic.php?pid=1616694#p1616694] To find out which options are really enabled, go through a compilation. See [[Gentoo:Safe CFLAGS#Manual]] for instructions.}}<br />
<br />
Starting in {{ic|pacman}} version 5.2.2, {{ic|makepkg.conf}} also includes overrides for the {{ic|RUSTFLAGS}} environment variable, for flags given to the Rust compiler. The Rust compiler can also detect and enable architecture-specific optimizations by adding {{ic|1=-C target-cpu=native}} to the given {{ic|RUSTFLAGS}} value:<br />
<br />
{{hc|/etc/makepkg.conf|2=<br />
RUSTFLAGS="-C opt-level=2 '''-C target-cpu=native'''"<br />
}}<br />
<br />
To see which CPU features this will enable, run:<br />
<br />
$ rustc -C target-cpu=native --print cfg<br />
<br />
Running {{ic|--print cfg}} without {{ic|1=-C target-cpu=native}} will print the default configuration. The {{ic|opt-level}} parameter can be changed to {{ic|3}}, {{ic|s}}, or {{ic|z}} as desired. See [https://doc.rust-lang.org/rustc/codegen-options/index.html#opt-level The Rust compiler's documentation] for details.<br />
<br />
=== Improving build times ===<br />
<br />
==== Parallel compilation ====<br />
<br />
The {{Pkg|make}} build system uses the {{ic|MAKEFLAGS}} [[environment variable]] to specify additional options for ''make''. The variable can also be set in the {{ic|makepkg.conf}} file.<br />
<br />
Users with multi-core/multi-processor systems can specify the number of jobs to run simultaneously. This can be accomplished with the use of ''nproc'' to determine the number of available processors, e.g. {{ic|1=MAKEFLAGS="-j$(nproc)"}}, or for the number of available processors minus one, {{ic|1=MAKEFLAGS="-j$(($(nproc) - 1))"}}. Some [[PKGBUILD]]s specifically override this with {{ic|-j1}}, because of race conditions in certain versions or simply because it is not supported in the first place. Packages that fail to build because of this should be [[Reporting bug guidelines|reported]] on the bug tracker (or in the case of [[AUR]] packages, to the package maintainer) after making sure that the error is indeed being caused by {{ic|MAKEFLAGS}}.<br />
<br />
See {{man|1|make}} for a complete list of available options.<br />
<br />
==== Building from files in memory ====<br />
<br />
As compiling requires many I/O operations and handling of small files, moving the working directory to a [[tmpfs]] may bring improvements in build times. <br />
<br />
The {{ic|BUILDDIR}} variable can be temporarily exported to ''makepkg'' to set the build directory to an existing tmpfs. For example:<br />
<br />
$ BUILDDIR=/tmp/makepkg makepkg<br />
<br />
Persistent configuration can be done in {{ic|makepkg.conf}} by uncommenting the {{ic|BUILDDIR}} option, which is found at the end of the {{ic|BUILD ENVIRONMENT}} section in the default {{ic|/etc/makepkg.conf}} file. Setting its value to e.g. {{ic|1=BUILDDIR=/tmp/makepkg}} will make use of the Arch's default {{ic|/tmp}} temporary file system.<br />
<br />
{{Note|<br />
* Avoid compiling larger packages in tmpfs to prevent running out of memory.<br />
* The tmpfs directory must be mounted without the {{ic|noexec}} option, otherwise it will prevent built binaries from being executed.<br />
* Keep in mind that packages compiled in tmpfs will not persist across reboot. Consider setting the [[#Package output|PKGDEST]] option appropriately to move the built package automatically to a persistent directory.<br />
}}<br />
<br />
==== Using a compilation cache ====<br />
<br />
The use of [[ccache]] can improve build times by caching the results of compilations for successive use.<br />
<br />
==== Using mold linker ====<br />
<br />
{{Pkg|mold}} is a drop-in replacement for [[GCC|ld]]/[[LLVM|lld]] linkers, which claims to be significantly faster.<br />
<br />
To use ''mold'', append {{ic|1=-fuse-ld=mold}} to {{ic|LDFLAGS}}. For example:<br />
<br />
{{hc|/etc/makepkg.conf|2=<br />
LDFLAGS="... -fuse-ld=mold"<br />
}}<br />
<br />
To use ''mold'' for Rust packages, append {{ic|1=-C link-arg=-fuse-ld=mold}} to {{ic|RUSTFLAGS}}. For example:<br />
<br />
{{hc|/etc/makepkg.conf|2=<br />
RUSTFLAGS="... -C link-arg=-fuse-ld=mold"<br />
}}<br />
<br />
=== Generate new checksums ===<br />
<br />
Install {{Pkg|pacman-contrib}} and run the following command in the same directory as the PKGBUILD file to generate new checksums:<br />
<br />
$ updpkgsums<br />
<br />
{{ic|updpkgsums}} uses {{ic|makepkg --geninteg}} to generate the checksums. See [https://bbs.archlinux.org/viewtopic.php?pid=1933763#p1933763 this forum discussion] for more details.<br />
<br />
The checksums can also be obtained with e.g {{ic|sha256sum}} and added to the {{ic|sha256sums}} array by hand.<br />
<br />
=== Use other compression algorithms ===<br />
<br />
To speed up both packaging and installation, with the tradeoff of having larger package archives, change {{ic|PKGEXT}}.<br />
<br />
For example, the following skips compression of the package file, which will in turn have no need to be decompressed on [[install]]:<br />
<br />
$ PKGEXT='.pkg.tar' makepkg<br />
<br />
As another example, the following uses the LZ4 algorithm, which is focused on speed:<br />
<br />
$ PKGEXT='.pkg.tar.lz4' makepkg<br />
<br />
To make one of these settings permanent, set {{ic|PKGEXT}} in {{ic|/etc/makepkg.conf}}.<br />
<br />
=== Utilizing multiple cores on compression ===<br />
<br />
{{Pkg|zstd}} supports [[Wikipedia:Symmetric multiprocessing|symmetric multiprocessing (SMP)]] via the {{ic|--threads}} flag to speed up compression. For example, to let makepkg use as many CPU cores as possible to compress packages, edit {{ic|COMPRESSZST}} array in {{ic|/etc/makepkg.conf}}:<br />
<br />
COMPRESSZST=(zstd -c -z -q '''--threads=0''' -)<br />
<br />
{{Pkg|xz}} supports [[Wikipedia:Symmetric multiprocessing|symmetric multiprocessing (SMP)]] via the {{ic|--threads}} flag to speed up compression. For example, to let makepkg use as many CPU cores as possible to compress packages, edit {{ic|COMPRESSXZ}} array in {{ic|/etc/makepkg.conf}}:<br />
<br />
COMPRESSXZ=(xz -c -z '''--threads=0''' -)<br />
<br />
{{Pkg|pigz}} is a drop-in, parallel implementation for {{Pkg|gzip}} which by default uses all available CPU cores (the {{ic|-p}}/{{ic|--processes}} flag can be used to employ less cores):<br />
<br />
COMPRESSGZ=('''pigz''' -c -f -n)<br />
<br />
{{Pkg|pbzip2}} is a drop-in, parallel implementation for {{Pkg|bzip2}} which also uses all available CPU cores by default. The {{ic|-p#}} flag can be used to employ less cores (note: no space between the {{ic|-p}} and number of cores).<br />
<br />
COMPRESSBZ2=('''pbzip2''' -c -f)<br />
<br />
{{Pkg|lbzip2}} is another drop-in, parallel implementation for {{Pkg|bzip2}} which also uses all available CPU cores by default. The {{ic|-n}} flag can be used to employ less cores.<br />
<br />
COMPRESSBZ2=('''lbzip2''' -c -f)<br />
<br />
{{AUR|plzip}} is a multithreaded implementation for {{Pkg|lzip}} which also uses all available CPU cores by default. The {{ic|-n}}/{{ic|--threads}} flag can be used to employ less cores.<br />
<br />
COMPRESSLZ=('''plzip''' -c -f)<br />
<br />
=== Show packages with specific packager ===<br />
<br />
{{pkg|expac}} is a pacman database extraction utility. This command shows all packages installed on the system with the packager named ''packagername'':<br />
<br />
$ expac "%n %p" | grep "''packagername''" | column -t<br />
<br />
This shows all packages installed on the system with the packager set in the {{ic|/etc/makepkg}} variable {{ic|PACKAGER}}. This shows only packages that are in a repository defined in {{ic|/etc/pacman.conf}}.<br />
<br />
$ . /etc/makepkg.conf; grep -xvFf <(pacman -Qqm) <(expac "%n\t%p" | grep "$PACKAGER$" | cut -f1)<br />
<br />
=== Build 32-bit packages on a 64-bit system ===<br />
<br />
See [[32-bit package guidelines]].<br />
<br />
=== Unattended package signing ===<br />
<br />
{{Merge|GnuPG#Unattended_passphrase|This is not specific to makepkg}}<br />
{{Expansion|Another option is {{man|1|gnupg-set-passphrase}}{{Dead link|2022|06|25}}}}<br />
<br />
A person may not be available to provide the passphrase for the gpg private key used to sign with in automated build environments such as [[Jenkins]]. It is ill-advised to store a private gpg key on a system without a passphrase.<br />
<br />
A resulting zst package made with makepkg can still be be signed after creation: <br />
<br />
$ gpg --detach-sign --pinentry-mode loopback --passphrase --passphrase-fd 0 --output ''NewlyBuilt.pkg.tar.zst.sig'' --sign ''NewlyBuilt.pkg.tar.zst'' <br />
<br />
where the GPG passphrase is securely provided and obscured by your automation suite of choice.<br />
<br />
The resulting {{ic|zst}} and {{ic|sig}} file can be referenced by [[pacman]] clients expecting a valid signature and repositories created with {{ic|repo-add --sign}} when hosting your own repo.<br />
<br />
=== Magnet URIs ===<br />
<br />
Support for magnet URIs resources (with {{ic|<nowiki>magnet://</nowiki>}} prefix) in the {{ic|source}} field can be added using the {{AUR|transmission-dlagent}} download agent.<br />
<br />
== Troubleshooting ==<br />
<br />
=== Specifying install directory for QMAKE based packages ===<br />
<br />
The makefile generated by ''qmake'' uses the environment variable {{ic|INSTALL_ROOT}} to specify where the program should be installed. Thus this package function should work:<br />
<br />
{{hc|PKGBUILD|2=<br />
...<br />
package() {<br />
cd "$srcdir/${pkgname%-git}"<br />
make INSTALL_ROOT="$pkgdir" install<br />
}<br />
...<br />
}}<br />
<br />
Note, that qmake also has to be configured appropriately. For example put this in the corresponding ''.pro'' file:<br />
<br />
{{hc|YourProject.pro|2=<br />
...<br />
target.path = /usr/local/bin<br />
INSTALLS += target<br />
...<br />
}}<br />
<br />
=== WARNING: Package contains reference to $srcdir ===<br />
<br />
Somehow, the literal strings contained in the variables {{ic|$srcdir}} or {{ic|$pkgdir}} ended up in one of the installed files in the package.<br />
<br />
To identify which files, run the following from the ''makepkg'' build directory:<br />
<br />
$ grep -R "$PWD/src" pkg/<br />
<br />
One possible cause would be from the usage of {{ic|__FILE__}} macro in C/C++ code with full path passed to compiler.<br />
<br />
=== Makepkg fails to download dependencies when behind proxy ===<br />
<br />
When ''makepkg'' calls dependencies, it calls pacman to install the packages, which requires administrative privileges via ''sudo''. However, ''sudo'' does not pass any [[environment variables]] to the privileged environment, and includes the proxy-related variables {{ic|ftp_proxy}}, {{ic|http_proxy}}, {{ic|https_proxy}}, and {{ic|no_proxy}}.<br />
<br />
In order to have ''makepkg'' working behind a proxy, invoke one of the following methods.<br />
<br />
==== Enable proxy by setting its URL in XferCommand ====<br />
<br />
The XferCommand can be set to use the desired proxy URL in {{ic|/etc/pacman.conf}}. Add or uncomment the following line in {{ic|pacman.conf}}[https://www.mail-archive.com/arch-general@archlinux.org/msg15561.html]:<br />
<br />
{{hc|/etc/pacman.conf|2=<br />
...<br />
XferCommand = /usr/bin/curl --proxy<br />
<nowiki>http://username:password@proxy.proxyhost.com:80</nowiki> --location --continue-at - --fail --output %o %u<br />
...<br />
}}<br />
<br />
==== Enable proxy via sudoer's env_keep ====<br />
<br />
Alternatively, one may want to use sudoer's {{ic|env_keep}} option, which enables preserving given variables the privileged environment. See [[Pacman#Pacman does not honor proxy settings]] for more details.<br />
<br />
=== Makepkg fails, but make succeeds ===<br />
<br />
If something successfully compiles using ''make'', but fails through ''makepkg'', it is almost certainly because {{ic|/etc/makepkg.conf}} sets an incompatible compilation variable. Try adding these flags to the PKGBUILD {{ic|options}} array:<br />
<br />
{{ic|!buildflags}}, to prevent its default {{ic|CPPFLAGS}}, {{ic|CFLAGS}}, {{ic|CXXFLAGS}}, and {{ic|LDFLAGS}}.<br />
<br />
{{ic|!makeflags}}, to prevent its default {{ic|MAKEFLAGS}}.<br />
<br />
{{ic|!debug}}, to prevent its default {{ic|DEBUG_CFLAGS}}, and {{ic|DEBUG_CXXFLAGS}}, in case the PKGBUILD is a debug build.<br />
<br />
If any of these fix the problem, this could warrant an upstream bug report assuming the offending flag has been identified.<br />
<br />
=== System becomes unusably slow ===<br />
<br />
==== Running makepkg in a systemd control group ====<br />
<br />
If the package you are building takes too many resources to build with your default ''make'' flags, which are otherwise set properly for most packages, you can try running it in its own [[control group]]. {{AUR|makepkg-cg}} is a wrapper for makepkg that achieved this via systemd control groups (see {{man|5|systemd.resource-control}}).<br />
<br />
== See also ==<br />
<br />
* {{man|8|makepkg}}<br />
* {{man|5|makepkg.conf}}<br />
* [https://gist.github.com/Earnestly/bebad057f40a662b5cc3 A Brief Tour of the Makepkg Process]<br />
* [https://gitlab.archlinux.org/pacman/pacman/blob/master/scripts/makepkg.sh.in makepkg source code]</div>Goetzchttps://wiki.archlinux.org/index.php?title=Lisp_package_guidelines&diff=787764Lisp package guidelines2023-09-16T14:08:46Z<p>Goetzc: /* ASDF */ Clarify to avoid confusion with ASDF-VM</p>
<hr />
<div>[[Category:Arch package guidelines]]<br />
[[it:Lisp package guidelines]]<br />
[[ja:Lisp パッケージガイドライン]]<br />
[[pt:Lisp package guidelines]]<br />
{{Package guidelines}}<br />
<br />
At the moment, there are relatively few [[Wikipedia:Lisp (programming language)|Lisp]] packages available in the Arch repositories. This means that at some point or another, more will likely appear. It is useful, therefore, to figure out now, while there are few packages, how they should be packaged.<br />
<br />
== Directory structure and naming ==<br />
<br />
There is at least one package in the base repository ({{Pkg|libgpg-error}}) that includes lisp files, which are placed in {{ic|/usr/share/common-lisp/source/gpg-error}}. In keeping with this, other lisp packages should also place their files in {{ic|/usr/share/common-lisp/source/''pkgname''}}.<br />
<br />
The package directory should be the name of the lisp package, not what it is called in Arch's [[official repositories]] (or [[AUR]]). This applies even to single-file packages.<br />
<br />
For example, a Lisp package called ''"cl-ppcre"'' should be called {{ic|cl-ppcre}} in AUR and reside in {{ic|/usr/share/common-lisp/source/'''cl-ppcre'''}}. A Lisp package called ''"alexandria"'' should be called {{ic|cl-alexandria}} in AUR and reside in {{ic|/usr/share/common-lisp/source/'''alexandria'''}}.<br />
<br />
== ASDF ==<br />
<br />
Try to avoid the usage of Lisp's ''ASDF''-Install as a means of installing these system-wide packages.<br />
<br />
ASDF itself may be necessary or helpful as a means of compiling and/or loading packages. In that case, it is suggested that the directory used for the central registry (the location of all of the symlinks to {{ic|*.asd}}) be {{ic|/usr/share/common-lisp/systems/}}.<br />
<br />
However, I have observed problems with doing the compilation with asdf as a part of the package compilation process. However, it does work during an install, through use of a {{ic|''package''.install}} file. Such a file might look like this:<br />
<br />
{{hc|cl-ppcre.install|<nowiki><br />
# arg 1: the new package version<br />
post_install() {<br />
echo "---> Compiling lisp files <---"<br />
<br />
clisp --silent -norc -x \<br />
"(load #p\"/usr/share/common-lisp/source/asdf/asdf\") \<br />
(pushnew #p\"/usr/share/common-lisp/systems/\" asdf:*central-registry* :test #'equal) \<br />
(asdf:operate 'asdf:compile-op 'cl-ppcre)"<br />
<br />
echo "---> Done compiling lisp files <---"<br />
<br />
cat << EOM<br />
<br />
To load this library, load asdf and then place the following lines<br />
in your ~/.clisprc.lisp file:<br />
<br />
(push #p"/usr/share/common-lisp/systems/" asdf:*central-registry*)<br />
(asdf:operate 'asdf:load-op 'cl-ppcre)<br />
EOM<br />
}<br />
<br />
post_upgrade() {<br />
post_install $1<br />
}<br />
<br />
pre_remove() {<br />
rm /usr/share/common-lisp/source/cl-ppcre/{*.fas,*.lib}<br />
}<br />
<br />
op=$1<br />
shift<br />
<br />
$op $*<br />
</nowiki>}}<br />
<br />
Of course, for this example to work, there needs to be a symlink to ''package''.asd in the asdf system directory. During package compilation, a stanza such as this will do the trick...<br />
<br />
pushd ${_lispdir}/systems<br />
ln -s ../source/cl-ppcre/cl-ppcre.asd .<br />
ln -s ../source/cl-ppcre/cl-ppcre-test.asd .<br />
popd<br />
<br />
where {{ic|$_lispdir}} is {{ic|$pkgdir/usr/share/common-lisp}}. By linking to a relative, rather than an absolute, path, it is possible to guarantee that the link will not break post-install.<br />
<br />
== Lisp-specific packaging ==<br />
<br />
When possible, do not make packages specific to a single lisp implementation; try to be as cross-platform as the package itself will allow. If, however, the package is specifically designed for a single lisp implementation (i.e., the developers have not gotten around to adding support for others yet, or the package's purpose is specifically to provide a capability that is built in to another lisp implementation), it is appropriate to make your Arch package lisp-specific.<br />
<br />
If the package is implementation-independent, it should depend on '''common-lisp'''. If the package supports multiple but not all implementations, you could (a) not make your package depend on *any* lisp and include a statement in the package.install file telling folks to make sure they have a supported lisp installed (not ideal), or (b) Take direction from the ''sbcl'' PKGBUILD and include a conditional statement to figure out which lisp is needed (which is hackish and, again, far from ideal). Other ideas are welcome.<br />
<br />
Also note that if ASDF is needed to install/compile/load the package, things could potentially get awkward as far as dependencies go. SBCL and CMUCL come with asdf installed, but clisp does not (but there is an AUR package).<br />
<br />
People currently maintaining lisp-specific packages that do not need to be lisp-specific should consider doing at least one of the following:<br />
<br />
* Editing their PKGBUILDs to be cross-platform, provided someone else is not already maintaining the same package for a different lisp.<br />
* Offering to take over maintenance or help with maintenance of the same package for a different lisp, and then combining them into a single package.<br />
* Offering up their package to the maintainer of a different lisp's version of the same package, so as to allow that person to combine them into a single package.<br />
<br />
== Things you, the reader, can do ==<br />
<br />
* Maintain Lisp packages following these guidelines<br />
* Update and fix problems with these guidelines<br />
* Keep up with what has changed here<br />
* Provide (polite) thoughts, feedback, and suggestions both on this document and to people's work.<br />
* Translate this page and future updates to this page.</div>Goetzchttps://wiki.archlinux.org/index.php?title=Discourse&diff=787433Discourse2023-09-10T20:10:23Z<p>Goetzc: Expand article</p>
<hr />
<div>[[Category:Internet applications]]<br />
<br />
[https://discours.org/ Discourse] is an open-source Internet forum system. It is developed using Ruby on Rails and Ember.js, making it a robust and highly performant web application. It is known for its user-friendly interface, real-time updates, and mobile responsiveness. Discourse is not just a forum software; it is a platform designed to promote healthy, engaging discussions among community members.<br />
<br />
== Installation ==<br />
<br />
=== Native package ===<br />
<br />
The new [https://github.com/discourse/discourse forum] is available as {{AUR|discourse}}.<br />
<br />
The current version is out of date, and has an issue with {{ic|redis-namespace}}.<br />
<br />
In order to build the latest version and avoid the {{ic|redis-namespace}} issue, download the snapshot.<br />
<br />
In the {{ic|PKGBUILD}} file, change the version number from {{ic|2.6.2}} to {{ic|3.0.0}} *and* rename {{ic|COPYRIGHT.txt}} to {{ic|COPYRIGHT.md}}.<br />
<br />
=== Containerized ===<br />
<br />
There is also an official [https://github.com/discourse/discourse_docker Docker image] suited for containerized use.<br />
<br />
== Usage in Arch Linux ==<br />
<br />
''Discourse'' is currently being tested as a replacement for FluxBB as the forum software. You can try it here https://discourse.sandbox.archlinux.org.</div>Goetzchttps://wiki.archlinux.org/index.php?title=Zoom_Meetings&diff=783729Zoom Meetings2023-07-26T20:30:26Z<p>Goetzc: /* Wayland */ wording</p>
<hr />
<div>[[Category:Voice over IP]]<br />
[[ja:Zoom Meetings]]<br />
{{Related articles start}}<br />
{{Related|Jitsi-meet}}<br />
{{Related|List of applications/Internet#Other IM clients}}<br />
{{Related articles end}}<br />
<br />
[[Wikipedia:Zoom (software)|Zoom Meetings]] (commonly shortened to Zoom) is a proprietary, cross-platform, cloud-based video conferencing platform.<br />
<br />
== Installation ==<br />
<br />
Preferably, [[install]] {{AUR|zoom}}, since the files from the website will not allow self-updating.<br />
<br />
Alternatively, [https://flathub.org/apps/details/us.zoom.Zoom zoom] is also available as a [[flatpak]]: when choosing this option, replace {{ic|~/.config/zoomus.conf}} in the [[#Tips and tricks]] section by {{ic|~/.var/app/us.zoom.Zoom/config/zoomus.conf}}.<br />
<br />
== Tips and tricks ==<br />
<br />
{{Expansion|Show how to harden zoom with [[bubblewrap]].}}<br />
<br />
{{Note|The {{Pkg|xf86-video-intel}} driver (now considered deprecated) can cause screen share flicker on Intel's integrated GPUs. See [[Intel graphics]] for the deprecation info.}}<br />
<br />
=== Virtual backgrounds ===<br />
<br />
Zoom saves the default virtual backgrounds to {{ic|~/.zoom/data/VirtualBkgnd_Default}} and the custom virtual backgrounds to {{ic|~/.zoom/data/VirtualBkgnd_Custom}}.<br />
<br />
=== Logs ===<br />
<br />
Zoom saves the logs to {{ic|/home/''user''/.zoom/logs/zoom_stdout_stderr.log}}.<br />
<br />
=== Use system theme ===<br />
<br />
{{Note|This can lead to a lot of bugs.}}<br />
<br />
[[textedit|Edit]] {{ic|~/.config/zoomus.conf}} and change the value of {{ic|useSystemTheme}} to {{ic|true}}, then restart zoom.<br />
<br />
=== Disable Zoom mini window ===<br />
<br />
Zoom's "Mini Window" feature allows to minimize the Zoom video, but keep it on top as an overlay. To disable it:<br />
<br />
[[textedit|Edit]] {{ic|~/.config/zoomus.conf}} and change the value of {{ic|enableMiniWindow}} to {{ic|false}}, then restart zoom.<br />
<br />
=== Screen share ===<br />
<br />
==== Wayland ====<br />
<br />
To share your screen on Wayland, [[install]] the required packages for [[PipeWire#WebRTC screen sharing|WebRTC screen sharing]], edit {{ic|~/.config/zoomus.conf}} and make sure the value {{ic|enableWaylandShare}} is set to {{ic|true}}, if not, then restart zoom. As of November 2022, it may be necessary to additionally set the {{ic|1=XDG_CURRENT_DESKTOP=gnome}} [[environment variable]] before launching Zoom to allow Wayland screen sharing even on non-Gnome desktop environments, because Zoom still seems to perform a legacy check for this variable before offering Wayland native screen sharing.<br />
<br />
There are reports that even with all the dependencies in place Zoom will still not use pipewire for screen capture. In this situation [https://community.zoom.com/t5/Meetings/Screen-Sharing-Broken-with-5-14-10-on-Linux-KDE-Plasma-Wayland/m-p/126522/highlight/true#M72056 manually configuring Zoom to use Pipewire has been reported to work]. This can be done as follows:<br />
<br />
# Start the desktop client and go to Settings->Share Screen<br />
# Click Advanced<br />
# Change the Screen capture mode to Pipewire (as opposed to Automatic)<br />
<br />
==== Xorg ====<br />
<br />
To enable screen share on Xorg, you must change the session type to {{ic|X11}} (i.e. set the {{ic|1=XDG_SESSION_TYPE=X11}} [[environment variable]]). Depending on how you start your graphical session, this value might not be set by default.</div>Goetzchttps://wiki.archlinux.org/index.php?title=Spotify&diff=783086Spotify2023-07-13T14:41:14Z<p>Goetzc: /* Limit storage size */ make clear user is a variable for the current user</p>
<hr />
<div>[[Category:Music]]<br />
[[Category:Streaming]]<br />
[[es:Spotify]]<br />
[[ja:Spotify]]<br />
[[Wikipedia:Spotify|Spotify]] is a digital music streaming service with a freemium business model. This article is mainly about the semi-official, proprietary '''Spotify for Linux''' client, which is developed by Spotify's engineers in their spare time and not actively supported by Spotify.[https://www.spotify.com/us/download/linux/] Alternatively, there is an [https://open.spotify.com/ online player] and a number of open source [[#Third-party clients|third-party clients]].<br />
<br />
== Installation ==<br />
<br />
[[Install]] {{Pkg|spotify-launcher}}. This package manages a per-user installation in your home directory, allowing Spotify to update itself independently of [[pacman]] (similar to how Spotify self-updates on other operating systems).<br />
<br />
If you prefer to manage Spotify updates with [[pacman]], instead use {{AUR|spotify}} which repackages [https://www.spotify.com/us/download/linux/ Spotify for Linux]. If you need to add and play local files you need to additionally install {{Pkg|zenity}} and {{Pkg|ffmpeg4.4}}.<br />
<br />
=== Third-party clients ===<br />
<br />
{{Note|All clients listed here '''require''' a Premium account to stream from Spotify.}}<br />
<br />
* {{App|Librespot|An open source client library for Spotify. It enables applications to use Spotify's service (streaming), without using the official closed-source ''libspotify''.|https://github.com/librespot-org/librespot|{{AUR|librespot}}}}<br />
* {{App|MellowPlayer|A free, open source and cross-platform desktop application that runs web-based music streaming services in its own window and provides integration with your desktop. No longer actively developed.|https://colinduquesnoy.gitlab.io/MellowPlayer/|{{AUR|mellowplayer}}}}<br />
* {{App|Mopidy|An alternative plug-in based implementation of [[Music Player Daemon]] is able to stream from Spotify with an extension.|https://mopidy.com/|{{Pkg|mopidy}} + {{AUR|mopidy-spotify}}}}<br />
* {{App|ncspot|Cross-platform ncurses Spotify client written in Rust, inspired by ncmpc and the likes.|https://github.com/hrkfdn/ncspot|{{Pkg|ncspot}}}}<br />
* {{App|Psst|Fast and multi-platform Spotify client, made in Rust with a native GUI.|https://github.com/jpochyla/psst|{{AUR|psst-git}}}}<br />
* {{App|Spot|Gtk/Rust native Spotify client for the Gnome desktop.|https://github.com/xou816/spot|{{AUR|spot-client}}}}<br />
* {{App|Spotifyd|An open source Spotify client running as a UNIX daemon. Spotifyd streams music just like the official client, but is more lightweight and supports more platforms. Spotifyd also supports the Spotify Connect protocol which makes it show up as a device that can be controlled from the official clients.|https://github.com/Spotifyd/spotifyd|{{Pkg|spotifyd}}}}<br />
* {{App|spotify-tui|A Spotify client for the terminal written in Rust.|https://github.com/Rigellute/spotify-tui|{{AUR|spotify-tui}}}}<br />
* {{App|spotify-qt|Lightweight Spotify client using Qt written in C++.|https://github.com/kraxarn/spotify-qt|{{AUR|spotify-qt}}}}<br />
* {{App|Tizonia|Command-line cloud music player for Linux with support for Spotify, Google Play Music, YouTube, SoundCloud, Plex servers and Chromecast devices.|https://tizonia.org/docs/spotify/|{{AUR|tizonia-all}}}}<br />
* {{App|Spicetify|A Powerful Command-Line tool to customize your Spotify-Client, Includes themes,extensions and more.|https://spicetify.app/|{{AUR|spicetify-cli}}}}<br />
<br />
== Tips and tricks ==<br />
<br />
=== Limit storage size ===<br />
<br />
Spotify automatically manages a storage size for caching, however one may want to force the size limit preventing the [[filesystem]] from filling up.<br />
<br />
[[Append]] {{ic|storage.size}} (measured in MB) to {{ic|/home/''$USER''/.config/spotify/prefs}}, e.g. a storage size of 3072 MB:<br />
<br />
{{hc|~/.config/spotify/prefs|2=<br />
storage.size=3072<br />
}}<br />
<br />
=== Global media hotkeys ===<br />
<br />
{{Tip|Many [[desktop environments]] come with keyboard shortcuts which work with the Spotify client out of the box e.g. under [[Cinnamon]] (Preferences -> Keyboard -> Shortcuts -> Sound and Media), several default bindings are set up to control the player, and these can easily be changed by pressing the preferred keys.}}<br />
<br />
For environments in which controlling Spotify via the keyboard does not work automatically, the official Linux client has support for media keys like {{ic|XF86AudioPlay}}. We can use for example [[xbindkeys]] to catch the global media keypresses, and then forward them to Spotify using one of the methods below. If you use xbindkeys, ensure that Spotify is restarted after installation and key configuration otherwise the key events will not be properly caught.<br />
<br />
==== MPRIS ====<br />
<br />
The Spotify client implements the [[MPRIS]] D-Bus interface which allows external control.<br />
<br />
==== pactl (pulseaudio) ====<br />
<br />
{{Style|The wiki is not a code development platform.}}<br />
<br />
As you might have noticed, MPRIS protocol commands do not include volume control. This is broken within spotify itself, which ignores volume change requests. However, there is a possibility to control volume via pulseaudio's input sink:<br />
<br />
$ pactl set-sink-input-volume "$current_sink_num" +1% #volume up by 1%<br />
$ pactl set-sink-input-volume "$current_sink_num" -1% #volume down by 1%<br />
$ pactl set-sink-input-mute "$current_sink_num" toggle #mute toggler<br />
<br />
The sink number for "$current_sink_num" can be found in the output of command:<br />
{{hc|head=$ pactl list sink-inputs|2=<br />
Sink Input #'''3''' << here<br />
Driver: protocol-native.c<br />
[...]<br />
application.name = "Spotify"}}<br />
<br />
You can create a script for changing volume and bind it for example to keyboard shortcut via [[desktop environments]] configuration or xdotool described in next section. Here are some examples:<br />
<br />
Bash:<br />
#!/bin/bash<br />
LANGUAGE="en_US"<br />
app_name="Spotify"<br />
current_sink_num=''<br />
sink_num_check=''<br />
app_name_check=''<br />
pactl list sink-inputs |while read line; do \<br />
sink_num_check=$(echo "$line" |sed -rn 's/^Sink Input #(.*)/\1/p')<br />
if [ "$sink_num_check" != "" ]; then<br />
current_sink_num="$sink_num_check"<br />
else<br />
app_name_check=$(echo "$line" \<br />
|sed -rn 's/application.name = "([^"]*)"/\1/p')<br />
if [ "$app_name_check" = "$app_name" ]; then<br />
pactl set-sink-input-volume "$current_sink_num" +1%<br />
fi<br />
fi<br />
done<br />
This script is based on work done by user [https://unix.stackexchange.com/users/52126/miko%c5%82ak Mikołak] in [https://unix.stackexchange.com/questions/208784/command-line-per-application-volume-maybe-amixer-or-pactl/209047#209047 this post].<br />
<br />
Unfortunately this script is not the fastest solution and if you execute it multiple times via keyboard hotkey, it might become laggy.<br />
<br />
Faster (like 10 times) Python code (requires at least Python 3.7 to be installed):<br />
#!/usr/bin/env python3<br />
#Author: Marcin Kocur, attribution license: https://creativecommons.org/licenses/by/4.0/<br />
import subprocess<br />
import os<br />
x=0<br />
y=0<br />
env = os.environ<br />
env['LANG'] = 'en_US'<br />
app = '"Spotify"'<br />
pactl = subprocess.check_output(['pactl', 'list', 'sink-inputs'], env=env).decode().strip().split()<br />
if app in pactl:<br />
for e in pactl:<br />
x += 1<br />
if e == app:<br />
break<br />
for i in pactl[0 : x -1 ]:<br />
y += 1<br />
if i == 'Sink' and pactl[y] == 'Input' and '#' in pactl[y + 1]:<br />
sink_id = pactl[y+1]<br />
if i == 'Volume:' and '%' in pactl[y + 3]:<br />
volume = pactl[y + 3]<br />
sink_id = sink_id[1: ]<br />
volume = volume[ : -1 ]<br />
if int(volume) < 100:<br />
subprocess.run(['pactl', 'set-sink-input-volume', sink_id, '+1%'])<br />
<br />
You can save it to a .py file. The last line does the actual job, so you can adjust the command to lower the volume or toggle mute.<br />
<br />
=== Disable track notifications ===<br />
<br />
After version 0.9.10, track change notifications were enabled by default. They can be quite intrusive. To disable them, launch Spotify with the {{ic|1=--ui.track_notifications_enabled=false}} option or [[add]]:<br />
<br />
{{hc|~/.config/spotify/Users/''spotify login''-user/prefs|2=<br />
ui.track_notifications_enabled=false<br />
}}<br />
<br />
Alternatively, you can disable track notifications via the client's settings: disable ''Show desktop notifications when the song changes''.<br />
<br />
=== Show track notifications ===<br />
<br />
{{Merge|MPRIS#Playerctl|Not specific to spotify.}}<br />
<br />
{{Pkg|playerctl}} provides a library you can use with {{pkg|python-gobject}} and a notification daemon such as {{pkg|dunst}} to show the artist and title in a notification when the track changes.<br />
<br />
#!/usr/bin/env python3<br />
<br />
import gi<br />
gi.require_version('Playerctl', '2.0')<br />
from gi.repository import Playerctl, GLib<br />
from subprocess import Popen<br />
<br />
player = Playerctl.Player()<br />
<br />
def on_track_change(player, e):<br />
track_info = '{artist} - {title}'.format(artist=player.get_artist(), title=player.get_title())<br />
Popen(['notify-send', track_info])<br />
<br />
player.connect('metadata', on_track_change)<br />
<br />
GLib.MainLoop().run()<br />
<br />
=== Skip overplayed radio tracks ===<br />
<br />
{{Merge|MPRIS#Playerctl|Not specific to spotify.}}<br />
<br />
Another use of the {{Pkg|playerctl}} library is to skip tracks that are played too much on radio when you do not necessarily want to downvote these tracks because you may want to hear them again later on that station.<br />
<br />
#!/usr/bin/env python3<br />
<br />
from gi.repository import Playerctl, GLib<br />
<br />
player = Playerctl.Player()<br />
<br />
played_out = ['Zu Fuss', 'Walk And Talk', 'Neuland']<br />
<br />
def on_track_change(player, e):<br />
if player.get_title() in played_out:<br />
player.next()<br />
<br />
player.on('metadata', on_track_change)<br />
<br />
GLib.MainLoop().run()<br />
<br />
=== Mute commercials ===<br />
<br />
{{Warning|Muting commercials is not supported by Spotify and may result in a temporary ban [https://www.theverge.com/2018/3/5/17080920/spotify-cracking-down-pirating-premium-free-account]}}<br />
<br />
==== spotblock ====<br />
<br />
{{AUR|spotblock-git}} is a resource-efficient ad blocker that runs as a systemd daemon.<br />
<br />
==== Spotify-AdKiller ====<br />
<br />
{{AUR|spotify-adkiller-git}} is another alternative to block Spotify ads.<br />
<br />
==== spotblock-rs ====<br />
<br />
{{AUR|spotblock-rs}} is a fast and light program to mute Spotify ads. It also works with [[PipeWire]].<br />
<br />
==== Hosts file ====<br />
<br />
{{Merge|Pi-hole|Not specific to spotify.}}<br />
<br />
You may also add the following lines to your hosts file to block ads in Spotify:<br />
<br />
{{hc|/etc/hosts|<nowiki><br />
# Block spotify ads<br />
127.0.0.1 media-match.com<br />
127.0.0.1 adclick.g.doublecklick.net<br />
127.0.0.1 www.googleadservices.com<br />
127.0.0.1 open.spotify.com<br />
127.0.0.1 pagead2.googlesyndication.com<br />
127.0.0.1 desktop.spotify.com<br />
127.0.0.1 googleads.g.doubleclick.net<br />
127.0.0.1 pubads.g.doubleclick.net<br />
127.0.0.1 audio2.spotify.com<br />
127.0.0.1 www.omaze.com<br />
127.0.0.1 omaze.com<br />
127.0.0.1 bounceexchange.com<br />
# 127.0.0.1 spclient.wg.spotify.com<br />
127.0.0.1 securepubads.g.doubleclick.net<br />
127.0.0.1 8.126.154.104.bc.googleusercontent.com<br />
127.0.0.1 104.154.126.8<br />
</nowiki>}}<br />
<br />
{{Note|''spclient.wg.spotify.com'' now appears to block radio and daily mixes, as well as recently played songs.}}<br />
<br />
=== Remote Control ===<br />
<br />
==== Send commands via SSH ====<br />
<br />
If you set up ssh on the server, you can send controls from a client to a remote Spotify instance with<br />
<br />
$ ssh user@host ''yourcommand''<br />
<br />
where ''yourcommand'' can be [https://code.google.com/p/spotifycmd/ spotifycmd] that you installed on the server, or a dbus script for the linux version, as described above.<br />
<br />
==== Grab the Spotify window via SSH ====<br />
<br />
Aside from grabbing the whole desktop with TeamViewer or VNC to remotely control your server, you can also only grab the Spotify Window from the server to your client.<br />
<br />
To do that, you need to configure sshd on your server and install x11vnc on both server and client as well as tigervnc on the client. Then you can use these scripts to grab either the complete dektop or only the Spotify window, which essentially gets you GUI client-like behavior as with MPD.<br />
<br />
{{bc|<nowiki><br />
#!/bin/bash<br />
# vncget.sh<br />
<br />
if [[ $1 == all ]];then<br />
ssh -f -t -L 5900:localhost:5900 user@host "x11vnc -q -display :0 -auth .Xauthority"<br />
else<br />
ssh -f -t -L 5900:localhost:5900 user@host ".bin/vncgetspotify.sh"<br />
fi<br />
<br />
for i in {1..4}; do<br />
sleep 2<br />
if vncviewer localhost:0; then break; fi<br />
done<br />
</nowiki>}}<br />
<br />
{{bc|<nowiki><br />
#!/bin/bash<br />
# vncgetspotify.sh<br />
<br />
export DISPLAY=:0<br />
<br />
id=$(wmctrl -lx | awk '/spotify.exe.Wine/ {print $1}')<br />
[[ -z $id ]] && id=$(wmctrl -lx | awk '/spotify.Spotify/ {print $1}')<br />
<br />
x11vnc -sid $id -display :0 -auth .Xauthority<br />
</nowiki>}}<br />
<br />
You will need to copy the second script to ~/.bin/vncgetspotify.sh on the server and the first script to any place on your client.<br />
<br />
Finally, to grab the spotify window, run on the client:<br />
<br />
$ sh vncget.sh<br />
<br />
or, for the whole desktop:<br />
<br />
$ sh vncget.sh all<br />
<br />
=== HiDPI Mode ===<br />
<br />
As the current Spotify build is not DPI aware, the amount to scale the interface by can be specified using the terminal command:<br />
$ spotify --force-device-scale-factor='''X'''<br />
<br />
where X is the amount to scale the interface by, e.g 2.<br />
<br />
This change can be added to the {{ic|spotify.desktop}} file in order to apply the scaling when launching from the desktop.<br />
<br />
To make sure the file does not get overwritten when the package is updated, copy it to you local applications folder:<br />
$ cp /usr/share/applications/spotify.desktop ~/.local/share/applications/<br />
<br />
Now edit {{ic|~/.local/share/applications/spotify.desktop}} and add the {{ic|--force-device-scale-factor}} option:<br />
<br />
{{hc|spotify.desktop|2=<br />
[Desktop Entry]<br />
Type=Application<br />
Name=Spotify<br />
GenericName=Music Player<br />
Icon=spotify-client<br />
TryExec=spotify<br />
Exec=spotify '''--force-device-scale-factor=2''' --uri=%U<br />
Terminal=false<br />
MimeType=x-scheme-handler/spotify;<br />
Categories=Audio;Music;Player;AudioVideo;<br />
StartupWMClass=spotify<br />
}}<br />
<br />
You might need to relaunch your Desktop Manager, before these override changes will be effective.<br />
<br />
== Troubleshooting ==<br />
<br />
=== Desktop Environment alerts (beeps) mutes Spotify ===<br />
<br />
Comment out "module-role-cork" in the PulseAudio configuration file so it does not get loaded anymore.<br />
<br />
Or unload it temporarily with:<br />
<br />
$ pactl unload-module module-role-cork<br />
<br />
=== Blinking images and improper rendering while using Spotify Linux with DWM ===<br />
<br />
Start spotify as a floating window.<br />
<br />
You can add this rule to the rules array in your {{ic|config.h}}:<br />
{ "Spotify", NULL, NULL, 2, True, -1 },<br />
<br />
This will tell dwm to start spotify as a floating window associated with the tag "2" no matter what window mode you are in. Recompile and install dwm to apply your new settings.<br />
<br />
=== Broken search, browsing or radio ===<br />
<br />
:Spotify [https://community.spotify.com/t5/Help-Desktop-Linux-Mac-and/Bug-Desktop-Linux-0-9-0-133-gd18ed589-Having-mixed-locale-breaks/td-p/418270 bug report] concerning non-english locales<br />
If various tabs like browsing only show a blank screen, the search field does not seem to do anything or the radio page is broken (stuck when starting and unsresponsive to input) you might be using a custom locale.<br />
<br />
Try setting the environment variable {{ic|LC_NUMERIC}} to {{ic|en_US.utf8}} before starting Spotify.<br />
<br />
=== Deadlock GUI Thread ===<br />
<br />
Can occur under tiling window managers, such as Awesome, when double-clicking new song or playlist. Edit the file {{ic|~/.config/spotify/Users/''spotify login''-user/prefs}} to add or change the following:<br />
<br />
ui.track_notifications_enabled=false<br />
<br />
Restart Spotify. This will try to disable song notifications which seem to be the cause of the issue (the lack of a notification daemon to receive them makes the UI thread hang). Note that several causes appear to exist for this problem, and this particular fix only applies to select versions of Spotify client, i3 and Awesome, and it may be that additional root causes exist for the Debian and Ubuntu users reporting this issue. Observed with Spotify 0.9.17.1.g9b85d436 and Awesome 3.4.15 and i3-gaps 4.13-2 and Spotify 1.0.64.407.g9bd02c2d.<br />
<br />
{{Note|As of Spotify 1.0.17.75-2, {{ic|1=ui.track_notifications_enabled=false}} seems to be ignored. On the other hand, some users report not experiencing the deadlock anymore as of Awesome 3.5.6. Deadlocks could be caused by scripts called by Awesome, which rely on buggy spotify dbus properties. See https://github.com/acrisci/playerctl/issues/20.}}<br />
<br />
'''Note:''' This issue has multiple causes, so keep track of what you change while researching this. Update this section with additional scenarios and fixes.<br />
<br />
=== Album art and images are missing, show up as squares ===<br />
<br />
Quit Spotify, then open Spotify preferences {{ic|~/.config/spotify/prefs}}<br />
<br />
Change @https to @http:<br />
<br />
network.proxy.addr="your-proxy.com:80'''@http'''"<br />
network.proxy.mode=2<br />
<br />
See original forum post [https://community.spotify.com/t5/Help-Desktop-Linux-Mac-and/Mac-Windows-0-9-0-128-Apps-can-t-connect-anywhere-behind-proxy/m-p/448704#M52332 here].<br />
<br />
{{Note|As of 1.0.17 it looks like replacing HTTPS with HTTP as suggested above can result in no connectivity at all. If this happens an alternative solution is to set 'no proxy' in the GUI and use {{Pkg|proxychains-ng}} to force all TCP connection coming from Spotify through a proxy. Even with HTTP proxies that reject connections on port 80 (and only work for port 443) this works reliably.}}<br />
<br />
=== Spotify does not detect other devices on local network ===<br />
<br />
If a firewall is in place, open ports 57621 for UDP and TCP. If you use a variant of the [[iptables]] [[Simple stateful firewall]], the following should do it:<br />
<br />
iptables -A TCP -p tcp --dport 57621 -j ACCEPT -m comment --comment spotify<br />
iptables -A UDP -p udp --dport 57621 -j ACCEPT -m comment --comment spotify<br />
<br />
It is also possible to restrict the source and destination to the local network.<br />
<br />
If you are using Spotify Connect to play music on a wireless speaker or AVR, your firewall needs to be configured for Spotify's mDNS lookup of those. Sadly, it uses a random unprivileged port [https://community.spotify.com/t5/Desktop-Linux-Windows-Web-Player/Spotify-Connect-and-iptables-netfilter/td-p/1235049] which makes these firewall rules rather nasty. Fortunately, you can restrict the rules to source port 1900 or 5353.<br />
<br />
iptables -A UDP -p udp --sport 1900 --dport 1025:65535 -j ACCEPT -m comment --comment spotify<br />
iptables -A UDP -p udp --sport 5353 --dport 1025:65535 -j ACCEPT -m comment --comment spotify<br />
<br />
If using MusicCast for streaming, you will also need to ensure that IGMP multicast packets are allowed to 224.0.0.22 (with IP options allowed) from the MusicCast speaker/AVR by all firewalls in place (including router firewall).<br />
<br />
If you cannot detect other linux clients, this may be due to a bug in Spotify related to the user name launching the instance. Spotify will not detect other instances having the same {{ic|$HOME}} environment variable, even on different machines. To circumvent this, either create a dedicated user, or launch Spotify with a different {{ic|$HOME}}. The following is a workaround to use your home directory and still be able to detect other devices:<br />
<br />
$ ln -s $HOME ~/.spotify_fakehome_$HOSTNAME<br />
$ HOME=$HOME/.spotify_fakehome_$HOSTNAME spotify &<br />
<br />
=== Search Bar text is invisible when using a dark theme ===<br />
<br />
The text in the search bar appears to be hardcoded to be white, making it invisible when using a dark Qt theme. To fix this, you will need to make an override.<br />
<br />
First create a css file somewhere your account has permission to read/write from (such as your home folder). Call it whatever you like (eg. '''spotify-override.css''').<br />
<br />
Open the newly created css file and add the following:<br />
<br />
QLineEdit { color: #000 }<br />
<br />
Save the file and exit. Next, you need to add the following to the end of your Spotify launcher (substitute the path with the actual path of your css file):<br />
<br />
-stylesheet=/home/user/spotify-override.css<br />
<br />
So your full launch path should look something like this:<br />
<br />
/usr/share/spotify/spotify-client/spotify -stylesheet=/home/user/spotify-override.css<br />
<br />
=== Not respecting window manager rules ===<br />
<br />
Window manager that try to apply specific rules like starting it on a determined workspace or maximizing it on startup, has no effect, as Spotify does not set the ''WM_CLASS'' property before creating the window, violating the ICCCM specifications. One solution is to use {{AUR|spotifywm-git}}.<br />
<br />
=== GUI hangs while the music plays ===<br />
<br />
Also the previous and next track buttons act with a delay of 10-40 seconds. Spotify by default tries to send notification about next track, if you do not have a notification-daemon installed, Spotify's GUI hangs.<br />
<br />
The solution is to either disable notifications in the settings or to install a notification daemon from [[Desktop notifications]].<br />
<br />
=== Spotify occupies the whole screen over system panel and its borders are gone ===<br />
<br />
If you have issue with window borders disappearing and the GUI going full-screen but you cannot drag the window or change its size, edit the preferences located by default in: <br />
<br />
{{hc|/home/yourusername/.config/Spotify/Users/yourusername-user/prefs|2=<br />
app.window.position.width=1366<br />
app.window.position.height=768<br />
}}<br />
<br />
Close Spotify, remove both lines shown above, save and run Spotify again.<br />
<br />
=== Cannot open settings in Wayland ===<br />
<br />
When using Wayland, clicking on the 'Settings' button does nothing. Using the keyboard instead will work (arrows and enter). See [https://community.spotify.com/t5/Desktop-Linux/Settings-don-t-open-on-Linux/td-p/1478736]<br />
<br />
=== Crashes on startup ===<br />
<br />
If you get a crash on startup with the following error message<br />
<br />
[NNN:FATAL:gpu_data_manager_impl_private.cc(439)] GPU process isn't usable. Goodbye<br />
<br />
Try to run {{ic|spotify}} with the {{ic|-no-zygote}} flag.<br />
<br />
=== Spotify has limited or no internet connectivity while using a VPN ===<br />
<br />
More recent versions of Spotify (noticed after version ~1.1.10) use [[NetworkManager]]'s detection of internet connectivity for determining if Spotify is able to play songs or even log in. When using a VPN service, Network Manager can fail to correctly identify internet connectivity, stating "Limited Connectivity". See [[NetworkManager#Checking connectivity]] for possible solutions.<br />
<br />
=== Slow or laggy client ===<br />
<br />
If Spotify is being unusually slow, common culprits usually are corrupted cache files. Run the following command, after closing your Spotify client: <br />
<br />
$ rm -rf ~/.cache/spotify/Browser/* ~/.cache/spotify/Data/* ~/.cache/spotify/Storage/*<br />
<br />
* Make sure you only delete the files inside the folders, and not the folders themselves.<br />
* If that does not resolve the issue, try deleting {{ic|~/.config/spotify}} and reinstalling.<br />
<br />
=== /usr/lib/libcurl-gnutls.so.4 error ===<br />
<br />
If you encounter the error:<br />
<br />
spotify: /usr/lib/libcurl-gnutls.so.4: no version information available (required by spotify)<br />
<br />
Delete {{ic|~/.cache/spotify}}.<br />
<br />
== See also ==<br />
<br />
* [https://www.spotify.com/int/download/linux/ Spotify for Linux] — Spotify's homepage for the Linux client</div>Goetzchttps://wiki.archlinux.org/index.php?title=VirtualBox&diff=782873VirtualBox2023-07-09T19:13:42Z<p>Goetzc: /* Random freezing in guests with intel graphics */ wording</p>
<hr />
<div>[[Category:Hypervisors]]<br />
[[Category:Oracle]]<br />
[[de:VirtualBox]]<br />
[[es:VirtualBox]]<br />
[[ja:VirtualBox]]<br />
[[ru:VirtualBox]]<br />
[[zh-hans:VirtualBox]]<br />
{{Related articles start}}<br />
{{Related|VirtualBox/Install Arch Linux as a guest}}<br />
{{Related|:Category:Hypervisors}}<br />
{{Related|PhpVirtualBox}}<br />
{{Related|RemoteBox}}<br />
{{Related|Moving an existing install into (or out of) a virtual machine}}<br />
{{Related articles end}}<br />
<br />
[https://www.virtualbox.org VirtualBox] is a [[Wikipedia:Hypervisor|hypervisor]] used to run operating systems in a special environment, called a virtual machine, on top of the existing operating system. VirtualBox is in constant development and new features are implemented continuously. It comes with a [[Qt]] GUI interface, as well as [[Wikipedia:Headless software|headless]] and [[Wikipedia:Simple DirectMedia Layer|SDL]] command-line tools for managing and running virtual machines.<br />
<br />
In order to integrate functions of the host system to the guests, including shared folders and clipboard, video acceleration and a seamless window integration mode, ''guest additions'' are provided for some guest operating systems.<br />
<br />
== Installation steps for Arch Linux hosts ==<br />
<br />
In order to launch VirtualBox virtual machines on your Arch Linux box, follow these installation steps.<br />
<br />
=== Install the core packages ===<br />
<br />
[[Install]] the {{Pkg|virtualbox}} package. You will also need to choose a package to provide host modules:<br />
<br />
* for the {{Pkg|linux}} kernel, choose {{Pkg|virtualbox-host-modules-arch}}<br />
* for any other [[kernel]] (including {{Pkg|linux-lts}}), choose {{Pkg|virtualbox-host-dkms}}<br />
<br />
To compile the VirtualBox modules provided by {{Pkg|virtualbox-host-dkms}}, it will also be necessary to install the appropriate headers package(s) for your installed kernel(s) (e.g. {{Pkg|linux-lts-headers}} for {{Pkg|linux-lts}}). [https://lists.archlinux.org/archives/list/arch-dev-public@lists.archlinux.org/message/X6D3UNFV6TXYYNF74ES2AX5ETREAIBCG/] When either VirtualBox or the kernel is updated, the kernel modules will be automatically recompiled thanks to the [[DKMS]] [[pacman hook]].<br />
<br />
=== Sign modules ===<br />
<br />
When using a custom kernel with {{ic|CONFIG_MODULE_SIG_FORCE}} option enabled, you must sign your modules with a key generated during kernel compilation.<br />
<br />
Navigate to your kernel tree folder and execute the following command:<br />
<br />
# for module in `ls /lib/modules/$(uname -r)/kernel/misc/{vboxdrv.ko,vboxnetadp.ko,vboxnetflt.ko}` ; do ./scripts/sign-file sha1 certs/signing_key.pem certs/signing_key.x509 $module ; done<br />
<br />
{{Note|Hashing algorithm does not have to match the one configured, but it must be built into the kernel.}}<br />
<br />
=== Load the VirtualBox kernel modules ===<br />
<br />
{{Pkg|virtualbox-host-modules-arch}} and {{Pkg|virtualbox-host-dkms}} use {{ic|systemd-modules-load.service}} to load VirtualBox modules automatically at boot time. For the modules to be loaded after installation, either reboot or load the modules once manually; the list of modules can be found in {{ic|/usr/lib/modules-load.d/virtualbox-host-modules-arch.conf}} or {{ic|/usr/lib/modules-load.d/virtualbox-host-dkms.conf}}.<br />
<br />
{{Note|If you do not want the VirtualBox modules to be automatically loaded at boot time, you have to mask the default {{ic|/usr/lib/modules-load.d/virtualbox-host-modules-arch.conf}} (or {{ic|/usr/lib/modules-load.d/virtualbox-host-dkms.conf}}) by creating an empty file (or symlink to {{ic|/dev/null}}) with the same name in {{ic|/etc/modules-load.d/}}.}}<br />
<br />
Among the [[kernel modules]] VirtualBox uses, there is a mandatory module named {{ic|vboxdrv}}, which must be loaded before any virtual machines can run.<br />
<br />
To load the module manually, run:<br />
<br />
# modprobe vboxdrv<br />
<br />
The following modules are only required in advanced configurations:<br />
<br />
* {{ic|vboxnetadp}} and {{ic|vboxnetflt}} are both needed when you intend to use the [https://www.virtualbox.org/manual/ch06.html#network_bridged bridged] or [https://www.virtualbox.org/manual/ch06.html#network_hostonly host-only networking] feature. More precisely, {{ic|vboxnetadp}} is needed to create the host interface in the VirtualBox global preferences, and {{ic|vboxnetflt}} is needed to launch a virtual machine using that network interface.<br />
<br />
{{Note|If the VirtualBox kernel modules were loaded in the kernel while you updated the modules, you need to reload them manually to use the new updated version. To do it, run {{ic|vboxreload}} as root.}}<br />
<br />
=== Accessing host USB devices in guest ===<br />
<br />
To use the USB ports of your host machine in your virtual machines, add users that will be authorized to use this feature to the {{ic|vboxusers}} [[user group]].<br />
<br />
=== Guest additions disc ===<br />
<br />
It is also recommended to install the {{Pkg|virtualbox-guest-iso}} package on the host running VirtualBox. This package will act as a disc image that can be used to install the guest additions onto guest systems other than Arch Linux. The ''.iso'' file will be located at {{ic|/usr/lib/virtualbox/additions/VBoxGuestAdditions.iso}}, and may have to be mounted manually inside the virtual machine. Once mounted, you can run the guest additions installer inside the guest.<br />
<br />
=== Unattended templates ===<br />
<br />
In order to avoid having to install the guest system manually, some operating systems support ''unattended installation''. This allows the user to configure the system to be installed in VirtualBox's interface prior to starting the machine. At the end of the setup process, the operating system is installed without requiring any further user interaction. This feature requires the {{aur|virtualbox-unattended-templates}} package.<br />
<br />
=== Extension pack ===<br />
<br />
The Oracle Extension Pack provides [https://www.virtualbox.org/manual/ch01.html#intro-installing additional features] and is released under a non-free license '''only available for personal use'''. To install it, the {{aur|virtualbox-ext-oracle}} package is available, and a prebuilt version can be found in the [[Unofficial user repositories#seblu|seblu]] repository.<br />
<br />
If you prefer to use the traditional and manual way: download the extension manually and install it via the GUI (''File > Preferences > Extensions'') or via {{ic|VBoxManage extpack install <.vbox-extpack>}}, make sure you have a toolkit like [[Polkit]] to grant privileged access to VirtualBox. The installation of this extension [https://www.virtualbox.org/ticket/8473 requires root access].<br />
<br />
=== Front-ends ===<br />
<br />
VirtualBox comes with three front-ends:<br />
<br />
* If you want to use VirtualBox with the regular GUI, use {{ic|VirtualBox}}.<br />
* If you want to launch and manage your virtual machines from the command-line, use the {{ic|VBoxSDL}} command, which only provides a plain window for the virtual machine without any overlays.<br />
* If you want to use VirtualBox without running any GUI (e.g. on a server), use the {{ic|VBoxHeadless}} command. With the VRDP extension you can still remotely access the displays of your virtual machines.<br />
<br />
A security feature in Wayland (i.e. when using GDM) disallows VirtualBox to grab all keyboard input. This is annoying when you want to pass window manager shortcuts to your guest operating system. It can be bypassed by whitelisting VirtualBox:<br />
<br />
$ gsettings get org.gnome.mutter.wayland xwayland-grab-access-rules<br />
$ gsettings set org.gnome.mutter.wayland xwayland-grab-access-rules "['VirtualBox Machine']"<br />
<br />
The first command will show if any other applications are already whitelisted. If so, add 'VirtualBox Machine' to that list, rather than having it as the only one.<br />
<br />
Finally, you can also use [[phpVirtualBox]] to administrate your virtual machines via a web interface.<br />
<br />
Refer to the [https://www.virtualbox.org/manual VirtualBox manual] to learn how to create virtual machines.<br />
<br />
{{Warning|If you intend to store virtual disk images on a [[Btrfs]] file system, before creating any images, you should consider disabling [[Btrfs#Copy-on-Write (CoW)|copy-on-write]] for the destination directory of these images.}}<br />
<br />
== Installation steps for Arch Linux guests ==<br />
<br />
See [[VirtualBox/Install Arch Linux as a guest]].<br />
<br />
== Virtual disks management ==<br />
<br />
See also [[#Import/export VirtualBox virtual machines from/to other hypervisors]].<br />
<br />
=== Formats supported by VirtualBox ===<br />
<br />
VirtualBox supports the following virtual disk formats:<br />
<br />
* '''VDI''': The Virtual Disk Image is the VirtualBox own open container used by default when you create a virtual machine with VirtualBox.<br />
* '''VMDK''': The Virtual Machine Disk has been initially developed by VMware for their products. The specification was initially closed source, but has since become an open format which is fully supported by VirtualBox. This format offers the ability to be split into several 2GB files. This feature is especially useful if you want to store the virtual machine on machines which do not support very large files. Other formats, excluding the HDD format from Parallels, do not provide such an equivalent feature.<br />
* '''VHD''': The Virtual Hard Disk is the format used by Microsoft in Windows Virtual PC and Hyper-V. If you intend to use any of these Microsoft products, you will have to choose this format.<br />
:{{Tip|Since Windows 7, this format can be mounted directly without any additional application.}} <br />
* '''VHDX''' (read only): This is the eXtended version of the Virtual Hard Disk format developed by Microsoft, which has been released on 2012-09-04 with Hyper-V 3.0 coming with Windows Server 2012. This new version of the disk format does offer enhanced performance (better block alignment), larger blocks size, and journal support which brings power failure resiliency. VirtualBox [https://www.virtualbox.org/manual/ch15.html#idp63002176 should support this format in read only].<br />
* '''HDD''' (version 2): The HDD format is developed by Parallels Inc and used in their hypervisor solutions like Parallels Desktop for Mac. Newer versions of this format (i.e. 3 and 4) are not supported due to the lack of documentation for this proprietary format. {{Note|There is currently a controversy regarding the support of the version 2 of the format. While the official VirtualBox manual [https://www.virtualbox.org/manual/ch05.html#vdidetails only reports the second version of the HDD file format as supported], Wikipedia's contributors are [[Wikipedia:Comparison of platform virtual machines#Image type compatibility|reporting the first version may work too]]. Help is welcome if you can perform some tests with the first version of the HDD format.}}<br />
* '''QED''': The QEMU Enhanced Disk format is an old file format for QEMU, another free and open source hypervisor. This format was designed from 2010 in a way to provide a superior alternative to QCOW2 and others. This format features a fully asynchronous I/O path, strong data integrity, backing files, and sparse files. QED format is supported only for compatibility with virtual machines created with old versions of QEMU.<br />
* '''QCOW''': The QEMU Copy On Write format is the current format for QEMU. The QCOW format does support zlib-based transparent compression and encryption (the latter is flawed and is not recommended). QCOW is available in two versions: QCOW and QCOW2. QCOW2 tends to supersede the first one. QCOW is [https://www.virtualbox.org/manual/ch15.html#idp63002176 currently fully supported by VirtualBox]. QCOW2 comes in two revisions: QCOW2 0.10 and QCOW2 1.1 (which is the default when you create a virtual disk with QEMU). VirtualBox does not support QCOW2.<br />
* '''OVF''': The Open Virtualization Format is an open format which has been designed for interoperability and distributions of virtual machines between different hypervisors. VirtualBox supports all revisions of this format via the [https://www.virtualbox.org/manual/ch08.html#idp55423424 VBoxManage import/export feature] but with [https://www.virtualbox.org/manual/ch14.html#KnownProblems known limitations].<br />
* '''RAW''': This is the mode when the virtual disk is exposed directly to the disk without being contained in a specific file format container. VirtualBox supports this feature in several ways: converting RAW disk [https://www.virtualbox.org/manual/ch08.html#idp59139136 to a specific format], or by [https://www.virtualbox.org/manual/ch08.html#vboxmanage-clonevdi cloning a disk to RAW], or by using directly a VMDK file [https://www.virtualbox.org/manual/ch09.html#idp57804112 which points to a physical disk or a simple file].<br />
<br />
=== Disk image format conversion ===<br />
<br />
[https://www.virtualbox.org/manual/ch08.html#vboxmanage-clonevdi VBoxManage clonehd] can be used to convert between VDI, VMDK, VHD and RAW.<br />
<br />
$ VBoxManage clonehd ''inputfile'' ''outputfile'' --format ''outputformat''<br />
<br />
For example to convert VDI to VMDK:<br />
<br />
$ VBoxManage clonehd ''source.vdi'' ''destination.vmdk'' --format VMDK<br />
<br />
==== QCOW ====<br />
<br />
VirtualBox does not support [[QEMU]]'s QCOW2 disk image format. To use a QCOW2 disk image with VirtualBox you therefore need to convert it, which you can do with {{Pkg|qemu-img}}. ''qemu-img'' can convert QCOW to / from VDI, VMDK, VHDX, RAW and various other formats (which you can see by running {{ic|qemu-img --help}}).<br />
<br />
$ qemu-img convert -O ''output_fmt'' ''inputfile'' ''outputfile''<br />
<br />
For example to convert QCOW2 to VDI:<br />
<br />
$ qemu-img convert -O vdi ''source.qcow2'' ''destination.vdi''<br />
<br />
{{Tip|The {{ic|-p}} parameter is used to get the progression of the conversion task.}}<br />
<br />
There are two revisions of QCOW2: 0.10 and 1.1. You can specify the revision to use with {{ic|1=-o compat=''revision''}}.<br />
<br />
=== Mount virtual disks ===<br />
<br />
==== VDI ====<br />
<br />
Mounting VDI images only works with fixed size images (a.k.a. static images); dynamic (dynamically size allocating) images are not easily mountable.<br />
<br />
The offset of the partition (within the VDI) is needed, then add the value of {{ic|offData}} to {{ic|32256}} (e.g. 69632 + 32256 = 101888):<br />
<br />
$ VBoxManage internalcommands dumphdinfo ''storage''.vdi | grep "offData"<br />
<br />
The storage can now be mounted with:<br />
<br />
# mount -t ext4 -o rw,noatime,noexec,loop,offset=101888 ''storage''.vdi /mntpoint/<br />
<br />
For VDI disks with more partitions you can also use {{ic|losetup}}:<br />
<br />
# losetup -o $offData -Pf<br />
<br />
After this you should find the partitions under {{ic|/dev/loop*}} (e.g. {{ic|/dev/loop0p1}}). Then you can mount them as usual (e.g. {{ic|mount mount /dev/loop0p1 /mnt/}}).<br />
<br />
You can also use [https://github.com/pld-linux/VirtualBox/blob/master/mount.vdi mount.vdi] script that, which you can use as (install script itself to {{ic|/usr/bin/}}):<br />
<br />
# mount -t vdi -o fstype=ext4,rw,noatime,noexec ''vdi_file_location'' ''/mnt/''<br />
<br />
Alternately you can use the nbd kernel module and ''qemu-nbd'' from {{Pkg|qemu-img}}[https://bethesignal.org/blog/2011/01/05/how-to-mount-virtualbox-vdi-image/]:<br />
<br />
# modprobe nbd max_part=16<br />
# qemu-nbd -c /dev/nbd0 ''storage''.vdi<br />
# mount /dev/nbd0p1 /mnt/dir/<br />
<br />
And then to unmount:<br />
<br />
# umount /mnt/dir/<br />
# qemu-nbd -d /dev/nbd0<br />
<br />
If the partition nodes are not propagated try using {{ic|partprobe /dev/nbd0}}; otherwise, a VDI partition can be mapped directly to a node by: {{ic|qemu-nbd -P 1 -c /dev/nbd0 ''storage''.vdi}}.<br />
<br />
Another way is to use {{AUR|vdfuse}}:<br />
<br />
# vdfuse -a -f ''storage''.vdi ''mountpoint1''<br />
<br />
which mounts the disk in {{ic|''mountpoint1''}} with the {{ic|PartitionN}} naming format. Each partition can then be loop-mounted in {{ic|''mountpoint2''}}:<br />
<br />
# mount -o loop ''mountpoint1''/PartitionN ''mountpoint2''<br />
<br />
==== VHD ====<br />
<br />
Like VDI, VHD images can be mounted with [[QEMU]]'s nbd module:<br />
<br />
# modprobe nbd<br />
# qemu-nbd -c /dev/nbd0 ''storage''.vhd<br />
# mount /dev/nbd0p1 /mnt<br />
<br />
To unmount:<br />
<br />
# umount /mnt<br />
# qemu-nbd -d /dev/nbd0<br />
<br />
=== Compact virtual disks ===<br />
<br />
Compacting virtual disks only works with ''.vdi'' files and basically consists of the following steps.<br />
<br />
Boot your virtual machine and remove all bloat manually or by using cleaning tools like {{Pkg|bleachbit}} which is [http://bleachbit.sourceforge.net/download/windows available for Windows systems too].<br />
<br />
Wiping free space with zeroes can be achieved with several tools:<br />
<br />
* If you were previously using Bleachbit, check the checkbox ''System > Free disk space'' in the GUI, or use {{ic|bleachbit -c system.free_disk_space}} in CLI;<br />
* On UNIX-based systems, by using {{ic|dd}} or preferably {{AUR|dcfldd}} (see [https://superuser.com/a/355322 here] to learn the differences):<br />
:{{bc|1=# dcfldd if=/dev/zero of=''/fillfile'' bs=4M}}<br />
:When {{ic|fillfile}} reaches the limit of the partition, you will get a message like {{ic|1280 blocks (5120Mb) written.dcfldd:: No space left on device}}. This means that all of the user-space and non-reserved blocks of the partition will be filled with zeros. Using this command as root is important to make sure all free blocks have been overwritten. Indeed, by default, when using partitions with ext filesystem, a specified percentage of filesystem blocks is reserved for the super-user (see the {{ic|-m}} argument in the {{ic|mkfs.ext4}} man pages or use {{ic|tune2fs -l}} to see how much space is reserved for root applications).<br />
:When the aforementioned process has completed, you can remove the file {{ic|''fillfile''}} you created.<br />
<br />
* On Windows, there are two tools available:<br />
** {{ic|sdelete}} from the [https://technet.microsoft.com/en-us/sysinternals/bb842062.aspx Sysinternals Suite], type {{ic|sdelete -s -z ''c:''}}, where you need to reexecute the command for each drive you have in your virtual machine;<br />
** or, if you love scripts, there is a [http://blog.whatsupduck.net/2012/03/powershell-alternative-to-sdelete.html PowerShell solution], but which still needs to be repeated for all drives.<br />
::{{bc|PS> ./Write-ZeroesToFreeSpace.ps1 -Root ''c:\'' -PercentFree 0}}<br />
::{{Note|This script must be run in a PowerShell environment with administrator privileges. By default, scripts cannot be run, ensure the execution policy is at least on {{ic|RemoteSigned}} and not on {{ic|Restricted}}. This can be checked with {{ic|Get-ExecutionPolicy}} and the required policy can be set with {{ic|Set-ExecutionPolicy RemoteSigned}}.}}<br />
<br />
Once the free disk space have been wiped, shut down your virtual machine.<br />
<br />
The next time you boot your virtual machine, it is recommended to do a filesystem check.<br />
<br />
* On UNIX-based systems, you can use {{ic|fsck}} manually;<br />
** On GNU/Linux systems, and thus on Arch Linux, you can force a disk check at boot [[Fsck#Forcing the check|thanks to a kernel boot parameter]];<br />
* On Windows systems, you can use:<br />
** either {{ic|chkdsk ''c:'' /F}} where {{ic|''c:''}} needs to be replaced by each disk you need to scan and fix errors;<br />
** or {{ic|FsckDskAll}} [https://archive.org/details/ChkDskAll from here] which is basically the same software as {{ic|chkdsk}}, but without the need to repeat the command for all drives;<br />
<br />
Now, remove the zeros from the ''.vdi'' file with [https://www.virtualbox.org/manual/ch08.html#vboxmanage-modifyvdi VBoxManage modifyhd]:<br />
<br />
$ VBoxManage modifyhd ''your_disk.vdi'' --compact<br />
<br />
{{Note|If your virtual machine has snapshots, you need to apply the above command on each {{ic|.vdi}} files you have.}}<br />
<br />
==== TRIM ====<br />
<br />
VirtualBox offers simulation of TRIM in VDI files via an experimental "discard" attachment option. This option is undocumented and can be accessed by [https://superuser.com/a/728469/ commandline or .vbox file editing]. When enabled, TRIM commands from the guest operating system causes the corresponding part of the VDI file to be compacted away.<br />
<br />
{{Warning|Using this option without Host I/O Cache is known to cause lockups.}}<br />
<br />
=== Increase virtual disks ===<br />
<br />
==== General procedure ====<br />
<br />
If you are running out of space due to the small hard drive size you selected when you created your virtual machine, the solution adviced by the VirtualBox manual is to use [https://www.virtualbox.org/manual/ch08.html#vboxmanage-modifyvdi VBoxManage modifyhd]. However this command only works for VDI and VHD disks and only for the dynamically allocated variants. If you want to resize a fixed size virtual disk disk too, read on this trick which works either for a Windows or UNIX-like virtual machine.<br />
<br />
First, create a new virtual disk next to the one you want to increase:<br />
<br />
$ VBoxManage createmedium disk -filename ''new.vdi'' --size ''10000''<br />
<br />
where size is in MiB, in this example 10000MiB ~= 10GiB, and ''new.vdi'' is name of new hard drive to be created.<br />
<br />
{{Note|By default, this command uses the ''Standard'' (corresponding to dynamic allocated) file format variant and thus will not use the same file format variant as your source virtual disk. If your ''old.vdi'' has a fixed size and you want to keep this variant, add the parameter {{ic|--variant Fixed}}.}}<br />
<br />
Next, the old virtual disk needs to be cloned to the new one which this may take some time:<br />
<br />
$ VBoxManage clonemedium disk ''old.vdi'' ''new.vdi'' --existing<br />
<br />
Detach the old hard drive and attach new one, replace all mandatory italic arguments by your own:<br />
<br />
$ VBoxManage storageattach ''virtual_machine_name'' --storagectl ''SATA'' --port ''0'' --medium none<br />
$ VBoxManage storageattach ''virtual_machine_name'' --storagectl ''SATA'' --port ''0'' --medium ''new.vdi'' --type hdd<br />
<br />
To get the storage controller name and the port number, you can use the command {{ic|VBoxManage showvminfo ''virtual_machine_name''}}. Among the output you will get such a result (what you are looking for is in italic):<br />
<br />
{{bc|<br />
[...]<br />
Storage Controller Name (0): IDE<br />
Storage Controller Type (0): PIIX4<br />
Storage Controller Instance Number (0): 0<br />
Storage Controller Max Port Count (0): 2<br />
Storage Controller Port Count (0): 2<br />
Storage Controller Bootable (0): on<br />
Storage Controller Name (1): SATA<br />
Storage Controller Type (1): IntelAhci<br />
Storage Controller Instance Number (1): 0<br />
Storage Controller Max Port Count (1): 30<br />
Storage Controller Port Count (1): 1<br />
Storage Controller Bootable (1): on<br />
IDE (1, 0): Empty<br />
''SATA'' (''0'', 0): /home/wget/IT/Virtual_machines/GNU_Linux_distributions/ArchLinux_x64_EFI/Snapshots/{6bb17af7-e8a2-4bbf-baac-fbba05ebd704}.vdi (UUID: 6bb17af7-e8a2-4bbf-baac-fbba05ebd704)<br />
[...]<br />
}}<br />
<br />
Download [https://gparted.org/download.php GParted live image] and mount it as a virtual CD/DVD disk file, boot your virtual machine, increase/move your partitions, umount GParted live and reboot.<br />
<br />
{{Note|On GPT disks, increasing the size of the disk will result in the backup GPT header not being at the end of the device. GParted will ask to fix this, click on ''Fix'' both times. On MBR disks, you do not have such a problem as this partition table as no trailer at the end of the disk.}}<br />
<br />
Finally, unregister the virtual disk from VirtualBox and remove the file:<br />
<br />
$ VBoxManage closemedium disk ''old.vdi''<br />
$ rm ''old.vdi''<br />
<br />
==== Increasing the size of VDI disks ====<br />
<br />
If your disk is a VDI one, run:<br />
<br />
$ VBoxManage modifymedium disk ''your_virtual_disk.vdi'' --resize ''the_new_size''<br />
<br />
Then jump back to the Gparted step, to increase the size of the partition on the virtual disk.<br />
<br />
=== Replace a virtual disk manually from the .vbox file ===<br />
<br />
If you think that editing a simple ''XML'' file is more convenient than playing with the GUI or with {{ic|VBoxManage}} and you want to replace (or add) a virtual disk to your virtual machine, in the ''.vbox'' configuration file corresponding to your virtual machine, simply replace the GUID, the file location and the format to your needs:<br />
<br />
{{hc|ArchLinux_vm.vbox|2=<br />
<HardDisk uuid="''{670157e5-8bd4-4f7b-8b96-9ee412a712b5}''" location="''ArchLinux_vm.vdi''" format="''VDI''" type="Normal"/><br />
}}<br />
<br />
then in the {{ic|<AttachedDevice>}} sub-tag of {{ic|<StorageController>}}, replace the GUID by the new one.<br />
<br />
{{hc|ArchLinux_vm.vbox|2=<br />
<AttachedDevice type="HardDisk" port="0" device="0"><br />
<Image uuid="''{670157e5-8bd4-4f7b-8b96-9ee412a712b5}''"/><br />
</AttachedDevice><br />
}}<br />
<br />
{{Note|If you do not know the GUID of the drive you want to add, you can use the {{ic|VBoxManage showhdinfo ''file''}}. If you previously used {{ic|VBoxManage clonehd}} to copy/convert your virtual disk, this command should have outputted the GUID just after the copy/conversion completed. Using a random GUID does not work, as each [https://www.virtualbox.org/manual/ch05.html#cloningvdis UUID is stored inside each disk image].}}<br />
<br />
==== Transfer between Linux host and other operating system ====<br />
<br />
The information about path to harddisks and the snapshots is stored between {{ic|<HardDisks> .... </HardDisks>}} tags in the file with the ''.vbox'' extension. You can edit them manually or use this script where you will need change only the path or use defaults, assumed that ''.vbox'' is in the same directory with a virtual harddisk and the snapshots folder. It will print out new configuration to stdout.<br />
<br />
{{bc|1=<br />
#!/bin/sh<br />
NewPath="${PWD}/"<br />
Snapshots="Snapshots/"<br />
Filename="$1"<br />
<br />
awk -v SetPath="$NewPath" -v SnapPath="$Snapshots" '{if(index($0,"<HardDisk uuid=") != 0){A=$3;split(A,B,"=");<br />
L=B[2];<br />
gsub(/\"/,"",L);<br />
sub(/^.*\//,"",L);<br />
sub(/^.*\\/,"",L);<br />
if(index($3,"{") != 0){SnapS=SnapPath}else{SnapS=""};<br />
print $1" "$2" location="\"SetPath SnapS L"\" "$4" "$5}<br />
else print $0}' "$Filename"<br />
}}<br />
<br />
{{Note|<br />
* If you will prepare virtual machine for use in Windows host then in the path name end you should use backslash \ instead of / .<br />
* The script detects snapshots by looking for {{ic|{}} in the file name.<br />
* To make it run on a new host you will need to add it first to the register by clicking on '''Machine -> Add...''' or use hotkeys Ctrl+A and then browse to ''.vbox'' file that contains configuration or use command line {{ic|VBoxManage registervm ''filename''.vbox}}<br />
}}<br />
<br />
=== Clone a virtual disk and assigning a new UUID to it ===<br />
<br />
UUIDs are widely used by VirtualBox. Each virtual machines and each virtual disk of a virtual machine must have a different UUID. When you launch a virtual machine in VirtualBox, VirtualBox will keep track of all UUIDs of your virtual machine instance. See the [https://www.virtualbox.org/manual/ch08.html#vboxmanage-list VBoxManage list] to list the items registered with VirtualBox.<br />
<br />
If you cloned a virtual disk manually by copying the virtual disk file, you will need to assign a new UUID to the cloned virtual drive if you want to use the disk in the same virtual machine or even in another (if that one has already been opened, and thus registered, with VirtualBox).<br />
<br />
You can use this command to assign a new UUID to a virtual disk:<br />
<br />
$ VBoxManage internalcommands sethduuid ''/path/to/disk.vdi''<br />
<br />
{{Tip|To avoid copying the virtual disk and assigning a new UUID to your file manually you can use [https://www.virtualbox.org/manual/ch08.html#vboxmanage-clonevdi VBoxManage clonehd].}}<br />
<br />
{{Note|The commands above support all [[#Formats supported by VirtualBox|virtual disk formats supported by VirtualBox]].}}<br />
<br />
== Tips and tricks ==<br />
<br />
=== Import/export VirtualBox virtual machines from/to other hypervisors ===<br />
<br />
If you plan to use your virtual machine on another hypervisor or want to import in VirtualBox a virtual machine created with another hypervisor, you might be interested in reading the following steps.<br />
<br />
==== Remove additions ====<br />
<br />
Guest additions are available in most hypervisor solutions: VirtualBox comes with the Guest Additions, VMware with the VMware Tools, Parallels with the Parallels Tools, etc. These additional components are designed to be installed inside a virtual machine after the guest operating system has been installed. They consist of device drivers and system applications that optimize the guest operating system for better performance and usability [https://www.virtualbox.org/manual/ch04.html by providing these features].<br />
<br />
If you have installed the additions to your virtual machine, please uninstall them first. Your guest, especially if it is using an operating system from the Windows family, might behave weirdly, crash or even might not boot at all if you are still using the specific drivers in another hypervisor.<br />
<br />
==== Use the right virtual disk format ====<br />
<br />
This step will depend on the ability to convert the virtual disk image directly or not.<br />
<br />
===== Automatic tools =====<br />
<br />
Some companies provide tools which offer the ability to create virtual machines from a Windows or GNU/Linux operating system located either in a virtual machine or even in a native installation. With such a product, you do not need to apply this and the following steps and can stop reading here.<br />
<br />
* ''[https://www.parallels.com/products/transporter Parallels Transporter]'' which is non free, is a product from Parallels Inc. This solution basically consists in an piece of software called ''agent'' that will be installed in the guest you want to import/convert. Then, Parallels Transporter, ''which only works on OS X'', will create a virtual machine from that ''agent'' which is contacted either by USB or Ethernet network.<br />
* ''[https://www.vmware.com/products/converter/ VMware vCenter Converter]'' which is free upon registration on the VMware webiste, works nearly the same way as Parallels Transporter, but the piece of software that will gather the data to create the virtual machine only works on a Windows platform.<br />
<br />
===== Manual conversion =====<br />
<br />
First, familiarize yourself with the [[#Formats supported by VirtualBox|formats supported by VirtualBox]] and [[Wikipedia:Comparison of platform virtual machines#Image type compatibility|those supported by third-party hypervisors]].<br />
<br />
* Importing or exporting a virtual machine from/to a VMware solution is not a problem at all if you use the VMDK or OVF disk format, otherwise converting [[#Disk image format conversion|VMDK to VDI and VDI to VMDK]] is possible and the aforementioned VMware vCenter Converter tool is available.<br />
* Importing or exporting from/to QEMU is not a problem neither: some QEMU formats are supported directly by VirtualBox and conversion between [[#QCOW|QCOW2 to VDI and VDI to QCOW2]] is still available if needed.<br />
* Importing or exporting from/to Parallels hypervisor is the hardest way: Parallels does only support its own HDD format (even the standard and portable OVF format is not supported!).<br />
:* To export your virtual machine to Parallels, you will need to use the Parallels Transporter tool described above.<br />
:* To import your virtual machine to VirtualBox, you will need to use the VMware vCenter Converter described above to convert the virtual machine to the VMware format first. Then, apply the solution to migrate from VMware.<br />
<br />
==== Create the virtual machine configuration for your hypervisor ====<br />
<br />
Each hypervisor have their own virtual machine configuration file: {{ic|.vbox}} for VirtualBox, {{ic|.vmx}} for VMware, a {{ic|config.pvs}} file located in the virtual machine bundle ({{ic|.pvm}} file), etc. You will have thus to recreate a new virtual machine in your new destination hypervisor and specify its hardware configuration as close as possible as your initial virtual machine.<br />
<br />
Pay a close attention to the firmware interface (BIOS or UEFI) used to install the guest operating system. While an option is available to choose between these 2 interfaces on VirtualBox and on Parallels solutions, on VMware, you will have to add manually the following line to your ''.vmx'' file.<br />
<br />
{{hc|ArchLinux_vm.vmx|2=<br />
firmware = "efi"<br />
}}<br />
<br />
Finally, ask your hypervisor to use the existing virtual disk you have converted and launch the virtual machine.<br />
<br />
{{Tip|<br />
* On VirtualBox, if you do not want to browse the whole GUI to find the right location to add your new virtual drive device, you can [[#Replace a virtual disk manually from the .vbox file|Replace a virtual disk manually from the .vbox file]], or use the {{ic|VBoxManage storageattach}} described in [[#Increasing the size of VDI disks]] or in the [https://www.virtualbox.org/manual/ch08.html#vboxmanage-storageattach VirtualBox manual page].<br />
* Similarly, in VMware products, you can replace the location of the current virtual disk location by adapting the ''.vmdk'' file location in your ''.vmx'' configuration file.<br />
}}<br />
<br />
=== Virtual machine launch management ===<br />
<br />
==== Starting virtual machines with a service (autostart) ====<br />
<br />
Find hereafter the implementation details of a systemd service that will be used to consider a virtual machine as a service.<br />
<br />
{{hc|/etc/systemd/system/vboxvmservice@.service|2=<br />
[Unit]<br />
Description=VBox Virtual Machine %i Service<br />
Requires=systemd-modules-load.service<br />
After=systemd-modules-load.service<br />
<br />
[Service]<br />
User=''username''<br />
Group=vboxusers<br />
ExecStart=/usr/bin/VBoxManage startvm %i --type ''startmode''<br />
ExecStop=/usr/bin/VBoxManage controlvm %i ''stopmode''<br />
RemainAfterExit=yes<br />
<br />
[Install]<br />
WantedBy=multi-user.target<br />
}}<br />
<br />
{{Note|<br />
* Replace {{ic|''username''}} with a user that is a member of the {{ic|vboxusers}} group. Make sure the user chosen is the same user that will create/import virtual machines, otherwise the user will not see the virtual machine appliances.<br />
* Replace {{ic|''startmode''}} with a virtual machine frontend type, usually {{ic|gui}}, {{ic|headless}} or {{ic|separate}}<br />
* Replace {{ic|''stopmode''}} with desired state switch, usually {{ic|savestate}} or {{ic|acpipowerbutton}}<br />
}}<br />
<br />
{{Note|If you have multiple virtual machines managed by Systemd and they are not stopping properly, try to add {{ic|1=KillMode=none}} and {{ic|1=TimeoutStopSec=40}} at the end of {{ic|[Service]}} section.}}<br />
<br />
[[Enable]] the {{ic|vboxvmservice@''your_virtual_machine_name''}} systemd unit in order to launch the virtual machine at next boot. To launch it directly, simply [[start]] the systemd unit.<br />
<br />
VirtualBox 4.2 introduces [https://lifeofageekadmin.com/how-to-set-your-virtualbox-vm-to-automatically-startup/ a new way] for UNIX-like systems to have virtual machines started automatically, other than using a systemd service.<br />
<br />
==== Starting virtual machines with a keyboard shortcut ====<br />
<br />
It can be useful to start virtual machines directly with a keyboard shortcut instead of using the VirtualBox interface (GUI or CLI). For that, you can simply define key bindings in {{ic|.xbindkeysrc}}. Please refer to [[Xbindkeys]] for more details.<br />
<br />
Example, using the {{ic|Fn}} key of a laptop with an unused battery key ({{ic|F3}} on the computer used in this example):<br />
<br />
"VBoxManage startvm 'Windows 7'"<br />
m:0x0 + c:244<br />
XF86Battery<br />
<br />
{{Note|If you have a space in the name of your virtual machine, then enclose it with single apostrophes like made in the example just above.}}<br />
<br />
=== Use specific device in the virtual machine ===<br />
<br />
==== Using USB webcam / microphone ====<br />
<br />
{{Note|You will need to have VirtualBox extension pack installed before following the steps below. See [[#Extension pack]] for details.}}<br />
<br />
# Make sure the virtual machine is not running and your webcam / microphone is not being used.<br />
# Bring up the main VirtualBox window and go to settings for Arch machine. Go to USB section.<br />
# Make sure "Enable USB Controller" is selected. Also make sure that "Enable USB 2.0 (EHCI) Controller" is selected too.<br />
# Click the "Add filter from device" button (the cable with the '+' icon).<br />
# Select your USB webcam/microphone device from the list.<br />
# Now click OK and start your virtual machine.<br />
<br />
{{Note|If your Microphone does not show up in the "Add filter from device" menu, try the USB 3.0 and 1.1 options instead (In Step 3).}}<br />
<br />
==== Detecting web-cams and other USB devices ====<br />
<br />
{{Note|This will not do much if you are running a Linux/Unix operating system inside of your virtual machine, as most do not have autodetection features.}}<br />
<br />
If the device that you are looking for does not show up on any of the menus in the section above and you have tried all three USB controller options,<br />
boot up your virtual machine three separate times. Once using the USB 1.1 controller, another using the USB 2.0 controller, etc. Leave the virtual machine running for at least 5 minutes after startup. Sometimes Windows will autodetect the device for you. Be sure you filter any devices that are not a keyboard or a mouse so they do not start up at boot. This ensures that Windows will detect the device at start-up.<br />
<br />
=== Access a guest server ===<br />
<br />
To access [[Wikipedia:Apache_HTTP_Server|Apache server]] on a Virtual Machine from the host machine '''only''', simply execute the following lines on the host:<br />
<br />
$ VBoxManage setextradata GuestName "VBoxInternal/Devices/''pcnet''/0/LUN#0/Config/Apache/HostPort" ''8888''<br />
$ VBoxManage setextradata GuestName "VBoxInternal/Devices/''pcnet''/0/LUN#0/Config/Apache/GuestPort" ''80''<br />
$ VBoxManage setextradata GuestName "VBoxInternal/Devices/''pcnet''/0/LUN#0/Config/Apache/Protocol" TCP<br />
<br />
where {{ic|''8888''}} is the port the host should listen on and {{ic|''80''}} is the port the virtual machine will send Apache's signal on.<br />
<br />
To use a port lower than 1024 on the host machine, changes need to be made to the firewall on that host machine. This can also be set up to work with SSH or any other services by changing "Apache" to the corresponding service and ports.<br />
<br />
{{Note|{{ic|pcnet}} refers to the network card of the virtual machine. If you use an Intel card in your virtual machine settings, change {{ic|pcnet}} to {{ic|e1000}}.}}<br />
<br />
To communicate between the VirtualBox guest and host using ssh, the server port must be forwarded under Settings > Network. When connecting from the client/host, connect to the IP address of the client/host machine, as opposed to the connection of the other machine. This is because the connection will be made over a virtual adapter.<br />
<br />
=== D3D acceleration in Windows guests ===<br />
<br />
Recent versions of Virtualbox have support for accelerating OpenGL inside guests. This can be enabled with a simple checkbox in the machine's settings, right below where video ram is set, and installing the Virtualbox guest additions. However, most Windows games use Direct3D (part of DirectX), not OpenGL, and are thus not helped by this method. However, it is possible to gain accelerated Direct3D in your Windows guests by borrowing the d3d libraries from Wine, which translate d3d calls into OpenGL, which is then accelerated. These libraries are now part of Virtualbox guest additions software.<br />
<br />
After enabling OpenGL acceleration as described above, reboot the guest into safe mode (press F8 before the Windows screen appears but after the Virtualbox screen disappears), and install Virtualbox guest additions, during install enable checkbox "Direct3D support". Reboot back to normal mode and you should have accelerated Direct3D.<br />
<br />
{{Note|<br />
* This hack may or may not work for some games depending on what hardware checks they make and what parts of D3D they use.<br />
* This was tested on Windows XP, 7 and 8.1. If method does not work on your Windows version please add data here.<br />
}}<br />
<br />
=== VirtualBox on a USB key ===<br />
<br />
When using VirtualBox on a USB key, for example to start an installed machine with an ISO image, you will manually have to create VDMKs from the existing drives. However, once the new VMDKs are saved and you move on to another machine, you may experience problems launching an appropriate machine again. To get rid of this issue, you can use the following script to launch VirtualBox. This script will clean up and unregister old VMDK files and it will create new, proper VMDKs for you:<br />
<br />
{{Style|The following script parses the output of ls, which is [https://github.com/koalaman/shellcheck/wiki/SC2010 very brittle] and [https://github.com/koalaman/shellcheck/wiki/SC2012 known to break].}}<br />
<br />
{{bc|<nowiki><br />
#!/bin/sh<br />
# Erase old VMDK entries<br />
rm ~/.VirtualBox/*.vmdk<br />
<br />
# Clean up VBox-Registry<br />
sed -i '/sd/d' ~/.VirtualBox/VirtualBox.xml<br />
<br />
# Remove old harddisks from existing machines<br />
find ~/.VirtualBox/Machines -name \*.xml | while read -r file; do<br />
line=$(grep -e "type\=\"HardDisk\"" -n "$file" | cut -d ':' -f 1)<br />
if [ -n "$line" ]; then<br />
sed -i "${line}"d "$file"<br />
sed -i "${line}"d "$file"<br />
sed -i "${line}"d "$file"<br />
fi<br />
sed -i "/rg/d" "$file"<br />
done<br />
<br />
# Delete prev-files created by VirtualBox<br />
find ~/.VirtualBox/Machines -name \*-prev -exec rm '{}' \;<br />
<br />
# Recreate VMDKs<br />
ls -l /dev/disk/by-uuid | cut -d ' ' -f 9,11 | while read -r ln; do<br />
if [ -n "$ln" ]; then<br />
uuid=$(echo "$ln" | cut -d ' ' -f 1)<br />
device=$(echo "$ln" | cut -d ' ' -f 2 | cut -d '/' -f 3 | cut -b 1-3)<br />
<br />
# determine whether drive is mounted already<br />
checkstr1=$(mount | grep "$uuid")<br />
checkstr2=$(mount | grep "$device")<br />
checkstr3=$(ls ~/.VirtualBox/*.vmdk | grep "$device")<br />
if [ -z "$checkstr1" ] && [ -z "$checkstr2" ] && [ -z "$checkstr3" ]; then<br />
VBoxManage internalcommands createrawvmdk -filename ~/.VirtualBox/"$device".vmdk -rawdisk /dev/"$device" -register<br />
fi<br />
fi<br />
done<br />
<br />
# Start VirtualBox<br />
VirtualBox<br />
</nowiki>}}<br />
<br />
Note that your user has to be added to the "disk" group to create VMDKs out of existing drives.<br />
<br />
=== Run a native Arch Linux installation inside VirtualBox ===<br />
<br />
If you have a dual boot system between Arch Linux and another operating system, it can become tedious to switch back and forth if you need to work in both. You may also experience performance or compatibility issues when using a virtual machine, which can impact your ability to do certain tasks.<br />
<br />
This guide will let you reuse, in a virtual machine, your native Arch Linux installation when you are running your second operating system. This way, you keep the ability to run each operating system natively, but have the option to run your Arch Linux installation inside a virtual machine.<br />
<br />
==== Make sure you have a persistent naming scheme ====<br />
<br />
Depending on your hard drive setup, device files representing your hard drives may appear differently when you will run your Arch Linux installation natively or in virtual machine. This problem occurs when using [[RAID#Implementation|FakeRAID]] for example. The fake RAID device will be mapped in {{ic|/dev/mapper/}} when you run your GNU/Linux distribution natively, while the devices are still accessible separately. However, in your virtual machine, it can appear without any mapping in {{ic|/dev/sdaX}} for example, because the drivers controlling the fake RAID in your host operating system (e.g. Windows) are abstracting the fake RAID device.<br />
<br />
To circumvent this problem, we will need to use an addressing scheme that is persistent to both systems. This can be achieved using [[UUID]]s. Make sure your [[boot loader]] and [[fstab]] file is using UUIDs, otherwise fix this issue. Read [[fstab]] and [[Persistent block device naming]].<br />
<br />
{{Warning|<br />
* Make sure your host partition is only accessible in read only from your Arch Linux virtual machine, this will avoid risk of corruptions if you were to corrupt that host partition by writing on it due to lack of attention.<br />
* You should NEVER allow VirtualBox to boot from the entry of your second operating system, which, as a reminder, is used as the host for this virtual machine! Take thus a special care especially if your default boot loader/boot manager entry is your other operating system. Give a more important timeout or put it below in the order of preferences.<br />
}}<br />
<br />
==== Make sure your mkinitcpio image is correct ====<br />
<br />
Make sure your [[mkinitcpio]] configuration uses the [[Mkinitcpio#HOOKS|HOOK]] {{ic|block}}:<br />
<br />
{{hc|/etc/mkinitcpio.conf|2=<br />
...<br />
HOOKS="base udev autodetect modconf ''block'' filesystems keyboard fsck"<br />
...<br />
}}<br />
<br />
If it is not present, add it and [[regenerate the initramfs]].<br />
<br />
==== Create a virtual machine configuration to boot from the physical drive ====<br />
<br />
===== Create a raw disk .vmdk image =====<br />
<br />
Now, we need to create a new virtual machine which will use a [https://www.virtualbox.org/manual/ch09.html#rawdisk RAW disk] as virtual drive, for that we will use a ~ 1Kio VMDK file which will be mapped to a physical disk. Unfortunately, VirtualBox does not have this option in the GUI, so we will have to use the console and use an internal command of {{ic|VBoxManage}}.<br />
<br />
Boot the host which will use the Arch Linux virtual machine. The command will need to be adapted according to the host you have.<br />
<br />
; On a GNU/Linux host:<br />
<br />
There are 3 ways to achieve this: login as root, changing the access right of the device with {{ic|chmod}}, adding your user to the {{ic|disk}} group. The latter way is the more elegant, let us proceed that way:<br />
<br />
# gpasswd -a ''your_user'' disk<br />
<br />
Apply the new group settings with:<br />
<br />
$ newgrp<br />
<br />
Now, you can use the command:<br />
<br />
$ VBoxManage internalcommands createrawvmdk -filename ''/path/to/file.vmdk'' -rawdisk ''/dev/sdb'' -register<br />
<br />
Adapt the above command to your need, especially the path and filename of the VMDK location and the raw disk location to map which contain your Arch Linux installation.<br />
<br />
; On a Windows host:<br />
<br />
Open a command prompt must be run as administrator. {{Tip|On Windows, open your start menu/start screen, type {{ic|cmd}}, and type {{ic|Ctrl+Shift+Enter}}, this is a shortcut to execute the selected program with admin rights.}}<br />
<br />
On Windows, as the disk filename convention is different from UNIX, use this command to determine what drives you have in your Windows system and their location:{{hc|# wmic diskdrive get name,size,model|<br />
Model Name Size<br />
WDC WD40EZRX-00SPEB0 ATA Device \\.\PHYSICALDRIVE1 4000783933440<br />
KINGSTON SVP100S296G ATA Device \\.\PHYSICALDRIVE0 96024821760<br />
Hitachi HDT721010SLA360 ATA Device \\.\PHYSICALDRIVE2 1000202273280<br />
Innostor Ext. HDD USB Device \\.\PHYSICALDRIVE3 1000202273280}}<br />
<br />
In this example, as the Windows convention is {{ic|\\.\PhysicalDriveX}} where X is a number from 0, {{ic|\\.\PHYSICALDRIVE1}} could be analogous to {{ic|/dev/sdb}} from the Linux disk terminology.<br />
<br />
To use the {{ic|VBoxManage}} command on Windows, you can either, change the current directory to your VirtualBox installation folder first with {{ic|cd C:\Program Files\Oracle\VirtualBox\}}<br />
<br />
# .\VBoxManage.exe internalcommands createrawvmdk -filename C:\file.vmdk -rawdisk \\.\PHYSICALDRIVE1<br />
<br />
or use the absolute path name:<br />
<br />
# "C:\Program Files\Oracle\VirtualBox\VBoxManage.exe" internalcommands createrawvmdk -filename C:\file.vmdk -rawdisk \\.\PHYSICALDRIVE1<br />
<br />
; On another operating system host:<br />
<br />
There are other limitations regarding the aforementioned command when used in other operating systems like OS X, please thus [https://www.virtualbox.org/manual/ch09.html#rawdisk read carefully the manual page], if you are concerned.<br />
<br />
===== Create the virtual machine configuration file =====<br />
<br />
{{Note|<br />
* To make use of the VBoxManage command on Windows, you need to change the current directory to your VirtualBox installation folder first: cd C:\Program Files\Oracle\VirtualBox\.<br />
* Windows makes use of backslashes instead of slashes, please replace all slashes "/" occurrences by backslashes "\" in the commands that follow when you will use them.<br />
}}<br />
<br />
After, we need to create a new machine (replace the ''virtual_machine_name'' to your convenience) and register it with VirtualBox.<br />
<br />
$ VBoxManage createvm -name ''virtual_machine_name'' -register<br />
<br />
Then, the newly raw disk needs to be attached to the machine. This will depend if your computer or actually the root of your native Arch Linux installation is on an IDE or a SATA controller.<br />
<br />
If you need an IDE controller:<br />
<br />
$ VBoxManage storagectl ''virtual_machine_name'' --name "IDE Controller" --add ide<br />
$ VBoxManage storageattach ''virtual_machine_name'' --storagectl "IDE Controller" --port 0 --device 0 --type hdd --medium /path/to/file.vmdk<br />
<br />
otherwise:<br />
<br />
$ VBoxManage storagectl ''virtual_machine_name'' --name "SATA Controller" --add sata<br />
$ VBoxManage storageattach ''virtual_machine_name'' --storagectl "SATA Controller" --port 0 --device 0 --type hdd --medium /path/to/file.vmdk<br />
<br />
While you continue using the CLI, it is recommended to use the VirtualBox GUI, to personalise the virtual machine configuration. Indeed, you must specify its hardware configuration as close as possible as your native machine: turning on the 3D acceleration, increasing video memory, setting the network interface, etc.<br />
<br />
Finally, you may want to seamlessly integrate your Arch Linux with your host operating system and allow copy pasting between both operating systems. Please refer to [[VirtualBox/Install Arch Linux as a guest#Install the Guest Additions]] for that, since this Arch Linux virtual machine is basically an Arch Linux guest.<br />
<br />
{{Warning|For [[Xorg]] to work in natively and in the virtual machine, since obviously it will be using different drivers, it is best if there is no {{ic|/etc/X11/xorg.conf}}, so Xorg will pick up everything it needs on the fly. However, if you really do need your own Xorg configuration, maybe is it worth to set your default systemd target to {{ic|multi-user.target}} with {{ic|systemctl isolate graphical.target}} as root (more details at [[Systemd#Targets]] and [[Systemd#Change current target]]). In that way, the graphical interface is disabled (i.e. Xorg is not launched) and after you logged in, you can {{ic|startx}}} manually with a custom {{ic|xorg.conf}}.}}<br />
<br />
=== Install a native Arch Linux system from VirtualBox ===<br />
<br />
In some cases it may be useful to install a native Arch Linux system while running another operating system: one way to accomplish this is to perform the installation through VirtualBox on a [https://www.virtualbox.org/manual/ch09.html#rawdisk raw disk]. If the existing operating system is Linux based, you may want to consider following [[Install from existing Linux]] instead.<br />
<br />
This scenario is very similar to [[#Run a native Arch Linux installation inside VirtualBox]], but will follow those steps in a different order: start by [[#Create a raw disk .vmdk image]], then [[#Create the virtual machine configuration file]].<br />
<br />
Now, you should have a working virtual machine configuration whose virtual VMDK disk is tied to a real disk. The installation process is exactly the same as the steps described in [[VirtualBox/Install Arch Linux as a guest]], but [[#Make sure you have a persistent naming scheme]] and [[#Make sure your mkinitcpio image is correct]].<br />
<br />
{{Warning|<br />
* For BIOS systems and MBR disks, do not install a boot loader inside your virtual machine, this will not work since the MBR is not linked to the MBR of your real machine and your virtual disk is only mapped to a real partition without the MBR.<br />
* For UEFI systems without [[Wikipedia:Compatibility Support Module#CSM|CSM]] and GPT disks, the installation will not work at all since:<br />
:* the [[Wikipedia:EFI System partition|ESP]] partition is not mapped to your virtual disk and Arch Linux requires to have the Linux kernel on it to boot as an EFI application (see [[EFISTUB]] for details);<br />
:* and the efivars, if you are installing Arch Linux using the EFI mode brought by VirtualBox, are not the one of your real system: the bootmanager entries will hence not be registered.<br />
* This is why, it is recommended to create your partitions in a native installation first, otherwize the partitions will not be taken into consideration in your MBR/GPT partition table.<br />
}}<br />
<br />
After completing the installation, boot your computer natively with an GNU/Linux installation media (whether it be Arch Linux or not), [[Installation guide#Chroot|chroot]] into your installed Arch Linux installation and install and configure a [[boot loader]].<br />
<br />
=== Install MacOS guest ===<br />
<br />
Before starting the virtual machine, run the following commands on the host machine [https://medium.com/@twister.mr/installing-macos-to-virtualbox-1fcc5cf22801]:<br />
<br />
$ VBoxManage modifyvm "MyMacVM" --cpuid-set 00000001 000106e5 00100800 0098e3fd bfebfbff<br />
$ VBoxManage setextradata "MyMacVM" "VBoxInternal/Devices/efi/0/Config/DmiSystemProduct" "iMac11,3"<br />
$ VBoxManage setextradata "MyMacVM" "VBoxInternal/Devices/efi/0/Config/DmiSystemVersion" "1.0"<br />
$ VBoxManage setextradata "MyMacVM" "VBoxInternal/Devices/efi/0/Config/DmiBoardProduct" "Iloveapple"<br />
$ VBoxManage setextradata "MyMacVM" "VBoxInternal/Devices/smc/0/Config/DeviceKey" "ourhardworkbythesewordsguardedpleasedontsteal(c)AppleComputerInc"<br />
$ VBoxManage setextradata "MyMacVM" "VBoxInternal/Devices/smc/0/Config/GetKeyFromRealSMC" 1<br />
$ VBoxManage setextradata "MyMacVM" VBoxInternal2/EfiGopMode 4<br />
<br />
==== No keyboard/mouse input when attempting to install Mojave ====<br />
<br />
If you are attempting to install Mojave, after doing the aforementioned steps, the installer will load up but you might not be able to send keyboard or mouse input. The reason seems to be that Mojave no longer supports the USB 1.1 controllers and in order to fix the issue you need to emulating USB 3.0. To do that first install the [[#Extension pack|VirtualBox Extension pack]].<br />
<br />
Then go to ''Machine > Settings > USB'' and select ''USB 3.0''. Input should work from this point onwards.<br />
<br />
==== UEFI interactive shell after restart ====<br />
<br />
If the installer is unable to properly format the bootable drive during installation and you end up in an UEFI shell, enter the following:<br />
<br />
# Type {{ic|exit}} at the UEFI prompt<br />
# Select ''Boot Maintenance Manager''<br />
# Select ''Boot From File''<br />
<br />
You will now be brought to couple of obscure PCI paths. The first one is the one that you just attempted to boot from and it did not work. The second (or third) one should be the one with the MacOS recovery partition that you need to load to continue the installation. Click the second Entry. If it is empty, press {{ic|Esc}} to go back and select the third entry. Once you get one with folders click though the folders. It should be something like ''macOS Install Data > Locked Files > Boot Files > boot.efi''. Once you click enter on the ''boot.efi'' you should boot into the MacOS installer and resume installation. Note that some of the subdirectories might be missing. Remember that you need to get to a {{ic|boot.efi}}.[https://superuser.com/questions/1235970/stuck-on-uefi-interactive-shell-with-mac-os-x-high-sierra-vm]<br />
<br />
=== Move a native Windows installation to a virtual machine ===<br />
<br />
If you want to migrate an existing native Windows installation to a virtual machine which will be used with VirtualBox on GNU/Linux, this use case is for you. This section only covers native Windows installation using the MSDOS/Intel partition scheme. Your Windows installation must reside on the first MBR partition for this operation to success. Operation for other partitions are available but have been untested (see [[#Known limitations]] for details).<br />
<br />
{{Warning|If you are using an OEM version of Windows, this process is unauthorized by the end user license license. Indeed, the OEM license typically states the Windows install is tied with the hardware together. Transferring a Windows install to a virtual machine removes this link. Make thus sure you have a full Windows install or a volume license model before continuing. If you have a full Windows license but the latter is not coming in volume, nor as a special license for several PCs, this means you will have to remove the native installation after the transfer operation has been achieved.}}<br />
<br />
A couple of tasks are required to be done inside your native Windows installation first, then on your GNU/Linux host.<br />
<br />
==== Tasks on Windows ====<br />
<br />
The first three following points comes from [https://www.virtualbox.org/wiki/Migrate_Windows#HAL this outdated VirtualBox wiki page], but are updated here.<br />
<br />
* Remove IDE/ATA controllers checks (Windows XP only): Windows memorize the IDE/ATA drive controllers it has been installed on and will not boot if it detects these have changed. The solution proposed by Microsoft is to reuse the same controller or use one of the same serial, which is impossible to achieve since we are using a Virtual Machine. [https://www.virtualbox.org/wiki/Migrate_Windows#HardDiskSupport MergeIDE], a German tool, developped upon another other solution proposed by Microsoft can be used. That solution basically consists in taking all IDE/ATA controller drivers supported by Windows XP from the initial driver archive (the location is hard coded, or specify it as the first argument to the {{ic|.bat}} script), installing them and registering them with the regedit database.<br />
* Use the right type of Hardware Abstraction Layer (old 32 bits Windows versions): Microsoft ships 3 default versions: {{ic|Hal.dll}} (Standard PC), {{ic|Halacpi.dll}} (ACPI HAL) and {{ic|Halaacpi.dll}} (ACPI HAL with IO APIC). Your Windows install could come installed with the first or the second version. In that way, please [https://www.virtualbox.org/manual/ch08.html#idp56927888 disable the ''Enable IO/APIC'' VirtualBox extended feature].<br />
* Disable any AGP device driver (only outdated Windows versions): If you have the files {{ic|agp440.sys}} or {{ic|intelppm.sys}} inside the {{ic|C:\Windows\SYSTEM32\drivers\}} directory, remove it. As VirtualBox uses a PCI virtual graphic card, this can cause problems when this AGP driver is used.<br />
* Create a Windows recovery disk: In the following steps, if things turn bad, you will need to repair your Windows installation. Make sure you have an install media at hand, or create one with ''Create a recovery disk'' from Vista SP1, ''Create a system repair disc'' on Windows 7 or ''Create a recovery drive'' on Windows 8.x).<br />
<br />
==== Using Disk2vhd to clone Windows partition ====<br />
<br />
Boot into Windows, clean up the installation (with [https://www.piriform.com/ccleaner CCleaner] for example), use [https://technet.microsoft.com/en-us/library/ee656415.aspx disk2vhd] tool to create a VHD image. Include a reserved system partition (if present) and the actual Windows partition (usually disk C:). The size of Disk2vhd-created image will be the sum of the actual files on the partition (used space), not the size of a whole partition. If all goes well, the image should just boot in a virtual machine and you will not have to go through the hassle with MBR and Windows boot loader, as in the case of cloning an entire partition.<br />
<br />
==== Tasks on GNU/Linux ====<br />
<br />
{{Tip|Skip the partition-related parts if you created VHD image with [[#Using Disk2vhd to clone Windows partition|Disk2vhd]].}}<br />
<br />
* Reduce the native Windows partition size to the size Windows actually needs with {{ic|ntfsresize}} available from {{Pkg|ntfs-3g}}. The size you will specify will be the same size of the VDI that will be created in the next step. If this size is too low, you may break your Windows install and the latter might not boot at all.<br />
<br />
:Use the {{ic|--no-action}} option first to run a test:<br />
:{{bc|# ntfsresize --no-action --size ''52Gi'' ''/dev/sda1''}}<br />
<br />
:If only the previous test succeeded, execute this command again, but this time without the aforementioned test flag.<br />
<br />
* Install VirtualBox on your GNU/Linux host (see [[#Installation steps for Arch Linux hosts]] if your host is Arch Linux).<br />
<br />
* Create the Windows disk image from the beginning of the drive to the end of the first partition where is located your Windows installation. Copying from the beginning of the disk is necessary because the MBR space at the beginning of the drive needs to be on the virtual drive along with the Windows partition. In this example two following partitions {{ic|sda2}} and {{ic|sda3}}will be later removed from the partition table and the MBR boot loader will be updated.<br />
<br />
:{{bc|1=# sectnum=$(( $(cat /sys/block/''sda/sda1''/start) + $(cat /sys/block/''sda/sda1''/size) ))}}<br />
:Using {{ic|cat /sys/block/''sda/sda1''/size}} will output the number of total sectors of the first partition of the disk {{ic|sda}}. Adapt where necessary.<br />
<br />
:{{bc|1=# dd if=''/dev/sda'' bs=512 count=$sectnum {{!}} VBoxManage convertfromraw stdin ''windows.vdi'' $(( $sectnum * 512 ))}}<br />
:We need to display the size in byte, {{ic|$(( $sectnum * 512 ))}} will convert the sector numbers to bytes.<br />
<br />
* Since you created your disk image as root, set the right ownership to the virtual disk image: {{bc|# chown ''your_user'':''your_group'' windows.vdi}}<br />
<br />
* Create your virtual machine configuration file and use the virtual disk created previously as the main virtual hard disk.<br />
<br />
* Try to boot your Windows virtual machine, it may just work. First though remove and repair disks from the boot process as it may interfere (and likely will) booting into safe-mode.<br />
<br />
* Attempt to boot your Windows virtual machine in safe mode (press the F8 key before the Windows logo shows up)... if running into boot issues, read [[#Fix MBR and Microsoft boot loader]]. In safe-mode, drivers will be installed likely by the Windows plug-and-play detection mechanism [https://i.imgur.com/hh1RrSp.png view]. Additionally, install the VirtualBox Guest Additions via the menu ''Devices'' > ''Insert Guest Additions CD image...''. If a new disk dialog does not appear, navigate to the CD drive and start the installer manually.<br />
<br />
* You should finally have a working Windows virtual machine. Do not forget to read the [[#Known limitations]].<br />
<br />
* Performance tip: according to [https://www.virtualbox.org/manual/ch05.html#harddiskcontrollers VirtualBox manual], SATA controller has a better performance than IDE. If you cannot boot Windows off virtual SATA controller right away, it is probably due to the lack of SATA drivers. Attach virtual disk to IDE controller, create an empty SATA controller and boot the virtual machine - Windows should automatically install SATA drivers for the controller. You can then shutdown the virtual machine, detach virtual disk from IDE controller and attach it to SATA controller instead.<br />
<br />
==== Fix MBR and Microsoft boot loader ====<br />
<br />
If your Windows virtual machine refuses to boot, you may need to apply the following modifications to your virtual machine.<br />
<br />
* Boot a GNU/Live live distribution inside your virtual machine before Windows starts up.<br />
<br />
* Remove other partitions entries from the virtual disk MBR. Indeed, since we copied the MBR and only the Windows partition, the entries of the other partitions are still present in the MBR, but the partitions are not available anymore. Use {{ic|fdisk}} to achieve this for example.<br />
:{{bc|<nowiki>fdisk ''/dev/sda''<br />
Command (m for help): a<br />
Partition number (''1-3'', default ''3''): ''1''</nowiki>}}<br />
<br />
* Write the updated partition table to the disk (this will recreate the MBR) using the {{ic|m}} command inside {{ic|fdisk}}.<br />
<br />
* Use {{Pkg|testdisk}} (see [https://www.cgsecurity.org/index.html?testdisk.html here] for details) to add a generic MBR:<br />
:{{bc|# testdisk > ''Disk /dev/sda...'' > [Proceed] > [Intel] Intel/PC partition > [MBR Code] Write TestDisk MBR to first sector > Write a new copy of MBR code to first sector? (Y/n) > Y > Write a new copy of MBR code, confirm? (Y/N) > A new copy of MBR code has been written. You have to reboot for the change to take effect. > [OK]}}<br />
<br />
* With the new MBR and updated partition table, your Windows virtual machine should be able to boot. If you are still encountering issues, boot your Windows recovery disk from on of the previous step, and inside your Windows RE environment, execute the commands [https://support.microsoft.com/kb/927392 described here].<br />
<br />
==== Known limitations ====<br />
<br />
* Your virtual machine can sometimes hang and overrun your RAM, this can be caused by conflicting drivers still installed inside your Windows virtual machine. Good luck to find them!<br />
* Additional software expecting a given driver beneath may either not be disabled/uninstalled or needs to be uninstalled first as the drivers that are no longer available.<br />
* Your Windows installation must reside on the first partition for the above process to work. If this requirement is not met, the process might be achieved too, but this had not been tested. This will require either copying the MBR and editing in hexadecimal see [https://superuser.com/questions/237782/virtualbox-booting-cloned-disk/253417#253417 VirtualBox: booting cloned disk] or will require to fix the partition table [https://gparted.org/h2-fix-msdos-pt.php manually] or by repairing Windows with the recovery disk you created in a previous step. Let us consider our Windows installation on the second partition; we will copy the MBR, then the second partition where to the disk image. {{ic|VBoxManage convertfromraw}} needs the total number of bytes that will be written: calculated thanks to the size of the MBR (the start of the first partition) plus the size of the second (Windows) partition. {{ic|<nowiki>{ dd if=/dev/sda bs=512 count=$(cat /sys/block/sda/sda1/start) ; dd if=/dev/sda2 bs=512 count=$(cat /sys/block/sda/sda2/size) ; } | VBoxManage convertfromraw stdin windows.vdi $(( ($(cat /sys/block/sda/sda1/start) + $(cat /sys/block/sda/sda2/size)) * 512 ))</nowiki>}}.<br />
<br />
=== Run a native Windows installation inside VirtualBox ===<br />
<br />
{{Note|The technique outlined in this section only applies to [[UEFI]] systems.}}<br />
<br />
In some cases, it is useful to be able to [[dual boot with Windows]] ''and'' access the partition in a virtual machine. This process is significantly different from [[#Move a native Windows installation to a virtual machine]] in several ways:<br />
<br />
* The Windows partition is not copied to a virtual disk image. Instead, a raw VMDK file is created;<br />
* Changes in the virtual machine will be mirrored in the partition, and vice versa;<br />
* OEM licenses should still be satisfied, since the Windows partition still boots directly on the hardware.<br />
<br />
{{Warning|Some of the commands used here can corrupt either the Windows partition, the Arch Linux partition, or both. Use extreme caution when executing commands, and double check that they are being run in the correct shell. It would be a good idea to have a backup of the entire drive ready before beginning this process.}}<br />
<br />
{{Note|Before proceeding be sure to have access to a Windows installation media (such as the [https://www.microsoft.com/en-us/software-download/windows11 Windows 11 ISO]).}}<br />
<br />
==== Creating the virtual machine ====<br />
<br />
A VirtualBox virtual machine must be manually created. As of now do not add any storage device any disk to the virtual machine, it will be done manually later.<br />
<br />
Configure the virtual machine with the following settings (settings panel can be opened by clicking the "Settings" button in the main toolbar):<br />
<br />
* View: System:<br />
** Tab: Motherboard:<br />
*** mark ''Enable I/O APIC'';<br />
*** mark ''Enable EFI'';<br />
*** mark ''Hardware Clock in UTC Time'' if is your case.<br />
** Tab: Processor:<br />
*** mark ''Enable PAE/NX'';<br />
*** mark ''Enable VT-x/AMD-V'';<br />
** Tab: Acceleration:<br />
*** Choose the paravirtualization interface ''Hyper-V'' from the drop down menu;<br />
*** mark ''Enable Nested Paging''.<br />
<br />
Optionally you can enable also the following settings:<br />
<br />
* View: Display<br />
** Tab: Screen<br />
*** mark ''Enable 3D Acceleration''. Note that it could cause glitches.<br />
<br />
{{Note|The ''Hyper-V'' setting is not required in order for the system to operate correctly, but it may help avoid licensing issues.}}<br />
<br />
==== Creating virtual machine disks ====<br />
<br />
To access the Windows partitions, create a [https://www.virtualbox.org/manual/ch09.html#rawdisk-access-disk-partitions raw VMDK file] pointing to the relevant Windows partitions (root privileges are required to read disk partition table):<br />
<br />
# VBoxManage createmedium disk -filename ''VM_DIRECTORY''/windows.vmdk --format=VMDK --variant RawDisk --property RawDrive=''DISK'' --property Partitions=''RESERVED_PARTITION_NUMBER'',''BASIC_DATA_PARTITION_NUMBER''<br />
<br />
Replace capitalized placeholder strings as follow:<br />
<br />
* {{ic|''VM_DIRECTORY''}} with the path of the virtual machine folder (usually a subdirectory of {{ic|~/VirtualBox virtual machines}};<br />
* {{ic|''DISK''}} must be replaced with the block device containing all the Windows partitions (e.g.: {{ic|/dev/sda}} or {{ic|/dev/nvme0n1}});<br />
* {{ic|''RESERVED_PARTITION_NUMBER''}} must be replaced with the number of partition labeled "Microsoft reserved partition" (e.g.: if the partition is the {{ic|/dev/sda2}} the number will be {{ic|2}});<br />
* {{ic|''BASIC_DATA_PARTITION_NUMBER''}} must be replaced with the partition containing the Windows installation (e.g.: if the partition is the {{ic|/dev/sda3}} the number will be {{ic|3}});<br />
<br />
Example:<br />
<br />
$ sudo VBoxManage createmedium disk -filename "/home/user/VirtualBox virtual machines/windows.vmdk" --format=VMDK --variant RawDisk --property RawDrive=/dev/nvme0n1 --property Partitions=2,3<br />
<br />
The command will also create an extra file inside the virtual machine folder, "windows-pt.vmdk", that will be just ignored.<br />
<br />
{{Note|{{ic|windows.vmdk}} must be re-created if the partition table is changed.}}<br />
<br />
{{Tip|<br />
Partition numbers can be found also by running this command and looking at the MIN column:<br />
<br />
{{hc|<br />
head=lsblk --output NAME,PARTLABEL,FSTYPE,MAJ:MIN,SIZE|<br />
output=<br />
NAME PARTLABEL FSTYPE UUID MAJ:MIN SIZE<br />
nvme0n1 259:0 931,5G<br />
├─nvme0n1p1 EFI system partition vfat 90DC-A6B3 259:1 100M<br />
├─nvme0n1p2 Microsoft reserved partition 259:2 16M<br />
├─nvme0n1p3 Basic data partition ntfs D2A2A104A2A0EE63 259:3 200G<br />
...<br />
}}<br />
}}<br />
<br />
Now change the virtual disk owner to give access the user and group running VirtualBox.<br />
<br />
{{bc|# chown ''VIRTUALBOX_RUNNING_USER'':''VIRTUALBOX_RUNNING_GROUP'' ''VM_DIRECTORY''/windows.vmdk ''VM_DIRECTORY''/windows-pt.vmdk}}<br />
<br />
Replace {{ic|''VIRTUALBOX_RUNNING_USER''}} and {{ic|''VIRTUALBOX_RUNNING_GROUP''}} with the user and the group that will run VirtualBox, which most likely will be your user.<br />
<br />
==== Allowing VirtualBox to read physical partitions ====<br />
<br />
VirtualBox must have [https://www.virtualbox.org/manual/ch09.html#rawdisk raw disk access] in order to run a Windows partition. Normally, this would require VirtualBox to be run with full root privileges, but more elegant options are available.<br />
<br />
===== Higher security option: using a dedicated group for the Windows partitions =====<br />
<br />
Here [[udev]] is configured to restrict the access to partitions Windows partitions to the ''vboxusers'' group, and then the user running VirtualBox is added to the group.<br />
<br />
Assigning the disks to the ''vboxusers'' group can be done automatically by creating the following file:<br />
<br />
{{hc|/etc/udev/rules.d/99-vbox.rules|<nowiki><br />
#<br />
# Rules to give VirtualBox users raw access to Windows partitions<br />
#<br />
<br />
# Microsoft Reserved partition<br />
SUBSYSTEM=="block", ENV{ID_PART_ENTRY_TYPE}=="e3c9e316-0b5c-4db8-817d-f92df00215ae", GROUP="vboxusers"<br />
<br />
# Windows partition<br />
SUBSYSTEM=="block", ENV{ID_PART_ENTRY_TYPE}=="ebd0a0a2-b9e5-4433-87c0-68b6b72699c7", GROUP="vboxusers"<br />
<br />
#<br />
# Rules to give VirtualBox users raw access to Windows disk<br />
#<br />
<br />
# sdb<br />
ENV{ID_PART_TABLE_UUID}=="WINDOWS_DISK_ID_PART_TABLE_UUID", GROUP="vboxusers"<br />
</nowiki>}}<br />
<br />
{{ic|WINDOWS_DISK_ID_PART_TABLE_UUID}} must be replaced with the value obtained from {{ic|udevadm info /dev/WINDOWS_DISK | grep ID_PART_TABLE_UUID}} (replace {{ic|WINDOWS_DISK}} with the disk containing Windows partitions). The UUIDs in these rules correspond to particular [[Wikipedia:GUID_Partition_Table#Partition_type_GUIDs|GPT partition types]] while the other capitalized strings are supposed to be written that way, so those does not have to be replaced.<br />
<br />
Then the user running VirtualBox must be added to the ''vboxusers'' group. This can be done with the following command:<br />
<br />
# usermod -aG vboxusers VIRTUALBOX_RUNNING_USER<br />
<br />
Replace {{ic|VIRTUALBOX_RUNNING_USER}} and with the user that will run VirtualBox, which most likely will be your user.<br />
<br />
===== Lower security option: using 'disk' group =====<br />
<br />
To be able to add the vmdk file in Virtualbox Virtual Media Manager without running VirtualBox as root, the user running VirtualBox need to be in {{ic|vboxusers}} and {{ic|disk}} groups.<br />
<br />
{{bc|# usermod -aG disk,vboxusers VIRTUALBOX_RUNNING_USER}}<br />
<br />
Replace {{ic|VIRTUALBOX_RUNNING_USER}} and with the user that will run VirtualBox, which most likely will be your user.<br />
<br />
{{Warning|Be aware of the potential security implications of this edit, as you are giving your user account full read-write access all storage devices owned by the disk group.}}<br />
<br />
==== Setting up a separate EFI system partition ====<br />
<br />
Virtual machine EFI boot files will refer to different disks than the ones in the physical EFI system partition, so VirtualBox must not make use of the latter but instead of an EFI system partition inside a dedicated virtual disk. This disk can be created with the following command:<br />
<br />
$ VBoxManage createmedium disk --filename ''VM_DIRECTORY/esp.vmdk'' --size 512 --format VMDK<br />
<br />
Replace {{ic|VM_DIRECTORY}} with the folder containing the virtual machine being built.<br />
<br />
==== Adding virtual disks to the virtual machine ====<br />
<br />
Configure the virtual machine storage devices (Settings panel - Storage) as following:<br />
<br />
* add {{ic|esp.vmdk}} as a SATA hard disk attached to the "SATA Port 0";<br />
* add {{ic|windows.vmdk}} as a SATA hard disk attached to the "SATA Port 1";<br />
* mount Windows installation iso into the virtual optical drive .<br />
<br />
{{Note|<br />
* for adding a SATA hard disk use the second button on the right of the "Controller: SATA" device;<br />
* the virtual optical drive should already be there as "Optical Drive".<br />
}}<br />
<br />
==== Configuring the virtual UEFI firmware and creating Windows boot files ====<br />
<br />
Now start the virtual machine and it should automatically boot from Windows installation disk. After choosing the installation locales click on the "Repair your computer" link, then choose "Troubleshoot" and then " Command Prompt" in order to launch a command prompt from the install media.<br />
<br />
Enter the following commands to create a new GPT table in the esp.vmdk disk and install the Windows boot loader onto it using configuration from the existing Windows partition:<br />
<br />
Open Diskpart:<br />
<br />
X:\ diskpart<br />
<br />
List all disks identified by the system:<br />
<br />
DISKPART> list disk<br />
<br />
The {{ic|esp.vmkd}} disk should be labeled as {{ic|disk 0}} due to the fact that was attached to the SATA port 0, ~512 MiB in size and unpartitioned. The {{ic|windows.vmdk}} disk should be labeled as {{ic|disk 1}}; note that the column "Size" displays the disk size, not the partition one.<br />
<br />
Select the esp.vmdk disk:<br />
<br />
DISKPART> select Disk 0<br />
<br />
Now create a GPT partition table, an EFI system partition, big as the whole disk, and assign to it a label and drive letter:<br />
<br />
{{bc|1=<br />
DISKPART> clean<br />
DISKPART> convert gpt<br />
DISKPART> create partition efi size=500<br />
DISKPART> format quick fs=fat32 label="System"<br />
DISKPART> assign letter="S"<br />
}}<br />
<br />
Check that the partiton has been correctly created:<br />
<br />
DISKPART> list volume<br />
<br />
Our newly created EFI system partition will be labeled as "SYSTEM" with letter as "S".<br />
<br />
Take note of the Windows installation volume letter because it will be used in next steps. Usually its {{ic|D}} but it could be different: you can infer it from its label and its size. The size is the same as the Windows installation partition size on your physical hard disk.<br />
<br />
Exit diskpart:<br />
<br />
DISKPART> exit<br />
<br />
Install the Windows boot loader into the EFI system partition. <br />
<br />
{{bc|<br />
D:<br />
cd Windows\System32<br />
bcdboot D:\Windows /s S: /f UEFI<br />
}}<br />
<br />
Now close the command prompt, power off the virtual machine and detach the Windows installation disk (from "Preferences > Devices" remove the optical disk). The virtual machine should now boot from the newly installed boot partition and load the physical Windows installation. It may show some UEFI related errors on the top of the virtual machine window and the first boot may take a while, but if everything has been done correctly you will be able to access your windows installation.<br />
<br />
=== Run an entire physical disk in Virtualbox ===<br />
<br />
{{Note|You may refer to Virtualbox official documentation [https://www.virtualbox.org/manual/ch09.html#rawdisk 9.8.1. Using a Raw Host Hard Disk From a Guest].}}<br />
<br />
This works the same way as [[#Run a native Windows installation inside VirtualBox]] but the vmdk will contain the entire disk rather than one partion, and so you will not need to create a separate ESP or MBR partition as the one in the physical disk will be used.<br />
<br />
Create the raw disk:<br />
<br />
# VBoxManage internalcommands createrawvmdk -filename /path/to/file.vmdk -rawdisk /dev/sdb<br />
<br />
Then follow the same method as in [[#Run a native Windows installation inside VirtualBox]] for the configuration and virtual disk attachement.<br />
<br />
=== Set guest starting resolution ===<br />
<br />
You can change the BIOS/UEFI booting resolution using {{ic|VBoxManage}} tool. For example:<br />
<br />
$ VBoxManage setextradata "Your Virtual Machine Name" "VBoxInternal2/EfiGraphicsResolution" "2560x1440"<br />
<br />
Recommended resolutions are 1280x720, 1920x1080, 2048x1080, 2560x1440, 3840x2160, 1280x800, 1280x1024, 1440x900, 1600x900.<br />
<br />
=== SSH from host to guest ===<br />
<br />
The network tab of the virtual machine settings contains, in "Advanced", a tool to create port forwarding. <br />
It is possible to use it to forward the Guest ssh port {{ic|22}} to a Host port, e.g. {{ic|3022}} :<br />
<br />
user@host$ ssh -p 3022 $USER@localhost<br />
<br />
will establish a connection from Host to Guest.<br />
<br />
==== SSHFS as alternative to the shared folder ====<br />
<br />
Using this port forwarding and sshfs, it is straightforward to mount the Guest filesystem onto the Host one:<br />
<br />
user@host$ sshfs -p 3022 $USER@localhost:$HOME ~/shared_folder<br />
<br />
and then transfer files between both.<br />
<br />
== Troubleshooting ==<br />
<br />
=== Keyboard and mouse are locked into virtual machine ===<br />
<br />
This means your virtual machine has captured the input of your keyboard and your mouse. Simply press the right {{ic|Ctrl}} key and your input should control your host again.<br />
<br />
To control transparently your virtual machine with your mouse going back and forth your host, without having to press any key, and thus have a seamless integration, install the guest additions inside the guest. Read from [[VirtualBox/Install Arch Linux as a guest#Install the Guest Additions]] if your guest is Arch Linux, otherwise read the official VirtualBox help.<br />
<br />
=== No 64-bit operating system client options ===<br />
<br />
When launching a virtual machine client, and no 64-bit options are available, make sure your CPU virtualization capabilities (usually named {{ic|VT-x}}) are enabled in the BIOS.<br />
<br />
If you are using a Windows host, you may need to disable Hyper-V, as it prevents VirtualBox from using VT-x. [https://www.virtualbox.org/ticket/12350]<br />
<br />
=== VirtualBox GUI does not match host GTK theme ===<br />
<br />
See [[Uniform look for Qt and GTK applications]] for information about theming Qt-based applications like VirtualBox.<br />
<br />
=== Cannot send Ctrl+Alt+Fn to guest ===<br />
<br />
Your guest operating system is a GNU/Linux distribution and you want to open a new TTY shell by hitting {{ic|Ctrl+Alt+F2}} or exit your current X session with {{ic|Ctrl+Alt+Backspace}}. If you type these keyboard shortcuts without any adaptation, the guest will not receive any input and the host (if it is a GNU/Linux distribution too) will intercept these shortcut keys. To send {{ic|Ctrl+Alt+F2}} to the guest for example, simply hit your ''Host Key'' (usually the right {{ic|Ctrl}} key) and press {{ic|F2}} simultaneously.<br />
<br />
=== USB subsystem not working ===<br />
<br />
Your user must be in the {{ic|vboxusers}} group and you need to install the [[#Extension pack|extension pack]] if you want USB 2 support. Then you will be able to enable USB 2 in the virtual machine settings and add one or several filters for the devices you want to access from the guest operating system.<br />
<br />
If {{ic|VBoxManage list usbhost}} does not show any USB devices even if run as root, make sure that there is no old udev rules (from VirtualBox 4.x) in {{ic|/etc/udev/rules.d/}}. VirtualBox 5.0 installs udev rules to {{ic|/usr/lib/udev/rules.d/}}. You can use command like {{ic|pacman -Qo /usr/lib/udev/rules.d/60-vboxdrv.rules}} to determine if the udev rule file is outdated.<br />
<br />
Sometimes, on old Linux hosts, the USB subsystem is not auto-detected resulting in an error {{ic|Could not load the Host USB Proxy service: VERR_NOT_FOUND}} or in a not visible USB drive on the host, [https://bbs.archlinux.org/viewtopic.php?id=121377 even when the user is in the '''vboxusers''' group]. This problem is due to the fact that VirtualBox switched from ''usbfs'' to ''sysfs'' in version 3.0.8. If the host does not understand this change, you can revert to the old behaviour by defining the following environment variable in any file that is sourced by your shell (e.g. your {{ic|~/.bashrc}} if you are using ''bash''):<br />
<br />
{{hc|~/.bashrc|2=<br />
VBOX_USB=usbfs<br />
}}<br />
<br />
Then make sure, the environment has been made aware of this change (reconnect, source the file manually, launch a new shell instance or reboot).<br />
<br />
Also make sure that your user is a member of the {{ic|storage}} group.<br />
<br />
=== USB modem not working on host ===<br />
<br />
If you have a USB modem which is being used by the guest operating system, killing the guest operating system can cause the modem to become unusable by the host system. Killing and restarting {{ic|VBoxSVC}} should fix this problem.<br />
<br />
=== USB device crashes guest ===<br />
<br />
If attaching a USB device to the guest causes a crash or any other erroneous behavior, try switching the USB controller from USB 2 (EHCI) to USB 3 (xHCI) or vice versa.<br />
<br />
=== Host freezes on virtual machine start ===<br />
<br />
Generally, such issues are observed after upgrading VirtualBox or Linux kernel. Downgrading them to the previous versions of theirs might solve the problem.<br />
<br />
=== Analog microphone not working ===<br />
<br />
If the audio input from an analog microphone is working correctly on the host, but no sound seems to get through to the guest, despite the microphone device apparently being detected normally, installing a [[sound server]] such as [[PulseAudio]] on the host might fix the problem.<br />
<br />
If after installing [[PulseAudio]] the microphone still refuses to work, setting ''Host Audio Driver'' (under ''VirtualBox > Machine > Settings > Audio'') to ''ALSA Audio Driver'' might help.<br />
<br />
=== Problems with images converted to ISO ===<br />
<br />
Some image formats cannot be reliably converted to ISO. For instance, {{Pkg|ccd2iso}} ignores .ccd and .sub files, which can result in disk images with broken files. <br />
<br />
In this case, you will either have to use [[CDemu]] for Linux inside VirtualBox or any other utility used to mount disk images.<br />
<br />
=== Failed to create the host-only network interface ===<br />
<br />
Make sure all required kernel modules are loaded. See [[#Load the VirtualBox kernel modules]].<br />
<br />
If all required kernel modules are loaded and you are still unable to create the host-only adapter, navigate to ''File > Host Network Manager'' and click the ''Create'' button to add the network interface.<br />
<br />
=== Failed to insert module ===<br />
<br />
When you get the following error when trying to load modules:<br />
<br />
Failed to insert 'vboxdrv': Required key not available<br />
<br />
[[#Sign modules|Sign]] your modules or disable {{ic|CONFIG_MODULE_SIG_FORCE}} in your kernel config.<br />
<br />
=== VBOX_E_INVALID_OBJECT_STATE (0x80BB0007) ===<br />
<br />
This can occur if a virtual machine is exited ungracefully. Run the following command:<br />
<br />
$ VBoxManage controlvm ''virtual_machine_name'' poweroff<br />
<br />
=== NS_ERROR_FAILURE and missing menu items ===<br />
<br />
This error might appear if {{AUR|virtualbox-ext-oracle}} has not been updated and becomes incompatible with a newly released virtualbox version<br />
<br />
This error also happens sometimes when selecting ''QCOW''/''QCOW2''/''QED'' disk format when creating a new virtual disk.<br />
<br />
If you encounter this message the first time you start the virtual machine:<br />
<br />
{{bc|<br />
Failed to open a session for the virtual machine debian.<br />
Could not open the medium '/home/.../VirtualBox virtual machines/debian/debian.qcow'.<br />
QCow: Reading the L1 table for image '/home/.../VirtualBox virtual machines/debian/debian.qcow' failed (VERR_EOF).<br />
VD: error VERR_EOF opening image file '/home/.../VirtualBox virtual machines/debian/debian.qcow' (VERR_EOF).<br />
<br />
Result Code: <br />
NS_ERROR_FAILURE (0x80004005)<br />
Component: <br />
Medium<br />
}}<br />
<br />
Exit VirtualBox, delete all files of the new machine and from VirtualBox configuration file remove the last line in {{ic|MachineRegistry}} menu (or the offending machine you are creating):<br />
<br />
{{hc|~/.config/VirtualBox/VirtualBox.xml|2=<br />
...<br />
<MachineRegistry><br />
<MachineEntry uuid="{00000000-0000-0000-0000-000000000000}" src="/home/void/VirtualBox virtual machines/debian/debian.vbox"/><br />
<MachineEntry uuid="{00000000-0000-0000-0000-000000000000}" src="/home/void/VirtualBox virtual machines/ubuntu/ubuntu.vbox"/><br />
<strike><MachineEntry uuid="{00000000-0000-0000-0000-000000000000}" src="/home/void/VirtualBox virtual machines/lastvmcausingproblems/lastvmcausingproblems.qcow"/></strike><br />
</MachineRegistry><br />
...<br />
}}<br />
<br />
=== OpenBSD unusable when virtualisation instructions unavailable ===<br />
<br />
While OpenBSD is reported to work fine on other hypervisors without virtualisation instructions (VT-x AMD-V) enabled, an OpenBSD virtual machine running on VirtualBox without these instructions will be unusable, manifesting with a bunch of segmentation faults. Starting VirtualBox with the ''-norawr0'' argument [https://www.virtualbox.org/ticket/3947 may solve the problem]. You can do it like this:<br />
<br />
$ VBoxSDL -norawr0 -vm ''name_of_OpenBSD_virtual_machine''<br />
<br />
=== Windows: "The specified path does not exist. Check the path and then try again." ===<br />
<br />
This error message may appear when running an {{ic|.exe}} file which requires administrator privileges from a shared folder in windows guests. [https://www.virtualbox.org/ticket/5732#comment:39]<br />
<br />
As a workaround, copy the file to the virtual drive or use [[Wikipedia:Uniform Naming Convention|UNC paths]] ({{ic|\\vboxsvr}}). See [https://support.microsoft.com/de-de/help/2019185/copying-files-from-a-mapped-drive-to-a-local-directory-fails-with-erro] for more information.<br />
<br />
=== Windows 8.x error code 0x000000C4 ===<br />
<br />
If you get this error code while booting, even if you choose operating system type Win 8, try to enable the {{ic|CMPXCHG16B}} CPU instruction:<br />
<br />
$ vboxmanage setextradata ''virtual_machine_name'' VBoxInternal/CPUM/CMPXCHG16B 1<br />
<br />
=== Windows 8, 8.1 or 10 fails to install, boot or has error "ERR_DISK_FULL" ===<br />
<br />
Update the virtual machine's settings by going to ''Settings > Storage > Controller:SATA'' and check ''Use Host I/O Cache''.<br />
<br />
=== WinXP: Bit-depth cannot be greater than 16 ===<br />
<br />
If you are running at 16-bit color depth, then the icons may appear fuzzy/choppy. However, upon attempting to change the color depth to a higher level, the system may restrict you to a lower resolution or simply not enable you to change the depth at all. To fix this, run {{ic|regedit}} in Windows and add the following key to the Windows XP virtual machine's registry:<br />
<br />
[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services]<br />
"ColorDepth"=dword:00000004<br />
<br />
Then update the color depth in the "desktop properties" window. If nothing happens, force the screen to redraw through some method (i.e. {{ic|Host+f}} to redraw/enter full screen).<br />
<br />
=== Windows: Screen flicker if 3D acceleration enabled ===<br />
<br />
VirtualBox > 4.3.14 has a regression in which Windows guests with 3D acceleration flicker. Since r120678 a patch has been implemented to recognize an [[environment variable]] setting, launch VirtualBox like this:<br />
<br />
$ CR_RENDER_FORCE_PRESENT_MAIN_THREAD=0 VirtualBox<br />
<br />
Make sure no VirtualBox services are still running. See [https://www.virtualbox.org/ticket/13653 VirtualBox bug 13653].<br />
<br />
=== Cannot launch VirtualBox with Wayland: Segmentation fault ===<br />
<br />
This problem is caused by Qt detecting Wayland (e.g., if {{ic|1=XDG_SESSION_TYPE=wayland}}), while VirtualBox does not work on Wayland yet. See {{Bug|58761}} and the [https://www.virtualbox.org/ticket/18679 upstream bug].<br />
<br />
The Qt platform detection can be disabled and X11 forced over Wayland by setting the [[environment variable]] {{ic|1=QT_QPA_PLATFORM=xcb}}.<br />
To not affect the other Qt applications (which usually work well with Wayland), {{ic|1=QT_QPA_PLATFORM=xcb}} should only be set when launching VirtualBox.<br />
<br />
If starting through the [[desktop entry]], follow the instructions in [[Desktop entries#Modify environment variables]] and change the lines starting with {{ic|1=Exec=VirtualBox ...}} to {{ic|1=Exec=env QT_QPA_PLATFORM=xcb VirtualBox ...}}. If starting from the shell, alias ([[Bash#Aliases]]) {{ic|virtualbox}} to {{ic|1=env QT_QPA_PLATFORM=xcb virtualbox}}.<br />
<br />
{{Note|If you have mouse or keyboard related issue in Wayland, you can try above setting too.}}<br />
<br />
=== Random freezing in guests with Intel GPU ===<br />
<br />
With Intel CPU and graphics, allocating more processors for the guest can lower render performance, thus cause random freezing. Allocating less processors can help.<br />
<br />
=== Unable to view desktop in fullscreen mode ===<br />
<br />
Disable the Mini Toolbar by selecting ''Machine > Settings'', select the ''User Interface'' tab and uncheck the ''Mini Toolbar'' checkbox<br />
<br />
=== Random crashes with Windows 10 guest operating system with Intel Tiger Lake chipset ===<br />
<br />
Disable split lock detection by adding {{ic|1=split_lock_detect=off}} to the [[kernel parameter]]s.<br />
<br />
Details are described in VirtualBox's [https://www.virtualbox.org/ticket/20180/#comment:8 Ticket #20180]{{Dead link|2023|06|17|status=404}}.<br />
<br />
=== Freeze during virtual machine startup with 11th generation Intel CPU and later ===<br />
<br />
If the message {{ic|1=traps: Missing ENDBR}} and {{ic|1=kernel BUG at arch/x86/kernel/traps.c}} appears in the [[journal]] you can try adding {{ic|1=ibt=off}} as a [[kernel parameter]]. Seems to be linked to {{Bug|74891}}.<br />
<br />
=== Failed to save the settings when enabling Secure Boot ===<br />
<br />
In VirtualBox 7.0.0, enabling Secure Boot in a virtual machine that was created in a previous VirtualBox version will fail with a nondescript error ({{Bug|76234}}):<br />
<br />
Failed to save the settings.<br />
<br />
The solution is to click the ''Reset Keys to Default'' button right below the ''Enable Secure Boot'' checkbox.<br />
<br />
== See also ==<br />
<br />
* [https://www.virtualbox.org/manual/UserManual.html VirtualBox User Manual]<br />
* [[Wikipedia:VirtualBox]]</div>Goetzchttps://wiki.archlinux.org/index.php?title=Touchpad_Synaptics&diff=767343Touchpad Synaptics2023-02-11T18:11:51Z<p>Goetzc: style</p>
<hr />
<div>[[Category:Input devices]]<br />
[[de:Synaptics Touchpad Treiber]]<br />
[[es:Touchpad Synaptics]]<br />
[[ja:Synaptics タッチパッド]]<br />
[[ru:Touchpad Synaptics]]<br />
[[zh-hans:Touchpad Synaptics]]<br />
{{Related articles start}}<br />
{{Related|Xorg}}<br />
{{Related articles end}}<br />
This article details the installation and configuration process of the '''''Synaptics input driver''''' for Synaptics (and ALPS) touchpads found on most notebooks.<br />
<br />
{{Warning|1={{Pkg|xf86-input-synaptics}} is no longer actively updated. If possible, use [[libinput]]. For some reasons why you might still prefer ''xf86-input-synaptics'', see [https://neosmart.net/blog/2020/multi-touch-gestures-on-linux/] and [https://web.archive.org/web/20200925193856/https://www.askwoody.com/forums/topic/why-ive-come-to-dislike-libinput-one-of-the-linux-input-drivers/]. }}<br />
<br />
{{Note|1=If you want to configure touchpad via GNOME Settings, you need to use the [[libinput]] driver.[https://bugzilla.gnome.org/show_bug.cgi?id=764257#c12]}}<br />
<br />
== Installation ==<br />
<br />
The Synaptics driver can be [[install]]ed with the package {{Pkg|xf86-input-synaptics}}.<br />
<br />
== Configuration ==<br />
<br />
The primary method of configuration for the touchpad is through an [[Xorg]] server configuration file. After installing ''xf86-input-synaptics'', a default configuration file is located at {{ic|/usr/share/X11/xorg.conf.d/70-synaptics.conf}}. Users can copy this file to {{ic|/etc/X11/xorg.conf.d/}} and edit it to configure the various driver options available. Refer to the {{man|4|synaptics}} manual page for a complete list of available options. Machine-specific options can be discovered using [[#Synclient]].<br />
<br />
=== Frequently used options ===<br />
<br />
The following example file configures some common options, including vertical, horizontal and circular scrolling as well as tap-to-click:<br />
<br />
{{hc|/etc/X11/xorg.conf.d/70-synaptics.conf|<br />
Section "InputClass"<br />
Identifier "touchpad"<br />
Driver "synaptics"<br />
MatchIsTouchpad "on"<br />
Option "TapButton1" "1"<br />
Option "TapButton2" "3"<br />
Option "TapButton3" "2"<br />
Option "VertEdgeScroll" "on"<br />
Option "VertTwoFingerScroll" "on"<br />
Option "HorizEdgeScroll" "on"<br />
Option "HorizTwoFingerScroll" "on"<br />
Option "CircularScrolling" "on"<br />
Option "CircScrollTrigger" "2"<br />
Option "EmulateTwoFingerMinZ" "40"<br />
Option "EmulateTwoFingerMinW" "8"<br />
Option "CoastingSpeed" "0"<br />
Option "FingerLow" "30"<br />
Option "FingerHigh" "50"<br />
Option "MaxTapTime" "125"<br />
...<br />
EndSection<br />
}}<br />
<br />
; TapButton1: (integer) configures which mouse-button is reported on a non-corner, one finger tap.<br />
; TapButton2: (integer) configures which mouse-button is reported on a non-corner, two finger tap<br />
; TapButton3: (integer) configures which mouse-button is reported on a non-corner, three finger tap<br />
; RBCornerButton: (integer) configures which mouse-button is reported on a right bottom corner, one finger tap (use {{ic|Option "RBCornerButton" "3"}} to achieve Ubuntu style tap behaviour for right mouse button in lower right corner)<br />
; RTCornerButton: (integer) as above, but for top right corner, one finger tap.<br />
; VertEdgeScroll: (boolean) enables vertical scrolling while dragging across the right edge of the touch pad.<br />
; HorizEdgeScroll: (boolean) enables horizontal scrolling while dragging across the bottom edge of the touch pad.<br />
; VertTwoFingerScroll: (boolean) enables vertical scrolling using two fingers.<br />
; HorizTwoFingerScroll: (boolean) enables horizontal scrolling using two fingers.<br />
; EmulateTwoFingerMinZ/W: (integer) play with this value to set the precision of two finger scroll.<br />
; FingerLow: (integer) when finger pressure drops below this value, the driver counts it as a release.<br />
; FingerHigh: (integer) when finger pressure goes above this value, the driver counts it as a touch.<br />
; MaxTapTime: Determines how "crisp" a tap must be to be considered a real tap. Decrease the value to require a more crisp tap. Properly adjusting this parameter can reduce false positives when the hands hover over or lightly touch the pad.<br />
; VertScrollDelta and HorizScrollDelta: (integer) configures the speed of scrolling, it is a bit counter-intuitive because higher values produce greater precision and thus slower scrolling. Negative values cause natural scrolling like in macOS.<br />
<br />
{{Note|<br />
* If you find that your hand frequently brushes your touchpad, causing the {{ic|TapButton2}} option to be triggered (which will more than likely paste from your clipboard), and you do not mind losing two-finger-tap functionality, set {{ic|TapButton2}} to {{ic|0}}. Alternatively, see [[#Disable touchpad while typing]].<br />
* Recent versions include a "Coasting" feature, enabled by default, which may have the undesired effect of continuing almost any scrolling until the next tap or click, even if you are no longer touching the touchpad. This means that to scroll just a bit, you need to scroll (by using the edge, or a multitouch option) and then almost immediately tap the touchpad, otherwise scrolling will continue forever. If wish to avoid this, set {{ic|CoastingSpeed}} to {{ic|0}}.<br />
* If your touchpad is too sensitive, use higher values for {{ic|FingerLow}} and {{ic|FingerHigh}} and vice versa. Remember that {{ic|FingerLow}} should be smaller than {{ic|FingerHigh}}<br />
}}<br />
<br />
=== Configuration on the fly ===<br />
<br />
Next to the traditional method of configuration, the Synaptics driver also supports on the fly configuration. This means that users can set certain options through a software application, these options are applied immediately without needing to restart Xorg. This is useful to test configuration options before you include them in the configuration file or a script. Note that on the fly configuration is not persistent and lasts only until the Xorg server exists.<br />
<br />
==== Console tools ====<br />
<br />
* {{App|[[#Synclient|Synclient]]|command line utility to configure and query Synaptics driver settings.|https://xorg.freedesktop.org/|{{Pkg|xf86-input-synaptics}}}}<br />
* {{App|[[#Using xinput to determine touchpad capabilities|xinput]]|general-purpose utility to configure X input devices.|https://xorg.freedesktop.org/|{{Pkg|xorg-xinput}}}}<br />
<br />
==== Graphical tools ====<br />
<br />
* {{App|GPointing Device Settings|Provides graphical on the fly configuration for several pointing devices connected to the system, including your synaptics touch pad. This application replaces GSynaptics as the preferred tool for graphical touchpad configuration through the synaptics driver.|https://wiki.gnome.org/Attic/GPointingDeviceSettings|{{AUR|gpointing-device-settings}}}}<br />
* {{App|kcm_touchpad|New configuration tool for [[KDE]] Plasma 5. It provides a module under input devices in System Settings. It is to be considered a replacement for ''synaptiks'' and the old ''kcm-touchpad'' module.|https://invent.kde.org/plasma/plasma-desktop/-/tree/master/kcms/touchpad|4={{Pkg|plasma-desktop}}}}<br />
<br />
=== Xfce4/Cinnamon ===<br />
<br />
To change these settings in ''XFCE 4''':<br />
<br />
# Open ''System Settings''.<br />
# Click ''Mouse and Touchpad''.<br />
# Change the settings on the ''Touchpad'' tab.<br />
<br />
To change these settings in '''Cinnamon''':<br />
<br />
# Open ''Cinnamon System Settings''.<br />
# Click ''Mouse and Touchpad''.<br />
# Change the settings on the ''Touchpad'' tab.<br />
<br />
=== MATE ===<br />
<br />
It is possible to configure the way MATE handles the touchpad:<br />
<br />
# Run {{ic|dconf-editor}}.<br />
# Edit the keys in the {{ic|org.mate.desktop.peripherals.touchpad}} folder.<br />
<br />
To prevent Mate settings daemon from overriding existing settings, do as follows:<br />
<br />
# Run {{ic|dconf-editor}}.<br />
# Edit {{ic|org.mate.SettingsDaemon.plugins.mouse}}.<br />
# Uncheck the '''active''' setting.<br />
<br />
== Advanced configuration ==<br />
<br />
=== Using xinput to determine touchpad capabilities ===<br />
<br />
Depending on your model, synaptic touchpads may have or lack capabilities. We can determine which capabilities your hardware supports by using {{man|1|xinput}}.<br />
<br />
* left, middle and right hardware buttons<br />
* two finger detection<br />
* three finger detection<br />
* configurable resolution<br />
<br />
First, find the name of your touchpad:<br />
<br />
$ xinput list<br />
<br />
You can now use ''xinput'' to find your touchpad's capabilities:<br />
<br />
{{hc|$ xinput list-props "SynPS/2 Synaptics TouchPad" {{!}} grep Capabilities|<br />
Synaptics Capabilities (309): 1, 0, 1, 0, 0, 1, 1<br />
}}<br />
<br />
From left to right, this shows:<br />
<br />
* {{ic|1}}: device has a physical left button<br />
* {{ic|0}}: device does not have a physical middle button<br />
* {{ic|1}}: device has a physical right button<br />
* {{ic|0}}: device does not support two-finger detection<br />
* {{ic|0}}: device does not support three-finger detection<br />
* {{ic|1}}: device can configure vertical resolution<br />
* {{ic|1}}: device can configure horizontal resolution<br />
<br />
Use {{ic|xinput list-props "SynPS/2 Synaptics TouchPad"}} to list all device properties. See {{man|4|synaptics}} for full documentation of the Synaptics properties.<br />
<br />
=== Synclient ===<br />
<br />
Synclient can configure every option available to the user as documented in {{man|4|synaptics}}. A full list of the current user settings can be brought up:<br />
<br />
$ synclient -l<br />
<br />
Every listed configuration option can be controlled through ''synclient'', for example:<br />
<br />
* Enable palm detection:<br />
:{{bc|1=$ synclient PalmDetect=1}}<br />
* Configure button events (right button event for two finger tap here):<br />
:{{bc|1=$ synclient TapButton2=3}}<br />
* Disable the touchpad:<br />
:{{bc|1=$ synclient TouchpadOff=1}}<br />
<br />
After you have successfully tried and tested your options through synclient, you can make these changes permanent by adding them to {{ic|/etc/X11/xorg.conf.d/70-synaptics.conf}}.<br />
<br />
=== evtest ===<br />
<br />
The tool {{Pkg|evtest}} can display pressure and placement on the touchpad in real-time, allowing further refinement of the default Synaptics settings. The ''evtest'' monitoring can be started with:<br />
<br />
$ evtest /dev/input/event''X''<br />
<br />
''X'' denotes the touchpad's ID. It can be found by looking at the output of {{ic|cat /proc/bus/input/devices}}.<br />
<br />
''evtest'' needs exclusive access to the device which means it cannot be run together with an X server instance. You can either kill the X server or run evtest from a different virtual terminal (e.g., by pressing {{ic|Ctrl+Alt+F2}}).<br />
<br />
=== xev ===<br />
<br />
The tool {{Pkg|xorg-xev}} can display taps, clicks, pressure, placement and other measured parameters in real-time, allowing still further refinement of the default Synaptics settings. ''xev'' can be run in X and needs no specifics. using the {{ic|-event}} parameter, it is possible to restrict the types of events that are reported.<br />
<br />
=== Circular scrolling ===<br />
<br />
Circular scrolling is a feature that Synaptics offers which closely resembles the behaviour of iPods. Instead of (or additional to) scrolling horizontally or vertically, you can scroll circularly. Some users find this faster and more precise. To enable circular scrolling, add the following options to the touchpad device section of {{ic|/etc/X11/xorg.conf.d/70-synaptics.conf}}:<br />
<br />
{{hc|/etc/X11/xorg.conf.d/70-synaptics.conf|<br />
Section "InputClass"<br />
...<br />
Option "CircularScrolling" "on"<br />
Option "CircScrollTrigger" "0"<br />
...<br />
EndSection<br />
}}<br />
<br />
The option {{ic|CircScrollTrigger}} may be one of the following values, determining which edge circular scrolling should start:<br />
<br />
0 All Edges<br />
1 Top Edge<br />
2 Top Right Corner<br />
3 Right Edge<br />
4 Bottom Right Corner<br />
5 Bottom Edge<br />
6 Bottom Left Corner<br />
7 Left Edge<br />
8 Top Left Corner<br />
<br />
Specifying something different from zero may be useful if you want to use circular scrolling in conjunction with horizontal and/or vertical scrolling. If you do so, the type of scrolling is determined by the edge you start from.<br />
<br />
To scroll fast, draw small circles in the center of your touchpad. To scroll slowly and more precise, draw large circles.<br />
<br />
=== Natural scrolling ===<br />
<br />
It is possible to enable natural scrolling through Synaptics. Simply use negative values for {{ic|VertScrollDelta}} and {{ic|HorizScrollDelta}} like so:<br />
<br />
{{hc|/etc/X11/xorg.conf.d/70-synaptics.conf|<br />
Section "InputClass"<br />
...<br />
Option "VertScrollDelta" "-111"<br />
Option "HorizScrollDelta" "-111"<br />
...<br />
EndSection<br />
}}<br />
<br />
=== Software toggle ===<br />
<br />
You might want to turn the touchpad on and off with a simple button click or shortcut. This can be done by [[Keyboard shortcuts#Xorg|binding]] the following ''xinput''-based script:<br />
<br />
{{hc|/usr/local/bin/touchpad_toggle.sh|2=<br />
#!/bin/bash<br />
<br />
declare -i ID<br />
ID=$(xinput list {{!}} grep -Eio '(touchpad{{!}}glidepoint)\s*id=[0-9]{1,2}' {{!}} grep -Eo '[0-9]{1,2}')<br />
declare -i STATE<br />
STATE=$(xinput list-props "$ID" {{!}} grep 'Device Enabled' {{!}} awk '{print $4}')<br />
if [ "$STATE" -eq 1 ]<br />
then<br />
xinput disable "$ID"<br />
# echo "Touchpad disabled."<br />
# notify-send -a 'Touchpad' 'Touchpad Disabled' -i input-touchpad<br />
else<br />
xinput enable "$ID"<br />
# echo "Touchpad enabled."<br />
# notify-send -a 'Touchpad' 'Touchpad Enabled' -i input-touchpad<br />
fi<br />
}}<br />
<br />
{{Tip|When using external monitors with [[bumblebee]], the touchpad can be configured on the second X server by prepending {{ic|1=DISPLAY=:8}} to the command.}}<br />
<br />
Alternatively, ''synclient'' can be used to toggle the touchpad. However, it can only turn off touch events but not physical clickpad button usage:<br />
<br />
{{hc|/usr/local/bin/touchpad.sh|2=<br />
#!/bin/bash<br />
<br />
synclient TouchpadOff=$(synclient -l {{!}} grep -c 'TouchpadOff.*=.*0')<br />
}}<br />
<br />
=== Disable touchpad while typing ===<br />
<br />
==== Using the driver's automatic palm detection ====<br />
<br />
First of all you should test if it works properly for your touchpad and if the settings are accurate. Enable palm detection with<br />
<br />
$ synclient PalmDetect=1<br />
<br />
Then test the typing. You can tweak the detection by setting the minimum width for the touch to be considered a palm, for example:<br />
<br />
$ synclient PalmMinWidth=8<br />
<br />
And you can tweak the minimum pressure required for the touch to be considered a palm, for example:<br />
<br />
$ synclient PalmMinZ=100<br />
<br />
{{Tip|To help find the best values for palm detection, you can use {{Pkg|evtest}} to see the width and Z values reported during touchpad use.}}<br />
<br />
Once you have found the correct settings, you can add them to your [[#Configuration|config file]]:<br />
<br />
Option "PalmDetect" "1"<br />
Option "PalmMinWidth" "8"<br />
Option "PalmMinZ" "100"<br />
<br />
{{Warning|1=For some touchpads, an [https://bugzilla.kernel.org/show_bug.cgi?id=77161 issue] with the kernel can cause the palm width to always be reported as 0. This breaks palm detection in a majority of cases. Pending an actual fix, you can [https://gist.github.com/silverhammermba/a231c8156ecaa63c86f1 patch] the synaptics package to use only Z for palm detection.}}<br />
<br />
{{Tip|If you experience problems with consistent palm detection for your hardware, an alternative to try is [[libinput]].}}<br />
<br />
==== Using syndaemon ====<br />
<br />
{{man|1|syndaemon}} monitors keyboard activity and disables the touchpad while typing. It has several options to control when the disabling occurs. View them with<br />
<br />
$ syndaemon -?<br />
<br />
For example, to disable tapping and scrolling for 0.5 seconds after each keypress (ignoring modifier keys like {{ic|Ctrl}}), use<br />
<br />
$ syndaemon -i 0.5 -t -K -R<br />
<br />
Once you have determined the options you like, you should use your login manager or [[xinitrc]] to have it run automatically when X starts. The {{ic|-d}} option will make it start in the background as a daemon.<br />
<br />
=== Disable touchpad on mouse detection ===<br />
<br />
With the assistance of [[udev]], it is possible to automatically disable the touchpad if an external mouse has been plugged in. To achieve this, use one of the following rules.<br />
<br />
==== Basic desktop ====<br />
<br />
This is a basic rule generally for non-"desktop environment" sessions:<br />
<br />
{{hc|/etc/udev/rules.d/01-touchpad.rules|2=<br />
SUBSYSTEM=="input", KERNEL=="mouse[0-9]*", ACTION=="add", ENV{DISPLAY}=":0", ENV{XAUTHORITY}="/home/''username''/.Xauthority", RUN+="/usr/bin/synclient TouchpadOff=1"<br />
SUBSYSTEM=="input", KERNEL=="mouse[0-9]*", ACTION=="remove", ENV{DISPLAY}=":0", ENV{XAUTHORITY}="/home/''username''/.Xauthority", RUN+="/usr/bin/synclient TouchpadOff=0"<br />
}}<br />
<br />
If the touchpad is always deactivated at startup, even when no mouse is plugged in, try adding the following criteria between the {{ic|KERNEL}} and {{ic|ACTION}} parameters above:<br />
<br />
ATTRS{name}!="*TouchPad", ATTRS{name}!="*Stick",<br />
<br />
==== GDM ====<br />
<br />
{{Out of date|GDM stores the Xauthority files in {{ic|/run/user/''uid''/gdm/Xauthority}}.}}<br />
<br />
GDM stores the Xauthority files in {{ic|/var/run/gdm}} in a randomly-named directory. You should find your actual path to the Xauthority file which can be done using {{ic|ps ax}}. For some reason, multiple authority files may appear for a user, so a rule like this will be necessary:<br />
<br />
{{hc|/etc/udev/rules.d/01-touchpad.rules|2=<br />
SUBSYSTEM=="input", KERNEL=="mouse[0-9]", ACTION=="add", PROGRAM="/usr/bin/find /var/run/gdm -name ''username'' -print0 -quit", ENV{DISPLAY}=":0", ENV{XAUTHORITY}="$result/database", RUN+="/usr/bin/synclient TouchpadOff=1"<br />
SUBSYSTEM=="input", KERNEL=="mouse[0-9]", ACTION=="remove", PROGRAM="/usr/bin/find /var/run/gdm -name ''username'' -print0 -quit", ENV{DISPLAY}=":0", ENV{XAUTHORITY}="$result/database", RUN+="/usr/bin/synclient TouchpadOff=0"<br />
}}<br />
<br />
Furthermore, you should validate that your ''udev'' script is running properly. You can check for the conditions by running {{ic|udevadm monitor -p}} with root privileges.<br />
<br />
===== With syndaemon running =====<br />
<br />
''syndaemon'' whether started by the [[#Using syndaemon|user]] or the desktop environment can conflict with ''synclient'' and will need to be disabled. A rule like this will be needed:<br />
<br />
{{hc|/etc/udev/rules.d/01-touchpad.rules|2=<br />
SUBSYSTEM=="input", KERNEL=="mouse[0-9]", ACTION=="add", PROGRAM="/usr/bin/find /var/run/gdm -name ''username'' -print -quit", ENV{DISPLAY}=":0", ENV{XAUTHORITY}="$result/database", RUN+="/bin/sh -c '/usr/bin/synclient TouchpadOff=1 ; sleep 1; /bin/killall syndaemon; '"<br />
}}<br />
<br />
===== touchpad-state =====<br />
<br />
{{Style|Command block requires a [[Help:Style#Command line text|prompt symbol]].}}<br />
<br />
A {{AUR|touchpad-state-git}} package created around the ''udev'' rules in [[#With syndaemon running]] is available. It includes a ''udev'' rule and script:<br />
<br />
touchpad-state [--off] [--on]<br />
<br />
==== GNOME ====<br />
<br />
GNOME users can install the GNOME shell extension [https://extensions.gnome.org/extension/131/touchpad-indicator/ Touchpad Indicator], change ''Switch Method'' to ''Synclient'' and enable ''Automatically switch Touchpad On/Off'' in its preferences.<br />
<br />
==== KDE ====<br />
<br />
If using Plasma, the {{Pkg|plasma-desktop}} package can be used to manage the touchpad.<br />
<br />
==== System with multiple X sessions ====<br />
<br />
{{Accuracy|Hard-coded {{ic|DISPLAY}} variable does not work with multiple X sessions.}}<br />
<br />
For an environment where multiple users are present, a slightly different approach is needed to detect the current users X environment. This script will help achieving this:<br />
<br />
{{hc|/usr/bin/mouse-pnp-event-handler.sh|2=<br />
#!/bin/sh<br />
## $1 = "add" / "remove"<br />
## $2 = %k from udev<br />
<br />
## Set TRACKPAD_NAME according to your configuration.<br />
## Check your trackpad name with:<br />
## find /sys/class/input/ -name mouse* -exec udevadm info -a {} \; {{!}} grep 'ATTRS{name}'<br />
TRACKPAD_NAME="SynPS/2 Synaptics TouchPad"<br />
<br />
USERLIST=$(w -h {{!}} cut -d' ' -f1 {{!}} sort {{!}} uniq)<br />
MOUSELIST=$(find /sys/class/input/ -name mouse*)<br />
<br />
for CUR_USER in ${USERLIST}; do<br />
CUR_USER_XAUTH="$(sudo -Hiu ${CUR_USER} env {{!}} grep -e "^HOME=" {{!}} cut -d'=' -f2)/.Xauthority"<br />
<br />
## Can't find a way to get another users DISPLAY variable from an isolated root environment. Have to set it manually.<br />
#CUR_USER_DISPL="$(sudo -Hiu ${CUR_USER} env {{!}} grep -e "^DISPLAY=" {{!}} cut -d'=' -f2)"<br />
CUR_USER_DISPL=":0"<br />
<br />
export XAUTHORITY="${CUR_USER_XAUTH}"<br />
export DISPLAY="${CUR_USER_DISPL}"<br />
<br />
if [ -f "${CUR_USER_XAUTH}" ]; then<br />
case "$1" in<br />
"add")<br />
/usr/bin/synclient TouchpadOff=1<br />
/usr/bin/logger "USB mouse plugged. Disabling touchpad for $CUR_USER. ($XAUTHORITY - $DISPLAY)"<br />
;;<br />
"remove")<br />
## Only execute synclient if there are no external USB mice connected to the system.<br />
EXT_MOUSE_FOUND="0"<br />
for CUR_MOUSE in ${MOUSELIST}; do<br />
if [ "$(cat ${CUR_MOUSE}/device/name)" != "${TRACKPAD_NAME}" ]; then<br />
EXT_MOUSE_FOUND="1"<br />
fi<br />
done<br />
if [ "${EXT_MOUSE_FOUND}" == "0" ]; then<br />
/usr/bin/synclient TouchpadOff=0<br />
/usr/bin/logger "No additional external mice found. Enabling touchpad for $CUR_USER."<br />
else<br />
logger "Additional external mice found. Won't enable touchpad yet for $CUR_USER."<br />
fi<br />
;;<br />
esac<br />
fi<br />
done<br />
}}<br />
<br />
Update the {{ic|TRACKPAD_NAME}} variable for your system configuration. Run {{ic|find /sys/class/input/ -name mouse* -exec udevadm info -a {} \; {{!}} grep 'ATTRS{name}'}} to get a list of useful mice-names. Choose the one for your trackpad.<br />
<br />
Then have ''udev'' run this script when USB mices are plugged in or out, with these ''udev'' rules:<br />
<br />
{{hc|/etc/udev/rules.d/01-touchpad.rules|2=<br />
SUBSYSTEM=="input", KERNEL=="mouse[0-9]*", ACTION=="add", RUN+="/usr/bin/mouse-pnp-event-handler.sh add %k"<br />
SUBSYSTEM=="input", KERNEL=="mouse[0-9]*", ACTION=="remove", RUN+="/usr/bin/mouse-pnp-event-handler.sh remove %k"<br />
}}<br />
<br />
=== Buttonless touchpads (aka ClickPads) ===<br />
<br />
Ever more laptops have a special kind of touchpad which has a single mouse button as part of the tracking plate, instead of external buttons. For example, the 2015 Dell XPS 13, HP series 4500 ProBooks, ThinkPad X220 and X1 ThinkPad series have this kind of a touchpad. By default, the whole button area is detected as a left button, so right and middle-click functions and click + drag will not work. It is possible to define two and three finger clicks as right and middle button clicks, and/or to define parts of the click pad surface as right and middle buttons. Note that although the driver registers multiple touches, it does not track individual fingers (as of version 1.7.1) which results in confusing behavior when using physical buttons of a clickpad for drag-and-drop and other gestures: you have to click with two or three fingers but then only move one of them while holding the button down with another. You can look into the {{AUR|xf86-input-mtrack}} driver for better multitouch support.<br />
<br />
Some desktop environments (KDE and GNOME at least) define sane and useful default configurations for clickpads, providing a right button at the bottom right of the pad, recognising two and three-finger clicks anywhere on the pad as right and middle clicks, and providing configuration options to define two and three-finger taps as right and middle clicks. If your desktop does not do this, or if you want more control, you can modify the touchpad section in {{ic|/etc/X11/xorg.conf.d/70-synaptics.conf}} (or better, of your custom synaptics configuration file prefixed with a higher number). For example:<br />
<br />
{{hc|/etc/X11/xorg.conf.d/70-synaptics.conf|<br />
Section "InputClass"<br />
Identifier "touchpad"<br />
Driver "synaptics"<br />
MatchIsTouchpad "on"<br />
# Enable clickpad/multitouch support<br />
Option "ClickPad" "true"<br />
# Middle-button emulation is not supported<br />
Option "EmulateMidButtonTime" "0"<br />
# Define right soft button at the bottom<br />
Option "SoftButtonAreas" "50% 0 82% 0 0 0 0 0"<br />
EndSection<br />
}}<br />
<br />
The format for the {{ic|SoftButtonAreas}} option is (from {{man|4|synaptics}}):<br />
<br />
{{bc|RightButtonAreaLeft RightButtonAreaRight RightButtonAreaTop RightButtonAreaBottom MiddleButtonAreaLeft MiddleButtonAreaRight MiddleButtonAreaTop MiddleButtonAreaBottom}}<br />
<br />
The above {{ic|SoftButtonAreas}} option is commonly found in documentation or synaptics packages, and it defines the right half of the bottom 18% of the touchpad as a right button. There is '''no middle button''' defined. If you want to define a middle button remember one key piece of information from the manual; '''edge set to 0 extends to infinity in that direction.'''<br />
<br />
In the following example the right button will occupy the rightmost 40% of the button area and the middle button 20% of it in the center. The leftmost 40% remains as a left button (as does the rest of the clickpad):<br />
<br />
...<br />
Option "SoftButtonAreas" "60% 0 82% 0 40% 59% 82% 0"<br />
...<br />
<br />
You can use ''synclient'' to check the soft button areas:<br />
<br />
{{hc|$ synclient -l {{!}} grep -i ButtonArea|2=<nowiki/><br />
RightButtonAreaLeft = 3914<br />
RightButtonAreaRight = 0<br />
RightButtonAreaTop = 3918<br />
RightButtonAreaBottom = 0<br />
MiddleButtonAreaLeft = 3100<br />
MiddleButtonAreaRight = 3873<br />
MiddleButtonAreaTop = 3918<br />
MiddleButtonAreaBottom = 0<br />
}}<br />
<br />
If your buttons are not working, soft button areas are not changing, ensure you do not have a synaptics configuration file distributed by a package which is overriding your custom settings (i.e. some AUR packages distribute configurations prefixed with very high numbers).<br />
<br />
These settings cannot be modified on the fly with ''synclient'', however, ''xinput'' works:<br />
<br />
xinput set-prop "SynPS/2 Synaptics TouchPad" "Synaptics Soft Button Areas" 4000 0 4063 0 3000 4000 4063 0<br />
<br />
You cannot use percentages with this command, so look at {{ic|/var/log/Xorg.0.log}} to figure out the touchpad x and y-axis ranges.<br />
<br />
==== Bottom edge correction ====<br />
<br />
In some cases, for example Toshiba Satellite P50, everything work out of the box except often your click are seen as mouse movement and the cursor will jump away just before registering the click. This can be easily solved running<br />
<br />
$ synclient -l | grep BottomEdge<br />
<br />
take the BottomEdge value and subtract a the wanted height of your button, then temporary apply with<br />
<br />
$ synclient AreaBottomEdge=4000<br />
<br />
when a good value has been found make it a fixed correction with<br />
<br />
{{hc|/etc/X11/xorg.conf.d/70-synaptics.conf|<br />
...<br />
Option "AreaBottomEdge" "4000"<br />
...<br />
}}<br />
<br />
{{Note|The area will not act as touchpad if the touch '''begins''' in that area, but it can still be used if the touch has originated outside.}}<br />
<br />
== Troubleshooting ==<br />
<br />
=== Touchpad does not work after resuming from hibernate/suspend ===<br />
<br />
Occasionally touchpads will fail to work when the computer resumes from sleep or hibernation. This can often be corrected without rebooting by<br />
<br />
* Switching to a console and back again,<br />
* entering sleep mode again, and resuming again,<br />
* locating the correct kernel module, then removing it and inserting it again, possibly with a specific parameter (e.g. {{ic|1=modprobe -r psmouse && modprobe -r psmouse proto=imps}}), <br />
* blacklisting kernel module {{ic|psmouse}} may be a permanent option (when the touchpad is handled by another module, e.g. {{ic|i2c_designware_platform}}), <br />
* adding the {{ic|1=psmouse.synaptics_intertouch=0}} [[kernel parameter]] solves the issue permanently.<br />
<br />
{{Note|You can use {{ic|Ctrl+Alt+F1}} through {{ic|F8}} to switch to a console without using the mouse.}}<br />
<br />
If you are using a laptop computer and your touchpad does not work after switching the laptop's lid, you can just change your power management policy: when closing the lid, 'shutdown the screen' instead of 'suspend'(or 'hibernate'). This is useful for some laptops.<br />
<br />
=== xorg.conf.d/70-synaptics.conf does not seem to apply in MATE ===<br />
<br />
[[MATE]] will by default overwrite various options for your touchpad. This includes configurable features for which there is no graphical configuration within MATE's system control panel. This may cause it to appear that {{ic|/etc/X11/xorg.conf.d/70-synaptics.conf}} is not applied. Follow [[#MATE]] to prevent this behavior.<br />
<br />
=== The touchpad is not working, Xorg.0.log shows "Query no Synaptics: 6003C8" ===<br />
<br />
Due to the way Synaptics is currently set-up, 2 instances of the Synaptics module are loaded. We can recognize this situation by opening the xorg log file ({{ic|/var/log/Xorg.0.log}}) and noticing this:<br />
<br />
{{hc|/var/log/Xorg.0.log|<br />
[ 9304.803] (**) SynPS/2 Synaptics TouchPad: Applying InputClass "evdev touchpad catchall"<br />
[ 9304.803] (**) SynPS/2 Synaptics TouchPad: Applying InputClass "touchpad catchall"<br />
}}<br />
<br />
Notice how 2 differently named instances of the module are being loaded. In some cases, this causes the touchpad to become nonfunctional.<br />
<br />
We can prevent this double loading by adding {{ic|MatchDevicePath "/dev/input/event*"}} to our {{ic|/etc/X11/xorg.conf.d/70-synaptics.conf}} file:<br />
<br />
{{hc|/etc/X11/xorg.conf.d/70-synaptics.conf|<br />
Section "InputClass"<br />
Identifier "touchpad catchall"<br />
Driver "synaptics"<br />
MatchIsTouchpad "on"<br />
MatchDevicePath "/dev/input/event*"<br />
Option "TapButton1" "1"<br />
Option "TapButton2" "2"<br />
Option "TapButton3" "3"<br />
EndSection<br />
}}<br />
<br />
Restart X and check xorg logs again, the error should be gone and the touchpad should be functional.<br />
<br />
related bugreport: {{Bug|20830}}<br />
<br />
related forum topics:<br />
<br />
* https://bbs.archlinux.org/viewtopic.php?id=104769<br />
* https://bbs.archlinux.org/viewtopic.php?pid=825690<br />
<br />
=== Touchpad detected as "PS/2 Generic Mouse" or "Logitech PS/2 mouse" ===<br />
<br />
This can be caused by a number of issues;<br />
<br />
==== Laptops with touchscreen & touchpad ====<br />
<br />
There also seems to be a problem with laptops which have both a touchscreen & a touchpad, such as the Dell XPS 12 or Dell XPS 13. To fix this, you can [[blacklist]] the {{ic|i2c_hid}} driver, this does have the side-effect of disabling the touchscreen though.<br />
<br />
This [https://lore.kernel.org/linux-input/CAN+gG=GnpGYVfrXL9ZB6mX1p+ODEWWp9SDKYnd_aw7bpCuf8dw@mail.gmail.com/ seems to be a known problem]. Also see [https://bbs.archlinux.org/viewtopic.php?pid=1419078 this thread].<br />
<br />
Post kernel 3.15, having the module blacklisted may cause touchpad to stop working completely. Removing the blacklist should allow this to start working with limited functionality, see {{Bug|40921}}.<br />
<br />
=== Non-functional Synaptics special abilities (multi-tap, scrolling, etc.) ===<br />
<br />
In some cases, Synaptics touchpads only work partially. Features like two-finger scrolling or two-finger middle-click do not work even if properly enabled. This is probably related to the [[#The touchpad is not working, Xorg.0.log shows "Query no Synaptics: 6003C8"|The touchpad is not working]] problem mentioned above. Fix is the same, prevent double module loading.<br />
<br />
If preventing the module from loading twice does not solve your issue, try commenting out the toggle {{ic|MatchIsTouchpad}} (which is now included by default in the Synaptics configuration).<br />
<br />
If clicking with either 2 or 3 fingers is interpreted as a right-click, so you cannot get a middle click either way regardless of configuration, this bug is probably the culprit: https://bugs.freedesktop.org/show_bug.cgi?id=55365<br />
<br />
==== No Multi-touch in some Elantech touchpads ====<br />
<br />
See https://unix.stackexchange.com/questions/28736/what-does-the-i8042-nomux-1-kernel-option-do-during-booting-of-ubuntu.<br />
<br />
=== Cursor jump ===<br />
<br />
Some users have their cursor inexplicably ''jump'' around the screen. There currently no patch for this, but the developers are aware of the problem and are working on it.<br />
<br />
Another posibility is that you are experiencing ''IRQ losses'' related to the i8042 controller (this device handles the keyboard and the touchpad of many laptops), so you have two possibilities here:<br />
<br />
# {{ic|rmmod && insmod}} the {{ic|psmouse}} module.<br />
# Append {{ic|1=i8042.nomux=1}} to your [[kernel parameters]] and reboot your machine.<br />
<br />
=== Touchpad device is not located at /dev/input/* ===<br />
<br />
If that is the case, you can use this command to display information about your input devices:<br />
<br />
$ cat /proc/bus/input/devices<br />
<br />
Search for an input device which has the name "SynPS/2 Synaptics TouchPad". The "Handlers" section of the output specifies what device you need to specify.<br />
<br />
'''Example output:'''<br />
<br />
{{hc|$ cat /proc/bus/input/devices|2=<br />
I: Bus=0011 Vendor=0002 Product=0007 Version=0000<br />
N: Name="SynPS/2 Synaptics TouchPad"<br />
P: Phys=isa0060/serio4/input0<br />
S: Sysfs=/class/input/input1<br />
H: Handlers=mouse0 event1<br />
B: EV=b<br />
B: KEY=6420 0 7000f 0<br />
}}<br />
<br />
In this case, the {{ic|Handlers}} are {{ic|mouse0}} and {{ic|event1}}, so {{ic|/dev/input/mouse0}} would be used.<br />
<br />
{{Expansion|TODO: explain how to apply this in {{ic|/etc/X11/xorg.conf.d/70-synaptics.conf}}.}}<br />
<br />
=== Firefox and special touchpad events ===<br />
<br />
You can enable/disable some special events that Firefox handles upon tapping or scrolling certain parts of your touchpad by editing the settings of those actions. Type {{ic|about:config}} in your Firefox address bar. To alter options, double-click on the line in question.<br />
<br />
==== Firefox 17.0 and later ====<br />
<br />
Horizontal scrolling will now by default scroll through pages and not through your history. To reenable Mac-style forward/backward with two-finger swiping, edit:<br />
<br />
mousewheel.default.action.override_x = 2<br />
<br />
You may encounter accidental forwards/backwards while scrolling vertically. To change Firefox's sensitivity to horizontal swipes, edit:<br />
<br />
mousewheel.default.delta_multiplier_x<br />
<br />
The optimum value will depend on your touchpad and how you use it, try starting with {{ic|10}}. A negative value will reverse the swipe directions.<br />
<br />
=== Opera: horizontal scrolling issues ===<br />
<br />
Same as above. To fix it, go to ''Tools > Preferences > Advanced > Shortcuts''. Select "Opera Standard" mouse setup and click "Edit". In "Application" section:<br />
<br />
{{Accuracy|Description here is not so clear and I do not use Opera. Please make it clear.)}}<br />
<br />
* assign key "Button 6" to command "Scroll left"<br />
* assign key "Button 7" to command "Scroll right"<br />
<br />
=== Scrolling and multiple actions with Synaptics on LG laptops ===<br />
<br />
These problems seem to be occurring on several models of LG laptops. Symptoms include: when pressing Mouse Button 1, Synaptics interprets it as ScrollUP and a regular button 1 click; same goes for button 2.<br />
<br />
The scrolling issue can be resolved by entering in {{ic|xorg.conf}}:<br />
<br />
{{hc|/etc/X11/xorg.conf.d/xorg.conf|<br />
Option "UpDownScrolling" "0"<br />
}}<br />
<br />
{{Note|This will make Synaptics interpret one button push as three. There is a patch written by Oskar Sandberg [https://web.archive.org/web/20090209194341/http://www.math.chalmers.se/~ossa/linux/lg_tx_express.html] that removes these clicks.}}<br />
<br />
Apparently, when trying to compile this against the latest version of Synaptics it fails. The solution to this is using the Git repository for Synaptics [http://web.telia.com/~u89404340/touchpad/synaptics/.git].<br />
<br />
To build the package after downloading the tarball and unpacking it, execute:<br />
<br />
$ cd synaptics-git<br />
$ makepkg<br />
<br />
=== Other external mouse issues ===<br />
<br />
First, make sure your section describing the external mouse contains this line (or that the line looks like this):<br />
<br />
{{hc|/etc/X11/xorg.conf.d/xorg.conf|<br />
Option "Device" "/dev/input/mice"<br />
}}<br />
<br />
If the {{ic|"Device"}} line is different, change it to the above and try to restart X. If this does not solve your problem, make your '''touchpad''' the {{ic|CorePointer}} in the "Server Layout" section:<br />
<br />
{{hc|/etc/X11/xorg.conf.d/xorg.conf|<br />
InputDevice "Touchpad" "CorePointer"<br />
}}<br />
<br />
and make your external device {{ic|"SendCoreEvents"}}:<br />
<br />
{{hc|/etc/X11/xorg.conf.d/xorg.conf|<br />
InputDevice "USB Mouse" "SendCoreEvents"<br />
}}<br />
<br />
Finally, add this to your external device's section:<br />
<br />
{{hc|/etc/X11/xorg.conf.d/xorg.conf|<br />
Option "SendCoreEvents" "true"<br />
}}<br />
<br />
If all of the above does not work for you, please check relevant bug trackers for possible bugs, or go through the forums to see if anyone has found a better solution.<br />
<br />
=== Touchpad synchronization issues ===<br />
<br />
{{Out of date|section=Outdated "Touchpad synchronization issues" section}}<br />
<br />
Sometimes the cursor may freeze for several seconds or start acting on its own for no apparent reason. This behavior is accompanied by records in {{ic|/var/log/messages.log}}:<br />
<br />
{{hc|/var/log/messages.log|<br />
psmouse.c: TouchPad at isa0060/serio1/input0 lost synchronization, throwing 3 bytes away<br />
}}<br />
<br />
This problem has no general solution, but there are several possible workarounds:<br />
<br />
* If you use CPU frequency scaling, avoid using the "ondemand" governor and use the "performance" governor when possible, as the touchpad may lose sync when the CPU frequency changes.<br />
* Avoid using an ACPI battery monitor.<br />
* Attempt to load psmouse with {{ic|1=proto=imps}} option. To do that, add this line to your {{ic|/etc/modprobe.d/modprobe.conf}}:<br />
{{hc|/etc/modprobe.d/modprobe.conf|2=<br />
options psmouse proto=imps<br />
}}<br />
* Try another desktop environment. Some users report that this problem only occurs when using XFCE or GNOME, for whatever reason.<br />
<br />
=== Xorg.log.0 shows SynPS/2 Synaptics touchpad can not grab event device, errno=16 ===<br />
<br />
If you are using Xorg 7.4, you may get a warning like this from {{ic|/var/log/Xorg.0.log}}. This is because the driver will grab the event device for exclusive use when using the Linux 2.6 event protocol. When it fails, X will return this error message.<br />
<br />
Grabbing the event device means that no other user space or kernel space program sees the touchpad events. This is desirable if the X configuration file includes {{ic|/dev/input/mice}} as an input device, but is undesirable if you want to monitor the device from user space.<br />
<br />
If you want to control it, add or modify the {{ic|"GrabEventDevice"}} option in you touchpad section in {{ic|/etc/X11/xorg.conf.d/70-synaptics.conf}}:<br />
<br />
{{hc|/etc/X11/xorg.conf.d/70-synaptics.conf|2=<br />
...<br />
Option "GrabEventDevice" "''boolean''"<br />
...<br />
}}<br />
<br />
This will come into effect when X is restarted, though you can also change it by using ''synclient''. When changing this parameter with the ''synclient'' program, the change will not take effect until the Synaptics driver is disabled and re-enabled. This can be achieved by switching to a text console and then switching back to X.<br />
<br />
=== Synaptics loses multitouch detection after rebooting from Windows ===<br />
<br />
Many drivers include a firmware that is loaded into flash memory when the computer boots. This firmware is not necessarily cleared upon shutdown, and is not always compatible with Linux drivers. The only way to clear the flash memory is to shutdown completely rather than using reboot. It is generally considered best practice to never use reboot when switching between operating systems.<br />
<br />
=== Touchpad not recognized after shutdown from Arch ===<br />
<br />
Certain touchpads (Elantech in particular) will fail to be recognized as a device of any sort after a standard shutdown from Arch Linux. There are multiple possible solutions to this problem:<br />
<br />
* Boot into a Windows partition/install disk and shutdown from there.<br />
* Wait approximately 1 minute before turning on the computer after shutdown.<br />
* As discussed in https://bugzilla.kernel.org/show_bug.cgi?id=81331#c186, a patch has been merged into the stable kernel that provides a fix for Elantech touchpads. Gigabyte P34, P35v2 and X3 models are supported by default. For others (especially rebranded Gigabyte laptops, like XMG's), {{ic|1=i8042.kbdreset=1}} can be set as kernel parameter.<br />
<br />
=== Trackpoint and Clickpad ===<br />
<br />
Newer Thinkpads do not have physical buttons for their Trackpoint anymore and instead use the upper area of the Clickpad for buttons (Left, Middle, Right). Apart from the ergonomic viewpoint this works quite well with current Xorg. Unfortunately, mouse wheel emulation using the middle button is not supported yet. Install {{AUR|xf86-input-evdev-trackpoint}} for a patched and properly configured version if you intend to use the Trackpoint.<br />
<br />
== See also ==<br />
<br />
* [https://gitlab.freedesktop.org/xorg/driver/xf86-input-synaptics/ Synaptics touchpad driver]<br />
* [https://www.x.org/archive/X11R7.5/doc/man/man4/synaptics.4.html Synaptics manual on x.org]</div>Goetzchttps://wiki.archlinux.org/index.php?title=KeePass&diff=766923KeePass2023-02-07T23:54:06Z<p>Goetzc: /* Installation */ extend client description. Move inactive clients to the bottom</p>
<hr />
<div>[[Category:Password managers]]<br />
[[ja:KeePass]]<br />
[[pt:KeePass]]<br />
[[ru:KeePass]]<br />
KeePass is an encrypted password database format. It is an alternative to online password managers and is supported on all major platforms.<br />
<br />
There are two versions of the format: ''KeePass 1.x (Classic)'' and ''KeePass 2.x''<br />
<br />
== Installation ==<br />
<br />
There are three major implementations of KeePass available in the official repositories:<br />
<br />
* {{App|[[Wikipedia:KeePass|KeePass]]|A cross-platform password manager that has autotype and clipboard support when respectively {{Pkg|xdotool}} and {{Pkg|xsel}} are installed. It lets you import [https://keepass.info/help/base/importexport.html many formats] and has [https://keepass.info/plugins.html many plugins].|https://keepass.info|{{Pkg|keepass}}}}<br />
* {{App|[[Wikipedia:KeePassXC|KeePassXC]]|Fork of KeePassX that is actively maintained and has additional features like browser integration, support for SSH agent, secret service, Yubikey, finger-print reader, TOTP generator and KeeShare. Also provides a CLI. |https://keepassxc.org|{{Pkg|keepassxc}}}}<br />
* {{App|{{Pkg|gnome-passwordsafe}}|A modern GNOME password manager built on top of of KeePass.<br />
|https://gitlab.gnome.org/World/secrets/|{{Pkg|gnome-passwordsafe}}}}<br />
<br />
Other lesser-known alternatives can be found in the AUR:<br />
<br />
* {{App|keepassc|A curses-based password manager compatible to KeePass v.1.x and KeePassX. It uses {{ic|xsel}} for clipboard functions.<br />
|https://raymontag.github.io/keepassc/|{{AUR|keepassc}}}}<br />
* {{App|kpcli|A command line interface for KeePass database files {{ic|*.kdb}} or {{ic|*.kdbx}}.<br />
|https://sourceforge.net/projects/kpcli/|{{AUR|kpcli}}}}<br />
* {{App|keepmenu|Dmenu/Rofi frontend for Keepass database files.<br />
|https://github.com/firecat53/keepmenu|{{AUR|keepmenu}}}}<br />
* {{App|AuthPass|KeePass compatible password manager based on Flutter. Comes with default sync suport for Gdrive, Dropbox, and WebDav.<br />
|https://authpass.app|{{AUR|authpass-bin}}}}<br />
* {{App|[[Wikipedia:KeePassX|KeePassX]]|Started as a Linux port of KeePass. {{AUR|keepassx2}} uses the KeePass 2.x format, but can import 1.x databases. It also lets you import PwManager and KWallet XML databases. It does not support plugins. [https://www.keepassx.org/faq] No active development since 2016. [https://dev.keepassx.org/projects/keepassx/repository/revisions] |https://www.keepassx.org/|{{AUR|keepassx}} {{AUR|keepassx2}}}}<br />
<br />
== Integration ==<br />
<br />
Many [https://keepass.info/plugins.html plugins and extensions] are available for integrating KeePass to other software. KeePassX and KeePassXC do not have a plugin interface, but KeePassXC has various integrations built-in.<br />
<br />
=== Plugin installation in KeePass ===<br />
<br />
{{Note|KeePassX and KeePassXC do not support plugins. KeepassXC has some integrations built-in.}}<br />
<br />
KeePass is by default installed at {{ic|/usr/share/keepass/}}. Copy {{ic|plugin.plgx}} to a plugins sub-directory under the KeePass installation directory as demonstrated below:<br />
<br />
{{bc|<br />
# mkdir /usr/share/keepass/plugins<br />
# cp plugin.plgx /usr/share/keepass/plugins<br />
}}<br />
<br />
=== Browser integration ===<br />
<br />
==== keepassxc-browser for KeePassXC ====<br />
<br />
[https://github.com/keepassxreboot/keepassxc-browser keepassxc-browser] is the browser extension of KeePassXC’s built-in browser integration using native-messaging and transport encryption using libsodium. It was developed to replace KeePassHTTP, as KeePassHTTP’s protocol has fundamental security problems.<br />
<br />
The developers provide the browser extension on<br />
<br />
* [https://addons.mozilla.org/firefox/addon/keepassxc-browser/ Firefox Add-ons] (for [[Firefox]] and [[Tor Browser]]) and<br />
* in the [https://chrome.google.com/webstore/detail/keepassxc-browser/oboonakemofpalcgghocfoadofidjkkk chrome web store] (for [[Chromium]], [[Google Chrome]], [[Vivaldi]] and [[List of applications/Internet#Privacy-focused chromium spin-offs|Brave]]).<br />
<br />
Support for Firefox and Chromium forks is available. For {{AUR|librewolf}}, open KeePassXC, go to ''Tools'' > ''Settings'' > ''Browser Integration'' > ''Advanced'' > ''Config Location:'', and add {{ic|~/.librewolf/native-messaging-hosts}}.<br />
<br />
The [https://github.com/keepassxreboot/keepassxc-browser source code and an explanation how it works] can be found on GitHub, the KeePassXC developers provide a [https://keepassxc.org/docs/KeePassXC_GettingStarted.html#_configure_keepassxc_browser configuration guide] on their website.<br />
<br />
==== keepassxc-browser for KeePass ====<br />
<br />
[https://github.com/keepassxreboot/keepassxc-browser keepassxc-browser] can also be used with KeePass through [https://github.com/smorks/keepassnatmsg Keepass-natmsg Plugin] from AUR ({{aur|keepass-natmsg}}) and is recommended as successor of KeePassHTTP.<br />
<br />
==== KeePassRPC and Kee ====<br />
<br />
[https://www.kee.pm/ Kee] ([https://github.com/kee-org/browser-addon GitHub repo]) is a browser extension for [[Firefox]] and [[Chromium]] which integrates KeePass through [https://github.com/kee-org/keepassrpc KeePassRPC], a KeePass plugin from the same developers.<br />
<br />
The KeePass plugin is available from [https://github.com/kee-org/keepassrpc/releases GitHub] or from the AUR ({{aur|keepass-plugin-rpc}}).<br />
<br />
The browser extension can be found on [https://github.com/kee-org/browser-addon/releases GitHub], [https://addons.mozilla.org/firefox/addon/keefox/ Firefox Add-ons] and the [https://chrome.google.com/webstore/detail/kee-password-manager/mmhlniccooihdimnnjhamobppdhaolme chrome web store].<br />
<br />
==== Via autotype feature ====<br />
<br />
An alternative to having a direct channel between browser and KeePass(XC) is using the autotype feature. There are browser extensions which support this way by putting the page URL into the window name:<br />
<br />
* [https://addons.mozilla.org/firefox/addon/keepass-helper-url-in-title/ KeePass Helper] or [https://addons.mozilla.org/firefox/addon/url-in-title/ TitleURL] for [[Firefox]]<br />
* [https://chrome.google.com/webstore/detail/url-in-title/ignpacbgnbnkaiooknalneoeladjnfgb URL in title] for [[Chromium]]<br />
<br />
=== Nextcloud ===<br />
<br />
* [https://github.com/jhass/nextcloud-keeweb Keeweb for Nextcloud] ({{aur|nextcloud-app-keeweb}})<br />
: Open Keepass stores inside Nextcloud<br />
<br />
=== Yubikey ===<br />
<br />
[[YubiKey]] can be integrated with KeePass thanks to contributors of KeePass plugins. KeepassXC provides built-in support for Yubikey Challenge-Response without plugins.<br />
<br />
==== Configuration with KeePass ====<br />
<br />
# StaticPassword<br />
#:Configure one of Yubikey slots to store static password. You can make the password as strong as 65 characters (64 characters with leading "!"). This password can then be used as master password for your KeePass database.<br />
# one-time passwords (OATH-HOTP)<br />
## Download plugin from KeePass website: https://keepass.info/plugins.html#otpkeyprov<br />
## Use {{AUR|yubikey-personalization-gui-git}} to setup OATH-HOTP<br />
## In advanced mode untick ''OATH Token Identifier''<br />
## In KeePass additional option will show up under ''Key file / provider'' called ''One-Time Passwords (OATH HOTP)''<br />
## Copy secret, key length (6 or 8), and counter (in Yubikey personalization GUI this parameter is called ''Moving Factor Seed'')<br />
## You may need to setup ''Look-ahead count'' option to something greater than 0, please see [https://forum.yubico.com/viewtopicf146.html?f=16&t=1120 this thread] for more information<br />
## See [https://vimeo.com/94352853 this video] for more help<br />
#Challenge-Response (HMAC-SHA1)<br />
## Get the plugin from AUR: {{AUR|keepass-plugin-keechallenge}}<br />
## In KeePass additional option will show up under ''Key file / provider'' called ''Yubikey challenge-response''<br />
## Plugin assumes slot 2 is used<br />
<br />
=== SSH agent ===<br />
<br />
KeePassXC offers SSH agent support, a similar feature is also available for KeePass using the [https://lechnology.com/software/keeagent/ KeeAgent] plugin.<br />
<br />
The feature allows to store SSH keys in KeePass databases, KeePassXC/KeeAgent acts as OpenSSH Client and dynamically adds and removes the key to the Agent.<br />
<br />
The feature in KeePassXC is documented in its [https://keepassxc.org/docs/#faq-ssh-agent-how FAQ]. First configure [[SSH agent]] to start on login and make sure the {{ic|SSH_AUTH_SOCK}} variable is set. Then logout and log back in. Now, in KeePassXC settings, enable SSH agent integration. The {{ic|SSH_AUTH_SOCK}} value exposed in the UI should correspond to what you configured earlier.<br />
<br />
{{Note|The [[GnuPG#SSH agent|SSH agent emulation of ''gpg-agent'']] does not support removing keys from the agent on demand using {{ic|ssh-add -d}} or {{ic|ssh-add -D}}, therefore KeePassXC/KeeAgent cannot remove them when locking the database. [https://github.com/keepassxreboot/keepassxc/issues/2029#issuecomment-395933402] [https://unix.stackexchange.com/questions/185393/gpg-agent-doesnt-remove-my-ssh-key-from-the-keyring]}}<br />
<br />
=== Secret Service ===<br />
<br />
KeePassXC contains a [https://specifications.freedesktop.org/secret-service/latest/ Freedesktop.org Secret Service] integration. When enabled other programs can save secrets inside KeePassXC. While this improves overall security, it can lead to some unwanted behaviour while KeePassXC is closed, as programs that rely on their secrets to work cannot fetch them.<br />
<br />
== Tips and tricks ==<br />
<br />
=== Disable your clipboard manager ===<br />
<br />
If you are an avid user of clipboard managers, you may need to disable your clipboard manager before you launch Keepass and then re-start your clipboard manager afterwards.<br />
<br />
KeePassXC implementations has the option to auto-clear the clipboard manager after an amount of time, enough to paste copied items.<br />
<br />
=== Dark theme ===<br />
<br />
To enable the dark theme for KeePass, install {{AUR|keepass-keetheme}}. After installation, the plugin will get compiled upon starting KeePass. It can then be activated via {{ic|Tools, Dark Theme}}, or by pressing {{ic|Ctrl-T}}.<br />
<br />
== Troubleshooting ==<br />
<br />
=== User interface scaling issues with KeePassXC 2.6 ===<br />
<br />
If the user interface elements are not scaled properly, see [[HiDPI#Qt 5]] and [https://github.com/keepassxreboot/keepassxc/issues/5029 upstream bug report].<br />
<br />
== See also ==<br />
<br />
* [[List of applications/Security#Password managers]]</div>Goetzchttps://wiki.archlinux.org/index.php?title=Wayland&diff=763989Wayland2023-01-12T19:28:53Z<p>Goetzc: /* Configuration file */ minor path fix</p>
<hr />
<div>[[Category:Graphical user interfaces]]<br />
[[es:Wayland]]<br />
[[ja:Wayland]]<br />
[[pt:Wayland]]<br />
[[ru:Wayland]]<br />
[[zh-hans:Wayland]]<br />
{{Related articles start}}<br />
{{Related|KMS}}<br />
{{Related|Xorg}}<br />
{{Related|Screen capture#Wayland}}<br />
{{Related articles end}}<br />
<br />
[https://wayland.freedesktop.org/ Wayland] is a display server protocol. It is aimed to become the successor of the [[X Window System]]. You can find a [[Wikipedia:Wayland_(display_server_protocol)#Differences_between_Wayland_and_X|comparison between Wayland and Xorg on Wikipedia]].<br />
<br />
Display servers using the Wayland protocol are called '''compositors''' because they also act as [[Wikipedia:Compositing_window_manager|compositing window managers]]. Below you can find a [[#Compositors|list of Wayland compositors]].<br />
<br />
For compatibility with native [[X11]] applications to run them seamlessly, [[#XWayland|XWayland]] can be used, which provides an X Server in Wayland.<br />
<br />
== Requirements ==<br />
<br />
Most Wayland compositors only work on systems using [[Kernel mode setting]]. Wayland by itself does not provide a graphical environment; for this you also need a compositor (see the following section), or a desktop environment that includes a compositor (e.g. [[GNOME]] or [[KDE]]).<br />
<br />
For the GPU driver and Wayland compositor to be compatible they must support the same buffer API. There are two main APIs: [[Wikipedia:Generic Buffer Management|GBM]] and [https://www.phoronix.com/scan.php?page=news_item&px=XDC2016-Device-Memory-API EGLStreams].<br />
<br />
{| class="wikitable"<br />
|-<br />
! Buffer API !! GPU driver support !! Wayland compositor support<br />
|-<br />
| GBM || All except [[NVIDIA]] < 495* || All<br />
|-<br />
| EGLStreams || [[NVIDIA]] || [[GNOME]], [[Weston#EGLstream support (for proprietary Nvidia Driver)|Weston]] (with a third-party patch)<br />
|-<br />
|}<br />
<br />
: * NVIDIA ≥ 495 supports both EGLStreams and GBM.[https://www.phoronix.com/scan.php?page=news_item&px=NVIDIA-495.44-Linux-Driver].<br />
<br />
Since NVIDIA introduced GBM support, many compositors (including Mutter and KWin) started using it by default for NVIDIA ≥ 495. GBM is generally considered better with wider support, and EGLStreams only had support because NVIDIA did not provide any alternative way to use their GPUs under Wayland with their proprietary drivers. Furthermore, KWin [https://invent.kde.org/plasma/kwin/-/merge_requests/1638 dropped support for EGLStreams] after GBM was introduced into NVIDIA. <br />
<br />
If you use a popular desktop environment/compositor and a GPU still supported by NVIDIA, you are most likely already using GBM backend. To check, run {{ic|journalctl -b 0 --grep "renderer for"}}. To force GBM as a backend, set the following [[environment variables]]:<br />
<br />
{{bc|<nowiki><br />
GBM_BACKEND=nvidia-drm<br />
__GLX_VENDOR_LIBRARY_NAME=nvidia<br />
</nowiki>}}<br />
<br />
== Compositors ==<br />
<br />
See [[Window manager#Types]] for the difference between '''Tiling''' and '''Stacking'''.<br />
<br />
=== Tiling ===<br />
<br />
* {{App|[[Cagebreak]]|Based on cage, inspired by [[ratpoison]].|https://github.com/project-repo/cagebreak|{{AUR|cagebreak}}}}<br />
* {{App|Cardboard|Scrolling compositor, inspired by PaperWM, based on wlroots.|https://gitlab.com/cardboardwm/cardboard|{{AUR|cardboard-git}}}}<br />
* {{App|dwl|[[dwm]]-like Wayland compositor based on wlroots.|https://github.com/djpohly/dwl|{{AUR|dwl}}}}<br />
* {{App|[[Hyprland]]|A dynamic tiling Wayland compositor that does not sacrifice on its looks.|https://github.com/hyprwm/Hyprland|{{AUR|hyprland}}}}<br />
* {{App|japokwm|Dynamic Wayland tiling compositor based around creating layouts, based on wlroots.|https://github.com/werererer/japokwm|{{AUR|japokwm-git}}}}<br />
* {{App|newm|Wayland compositor written with laptops and touchpads in mind.|https://github.com/jbuchermn/newm/|{{AUR|newm-git}}}}<br />
* {{App|[[Qtile]]|A full-featured, hackable tiling window manager and Wayland compositor written and configured in Python.|https://github.com/qtile/qtile|{{Pkg|qtile}}}}<br />
* {{App|river|Dynamic tiling Wayland compositor inspired by dwm and [[bspwm]].|https://github.com/ifreund/river|{{AUR|river}}}}<br />
* {{App|[[Sway]]|[[i3]]-compatible Wayland compositor based on wlroots.|https://github.com/swaywm/sway|{{Pkg|sway}}}}<br />
* {{App|Velox|Simple window manager based on swc, inspired by dwm and [[xmonad]].|https://github.com/michaelforney/velox|{{AUR|velox-git}}}}<br />
* {{App|Vivarium|A dynamic tiling Wayland compositor using wlroots, with desktop semantics inspired by [[xmonad]].|https://github.com/inclement/vivarium|{{AUR|vivarium-git}}}}<br />
* {{App|waymonad|Wayland compositor inspired by xmonad written in [[Haskell]].|https://github.com/waymonad/waymonad}}<br />
<br />
=== Stacking ===<br />
<br />
* {{App|[[Enlightenment]]|See [[Enlightenment#Manually]]. More Info: [https://git.enlightenment.org/core/enlightenment.git/tree/README]{{Dead link|2022|09|23|status=404}} [https://www.enlightenment.org/about-wayland]|https://www.enlightenment.org/|{{Pkg|enlightenment}}}}<br />
* {{App|Greenfield|Runs in a web browser and can display remote applications.|https://greenfield.app/}}<br />
* {{App|Grefsen|Qt/Wayland compositor providing a minimal desktop environment.|https://github.com/ec1oud/grefsen}}<br />
* {{App|hikari|wlroots-based compositor inspired by [[cwm]] which is actively developed on FreeBSD but also supports Linux.|https://hikari.acmelabs.space/|{{AUR|hikari}}}}<br />
* {{App|KDE [[w:KWin|KWin]]|See [[KDE#Starting Plasma]].|https://userbase.kde.org/KWin|{{Pkg|kwin}}}}<br />
* {{App|Liri Shell|Part of [[Liri]], built using QtQuick and QtCompositor as a compositor for Wayland.|https://github.com/lirios/shell|{{AUR|liri-shell-git}}}}<br />
* {{App|labwc|wlroots-based compositor inspired by Openbox.|https://github.com/labwc/labwc|{{AUR|labwc-git}}}}<br />
* {{App|[[w:Mutter (software)|Mutter]]|See [[GNOME#Starting]].|https://gitlab.gnome.org/GNOME/mutter|{{Pkg|mutter}}}}<br />
* {{App|wayfire|3D compositor inspired by [[Compiz]] and based on wlroots.|https://wayfire.org/|{{AUR|wayfire}}}}<br />
* {{App|[[Weston]]|Wayland compositor designed for correctness, reliability, predictability, and performance.|https://gitlab.freedesktop.org/wayland/weston|{{Pkg|weston}}}}<br />
* {{App|wio|wlroots-based compositor that aims to replicate the look and feel of Plan 9's Rio desktop.|https://wio-project.org/{{Dead link|2022|09|23|status=SSL error}}|{{AUR|wio-wl}}}}<br />
<br />
=== Other ===<br />
<br />
* {{App|Cage|Displays a single fullscreen application like a kiosk.|https://www.hjdskes.nl/projects/cage/|{{Pkg|cage}}}}<br />
* {{App|Maze Compositor|Renders windows in a 3D maze using Qt.|https://github.com/imbavirus/mazecompositor}}<br />
* {{App|Motorcar| Wayland compositor to explore 3D windowing using virtual reality.|https://github.com/evil0sheep/motorcar}}<br />
* {{App|nwg-shell|A GTK-based shell for the sway Wayland compositor.|https://github.com/nwg-piotr/nwg-shell|{{AUR|nwg-shell}}}}<br />
* {{App|kiwmi|A fully programmable Wayland Compositor.|https://github.com/buffet/kiwmi|{{AUR|kiwmi-git}}}}<br />
<br />
Some of the above may support [[display manager]]s. Check {{ic|/usr/share/wayland-sessions/''compositor''.desktop}} to see how they are started.<br />
<br />
== Display managers ==<br />
<br />
Display managers listed below support launching Wayland compositors. <br />
<br />
{| class="wikitable sortable"<br />
! Name<br />
! Runs itself on Wayland?<br />
! Description<br />
|-<br />
| [[GDM]]<br />
| {{Yes}}<br />
| [[GNOME]] display manager.<br />
|-<br />
| [[greetd]]<br />
| {{Y|Wayland greeter available}}<br />
| Minimal and flexible login daemon. <br />
|-<br />
| [[LightDM]]<br />
| {{No}}<br />
| Cross-desktop display manager.<br />
|-<br />
| [[Ly]]<br />
| {{No}}<br />
| TUI display manager written in C<br />
|-<br />
| [[SDDM]]<br />
| {{Y|Only with {{AUR|sddm-git}}}}<br />
| QML-based display manager.<br />
|-<br />
| [[tbsm]]<br />
| {{No}}<br />
| Simple CLI session launcher written in pure bash.<br />
|}<br />
<br />
== GUI libraries ==<br />
<br />
See details on the [https://wayland.freedesktop.org/toolkits.html official website].<br />
<br />
=== GTK ===<br />
<br />
The {{Pkg|gtk3}} and {{Pkg|gtk4}} packages have the Wayland backend enabled. GTK will default to the Wayland backend, but it is possible to override it to Xwayland by modifying an environment variable: {{ic|1=GDK_BACKEND=x11}}.<br />
<br />
=== Qt ===<br />
<br />
To enable Wayland support in [[Qt]] 5 or 6, install the {{Pkg|qt5-wayland}} or {{Pkg|qt6-wayland}} package, respectively.<br />
<br />
To run a Qt application with the Wayland plugin [https://wiki.qt.io/QtWayland#How_do_I_use_QtWayland.3F], use {{ic|1=-platform wayland}} or {{ic|1=QT_QPA_PLATFORM=wayland}} [[environment variable]]. To force the usage of [[X11]] on a Wayland session, use {{ic|1=QT_QPA_PLATFORM=xcb}}. This might be necessary for some proprietary applications that do not use the system's implementation of Qt, such as {{AUR|zoom}}.<br />
{{ic|1=QT_QPA_PLATFORM="wayland;xcb"}} allows Qt to use the xcb (X11) plugin instead if Wayland is not available.[https://www.qt.io/blog/2018/05/29/whats-new-in-qt-5-11-for-the-wayland-platform-plugin]<br />
<br />
On some compositors, for example [[sway]], Qt applications running natively might have missing functionality. For example, [https://keepassxc.org KeepassXC] will be unable to minimize to tray. This can be solved by installing {{Pkg|qt5ct}} and setting {{ic|1=QT_QPA_PLATFORMTHEME=qt5ct}} before running the application.<br />
<br />
=== Clutter ===<br />
<br />
The Clutter toolkit has a Wayland backend that allows it to run as a Wayland client. The backend is enabled in the {{Pkg|clutter}} package.<br />
<br />
To run a Clutter application on Wayland, set {{ic|1=CLUTTER_BACKEND=wayland}}.<br />
<br />
=== SDL2 ===<br />
<br />
As of SDL2 version 2.0.22, SDL [https://github.com/libsdl-org/SDL/pull/4306 defaults to preferring Wayland over X11.]<br />
<br />
{{Note|Many proprietary games come bundled with old versions of SDL, which do not support Wayland and might break entirely if the use of Wayland is forced with {{ic|1=SDL_VIDEODRIVER=wayland}}. To force the application to run with XWayland, set {{ic|1=SDL_VIDEODRIVER=x11}}.}}<br />
<br />
=== GLFW ===<br />
<br />
To use GLFW with the Wayland backend, install the {{Pkg|glfw-wayland}} package (instead of {{Pkg|glfw-x11}}).<br />
<br />
=== GLEW ===<br />
<br />
The {{AUR|glew-wayland}} package currently still does not work with a lot of GLEW-based applications, so the only option is to use {{Pkg|glew}} with Xwayland. See {{Bug|62713}}.<br />
<br />
=== EFL ===<br />
<br />
EFL has complete Wayland support. To run a EFL application on Wayland, see Wayland [https://wayland.freedesktop.org/efl.html project page].<br />
<br />
=== winit ===<br />
<br />
Winit is a window handling library in Rust. It will default to the Wayland backend, but it is possible to override it to Xwayland by modifying an environment variable: {{ic|1=WINIT_UNIX_BACKEND=x11}}.<br />
<br />
=== Electron ===<br />
<br />
Wayland support can be activated either using per-application command line flags or more globally using a configuration file.<br />
<br />
==== Command line flags ====<br />
<br />
To use {{Pkg|electron}}-based applications natively under Wayland, the following flags need to be added to your application exec command line (for Electron 20): {{ic|1=--ozone-platform-hint=auto}}. <br />
<br />
Missing top bars can be solved by additionally using the following flag: {{ic|1=--enable-features=WaylandWindowDecorations}}. This will typically be necessary under [[GNOME]] (supported since [https://github.com/electron/electron/pull/29618 electron17]).<br />
<br />
You can do this for instance by [[Desktop entries#Modify desktop files|modifying the .desktop file]] and adding the flags to the end of the {{ic|1=Exec=}} line.<br />
<br />
{{Note|Some packages, like {{AUR|visual-studio-code-bin}} ([https://github.com/microsoft/vscode/issues/134612 bug report]), do not forward flags to Electron, and thus will need the application developer to implement a solution.}}<br />
<br />
==== Configuration file ====<br />
<br />
Create or edit the file {{ic|${XDG_CONFIG_HOME}/electron-flags.conf}} (defaults to {{ic|1=~/.config/electron-flags.conf}} if {{ic|${XDG_CONFIG_HOME} }} is unset) and add the previously mentioned flags (one option per line, with no empty lines):<br />
<br />
{{hc|~/.config/electron-flags.conf|2=<br />
--enable-features=WaylandWindowDecorations<br />
--ozone-platform-hint=auto<br />
}}<br />
<br />
{{Note|These configuration files only work for the Electron packages in the official repositories and packages that use them. They do not work for packages that bundle their own build of Electron such as {{AUR|slack-desktop}}. Sometimes alternatives exist such as {{AUR|slack-electron}}.}}<br />
<br />
==== Older Electron versions ====<br />
<br />
{{ic|electron-flags.conf}} applies only to the latest version of Electron. Older versions of Electron can be configured using their own {{ic|electron<version>-flags.conf}} file. Versioned files can be soft-linked to {{ic|${XDG_CONFIG_HOME}/electron-flags.conf}}.<br />
<br />
Older versions may also require different flags, depending on the corresponding Chromium version. For example, the following flags work on Electron 13:<br />
<br />
{{hc|~/.config/electron13-flags.conf|2=<br />
--enable-features=UseOzonePlatform<br />
--ozone-platform=wayland<br />
}}<br />
<br />
=== Java ===<br />
<br />
The open source implementation of the [[Java]] platform OpenJDK, does not yet have native support for Wayland.<br />
Until [https://openjdk.java.net/projects/wakefield/ Wakefield], the project that aims to implement Wayland in OpenJDK, is available, XWayland can be used.<br />
<br />
== XWayland ==<br />
<br />
[https://wayland.freedesktop.org/xserver.html XWayland] is an X server that runs under Wayland and provides compatibility for native [[X11]] applications that are yet to provide Wayland support. To use it, [[install]] the {{Pkg|xorg-xwayland}} package.<br />
<br />
XWayland is started via a compositor, so you should check the documentation for your chosen compositor for XWayland compatibility and instructions on how to start XWayland.<br />
<br />
{{Note|<br />
* Security: XWayland is an X server, so it does not have the security features of Wayland<br />
* Performance: XWayland has a [https://openbenchmarking.org/result/2202053-NE-NVIDIARTX35 nearly identical performance] to that of X11. In some cases you might notice degraded performance, especially on NVIDIA cards.<br />
* Compatibility: XWayland isn't fully backward compatible with X11. Some applications may not work properly under XWayland.}}<br />
<br />
=== Nvidia driver ===<br />
<br />
{{Note|Nvidia drivers prior to version 470 (e.g. {{aur|nvidia-390xx-dkms}}) do not support hardware accelerated XWayland, causing non-Wayland-native applications to suffer from poor performance in Wayland sessions.}}<br />
<br />
Enabling [[NVIDIA#DRM kernel mode setting|DRM KMS]] is required. There may be additional information in the [https://download.nvidia.com/XFree86/Linux-x86_64/515.48.07/README/xwayland.html official documentation] regarding your display manager (e.g. [[GDM#Wayland and the proprietary NVIDIA driver|GDM]]).<br />
<br />
== Tips and tricks ==<br />
<br />
=== Automation ===<br />
<br />
* [https://github.com/ReimuNotMoe/ydotool ydotool] ({{Pkg|ydotool}}) - Generic command-line automation tool (not limited to wayland). [[Enable/start]] the {{ic|ydotool.service}} [[user unit]]. See {{man|8|ydotoold}}, {{man|1|ydotoold|url=https://github.com/ReimuNotMoe/ydotool/blob/master/manpage/ydotool.1.scd}}. <br />
* [https://github.com/atx/wtype wtype] ({{Pkg|wtype}}) - xdotool type for wayland. See {{man|1|wtype}}.<br />
* [https://github.com/boppreh/keyboard keyboard] - Python library that works on Windows and Linux with experimental OS X support. Also see the [https://github.com/boppreh/mouse mouse] library.<br />
<br />
=== Kwin Wayland debug console ===<br />
<br />
If you use {{pkg|kwin}}, execute the following to see which windows use Xwayland or native Wayland, surfaces, input events, clipboard contents, and more.<br />
<br />
$ qdbus org.kde.KWin /KWin org.kde.KWin.showDebugConsole<br />
<br />
=== Detect Xwayland applications visually ===<br />
<br />
To determine whether an application is running via Xwayland, you can run {{AUR|extramaus}}.<br />
Move your mouse pointer over the window of an application. If the red mouse moves, the application is running via Xwayland.<br />
<br />
Alternatively, you can use {{pkg|xorg-xeyes}} and see if the eyes are moving, when moving the mouse pointer over an application window.<br />
<br />
An other option is to run ''xwininfo'' (from {{Pkg|xorg-xwininfo}}) in a terminal window : when hovering over an Xwayland window the mouse pointer will turn into a + sign. If you click the window it will display some information and end, but it will not do anything with native Wayland windows.You can use {{ic|Ctrl+C}} to end it.<br />
<br />
=== Remap keyboard or mouse keys ===<br />
<br />
See [[Input remap utilities]].<br />
<br />
== Troubleshooting ==<br />
<br />
=== Color correction ===<br />
<br />
See [[Backlight#Color correction]].<br />
<br />
=== Slow motion, graphical glitches, and crashes ===<br />
<br />
Gnome-shell users may experience display issues when they switch to Wayland from X. One of the root cause might be the {{ic|1=CLUTTER_PAINT=disable-clipped-redraws:disable-culling}} set by yourself for Xorg-based gnome-shell. Just try to remove it from {{ic|/etc/environment}} or other rc files to see if everything goes back to normal.<br />
<br />
=== Remote display ===<br />
<br />
* {{pkg|wlroots}} (used by [[sway]]) offers a VNC backend via {{Pkg|wayvnc}} since version 0.10. RDP backend has been removed [https://github.com/swaywm/wlroots/releases/tag/0.10.0].<br />
* {{pkg|mutter}} has now remote desktop enabled at compile time, see [https://wiki.gnome.org/Projects/Mutter/RemoteDesktop] and {{Pkg|gnome-remote-desktop}} for details.<br />
* There was a merge of FreeRDP into Weston in 2013, enabled via a compile flag. The {{Pkg|weston}} package has it enabled since version 6.0.0.<br />
* {{AUR|waypipe}} (or {{AUR|waypipe-git}}) is a transparent proxy for Wayland applications, with a wrapper command to run over [[SSH]]<br />
<br />
=== Input grabbing in games, remote desktop and VM windows ===<br />
<br />
In contrast to Xorg, Wayland does not allow exclusive input device grabbing, also known as active or explicit grab (e.g. [https://tronche.com/gui/x/xlib/input/XGrabKeyboard.html keyboard], [https://tronche.com/gui/x/xlib/input/XGrabPointer.html mouse]), instead, it depends on the Wayland compositor to pass keyboard shortcuts and confine the pointer device to the application window.<br />
<br />
This change in input grabbing breaks current applications' behavior, meaning:<br />
<br />
* Hotkey combinations and modifiers will be caught by the compositor and will not be sent to remote desktop and virtual machine windows.<br />
* The mouse pointer will not be restricted to the application's window which might cause a parallax effect where the location of the mouse pointer inside the window of the virtual machine or remote desktop is displaced from the host's mouse pointer.<br />
<br />
Wayland solves this by adding protocol extensions for Wayland and XWayland. Support for these extensions is needed to be added to the Wayland compositors. In the case of native Wayland clients, the used widget toolkits (e.g GTK, Qt) needs to support these extensions or the applications themselves if no widget toolkit is being used. In the case of Xorg applications, no changes in the applications or widget toolkits are needed as the XWayland support is enough.<br />
<br />
These extensions are already included in {{pkg|wayland-protocols}}, and supported by {{pkg|xorg-xwayland}}.<br />
<br />
The related extensions are:<br />
<br />
* [https://gitlab.freedesktop.org/wayland/wayland-protocols/-/blob/main/unstable/xwayland-keyboard-grab/xwayland-keyboard-grab-unstable-v1.xml XWayland keyboard grabbing protocol]<br />
* [https://gitlab.freedesktop.org/wayland/wayland-protocols/-/blob/main/unstable/keyboard-shortcuts-inhibit/keyboard-shortcuts-inhibit-unstable-v1.xml Compositor shortcuts inhibit protocol]<br />
* [https://gitlab.freedesktop.org/wayland/wayland-protocols/-/blob/main/unstable/relative-pointer/relative-pointer-unstable-v1.xml Relative pointer protocol]<br />
* [https://gitlab.freedesktop.org/wayland/wayland-protocols/-/blob/main/unstable/pointer-constraints/pointer-constraints-unstable-v1.xml Pointer constraints protocol]<br />
<br />
Supporting Wayland compositors:<br />
<br />
* Mutter, [[GNOME]]'s compositor [https://bugzilla.gnome.org/show_bug.cgi?id=783342 since release 3.28]<br />
* wlroots supports relative-pointer and pointer-constraints<br />
<br />
Supporting widget toolkits:<br />
<br />
* GTK since release 3.22.18.<br />
<br />
=== GTK themes not working ===<br />
<br />
See https://github.com/swaywm/sway/wiki/GTK-3-settings-on-Wayland.<br />
<br />
=== Avoid loading NVIDIA modules ===<br />
<br />
Add {{ic|1=__EGL_VENDOR_LIBRARY_FILENAMES=/usr/share/glvnd/egl_vendor.d/50_mesa.json}} as [[environment variable]] before launching a Wayland compositor like [[sway]].<br />
<br />
== See also ==<br />
<br />
* [https://wayland.freedesktop.org/docs/html/ Wayland documentation online]<br />
* [https://gitlab.freedesktop.org/wayland Official Wayland Git Repo]<br />
* [[Fedora:How to debug Wayland problems]]<br />
* [https://arewewaylandyet.com/ Are we Wayland yet?]<br />
* [https://awesomeopensource.com/projects/wayland Awesome Wayland projects]<br />
* [[Cursor themes]]<br />
* [https://bbs.archlinux.org/viewtopic.php?id=107499 Arch Linux forum discussion]<br />
* [https://github.com/swaywm/sway/wiki/i3-Migration-Guide#common-x11-apps-used-on-i3-with-wayland-alternatives i3 Migration Guide - Common X11 apps used on i3 with Wayland alternatives]<br />
* [https://wayland.app/protocols/ Wayland Explorer - A better way to read Wayland documentation]<br />
* [https://askubuntu.com/questions/1393618/how-can-i-tell-if-an-application-is-using-xwayland How can I tell if an application is using XWayland]</div>Goetzchttps://wiki.archlinux.org/index.php?title=Libinput&diff=761571Libinput2022-12-19T15:32:12Z<p>Goetzc: /* fusuma */ note about ydotool</p>
<hr />
<div>{{Lowercase title}}<br />
[[Category:Input devices]]<br />
[[ja:Libinput]]<br />
[[zh-hans:Libinput]]<br />
{{Related articles start}}<br />
{{Related|Xorg}}<br />
{{Related|Touchpad Synaptics}}<br />
{{Related|Wayland}}<br />
{{Related articles end}}<br />
<br />
From the [https://freedesktop.org/wiki/Software/libinput/ libinput] wiki page: <br />
<br />
:libinput is a library to handle input devices in Wayland compositors and to provide a generic X.Org input driver. It provides device detection, device handling, input device event processing and abstraction to minimize the amount of custom input code compositors need to provide the common set of functionality that users expect.<br />
<br />
The X.Org input driver supports most regular [[Xorg#Input devices|input devices]]. Particularly notable is the project's goal to provide advanced support for touch (multitouch and gesture) features of touchpads and touchscreens. See the [https://wayland.freedesktop.org/libinput/doc/latest/ libinput documentation] for more information.<br />
<br />
== Installation ==<br />
<br />
If you installed either [[Xorg]] or [[Wayland]], then Libinput should already be installed as a dependency; there are no necessary extra packages.<br />
<br />
* For [[Wayland]], the {{pkg|libinput}} package should be installed as a dependency of any graphical environment you use that has Wayland, and no additional driver is needed.<br />
* For [[Xorg]], {{Pkg|xf86-input-libinput}} is also a dependency. It is "a thin wrapper around libinput and allows for libinput to be used for input devices in X. This driver can be used as as drop-in replacement for evdev and synaptics." [https://freedesktop.org/wiki/Software/libinput/]. It replaces other packages used for input with X (i.e., those prefixed with {{ic|xf86-input-}}).<br />
<br />
You may want to install {{Pkg|xorg-xinput}} to be able to change settings at runtime.<br />
<br />
== Configuration ==<br />
<br />
For [[Wayland]], there is no libinput configuration file. The configurable options depend on the progress of your desktop environment's support for them; see [[#Graphical tools]]. To configure options that your desktop environment does not yet support (e.g. touchpad scroll speed on [[GNOME]]), {{Aur|libinput-config-git}} may be used as a work-around. Available options for that tool are documented in the [https://gitlab.com/warningnonpotablewater/libinput-config libinput-config README].<br />
<br />
For [[Xorg]], a default configuration file for the wrapper is installed to {{ic|/usr/share/X11/xorg.conf.d/40-libinput.conf}}. No extra configuration is necessary for it to autodetect keyboards, touchpads, trackpointers and supported touchscreens.<br />
<br />
=== Via xinput ===<br />
<br />
First, execute:<br />
<br />
# libinput list-devices<br />
<br />
It will output the devices on the system and their respective features supported by libinput.<br />
<br />
After a [[restart]] of the graphical environment, the devices should be managed by libinput with default configuration, if no other drivers are configured to take precedence.<br />
<br />
See {{man|4|libinput}} for general options to set and information about allowable values. The ''xinput'' tool is used to view or change options available for a particular device at runtime. For example:<br />
<br />
$ xinput list<br />
<br />
to view all devices and determine their names and numbers. In the following, {{ic|''device''}} is either the name or number identifying the device to operate with.<br />
<br />
$ xinput list-props ''device''<br />
<br />
to view and <br />
<br />
$ xinput set-prop ''device'' ''option'' ''setting''<br />
<br />
to change a setting. {{ic|''option''}} can be either the number or the name of the option. For example, to set both options of libinput Click Method Enabled (303), either of the following can be issued:<br />
<br />
$ xinput set-prop 14 303 1 1<br />
<br />
or <br />
<br />
$ xinput set-prop 14 "libinput Click Method Enabled" 1 1<br />
<br />
=== Via Xorg configuration file ===<br />
<br />
See [[Xorg#Using .conf files]] for permanent option settings. [[Logitech Marble Mouse#libinput]] and [[#Tapping button re-mapping]] illustrate examples.<br />
<br />
Alternative drivers for [[Xorg#Input devices]] can generally be installed in parallel. If you intend to switch driver for a device to use libinput, ensure no legacy configuration files {{ic|/etc/X11/xorg.conf.d/}} for other drivers take precedence.<br />
<br />
{{Tip|<br />
* If you have libinput and synaptics installed in parallel with default configuration (i.e. no files in {{ic|/etc/X11/xorg.conf.d}} for either), synaptics will take precedence due to its higher numeric order {{ic|70-}} in the default installation directory. To avoid this, you can symlink the default libinput configuration ({{ic|40-libinput.conf}}) to {{ic|/etc/X11/xorg.conf.d/}} where directory search order precedence over {{ic|70-synaptics.conf}} will take place instead:<br />
<br />
# ln -s /usr/share/X11/xorg.conf.d/40-libinput.conf /etc/X11/xorg.conf.d/40-libinput.conf<br />
<br />
If you ''do'' have {{ic|/etc/X11/xorg.conf.d/}} configuration files for both, the libinput file must be ordered second; see [[Xorg#Using .conf files]]. If you want to disable libinput (and fallback to older drivers) - just remove the previously created symbolic link from {{ic|/etc/X11/xorg.conf.d/}}.<br />
* If a configuration file seems to have no effect at all, check that it is readable by unprivileged users.}}<br />
<br />
One way to check which devices are managed by libinput is the [[Xorg#General|xorg logfile]]. For example, the following:<br />
<br />
{{hc|$ grep -e "Using input driver 'libinput'" ''/path/to/Xorg.0.log''|<br />
[ 28.799] (II) Using input driver 'libinput' for 'Power Button'<br />
[ 28.847] (II) Using input driver 'libinput' for 'Video Bus'<br />
[ 28.853] (II) Using input driver 'libinput' for 'Power Button'<br />
[ 28.860] (II) Using input driver 'libinput' for 'Sleep Button'<br />
[ 28.872] (II) Using input driver 'libinput' for 'AT Translated Set 2 keyboard'<br />
[ 28.878] (II) Using input driver 'libinput' for 'SynPS/2 Synaptics TouchPad'<br />
[ 28.886] (II) Using input driver 'libinput' for 'TPPS/2 IBM TrackPoint'<br />
[ 28.895] (II) Using input driver 'libinput' for 'ThinkPad Extra Buttons'<br />
}}<br />
<br />
is a notebook without any configuration files in {{ic|/etc/X11/xorg.conf.d/}}, i.e. devices are auto-detected.<br />
<br />
Of course you can elect to use an alternative driver for one device and libinput for others. A number of factors may influence which driver to use. For example, in comparison to [[Touchpad Synaptics]] the libinput driver has fewer options to customize touchpad behaviour to one's own taste, but far more programmatic logic to process multitouch events (e.g. palm detection as well). Hence, it makes sense to try the alternative, if you are experiencing problems on your hardware with one driver or the other.<br />
<br />
Custom configuration files should be placed in {{ic|/etc/X11/xorg.conf.d/}} and following a widely used naming schema {{ic|30-touchpad.conf}} is often chosen as filename.<br />
<br />
{{Tip|Have a look at CONFIGURATION DETAILS in {{ic|/usr/share/X11/xorg.conf.d/40-libinput.conf}} for guidance and refer to the {{man|4|libinput}} manual page for a detailed description of available configuration options.}}<br />
<br />
A basic configuration should have the following structure:<br />
<br />
{{hc|/etc/X11/xorg.conf.d/30-touchpad.conf|<br />
Section "InputClass"<br />
Identifier "devname"<br />
Driver "libinput"<br />
...<br />
EndSection<br />
}}<br />
<br />
You may define as many sections as you like in a single configuration file (usually one per input device).<br />
To configure the device of your choice specify a filter by using one of the available filters from {{man|5|xorg.conf|INPUTCLASS_SECTION}}, e.g.<br />
<br />
* {{ic|MatchIsPointer "on"}} (trackpoint)<br />
* {{ic|MatchIsKeyboard "on"}}<br />
* {{ic|MatchIsTouchpad "on"}}<br />
* {{ic|MatchIsTouchscreen "on"}}<br />
<br />
The input device can then be configured with any of the lines of {{man|4|libinput|CONFIGURATION_DETAILS}}. Common options include:<br />
<br />
* {{ic|Option "Tapping" "on"}}: tapping a.k.a. tap-to-click<br />
* {{ic|Option "ClickMethod" "clickfinger"}}: trackpad no longer has middle and right button areas and instead two-finger click is a context click and three-finger click is a middle click, see the [https://wayland.freedesktop.org/libinput/doc/latest/clickpad-softbuttons.html#clickfinger-behavior docs].<br />
* {{ic|Option "NaturalScrolling" "true"}}: natural (reverse) scrolling<br />
* {{ic|Option "ScrollMethod" "edge"}}: edge (vertical) scrolling<br />
<br />
Bear in mind that some of them may only apply to certain devices and you will need to restart X for changes to take effect.<br />
<br />
=== Graphical tools ===<br />
<br />
There are different GUI tools:<br />
<br />
* [[GNOME]]:<br />
** Control center has a basic UI. See [[GNOME#Mouse and touchpad]].<br />
** {{pkg|gnome-tweaks}} offers some additional settings.<br />
* [[Cinnamon]]:<br />
** Similar to the GNOME UI, with more options.<br />
* [[MATE]]:<br />
** Mouse option available in the settings panel. Also accessible using {{ic|mate-mouse-properties}}<br />
* [[KDE Plasma]] 5:<br />
** Keyboard, mouse and controller devices can be configured from System Settings.<br />
* [[Xfce]]:<br />
** Configured from the Mouse and Touchpad submenu in {{pkg|xfce4-settings}}.<br />
<br />
== Tips and tricks ==<br />
<br />
=== Tapping button re-mapping ===<br />
<br />
Swapping two- and three-finger tap for a touchpad is a straight forward example. Instead of the default three-finger tap for pasting, you can configure two-finger tap pasting by setting the {{ic|TappingButtonMap}} option in your [[Xorg]] configuration file. To set 1/2/3-finger taps to left/right/middle, set {{ic|TappingButtonMap}} to {{ic|lrm}}, for left/middle/right set it to {{ic|lmr}}.<br />
<br />
{{hc|/etc/X11/xorg.conf.d/30-touchpad.conf|<br />
Section "InputClass"<br />
Identifier "touchpad"<br />
Driver "libinput"<br />
MatchIsTouchpad "on"<br />
Option "Tapping" "on"<br />
Option "TappingButtonMap" "lmr"<br />
EndSection}}<br />
<br />
Remember to remove {{ic|MatchIsTouchpad "on"}} if your device is not a touchpad and adjust the {{ic|Identifier}} accordingly.<br />
<br />
=== Manual button re-mapping ===<br />
<br />
For some devices, it is desirable to change the button mapping. A common example is the use of a thumb button instead of the middle button (used in X11 for pasting) on mice where the middle button is part of the mouse wheel. You can query the current button mapping via:<br />
<br />
$ xinput get-button-map ''device''<br />
<br />
where ''device'' is either the device name or the device ID, as returned by {{ic|xinput list}}. You can freely permutate the button numbers and write them back. Example:<br />
<br />
$ xinput set-button-map ''device'' 1 6 3 4 5 0 7<br />
<br />
In this example, we mapped button 6 to be the middle button and disabled the original middle button by assigning it to button 0. <br />
For more information, please read about "ButtonMapping" section in {{man|4|libinput}}.<br />
This may also be used for [[Wayland]], but be aware both the ''device'' number and its button-map will be different. Hence, settings are not directly interchangeable. <br />
<br />
{{Tip|You can use ''xev'' (from the {{Pkg|xorg-xev}} package) to find out which physical button is currently mapped to which ID.}}<br />
<br />
{{Style|The rest of this section is overly complicated with parameters for different devices. Unique ideas should be split into subsections to make it more readable.}}<br />
<br />
Some devices occur several times under the same device name, with a different amount of buttons exposed. The following is an example for reliably changing the button mapping for a Logitech Revolution MX mouse via [[xinitrc]]:<br />
<br />
{{hc|~/.xinitrc|<nowiki><br />
...<br />
for i in $(xinput list | grep "Logitech USB Receiver" | perl -n -e'/id=(\d+)/ && print "$1\n"')<br />
do if xinput get-button-map "$i" 2>/dev/null| grep -q 20; then<br />
xinput set-button-map "$i" 1 17 3 4 5 8 7 6 9 10 11 12 13 14 15 16 2 18 19 20<br />
fi<br />
done<br />
...<br />
</nowiki>}}<br />
<br />
You could also use the Xorg configure file to do that. The trackball used in this example has a physical scroll wheel, for those devices without that may need to refer the configure for [[Logitech Marble Mouse#Configuration file|Logitech Marble Mouse]].<br />
The physical buttons in Kensington Slimblade Trackball layout are:<br />
{{bc|<nowiki><br />
-----------<br />
|2(M)|8(S)|<br />
-----------<br />
|1(L)|3(R)|<br />
-----------<br />
</nowiki>}}<br />
So for the left hand user, you may use the configure below, although you do not have neither a scroll up button nor scroll down button, you cannot disable them in configure or some application will not response to the action of the wheel.<br />
{{bc|<nowiki><br />
-----------<br />
|2(N)|8(M)|<br />
-----------<br />
|1(R)|3(L)|<br />
-----------<br />
</nowiki>}}<br />
{{hc|/etc/X11/xorg.conf|<nowiki><br />
Section "InputClass"<br />
Identifier "Trackball"<br />
MatchProduct "Kensington Kensington Slimblade Trackball"<br />
MatchProduct "Trackball"<br />
Driver "libinput"<br />
Option "ButtonMapping" "3 0 1 4 5 6 7 8 2"<br />
EndSection<br />
</nowiki>}}<br />
<br />
=== Change touchpad sensitivity ===<br />
<br />
The method of finding the correct thresholds for when libinput registers a touch as DOWN and back UP again can be found [https://wayland.freedesktop.org/libinput/doc/latest/touchpad-pressure-debugging.html#touchpad-pressure-hwdb] in the upstream documentation.<br />
<br />
Custom touchpad pressure values can be set via temporary local device quirks. See [https://wayland.freedesktop.org/libinput/doc/latest/device-quirks.html].<br />
<br />
{{Note|Quirks are an internal API and are not guaranteed to work in future libinput versions. Between versions 1.11 and 1.12, udev rules [https://wayland.freedesktop.org/libinput/doc/1.11.3/udev_config.html#hwdb] were replaced by {{ic|.quirk}} files [https://wayland.freedesktop.org/libinput/doc/latest/device-quirks.html].}}<br />
<br />
=== Disable touchpad ===<br />
<br />
To disable the touchpad, first get its name with {{ic|xinput list}} and then disable it with {{ic|xinput disable ''name''}}.<br />
<br />
{{Note|<br />
* It is more robust to disable it by name than by ID number. The devices may be renumbered.<br />
* It will be necessary to quote the name if it contains spaces.<br />
}}<br />
<br />
To make it permanent, see [[Autostarting]].<br />
<br />
To toggle, write a script such as [https://github.com/lahwaacz/Scripts/blob/master/toggle-touchpad.sh].<br />
<br />
=== Gestures ===<br />
<br />
While the libinput driver already contains logic to process advanced multitouch events like swipe and pinch [https://wayland.freedesktop.org/libinput/doc/latest/gestures.html gestures], the [[Desktop environment]] or [[Window manager]] might not have implemented actions for all of them yet.<br />
<br />
==== libinput-gestures ====<br />
<br />
For [[w:Extended_Window_Manager_Hints|EWMH]] (see also [https://www.freedesktop.org/wiki/Specifications/wm-spec/ wm-spec]) compliant window managers, the [https://github.com/bulletmark/libinput-gestures libinput-gestures] utility can be used meanwhile. The program reads libinput gestures (through {{ic|libinput debug-events}}) from the touchpad and maps them to gestures according to a configuration file. Hence, it offers some flexibility within the boundaries of libinput's built-in recognition.<br />
<br />
To use it, install the {{Aur|libinput-gestures}} package. You can use the default system-wide configured swipe and pinch gestures or define your own in a personal configuration file, see the [https://github.com/bulletmark/libinput-gestures/blob/master/README.md README] for details.<br />
<br />
If using [[touchegg]], uninstall the {{Aur|libinput-gestures}} package to prevent conflicts (see [https://github.com/JoseExposito/gnome-shell-extension-x11gestures/issues/41]).<br />
<br />
==== fusuma ====<br />
<br />
[https://github.com/iberianpig/fusuma Fusuma] is a multitouch gesture recognizer, written in [[Ruby]], which can be used as an alternative to libinput-gestures.<br />
<br />
Install the {{ic|fusuma}} [[Ruby#RubyGems|Ruby gem]]:<br />
<br />
$ gem install fusuma<br />
<br />
Alternatively, there is also {{AUR|ruby-fusuma}}.<br />
<br />
Other than the {{ic|fusuma}} [[Ruby#RubyGems|Ruby gem]] gem you have to install the {{ic|fusuma-plugin-sendkey}} [[Ruby#RubyGems|Ruby gem]] or one between the {{pkg|xdotool}} (for X) and {{Pkg|ydotool}} (generic: Wayland, X11, etc). Other alternatives are listed [https://github.com/iberianpig/fusuma#alternatives-to-xdotool here].<br />
<br />
{{Tip|The {{ic|fusuma-plugin-sendkey}} [[Ruby#RubyGems|Ruby gem]] supports both X and Wayland}}<br />
<br />
Then in {{ic|~/.config/fusuma/config.yml}} you have to set something like:<br />
<br />
{{hc|~/.config/fusuma/config.yml|<nowiki><br />
swipe:<br />
3: <br />
left: <br />
sendkey: 'LEFTALT+RIGHT'<br />
right: <br />
sendkey: 'LEFTALT+LEFT'<br />
up: <br />
sendkey: 'LEFTALT+LEFTSHIFT+TAB'<br />
down: <br />
sendkey: 'LEFTALT+TAB'<br />
pinch:<br />
in:<br />
sendkey: 'LEFTALT+LEFTSHIFT+TAB'<br />
out:<br />
sendkey: 'LEFTALT+TAB'<br />
<br />
threshold:<br />
swipe: 0.5<br />
pinch: 0.2<br />
<br />
interval:<br />
swipe: 0.2<br />
pinch: 0.2<br />
</nowiki>}}<br />
<br />
Or for {{ic|xdotool}}: <br />
<br />
{{hc|~/.config/fusuma/config.yml|<nowiki><br />
swipe:<br />
3: <br />
left: <br />
command: 'xdotool key alt+Right'<br />
right: <br />
command: 'xdotool key alt+Left'<br />
up: <br />
command: 'xdotool key ctrl+shift+plus'<br />
down: <br />
command: 'xdotool key ctrl+minus'<br />
pinch:<br />
in:<br />
command: 'xdotool key ctrl+shift+plus'<br />
out:<br />
command: 'xdotool key ctrl+minus'<br />
<br />
threshold:<br />
swipe: 0.5<br />
pinch: 0.2<br />
<br />
interval:<br />
swipe: 0.2<br />
pinch: 0.2<br />
</nowiki>}}<br />
<br />
Same thing for {{ic|ydotool}}.<br />
<br />
The swipe threshold is important for not swiping back too many pages. <br />
<br />
Notice that the configure is for three fingers swipe. Two fingers swipe is not supported [https://github.com/iberianpig/fusuma/issues/104#issuecomment-434742767].<br />
<br />
==== Gebaar ====<br />
<br />
[https://github.com/Coffee2CodeNL/gebaar-libinput Gebaar] is another gesture recognizer.<br />
Unlike Fusuma, it does not support pinching (support is planned in the future though) and thresholds, but in addition to swiping left, right, up and down with 3/4 fingers, it also supports diagonal swipes, which Fusuma does not.<br />
<br />
There is a fork of gebaar at [https://github.com/Osleg/gebaar-libinput Gebaar] which could be installed through {{AUR|gebaar-libinput-git}} which supports pinch gestures and adds additional features to original gebaar. Take in mind that this version is currently under active development and introduces configuration changes which makes it incompatable to original [https://github.com/Coffee2CodeNL/gebaar-libinput Gebaar]<br />
<br />
==== GnomeExtendedGestures ====<br />
<br />
For deeper integration with GNOME, there is [https://github.com/mpiannucci/GnomeExtendedGestures GnomeExtendedGestures] ({{Aur|gnome-shell-extension-extended-gestures-git}}). Three finger horizontal and vertical gestures can be configured to perform gnome-shell actions (such as toggling the application overview or cycling between them).<br />
<br />
=== Scroll with mouse by holding a button ===<br />
<br />
There is a nice trick to optimize scrolling with a mouse or trackball by holding a mouse button (like right or middle button, or some other if the mouse has more buttons) and moving the mouse. Very useful in case your mouse does not have the mouse wheel (often the case with the trackballs). To do that one has to set {{ic|ScrollMethod}} to {{ic|button}} and specify the mouse button in the {{ic|ScrollButton}} option for the action. Here is an example for configuration to achieve that:<br />
<br />
{{hc|/etc/X11/xorg.conf.d/00-mouse.conf|<br />
Section "InputClass"<br />
Identifier "system-mouse"<br />
MatchIsPointer "on"<br />
Option "ScrollMethod" "button"<br />
Option "ScrollButton" "3"<br />
EndSection<br />
}}<br />
<br />
=== Mouse wheel scrolling speed scaling ===<br />
<br />
For some mouses, especially when using on a [[HiDPI]] desktop, the wheel scrolls too slow. A [https://gitlab.freedesktop.org/xorg/driver/xf86-input-libinput/-/merge_requests/12 patch] is submitted to libinput but it has not been accepted. There is a third-party [https://github.com/archlinuxcn/repo/tree/d0eb728b38450b47a4913539193a58fb523cc255/archlinuxcn/xf86-input-libinput-oldherl xf86-input-libinput] that incoperates this patch.<br />
<br />
This patch introduces a new property {{ic|libinput Scroll Distance Scale}} to mouses, and you can set a scaling factor like<br />
<br />
$ xinput --set-prop 'RAPOO Rapoo 2.4G Wireless Device' 'libinput Scroll Distance Scale' 2.5 2.5<br />
<br />
where the {{ic|RAPOO Rapoo 2.4G Wireless Device}} is the name of your mouse device, listed in {{ic|xinput --list}}. {{ic|2.5 2.5}} are the scaling factors, for x- and y-axis, respectively.<br />
<br />
Alternatively, install {{Aur|libinput-multiplier}} and restart [[Xorg]], then enlarge y-axis scroll distance to 6 times by<br />
<br />
$ echo 6 > /tmp/libinput_discrete_deltay_multiplier<br />
<br />
Here is an [https://github.com/tkkcc/libinput_patch#change-with-focused-window example] to modify the scaling factor upon focusing change<br />
<br />
== Troubleshooting ==<br />
<br />
First, see whether executing {{ic|libinput debug-events}} can support you in debugging the problem, see {{man|1|libinput-debug-events}} for options.<br />
<br />
Some inputs require kernel support. The tool ''evemu-describe'' from the {{Pkg|evemu}} package can be used to check: <br />
<br />
Compare the output of [http://ix.io/m6b software supported input trackpad driver] with [https://github.com/whot/evemu-devices/blob/master/touchpads/SynPS2%20Synaptics%20TouchPad-with-scrollbuttons.events a supported trackpad]. i.e. a couple of ABS_ axes, a couple of ABS_MT axes and no REL_X/Y axis. For a clickpad the {{ic|INPUT_PROP_BUTTONPAD}} property should also be set, if it is supported.<br />
<br />
=== Touchpad not working in GNOME ===<br />
<br />
Ensure the touchpad events are being sent to the GNOME desktop by running the following command:<br />
<br />
$ gsettings set org.gnome.desktop.peripherals.touchpad send-events enabled<br />
<br />
Additionally, GNOME may override certain behaviors, like turning off Tapping and forcing Natural Scrolling. In this case the settings must be adapted using GNOMEs {{ic|gsettings}} command line tool or a graphical frontend of your choice. For example if you wish to enable ''Tapping'' and disable ''Natural Scrolling'' for your user, adjust the touchpad key-values like the following:<br />
<br />
$ gsettings set org.gnome.desktop.peripherals.touchpad tap-to-click true<br />
$ gsettings set org.gnome.desktop.peripherals.touchpad natural-scroll false<br />
<br />
=== Inertial scrolling does not work in KDE ===<br />
<br />
The feature is currently not implemented, see [https://bugs.kde.org/show_bug.cgi?id=456383 KDE bug 456383]. As a workaround for Chromium-based browsers, install the [https://chrome.google.com/webstore/detail/smoothscroll/nbokbjkabcmbfdlbddjidfmibcpneigj SmoothScroll] extension.<br />
<br />
== See also ==<br />
<br />
* [https://wayland.freedesktop.org/libinput/doc/latest/index.html libinput Wayland documentation]<br />
* [https://archive.fosdem.org/2015/schedule/event/libinput/attachments/slides/591/export/events/attachments/libinput/slides/591/libinput_xorg.pdf FOSDEM 2015 - libinput] - Hans de Goede on goals and plans of the project<br />
* [https://who-t.blogspot.com.au/ Peter Hutterer's Blog] - numerous posts on libinput from one of the project's hackers<br />
* [https://www.youtube.com/watch?v=HllUoT_WE7Y Talk by the primary libinput maintainer] outlining the history and state (as of 2020) of Linux input device handling<br />
* [https://who-t.blogspot.com/2018/07/why-its-not-good-idea-to-handle-evdev.html Blog post by the libinput maintainer] outlining the rationale for libinput</div>Goetzchttps://wiki.archlinux.org/index.php?title=Libvirt&diff=726169Libvirt2022-04-10T23:53:53Z<p>Goetzc: /* Configuration */ wording</p>
<hr />
<div>{{Lowercase title}}<br />
[[Category:Virtualization]]<br />
[[ja:libvirt]]<br />
[[zh-hans:Libvirt]]<br />
{{Related articles start}}<br />
{{Related|:Category:Hypervisors}}<br />
{{Related|:PCI passthrough via OVMF}}<br />
{{Related articles end}}<br />
<br />
Libvirt is collection of software that provides a convenient way to manage virtual machines and other virtualization functionality, such as storage and network interface management. These software pieces include a long term stable C API, a daemon (libvirtd), and a command line utility (virsh). A primary goal of libvirt is to provide a single way to manage multiple different virtualization providers/hypervisors, such as the [[QEMU|KVM/QEMU]], [[Xen]], [[LXC]], [https://openvz.org OpenVZ] or [[VirtualBox]] [[:Category:Hypervisors|hypervisors]] ([https://libvirt.org/drivers.html among others]).<br />
<br />
Some of the major libvirt features are:<br />
*'''VM management''': Various domain lifecycle operations such as start, stop, pause, save, restore, and migrate. Hotplug operations for many device types including disk and network interfaces, memory, and CPUs.<br />
*'''Remote machine support''': All libvirt functionality is accessible on any machine running the libvirt daemon, including remote machines. A variety of network transports are supported for connecting remotely, with the simplest being SSH, which requires no extra explicit configuration.<br />
*'''Storage management''': Any host running the libvirt daemon can be used to manage various types of storage: create file images of various formats (qcow2, vmdk, raw, ...), mount NFS shares, enumerate existing LVM volume groups, create new LVM volume groups and logical volumes, partition raw disk devices, mount iSCSI shares, and much more.<br />
*'''Network interface management''': Any host running the libvirt daemon can be used to manage physical and logical network interfaces. Enumerate existing interfaces, as well as configure (and create) interfaces, bridges, vlans, and bond devices.<br />
*'''Virtual NAT and Route based networking''': Any host running the libvirt daemon can manage and create virtual networks. Libvirt virtual networks use firewall rules to act as a router, providing VMs transparent access to the host machines network.<br />
<br />
== Installation ==<br />
<br />
{{Warning|The previous versions of this guide encouraged installing {{AUR|ebtables}} package, but the {{pkg|iptables-nft}} package provides ebtables functionality without the need to rely on the AUR. Only use it if you specifically need the legacy Xtables implementation.}}<br />
<br />
Because of its daemon/client architecture, libvirt needs only be installed on the machine which will host the virtualized system. Note that the server and client can be the same physical machine.<br />
<br />
=== Server ===<br />
<br />
[[Install]] the {{pkg|libvirt}} package, as well as at least one hypervisor:<br />
<br />
* The [https://libvirt.org/drvqemu.html libvirt KVM/QEMU driver] is the primary ''libvirt'' driver and if [[QEMU#Enabling_KVM|KVM is enabled]], fully virtualized, hardware accelerated guests will be available. See the [[QEMU]] article for more information.<br />
<br />
* Other [https://libvirt.org/drivers.html supported hypervisors] include [[LXC]], [[VirtualBox]] and [[Xen]]. See the respective articles for installation instructions. With respect to {{ic|libvirtd}} installation note:<br />
** The [https://libvirt.org/drvlxc.html libvirt LXC driver] has no dependency on the [[LXC]] userspace tools provided by {{Pkg|lxc}}, therefore there is no need to install the package if planning on using the driver.<br />
** [[Xen]] support is available, but not by default ({{Bug|27356}}). You need to use the [[ABS]] to modify {{Pkg|libvirt}}'s [[PKGBUILD]] and build it without the {{ic|1=-Ddriver_libxl=disabled}} option.<br />
<br />
For network connectivity, install:<br />
<br />
* {{Pkg|iptables-nft}}, {{Pkg|dnsmasq}} and {{Pkg|dmidecode}} for the [https://wiki.libvirt.org/page/VirtualNetworking#The_default_configuration default] NAT/DHCP networking.<br />
* {{Pkg|bridge-utils}} for bridged networking.<br />
* {{Pkg|openbsd-netcat}} for remote management over [[SSH]].<br />
<br />
{{Note|If you are using [[firewalld]], as of {{ic|libvirt}} 5.1.0 and [[firewalld]] 0.7.0 you no longer need to change the firewall backend to [[iptables]]. {{ic|libvirt}} now installs a zone called 'libvirt' in [[firewalld]] and manages its required network rules there. [https://libvirt.org/firewall.html Firewall and network filtering in libvirt]}}<br />
<br />
=== Client ===<br />
<br />
The client is the user interface that will be used to manage and access the virtual machines.<br />
<br />
* {{App|virsh|Command line program for managing and configuring domains.|https://libvirt.org/|{{Pkg|libvirt}}}}<br />
* {{App|[[Wikipedia:GNOME Boxes|GNOME Boxes]]|Simple GNOME application to access virtual systems.|https://wiki.gnome.org/Apps/Boxes|{{Pkg|gnome-boxes}}}}<br />
* {{App|Libvirt Sandbox|Application sandbox toolkit.|https://sandbox.libvirt.org/|{{AUR|libvirt-sandbox}}}}<br />
* {{App|Remote Viewer|Simple remote display client.|https://virt-manager.org/|{{Pkg|virt-viewer}}}}<br />
* {{App|Qt VirtManager|Qt application for managing virtual machines.|https://github.com/F1ash/qt-virt-manager|{{AUR|qt-virt-manager}}}}<br />
* {{App| [[Virt-Manager]]|Graphically manage KVM, Xen, or LXC via libvirt.|https://virt-manager.org/|{{Pkg|virt-manager}}}}<br />
* {{App|[[Cockpit]]|Web-based system administration tool with plugin to manage virtual machines.|https://cockpit-project.org/|{{Pkg|cockpit-machines}}}}<br />
<br />
A list of libvirt-compatible software can be found [https://libvirt.org/apps.html here].<br />
<br />
== Configuration ==<br />
<br />
For '''''system'''''-level administration (i.e. global settings and image-''volume'' location), libvirt minimally requires [[#Set up authentication|setting up authorization]], and [[#Daemon|starting the daemon]].<br />
<br />
{{Note|For user-'''''session''''' administration, daemon setup and configuration is ''not'' required; however, authorization is limited to local abilities; the front-end will launch a local instance of the '''libvirtd''' daemon.}}<br />
<br />
=== Set up authentication ===<br />
<br />
From [https://libvirt.org/auth.html#ACL_server_config libvirt: Connection authentication]:<br />
:The libvirt daemon allows the administrator to choose the authentication mechanisms used for client connections on each network socket independently. This is primarily controlled via the libvirt daemon master config file in {{ic|/etc/libvirt/libvirtd.conf}}. Each of the libvirt sockets can have its authentication mechanism configured independently. There is currently a choice of {{ic|none}}, {{ic|polkit}} and {{ic|sasl}}.<br />
<br />
==== Using libvirt group ====<br />
<br />
The easiest way to ensure your user has access to libvirt daemon is to add member to {{ic|libvirt}} [[user group]].<br />
<br />
Members of the {{ic|libvirt}} group have passwordless access to the RW daemon socket by default.<br />
<br />
==== Using polkit ====<br />
<br />
Because {{Pkg|libvirt}} pulls {{Pkg|polkit}} as a dependency during installation, [[#Using polkit|polkit]] is used as the default value for the {{ic|unix_sock_auth}} parameter ([https://libvirt.org/auth.html#ACL_server_polkit source]). [[#Authenticate with file-based permissions|File-based permissions]] remain nevertheless available.<br />
<br />
{{Note|A system reboot may be required before authenticating with {{ic|polkit}} works correctly.}}<br />
<br />
The ''libvirt'' daemon provides two [[Polkit#Actions|polkit actions]] in {{ic|/usr/share/polkit-1/actions/org.libvirt.unix.policy}}:<br />
<br />
* {{ic|org.libvirt.unix.manage}} for full management access (RW daemon socket), and<br />
* {{ic|org.libvirt.unix.monitor}} for monitoring only access (read-only socket).<br />
<br />
The default policy for the RW daemon socket will require to authenticate as an admin. This is akin to [[sudo]] auth, but does not require that the client application ultimately run as root. Default policy will still allow any application to connect to the RO socket.<br />
<br />
Arch defaults to consider anybody in the {{ic|wheel}} group as an administrator: this is defined in {{ic|/usr/share/polkit-1/rules.d/50-default.rules}} (see [[Polkit#Administrator identities]]). Therefore there is no need to create a new group and rule file '''if your user is a member of the {{ic|wheel}} group''': upon connection to the RW socket (e.g. via {{Pkg|virt-manager}}) you will be prompted for your user's password.<br />
<br />
{{Note|Prompting for a password relies on the presence of an [[Polkit#Authentication_agents|authentication agent]] on the system. Console users may face an issue with the default {{ic|pkttyagent}} agent which may or may not work properly.}}<br />
<br />
{{Tip|If you want to configure passwordless authentication, see [[Polkit#Bypass password prompt]].}}<br />
<br />
You may change the group authorized to access the RW daemon socket. As an example, to authorize the {{ic|mykvm}} group, create the following file:<br />
<br />
{{hc|/etc/polkit-1/rules.d/50-libvirt.rules|<nowiki><br />
/* Allow users in mykvm group to manage the libvirt<br />
daemon without authentication */<br />
polkit.addRule(function(action, subject) {<br />
if (action.id == "org.libvirt.unix.manage" &&<br />
subject.isInGroup("mykvm")) {<br />
return polkit.Result.YES;<br />
}<br />
});</nowiki><br />
}}<br />
<br />
Then [[Users_and_groups#Other_examples_of_user_management|add yourself]] to the {{ic|mykvm}} group and relogin. Replace ''mykvm'' with any group of your preference just make sure it exists and that your user is a member of it (see [[Users and groups]] for more information).<br />
<br />
Do not forget to relogin for group changes to take effect.<br />
<br />
==== Authenticate with file-based permissions ====<br />
<br />
To define file-based permissions for users in the ''libvirt'' group to manage virtual machines, uncomment and define:<br />
<br />
{{hc|/etc/libvirt/libvirtd.conf|<nowiki><br />
#unix_sock_group = "libvirt"<br />
#unix_sock_ro_perms = "0777" # set to 0770 to deny non-group libvirt users<br />
#unix_sock_rw_perms = "0770"<br />
#auth_unix_ro = "none"<br />
#auth_unix_rw = "none"<br />
</nowiki>}}<br />
<br />
While some guides mention changed permissions of certain libvirt directories to ease management, keep in mind permissions are lost on package update. To edit these system directories, root user is expected.<br />
<br />
=== Daemon ===<br />
<br />
[[Start]] both {{ic|libvirtd.service}} and {{ic|virtlogd.service}}. Optionally [[enable]] {{ic|libvirtd.service}} (which will also enable {{ic|virtlogd.socket}} and {{ic|virtlockd.socket}} [[Systemd#Using_units|units]], so there is NO need to also enable {{ic|virtlogd.service}}).<br />
<br />
=== Unencrypt TCP/IP sockets ===<br />
<br />
{{Warning|This method is used to help remote domain, connection speed for trusted networks. This is the least secure connection method. This should ''only'' be used for testing or use over a secure, private, and trusted network. SASL is not enabled here, so all TCP traffic is ''cleartext''. For real world use ''always'' enable SASL.}}<br />
<br />
Edit {{ic|/etc/libvirt/libvirtd.conf}}:<br />
{{hc|/etc/libvirt/libvirtd.conf|<nowiki><br />
listen_tls = 0<br />
listen_tcp = 1<br />
auth_tcp="none"<br />
</nowiki>}}<br />
<br />
It is also necessary to start the server in listening mode by editing {{ic|/etc/conf.d/libvirtd}}:<br />
<br />
{{hc|/etc/conf.d/libvirtd|2=LIBVIRTD_ARGS="--listen"}}<br />
<br />
=== Access virtual machines using their hostnames ===<br />
<br />
For host access to guests on non-isolated, bridged networks, enable the {{ic|libvirt}} NSS module provided by {{Pkg|libvirt}}.<br />
<br />
Edit {{ic|/etc/nsswitch.conf}}:<br />
{{hc|/etc/nsswitch.conf|<nowiki><br />
hosts: files libvirt libvirt_guest dns myhostname<br />
</nowiki>}}<br />
<br />
{{Note|While commands such as {{ic|ping}} and {{ic|ssh}} should work with virtual machine hostnames, commands such as {{ic|host}} and {{ic|nslookup}} may fail or produce unexpected results because they rely on DNS. Use {{ic|getent hosts <vm-hostname>}} instead.}}<br />
<br />
== Test ==<br />
<br />
To test if libvirt is working properly on a ''system'' level:<br />
<br />
$ virsh -c qemu:///system<br />
<br />
To test if libvirt is working properly for a user-''session'':<br />
<br />
$ virsh -c qemu:///session<br />
<br />
== Management ==<br />
<br />
Libvirt management is done mostly with three tools: {{Pkg|virt-manager}} (GUI), {{ic|virsh}}, and {{ic|guestfish}} (which is part of {{Pkg|libguestfs}}).<br />
<br />
=== virsh ===<br />
<br />
The virsh program is for managing guest ''domains'' (virtual machines) and works well for scripting, virtualization administration. Though most virsh commands require root privileges to run due to the communication channels used to talk to the hypervisor, typical management, creation, and running of domains (like that done with VirtualBox) can be done as a regular user.<br />
<br />
Virsh includes an interactive terminal that can be entered if no commands are passed (options are allowed though): {{ic|virsh}}. The interactive terminal has support for tab completion.<br />
<br />
From the command line:<br />
<br />
$ virsh [option] <command> [argument]...<br />
<br />
From the interactive terminal:<br />
<br />
virsh # <command> [argument]...<br />
<br />
Help is available:<br />
<br />
$ virsh help [option*] or [group-keyword*]<br />
<br />
=== Storage pools ===<br />
<br />
A pool is a location where storage ''volumes'' can be kept. What libvirt defines as ''volumes'' others may define as "virtual disks" or "virtual machine images". Pool locations may be a directory, a network filesystem, or partition (this includes a [[LVM]]). Pools can be toggled active or inactive and allocated for space.<br />
<br />
On the ''system''-level, {{ic|/var/lib/libvirt/images/}} will be activated by default; on a user-''session'', {{ic|virt-manager}} creates {{ic|$HOME/VirtualMachines}}.<br />
<br />
Print active and inactive storage pools:<br />
<br />
$ virsh pool-list --all<br />
<br />
==== Create a new pool using virsh ====<br />
<br />
If one wanted to ''add'' a storage pool, here are examples of the command form, adding a directory, and adding a LVM volume:<br />
<br />
$ virsh pool-define-as name type [source-host] [source-path] [source-dev] [source-name] [<target>] [--source-format format]<br />
$ virsh pool-define-as ''poolname'' dir - - - - /home/''username''/.local/libvirt/images<br />
$ virsh pool-define-as ''poolname'' fs - - ''/dev/vg0/images'' - ''mntpoint''<br />
<br />
The above command defines the information for the pool, to build it:<br />
<br />
$ virsh pool-build ''poolname''<br />
$ virsh pool-start ''poolname''<br />
$ virsh pool-autostart ''poolname''<br />
<br />
To remove it:<br />
<br />
$ virsh pool-undefine ''poolname''<br />
<br />
{{Tip|For LVM storage pools:<br />
* It is a good practice to dedicate a volume group to the storage pool only.<br />
* Choose a LVM volume group that differs from the pool name, otherwise when the storage pool is deleted the LVM group will be too.<br />
}}<br />
<br />
==== Create a new pool using virt-manager ====<br />
<br />
First, connect to a hypervisor (e.g. QEMU/KVM ''system'', or user-''session''). Then, right-click on a connection and select ''Details''; select the ''Storage'' tab, push the ''+'' button on the lower-left, and follow the wizard.<br />
<br />
=== Storage volumes ===<br />
<br />
Once the pool has been created, volumes can be created inside the pool. ''If building a new domain (virtual machine), this step can be skipped as a volume can be created in the domain creation process.''<br />
<br />
==== Create a new volume with virsh ====<br />
<br />
Create volume, list volumes, resize, and delete:<br />
$ virsh vol-create-as ''poolname'' ''volumename'' 10GiB --format aw|bochs|raw|qcow|qcow2|vmdk<br />
$ virsh vol-upload --pool ''poolname'' ''volumename'' ''volumepath''<br />
$ virsh vol-list ''poolname''<br />
$ virsh vol-resize --pool ''poolname'' ''volumename'' 12GiB<br />
$ virsh vol-delete --pool ''poolname'' ''volumename''<br />
$ virsh vol-dumpxml --pool ''poolname'' ''volumename'' # for details.<br />
<br />
=== Domains ===<br />
<br />
Virtual machines are called ''domains''. If working from the command line, use {{ic|virsh}} to list, create, pause, shutdown domains, etc. {{ic|virt-viewer}} can be used to view domains started with {{ic|virsh}}. Creation of domains is typically done either graphically with {{ic|virt-manager}} or with {{ic|virt-install}} (a command line program installed as part of the {{pkg|virt-install}} package).<br />
<br />
Creating a new domain typically involves using some installation media, such as an {{ic|.iso}} from the storage pool or an optical drive.<br />
<br />
Print active and inactive domains:<br />
<br />
# virsh list --all<br />
<br />
{{note|[[SELinux]] has a built-in exemption for libvirt that allows volumes in {{ic|/var/lib/libvirt/images/}} to be accessed. If using SELinux and there are issues with the volumes, ensure that volumes are in that directory, or ensure that other storage pools are correctly labeled.}}<br />
<br />
==== Create a new domain using virt-install ====<br />
<br />
{{Accuracy|{{ic|/usr/share/libosinfo}} is not provided by any official packages, including {{Pkg|libosinfo}}.|section=Where_is_'/usr/share/libosinfo/db/oses/os.xml'?}}<br />
<br />
For an extremely detailed domain (virtual machine) setup, it is easier to [[#Create a new domain using virt-manager]]. However, basics can easily be done with {{ic|virt-install}} and still run quite well. Minimum specifications are {{ic|--name}}, {{ic|--memory}}, guest storage ({{ic|--disk}}, {{ic|--filesystem}}, or {{ic|--nodisks}}), and an install method (generally an {{ic|.iso}} or CD). See {{man|1|virt-install}} for more details and information about unlisted options.<br />
<br />
Arch Linux install (two GiB, qcow2 format volume create; user-networking):<br />
<br />
$ virt-install \<br />
--name arch-linux_testing \<br />
--memory 1024 \<br />
--vcpus=2,maxvcpus=4 \<br />
--cpu host \<br />
--cdrom $HOME/Downloads/arch-linux_install.iso \<br />
--disk size=2,format=qcow2 \<br />
--network user \<br />
--virt-type kvm<br />
<br />
Fedora testing (Xen hypervisor, non-default pool, do not originally view):<br />
<br />
$ virt-install \<br />
--connect xen:/// \<br />
--name fedora-testing \<br />
--memory 2048 \<br />
--vcpus=2 \<br />
--cpu=host \<br />
--cdrom /tmp/fedora20_x84-64.iso \<br />
--os-type=linux --os-variant=fedora20 \<br />
--disk pool=testing,size=4 \<br />
--network bridge=br0 \<br />
--graphics=vnc \<br />
--noautoconsole<br />
$ virt-viewer --connect xen:/// fedora-testing<br />
<br />
Windows:<br />
<br />
$ virt-install \<br />
--name=windows7 \<br />
--memory 2048 \<br />
--cdrom /dev/sr0 \<br />
--os-variant=win7 \<br />
--disk /mnt/storage/domains/windows7.qcow2,size=20GiB \<br />
--network network=vm-net \<br />
--graphics spice<br />
<br />
{{Tip|Run {{ic|1=osinfo-query --fields=name,short-id,version os}} to get argument for {{ic|--os-variant}}; this will help define some specifications for the domain. However, {{ic|--memory}} and {{ic|--disk}} will need to be entered; one can look within the appropriate {{ic|/usr/share/libosinfo/db/oses/''os''.xml}} if needing these specifications. After installing, it will likely be preferable to install the [https://www.spice-space.org/download.html Spice Guest Tools] that include the [https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Virtualization_Host_Configuration_and_Guest_Installation_Guide/form-Virtualization_Host_Configuration_and_Guest_Installation_Guide-Para_virtualized_drivers-Mounting_the_image_with_virt_manager.html VirtIO drivers]. For a Windows VirtIO network driver there is also {{Aur|virtio-win}}. These drivers are referenced by a {{ic|1=<model type='virtio' />}} in the guest's {{ic|.xml}} configuration section for the device. A bit more information can also be found on the [[QEMU#Preparing_a_Windows_guest|QEMU article]].}}<br />
<br />
Import existing volume:<br />
<br />
$ virt-install \<br />
--name demo \<br />
--memory 512 \<br />
--disk /home/user/VMs/mydisk.img \<br />
--import<br />
<br />
==== Create a new domain using virt-manager ====<br />
<br />
First, connect to the hypervisor (e.g. QEMU/KVM ''system'' or user ''session''), right click on a connection and select ''New'', and follow the wizard.<br />
<br />
* On the ''fourth step'', de-selecting ''Allocate entire disk now'' will make setup quicker and can save disk space in the interum; ''however'', it may cause volume fragmentation over time.<br />
* On the ''fifth step'', open ''Advanced options'' and make sure that ''Virt Type'' is set to ''kvm'' (this is usually the preferred method). If additional hardware setup is required, select the ''Customize configuration before install'' option.<br />
<br />
==== Manage a domain ====<br />
<br />
Start a domain:<br />
<br />
$ virsh start ''domain''<br />
$ virt-viewer --connect qemu:///session ''domain''<br />
<br />
Gracefully attempt to shutdown a domain; force off a domain:<br />
<br />
$ virsh shutdown ''domain''<br />
$ virsh destroy ''domain''<br />
<br />
Autostart domain on libvirtd start:<br />
<br />
$ virsh autostart ''domain''<br />
$ virsh autostart ''domain'' --disable<br />
<br />
Shutdown domain on host shutdown:<br />
<br />
: Running domains can be automatically suspended/shutdown at host shutdown using the {{ic|libvirt-guests.service}} systemd service. This same service will resume/startup the suspended/shutdown domain automatically at host startup. Read {{ic|/etc/conf.d/libvirt-guests}} for service options.<br />
<br />
Edit a domain's XML configuration:<br />
<br />
$ virsh edit ''domain''<br />
<br />
{{note|Virtual Machines started directly by QEMU are not manageable by libvirt tools.}}<br />
<br />
=== Networks ===<br />
<br />
A [https://jamielinux.com/docs/libvirt-networking-handbook/ decent overview of libvirt networking].<br />
<br />
Four network types exist that can be created to connect a domain to:<br />
<br />
* bridge — a virtual device; shares data directly with a physical interface. Use this if the host has ''static'' networking, it does not need to connect other domains, the domain requires full inbound and outbound trafficking, and the domain is running on a ''system''-level. See [[Network bridge]] on how to add a bridge. After creation, it needs to be specified in the respective guest's {{ic|.xml}} configuration file.<br />
* network — a virtual network; has ability to share with other domains. Libvirt offers many virtual network modes, such as NAT mode (Network address translation), routed mode and isolated mode. Using a virtual network is particularly indicated if the host has ''dynamic'' networking (e.g. NetworkManager), or using wireless.<br />
* macvtap — connect directly to a host physical interface.<br />
* user — local ability networking. Use this only for a user ''session''.<br />
<br />
{{ic|virsh}} has the ability to create networking with numerous options for most users, however, it is easier to create network connectivity with a graphic user interface (like {{ic|virt-manager}}), or to do so on [[#Create a new domain using virt-install|creation with virt-install]].<br />
<br />
{{note|libvirt handles DHCP and DNS with {{pkg|dnsmasq}}, launching a separate instance for every virtual network. It also adds iptables rules for proper routing, and enables the {{ic|ip_forward}} kernel parameter. This also means that having dnsmasq running on the host system is not necessary to support libvirt requirements (and could interfere with libvirt dnsmasq instances).}}<br />
{{note|If the default network cannot be started, make sure {{pkg|iptables-nft}} and {{pkg|dnsmasq}} are installed.}}<br />
<br />
You could get VM ip address via (in case it connected to {{ic|''default''}} network and receives IP address via dhcp):<br />
<br />
$ virsh net-dhcp-leases default<br />
<br />
command (replacing {{ic|''default''}} with network name VM connected to), or if VM has {{ic|''qemu-guest-agent''}} running via:<br />
<br />
$ virsh domifaddr --source agent $vm<br />
<br />
replacing {{ic|''$vm''}} with actual virtual machine name (or domain id).<br />
<br />
==== IPv6 ====<br />
<br />
When adding an IPv6 address through any of the configuration tools, you will likely receive the following error:<br />
Check the host setup: enabling IPv6 forwarding with RA routes without accept_ra set to 2 is likely to cause routes loss. Interfaces to look at: ''eth0''<br />
<br />
Fix this by running the following command (replace {{ic|''eth0''}} with the name of your physical interface):<br />
<br />
# sysctl net.ipv6.conf.eth0.accept_ra=2<br />
<br />
=== Snapshots ===<br />
<br />
Snapshots take the disk, memory, and device state of a domain at a point-of-time, and save it for future use. They have many uses, from saving a "clean" copy of an OS image to saving a domain's state before a potentially destructive operation. Snapshots are identified with a unique name.<br />
<br />
Snapshots are saved within the volume itself and the volume must be the format: qcow2 or raw. Snapshots use deltas in order not to take as much space as a full copy would.<br />
<br />
==== Create a snapshot ====<br />
<br />
{{Out of date|Some of this data appears to be dated.}}<br />
<br />
Once a snapshot is taken it is saved as a new block device and the original snapshot is taken offline. Snapshots can be chosen from and also merged into another (even without shutting down the domain).<br />
<br />
Print a running domain's volumes (running domains can be printed with {{ic|virsh list}}):<br />
<br />
{{hc|# virsh domblklist ''domain''|<nowiki><br />
Target Source<br />
------------------------------------------------<br />
vda /vms/domain.img<br />
</nowiki>}}<br />
<br />
To see a volume's physical properties:<br />
<br />
{{hc|# qemu-img info /vms/domain.img|<nowiki><br />
image: /vms/domain.img<br />
file format: qcow2<br />
virtual size: 50G (53687091200 bytes)<br />
disk size: 2.1G<br />
cluster_size: 65536<br />
</nowiki>}}<br />
<br />
Create a disk-only snapshot (the option {{ic|--atomic}} will prevent the volume from being modified if snapshot creation fails):<br />
<br />
# virsh snapshot-create-as ''domain'' snapshot1 --disk-only --atomic<br />
<br />
List snapshots:<br />
<br />
{{hc|# virsh snapshot-list ''domain''|<nowiki><br />
Name Creation Time State<br />
------------------------------------------------------------<br />
snapshot1 2012-10-21 17:12:57 -0700 disk-snapshot<br />
</nowiki>}}<br />
<br />
One can then copy the original image with {{ic|1=cp --sparse=true}} or {{ic|rsync -S}} and then merge the the original back into snapshot:<br />
<br />
# virsh blockpull --domain ''domain'' --path /vms/''domain''.snapshot1<br />
<br />
{{ic|domain.snapshot1}} becomes a new volume. After this is done the original volume ({{ic|domain.img}} and snapshot metadata can be deleted. The {{ic|virsh blockcommit}} would work opposite to {{ic|blockpull}} but it seems to be currently under development (including {{ic|snapshot-revert feature}}, scheduled to be released sometime next year.<br />
<br />
=== Other management ===<br />
<br />
Connect to non-default hypervisor:<br />
<br />
$ virsh --connect xen:///<br />
virsh # uri<br />
xen:///<br />
<br />
Connect to the QEMU hypervisor over SSH; and the same with logging:<br />
<br />
$ virsh --connect qemu+ssh://''username''@''host''/system<br />
$ LIBVIRT_DEBUG=1 virsh --connect qemu+ssh://''username''@''host''/system<br />
<br />
Connect a graphic console over SSH:<br />
<br />
$ virt-viewer --connect qemu+ssh://''username''@''host''/system ''domain''<br />
$ virt-manager --connect qemu+ssh://''username''@''host''/system ''domain''<br />
<br />
{{Note|If you are having problems connecting to a remote RHEL server (or anything other than Arch, really), try the two workarounds mentioned in {{bug|30748}} and {{bug|22068}}.}}<br />
<br />
Connect to the VirtualBox hypervisor (''VirtualBox support in libvirt is not stable yet and may cause libvirtd to crash''):<br />
<br />
$ virsh --connect vbox:///system<br />
<br />
Network configurations:<br />
<br />
$ virsh -c qemu:///system net-list --all<br />
$ virsh -c qemu:///system net-dumpxml default<br />
<br />
== Hooks ==<br />
Hooks are scripts that are triggered by different events happening while starting and running the libvirt daemon.<br />
They can be used to execute commands needed in preparation to launch a guest like setup networks or reserve memory.<br />
<br />
The following hooks exists:<br />
<br />
* daemon - occasions to trigger: start, shutdown, reload<br />
* qemu - occasions to trigger: prepare, prepare, start, started, stopped, release, migrate, restore, reconnect, attach<br />
* lxc - occasions to trigger: prepare, start, started, stopped, release, reconnect<br />
* libxl - occasions to trigger: prepare, start, started, stopped, release migrate, reconnect<br />
* network - occasions to trigger: start, started, stopped, port-created, updated, port-deleted<br />
<br />
See [https://www.libvirt.org/hooks.html the libvirt Dokumentation] for details about each hook and trigger.<br />
<br />
=== Create a hook ===<br />
<br />
Hooks are represented by scripts located at {{ic|1=/etc/libvirt/hooks}}. If the folder does not exist, you have to create it.<br />
Each hook is represented by a script in this folder with the same name (e.g. {{ic|1=/etc/libvirt/hooks/qemu}}) or a subfolder (e.g. {{ic|1=/etc/libvirt/hooks/qemu.d/}}). The later can contain different scripts, which are all run at the trigger points. The scripts are run like any other scripts, so they need to start whith the declaration of the command interpreter to use (e.g. {{ic|1=#!/bin/bash}}).<br />
The script have to be executable by the libvirt user ({{ic|1=chown +x /etc/libvirt/hooks/qemu}}).<br />
<br />
Everytime a trigger point is met, the script is run. For example, the daemon script would run at least two times in a start/stop cycle of the system, at start and at shutdown. To run an command only at a given point, you have to implement conditions in the script. To do this, libvirt passes parameters which can be used to identify the current trigger condition.<br />
<br />
According to the libvirt documentation these parameters are defined as follows:<br />
* Parameter 1: The name of the object involved in the operation<br />
* Parameter 2: The name of the operation being performed<br />
* Parameter 3: Used if a sub-operation is to be named<br />
* Parameter 4: An extra argument if needed<br />
If one of the arguments is not applicable, a dash is passed.<br />
<br />
{{Note|If the hooks are not working after creating your script, try restarting the libvirt daemon.}}<br />
<br />
==== Example ====<br />
<br />
To run an command everytime you start an qemu guest, before any ressources are allocated, you can use the qemu hook. At this point, libvirt runs the hooks like this: {{ic|1=/etc/libvirt/hooks/qemu <guest_name> prepare begin -}}<br />
The script for this could like this:<br />
<br />
{{hc|/etc/libvirt/hooks/qemu|2=<br />
#!/bin/bash<br />
guest_name="$1"<br />
libvirt_task="$2"<br />
if [ "$libvirt_task" = "prepare" ]; then<br />
<run some important code here><br />
fi<br />
}}<br />
<br />
If the guest is stopped, the same script would be run, but this time the daemon would start the command like this: {{ic|1=/etc/libvirt/hooks/qemu <guest_name> stopped end -}}<br />
<br />
== Sharing data between host and guest ==<br />
<br />
=== Virtio-FS ===<br />
<br />
{{Note|Virtio-FS is not supported in QEMU/KVM user sessions.}}<br />
<br />
The description here will use hugepages to enable the usage of shared folders. [https://libvirt.org/kbase/virtiofs.html Sharing files with Virtio-FS] lists an overview of the supported options to enable filesharing with the guest.<br />
<br />
First you need to [[KVM#Enabling huge pages|enable hugepages]] which are used by the virtual machine:<br />
<br />
{{hc|/etc/sysctl.d/40-hugepage.conf|2=<br />
vm.nr_hugepages = ''nr_hugepages''<br />
}}<br />
<br />
To determine the number of hugepages needed check the size of the hugepages:<br />
<br />
$ grep Hugepagesize /proc/meminfo<br />
<br />
The number of hugepages is ''memory size of virtual machine / Hugepagesize''. Add to this value some additional pages. You have to reboot after this step, so that the hugepages are allocated.<br />
<br />
Now you have to prepare the configuration of the virtual machine:<br />
<br />
{{hc|# virsh edit ''name_of_virtual_machine''|<nowiki><br />
<domain><br />
...<br />
<memoryBacking><br />
<hugepages/><br />
</memoryBacking><br />
...<br />
<cpu ...><br />
<numa><br />
<cell memory='memory size of virtual machine' unit='KiB' memAccess='shared'/><br />
</numa><br />
</cpu><br />
...<br />
<filesystem type='mount' accessmode='passthrough'><br />
<driver type='virtiofs'/><br />
<source dir='path to source folder on host'/><br />
<target dir='mount_tag'/><br />
</filesystem><br />
...<br />
</devices><br />
</domain><br />
</nowiki>}}<br />
<br />
It is necessary to add the NUMA definition so that the memory access can be declared as shared. id and cpus values for NUMA will be inserted by virsh.<br />
<br />
It should now be possible to mount the folder in the shared machine:<br />
<br />
# mount -t virtiofs ''mount_tag'' /mnt/mount/path<br />
<br />
Add the following [[fstab]] entry to mount the folder automatically at boot:<br />
<br />
{{hc|/etc/fstab|2=<br />
...<br />
''mount_tag'' /mnt/mount/path virtiofs rw,noatime,_netdev 0 0<br />
}}<br />
<br />
=== 9p ===<br />
<br />
File system directories can be shared using the [[Wikipedia:9P (protocol)|9P protocol]]. Details are available in [https://wiki.qemu.org/Documentation/9psetup QEMU's documentation of 9psetup].<br />
<br />
Configure the virtual machine as follows:<br />
<br />
{{bc|1=<br />
<domain><br />
...<br />
<devices><br />
...<br />
<filesystem type="mount" accessmode="mapped"><br />
<source dir="''/path/on/host''"/><br />
<target dir="''mount_tag''"/><br />
</filesystem><br />
</devices><br />
</domain><br />
}}<br />
<br />
Boot the guest and [[mount]] the shared directory from it using:<br />
<br />
# mount -t 9p -o trans=virtio,version=9p2000.L ''mount_tag'' ''/path/to/mount_point/on/guest''<br />
<br />
See https://www.kernel.org/doc/html/latest/filesystems/9p.html for more mount options.<br />
<br />
To mount it at boot, add it to the guest's [[fstab]]:<br />
<br />
{{hc|/etc/fstab|2=<br />
...<br />
''mount_tag'' ''/path/to/mount_point/on/guest'' 9p trans=virtio,version=9p2000.L 0 0<br />
}}<br />
<br />
The module for the 9p transport (i.e. {{ic|9pnet_virtio}} for {{ic|1=trans=virtio}}) will not be automatically loaded, so mounting the file system from {{ic|/etc/fstab}} will fail and you will encounter an error like {{ic|9pnet: Could not find request transport: virtio}}. The solution is to [[Kernel module#Automatic module loading with systemd|preload the module durring boot]]:<br />
<br />
{{hc|/etc/modules-load.d/9pnet_virtio.conf|<br />
9pnet_virtio<br />
}}<br />
<br />
=== Samba / SMB ===<br />
<br />
An other easy way to share data between guest and host is to use the smb protocol. While performance and latency may not be as good as in the other described ways, its sufficient for simple tasks like transfering simple files like images or documents from and to the guest.<br />
<br />
The smb server can be set up directly on either the host, or the guest, for example using [[Samba#Server|Samba]], eliminating the need for a dedicated file server. Windows guests have the ability to create smb shares included right after installation ([https://support.microsoft.com/en-us/windows/file-sharing-over-a-network-in-windows-10-b58704b2-f53a-4b82-7bc1-80f9994725bf Microsoft Supportpage]).<br />
<br />
One possible way to access the share under linux (either from the host, or from the guest, depending, where you have installed your server) is to create an entry in your fstab. The {{Pkg|samba}} package is required.<br />
{{hc|/etc/fstab|2=#Accessing a samba share on my vm from the host<br />
//my_vm/my_share /home/archuser/my_vm cifs _netdev,noauto,nofail,user,credentials=/home/archuser/.config/my_vm.key,gid=1000,uid=984 0 0}}<br />
<br />
{{ic|1=_netdev,noauto,nofail}} ensures that the share is only mounted when needed without causing issues if the vm is not booted. {{ic|1=user,credentials=/home/user/.config/my_vm.key,gid=1000,uid=984}} gives you the ability to mount the share on the fly while first accessing it, [[Samba#Storing_share_passwords|without needing a password]].<br />
<br />
== UEFI support ==<br />
<br />
Libvirt can support UEFI virtual machines through QEMU and [https://github.com/tianocore/edk2 OVMF].<br />
<br />
Install the {{Pkg|edk2-ovmf}} package.<br />
<br />
[[Restart]] {{ic|libvirtd}}.<br />
<br />
Now you are ready to create a UEFI virtual machine. Create a new virtual machine through {{Pkg|virt-manager}}. When you get to the final page of the 'New VM' wizard, do the following:<br />
<br />
* Click 'Customize before install', then select 'Finish'<br />
* On the 'Overview' screen, Change the 'Firmware' field to select the 'UEFI x86_64' option.<br />
* Click 'Begin Installation'<br />
* The boot screen you will see should use linuxefi commands to boot the installer, and you should be able to run efibootmgr inside that system, to verify that you are running an UEFI OS.<br />
<br />
See [[Fedora:Using UEFI with QEMU]] for more information.<br />
<br />
== Tips and tricks ==<br />
<br />
=== Python connectivity code ===<br />
<br />
The {{Pkg|libvirt-python}} package provides a Python API in {{ic|/usr/lib/python3.x/site-packages/libvirt.py}}.<br />
<br />
General examples are given in {{ic|/usr/share/doc/libvirt-python-''your_libvirt_version''/examples/}}<br />
<br />
Unofficial example using {{Pkg|qemu}} and {{Pkg|openssh}}:<br />
<br />
{{bc|<nowiki><br />
#! /usr/bin/env python3<br />
import socket<br />
import sys<br />
import libvirt<br />
<br />
conn = libvirt.open("qemu+ssh://xxx/system")<br />
print("Trying to find node on xxx")<br />
domains = conn.listDomainsID()<br />
for domainID in domains:<br />
domConnect = conn.lookupByID(domainID)<br />
if domConnect.name() == 'xxx-node':<br />
print("Found shared node on xxx with ID {}".format(domainID))<br />
domServ = domConnect<br />
break<br />
</nowiki>}}<br />
<br />
=== Advanced Format 4K native disk ===<br />
<br />
To turn a disk into an [[Advanced Format]] 4Kn disk, both its physical and logical sector size needs to be set to 4 KiB. For virtio-blk and virtio-scsi this can be done by setting the {{ic|logical_block_size}} and {{ic|physical_block_size}} options with the [https://libvirt.org/formatdomain.html#hard-drives-floppy-disks-cdroms the <blockio> element]. For example:<br />
<br />
{{hc|# virsh edit ''name_of_virtual_machine''|2=<br />
<domain><br />
...<br />
<devices><br />
...<br />
<disk type='file' device='disk'><br />
..<br />
'''<blockio logical_block_size='4096' physical_block_size='4096'/>'''<br />
</disk><br />
...<br />
</devices><br />
</domain><br />
}}<br />
<br />
== Troubleshooting ==<br />
<br />
=== PulseAudio on system instance ===<br />
<br />
The PulseAudio daemon normally runs under your regular user account, and will only accept connections from the same user. This can be a problem if QEMU is being run as root through libvirt. To run QEMU as a regular user, edit {{ic|/etc/libvirt/qemu.conf}} and set the {{ic|user}} option to your username.<br />
<br />
user = "dave"<br />
<br />
You will also need to tell QEMU to use the PulseAudio backend and identify the server to connect to. Add the following section to your domain configuration using {{ic|virsh edit}}.<br />
<br />
<audio id="1" type="pulseaudio" serverName="/run/user/1000/pulse/native"><br />
<input latency="20000"/><br />
<output latency="20000"/><br />
</audio><br />
<br />
{{ic|1000}} is your user id. Change it if necessary.<br />
<br />
You can omit the latency settings (in microseconds) but using the defaults might result in crackling.<br />
<br />
=== Hypervisor CPU use ===<br />
<br />
Default VM configuration generated by virt-manager may cause rather high (10-20%) CPU use caused by the QEMU process.<br />
If you plan to run the VM in headless mode, consider removing some of the unnecessary devices.<br />
<br />
=== VM can't be unpaused on virt-manager ===<br />
<br />
If you see I/O related errors, maybe the host partition where the virtual disk image is is full. My images are at {{ic|/var/lib/libvirt/images/}} and I reserved only 100 GB to my {{ic|/}} partition. Thus I knew it was full and had no space for the VM to grow after running<br />
<br />
$ df -h<br />
<br />
I had over 30 GB of cached packages, so [[Pacman#Cleaning_the_package_cache|cleaning]] it up helped mitigate the issue. Be aware that qcow2 images grow over time, so if it once fit in the partition, after a while this may no longer be true.<br />
<br />
=== Redirect USB Device is greyed out in virt-manager ===<br />
<br />
If the ''Redirect USB Device'' menu item is greyed out, check that the following hardware is configured for the VM:<br />
<br />
* A USB Controller.<br />
* One or more USB Redirectors.<br />
<br />
== See also ==<br />
<br />
* [https://libvirt.org/drvqemu.html Official libvirt web site]<br />
* [https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/Virtualization_Deployment_and_Administration_Guide/index.html Red Hat Virtualization Deployment and Administration Guide]<br />
* [https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/Virtualization_Tuning_and_Optimization_Guide/index.html Red Hat Virtualization Tuning and Optimization Guide]<br />
* [https://docs.slackware.com/howtos:general_admin:kvm_libvirt Slackware KVM and libvirt]<br />
* [https://www-01.ibm.com/support/knowledgecenter/linuxonibm/liaat/liaatkvm.htm IBM KVM]<br />
* [https://jamielinux.com/docs/libvirt-networking-handbook/ libvirt Networking Handbook]</div>Goetzchttps://wiki.archlinux.org/index.php?title=Java&diff=721749Java2022-03-06T16:48:49Z<p>Goetzc: /* HiDPI */ add subsection</p>
<hr />
<div>[[Category:Programming languages]]<br />
[[Category:Oracle]]<br />
[[de:Java]]<br />
[[fa:Java]]<br />
[[ja:Java]]<br />
[[pt:Java]]<br />
[[ru:Java]]<br />
[[zh-hans:Java]]<br />
{{Related articles start}}<br />
{{Related|Java Package Guidelines}}<br />
{{Related|Java Runtime Environment fonts}}<br />
{{Related articles end}}<br />
<br />
From the [[Wikipedia:Java (programming language)|Wikipedia article]]:<br />
<br />
:Java is a programming language originally developed by Sun Microsystems and released in 1995 as a core component of Sun Microsystems' Java platform. The language derives much of its syntax from C and C++ but has a simpler object model and fewer low-level facilities. Java applications are typically compiled to bytecode that can run on any Java virtual machine ([[Wikipedia:Java virtual machine|JVM]]) regardless of computer architecture.<br />
<br />
Arch Linux officially supports the open source [https://openjdk.java.net/ OpenJDK] versions 8, 11 and 17. All these JVM can be installed without conflict and switched between using helper script {{ic|archlinux-java}}. Several other Java environments are available in [[AUR]] but are not officially supported.<br />
<br />
== Installation ==<br />
<br />
{{Note|<br />
* Arch Linux officially only supports the [[#OpenJDK|OpenJDK]] implementation.<br />
* After installation, the Java environment will need to be recognized by the shell ({{ic|$PATH}} variable). This can be done by sourcing {{ic|/etc/profile}} from the command line or by logging out/in again of the Desktop Environment or reboot.}}<br />
<br />
Two ''common'' packages are respectively pulled as dependency, named {{Pkg|java-runtime-common}} (containing common files for Java Runtime Environments) and {{Pkg|java-environment-common}} (containing common files for Java Development Kits). The provided environment file {{ic|/etc/profile.d/jre.sh}} points to a linked location {{ic|/usr/lib/jvm/default/bin}}, set by the {{ic|archlinux-java}} helper script.<br />
{{Warning|The links {{ic|/usr/lib/jvm/default}} and {{ic|/usr/lib/jvm/default-runtime}} should '''always''' be edited with {{ic|archlinux-java}}.}}<br />
This is used to display and point to a working default Java environment in {{ic|<nowiki>/usr/lib/jvm/java-${JAVA_MAJOR_VERSION}-${VENDOR_NAME}</nowiki>}} or a Java runtime in {{ic|<nowiki>/usr/lib/jvm/java-${JAVA_MAJOR_VERSION}-${VENDOR_NAME}/jre</nowiki>}}.<br />
<br />
Most executables of the Java installation are provided by direct links in {{ic|/usr/bin}}, while others are available in {{ic|$PATH}}. The script {{ic|/etc/profile.d/jdk.sh}} is no longer provided by any package.<br />
<br />
=== OpenJDK ===<br />
<br />
[[Wikipedia:OpenJDK|OpenJDK]] is an open-source implementation of the Java Platform, Standard Edition (Java SE), designated as the official reference implementation. There are several distributors of OpenJDK builds such as [https://adoptium.net Adoptium] (formerly known as AdoptOpenJDK) and [https://aws.amazon.com/corretto/ Amazon Corretto]. The Arch Linux OpenJDK packages are built from the [https://hg.openjdk.java.net/ upstream OpenJDK source code].<br />
<br />
;Headless JRE: The minimal Java runtime - needed for executing non-GUI Java programs.<br />
;Full JRE: Full Java runtime environment - needed for executing Java GUI programs, depends on headless JRE.<br />
;JDK:[[Wikipedia:Java Development Kit|Java Development Kit]] - needed for Java development, depends on full JRE.<br />
<br />
{| class="wikitable"<br />
! Version !! Headless JRE !! Full JRE !! JDK !! Documentation !! Sources<br />
|-<br />
| [https://openjdk.java.net/projects/jdk/17/ OpenJDK 17] || {{Pkg|jre-openjdk-headless}} || {{Pkg|jre-openjdk}} || {{Pkg|jdk-openjdk}} || {{Pkg|openjdk-doc}} || {{Pkg|openjdk-src}}<br />
|-<br />
| [https://openjdk.java.net/projects/jdk/11/ OpenJDK 11] || {{Pkg|jre11-openjdk-headless}} || {{Pkg|jre11-openjdk}} || {{Pkg|jdk11-openjdk}} || {{Pkg|openjdk11-doc}} || {{Pkg|openjdk11-src}}<br />
|-<br />
| [https://openjdk.java.net/projects/jdk8/ OpenJDK 8] || {{Pkg|jre8-openjdk-headless}} || {{Pkg|jre8-openjdk}} || {{Pkg|jdk8-openjdk}} || {{Pkg|openjdk8-doc}} || {{Pkg|openjdk8-src}}<br />
|}<br />
<br />
{{App|OpenJDK GA|Latest OpenJDK General-Availability Release build from Oracle.|https://jdk.java.net|{{AUR|java-openjdk-bin}}}}<br />
{{App|OpenJDK EA|Latest OpenJDK Early-Access build for development version from Oracle.|https://jdk.java.net|{{AUR|java-openjdk-ea-bin}}}}<br />
<br />
{{App|IcedTea-Web|Java Web Start and the deprecated Java browser plugin.|https://icedtea.classpath.org/download/icedtea-web-docs/1.8/html/en/icedtea-web.html|{{Pkg|icedtea-web}}}}<br />
<br />
=== OpenJFX ===<br />
<br />
[https://wiki.openjdk.java.net/display/OpenJFX/Main OpenJFX] is the open-source implementation of [[Wikipedia:JavaFX|JavaFX]]. You [https://wiki.openjdk.java.net/display/OpenJFX/Repositories+and+Releases do not need] to install this package if you are using Oracle JDK. This package only concerns users of the open source implementation of Java (OpenJDK project), and its derivatives.<br />
<br />
{| class="wikitable"<br />
! Version !! Runtime and Developement !! Documentation !! Sources<br />
|-<br />
| [https://wiki.openjdk.java.net/display/OpenJFX/Main OpenJFX 17] || {{Pkg|java-openjfx}} || {{Pkg|java-openjfx-doc}} || {{Pkg|java-openjfx-src}}<br />
|-<br />
| [https://wiki.openjdk.java.net/display/OpenJFX/Main OpenJFX 11] || {{Pkg|java11-openjfx}} || {{Pkg|java11-openjfx-doc}} || {{Pkg|java11-openjfx-src}}<br />
|-<br />
| [https://wiki.openjdk.java.net/display/OpenJFX/Main OpenJFX 8] || {{Pkg|java8-openjfx}} || {{Pkg|java8-openjfx-doc}} || {{Pkg|java8-openjfx-src}}<br />
|}<br />
<br />
{{App|OpenJFX GA|Latest OpenJFX General-Availability Release build from Gluon.|https://openjfx.io/|{{AUR|java-openjfx-bin}}}}<br />
{{App|OpenJFX EA|Latest OpenJFX Early-Access build for development version from Gluon.|https://openjfx.io/|{{AUR|java-openjfx-ea-bin}}}}<br />
<br />
=== Other implementations ===<br />
<br />
{{App|Oracle JDK|Oracle's commercially licensed build of OpenJDK.|https://www.oracle.com/technetwork/java/javase/downloads/index.html|{{AUR|jre}} {{AUR|jre12}} {{AUR|jre11}} {{AUR|jre10}} {{AUR|jre9}} {{AUR|jre8}} {{AUR|jre7}} {{AUR|jre6}} {{AUR|jdk}} {{AUR|jdk12}} {{AUR|jdk11}} {{AUR|jdk10}} {{AUR|jdk9}} {{AUR|jdk8}} {{AUR|jdk7}} {{AUR|jdk6}} {{AUR|jdk-devel}}}}<br />
{{App|OpenJ9|Eclipse's implementation of JRE, contributed by IBM.|https://www.eclipse.org/openj9/|{{AUR|jdk-openj9-bin}} {{AUR|jdk14-openj9-bin}} {{AUR|jdk13-openj9-bin}} {{AUR|jdk12-openj9-bin}} {{AUR|jdk11-openj9-bin}} {{AUR|jdk10-openj9-bin}} {{AUR|jdk9-openj9-bin}} {{AUR|jdk8-openj9-bin}}}}<br />
{{App|IBM Certified|IBM Semeru Runtime Certified Edition.|https://www.ibm.com/semeru-runtimes/downloads|{{AUR|jdk11-j9-bin}}}}<br />
{{App|IBM J9|IBM's implementation of JRE, using OpenJ9 contributions.|https://www.ibm.com/support/pages/java-sdk-downloads|{{AUR|jdk8-j9-bin}} {{AUR|jdk7-j9-bin}} {{AUR|jdk7r1-j9-bin}}}}<br />
{{App|Parrot VM|a VM with experimental support for Java [http://trac.parrot.org/parrot/wiki/Languages] through two different methods: either as a [https://code.google.com/p/parrot-jvm/ Java VM bytecode translator], or as a [https://github.com/chrisdolan/perk Java compiler targeting the Parrot VM]. Parrot is [https://github.com/parrot/parrot/issues/1243 not actively developed since 2017].|http://www.parrot.org/|{{AUR|parrot}}}}<br />
<br />
{{Note|32-bit versions of Oracle JDK can be found by prefixing {{ic|bin32-}}, e.g. {{AUR|bin32-jre}}. They use {{AUR|java32-runtime-common}}, which functions as {{Pkg|java-runtime-common}} by suffixing with {{ic|32}}, e.g. {{ic|java32}}. The same analogy applies to {{AUR|java32-environment-common}}, which is only used by 32-bit JDK packages.}}<br />
<br />
=== Development tools ===<br />
<br />
For integrated development environments, see [[List of applications#Integrated development environments]] and the ''Java IDEs'' subsection specifically.<br />
<br />
To discourage reverse engineering an obfuscator like {{AUR|proguard}} can be used.<br />
<br />
==== Decompilers ====<br />
<br />
* {{App|CFR|Java decompiler, supporting modern features of Java 9, 10 and beyond.|https://www.benf.org/other/cfr/|{{AUR|cfr}}}}<br />
* {{App|Fernflower|Analytical decompiler for Java, developed as part of [[IntelliJ IDEA]].|https://github.com/JetBrains/intellij-community/tree/master/plugins/java-decompiler/engine|{{AUR|fernflower-git}}}}<br />
* {{App|Krakatau|Java decompiler, assembler, and disassembler.|https://github.com/Storyyeller/Krakatau|{{AUR|krakatau-git}}}}<br />
* {{App|Procyon decompiler|Experimental Java decompiler, inspired by ILSpy and Mono.Cecil.|https://bitbucket.org/mstrobel/procyon/wiki/Java%20Decompiler|{{AUR|procyon-decompiler}}}}<br />
* {{App|Java Decompiler (JD-Core)|Popular Java decompiler providing a GUI (see JD-GUI) and supporting Java 1-10.|https://java-decompiler.github.io/|{{AUR|jd-core-java}}}}<br />
* {{App|Jadx|Android DEX to Java decompiler with an optional GUI (see Jadx-GUI)|https://github.com/skylot/jadx|{{Pkg|jadx}}}}<br />
* {{App|[[Wikipedia:JAD (software)|JAD]]|Unmaintained Java decompiler (last release 2006).|https://varaneckas.com/jad|{{Pkg|jad}}}}<br />
<br />
==== GUI Frontends ====<br />
<br />
* {{App|Bytecode Viewer|Java reverse engineering suite, including a decompiler, editor and debugger; Frontend for CFR/Fernflower/Procyon|https://bytecodeviewer.com|{{AUR|bytecode-viewer}}}}<br />
* {{App|Recaf|An easy to use modern Java bytecode editor that abstracts away the complexities of Java programs; Frontend for CFR/Fernflower/Procyon|https://www.coley.software/Recaf/|{{AUR|recaf-bin}}}}<br />
* {{App|Java Decompiler (JD-GUI)|Popular Java decompiler providing a GUI and supporting Java 1-10; Frontend for JD-Core|https://java-decompiler.github.io/|{{AUR|jd-gui}}}}<br />
* {{App|Jadx-GUI|Android APK DEX to Java decompiler with an optional GUI; Frontend for Jadx|https://github.com/skylot/jadx|{{Pkg|jadx}}}}<br />
* {{App|Luten|An Open Source Java Decompiler Gui; Frontend for Procyon|https://github.com/deathmarine/Luyten|{{AUR|luyten}}}}<br />
<br />
== Switching between JVM ==<br />
<br />
The helper script {{ic|archlinux-java}} provides such functionalities:<br />
<br />
archlinux-java <COMMAND><br />
<br />
COMMAND:<br />
status List installed Java environments and enabled one<br />
get Return the short name of the Java environment set as default<br />
set <JAVA_ENV> Force <JAVA_ENV> as default<br />
unset Unset current default Java environment<br />
fix Fix an invalid/broken default Java environment configuration<br />
<br />
=== List compatible Java environments installed ===<br />
<br />
$ archlinux-java status<br />
<br />
Example:<br />
<br />
{{hc<br />
|$ archlinux-java status<br />
|Available Java environments:<br />
java-8-openjdk (default)<br />
java-11-openjdk/jre}}<br />
<br />
Note the ''(default)'' denoting that {{ic|java-8-openjdk}} is currently set as default. Invocation of {{ic|java}} and other binaries will rely on this Java install. Also note on the previous output that only the ''JRE'' part of OpenJDK 11 is installed here.<br />
<br />
=== Change default Java environment ===<br />
<br />
# archlinux-java set <JAVA_ENV_NAME><br />
<br />
Example:<br />
<br />
# archlinux-java set java-8-openjdk/jre<br />
<br />
{{Tip|To see possible {{ic|<JAVA_ENV_NAME>}} names, use {{ic|archlinux-java status}}.}}<br />
<br />
Note that {{ic|archlinux-java}} will not let you set an invalid Java environment. In the previous example, {{Pkg|jre8-openjdk}} is installed but {{Pkg|jdk8-openjdk}} is '''not''' so trying to set {{ic|java-8-openjdk}} will fail:<br />
<br />
{{hc<br />
|# archlinux-java set java-8-openjdk<br />
|'/usr/lib/jvm/java-8-openjdk' is not a valid Java environment path}}<br />
<br />
=== Unsetting the default Java environment ===<br />
<br />
There should be no need to unset a Java environment as packages providing them should take care of this. Still should you want to do so, just use command {{ic|unset}}:<br />
<br />
# archlinux-java unset<br />
<br />
=== Fixing the default Java environment ===<br />
<br />
If an invalid Java environment link is set, calling the {{ic|archlinux-java fix}} command tries to fix it. Also note that if no default Java environment is set, this will look for valid ones and try to set it for you. Officially supported package "OpenJDK 8" will be considered first in this order, then other installed environments.<br />
<br />
# archlinux-java fix<br />
<br />
=== Launching an application with the non-default java version ===<br />
<br />
If you want to launch an application with another version of java than the default one (for example if you have both version 17 and 11 installed on your system), you can wrap your application in a small bash script to locally change the default PATH of java. For example if the default version is java 17 and you want to use java 11:<br />
<br />
#!/bin/sh<br />
<br />
export PATH="/usr/lib/jvm/java-11-openjdk/bin/:$PATH"<br />
exec /path/to/application "$@"<br />
<br />
For a [[Systemd|systemd]] service you can append {{ic|JAVA_HOME}} to environment variables in the [[Systemd#Drop-in_files|drop-in file]]:<br />
<br />
{{hc|/etc/systemd/system/''unit''.d/override.conf|2=<br />
[Service]<br />
Environment=JAVA_HOME=/usr/lib/jvm/java-11-openjdk<br />
}}<br />
<br />
== Package pre-requisites to support {{ic|archlinux-java}} ==<br />
<br />
{{Note|This info also applies to {{ic|archlinux32-java}} for 32-bit Java packages, with the proper inclusion of {{ic|32}} to the package/executable names, where applicable.}}<br />
<br />
This section is targeted at packager willing to provide packages in [[AUR]] for an alternate JVM and be able to integrate with Arch Linux JVM scheme to use {{ic|archlinux-java}}. To do so, packages should:<br />
<br />
* Place all files under {{ic|/usr/lib/jvm/java-${JAVA_MAJOR_VERSION}-${VENDOR_NAME} }}<br />
* Ensure all executables for which [https://archlinux.org/packages/extra/any/java-runtime-common/files/ java-runtime-common] and [https://archlinux.org/packages/extra/any/java-environment-common/files/ java-environment-common] provide links are available in the corresponding package <br />
* Ship links from {{ic|/usr/bin}} to executables, only if these links do not already belong to [https://archlinux.org/packages/extra/any/java-runtime-common/files/ java-runtime-common] and [https://archlinux.org/packages/extra/any/java-environment-common/files/ java-environment-common]<br />
* Suffix man pages with {{ic|-${VENDOR_NAME}${JAVA_MAJOR_VERSION} }} to prevent conflicts (see [https://archlinux.org/packages/extra/x86_64/jre8-openjdk/files/ jre8-openjdk file list] where man pages are suffixed with {{ic|-openjdk8}})<br />
* Do not declare any [[PKGBUILD#conflicts|conflicts]] nor [[PKGBUILD#replaces|replaces]] with other JDKs, {{ic|java-runtime}}, {{ic|java-runtime-headless}} nor {{ic|java-environment}}<br />
* Use script {{ic|archlinux-java}} in ''install functions'' to set the Java environment as default '''if no other valid Java environment is already set''' (ie: package should not '''force''' install as default). See [https://github.com/archlinux/svntogit-packages/blob/packages/java8-openjdk/trunk officially supported Java environment package sources] for examples<br />
<br />
Also please note that:<br />
<br />
* Packages that need '''any''' Java environment should declare dependency on {{ic|java-runtime}}, {{ic|java-runtime-headless}} or {{ic|java-environment}} as usual<br />
* Packages that need a '''specific Java vendor''' should declare dependency on the corresponding package<br />
* OpenJDK packages now declare {{ic|1=provides="java-runtime-openjdk=${pkgver}"}} etc. This enables a third-party package to declare dependency on an OpenJDK without specifying a version<br />
<br />
== Troubleshooting ==<br />
<br />
=== MySQL ===<br />
<br />
Due to the fact that the JDBC-drivers often use the port in the URL to establish a connection to the database, it is considered "remote" (i.e., MySQL does not listen to the port as per its default settings) despite the fact that they are possibly running on the same host, Thus, to use JDBC and MySQL you should enable remote access to MySQL, following the instructions in [[MariaDB#Grant remote access]].<br />
<br />
=== IntelliJ IDEA ===<br />
<br />
If IntelliJ IDEA outputs {{ic|The selected directory is not a valid home for JDK}} with the system Java SDK path, you may have to install a different JDK package and select it as IDEA's JDK.<br />
<br />
=== Impersonate another window manager ===<br />
<br />
You may use the {{Pkg|wmname}} from [https://tools.suckless.org/x/wmname suckless.org] to make the JVM believe you are running a different window manager. This may solve a rendering issue of Java GUIs occurring in window managers like [[Awesome]] or [[Dwm]] or [[Ratpoison]]. Try set "compiz" or "LG3D"<br />
<br />
$ wmname compiz<br />
<br />
You must restart the application in question after issuing the wmname command.<br />
<br />
This works because the JVM contains a hard-coded list of known, non-re-parenting window managers. For maximum irony, some users prefer to impersonate {{ic|LG3D}}, the non-re-parenting window manager [[wikipedia:Project_Looking_Glass|written by Sun, in Java]].<br />
<br />
=== Illegible fonts ===<br />
<br />
In addition to the suggestions mentioned below in [[#Better font rendering]], some fonts may still not be legible afterwards. If this is the case, there is a good chance Microsoft fonts are being used. Install {{AUR|ttf-ms-fonts}}.<br />
<br />
=== Missing text in some applications ===<br />
<br />
If some applications are completely missing texts it may help to use the options under [[#Tips and tricks]] as suggested in {{Bug|40871}}.<br />
<br />
=== Gray window, applications not resizing with WM, menus immediately closing ===<br />
<br />
The standard Java GUI toolkit has a hard-coded list of "non-reparenting" window managers. If using one that is not on that list, there can be some problems with running some Java applications. One of the most common problems is "gray blobs", when the Java application renders as a plain gray box instead of rendering the GUI. Another one might be menus responding to your click, but closing immediately.<br />
<br />
There are several things that may help:<br />
<br />
* For {{Pkg|jre8-openjdk}}, append the line {{ic|1=export _JAVA_AWT_WM_NONREPARENTING=1}} in {{ic|/etc/profile.d/jre.sh}}. Then, source the file {{ic|/etc/profile.d/jre.sh}} or log out and log back in.<br />
* For last version of JDK append line {{ic|1=export AWT_TOOLKIT=MToolkit}} in {{ic|~/.xinitrc}} before exec window manager.<br />
* Also, we can try to use {{Pkg|wmname}} with line {{ic|wmname compiz}} in your {{ic|~/.xinitrc}}. <br />
* For Oracle's JRE/JDK, use [https://wiki.haskell.org/Xmonad/Frequently_asked_questions#Using_SetWMName SetWMName.] However, its effect may be canceled when also using {{ic|XMonad.Hooks.EwmhDesktops}}. In this case, appending {{ic|>> setWMName "LG3D"}} to the {{ic|LogHook}} may help.<br />
* For [[sway]], {{ic|1=export _JAVA_AWT_WM_NONREPARENTING=1}} may solve the problem.<br />
<br />
See [https://wiki.haskell.org/Xmonad/Frequently_asked_questions#Problems_with_Java_applications.2C_Applet_java_console] for more information.<br />
<br />
=== System freezes when debugging JavaFX Applications ===<br />
<br />
If your system freezes while debugging a JavaFX Application, you can try to supply the JVM option {{ic|1=-Dsun.awt.disablegrab=true}}.<br />
<br />
See https://bugs.java.com/bugdatabase/view_bug.do?bug_id=6714678<br />
<br />
=== JavaFX's MediaPlayer constructor throws an exception ===<br />
<br />
Creating instance of MediaPlayer class from JavaFX's sound modules might throw following exception (both Oracle JDK and OpenJDK)<br />
<br />
... (i.e. FXMLLoader construction exceptions) ...<br />
Caused by: MediaException: UNKNOWN : com.sun.media.jfxmedia.MediaException: Could not create player! : com.sun.media.jfxmedia.MediaException: Could not create player!<br />
at javafx.scene.media.MediaException.exceptionToMediaException(MediaException.java:146)<br />
at javafx.scene.media.MediaPlayer.init(MediaPlayer.java:511)<br />
at javafx.scene.media.MediaPlayer.<init>(MediaPlayer.java:414)<br />
at <constructor call><br />
...<br />
<br />
which is a result of some incompatibilities of JavaFX with modern {{Pkg|ffmpeg}} build delivered within Arch Linux repository.<br />
<br />
Working solution is to install {{AUR|ffmpeg-compat-55}}.<br />
<br />
See https://www.reddit.com/r/archlinux/comments/70o8o6/using_a_javafx_mediaplayer_in_arch/<br />
<br />
=== Java applications cannot open external links ===<br />
<br />
If a Java application is not able to open a link to, for example, your web browser, install {{Pkg|gvfs}}. This is required by the Desktop.Action.BROWSE method. See [https://bugs.launchpad.net/ubuntu/+source/openjdk-8/+bug/1574879/comments/2]<br />
<br />
=== Error initializing QuantumRenderer: no suitable pipeline found ===<br />
<br />
Possible issues / solutions:<br />
<br />
* GTK2 is missing. Install {{Pkg|gtk2}}<br />
* OpenJFX is missing. Install {{Pkg|java-openjfx}}<br />
<br />
== Tips and tricks ==<br />
<br />
{{Note|Suggestions in this section are applicable to all applications, using explicitly installed (external) Java runtime. Some applications are bundled with own (private) runtime or use own mechanics for GUI, font rendering, etc., so none of written below is guaranteed to work.}}<br />
<br />
Behavior of most Java applications can be controlled by supplying predefined variables to Java runtime. From [https://bbs.archlinux.org/viewtopic.php?id=72892 this forum post], a way to do it consists of adding the following line in your {{ic|~/.bash_profile}} (or {{ic|/etc/profile.d/jre.sh}} to affect programs that are not run by sourcing {{ic|~/.bash_profile}}):<br />
<br />
export JDK_JAVA_OPTIONS="-D'''<option 1>''' -D'''<option 2>'''..."<br />
<br />
For example, to use system anti-aliased fonts and make swing use the GTK look and feel:<br />
<br />
export JDK_JAVA_OPTIONS='-Dawt.useSystemAAFontSettings=on -Dswing.aatext=true -Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel'<br />
<br />
Three such variables exist, the options which are explained later in the table below take priority.<br />
<br />
{| class="wikitable" <br />
|-<br />
| JAVA_TOOL_OPTIONS<br />
| Affects applications as well as tools like javac or the jshell.<br />
|-<br />
| JDK_JAVA_OPTIONS<br />
| Affects applications (everything started via the java command). Requires Java 9.<br />
|-<br />
| (command line options)<br />
| Arguments specified before the "class name" argument are Java options.<br />
|-<br />
| _JAVA_OPTIONS<br />
| The old way, affects applications and tools.<br />
|}<br />
<br />
=== Better font rendering ===<br />
<br />
Both closed source and open source implementations of Java are known to have improperly implemented anti-aliasing of fonts. This can be fixed with the following options: {{ic|1=-Dawt.useSystemAAFontSettings=on}}, {{ic|1=-Dswing.aatext=true}}<br />
<br />
See [[Java Runtime Environment fonts]] for more detailed information.<br />
<br />
=== Silence 'Picked up JDK_JAVA_OPTIONS' message on command line ===<br />
<br />
Setting the JDK_JAVA_OPTIONS environment variables makes java (openjdk) write to stderr messages of the form: 'Picked up JDK_JAVA_OPTIONS=...'. To suppress those messages in your terminal you can unset the environment variable in your {{ic|~/.bashrc}} and alias java to pass those same options as command line arguments:<br />
<br />
SILENT_JAVA_OPTIONS="$JDK_JAVA_OPTIONS"<br />
unset JDK_JAVA_OPTIONS<br />
alias java='java "$SILENT_JAVA_OPTIONS"'<br />
<br />
Non interactive shells, like the launcher scripts for Java programs, (usually) do not read the {{ic|~/.bashrc}}, but still inherited exported variables from their parent process (which in turn inherited it at some point from the login shell which read the {{ic|~/.bash_profile}}).<br />
As for the cases when they do, one put’s generally a statement at the op of the {{ic|~/.bashrc}} to avoid the file being read. That way, the variables are passed to programs launched via the desktop menu and in the case of an interactive shell where the message would disturb aliases are used instead (which in turn cannot be used in scripts).<br />
<br />
=== GTK LookAndFeel ===<br />
<br />
If your Java programs look ugly, you may want to set up the default look and feel for the swing components:<br />
<br />
swing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel<br />
<br />
Some Java programs insist on using the cross platform Metal look and feel. In some of these cases you can force these applications to use the GTK look and feel by setting the following property:<br />
<br />
swing.crossplatformlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel<br />
<br />
==== GTK3 Support ====<br />
<br />
In Java releases prior to version 9, the GTK LookAndFeel is linked against GTK2, whilst many newer desktop applications use GTK3. This incompatibility between GTK versions may break applications utilizing Java plugins with GUI, as the mixing of GTK2 and GTK3 in the same process is not supported (for example, LibreOffice 5.0). <br />
<br />
The GTK LookAndFeel can be run against GTK versions {{ic|2}}, {{ic|2.2}} and {{ic|3}}, defaulting to GTK3. This can be overridden by setting the following property:<br />
<br />
jdk.gtk.version=2.2<br />
<br />
=== HiDPI ===<br />
Depending on the GUI framework, [[HiDPI#Java applications]] can be enabled using different methods.<br />
<br />
=== Better 2D performance ===<br />
<br />
Switching to OpenGL-based hardware acceleration pipeline will improve 2D performance<br />
<br />
export JDK_JAVA_OPTIONS='-Dsun.java2d.opengl=true'<br />
<br />
{{Note|Enabling this option may cause the UI of software like JetBrains IDEs misbehave, making them drawing windows, popups and toolbars partially.}}<br />
<br />
== See also ==<br />
<br />
* [https://math.hws.edu/javanotes8/ Introduction to Programming Using Java]</div>Goetzchttps://wiki.archlinux.org/index.php?title=Lenovo_ThinkPad_X1_Carbon_(Gen_7)&diff=720881Lenovo ThinkPad X1 Carbon (Gen 7)2022-03-01T18:36:47Z<p>Goetzc: /* Secondary IR */ rename section</p>
<hr />
<div>[[Category:Lenovo]]<br />
[[ja:Lenovo ThinkPad X1 Carbon (Gen 7)]]<br />
{| class="wikitable" style="float: right;"<br />
|-<br />
! Hardware !! PCI/USB ID !! Working?<br />
|-<br />
| Video || {{ic|8086:3ea0}} || {{Yes}}<br />
|-<br />
| Wireless || {{ic|8086:9df0}} || {{Yes}}<br />
|-<br />
| [[#Ethernet|Ethernet]] || {{ic|8086:15be}} || {{Yes}}<br />
|-<br />
| Mobile broadband || || {{Yes}}<br />
|-<br />
| Audio || {{ic|8086:9dc8}} || {{Yes}}<br />
|-<br />
| Touchpad || {{ic|06cb:cd8b}} || {{Yes}}<br />
|-<br />
| TrackPoint || {{ic|06cb:cd8b}} || {{Yes}}<br />
|-<br />
| Camera || {{ic|13d3:56ba}} || {{Yes}}<br />
|-<br />
| Fingerprint reader || {{ic|06cb:00bd}} || {{Yes}}<br />
|-<br />
| Bluetooth || {{ic|8087:0aaa}} || {{Yes}}<br />
|-<br />
| NFC || || {{No}}<br />
|}<br />
<br />
{{Related articles start}}<br />
{{Related|Lenovo ThinkPad X1 Carbon}}<br />
{{Related|Lenovo ThinkPad X1 Carbon (Gen 2)}}<br />
{{Related|Lenovo ThinkPad X1 Carbon (Gen 3)}}<br />
{{Related|Lenovo ThinkPad X1 Carbon (Gen 4)}}<br />
{{Related|Lenovo ThinkPad X1 Carbon (Gen 5)}}<br />
{{Related|Lenovo ThinkPad X1 Carbon (Gen 6)}}<br />
{{Related|Lenovo ThinkPad X1 Carbon (Gen 8)}}<br />
{{Related|Lenovo ThinkPad X1 Yoga (Gen 3)}}<br />
{{Related|Lenovo ThinkPad X1 Yoga (Gen 4)}}<br />
{{Related articles end}}<br />
<br />
== BIOS ==<br />
<br />
{{warning|1=There are reports that enrolling custom Secure Boot keys may brick this machine because of firmware bugs.}} <br />
<br />
The most convenient way to install Arch Linux is by disabling "Secure Boot" {{ic|Security -> Secure Boot - Set to "Disabled"}}. However it is possible to self-sign your kernel and boot with it enabled. For further information have a look at the [[Secure Boot]] article.<br />
<br />
In case your {{ic|efivars}} are not properly set it is most likely due to you not being booted into [[UEFI]]. Should the problem persist be sure to consult the [[UEFI#UEFI variables]] section.<br />
<br />
=== Updates ===<br />
<br />
==== Automatic (Linux Vendor Firmware Service) ====<br />
<br />
[https://blogs.gnome.org/hughsie/2018/08/06/please-welcome-lenovo-to-the-lvfs/ In August of 2018 Lenovo has joined] the [https://fwupd.org/ Linux Vendor Firmware Service (LVFS)] project, which enables firmware updates from within the OS.<br />
BIOS updates (and possibly other firmware such as the Thunderbolt controller) can be queried for and installed through [[fwupd]].<br />
<br />
If your thunderbolt port is unstable after upgrading with fwupd, you can visit the [https://pcsupport.lenovo.com/us/en/products/laptops-and-netbooks/thinkpad-x-series-laptops/thinkpad-x1-carbon-7th-gen-type-20qd-20qe/downloads/driver-list Lenovo ThinkPad X1 Carbon (Gen 7) driver website] and upgrade the thunderbolt firmware manually.<br />
<br />
==== Manual (fwupdmgr) ====<br />
<br />
Lenovo may in the future provide cabinet files that can be directly installed with fwupdmgr.<br />
Check for Linux {{ic|.cab}} files from the [https://pcsupport.lenovo.com/us/en/products/laptops-and-netbooks/thinkpad-x-series-laptops/thinkpad-x1-carbon-7th-gen-type-20qd-20qe/downloads Lenovo ThinkPad X1 Carbon (Gen 7) driver website].<br />
<br />
#Make sure the AC adapter is firmly connected to the target computer.<br />
#Launch Terminal.<br />
#Move to the directory where the cabinet file was placed.<br />
#Run {{ic|fwupdmgr install xxxxxxxx.cab}} to schedule firmware update.<br />
#Restart the system.<br />
#The computer will be restarted and the UEFI BIOS will be updated.<br />
<br />
=== Sleep/Suspend ===<br />
<br />
The BIOS has two "Sleep State" options, Windows and Linux, which you can find in at {{ic|Config -> Power -> Sleep State}}. The Linux option is the traditional S3 power state where all hardware components are turned off except for the RAM, and it should work normally. The Windows option is a newer software-based "modern standby" which works on Linux (despite the name). One possible benefit to the Windows sleep state is faster wake up time, and one possible drawback is increased power usage.<br />
<br />
Mark Pearson, a Lenovo employee, [https://forums.lenovo.com/t5/Fedora/Fedora-32-Workstation-image-for-Thinkpad-P1G2/m-p/5042732?page=1#5156832 recommends using the "Windows" sleep state option] as it is better supported on modern Intel processors. The same is true for other modern Thinkpads [https://forums.lenovo.com/t5/Other-Linux-Discussions/T14-AMD-battery-drain-in-standby-Linux/m-p/5037674?page=3#5189273 except for AMD models] (as of November 2020).<br />
<br />
=== S3 Suspend Bug with Bluetooth Devices ===<br />
<br />
Occasionally your Thinkpad will wake up immediately after suspending with certain [[bluetooth]] devices added. To prevent this, remove the devices or disable [[bluetooth]] before suspending.<br />
<br />
=== BIOS configurations ===<br />
<br />
* {{ic|Config -> Thunderbolt BIOS Assist Mode - Set to "Enabled"}}. When disabled, on Linux, power usage appears to be significantly higher because of a substantial number of CPU wakeups during s2idle.<br />
<br />
{{tip| You may need to disable Kernel DMA protection in {{ic|Security -> Virtualization -> Kernel DMA Protection - Set to "Disabled"}}}}<br />
<br />
== Firmware issues ==<br />
<br />
The following issues can all be resolved by upgrading the firmware with fwupdmgr (''see [[#Updates|#BIOS Updates]]''), but there may be alternative manual/temporary fixes.<br />
<br />
=== Touchpad issues ===<br />
<br />
Due to a bug in a touchpad firmware, the touchpad might not work with following logs in [[dmesg]]:<br />
{{bc|<br />
[ 4.499490] i2c_designware i2c_designware.1: i2c_dw_handle_tx_abort: lost arbitration<br />
[...]<br />
[ 12.668795] i2c_hid i2c-SYNA8005:00: failed to set a report to device.<br />
[ 13.678765] i2c_designware i2c_designware.1: controller timed out<br />
}}<br />
<br />
=== Freeze when suspending ===<br />
<br />
There are reports of the system freezing after initiating a suspend or hibernate. A temporary fix is to add {{ic|1=snd_hda_intel.dmic_detect=0}} to your kernel parameters. see [https://www.reddit.com/r/archlinux/comments/e5oe4p/systemctl_suspend_causes_freeze/fa8mzft/]. This temporary fix is somehow disable the microphone, use this at your own risk<br />
<br />
=== Power management/Throttling issues ===<br />
<br />
A [https://web.archive.org/web/20191114160718/https://forums.lenovo.com/t5/Other-Linux-Discussions/X1C6-T480s-low-cTDP-and-trip-temperature-in-Linux/td-p/4028489/highlight/true bug] causes the CPU to consume less power than under Windows and throttle at 80°C instead of 97°. <br />
<br />
Lenovo has confirmed the issue, [https://web.archive.org/web/20191115170150/https://forums.lenovo.com/t5/Other-Linux-Discussions/X1C6-T480s-low-cTDP-and-trip-temperature-in-Linux/m-p/4534535/highlight/true#M13642 explained the cause] and published [https://web.archive.org/web/20191114160928/https://forums.lenovo.com/t5/Other-Linux-Discussions/X1C6-T480s-low-cTDP-and-trip-temperature-in-Linux/m-p/4535310/highlight/true#M13653 updates for the embedded controller and the BIOS] to LVFS .<br />
<br />
The alternative fix is to install {{Pkg|throttled}}, then [[start/enable]] {{ic|lenovo_fix.service}}.<br />
<br />
== Audio ==<br />
<br />
This laptop requires {{Pkg|sof-firmware}} and {{Pkg|alsa-ucm-conf}} in order for the soundcard to work. See [[Advanced Linux Sound Architecture#ALSA firmware]].<br />
<br />
=== Clicking/cracking noise when using headphones ===<br />
<br />
If you are hearing clicking/cracking noises when using headphones, this command helped me. I have to run it after each restart.<br />
<br />
# hda-verb /dev/snd/hwC0D0 0x1d SET_PIN_WIDGET_CONTROL 0x0<br />
<br />
=== Clicking/cracking noise when using speakers ===<br />
<br />
The newest alsa-ucm-conf is missing the speakers configuration. Downgrade it to 1.2.3-2.<br />
<br />
# downgrade alsa-ucm-conf<br />
<br />
=== Microphone ===<br />
<br />
On version 5.3 and newer the SOF firmware can be enabled, see [[{{TALKPAGENAME}}#Microphone|Talk#Microphone]].<br />
<br />
== Camera ==<br />
=== Secondary IR ===<br />
<br />
Some models of this laptop include a second infrared (IR) [[webcam]] (originally to be used with Windows Hello) which is uncovered by the privacy slider. {{ic|v4l2-ctl --list-devices}} will show all available video devices. The IR emitter can be manipulated using [https://github.com/PetePriority/chicony-ir-toggle chicony-ir-toggle].<br />
<br />
Facial authentication can be archived using [[Howdy]].<br />
<br />
== Function Keys ==<br />
<br />
In the firmware configuration it is possible to swap the Ctrl and Fn 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}} || {{Yes}} || {{ic|XF86AudioMute}}<br />
|-<br />
| {{ic|Fn+F2}} || {{Yes}} || {{Yes}} || {{ic|XF86AudioLowerVolume}}<br />
|-<br />
| {{ic|Fn+F3}} || {{Yes}} || {{Yes}} || {{ic|XF86AudioRaiseVolume}}<br />
|-<br />
| {{ic|Fn+F4}} || {{Yes}} || {{Yes}} || {{ic|XF86AudioMicMute}}<br />
|-<br />
| {{ic|Fn+F5}} || {{Yes}} || {{Yes}} || {{ic|XF86MonBrightnessDown}}<br />
|-<br />
| {{ic|Fn+F6}} || {{Yes}} || {{Yes}} || {{ic|XF86MonBrightnessUp}}<br />
|-<br />
| {{ic|Fn+F7}} || {{Yes}} || {{Yes}} || {{ic|XF86Display}}<br />
|-<br />
| {{ic|Fn+F8}} || {{Yes}} || {{Yes}} || {{ic|XF86WLAN}}<br />
|-<br />
| {{ic|Fn+F9}} || {{Yes}} || {{Yes}} || {{ic|XF86Tools}}<br />
|-<br />
| {{ic|Fn+F10}} || {{Yes}} || {{Yes}} || {{ic|XF86Bluetooth}}<br />
|-<br />
| {{ic|Fn+F11}} || {{No}} || {{Yes}} || No Effect<br />
|-<br />
| {{ic|Fn+F12}} || {{Yes}} || {{Yes}} || {{ic|XF86Favorites}}<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 />
<br />
== Fingerprint sensor ==<br />
<br />
An official Lenovo firmware with Linux support is available from [[fwupd]]. After installing fwupd, you can update the Synaptics Prometheus driver for the fingerprint sensor:<br />
<br />
# fwupdmgr refresh<br />
# fwupdmgr get-updates<br />
Prometheus Fingerprint Reader Device Update:<br />
New version: 10.01.3158804<br />
New features and enhancements: Support Linux system<br />
# fwupdmgr update<br />
<br />
To use the fingerprint sensor, follow the instructions from [[Fprint]].<br />
<br />
If you had previously installed the testing version of this driver from lvfs-testing, there should be no issues updating to this driver version from the main repository.<br />
<br />
== Ethernet ==<br />
<br />
The internal NIC combined with the [https://www.lenovo.com/no/no/accessories-and-monitors/cables-and-adapters/adapters/CABLE-BO-Ethernet-Extension-Adapter-2/p/4X90Q84427 Thinkpad Ethernet Extension Adapter Gen 2] that comes with the Gen 7 works just fine. Although some users seems to be having problems: [https://forums.lenovo.com/t5/Other-Linux-Discussions/Lenovo-Ethernet-dongles-stop-working-after-recent-Linux-updates/m-p/4536718 The built-in ethernet adapter no longer works, approximately since kernel 5.0.]<br />
<br />
== Mobile broadband ==<br />
<br />
The Fibocom LTE module has Linux support once switched to USB mode; see [https://forums.lenovo.com/t5/Other-Linux-Discussions/How-To-Configure-X1-Carbon-Gen-7-on-Debian-FingerPrint-4G-Modem/td-p/4550327] and [https://github.com/abrasive/xmm7360]<br />
<br />
== Disabling red LED in ThinkPad logo ==<br />
<br />
You can temporarily disable the red LED in the ThinkPad logo on the cover:<br />
<br />
1. Enable writing to the embedded controller registers by adding the kernel parameter {{ic|1=ec_sys.write_support=1}}. <br />
If you use UEFI boot, you can add this parameter in {{ic|/boot/efi/loader/entries/arch.conf}} under "options".<br />
<br />
2. Disable the LED with this command: <br />
<br />
# echo -n -e "\x0a" | dd of="/sys/kernel/debug/ec/ec0/io" bs=1 seek=12 count=1 conv=notrunc 2> /dev/null<br />
<br />
This would need to be run after each suspend/reboot to be permanent.<br />
<br />
== See also ==<br />
<br />
* https://www.thinkwiki.org/wiki/ThinkWiki<br />
* [https://gist.github.com/greigdp/bb70fbc331a0aaf447c2d38eacb85b8f Dell XPS 13 9370 quirks]: Some pointers on getting Watt usage down to ~2W, Intel video powersaving features might be interesting, see also the [[Intel graphics]] page for interesting power-saving options.<br />
* [https://01.org/blogs/rzhang/2015/best-practice-debug-linux-suspend/hibernate-issues Intel Blog: Best practice to debug Linux* suspend/hibernate issues], including the [https://github.com/01org/pm-graph pm-graph] tool to analyze power usage during suspend<br />
* [https://forums.linuxmint.com/viewtopic.php?t=91453 How to fix volume control (ALSA problem)] This is where the volume fix came from originally.<br />
* [https://docs.microsoft.com/en-us/windows/win32/power/system-power-states Windows System Power States]<br />
* [https://www.kernel.org/doc/html/latest/admin-guide/pm/sleep-states.html System Sleep States at kernel.org]</div>Goetzchttps://wiki.archlinux.org/index.php?title=Lenovo_ThinkPad_X1_Carbon_(Gen_7)&diff=720880Lenovo ThinkPad X1 Carbon (Gen 7)2022-03-01T18:36:05Z<p>Goetzc: /* Camera */ add section</p>
<hr />
<div>[[Category:Lenovo]]<br />
[[ja:Lenovo ThinkPad X1 Carbon (Gen 7)]]<br />
{| class="wikitable" style="float: right;"<br />
|-<br />
! Hardware !! PCI/USB ID !! Working?<br />
|-<br />
| Video || {{ic|8086:3ea0}} || {{Yes}}<br />
|-<br />
| Wireless || {{ic|8086:9df0}} || {{Yes}}<br />
|-<br />
| [[#Ethernet|Ethernet]] || {{ic|8086:15be}} || {{Yes}}<br />
|-<br />
| Mobile broadband || || {{Yes}}<br />
|-<br />
| Audio || {{ic|8086:9dc8}} || {{Yes}}<br />
|-<br />
| Touchpad || {{ic|06cb:cd8b}} || {{Yes}}<br />
|-<br />
| TrackPoint || {{ic|06cb:cd8b}} || {{Yes}}<br />
|-<br />
| Camera || {{ic|13d3:56ba}} || {{Yes}}<br />
|-<br />
| Fingerprint reader || {{ic|06cb:00bd}} || {{Yes}}<br />
|-<br />
| Bluetooth || {{ic|8087:0aaa}} || {{Yes}}<br />
|-<br />
| NFC || || {{No}}<br />
|}<br />
<br />
{{Related articles start}}<br />
{{Related|Lenovo ThinkPad X1 Carbon}}<br />
{{Related|Lenovo ThinkPad X1 Carbon (Gen 2)}}<br />
{{Related|Lenovo ThinkPad X1 Carbon (Gen 3)}}<br />
{{Related|Lenovo ThinkPad X1 Carbon (Gen 4)}}<br />
{{Related|Lenovo ThinkPad X1 Carbon (Gen 5)}}<br />
{{Related|Lenovo ThinkPad X1 Carbon (Gen 6)}}<br />
{{Related|Lenovo ThinkPad X1 Carbon (Gen 8)}}<br />
{{Related|Lenovo ThinkPad X1 Yoga (Gen 3)}}<br />
{{Related|Lenovo ThinkPad X1 Yoga (Gen 4)}}<br />
{{Related articles end}}<br />
<br />
== BIOS ==<br />
<br />
{{warning|1=There are reports that enrolling custom Secure Boot keys may brick this machine because of firmware bugs.}} <br />
<br />
The most convenient way to install Arch Linux is by disabling "Secure Boot" {{ic|Security -> Secure Boot - Set to "Disabled"}}. However it is possible to self-sign your kernel and boot with it enabled. For further information have a look at the [[Secure Boot]] article.<br />
<br />
In case your {{ic|efivars}} are not properly set it is most likely due to you not being booted into [[UEFI]]. Should the problem persist be sure to consult the [[UEFI#UEFI variables]] section.<br />
<br />
=== Updates ===<br />
<br />
==== Automatic (Linux Vendor Firmware Service) ====<br />
<br />
[https://blogs.gnome.org/hughsie/2018/08/06/please-welcome-lenovo-to-the-lvfs/ In August of 2018 Lenovo has joined] the [https://fwupd.org/ Linux Vendor Firmware Service (LVFS)] project, which enables firmware updates from within the OS.<br />
BIOS updates (and possibly other firmware such as the Thunderbolt controller) can be queried for and installed through [[fwupd]].<br />
<br />
If your thunderbolt port is unstable after upgrading with fwupd, you can visit the [https://pcsupport.lenovo.com/us/en/products/laptops-and-netbooks/thinkpad-x-series-laptops/thinkpad-x1-carbon-7th-gen-type-20qd-20qe/downloads/driver-list Lenovo ThinkPad X1 Carbon (Gen 7) driver website] and upgrade the thunderbolt firmware manually.<br />
<br />
==== Manual (fwupdmgr) ====<br />
<br />
Lenovo may in the future provide cabinet files that can be directly installed with fwupdmgr.<br />
Check for Linux {{ic|.cab}} files from the [https://pcsupport.lenovo.com/us/en/products/laptops-and-netbooks/thinkpad-x-series-laptops/thinkpad-x1-carbon-7th-gen-type-20qd-20qe/downloads Lenovo ThinkPad X1 Carbon (Gen 7) driver website].<br />
<br />
#Make sure the AC adapter is firmly connected to the target computer.<br />
#Launch Terminal.<br />
#Move to the directory where the cabinet file was placed.<br />
#Run {{ic|fwupdmgr install xxxxxxxx.cab}} to schedule firmware update.<br />
#Restart the system.<br />
#The computer will be restarted and the UEFI BIOS will be updated.<br />
<br />
=== Sleep/Suspend ===<br />
<br />
The BIOS has two "Sleep State" options, Windows and Linux, which you can find in at {{ic|Config -> Power -> Sleep State}}. The Linux option is the traditional S3 power state where all hardware components are turned off except for the RAM, and it should work normally. The Windows option is a newer software-based "modern standby" which works on Linux (despite the name). One possible benefit to the Windows sleep state is faster wake up time, and one possible drawback is increased power usage.<br />
<br />
Mark Pearson, a Lenovo employee, [https://forums.lenovo.com/t5/Fedora/Fedora-32-Workstation-image-for-Thinkpad-P1G2/m-p/5042732?page=1#5156832 recommends using the "Windows" sleep state option] as it is better supported on modern Intel processors. The same is true for other modern Thinkpads [https://forums.lenovo.com/t5/Other-Linux-Discussions/T14-AMD-battery-drain-in-standby-Linux/m-p/5037674?page=3#5189273 except for AMD models] (as of November 2020).<br />
<br />
=== S3 Suspend Bug with Bluetooth Devices ===<br />
<br />
Occasionally your Thinkpad will wake up immediately after suspending with certain [[bluetooth]] devices added. To prevent this, remove the devices or disable [[bluetooth]] before suspending.<br />
<br />
=== BIOS configurations ===<br />
<br />
* {{ic|Config -> Thunderbolt BIOS Assist Mode - Set to "Enabled"}}. When disabled, on Linux, power usage appears to be significantly higher because of a substantial number of CPU wakeups during s2idle.<br />
<br />
{{tip| You may need to disable Kernel DMA protection in {{ic|Security -> Virtualization -> Kernel DMA Protection - Set to "Disabled"}}}}<br />
<br />
== Firmware issues ==<br />
<br />
The following issues can all be resolved by upgrading the firmware with fwupdmgr (''see [[#Updates|#BIOS Updates]]''), but there may be alternative manual/temporary fixes.<br />
<br />
=== Touchpad issues ===<br />
<br />
Due to a bug in a touchpad firmware, the touchpad might not work with following logs in [[dmesg]]:<br />
{{bc|<br />
[ 4.499490] i2c_designware i2c_designware.1: i2c_dw_handle_tx_abort: lost arbitration<br />
[...]<br />
[ 12.668795] i2c_hid i2c-SYNA8005:00: failed to set a report to device.<br />
[ 13.678765] i2c_designware i2c_designware.1: controller timed out<br />
}}<br />
<br />
=== Freeze when suspending ===<br />
<br />
There are reports of the system freezing after initiating a suspend or hibernate. A temporary fix is to add {{ic|1=snd_hda_intel.dmic_detect=0}} to your kernel parameters. see [https://www.reddit.com/r/archlinux/comments/e5oe4p/systemctl_suspend_causes_freeze/fa8mzft/]. This temporary fix is somehow disable the microphone, use this at your own risk<br />
<br />
=== Power management/Throttling issues ===<br />
<br />
A [https://web.archive.org/web/20191114160718/https://forums.lenovo.com/t5/Other-Linux-Discussions/X1C6-T480s-low-cTDP-and-trip-temperature-in-Linux/td-p/4028489/highlight/true bug] causes the CPU to consume less power than under Windows and throttle at 80°C instead of 97°. <br />
<br />
Lenovo has confirmed the issue, [https://web.archive.org/web/20191115170150/https://forums.lenovo.com/t5/Other-Linux-Discussions/X1C6-T480s-low-cTDP-and-trip-temperature-in-Linux/m-p/4534535/highlight/true#M13642 explained the cause] and published [https://web.archive.org/web/20191114160928/https://forums.lenovo.com/t5/Other-Linux-Discussions/X1C6-T480s-low-cTDP-and-trip-temperature-in-Linux/m-p/4535310/highlight/true#M13653 updates for the embedded controller and the BIOS] to LVFS .<br />
<br />
The alternative fix is to install {{Pkg|throttled}}, then [[start/enable]] {{ic|lenovo_fix.service}}.<br />
<br />
== Audio ==<br />
<br />
This laptop requires {{Pkg|sof-firmware}} and {{Pkg|alsa-ucm-conf}} in order for the soundcard to work. See [[Advanced Linux Sound Architecture#ALSA firmware]].<br />
<br />
=== Clicking/cracking noise when using headphones ===<br />
<br />
If you are hearing clicking/cracking noises when using headphones, this command helped me. I have to run it after each restart.<br />
<br />
# hda-verb /dev/snd/hwC0D0 0x1d SET_PIN_WIDGET_CONTROL 0x0<br />
<br />
=== Clicking/cracking noise when using speakers ===<br />
<br />
The newest alsa-ucm-conf is missing the speakers configuration. Downgrade it to 1.2.3-2.<br />
<br />
# downgrade alsa-ucm-conf<br />
<br />
=== Microphone ===<br />
<br />
On version 5.3 and newer the SOF firmware can be enabled, see [[{{TALKPAGENAME}}#Microphone|Talk#Microphone]].<br />
<br />
== Camera ==<br />
=== Secondary IR webcam ===<br />
<br />
Some models of this laptop include a second infrared (IR) [[webcam]] (originally to be used with Windows Hello) which is uncovered by the privacy slider. {{ic|v4l2-ctl --list-devices}} will show all available video devices. The IR emitter can be manipulated using [https://github.com/PetePriority/chicony-ir-toggle chicony-ir-toggle].<br />
<br />
Facial authentication can be archived using [[Howdy]].<br />
<br />
== Function Keys ==<br />
<br />
In the firmware configuration it is possible to swap the Ctrl and Fn 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}} || {{Yes}} || {{ic|XF86AudioMute}}<br />
|-<br />
| {{ic|Fn+F2}} || {{Yes}} || {{Yes}} || {{ic|XF86AudioLowerVolume}}<br />
|-<br />
| {{ic|Fn+F3}} || {{Yes}} || {{Yes}} || {{ic|XF86AudioRaiseVolume}}<br />
|-<br />
| {{ic|Fn+F4}} || {{Yes}} || {{Yes}} || {{ic|XF86AudioMicMute}}<br />
|-<br />
| {{ic|Fn+F5}} || {{Yes}} || {{Yes}} || {{ic|XF86MonBrightnessDown}}<br />
|-<br />
| {{ic|Fn+F6}} || {{Yes}} || {{Yes}} || {{ic|XF86MonBrightnessUp}}<br />
|-<br />
| {{ic|Fn+F7}} || {{Yes}} || {{Yes}} || {{ic|XF86Display}}<br />
|-<br />
| {{ic|Fn+F8}} || {{Yes}} || {{Yes}} || {{ic|XF86WLAN}}<br />
|-<br />
| {{ic|Fn+F9}} || {{Yes}} || {{Yes}} || {{ic|XF86Tools}}<br />
|-<br />
| {{ic|Fn+F10}} || {{Yes}} || {{Yes}} || {{ic|XF86Bluetooth}}<br />
|-<br />
| {{ic|Fn+F11}} || {{No}} || {{Yes}} || No Effect<br />
|-<br />
| {{ic|Fn+F12}} || {{Yes}} || {{Yes}} || {{ic|XF86Favorites}}<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 />
<br />
== Fingerprint sensor ==<br />
<br />
An official Lenovo firmware with Linux support is available from [[fwupd]]. After installing fwupd, you can update the Synaptics Prometheus driver for the fingerprint sensor:<br />
<br />
# fwupdmgr refresh<br />
# fwupdmgr get-updates<br />
Prometheus Fingerprint Reader Device Update:<br />
New version: 10.01.3158804<br />
New features and enhancements: Support Linux system<br />
# fwupdmgr update<br />
<br />
To use the fingerprint sensor, follow the instructions from [[Fprint]].<br />
<br />
If you had previously installed the testing version of this driver from lvfs-testing, there should be no issues updating to this driver version from the main repository.<br />
<br />
== Ethernet ==<br />
<br />
The internal NIC combined with the [https://www.lenovo.com/no/no/accessories-and-monitors/cables-and-adapters/adapters/CABLE-BO-Ethernet-Extension-Adapter-2/p/4X90Q84427 Thinkpad Ethernet Extension Adapter Gen 2] that comes with the Gen 7 works just fine. Although some users seems to be having problems: [https://forums.lenovo.com/t5/Other-Linux-Discussions/Lenovo-Ethernet-dongles-stop-working-after-recent-Linux-updates/m-p/4536718 The built-in ethernet adapter no longer works, approximately since kernel 5.0.]<br />
<br />
== Mobile broadband ==<br />
<br />
The Fibocom LTE module has Linux support once switched to USB mode; see [https://forums.lenovo.com/t5/Other-Linux-Discussions/How-To-Configure-X1-Carbon-Gen-7-on-Debian-FingerPrint-4G-Modem/td-p/4550327] and [https://github.com/abrasive/xmm7360]<br />
<br />
== Disabling red LED in ThinkPad logo ==<br />
<br />
You can temporarily disable the red LED in the ThinkPad logo on the cover:<br />
<br />
1. Enable writing to the embedded controller registers by adding the kernel parameter {{ic|1=ec_sys.write_support=1}}. <br />
If you use UEFI boot, you can add this parameter in {{ic|/boot/efi/loader/entries/arch.conf}} under "options".<br />
<br />
2. Disable the LED with this command: <br />
<br />
# echo -n -e "\x0a" | dd of="/sys/kernel/debug/ec/ec0/io" bs=1 seek=12 count=1 conv=notrunc 2> /dev/null<br />
<br />
This would need to be run after each suspend/reboot to be permanent.<br />
<br />
== See also ==<br />
<br />
* https://www.thinkwiki.org/wiki/ThinkWiki<br />
* [https://gist.github.com/greigdp/bb70fbc331a0aaf447c2d38eacb85b8f Dell XPS 13 9370 quirks]: Some pointers on getting Watt usage down to ~2W, Intel video powersaving features might be interesting, see also the [[Intel graphics]] page for interesting power-saving options.<br />
* [https://01.org/blogs/rzhang/2015/best-practice-debug-linux-suspend/hibernate-issues Intel Blog: Best practice to debug Linux* suspend/hibernate issues], including the [https://github.com/01org/pm-graph pm-graph] tool to analyze power usage during suspend<br />
* [https://forums.linuxmint.com/viewtopic.php?t=91453 How to fix volume control (ALSA problem)] This is where the volume fix came from originally.<br />
* [https://docs.microsoft.com/en-us/windows/win32/power/system-power-states Windows System Power States]<br />
* [https://www.kernel.org/doc/html/latest/admin-guide/pm/sleep-states.html System Sleep States at kernel.org]</div>Goetzchttps://wiki.archlinux.org/index.php?title=Lenovo_ThinkPad_X1_Carbon_(Gen_8)&diff=720878Lenovo ThinkPad X1 Carbon (Gen 8)2022-03-01T18:22:29Z<p>Goetzc: /* NFC */ link style</p>
<hr />
<div>[[Category:Lenovo]]<br />
[[zh-hans:Lenovo ThinkPad X1 Carbon (Gen 8)]]<br />
{{Laptop style|Needs hardware IDs and a function keys section}}<br />
<br />
{| class="wikitable" style="float: right;"<br />
|-<br />
! Hardware !! PCI/USB ID !! Working?<br />
|-<br />
| Video || || {{Yes}}<br />
|-<br />
| Wireless || || {{Yes}}<br />
|-<br />
| Ethernet || || {{Yes}}<br />
|-<br />
| Mobile broadband || || {{Yes}}<br />
|-<br />
| Audio || || {{Yes}}<br />
|-<br />
| TouchPad || || {{Yes}}<br />
|-<br />
| TrackPoint || || {{Yes}}<br />
|-<br />
| Webcam || || {{Yes}}<br />
|-<br />
| Fingerprint reader || || {{Yes}}<br />
|-<br />
| Bluetooth || || {{Yes}}<br />
|-<br />
| NFC || || {{No}}<br />
|}<br />
<br />
{{Related articles start}}<br />
{{Related|Lenovo ThinkPad X1 Carbon}}<br />
{{Related|Lenovo ThinkPad X1 Carbon (Gen 2)}}<br />
{{Related|Lenovo ThinkPad X1 Carbon (Gen 3)}}<br />
{{Related|Lenovo ThinkPad X1 Carbon (Gen 4)}}<br />
{{Related|Lenovo ThinkPad X1 Carbon (Gen 5)}}<br />
{{Related|Lenovo ThinkPad X1 Carbon (Gen 6)}}<br />
{{Related|Lenovo ThinkPad X1 Carbon (Gen 7)}}<br />
{{Related|Lenovo ThinkPad X1 Carbon (Gen 9)}}<br />
{{Related|Lenovo ThinkPad X1 Yoga (Gen 3)}}<br />
{{Related|Lenovo ThinkPad X1 Yoga (Gen 4)}}<br />
{{Related articles end}}<br />
<br />
== Firmware ==<br />
<br />
[https://blogs.gnome.org/hughsie/2018/08/06/please-welcome-lenovo-to-the-lvfs/ In August of 2018 Lenovo has joined] the [https://fwupd.org/ Linux Vendor Firmware Service (LVFS)] project, which enables firmware updates from within the OS.<br />
BIOS updates (and possibly other firmware such as the Thunderbolt controller) can be queried for and installed through [[fwupd]].<br />
<br />
Lenovo may in the future provide cabinet files that can be directly installed with fwupdmgr.<br />
Check for Linux ''.cab'' files from the [https://pcsupport.lenovo.com/de/de/products/laptops-and-netbooks/thinkpad-x-series-laptops/thinkpad-x1-carbon-8th-gen-type-20u9-20ua/20u9/parts/display/compatible Lenovo ThinkPad X1 Carbon (Gen 8) driver website].<br />
<br />
== Power management ==<br />
<br />
The BIOS has two ''Sleep State'' options, Windows and Linux, which you can find in at ''Config > Power > Sleep State''. The Linux option is the traditional S3 power state where all hardware components are turned off except for the RAM, and it should work normally. The Windows option is a newer software-based "modern standby" which works on Linux (despite the name). One possible benefit to the Windows sleep state is faster wake up time, and one possible drawback is increased power usage.<br />
<br />
== Audio ==<br />
<br />
See [[Lenovo ThinkPad X1 Carbon (Gen 7)#Audio]].<br />
<br />
== Brightness control ==<br />
<br />
See [[acpid#Enabling backlight control]] if the LCD brightness keys do not work by default.<br />
<br />
== NFC ==<br />
<br />
Lenovo developers do not think NFC is a priority as of [https://forums.lenovo.com/t5/_/X1-Carbon-Gen8-coming-with-Fedora-Linux/m-p/5011378#5042158 August 2020].<br />
<br />
== See also ==<br />
<br />
* [https://psref.lenovo.com/syspool/Sys/PDF/ThinkPad/ThinkPad_X1_Carbon_Gen_8/ThinkPad_X1_Carbon_Gen_8_Spec.pdf Product Specifications Reference (PSREF)]<br />
* [https://download.lenovo.com/pccbbs/mobiles_pdf/x1_yoga_gen5_x1_carbon_gen8_hmm_en.pdf Hardware maintenance manual]<br />
* [https://download.lenovo.com/pccbbs/mobiles_pdf/x1_yoga_g5_x1_carbon_g8_ug_en.pdf User guide]<br />
* https://ubuntu.com/certified/202005-27937</div>Goetzchttps://wiki.archlinux.org/index.php?title=KDE&diff=702063KDE2021-11-15T16:12:14Z<p>Goetzc: /* SQLite */ move warning to the top of the section</p>
<hr />
<div>[[Category:KDE]]<br />
[[de:KDE]]<br />
[[es:KDE]]<br />
[[fa:KDE]]<br />
[[fr:KDE]]<br />
[[ja:KDE]]<br />
[[ko:KDE]]<br />
[[pl:KDE]]<br />
[[pt:KDE]]<br />
[[ru:KDE]]<br />
[[zh-hans:KDE]]<br />
{{Related articles start}}<br />
{{Related|Desktop environment}}<br />
{{Related|Display manager}}<br />
{{Related|Window manager}}<br />
{{Related|Qt}}<br />
{{Related|SDDM}}<br />
{{Related|Dolphin}}<br />
{{Related|KDE Wallet}}<br />
{{Related|KDevelop}}<br />
{{Related|Trinity}}<br />
{{Related|Uniform look for Qt and GTK applications}}<br />
{{Related|Official repositories#kde-unstable}}<br />
{{Related articles end}}<br />
<br />
KDE is a software project currently comprising a [[desktop environment]] known as Plasma, a collection of libraries and frameworks (KDE Frameworks) and several applications (KDE Applications) as well. KDE upstream has a well maintained [https://userbase.kde.org/ UserBase wiki]. Detailed information about most KDE applications can be found there.<br />
<br />
== Installation ==<br />
<br />
=== Plasma ===<br />
<br />
Before installing Plasma, make sure you have a working [[Xorg]] installation on your system.<br />
<br />
[[Install]] the {{Pkg|plasma-meta}} meta-package or the {{Grp|plasma}} group. For differences between {{Pkg|plasma-meta}} and {{Grp|plasma}} reference [[Package group]]. Alternatively, for a more minimal Plasma installation, install the {{Pkg|plasma-desktop}} package.<br />
<br />
To enable support for [[Wayland]] in Plasma, also [[install]] the {{Pkg|plasma-wayland-session}} package. If you are an [[NVIDIA]] user, also install {{Pkg|egl-wayland}}, and if the session does not start with the proprietary {{Pkg|nvidia}} driver, also enable the [[NVIDIA#DRM kernel mode setting|DRM kernel mode setting]]. If that does not work, too, check the instructions on the [https://community.kde.org/Plasma/Wayland/Nvidia KDE wiki].<br />
<br />
=== KDE applications ===<br />
<br />
To install the full set of KDE Applications, install the {{Grp|kde-applications}} group or the {{Pkg|kde-applications-meta}} meta-package. If you only want KDE applications for a certain category such as games or education, install the relevant dependency of {{Pkg|kde-applications-meta}}. Note that this will only install applications, it will not install any version of Plasma.<br />
<br />
=== Unstable releases ===<br />
<br />
See [[Official repositories#kde-unstable]].<br />
<br />
== Starting Plasma ==<br />
<br />
{{Note|Although it is possible to launch Plasma under [[Wayland]], there are some missing features and known problems. See [https://community.kde.org/Plasma/Wayland_Showstoppers Wayland Showstoppers] for a list of issues and the [https://phabricator.kde.org/project/board/99/ Plasma on Wayland workboard] for the current state of development. Use [[Xorg]] for the most complete and stable experience.}}<br />
<br />
Plasma can be started either using a [[display manager]], or from the console.<br />
<br />
=== Using a display manager ===<br />
<br />
* Select ''Plasma (X11)'' to launch a new session in [[Xorg]].<br />
* Select ''Plasma (Wayland)'' to launch a new session in [[Wayland]].<br />
<br />
=== From the console ===<br />
<br />
* To start Plasma with [[xinit|xinit/startx]], append {{ic|1=export DESKTOP_SESSION=plasma}} and {{ic|exec startplasma-x11}} to your {{ic|.xinitrc}} file. If you want to start Xorg at login, please see [[Start X at login]].<br />
* To start a Plasma on Wayland session from a console, run {{ic|1=XDG_SESSION_TYPE=wayland dbus-run-session startplasma-wayland}}.[https://community.kde.org/KWin/Wayland#Start_a_Plasma_session_on_Wayland]<br />
<br />
== Configuration ==<br />
<br />
Most settings for KDE applications are stored in {{ic|~/.config/}}. However, configuring KDE is primarily done through the '''System Settings''' application. It can be started from a terminal by executing {{ic|systemsettings5}}.<br />
<br />
=== Personalization ===<br />
<br />
==== Plasma desktop ====<br />
<br />
===== Themes =====<br />
<br />
[https://store.kde.org/browse?cat=104/ Plasma themes] define the look of panels and Plasma widgets. For easy system-wide installation, some themes are available in both the official repositories and the [https://aur.archlinux.org/packages.php?K=plasma+theme AUR].<br />
<br />
Plasma themes can also be installed through ''System Settings > Global Theme > Get New Global Themes...''.<br />
<br />
The [https://store.kde.org/ KDE Store] offers more Plasma customizations, like [[SDDM]] themes and splash-screens.<br />
<br />
====== GTK application appearance ======<br />
<br />
{{Tip|For Qt and GTK theme consistency, see [[Uniform look for Qt and GTK applications]].}}<br />
<br />
The recommended theme for a pleasant appearance in GTK applications is {{Pkg|breeze-gtk}}, a GTK theme designed to mimic the appearance of Plasma's Breeze theme.<br />
Install {{Pkg|kde-gtk-config}} (part of the {{grp|plasma}} group) and select {{ic|Breeze}} as the GTK theme in ''System Settings > Application Style > Configure GNOME/GTK Application Style...''.<br />
<br />
{{Out of date|The Plasma GTKd background service overwrites GTK settings on Plasma startup.}}<br />
<br />
In some themes, tooltips in GTK applications have white text on white backgrounds making it difficult to read. To change the colors in GTK2 applications, find the section for tooltips in the {{ic|.gtkrc-2.0}} file and change it. For GTK3 application two files need to be changed, {{ic|gtk.css}} and {{ic|settings.ini}}.<br />
<br />
Some GTK2 programs like {{AUR|vuescan-bin}} still look hardly usable due to invisible checkboxes with the Breeze or Adwaita skin in a Plasma session. To workaround this, install and select e.g. the Numix-Frost-Light skin of the {{AUR|numix-frost-themes}} under ''System Settings'' > ''Application Style'' > ''Configure GNOME/GTK Application Style...'' > ''GTK2 theme:''. Numix-Frost-Light looks similar to Breeze.<br />
<br />
===== Faces =====<br />
<br />
Plasma and [[SDDM]] will both use images found at {{ic|/var/lib/AccountsService/icons/}} as users' avatars. To configure with a graphical interface, you can use ''System Settings > Users'', which may first need to be [[install]]ed (see the {{Pkg|plasma-desktop}} package). The file corresponding to your username can be removed to restore the default avatar.<br />
<br />
===== Widgets =====<br />
<br />
Plasmoids are little scripted (plasmoid scripts) or coded (plasmoid binaries) KDE applications designed to enhance the functionality of your desktop.<br />
<br />
The easiest way to install plasmoid scripts is by right-clicking onto a panel or the desktop and choosing ''Add Widgets > Get New Widgets... > Download New Plasma Widgets''. This will present a nice frontend for https://store.kde.org/ that allows you to install, uninstall, or update third-party plasmoid scripts with literally just one click.<br />
<br />
Many Plasmoid binaries are available from the [https://aur.archlinux.org/packages.php?K=plasmoid AUR].<br />
<br />
===== Sound applet in the system tray =====<br />
<br />
[[Install]] {{Pkg|plasma-pa}} or {{Pkg|kmix}} (start Kmix from the Application Launcher). {{Pkg|plasma-pa}} is now installed by default with {{Grp|plasma}}, no further configuration needed.<br />
<br />
{{Note|1=To adjust the [https://bugs.kde.org/show_bug.cgi?id=313579#c28 step size of volume increments/decrements], add e.g. {{ic|1=VolumePercentageStep=1}} in the {{ic|[Global]}} section of {{ic|~/.config/kmixrc}}.}}<br />
<br />
===== Disable panel shadow =====<br />
<br />
As the Plasma panel is on top of other windows, its shadow is drawn over them. [https://bbs.archlinux.org/viewtopic.php?pid=1228394#p1228394] To disable this behaviour without impacting other shadows, [[install]] {{Pkg|xorg-xprop}} and run:<br />
<br />
$ xprop -remove _KDE_NET_WM_SHADOW<br />
<br />
then select the panel with the plus-sized cursor. [https://forum.kde.org/viewtopic.php?f=285&t=121592] For automation, install {{Pkg|xorg-xwininfo}} and create the following script:<br />
<br />
{{hc|/usr/local/bin/kde-no-shadow|<nowiki><br />
#!/bin/bash<br />
for WID in $(xwininfo -root -tree | sed '/"Plasma": ("plasmashell" "plasmashell")/!d; s/^ *\([^ ]*\) .*/\1/g'); do<br />
xprop -id $WID -remove _KDE_NET_WM_SHADOW<br />
done<br />
</nowiki>}}<br />
<br />
Make the script [[executable]].<br />
<br />
The script can be run on login with ''Add Script'' in ''Autostart'':<br />
<br />
$ kcmshell5 autostart<br />
<br />
===== Display scaling / High DPI displays =====<br />
<br />
See [[HiDPI#KDE Plasma]].<br />
<br />
==== Window decorations ====<br />
<br />
[https://store.kde.org/browse/cat/114/ Window decorations] can be changed in ''System Settings > Application Style > Window Decorations''.<br />
<br />
There you can also directly download and install more themes with one click, and some are available in the [https://aur.archlinux.org/packages.php?K=kde+window+decoration AUR].<br />
<br />
==== Icon themes ====<br />
<br />
Icon themes can be installed and changed on ''System Settings > Icons''.<br />
<br />
{{Note|Although all modern Linux desktops share the same icon theme format, desktops like [[GNOME]] use fewer icons (esp. in menus and toolbars). Themes developed for such desktops usually lack icons required by Plasma and KDE apps. It is recommended to install Plasma compatible icon themes instead.}}<br />
<br />
{{Tip|Since some icon themes do not inherit from the default icon theme, some icons may be missing. <br />
To inherit from the Breeze, add {{ic|breeze}} to the {{ic|1=Inherits=}} array in {{ic|/usr/share/icon/''theme-name''/index.theme}}, for example: {{ic|1=Inherits=breeze,hicolor}}. You need to reapply this patch after every update to the icon theme, consider using [[Pacman hooks]] to automate the process.}}<br />
<br />
==== Space efficiency ====<br />
<br />
The Plasma Netbook shell has been dropped from Plasma 5, see the following [https://forum.kde.org/viewtopic.php?f=289&t=126631&p=335947&hilit=plasma+netbook#p335899 KDE forum post]. However, you can achieve something similar by editing the file {{ic|~/.config/kwinrc}} adding {{ic|1=BorderlessMaximizedWindows=true}} in the {{ic|[Windows]}} section.<br />
<br />
==== Thumbnail generation ====<br />
<br />
To allow thumbnail generation for media or document files on the desktop and in Dolphin, install {{Pkg|kdegraphics-thumbnailers}} and {{Pkg|ffmpegthumbs}}.<br />
<br />
Then enable the thumbnail categories for the desktop via ''right click'' on the ''desktop background'' > ''Configure Desktop'' > ''Icons'' > ''Configure Preview Plugins...''.<br />
<br />
In ''Dolphin'', navigate to ''Control'' > ''Configure Dolphin...'' > ''General'' > ''Previews''.<br />
<br />
=== Night Color ===<br />
<br />
Plasma provides a [[Redshift]]-like feature (working on both [[Xorg]] and [[Wayland]]) called Night Color. It makes the colors on the screen warmer to reduce eye strain at the time of your choosing. It can be enabled in ''System Settings > Display and Monitor > Night Color''.<br />
<br />
{{Tip|To have a handy System Tray on/off button for night color you need the {{Pkg|kdeplasma-addons}} and then you can add it.}}<br />
<br />
=== Printing ===<br />
<br />
{{Tip|Use the [[CUPS]] web interface for faster configuration. Printers configured in this way can be used in KDE applications. }}<br />
<br />
You can also configure printers in ''System Settings > Printers''. To use this method, you must first install the following packages {{Pkg|print-manager}}, {{Pkg|cups}}, {{Pkg|system-config-printer}}. See [[CUPS#Configuration]].<br />
<br />
=== Samba/Windows support ===<br />
<br />
If you want to have access to Windows services, install [[Samba]] (package {{Pkg|samba}}).<br />
<br />
The Dolphin share functionality requires the package {{Pkg|kdenetwork-filesharing}} and usershares, which the stock {{ic|smb.conf}} does not have enabled. Instructions to add them are in [[Samba#Enable Usershares]], after which sharing in Dolphin should work out of the box after restarting Samba.<br />
<br />
{{Tip|Use {{ic|*}} (asterisk) for both username and password when accessing a Windows share without authentication in Dolphin's prompt.}}<br />
<br />
Unlike GTK file browsers which utilize GVfs also for the launched program, opening files from Samba shares in Dolphin via KIO makes Plasma copy the whole file to the local system first with most programs (VLC is an exception).<br />
To workaround this, you can use a GTK based file browser like {{Pkg|thunar}} with {{Pkg|gvfs}} and {{Pkg|gvfs-smb}} (and {{Pkg|gnome-keyring}} for saving login credentials) to access SMB shares in a more able way.<br />
<br />
Another possibility is to [[mount]] a Samba share via {{Pkg|cifs-utils}} to make it look to Plasma like if the SMB share was just a normal local folder and thus can be accessed normally.<br />
See [[Samba#Manual mounting]] and [[Samba#Automatic mounting]].<br />
<br />
An GUI solution is available with {{AUR|samba-mounter-git}}, which offers basically the same functionality via an easy to use option located at ''System Settings'' > ''Network Drivers''. However, it might break with new KDE Plasma versions.<br />
<br />
=== KDE Desktop activities ===<br />
<br />
[https://userbase.kde.org/Plasma#Activities KDE Desktop Activities] are special workspaces where you can select specific settings for each activity that apply only when you are using said activity.<br />
<br />
=== Power management ===<br />
<br />
[[Install]] {{Pkg|powerdevil}} for an integrated Plasma power managing service. This service offers additional power saving features, monitor brightness control (if supported) and battery reporting including peripheral devices.<br />
<br />
{{Tip|<br />
* An alternative package without [[NetworkManager]] and [[Bluez]] dependencies is provided by {{AUR|powerdevil-light}}.<br />
* An alternative package with [[Wikipedia:DDC/CI|DDC/CI]]-enabled [[backlight]] control for external monitors is provided by {{AUR|powerdevil-ddcutil}}.<br />
}}<br />
<br />
{{Accuracy|Regarding the note below, it might be that the problem is the logind setting ''LidSwitchIgnoreInhibited'' which defaults to ''yes''. [https://bbs.archlinux.org/viewtopic.php?pid&#61;1649022#p1649022]}}<br />
<br />
{{Note|Powerdevil may not [[Power management#Power managers|inhibit]] all logind settings (such as the lid close action for laptops). In these cases, the logind setting itself will need to be changed - see [[Power management#Power management with systemd]].}}<br />
<br />
=== Autostart ===<br />
<br />
Plasma can autostart applications and run scripts on startup and shutdown. To autostart an application, navigate to ''System Settings > Startup and Shutdown > Autostart'' and add the program or shell script of your choice. For applications, a ''.desktop'' file will be created, for login scripts, a ''.desktop'' file launching the script will be created.<br />
<br />
{{Note|<br />
* Programs can be autostarted on login only, whilst shell scripts can also be run on shutdown or even before Plasma itself starts.<br />
* Shell scripts will only be run if they are marked [[executable]].<br />
* Shell scripts previously placed in {{ic|~/.config/autostart-scripts/}} will get [https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/736 automatically migrated to .desktop files].<br />
}}<br />
<br />
* Place [[Desktop entries]] (i.e. ''.desktop'' files) in the appropriate [[XDG Autostart]] directory.<br />
* Place or symlink shell scripts in one of the following directories:<br />
<br />
:; {{ic|~/.config/plasma-workspace/env/}}: for executing scripts at login before launching Plasma.<br />
:; {{ic|~/.config/plasma-workspace/shutdown/}}: for executing scripts when Plasma exits.<br />
<br />
See [https://docs.kde.org/trunk5/en/plasma-workspace/kcontrol/autostart/index.html official documentation].<br />
<br />
=== Phonon ===<br />
<br />
From [[Wikipedia:Phonon (software)|Wikipedia]]:<br />
<br />
:Phonon is the multimedia API provided by KDE and is the standard abstraction for handling multimedia streams within KDE software and also used by several Qt applications.<br />
<br />
:Phonon was originally created to allow KDE and Qt software to be independent of any single multimedia framework such as GStreamer or xine and to provide a stable API for a major version's lifetime.<br />
<br />
Phonon is being widely used within KDE, for both audio (e.g., the System notifications or KDE audio apps) and video (e.g., the [[Dolphin]] video thumbnails).<br />
<br />
==== Which backend should I choose? ====<br />
<br />
You can choose between backends based on [[GStreamer]] and [[VLC]] – each available in versions for Qt4 applications and Qt5 applications ({{AUR|phonon-qt4-gstreamer}}, {{Pkg|phonon-qt5-gstreamer}} – {{AUR|phonon-qt4-vlc}}, {{Pkg|phonon-qt5-vlc}}).<br />
<br />
[https://www.phoronix.com/scan.php?page=news_item&px=MTUwNDM Upstream prefers VLC] but prominent Linux distributions (Kubuntu and Fedora-KDE for example) prefer GStreamer because that allows them to easily leave out patented MPEG codecs from the default installation. Both backends have a slightly different [https://community.kde.org/Phonon/FeatureMatrix features set]. The Gstreamer backend has some optional codec dependency, install them as needed:<br />
<br />
* {{Pkg|gst-libav}} — Libav codecs.<br />
* {{Pkg|gst-plugins-good}} — PulseAudio support and additional codecs.<br />
* {{Pkg|gst-plugins-ugly}} — additional codecs.<br />
* {{Pkg|gst-plugins-bad}} — additional codecs.<br />
<br />
In the past other backends were developed as well but are no longer maintained and their AUR packages have been deleted.<br />
<br />
{{Note|1=<br><br />
* Multiple backends can be installed at once and prioritized via the ''phononsettings'' application.<br />
* According to the [https://forum.kde.org/viewtopic.php?f=250&t=126476&p=335080 KDE forums], the VLC backend lacks support for [[wikipedia:ReplayGain|ReplayGain]].<br />
* If using the VLC backend, you may experience crashes every time Plasma wants to send you an audible warning and in quite a number of other cases as well [https://forum.kde.org/viewtopic.php?f=289&t=135956]. A possible fix is to rebuild the VLC plugins cache:<br />
{{bc|# /usr/lib/vlc/vlc-cache-gen /usr/lib/vlc/plugins}}<br />
}}<br />
<br />
=== Backup and restore ===<br />
<br />
KDE Plasma 5 stores personalized desktop settings as configuration files in the [[XDG Base Directory#Specification|XDG_CONFIG_HOME]] folder. Use the [https://github.com/shalva97/kde-configuration-files detail of configuration files] to select and choose a [https://www.addictivetips.com/ubuntu-linux-tips/backup-kde-plasma-5-desktop-linux/ method of backup and restore].<br />
<br />
=== systemd startup ===<br />
<br />
Plasma has introduced an optional new startup method which uses a [[systemd/User|systemd user]] instance to launch and manage all the Plasma services instead of the boot scripts. This is off by default, but can be [https://invent.kde.org/plasma/plasma-workspace/-/wikis/Plasma-and-the-systemd-boot enabled with the following command]:<br />
<br />
$ kwriteconfig5 --file startkderc --group General --key systemdBoot true<br />
<br />
To confirm the boot worked correctly you can run:<br />
<br />
$ systemctl --user status plasma-plasmashell.service<br />
<br />
More details about the implementation can be read in [https://blog.davidedmundson.co.uk/blog/plasma-and-the-systemd-startup/ Edmundson's blog: plasma and the systemd startup].<br />
<br />
=== Spell checking ===<br />
<br />
KDE applications use {{Pkg|sonnet}} for spell checking. See its optional dependencies for the supported [[spell checker]]s.<br />
<br />
Configure it in ''System Settings > Regional Settings > Spell Check''.<br />
<br />
=== Running kwin wayland on NVIDIA ===<br />
<br />
See https://community.kde.org/Plasma/Wayland/Nvidia.<br />
<br />
== Applications ==<br />
<br />
The KDE project provides a suite of applications that integrate with the Plasma desktop. See the {{Grp|kde-applications}} group for a full listing of the available applications. Also see [[:Category:KDE]] for related KDE application pages.<br />
<br />
Aside from the programs provided in KDE Applications, there are many other applications available that can complement the Plasma desktop. Some of these are discussed below.<br />
<br />
=== System administration ===<br />
<br />
==== Terminate Xorg server through KDE System Settings ====<br />
<br />
Navigate to the submenu ''System Settings > Input Devices > Keyboard > Advanced (tab) > "Key Sequence to kill the X server"'' and ensure that the checkbox is ticked.<br />
<br />
==== KCM ====<br />
<br />
KCM stands for ''KC''onfig ''M''odule. KCMs can help you configure your system by providing interfaces in System Settings, or through the command line with ''kcmshell5''.<br />
<br />
* {{App|sddm-kcm|KDE Config Module for [[SDDM]].|https://invent.kde.org/plasma/sddm-kcm|{{Pkg|sddm-kcm}}}}<br />
* {{App|kde-gtk-config|GTK2 and GTK3 Configurator for KDE.|https://invent.kde.org/plasma/kde-gtk-config|{{Pkg|kde-gtk-config}}}}<br />
* {{App|System policies|Set of configuration modules which allows administrator to change [[PolicyKit]] settings.|https://invent.kde.org/system/polkit-kde-kcmodules-1|{{AUR|kcm-polkit-kde-git}}}}<br />
* {{App|wacom tablet|KDE GUI for the Wacom Linux Drivers.|https://www.linux-apps.com/p/1127862/|{{Pkg|kcm-wacomtablet}}}}<br />
* {{App|Kcmsystemd|systemd control module for KDE.|https://github.com/rthomsen/kcmsystemd|{{AUR|systemd-kcm}}}}<br />
<br />
More KCMs can be found at [https://www.linux-apps.com/search/projectSearchText/kcm linux-apps.com].<br />
<br />
=== Desktop search ===<br />
<br />
KDE implements desktop search with a software called [[Baloo]], a file indexing and searching solution.<br />
<br />
=== Web browsers ===<br />
<br />
The following web browsers can integrate with Plasma:<br />
<br />
* {{App|[[Wikipedia:Konqueror|Konqueror]]|Part of the KDE project, supports two rendering engines – KHTML and the [[Chromium]]-based Qt WebEngine.|https://konqueror.org/|{{Pkg|konqueror}}}}<br />
* {{App|[[Wikipedia:Falkon|Falkon]]|A Qt web browser with Plasma integration features, previously known as Qupzilla. It uses Qt WebEngine.|https://userbase.kde.org/Falkon/|{{Pkg|falkon}}}}<br />
* {{App|[[Chromium]]|Chromium and its proprietary variant Google Chrome have limited Plasma integration. [[KDE Wallet#KDE Wallet for Chrome and Chromium|They can use KWallet]] and KDE Open/Save windows.|https://www.chromium.org/|{{Pkg|chromium}}}}<br />
* {{App|[[Firefox]]|Firefox can be configured to better integrate with Plasma. See [[Firefox#KDE integration]] for details.|https://mozilla.org/firefox|{{Pkg|firefox}}}}<br />
<br />
{{Tip|Starting from Plasma 5.13, one can integrate [[Firefox]] or [[Chrome]] with Plasma: providing media playback control from the Plasma tray, download notifications and find open tabs in KRunner. [[Install]] {{pkg|plasma-browser-integration}} and the corresponding browser add-on. Chrome/Chromium support should already be included, for Firefox add-on see [[Firefox#KDE integration]].}}<br />
<br />
=== PIM ===<br />
<br />
KDE offers its own stack for [[Wikipedia:Personal information management|personal information management]] (PIM). This includes emails, contacts, calendar, etc. To install all the PIM packages, you could use the {{Grp|kdepim}} package group or the {{Pkg|kde-pim-meta}} meta package.<br />
<br />
==== Akonadi ====<br />
<br />
Akonadi is a system meant to act as a local cache for PIM data, regardless of its origin, which can be then used by other applications. This includes the user's emails, contacts, calendars, events, journals, alarms, notes, and so on. Akonadi does not store any data by itself: the storage format depends on the nature of the data (for example, contacts may be stored in vCard format).<br />
<br />
Install {{Pkg|akonadi}}. For additional addons, install {{Pkg|kdepim-addons}}.<br />
<br />
{{Note|If you wish to use a database engine other than [[MariaDB]], then when installing the {{Pkg|akonadi}} package, use the following command to skip installing the {{Pkg|mariadb}} dependencies:<br />
<br />
# pacman -S akonadi --assume-installed mariadb<br />
<br />
See also {{Bug|32878}}.<br />
}}<br />
<br />
===== MySQL =====<br />
<br />
By default Akonadi will use {{ic|/usr/bin/mysqld}} ([[MariaDB]] by default, see [[MySQL]] for alternative providers) to run a managed MySQL instance with the database stored in {{ic|~/.local/share/akonadi/db_data/}}.<br />
<br />
====== System-wide MySQL instance ======<br />
<br />
Akonadi supports using the system-wide [[MySQL]] for its database.[https://techbase.kde.org/KDE_PIM/Akonadi#Can_Akonadi_use_a_normal_MySQL_server_running_on_my_system.3F]<br />
<br />
{{Expansion|Add instructions.}}<br />
<br />
{{hc|~/.config/akonadi/akonadiserverrc|2=<br />
[%General]<br />
Driver=QMYSQL<br />
<br />
[QMYSQL]<br />
Host=<br />
Name=akonadi_''username''<br />
Options="UNIX_SOCKET=/run/mysqld/mysqld.sock"<br />
StartServer=false<br />
}}<br />
<br />
===== PostgreSQL =====<br />
<br />
Akonadi supports either using the existing system-wide [[PostgreSQL]] instance, i.e. {{ic|postgresql.service}}, or running a PostgreSQL instance with user privileges and the database in {{ic|~/.local/share/akonadi/db_data/}}.<br />
<br />
====== Per-user PostgreSQL instance ======<br />
<br />
[[Install]] {{Pkg|postgresql}} and {{Pkg|postgresql-old-upgrade}}.<br />
<br />
Edit Akonadi configuration file so that it has the following contents:<br />
<br />
{{hc|~/.config/akonadi/akonadiserverrc|2=<br />
[%General]<br />
Driver=QPSQL<br />
}}<br />
<br />
{{Note|<br />
* When Akonadi starts, it will create the {{ic|[QPSQL]}} section and set the appropriate variables in it.<br />
* The database will be stored in {{ic|~/.local/share/akonadi/db_data/}}.<br />
}}<br />
<br />
Start Akonadi with {{ic|akonadictl start}}, and check its status: {{ic|akonadictl status}}.<br />
<br />
{{Note|<br />
* Starting with {{Pkg|akonadi}} 19.08.0-1 the PostgreSQL database cluster in {{ic|~/.local/share/akonadi/db_data/}} will get automatically upgraded when a major PostgreSQL version upgrade is detected.<br />
* For previous {{Pkg|akonadi}} versions major PostgreSQL version upgrades will require a manual database upgrade. Follow the [https://userbase.kde.org/Akonadi/Postgres_update update instructions on KDE UserBase Wiki]. Make sure to adjust the paths to PostgreSQL binaries to those used by {{Pkg|postgresql}} and {{Pkg|postgresql-old-upgrade}}, see [[PostgreSQL#Upgrading PostgreSQL]].<br />
}}<br />
<br />
====== System-wide PostgreSQL instance ======<br />
<br />
This requires an already configured and running [[PostgreSQL]].<br />
<br />
Create a PostgreSQL user account for your user:<br />
<br />
[postgres]$ createuser ''username''<br />
<br />
Create a database for Akonadi:<br />
<br />
[postgres]$ createdb -O ''username'' -E UTF8 --locale=C -T template0 akonadi-''username''<br />
<br />
Configure Akonadi to use the system-wide PostgreSQL:<br />
<br />
{{hc|~/.config/akonadi/akonadiserverrc|2=<br />
[%General]<br />
Driver=QPSQL<br />
<br />
[QPSQL]<br />
Host=/run/postgresql<br />
Name=akonadi-''username''<br />
StartServer=false<br />
}}<br />
<br />
{{Note|Custom port, username and password can be specified with options {{ic|1=Port=}}, {{ic|1=User=}}, {{ic|1=Password=}} in the {{ic|[QPSQL]}} section.}}<br />
<br />
Start Akonadi with {{ic|akonadictl start}}, and check its status: {{ic|akonadictl status}}.<br />
<br />
===== SQLite =====<br />
{{Warning|Using the SQLite backend is not recommended and should be avoided.[https://invent.kde.org/pim/akonadi/-/blob/master/INSTALL#L37]}}<br />
<br />
To use [[SQLite]] edit Akonadi configuration file to match the configuration below:<br />
<br />
{{hc|~/.config/akonadi/akonadiserverrc|2=<br />
[%General]<br />
Driver=QSQLITE3<br />
}}<br />
<br />
{{Note|<br />
* When Akonadi starts, it will create the {{ic|[QSQLITE3]}} section and set the appropriate variables in it.<br />
* The database will be stored as {{ic|~/.local/share/akonadi/akonadi.db}}.<br />
}}<br />
<br />
===== Disabling Akonadi =====<br />
<br />
See this [https://userbase.kde.org/Akonadi#Disabling_the_Akonadi_subsystem section in the KDE userbase].<br />
<br />
=== KDE Telepathy ===<br />
<br />
[https://community.kde.org/KTp KDE Telepathy] is a project with the goal to closely integrate Instant Messaging with the KDE desktop. It utilizes the Telepathy framework as a backend and is intended to replace Kopete.<br />
<br />
To install all Telepathy protocols, install the {{Grp|telepathy}} group.<br />
To use the KDE Telepathy client, install the {{Pkg|telepathy-kde-meta}} package that includes all the packages contained in the {{Grp|telepathy-kde}} group.<br />
<br />
==== Use Telegram with KDE Telepathy ====<br />
<br />
[[Telegram]] protocol is available using {{pkg|telepathy-haze}}, installing {{aur|telegram-purple}} or {{aur|telegram-purple-git}} and {{aur|telepathy-morse-git}}. The username is the Telegram account telephone number (complete with the national prefix {{ic|+''xx''}}, e.g. {{ic|+49}} for Germany).<br />
<br />
The configuration through the GUI may be tricky: if the phone number is not accepted when configuring a new account in the KDE Telepathy client (with an error message complaining about an invalid parameter which prevents the account creation), insert it between single quotes and then remove the quotes manually from the configuration file ({{ic|~/.local/share/telepathy/mission-control/accounts.cfg}}) after the account creation (if the quotes are not removed after, an authentication error should rise).<br />
<br />
{{Note|The configuration file should be edited manually when KDE Telepathy is not running, e.g. when there is no KDE desktop session active, otherwise manual changes may be overwritten by the software.}}<br />
<br />
=== KDE Connect ===<br />
<br />
[https://community.kde.org/KDEConnect KDE Connect] provides several features to connect your [[Android]] phone with your Linux desktop:<br />
<br />
* Share files and URLs to/from KDE from/to any app, without wires.<br />
* Touchpad emulation: Use your phone screen as your computer's touchpad.<br />
* Notifications sync (4.3+): Read your Android notifications from the desktop.<br />
* Shared clipboard: copy and paste between your phone and your computer.<br />
* Multimedia remote control: Use your phone as a remote for Linux media players.<br />
* WiFi connection: no usb wire or bluetooth needed.<br />
* RSA Encryption: your information is safe.<br />
<br />
You will need to install KDE Connect both on your computer and on your Android. For PC side, [[install]] {{Pkg|kdeconnect}} package. For Android side, install KDE Connect from [https://play.google.com/store/apps/details?id=org.kde.kdeconnect_tp Google Play] or from [https://f-droid.org/packages/org.kde.kdeconnect_tp/ F-Droid]. If you want to browse your phone's filesystem, you need to [[install]] {{Pkg|sshfs}} as well and configure filesystem exposes in your Android app.<br />
<br />
It is possible to use KDE Connect even if you do not use the Plasma desktop. For desktop environments that use AppIndicators, such as Unity, install {{AUR|indicator-kdeconnect}} package as well. For GNOME users, better integration can be achieved by installing {{AUR|gnome-shell-extension-gsconnect}} instead of {{Pkg|kdeconnect}}. To start the KDE Connect daemon manually, execute {{ic|/usr/lib/kdeconnectd}}.<br />
<br />
If you use a [[firewall]], you need to open UDP and TCP ports {{ic|1714}} through {{ic|1764}}.<br />
<br />
Sometimes, KDE Connect will not detect a phone. You can restart the services by running {{ic|killall kdeconnectd}} and then opening kdeconnect in system settings or running {{ic|kdeconnect-cli --refresh}} followed by {{ic|kdeconnect-cli -l}}.<br />
<br />
== Tips and tricks ==<br />
<br />
=== Use a different window manager ===<br />
<br />
The component chooser settings in Plasma does not allow changing the window manager anymore. [https://github.com/KDE/plasma-desktop/commit/2f83a4434a888cd17b03af1f9925cbb054256ade]<br />
In order to change the window manager used you need to set the {{ic|KDEWM}} [[environment variable]] before KDE startup. The instructions are available on the KDE UserBase Wiki—[https://userbase.kde.org/Tutorials/Using_Other_Window_Managers_with_Plasma Tutorials/Using Other Window Managers with Plasma].<br />
<br />
{{Note|When using i3 window manager with Plasma, it may be necessary to manually set dialogs to open in floating mode in order for them to correctly appear. For more information, see [[i3#Correct handling of floating dialogs]].}}<br />
<br />
==== KDE/Openbox session ====<br />
<br />
The {{Pkg|openbox}} package provides a session for using KDE with [[Openbox]]. To make use of this session, select ''KDE/Openbox'' from the [[display manager]] menu.<br />
<br />
For those starting the session manually, add the following line to your [[xinit]] configuration:<br />
<br />
{{hc|~/.xinitrc|<br />
exec openbox-kde-session<br />
}}<br />
<br />
==== Re-enabling compositing effects ====<br />
<br />
When replacing Kwin with a window manager which does not provide a Compositor (such as Openbox), any desktop compositing effects e.g. transparency will be lost. In this case, install and run a separate Composite manager to provide the effects such as [[Xcompmgr]] or [[Compton]].<br />
<br />
=== Configuring monitor resolution / multiple monitors ===<br />
<br />
To enable display resolution management and multiple monitors in Plasma, install {{Pkg|kscreen}}. This provides additional options to ''System Settings > Display and Monitor''.<br />
<br />
=== KWin-lowlatency ===<br />
<br />
[https://github.com/tildearrow/kwin-lowlatency KWin-lowlatency] is a attempt to reduce latency and stuttering in the popular KWin compositor, and is available as {{AUR|kwin-lowlatency}}.<br />
<br />
=== Configuring ICC profiles ===<br />
<br />
To enable [[ICC profiles]] in Plasma, [[install]] {{Pkg|colord-kde}}. This provides additional options to ''System Settings > Color Corrections''.<br />
<br />
ICC profiles can be imported using ''Add Profile''.<br />
<br />
=== Disable opening application launcher with Super key (Windows key) ===<br />
<br />
To disable this feature you currently can run the following command:<br />
<br />
$ kwriteconfig5 --file kwinrc --group ModifierOnlyShortcuts --key Meta ""<br />
<br />
=== Disable bookmarks showing in application menu ===<br />
<br />
With Plasma Browser integration installed, KDE will show bookmarks in the application launcher.<br />
<br />
To disable this feature you currently can run the following commands:<br />
<br />
$ mkdir ~/.local/share/kservices5<br />
$ sed 's/EnabledByDefault=true$/EnabledByDefault=false/' /usr/share/kservices5/plasma-runner-bookmarks.desktop > ~/.local/share/kservices5/plasma-runner-bookmarks.desktop<br />
<br />
=== IBus Integration ===<br />
<br />
[[IBus]] is an [[Input method#Input method framework|input method framework]] and can be integrated into KDE. See [[IBus#Integration]] for details.<br />
<br />
Using [[IBus]] may be required when using KDE on [[Wayland]] to offer accented characters and dead keys support [https://bugs.kde.org/show_bug.cgi?id=411729].<br />
<br />
=== Enable hotspot in plasma-nm ===<br />
<br />
See [[NetworkManager#Sharing internet connection over Wi-Fi]].<br />
<br />
=== Restore previous saved session ===<br />
<br />
If you have ''System Settings > Startup and Shutdown > Desktop Session > When logging in: Restore previous saved session'' (default) selected, ksmserver (KDE's session manager) will automatically save/load all open applications to/from {{ic|~/.config/ksmserverrc}} on logout/login.<br />
<br />
=== Receive local mail in KMail ===<br />
<br />
If you have set up local mail delivery with a [[mail server]] that uses the [[Wikipedia:Maildir|Maildir]] format, you may want to receive this mail in KMail. To do so, you can re-use KMail's default receiving account "Local Folders" that stores mail in {{ic|~/.local/share/local-mail/}}.<br />
<br />
Symlink the {{ic|~/Maildir}} directory (where Maildir format mail is commonly delivered) to the Local Folders' inbox:<br />
<br />
$ ln -s .local/share/local-mail/inbox ~/Maildir<br />
<br />
Alternatively, add a new receiving account with the type ''Maildir'' and set {{ic|~/Maildir}} as its directory.<br />
<br />
=== Configure Plasma for all users ===<br />
<br />
Edit {{ic|config/main.xml}} files in the {{ic|/usr/share/plasma}}. For example, to configure the Application Launcher for all users, edit {{ic|/usr/share/plasma/plasmoids/org.kde.plasma.kickoff/contents/config/main.xml}}. To prevent the files from being overwritten with package updates, add the files to [[Pacman#Skip_file_from_being_upgraded|Pacman's NoUpgrade]]<br />
<br />
== Troubleshooting ==<br />
<br />
=== qt5ct and kvantum bugs after upgrade ===<br />
<br />
Latest update might cause incompatible hidpi scaling that made some plasma UI becomes too big for your screen, some icons are missing/cant be displayed, and missing plasma panel/widget.<br />
<br />
Try to remove qt5ct and kvantum related package then apply default global plasma theme. if the problem persists, try clear all your kde config and reinstall overwrite plasma package. Be sure to check hidpi scaling in KDE system settings as well.<br />
<br />
=== Fonts ===<br />
<br />
==== Fonts in a Plasma session look poor ====<br />
<br />
Try installing the {{Pkg|ttf-dejavu}} and {{Pkg|ttf-liberation}} packages.<br />
<br />
After the installation, be sure to log out and back in. You should not have to modify anything in ''System Settings > Fonts''. If you are using {{Pkg|qt5ct}}, the settings in Qt5 Configuration Tool may override the font settings in System Settings.<br />
<br />
If you have personally set up how your [[Fonts]] render, be aware that System Settings may alter their appearance. When you go ''System Settings > Fonts'' System Settings will likely alter your font configuration file ({{ic|fonts.conf}}).<br />
<br />
There is no way to prevent this, but, if you set the values to match your {{ic|fonts.conf}} file, the expected font rendering will return (it will require you to restart your application or in a few cases restart your desktop). Note that Gnome's Font Preferences also does this.<br />
<br />
==== Fonts are huge or seem disproportional ====<br />
<br />
Try to force font DPI to {{ic|'''96'''}} in ''System Settings > Fonts''.<br />
<br />
If that does not work, try setting the DPI directly in your Xorg configuration as documented in [[Xorg#Setting DPI manually]].<br />
<br />
=== Configuration related ===<br />
<br />
Many problems in KDE are related to its configuration.<br />
<br />
==== Plasma desktop behaves strangely ====<br />
<br />
Plasma problems are usually caused by unstable ''Plasma widgets'' (colloquially called ''plasmoids'') or ''Plasma themes''. First, find which was the last widget or theme you had installed and disable or uninstall it.<br />
<br />
So, if your desktop suddenly exhibits "locking up", this is likely caused by a faulty installed widget. If you cannot remember which widget you installed before the problem began (sometimes it can be an irregular problem), try to track it down by removing each widget until the problem ceases. Then you can uninstall the widget, and file a bug report on the [https://bugs.kde.org/ KDE bug tracker] '''only if it is an official widget'''. If it is not, it is recommended to find the entry on the [https://store.kde.org/ KDE Store] and inform the developer of that widget about the problem (detailing steps to reproduce, etc.).<br />
<br />
If you cannot find the problem, but you do not want ''all'' the settings to be lost, navigate to {{ic|~/.config/}} and run the following command:<br />
<br />
$ for j in plasma*; do mv -- "$j" "${j%}.bak"; done<br />
<br />
This command will rename '''all''' Plasma related configuration files to ''*.bak'' (e.g. {{ic|plasmarc.bak}}) of your user and when you will relogin into Plasma, you will have the default settings back. To undo that action, remove the ''.bak'' file extension. If you already have ''*.bak'' files, rename, move, or delete them first. It is highly recommended that you create regular backups anyway. See [[Synchronization and backup programs]] for a list of possible solutions.<br />
<br />
==== Clean cache to resolve upgrade problems ====<br />
<br />
The [https://bbs.archlinux.org/viewtopic.php?id=135301 problem] may be caused by old cache. Sometimes, after an upgrade, the old cache might introduce strange, hard to debug behaviour such as unkillable shells, hangs when changing various settings, Ark being unable to extract archives or Amarok not recognizing any of your music. This solution can also resolve problems with KDE and Qt applications looking bad after an update.<br />
<br />
Rebuild the cache using the following commands:<br />
<br />
$ rm ~/.config/Trolltech.conf<br />
$ kbuildsycoca5 --noincremental<br />
<br />
Optionally, empty the {{ic|~/.cache/}} folder contents, however, this will also clear the cache of other applications:<br />
<br />
$ rm -rf ~/.cache/*<br />
<br />
==== Plasma desktop does not respect locale/language settings ====<br />
<br />
Plasma desktop may use different settings than you set at KDE System Settings panel, or in {{ic|locale.conf}} (per [[Locale#Variables]]). First thing to do is log out and log in after removing {{ic|~/.config/plasma-localerc}}, if this does not fix the issue, try to edit the file manually. For example, to set {{ic|LANG}} variable to {{ic|es_ES.UTF-8}} and the {{ic|LC_MESSAGES}} variable to {{ic|en_US.UTF-8}}:<br />
<br />
{{hc|~/.config/plasma-localerc|2=<br />
[Formats]<br />
LANG=es_ES.UTF-8<br />
<br />
[Translations]<br />
LANGUAGE=en_US<br />
}}<br />
<br />
==== Cannot change theme, icons, fonts, colors in systemsettings; most icons are not displayed ====<br />
<br />
Make sure that {{ic|QT_QPA_PLATFORMTHEME}} [[environment variable]] is unset, the command {{ic|printenv QT_QPA_PLATFORMTHEME}} should show empty output. Otherwise if you had an environment set (most likely qt5ct) the variable will force qt5ct settings upon Qt applications, the command {{ic|1=export QT_QPA_PLATFORMTHEME=}} should unset the environment.<br />
<br />
==== Volume control, notifications or multimedia keys do not work ====<br />
<br />
Hiding certain items in the System Tray settings (e.g. Audio Volume, Media Player or Notifications) also disables related features. Hiding the ''Audio Volume'' disables volume control keys, ''Media Player'' disables multimedia keys (rewind, stop, pause) and hiding ''Notifications'' disables showing notifications.<br />
<br />
==== Login Screen KCM does not sync cursor settings to SDDM ====<br />
<br />
The Login Screen KCM reads your cursor settings from {{ic|~/.config/kcminputrc}}, without this file no settings are synced. The easiest way to generate this file is to change your cursor theme in ''System Settings > Cursors'', then change it back to your preferred cursor theme.<br />
<br />
==== Missing panels/widgets ====<br />
<br />
A crash or hardware change can modify the screen numbers, even on a single monitor setup. The panels/widgets can be missing after such an event, this can be fixed in the {{ic|~/.config/plasma-org.kde.plasma.desktop-appletsrc}} file by changing the {{ic|lastScreen}} values.<br />
<br />
=== Graphical problems ===<br />
<br />
Make sure you have the proper driver for your GPU installed. See [[Xorg#Driver installation]] for more information. If you have an older card, it might help to [[#Disable desktop effects manually or automatically for defined applications]] or [[#Disable compositing]].<br />
<br />
==== Getting current state of KWin for support and debug purposes ====<br />
<br />
This command prints out a summary of the current state of KWin including used options, used compositing backend and relevant OpenGL driver capabilities. See more on [https://blog.martin-graesslin.com/blog/2012/03/on-getting-help-for-kwin-and-helping-kwin/ Martin's blog].<br />
<br />
$ qdbus org.kde.KWin /KWin supportInformation<br />
<br />
==== Disable desktop effects manually or automatically for defined applications ====<br />
<br />
Plasma has desktop effects enabled by default and e.g. not every game will disable them automatically. You can disable desktop effects in ''System Settings > Desktop Behavior > Desktop Effects'' and you can toggle desktop effects with {{ic|Alt+Shift+F12}}. <br />
<br />
Additionally, you can create custom KWin rules to automatically disable/enable compositing when a certain application/window starts under ''System Settings > Window Management > Window Rules''.<br />
<br />
==== Enable transparency ====<br />
<br />
If you use a transparent background without enabling the compositor, you will get the message:<br />
<br />
This color scheme uses a transparent background which does not appear to be supported on your desktop<br />
<br />
In ''System Settings > Display and Monitor > Compositor'', check ''Enable compositor on startup'' and restart Plasma.<br />
<br />
==== Disable compositing ====<br />
<br />
In ''System Settings > Display and Monitor > Compositor'', uncheck ''Enable compositor on startup'' and restart Plasma.<br />
<br />
==== Flickering in fullscreen when compositing is enabled ====<br />
<br />
In ''System Settings > Display and Monitor > Compositor'', uncheck ''Allow applications to block compositing''. This may harm performance.<br />
<br />
==== Screen tearing with NVIDIA ====<br />
<br />
See [[NVIDIA/Troubleshooting#Avoid screen tearing in KDE (KWin)]].<br />
<br />
==== Plasma cursor sometimes shown incorrectly ====<br />
<br />
Create the directory {{ic|~/.icons/default}} and inside a file named {{ic|index.theme}} with the following contents:<br />
<br />
{{hc|~/.icons/default/index.theme|2=<br />
[Icon Theme]<br />
Inherits=breeze_cursors<br />
}}<br />
<br />
Execute the following command:<br />
<br />
$ ln -s /usr/share/icons/breeze_cursors/cursors ~/.icons/default/cursors<br />
<br />
==== Cursor jerking/flicking when changing roles (e.g., when mousing over hyperlinks) ====<br />
<br />
Try installing the appropriate 2D acceleration driver for your system and window manager.<br />
<br />
==== Unusable screen resolution set ====<br />
<br />
Your local configuration settings for kscreen can override those set in {{ic|xorg.conf}}. Look for kscreen configuration files in {{ic|~/.local/share/kscreen/}} and check if mode is being set to a resolution that is not supported by your monitor.<br />
<br />
==== Blurry icons in system tray ====<br />
<br />
In order to add icons to tray, applications often make use of the library appindicator. If your icons are blurry, check which version of libappindicator you have installed. If you only have {{Pkg|libappindicator-gtk2}} installed, you can install {{Pkg|libappindicator-gtk3}} as an attempt to get clear icons.<br />
<br />
==== Cannot change screen resolution when running in a virtual machine ====<br />
<br />
When running Plasma in a [[VMware]], [[VirtualBox]] or [[QEMU]] virtual machine, kscreen may not allow changing the guest's screen resolution to a resolution higher than 800×600.<br />
<br />
The workaround is to set the {{ic|PreferredMode}} option in {{man|5|xorg.conf.d}}. Alternatively try using a different graphics adapter in the VM, e.g. VBoxSVGA instead of VMSVGA for VirtualBox and Virtio instead of QXL for QEMU. See [https://bugs.kde.org/show_bug.cgi?id=407058 KDE Bug 407058] for details.<br />
<br />
==== Dolphin, Kate, etc. stuck long time when opening ====<br />
<br />
Check whether your user directories ({{ic|Documents}}, {{ic|Downloads}}, etc.) are read-only.<br />
<br />
=== Sound problems ===<br />
<br />
{{Note|First make sure you have {{Pkg|alsa-utils}} installed.}}<br />
<br />
==== No sound after suspend ====<br />
<br />
If there is no sound after suspending and if KMix does not show audio devices which should be there, restarting plasmashell and pulseaudio may help:<br />
<br />
$ killall plasmashell<br />
$ systemctl --user restart pulseaudio.service<br />
$ plasmashell<br />
<br />
Some applications may also need to be restarted in order for sound to play from them again.<br />
<br />
==== MP3 files cannot be played when using the GStreamer Phonon backend ====<br />
<br />
This can be solved by installing the GStreamer libav plugin (package {{Pkg|gst-libav}}). If you still encounter problems, you can try changing the Phonon backend used by installing another such as {{AUR|phonon-qt4-vlc}} or {{Pkg|phonon-qt5-vlc}}.<br />
<br />
Then, make sure the backend is preferred via ''System Settings > Multimedia > Audio and Video > Backend''.<br />
<br />
=== Power management ===<br />
<br />
==== No Suspend/Hibernate options ====<br />
<br />
If your system is able to suspend or hibernate using [[systemd]] but do not have these options shown in KDE, make sure {{Pkg|powerdevil}} is installed.<br />
<br />
=== KMail ===<br />
<br />
==== Clean Akonadi configuration to fix KMail ====<br />
<br />
See [https://userbase.kde.org/KMail/FAQs_Hints_and_Tips#Clean_start_after_a_failed_migration] for details.<br />
<br />
If you want a backup, copy the following configuration directories:<br />
<br />
$ cp -a ~/.local/share/akonadi ~/.local/share/akonadi-old<br />
$ cp -a ~/.config/akonadi ~/.config/akonadi-old<br />
<br />
==== Empty IMAP inbox in KMail ====<br />
<br />
For some IMAP accounts KMail will show the inbox as a top-level container (so it will not be possible to read messages there) with all other folders of this account inside.[https://bugs.kde.org/show_bug.cgi?id=284172]. To solve this problem simply disable the server-side subscriptions in the KMail account settings.<br />
<br />
==== Authorization error for EWS account in KMail ====<br />
<br />
While setting up EWS account in KMail, you may keep getting errors about failed authorization even for valid and fully working credentials. This is likely caused by broken communication between [[KWallet]] and KMail. To workaround the issue set a passsword via qdbus:<br />
<br />
$ qdbus org.freedesktop.Akonadi.Resource.akonadi_ews_resource_0 /Settings org.kde.Akonadi.Ews.Wallet.setPassword "XXX"<br />
<br />
=== Aggressive QXcbConnection journal logging ===<br />
<br />
See [[Qt#Disable/Change Qt journal logging behaviour]].<br />
<br />
=== KF5/Qt 5 applications do not display icons in i3/FVWM/awesome ===<br />
<br />
See [[Qt#Configuration of Qt5 apps under environments other than KDE Plasma]].<br />
<br />
=== Problems with saving credentials and persistently occurring KWallet dialogs ===<br />
<br />
It is not recommended to turn off the [[KWallet]] password saving system in the user settings as it is required to save encrypted credentials like WiFi passphrases for each user. Persistently occuring KWallet dialogs can be the consequence of turning it off.<br />
<br />
In case you find the dialogs to unlock the wallet annoying when applications want to access it, you can let the [[Display manager|display managers]] [[SDDM]] and [[LightDM]] unlock the wallet at login automatically, see [[KDE Wallet#Unlock KDE Wallet automatically on login]]. The first wallet needs to be generated by KWallet (and not user-generated) in order to be usable for system program credentials.<br />
<br />
In case you want the wallet credentials not to be opened in memory for every application, you can restrict applications from accessing it with {{Pkg|kwalletmanager}} in the KWallet settings.<br />
<br />
If you do not care for credential encryption at all, you can simply leave the password forms blank when KWallet asks for the password while creating a wallet. In this case, applications can access passwords without having to unlock the wallet first.<br />
<br />
=== Discover does not show any applications ===<br />
<br />
This can be solved by installing {{Pkg|packagekit-qt5}}.<br />
<br />
=== High CPU usage of kscreenlocker_greet with NVIDIA drivers ===<br />
<br />
As described in [https://bugs.kde.org/show_bug.cgi?id=347772 KDE Bug 347772] NVIDIA OpenGL drivers and QML may not play well together with Qt 5. This may lead {{ic|kscreenlocker_greet}} to high CPU usage after unlocking the session. To work around this issue, set the {{ic|QSG_RENDERER_LOOP}} [[environment variable]] to {{ic|basic}}.<br />
<br />
Then kill previous instances of the greeter with {{ic|killall kscreenlocker_greet}}.<br />
<br />
=== OS error 22 when running Akonadi on ZFS ===<br />
<br />
If your home directory is on a [[ZFS]] pool, create a {{ic|~/.config/akonadi/mysql-local.conf}} file with the following contents:<br />
<br />
[mysqld]<br />
innodb_use_native_aio = 0<br />
<br />
See [[MariaDB#OS error 22 when running on ZFS]].<br />
<br />
=== Some programs are unable to scroll when their windows are inactive ===<br />
<br />
This is caused by the problematic way of GTK3 handling mouse scroll events. A workaround for this is to set [[environment variable]] {{ic|1=GDK_CORE_DEVICE_EVENTS=1}}. However, this workaround also breaks touchpad smooth scrolling and touchscreen scrolling.<br />
<br />
=== TeamViewer behaves slowly ===<br />
<br />
When using TeamViewer, it may behave slowly if you use smooth animations (such as windows minimizing). See [[#Disable compositing]] as a workaround.<br />
<br />
=== Kmail, Kontact and Wayland ===<br />
<br />
Kmail may become unresponsive, show a black messageviewer or similar, often after having been minimized and restored. A workaround may be to set [[environment variable]] {{ic|1=QT_QPA_PLATFORM="xcb;wayland"}}. See [https://bugs.kde.org/show_bug.cgi?id=397825 KDE Bug 397825].<br />
<br />
=== Unlock widgets (Plasma ≥ 5.18) ===<br />
<br />
If you previously locked your widgets, you will probably find yourself unable to unlock them again.<br />
You just have to run this command to do so:<br />
<br />
$ qdbus org.kde.plasmashell /PlasmaShell evaluateScript "lockCorona(false)"<br />
<br />
The new {{ic|Customize Layout}} does not require to lock them back up but if want to do that:<br />
<br />
$ qdbus org.kde.plasmashell /PlasmaShell evaluateScript "lockCorona(true)"<br />
<br />
=== KIO opens URLs with error programs ===<br />
<br />
{{Style|The language in this section could use some improvements for clarity and grammar (mostly in regards to the first sentence and section heading).}}<br />
<br />
KIO had cached webpages and will try use cached files. Check file associations regarding html, php, etc. and change it to a browser. KIO's cache files are located in {{ic|$HOME/.cache/kioexec}}. See also [[xdg-utils#URL scheme handlers]].<br />
<br />
=== Custom Shortcuts tab is missing under Shortcuts in System Settings ===<br />
<br />
This is due to the {{Pkg|khotkeys}} package being missing. After installation, a restart of the System Settings application may be necessary to apply the changes.<br />
<br />
== See also ==<br />
<br />
* [https://www.kde.org/ KDE homepage]<br />
* [https://dot.kde.org/ KDE news]<br />
* [https://planet.kde.org/ KDE Blogs]<br />
* [https://forum.kde.org/ KDE Forums]<br />
* [https://wiki.kde.org/ KDE Wikis]<br />
* [https://bugs.kde.org/ KDE bug tracker and reporter]<br />
* [https://blog.martin-graesslin.com/blog/kategorien/kde/ Martin Graesslin's blog]<br />
* [https://community.kde.org/Matrix KDE Matrix Rooms]</div>Goetzchttps://wiki.archlinux.org/index.php?title=KeePass&diff=696458KeePass2021-09-18T14:43:47Z<p>Goetzc: /* Disable your clipboard manager */ KeePassXC feature</p>
<hr />
<div>[[Category:Password managers]]<br />
[[ja:KeePass]]<br />
[[pt:KeePass]]<br />
KeePass is an encrypted password database format. It is an alternative to online password managers and is supported on all major platforms.<br />
<br />
There are two versions of the format: ''KeePass 1.x (Classic)'' and ''KeePass 2.x''<br />
<br />
== Installation ==<br />
<br />
There are three major implementations of KeePass, two are available in the official repositories:<br />
<br />
* {{App|[[Wikipedia:KeePass|KeePass]]|A cross-platform password manager that has autotype and clipboard support when respectively {{Pkg|xdotool}} and {{Pkg|xsel}} are installed. It lets you import [https://keepass.info/help/base/importexport.html many formats] and has [https://keepass.info/plugins.html many plugins].|https://keepass.info|{{Pkg|keepass}}}}<br />
<br />
* {{App|[[Wikipedia:KeePassXC|KeePassXC]]|Fork of KeePassX that is actively maintained and has additional features like browser integration, ssh agent support, yubikey support, a TOTP generator and KeeShare included. Also provides a CLI. |https://keepassxc.org|{{Pkg|keepassxc}} }}<br />
<br />
* {{App|[[Wikipedia:KeePassX|KeePassX]]|Started as a Linux port of KeePass. {{AUR|keepassx2}} uses the KeePass 2.x format, but can import 1.x databases. It also lets you import PwManager and KWallet XML databases. It does not support plugins. [https://www.keepassx.org/faq] No active development since 2016. [https://dev.keepassx.org/projects/keepassx/repository/revisions] |https://www.keepassx.org/|{{AUR|keepassx}} {{AUR|keepassx2}}}}<br />
<br />
Other lesser-known alternatives can be found in the AUR:<br />
<br />
* {{App|keepassc|A curses-based password manager compatible to KeePass v.1.x and KeePassX. It uses {{ic|xsel}} for clipboard functions.<br />
|https://raymontag.github.io/keepassc/|{{AUR|keepassc}}}}<br />
<br />
* {{App|kpcli|A command line interface for KeePass database files {{ic|*.kdb}} or {{ic|*.kdbx}}.<br />
|https://sourceforge.net/projects/kpcli/|{{AUR|kpcli}}}}<br />
<br />
* {{App|keepmenu|Dmenu/Rofi frontend for Keepass database files.<br />
|https://github.com/firecat53/keepmenu|{{AUR|python-keepmenu-git}}}}<br />
<br />
* {{App|keeweb|A web app (online / Electron) compatible with KeePass 2.x. KeeWeb is the only version with default Sync support for major cloud services, Gdrive, Onedrive, Dropbox etc.<br />
|https://keeweb.info|{{AUR|keeweb}} {{AUR|nextcloud-app-keeweb}} }}<br />
<br />
== Integration ==<br />
<br />
Many [https://keepass.info/plugins.html plugins and extensions] are available for integrating KeePass to other software. KeePassX and KeePassXC do not have a plugin interface, but KeePassXC has various integrations built-in.<br />
<br />
=== Plugin installation in KeePass ===<br />
<br />
{{Note|KeePassX and KeePassXC do not support plugins. KeepassXC has some integrations built-in.}}<br />
<br />
KeePass is by default installed at {{ic|/usr/share/keepass/}}. Copy {{ic|plugin.plgx}} to a plugins sub-directory under the KeePass installation directory as demonstrated below:<br />
<br />
{{bc|<br />
# mkdir /usr/share/keepass/plugins<br />
# cp plugin.plgx /usr/share/keepass/plugins<br />
}}<br />
<br />
=== Browser integration ===<br />
<br />
==== keepassxc-browser for KeePassXC ====<br />
<br />
[https://github.com/keepassxreboot/keepassxc-browser keepassxc-browser] is the browser extension of KeePassXC’s built-in browser integration using native-messaging and transport encryption using libsodium. It was developed to replace KeePassHTTP, as KeePassHTTP’s protocol has fundamental security problems.<br />
<br />
The developers provide the browser extension on<br />
<br />
* [https://addons.mozilla.org/firefox/addon/keepassxc-browser/ Firefox Add-ons] (for [[Firefox]] and [[Tor Browser]]) and<br />
* in the [https://chrome.google.com/webstore/detail/keepassxc-browser/oboonakemofpalcgghocfoadofidjkkk chrome web store] (for [[Chromium]], [[Google Chrome]], [[Vivaldi]] and [[List of applications/Internet#Privacy-focused chromium spin-offs|Brave]])<br />
<br />
The [https://github.com/keepassxreboot/keepassxc-browser source code and an explanation how it works] can be found on GitHub, the KeePassXC developers provide a [https://keepassxc.org/docs/KeePassXC_GettingStarted.html#_configure_keepassxc_browser configuration guide] on their website.<br />
<br />
==== keepassxc-browser for KeePass ====<br />
<br />
[https://github.com/keepassxreboot/keepassxc-browser keepassxc-browser] can also be used with KeePass through [https://github.com/smorks/keepassnatmsg Keepass-natmsg Plugin] from AUR ({{aur|keepass-natmsg}}) and is recommended as successor of KeePassHTTP.<br />
<br />
==== KeePassRPC and Kee ====<br />
<br />
[https://www.kee.pm/ Kee] ([https://github.com/kee-org/browser-addon GitHub repo]) is a browser extension for [[Firefox]] and [[Chromium]] which integrates KeePass through [https://github.com/kee-org/keepassrpc KeePassRPC], a KeePass plugin from the same developers.<br />
<br />
The KeePass plugin is available from [https://github.com/kee-org/keepassrpc/releases GitHub] or from the AUR ({{aur|keepass-plugin-rpc}}).<br />
<br />
The browser extension can be found on [https://github.com/kee-org/browser-addon/releases GitHub], [https://addons.mozilla.org/firefox/addon/keefox/ Firefox Add-ons] and the [https://chrome.google.com/webstore/detail/kee-password-manager/mmhlniccooihdimnnjhamobppdhaolme chrome web store].<br />
<br />
==== Via autotype feature ====<br />
<br />
An alternative to having a direct channel between browser and KeePass(XC) is using the autotype feature. There are browser extensions which support this way by putting the page URL into the window name:<br />
<br />
* [https://addons.mozilla.org/firefox/addon/keepass-helper-url-in-title/ KeePass Helper] or [https://addons.mozilla.org/firefox/addon/url-in-title/ TitleURL] for [[Firefox]]<br />
* [https://chrome.google.com/webstore/detail/url-in-title/ignpacbgnbnkaiooknalneoeladjnfgb URL in title] for [[Chromium]]<br />
<br />
=== Nextcloud ===<br />
<br />
* [https://github.com/jhass/nextcloud-keeweb Keeweb for Nextcloud] ({{aur|nextcloud-app-keeweb}})<br />
: Open Keepass stores inside Nextcloud<br />
<br />
=== Yubikey ===<br />
<br />
[[YubiKey]] can be integrated with KeePass thanks to contributors of KeePass plugins. KeepassXC provides built-in support for Yubikey Challenge-Response without plugins.<br />
<br />
==== Configuration with KeePass ====<br />
<br />
# StaticPassword<br />
#:Configure one of Yubikey slots to store static password. You can make the password as strong as 65 characters (64 characters with leading "!"). This password can then be used as master password for your KeePass database.<br />
# one-time passwords (OATH-HOTP)<br />
## Download plugin from KeePass website: https://keepass.info/plugins.html#otpkeyprov<br />
## Use {{AUR|yubikey-personalization-gui-git}} to setup OATH-HOTP<br />
## In advanced mode untick ''OATH Token Identifier''<br />
## In KeePass additional option will show up under ''Key file / provider'' called ''One-Time Passwords (OATH HOTP)''<br />
## Copy secret, key length (6 or 8), and counter (in Yubikey personalization GUI this parameter is called ''Moving Factor Seed'')<br />
## You may need to setup ''Look-ahead count'' option to something greater than 0, please see [https://forum.yubico.com/viewtopicf146.html?f=16&t=1120 this thread] for more information<br />
## See [https://vimeo.com/94352853 this video] for more help<br />
#Challenge-Response (HMAC-SHA1)<br />
## Get the plugin from AUR: {{AUR|keepass-plugin-keechallenge}}<br />
## In KeePass additional option will show up under ''Key file / provider'' called ''Yubikey challenge-response''<br />
## Plugin assumes slot 2 is used<br />
<br />
=== SSH agent ===<br />
<br />
KeePassXC offers SSH agent support, a similar feature is also available for KeePass using the [https://lechnology.com/software/keeagent/ KeeAgent] plugin.<br />
<br />
The feature allows to store SSH keys in KeePass databases, KeePassXC/KeeAgent acts as OpenSSH Client and dynamically adds and removes the key to the Agent.<br />
<br />
The feature in KeePassXC is documented in its [https://keepassxc.org/docs/#faq-ssh-agent-how FAQ].<br />
<br />
{{Note|The [[GnuPG#SSH agent|SSH agent emulation of ''gpg-agent'']] does not support removing keys from the agent on demand using {{ic|ssh-add -d}} or {{ic|ssh-add -D}}, therefore KeePassXC/KeeAgent cannot remove them when locking the database. [https://github.com/keepassxreboot/keepassxc/issues/2029#issuecomment-395933402] [https://unix.stackexchange.com/questions/185393/gpg-agent-doesnt-remove-my-ssh-key-from-the-keyring]}}<br />
<br />
=== Secret Service ===<br />
<br />
KeePassXC contains a [https://specifications.freedesktop.org/secret-service/latest/ Freedesktop.org Secret Service] integration. When enabled other programs can save secrets inside KeePassXC. While this improves overall security, it can lead to some unwanted behaviour while KeePassXC is closed, as programs that rely on their secrets to work cannot fetch them.<br />
<br />
== Tips and tricks ==<br />
<br />
=== Disable your clipboard manager ===<br />
<br />
If you are an avid user of clipboard managers, you may need to disable your clipboard manager before you launch Keepass and then re-start your clipboard manager afterwards.<br />
<br />
KeePassXC implementations has the option to auto-clear the clipboard manager after an amount of time, enough to paste copied items.<br />
<br />
== Troubleshooting ==<br />
<br />
=== User interface scaling issues with KeePassXC 2.6 ===<br />
<br />
If the user interface elements are not scaled properly, see [[HiDPI#Qt 5]] and [https://github.com/keepassxreboot/keepassxc/issues/5029 upstream bug report].<br />
<br />
== See also ==<br />
<br />
* [[List of applications/Security#Password managers]]</div>Goetzchttps://wiki.archlinux.org/index.php?title=Hosts&diff=659445Hosts2021-04-13T17:38:21Z<p>Goetzc: #redirect Domain name resolution</p>
<hr />
<div>#redirect [[Domain name resolution]]</div>Goetzchttps://wiki.archlinux.org/index.php?title=Keyboard_shortcuts&diff=656661Keyboard shortcuts2021-03-29T17:08:03Z<p>Goetzc: /* Enabling */ cite full block</p>
<hr />
<div>[[Category:Keyboard configuration]]<br />
[[Category:X server]]<br />
[[Category:Accessibility]]<br />
[[ja:キーボードショートカット]]<br />
[[pt:Keyboard shortcuts]]<br />
[[ru:Keyboard shortcuts]]<br />
[[zh-hans:Keyboard shortcuts]]<br />
This article provides a list of (not commonly known) default keyboard shortcuts and provides information about user customization.<br />
<br />
== Standard shortcuts ==<br />
<br />
=== Kernel (SysRq) ===<br />
<br />
There are several low level shortcuts that are implemented in the kernel via the sysrq key which can be used for debugging and recovering from an unresponsive system. Whenever possible, it is recommended that you use these shortcuts instead of doing a hard shutdown (holding down the power button to completely power off the system).<br />
<br />
See [[Wikipedia:Magic SysRq key]] for more details.<br />
<br />
==== Enabling ====<br />
<br />
[[systemd]] has the sysrq permissions bitmask [https://github.com/systemd/systemd/blob/main/sysctl.d/50-default.conf#L14-L19 set to 0x10 by default], which [https://www.kernel.org/doc/html/latest/admin-guide/sysrq.html does not allow process signalling or rebooting], among other things. To allow full use of the sysrq key on your system, add {{ic|1=kernel.sysrq = 1}} to your [[sysctl#Configuration|sysctl configuration]]. Values greater than 1 can be used to selectively enable sysrq functions; see the [https://www.kernel.org/doc/html/latest/admin-guide/sysrq.html Linux kernel documentation] for details. If you want to make sure it will be enabled even before the partitions are mounted and in the initrd, then add {{ic|1=sysrq_always_enabled=1}} to your [[kernel parameters]].<br />
<br />
Note that changing the setting through these methods will cause the changes to persist across reboots. If you want to try changing the sysrq settings for just your current session, you can run either {{ic|1=sysctl kernel.sysrq=1}} or {{ic|echo "1" > /proc/sys/kernel/sysrq}}. <br />
<br />
There are some obvious security risks involved in fully enabling the sysrq key. In addition to forcing reboots and the like, it can be used to dump the contents of the CPU registers, which could theoretically reveal sensitive information. Since using it requires physical access to the system (unless you [https://github.com/jd/sysrqd go out of your way]), most desktop users will probably consider the level of risk acceptable. That said, make sure you fully understand the implications of enabling it and the dynamics of the larger context in which your system is operating before you turn sysrq all the way on.<br />
<br />
==== Rebooting ====<br />
<br />
A common idiom to remember this is "'''R'''eboot '''E'''ven '''I'''f '''S'''ystem '''U'''tterly '''B'''roken" (also referred to as "REISUB"). Alternatively, think of it as "BUSIER" backwards.<br />
<br />
{{Note|Please be aware that "REISUB" itself is just a mnemonic thing, is not any kind of general recommendation of key press sequence to take back control of unresponsive system, you should not blindly press in this sequence each time without knowing their actual function as noted below.}}<br />
<br />
{| class="wikitable"<br />
! Keyboard Shortcut<br />
! Description<br />
|-<br />
| {{ic|Alt+SysRq+r}} Unraw<br />
| Take control of keyboard back from X.<br />
|-<br />
| {{ic|Alt+SysRq+e}} Terminate<br />
| Send SIGTERM to all processes, allowing them to terminate gracefully.<br />
|-<br />
| {{ic|Alt+SysRq+i}} Kill<br />
| Send SIGKILL to all processes, forcing them to terminate immediately.<br />
|-<br />
| {{ic|Alt+SysRq+s}} Sync<br />
| Flush data to disk.<br />
|-<br />
| {{ic|Alt+SysRq+u}} Unmount<br />
| Unmount and remount all filesystems read-only.<br />
|-<br />
| {{ic|Alt+SysRq+b}} Reboot<br />
| Reboot<br />
|-<br />
|}<br />
<br />
==== Killing a memory-hogging process ====<br />
<br />
{{ic|Alt+SysRq+f}} can be used to invoke the [https://www.kernel.org/doc/html/latest/admin-guide/mm/concepts.html?highlight=oom#oom-killer OOM (out-of-memory) killer] without causing a kernel panic if nothing can be killed. The OOM killer uses a set of heuristics to pick whichever relatively non-vital process is using the most memory and kill it. This is very useful to kill a process that is softlocking your system by causing excessive thrashing, such as a runaway browser script, and can alleviate the need for a reboot in many cases. Note that the OOM killer can target a wide variety of processes despite its well-meaning heuristics and can be somewhat unpredictable, so be careful about calling it casually.<br />
<br />
==== Troubleshooting ====<br />
<br />
* If you are using a [[display manager]] and after {{ic|Alt+SysRq+e}} you are presented with the login screen (or full desktop if autologin is enabled), it is most likely caused by {{ic|1=Restart=always}} directive in the relevant [[systemd|service file]]. If necessary, [[edit the unit]], however this should not prevent the "REISUB" sequence from working.<br />
* If all the above combinations work except {{ic|Alt+SysRq+b}}, try using the contralateral {{ic|Alt}} key.<br />
* On laptops that use {{ic|Fn}} key to differentiate {{ic|SysRq}} from {{ic|PrtScrn}}, it may not actually be necessary to use the {{ic|Fn}} key (i.e., {{ic|Alt+PrtSc+''letter''}} could work).<br />
* On Lenovo laptops {{ic|SysRq}} is often configured as {{ic|Fn+S}}. To use it press and hold {{ic|Alt}} then press {{ic|Fn+s}}, '''release''' {{ic|Fn}} and {{ic|s}} still holding {{ic|Alt}} followed by the keys above. <br />
* You may need to press {{ic|Ctrl}} along with {{ic|Alt}}. So for example, full key shortcut would be {{ic|Ctrl+Alt+SysRq+b}}.<br />
<br />
=== Linux console ===<br />
<br />
See [[Linux console#Keyboard shortcuts]].<br />
<br />
=== Xorg and Wayland ===<br />
<br />
{| class="wikitable"<br />
! Keyboard Shortcut<br />
! Description<br />
! Notes<br />
|-<br />
| {{ic|Ctrl+Alt+F1}}, {{ic|F2}}, {{ic|F3}}, ...<br />
| Switch to ''n''-th virtual console<br />
| If it does not work, try {{ic|Ctrl+Fn+Alt+F…}}.<br />
|-<br />
| {{ic|Shift+Insert}} <br> {{ic|Mouse Button 2}}<br />
| Paste text from the [[Clipboard|PRIMARY buffer]]<br />
| By default, Qt maps {{ic|Shift+Insert}} to CLIPBOARD instead of the PRIMARY buffer (see e.g. [http://doc.qt.io/qt-5/qlineedit.html#details]) and {{ic|Ctrl+Shift+Insert}} is mapped to the PRIMARY buffer.<br />
|-<br />
|}<br />
<br />
== Customization ==<br />
<br />
=== Readline ===<br />
<br />
[[Readline]] is a commonly used library for line-editing; it is used for example by [[Bash]], FTP, and many more (see the details of {{Pkg|readline}} package under "Required By" for more examples). It has [[Emacs]]-like and [[vi]]-like editing modes which can be customized with escape sequences. Default key bindings are listed in the [https://tiswww.cwru.edu/php/chet/readline/rluserman.html Info documentation].<br />
<br />
=== Zsh ===<br />
<br />
[[Zsh]] uses [[Zsh#Key_bindings|ZLE]] to link shortcuts to widgets, scripts and commands.<br />
<br />
=== Xorg ===<br />
<br />
See [[Xorg/Keyboard configuration#Frequently used XKB options]] for some common shortcuts, that are disabled by default.<br />
<br />
When we are in a graphical environment we may want to execute a command when certain key combination is pressed (i.e. bind a command to a ''keysym''). There are multiple ways to do that:<br />
<br />
* The most portable way using low level tools, such as [[acpid]]. Not all keys are supported, but configuration in uniform way is possible for keyboard keys, power adapter connection and even headphone jack (un)plugging events. It is also difficult to run programs inside X session correctly.<br />
* The universal way using [[Xorg]] utilities (e.g. [[xbindkeys]]) and eventually your desktop environment or window manager tools.<br />
* The quicker way using a third-party program to do everything in GUI, such as the Gnome Control Center.<br />
<br />
==== sxhkd ====<br />
<br />
A simple X hotkey daemon with a powerful and compact configuration syntax. See [[sxhkd]] for details.<br />
<br />
==== actkbd ====<br />
<br />
From [http://users.softlab.ece.ntua.gr/~thkala/projects/actkbd/ actkbd home page]:<br />
:{{AUR|actkbd}} (available in [[AUR]]) is a simple daemon that binds actions to keyboard events. It recognises key combinations and can handle press, repeat and release events. Currently it only supports the linux-2.6 evdev interface. It uses a plain-text configuration file which contains all the bindings.<br />
<br />
A sample configuration and guide is available [http://users.softlab.ece.ntua.gr/~thkala/projects/actkbd/latest/README here].<br />
<br />
==== xbindkeys ====<br />
<br />
[[xbindkeys]] allows advanced mapping of keysyms to actions independently of the Desktop Environment.<br />
{{Tip| If you find {{ic|xbindkeys}} difficult to use, try the graphical manager {{AUR|xbindkeys_config-gtk2}} from the [[AUR]].}}<br />
<br />
=== Desktop environments ===<br />
<br />
* [[LXDE#Bindings]]<br />
* [[Xfce#Keyboard Shortcuts]]<br />
<br />
=== Windows managers ===<br />
<br />
* [[Fluxbox#Hotkeys]]<br />
* [[Openbox#Keybinds]]<br />
<br />
=== Key binding for X-selection-paste ===<br />
<br />
{{Accuracy|1={{ic|Shift+Insert}} pastes the PRIMARY buffer.}}<br />
{{Expansion|Why the 100ms delay?}}<br />
<br />
Users who prefer to work with the keyboard rather than the mouse may benefit from a key binding to the paste operation of the middle mouse button. This is especially useful in a keyboard-centered environment. A workflow example is:<br />
<br />
# In Firefox, select a string you want to google for (with the mouse).<br />
# Hit {{ic|Ctrl+k}} to enter the "search engine" field.<br />
# Hit {{ic|F9}} to paste the buffer, instead of moving the mouse pointer to the field and middle-click to paste.<br />
<br />
{{Note|{{ic|Shift+Insert}} has a similar yet different functionality, see [[#Xorg]]: {{ic|Shift+Insert}} inserts the clipboard buffer, not the x-selection-paste buffer. In some applications, these two buffers are mirrored.}}<br />
<br />
The method suggested here uses the following three packages::<br />
<br />
* {{Pkg|xsel}} to give access to the x-selection-buffer content.<br />
* [[Xbindkeys]] to bind a key-stroke to an action.<br />
* {{AUR|xvkbd}} to pass the buffer string to the application by emulating keyboard input.<br />
<br />
This example binds the x-selection-paste operation to the {{ic|F9}} key:<br />
<br />
{{hc|.xbindkeysrc|<br />
"xvkbd -no-jump-pointer -xsendevent -text "\D1`xsel`" 2>/dev/null"<br />
F9<br />
}}<br />
<br />
The {{ic|"\D1"}} code prefixes a 100 ms pause to inserting the selection buffer (see the [http://t-sato.in.coocan.jp/xvkbd/ xvkbd home page]).<br />
<br />
{{Note|Depending on your X configuration, you may need to drop the {{ic|-xsendevent}} argument to xvkbd.}}<br />
The key codes for keys other than {{ic|F9}} can be determined using {{ic|xbindkeys -k}}.<br />
<br />
References:<br />
<br />
* [https://unix.stackexchange.com/questions/11889/pasting-x-selection-not-clipboard-contents-with-keyboard Pasting X selection (not clipboard) contents with keyboard]<br />
* [http://t-sato.in.coocan.jp/xvkbd/ xvkbd home page]<br />
<br />
==== XMonad Window Manager ====<br />
<br />
In the {{Pkg|xmonad}} window manager there is a built-in function to paste the x-selection-buffer content. In order to bind that function to a key-stroke (here {{ic|Insert}} key) the following configuration can be used:<br />
{{hc|xmonad.hs|<br />
import XMonad.Util.Paste<br />
...<br />
-- X-selection-paste buffer<br />
, ((0, xK_Insert), pasteSelection) ]<br />
}}<br />
<br />
== Tips and tricks ==<br />
<br />
* If you like a keyboard-centered workflow, you might also appreciate a [[Window manager#Tiling_window_managers|tiling window manager]].<br />
<br />
== See also ==<br />
<br />
* [http://lnag.sourceforge.net/lnag_html/node5.html Linux Newbie Administrator Guide - Shortcuts and Commands]<br />
* [https://tldp.org/HOWTO/Keyboard-and-Console-HOWTO.html The Linux keyboard and console HOWTO]</div>Goetzchttps://wiki.archlinux.org/index.php?title=Gamepad&diff=629863Gamepad2020-08-06T00:14:47Z<p>Goetzc: /* Button mapping */ ds4drv AUR template</p>
<hr />
<div>[[Category:Input devices]]<br />
[[Category:Gaming]]<br />
[[ja:ゲームパッド]]<br />
[[ru:Gamepad]]<br />
Joysticks can be a bit of a hassle to get working in Linux. Not because they are poorly supported, but simply because you need to determine which modules to load to get your joystick working, and it's not always very obvious!<br />
<br />
== Joystick input systems ==<br />
<br />
Linux has two different input systems for Joysticks – the original Joystick interface and the newer evdev-based interface.<br />
<br />
{{ic|1=/dev/input/jsX}} maps to the Joystick API interface and {{ic|/dev/input/event*}} maps to the evdev ones (this also includes other input devices such as mice and keyboards). Symbolic links to those devices are also available in {{ic|/dev/input/by-id/}} and {{ic|/dev/input/by-path/}} where the legacy Joystick API has names ending with {{ic|-joystick}} while the evdev have names ending with {{ic|-event-joystick}}.<br />
<br />
Most new games will default to the evdev interface as it gives more detailed information about the buttons and axes available and also adds support for force feedback.<br />
<br />
While SDL1 defaults to evdev interface you can force it to use the old Joystick API by setting the environment variable {{ic|1=SDL_JOYSTICK_DEVICE=/dev/input/js0}}. This can help many games such as X3. SDL2 supports only the new evdev interface.<br />
<br />
== Determining which modules you need ==<br />
<br />
Unless you're using very old joystick that uses gameport or proprietary USB protocol, you will need just the generic USB human interface device (HID) modules.<br />
<br />
For an extensive overview of all joystick related modules in Linux, you will need access to the Linux kernel sources -- specifically the Documentation section. Unfortunately, pacman kernel packages do not include what we need. If you have the kernel sources downloaded, have a look at {{ic|Documentation/input/joydev/}}. You can browse the kernel source tree at [https://kernel.org/ kernel.org] by clicking the "browse" (cgit - the git frontend) link for the kernel that you're using, then clicking the "tree" link near the top. Here's a link to the [https://www.kernel.org/doc/html/latest/input/joydev/joystick.html documentation from the latest kernel].<br />
<br />
Some joysticks need specific modules, such as the Microsoft Sidewinder controllers ({{ic|sidewinder}}), or the Logitech digital controllers ({{ic|adi}}). Many older joysticks will work with the simple {{ic|analog}} module. If your joystick is plugging in to a gameport provided by your soundcard, you will need your soundcard drivers loaded - however, some cards, like the Soundblaster Live, have a specific gameport driver ({{ic|emu10k1-gp}}). Older ISA soundcards may need the {{ic|ns558}} module, which is a standard gameport module.<br />
<br />
As you can see, there are many different modules related to getting your joystick working in Linux, so I couldn't possibly cover everything here. Please have a look at the documentation mentioned above for details.<br />
<br />
=== Loading the modules for analogue devices ===<br />
<br />
You need to load a module for your gameport ({{ic|ns558}}, {{ic|emu10k1-gp}}, {{ic|cs461x}}, etc...), a module for your joystick ({{ic|analog}}, {{ic|sidewinder}}, {{ic|adi}}, etc...), and finally the kernel joystick device driver ({{ic|joydev}}). Add these to a new file in {{ic|/etc/modules-load.d/}}, or simply modprobe them. The {{ic|gameport}} module should load automatically, as this is a dependency of the other modules.<br />
<br />
=== USB joysticks ===<br />
<br />
You need to get USB working, and then modprobe your joystick driver, which is {{ic|usbhid}}, as well as {{ic|joydev}}. <br />
If you use a usb mouse or keyboard, {{ic|usbhid}} will be loaded already and you just have to load the {{ic|joydev}} module.<br />
<br />
====Troubleshooting====<br />
If your Xbox 360 joystick is connected with the Play&Charge USB cable it will show up in {{ic|lsusb}} but it will not show up as an input device in {{ic|/dev/input/js*}}, see note below.<br />
<br />
== Testing your configuration ==<br />
<br />
Once the modules are loaded, you should be able to find a new device: {{ic|/dev/input/js0}} and a file ending with {{ic|-event-joystick}} in {{ic|/dev/input/by-id}} directory. You can simply {{ic|cat}} those devices to see if the joystick works - move the stick around, press all the buttons - you should see mojibake printed when you move the sticks or press buttons. <br />
<br />
Both interfaces are also supported in wine and reported as separate devices. You can test them with {{ic|1=wine control joy.cpl}}.<br />
<br />
{{Tip| Input devices by default have '''input''' group; for example, {{pkg|pcsx2}} have no access to gamepad without rights. Make sure your user is in the '''input''' group.}}<br />
<br />
<br />
=== Joystick API ===<br />
There are a lot of applications that can test this old API, {{ic|jstest}} from the {{pkg|joyutils}} package is the simplest one. If the output is unreadable because the line printed is too long you can also use graphical tools. Plasma has a built in one in Input Devices panel in System Settings or {{AUR|jstest-gtk-git}} is an alternative.<br />
<br />
Use of {{ic|jstest}} is fairly simple, you just run {{ic|jstest /dev/input/js0}} and it will print a line with state of all the axes (normalised to {-32767,32767}) and buttons.<br />
<br />
After you start {{ic|jstest-gtk}}, it will just show you a list of joysticks available, you just need to select one and press Properties.<br />
<br />
=== evdev API ===<br />
<br />
The new 'evdev' API can be tested using the SDL2 joystick test application or using {{ic|evtest}} from community repository. Install {{AUR|sdl2-jstest-git}} and then run {{ic|sdl2-jstest --test 0}}. Use {{ic|sdl2-jstest --list}} to get IDs of other controllers if you have multiple ones connected.<br />
<br />
To test force feedback on the device, use {{ic|fftest}} from {{ic|linuxconsole}} package:<br />
$ fftest /dev/input/by-id/usb-*event-joystick<br />
<br />
==Setting up deadzones and calibration==<br />
If you want to set up the deadzones (or remove them completely) of your analog input you have to do it separately for the xorg (for mouse and keyboard emulation), Joystick API and evdev API.<br />
<br />
===Wine deadzones===<br />
Add the following registry entry and set it to a string from 0 to 10000 (affects all axes):<br />
HKEY_CURRENT_USER\Software\Wine\DirectInput\DefaultDeadZone<br />
Source: [http://wiki.winehq.org/UsefulRegistryKeys UsefulRegistryKeys]<br />
<br />
===Xorg deadzones===<br />
Add a similar line to {{ic|/etc/X11/xorg.conf.d/51-joystick.conf}} (create if it doesn't exist):<br />
{{hc|1=/etc/X11/xorg.conf.d/51-joystick.conf|2=<nowiki><br />
Section "InputClass"<br />
Option "MapAxis1" "deadzone=1000"<br />
EndSection<br />
</nowiki>}}<br />
1000 is the default value, but you can set anything between 0 and 30 000. To get the axis number see the "Testing Your Configuration" section of this article.<br />
If you already have an option with a specific axis just type in the {{ic|1=deadzone=value}} at the end of the parameter separated by a space.<br />
<br />
===Joystick API deadzones===<br />
The easiest way is using {{ic|jstest-gtk}} from {{AUR|jstest-gtk-git}}. Select the controller you want to edit, then click the Calibration button at the bottom of the dialog ('''don't''' click Start Calibration there). You can then set the CenterMin and CenterMax values (which control the center deadzone), RangeMin and RangeMax which control the end of throw deadzones. Note that the calibration settings are applied when the application opens the device, so you need to restart your game or test application to see updated calibration settings.<br />
<br />
After you set the deadzones use {{ic|jscal}} to dump the new values into a shell script:<br />
$ jscal -p /dev/input/jsX > jscal.sh # replace X with your joystick's number <br />
$ chmod +x jscal.sh<br />
<br />
Now you need to make a [[udev]] rule (for example {{ic|/etc/udev/rules.d and name it 85-jscal.rules}}) so the script will automatically run when you connect the controller:<br />
SUBSYSTEM=="input", ATTRS{idVendor}=="054c", ATTRS{idProduct}=="c268", ACTION=="add", RUN+="/usr/bin/bash /usr/bin/jscal.sh"<br />
To get the idVendor and idProduct use {{ic|udevadm info --attribute-walk --name /dev/input/jsX}}<br />
<br />
Use the `/dev/input/by-id/*-joystick` device names in case you use multiple controllers.<br />
<br />
===evdev API deadzones===<br />
The {{ic|evdev-joystick}} tool from the {{pkg|linuxconsole}} package can be used to view and change deadzones and calibration for {{ic|evdev}} API devices.<br />
<br />
To view your device configuration:<br />
$ evdev-joystick --showcal /dev/input/by-id/usb-*-event-joystick<br />
<br />
To change the deadzone for a particular axis, use a command like:<br />
$ evdev-joystick --evdev /dev/input/by-id/usb-*-event-joystick --axis 0 --deadzone 0<br />
<br />
To set the same deadzone for all axes at once, omit the "--axis 0" option.<br />
<br />
Use udev rules file to set them automatically when the controller is connected.<br />
<br />
Note that inside the kernel, the value is called {{ic|flatness}} and is set using the {{ic|EVIOCSABS}} {{ic|ioctl}}.<br />
<br />
Default configuration will look like similar to this:<br />
{{hc|$ evdev-joystick --showcal /dev/input/by-id/usb-Madcatz_Saitek_Pro_Flight_X-55_Rhino_Stick_G0000090-event-joystick|2= Supported Absolute axes:<br />
Absolute axis 0x00 (0) (X Axis) (min: 0, max: 65535, flatness: 4095 (=6.25%), fuzz: 255)<br />
Absolute axis 0x01 (1) (Y Axis) (min: 0, max: 65535, flatness: 4095 (=6.25%), fuzz: 255)<br />
Absolute axis 0x05 (5) (Z Rate Axis) (min: 0, max: 4095, flatness: 255 (=6.23%), fuzz: 15)<br />
Absolute axis 0x10 (16) (Hat zero, x axis) (min: -1, max: 1, flatness: 0 (=0.00%), fuzz: 0)<br />
Absolute axis 0x11 (17) (Hat zero, y axis) (min: -1, max: 1, flatness: 0 (=0.00%), fuzz: 0)}}<br />
<br />
While a more reasonable setting would be achieved with something like this (repeat for other axes):<br />
{{hc|$ evdev-joystick --evdev /dev/input/by-id/usb-Madcatz_Saitek_Pro_Flight_X-55_Rhino_Stick_G0000090-event-joystick --axis 0 --deadzone 512|2= Event device file: /dev/input/by-id/usb-Madcatz_Saitek_Pro_Flight_X-55_Rhino_Stick_G0000090-event-joystick<br />
Axis index to deal with: 0<br />
New dead zone value: 512<br />
Trying to set axis 0 deadzone to: 512<br />
Absolute axis 0x00 (0) (X Axis) Setting deadzone value to : 512<br />
(min: 0, max: 65535, flatness: 512 (=0.78%), fuzz: 255)}}<br />
<br />
===Configuring curves and responsiveness===<br />
In case your game requires just limited amount of buttons or has good support for multiple controllers, you may have good results with using {{ic|xboxdrv}} to change response curves of the joystick.<br />
<br />
Below are the setups I use for Saitek X-55 HOTAS:<br />
$ xboxdrv --evdev /dev/input/by-id/usb-Madcatz_Saitek_Pro_Flight_X-55_Rhino_Throttle_G0000021-event-joystick \<br />
--evdev-no-grab --evdev-absmap 'ABS_#40=x1,ABS_#41=y1,ABS_X=x2,ABS_Y=y2' --device-name 'Hat and throttle' \<br />
--ui-axismap 'x2^cal:-32000:0:32000=,y2^cal:-32000:0:32000=' --silent<br />
<br />
this maps the EV_ABS event with id of 40 and 41 (use xboxdrv with --evdev-debug to see the events registered), which is the normally inaccessible "mouse pointer" on the throttle, to first gamepad joystick and throttles to second joystick, it also clamps the top and lower ranges as they not always register fully.<br />
<br />
A bit more interesting is the setup for the stick:<br />
$ xboxdrv --evdev /dev/input/by-id/usb-Madcatz_Saitek_Pro_Flight_X-55_Rhino_Stick_G0000090-event-joystick \<br />
--evdev-no-grab --evdev-absmap 'ABS_X=x1' --evdev-absmap 'ABS_Y=y1' --device-name 'Joystick' \<br />
--ui-axismap 'x1^cal:-32537:-455:32561=,x1^dead:-900:700:1=,x1^resp:-32768:-21845:-2000:0:2000:21485:32767=' \<br />
--ui-axismap 'y1^cal:-32539:-177:32532=,y1^dead:-700:2500:1=,y1^resp:-32768:-21845:-2000:0:2000:21485:32767=' \<br />
--evdev-absmap 'ABS_RZ=x2' --ui-axismap 'x2^cal:-32000:-100:32000,x2^dead:-1500:1000:1=,x2^resp:-32768:-21845:-2000:0:2000:21485:32767=' \<br />
--silent<br />
<br />
this maps the 3 joystick axes to gamepad axes and changes the calibration (min value, centre value, max value), dead zones (negative side, positive side, flag to turn smoothing) and finally change of response curve to a more flat one in the middle.<br />
<br />
You can also modify the responsiveness by setting the 'sen' (sensitivity). Setting it to value of 0 will give you a linear sensitivity, value of -1 will give very insensitive axis while value of 1 will give very sensitive axis. You can use intermediate values to make it less or more sensitive. Internally xboxdrv uses a quadratic formula to calculate the resulting value, so this setting gives a more smooth result than 'resp' shown above.<br />
<br />
Nice thing about xboxdrv is that it exports resulting device as both old Joystick API and new style evdev API so it should be compatible with basically any application.<br />
<br />
== Disable joystick from controlling mouse ==<br />
If you want to play games with your controller, you might want to disable joystick control over mouse cursor. To do this, edit {{ic|/etc/X11/xorg.conf.d/51-joystick.conf}} (create if it doesn't exists) so that it looks like this:<br />
{{hc|/etc/X11/xorg.conf.d/51-joystick.conf |<br />
Section "InputClass"<br />
Identifier "joystick catchall"<br />
MatchIsJoystick "on"<br />
MatchDevicePath "/dev/input/event*"<br />
Driver "joystick"<br />
Option "StartKeysEnabled" "False" #Disable mouse<br />
Option "StartMouseEnabled" "False" #support<br />
EndSection}}<br />
<br />
== Using Joystick to send keystrokes ==<br />
<br />
A couple joystick to keystroke programs exist like {{AUR|qjoypad}} or {{AUR|antimicrox-git}}, all work well without the need for X.org configuration.<br />
<br />
=== Xorg configuration example ===<br />
<br />
This is a good solution for systems where restarting Xorg is a rare event because it is a static configuration loaded only on X startup. The example runs on a [[Kodi]] media PC, controlled with a Logitech Cordless RumblePad 2. Due to a problem with the d-pad (a.k.a. "hat") being recognized as another axis, [[Joy2key]] was used as a workaround. Since upgrade to Kodi version 11.0 and joy2key 1.6.3-1, this setup no longer worked and the following was created for letting Xorg handle joystick events.<br />
<br />
First, [[install]] the {{AUR|xf86-input-joystick}} package. Then, create {{ic|/etc/X11/xorg.conf.d/51-joystick.conf}} like so:<br />
{{bc|<nowiki><br />
Section "InputClass"<br />
Identifier "Joystick hat mapping"<br />
Option "StartKeysEnabled" "True"<br />
#MatchIsJoystick "on"<br />
Option "MapAxis5" "keylow=113 keyhigh=114"<br />
Option "MapAxis6" "keylow=111 keyhigh=116"<br />
EndSection<br />
</nowiki>}}<br />
{{Note|The {{ic|MatchIsJoystick "on"}} line does not seem to be required for the setup to work, but you may want to uncomment it.}}<br />
<br />
== Specific devices ==<br />
<br />
While most joysticks, especially USB based ones should just work, some may require (or give better results) if you use alternative drivers. If it doesn't work the first time, do not give up, and read those docs thoroughly!<br />
<br />
=== Dance pads ===<br />
Most dance pads should work. However some pads, especially those used from a video game console via an adapter, have a tendency to map the directional buttons as axis buttons. This prevents hitting left-right or up-down simultaneously. This behavior can be fixed for devices recognized by xpad via a module option:<br />
<br />
# modprobe -r xpad<br />
# modprobe xpad dpad_to_buttons=1<br />
<br />
If that did not work, you can try {{AUR|axisfix-git}} or patching the {{ic|joydev}} kernel module (https://github.com/adiel-mittmann/dancepad).<br />
<br />
=== Logitech Thunderpad Digital ===<br />
<br />
Logitech Thunderpad Digital won't show all the buttons if you use the {{ic|analog}} module. Use the device specific {{ic|adi}} module for this controller.<br />
<br />
=== Nintendo Gamecube Controller ===<br />
<br />
Dolphin Emulator has a [https://wiki.dolphin-emu.org/index.php?title=How_to_use_the_Official_GameCube_Controller_Adapter_for_Wii_U_in_Dolphin page on their wiki] that explains how to use the official Nintendo USB adapter with a Gamecube controller. This configuration also works with the Mayflash Controller Adapter if the switch is set to "Wii U".<br />
<br />
By default, the controller will register with [[udev]], but will only be readable by the root user. You can fix this by adding a udev device rule, like the below. <br />
<br />
{{hc<br />
|head=/etc/udev/rules.d/51-gcadapter.rules<br />
|output=<nowiki>SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ATTRS{idVendor}=="057e", ATTRS{idProduct}=="0337", MODE="0666"</nowiki><br />
}}<br />
<br />
This only matches the USB device with the specified vendor and product IDs, which match those of the official USB adapter. It sets the permissions of the device file to 0666 so that programs that aren't running as root can read the device's input. <br />
<br />
udev can be reloaded with the new configuration by executing<br />
<br />
# udevadm control --reload-rules<br />
<br />
=== Nintendo Switch Pro Controller and Joy-Cons ===<br />
<br />
==== Kernel Nintendo HID Driver ====<br />
<br />
The hid-nintendo kernel HID driver is currently in review on the linux-input mailing list. The most recent version of the changeset is currently being maintained in this[https://github.com/DanielOgorchock/linux] git repository, or this[https://patchwork.kernel.org/patch/11441647/] kernel patchset. It's also available as a dkms module named {{AUR|hid-nintendo-dkms}}. The driver provides support for rumble, battery level, and control of the player and home LEDs. It supports the Nintendo Switch Pro Controller over both USB and bluetooth in addition to the joy-cons.<br />
<br />
===== joycond Userspace Daemon =====<br />
<br />
The hid-nintendo kernel driver does not handle the combination of two joy-cons into one virtual input device. That functionality has been left up to userspace. {{AUR|joycond-git}} is a userspace daemon that combines two kernel joy-con evdev devices into one virtual input device using uinput. An application can use two joy-cons as if they are a single controller. When the daemon is active, switch controllers will be placed in a pseudo pairing mode, and the LEDs will start flashing. Holding the triggers can be used to pair controllers and make them usable. To pair two joy-cons together, press one trigger on each joy-con.<br />
<br />
===== Using hid-nintendo with Steam Games =====<br />
<br />
The hid-nintendo driver currently conflicts with steam using hidraw to implement its own pro controller driver. If you wish to use the Steam implementation, the hid-nintendo driver can be blacklisted. Alternatively if you want to use hid-nintendo with a Steam game directly, Steam can be started without access to hidraw using firejail:<br />
<br />
$ firejail --noprofile --blacklist=/sys/class/hidraw/ steam<br />
<br />
An [https://github.com/ValveSoftware/steam-for-linux/issues/6651 issue] has been opened on the steam-for-linux github repo.<br />
<br />
===== Using hid-nintendo with SDL2 Games =====<br />
<br />
To add a mapping for the joy-cons or the pro controller to an SDL2 game, {{AUR|controllermap}} can be run in the game's directory of games which have their own gamecontrollerdb.txt file.<br />
<br />
Alternatively, the mappings can be added to an environment variable:<br />
<br />
{{hc|1=~/.bashrc |2=# hid-nintendo SDL2 mappings<br />
export SDL_GAMECONTROLLERCONFIG="050000007e0500000920000001800000,Nintendo Switch Pro Controller,platform:Linux,a:b0,b:b1,x:b3,y:b2,back:b9,guide:b11,start:b10,leftstick:b12,rightstick:b13,leftshoulder:b5,rightshoulder:b6,dpup:b14,dpdown:b15,dpleft:b16,dpright:b17,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b7,righttrigger:b8,<br />
030000007e0500000920000011810000,Nintendo Switch Pro Controller,platform:Linux,a:b0,b:b1,x:b3,y:b2,back:b9,guide:b11,start:b10,leftstick:b12,rightstick:b13,leftshoulder:b5,rightshoulder:b6,dpup:h0.1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b7,righttrigger:b8,<br />
060000007e0500000620000000000000,Nintendo Switch Combined Joy-Cons,platform:Linux,a:b0,b:b1,x:b3,y:b2,back:b9,guide:b11,start:b10,leftstick:b12,rightstick:b13,leftshoulder:b5,rightshoulder:b6,dpup:b14,dpdown:b15,dpleft:b16,dpright:b17,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b7,righttrigger:b8,<br />
"}}<br />
<br />
==== Dolphin (Gamecube Controller Emulation) ====<br />
<br />
Shinyquagsire23 made a git repo called "HID Joy-Con Whispering"[https://github.com/shinyquagsire23/HID-Joy-Con-Whispering], which contains a userspace driver for the Joy Cons and the Switch Pro Controller over USB. Currently, it does not support rumble or gyroscope. For rumble support, see the hid-nintendo kernel driver section above.<br />
<br />
After running make, load the uinput module:<br />
<br />
# modprobe uinput<br />
<br />
Then to activate the driver:<br />
<br />
# ./uinputdriver > /dev/null<br />
<br />
Over on Dolphin's controller configuration menu, there should be an entry for evdev/0/joycon (not Nintendo Switch Pro Controller). Select it, and you should now be able to configure the controls.<br />
<br />
==== Steam ====<br />
<br />
While the controller works for native Linux games, this controller isn't detected by Steam. To fix this, we'll need to add a line to 70-steam-controller.rules.<br />
<br />
{{hc<br />
|head=/lib/udev/rules.d/70-steam-controller.rules<br />
|output=<nowiki># NS PRO Controller USB<br />
KERNEL=="hidraw*", ATTRS{idVendor}=="20d6", ATTRS{idProduct}=="a711", MODE="0660", TAG+="uaccess"</nowiki><br />
}}<br />
<br />
udev can be reloaded with the new configuration by executing<br />
<br />
# udevadm control --reload-rules<br />
<br />
=== PlayStation 3/4 controller ===<br />
<br />
The DualShock 3, DualShock 4 and Sixaxis controllers work out of the box when plugged in via USB (the PS button will need to be pushed to begin). They can also be used wirelessly via Bluetooth.<br />
<br />
Steam properly recognizes it as a PS3 pad and Big Picture can be launched with the PS button. Big Picture and some games may act as if it was a 360 controller. Gamepad control over mouse is on by default. You may want to turn it off before playing games, see [[#Joystick moving mouse]].<br />
<br />
=====Connecting via Bluetooth=====<br />
<br />
Install the {{Pkg|bluez}}, {{Pkg|bluez-plugins}}, and {{Pkg|bluez-utils}} packages, which includes the ''sixaxis'' plugin. Then [[start]] the [[bluetooth]] service and ensure bluetooth is powered on. If using ''bluetoothctl'' start it in a terminal and then plug the controller in via USB. You should be prompted to trust the controller in bluetoothctl. A graphical bluetooth front-end may program your PC's bluetooth address into the controller automatically. Hit the PlayStation button and check that the controller works while plugged in.<br />
<br />
You can now disconnect your controller. The next time you hit the PlayStation button it will connect without asking anything else.<br />
<br />
Alternatively, on a PS4 controller you can hold the share button and the PlayStation button simultaneously (for a few seconds) to put the gamepad in pairing mode, and pair as you would normally.<br />
<br />
GNOME's Settings also provides a graphical interface to pair sixaxis controllers when connected by wire.<br />
<br />
Remember to disconnect the controller when you are done as the controller will stay on when connected and drain the battery.<br />
<br />
{{Note|If the controller does not connect, make sure the bluetooth interface is turned on and the controllers have been trusted. (See [[Bluetooth]])}}<br />
<br />
=====Using Playstation 3 controllers with Steam=====<br />
<br />
{{out of date|Tested connecting PS3 controller via bluetooth and it worked in Steam version 1575605714 and some Steam games without performing the following steps.}}<br />
<br />
For Steam to recognize your controllers, it needs to be able to read their device file. The {{Pkg|steam}} package sets up udev rules for lots of controllers, but not the PlayStation 3 controller (aka. DualShock 3 controller). You can add the rules yourself:<br />
<br />
{{hc<br />
|/etc/udev/rules.d/99-dualshock-3.rules|2=<br />
# DualShock 3 controller, Bluetooth<br />
KERNEL=="hidraw*", KERNELS=="*054C:0268*", MODE="0660", TAG+="uaccess"<br />
<br />
# DualShock 3 controller, USB<br />
KERNEL=="hidraw*", ATTRS{idVendor}=="054c", ATTRS{idProduct}=="0268", MODE="0660", TAG+="uaccess"<br />
}}<br />
<br />
Make sure your user is in the "input" group:<br />
<br />
{{ic | usermod -aG input yourusername}}<br />
<br />
Reboot your system. Steam should now detect your PlayStation 3 controller.<br />
<br />
=====Using generic/clone controllers=====<br />
<br />
Using generic/clone Dualshock controllers is possible, however there is an issue that may require to install a patched package. The default Bluetooth protocol stack doesn't detect some of the clone controllers. The {{AUR|bluez-ps3}} package is a version patched to be able to detect them.<br />
<br />
=== iPEGA-9017s and other Bluetooth gamepads ===<br />
<br />
If you want to use one of the widely available bluetooth gamepads, such as iPEGA-9017s designed mostly for Android and iOS devices you would need {{AUR|xboxdrv}}, {{Pkg|bluez}}, {{Pkg|bluez-plugins}}, and {{Pkg|bluez-utils}}. You should connect it in gamepad mode (if there are different modes, choose the gamepad one). Technically it's ready to be used, but in most cases games would not recognize it, and you would have to map it individually for all application. The best way to simplify it and make it work with all applications is to mimic Microsoft X360 controller with {{AUR|xboxdrv}}.<br />
Once connected you can create a udev rule to give it a persistent name, that would come in handy when setting it up.<br />
<br />
{{hc<br />
|/etc/udev/rules.d/99-btjoy.rules|2=<br />
#Create a symlink to appropriate /dev/input/eventX at /dev/btjoy<br />
ACTION=="add", SUBSYSTEM=="input", ATTRS{name}=="Bluetooth Gamepad", ATTRS{uniq}=="00:17:02:01:ae:2a", SYMLINK+="btjoy"<br />
}}<br />
<br />
Replace "Bluetooth Gampad" with your device name and "00:17:02:01:ae:2a" with your device's address.<br />
<br />
Next, create a configuration for {{AUR|xboxdrv}} somewhere, for example:<br />
<br />
{{hc<br />
|~/.config/xboxdrv/ipega.conf|2=<br />
#iPEGA PG-9017S Config <br />
<br />
[xboxdrv]<br />
evdev-debug = true<br />
evdev-grab = true<br />
rumble = false<br />
mimic-xpad = true<br />
<br />
[evdev-absmap]<br />
ABS_HAT0X = dpad_x<br />
ABS_HAT0Y = dpad_y<br />
<br />
ABS_X = X1<br />
ABS_Y = Y1<br />
<br />
ABS_Z = X2<br />
ABS_RZ = Y2<br />
<br />
[axismap]<br />
-Y1 = Y1<br />
-Y2 = Y2<br />
<br />
[evdev-keymap]<br />
BTN_EAST=a<br />
BTN_C=b<br />
BTN_NORTH=y<br />
BTN_SOUTH=x<br />
BTN_TR2=start<br />
BTN_TL2=back<br />
BTN_Z=rt<br />
BTN_WEST=lt<br />
<br />
BTN_MODE = guide<br />
}}<br />
<br />
Refer to the xboxdrv man to see all the options.<br />
<br />
Now when you have the config and your device is connected you can start the {{AUR|xboxdrv}} like so:<br />
<br />
# xboxdrv --evdev /dev/btjoy --config .config/xboxdrv/ipega.conf<br />
<br />
Your games will now work with bluetooth gamepad as long as xboxdrv is running.<br />
<br />
==== iPEGA-9068 and 9087 ====<br />
<br />
For this model, use the same procedures as above, but with the configs:<br />
<br />
{{hc<br />
|~/.config/xboxdrv/ipega.conf|2=<br />
#iPEGA PG-9068 and PG-9087 Config <br />
<br />
[xboxdrv]<br />
evdev-debug = true<br />
evdev-grab = true<br />
rumble = false<br />
mimic-xpad = true<br />
<br />
[evdev-absmap]<br />
ABS_HAT0X = dpad_x<br />
ABS_HAT0Y = dpad_y<br />
<br />
ABS_X = X1<br />
ABS_Y = Y1<br />
<br />
ABS_Z = X2<br />
ABS_RZ = Y2<br />
<br />
[axismap]<br />
-Y1 = Y1<br />
-Y2 = Y2<br />
<br />
[evdev-keymap]<br />
BTN_A=a<br />
BTN_B=b<br />
BTN_Y=y<br />
BTN_X=x<br />
BTN_TR=rb<br />
BTN_TL=lb<br />
BTN_TR2=rt<br />
BTN_TL2=lt<br />
BTN_THUMBL=tl<br />
BTN_THUMBR=tr<br />
BTN_START=start<br />
BTN_SELECT=back<br />
<br />
BTN_MODE = guide<br />
}}<br />
<br />
=== Steam Controller ===<br />
<br />
{{Note|Kernel 4.18 [https://lkml.org/lkml/2018/4/16/380 provides a kernel driver] for wired/wireless use of the steam controller as a controller input device without [[Steam]].}}<br />
<br />
The [[Steam]] client will recognize the controller and provide keyboard/mouse/gamepad emulation while Steam is running. The in-game Steam overlay needs to be enabled and working in order for gamepad emulation to work. You may need to run {{ic|udevadm trigger}} with root privileges or plug the dongle out and in again, if the controller doesn't work immediately after installing and running Steam. If all else fails, try restarting the computer while the dongle is plugged in.<br />
<br />
For Steam client to be able to emulate other gamepads in games, you will need to follow this [https://steamcommunity.com/app/353370/discussions/2/1735465524711324558/ post] from Valve. Note that name of the file with udev rules may be different, for example {{ic|/usr/lib/udev/rules.d/70-steam-input.rules}}. A reboot may be required after making changes.<br />
<br />
If you can't get the Steam Controller to work, see [[#Steam Controller not pairing]].<br />
<br />
Alternatively you can install {{AUR|python-steamcontroller-git}} to have controller and mouse emulation without Steam or {{AUR|sc-controller}} for a versatile graphical configuration tool simillar to what is provided by the Steam client.<br />
<br />
{{Out of date|As of September 17, 2019 beta release, Steam has fixed the on screen keyboard from taking focus.}}<br />
<br />
On some desktop environments the on-screen keyboard might freeze when trying to input text after one or two characters. This is a problem with window focus. Check the settings for your [[window manager]] to see if it is possible to have focus follow the mouse or automatically focus new windows. Preventing the keyboard from receiving focus will fix the issue in [[Awesome]], see [[Awesome#Steam Keyboard]].<br />
<br />
{{Note|If you do not use the [[Steam runtime]], you might actually need to disable the overlay for the controller to work in certain games (Rocket Wars, Rocket League, Binding of Isaac, etc.). Right click on a game in your library, select "Properties", and uncheck "Enable Steam Overlay".}}<br />
<br />
==== Wine ====<br />
<br />
{{AUR|python-steamcontroller-git}} can also be used to make the Steam Controller work for games running under Wine. You need to find and download the application {{ic|xbox360cemu.v.3.0}} (e.g. from [https://github.com/jacobmischka/ds4-in-wine/tree/master/xbox360cemu.v.3.0 here]). Then copy the files {{ic|dinput8.dll}}, {{ic|xbox360cemu.ini}}, {{ic|xinput1_3.dll}} and {{ic|xinput_9_1_0.dll}} to the directory that contains your game executable. Edit {{ic|xbox360cemu.ini}} and only change the following values under {{ic|[PAD1]}} to remap the Steam Controller correctly to a XBox controller.<br />
<br />
{{hc|xbox360cemu.ini|2= Right Analog X=4<br />
Right Analog Y=-5<br />
A=1<br />
B=2<br />
X=3<br />
Y=4<br />
Back=7<br />
Start=8<br />
Left Thumb=10<br />
Right Thumb=11<br />
Left Trigger=a3<br />
Right Trigger=a6}}<br />
<br />
Now start python-steamcontroller in Xbox360 mode ({{ic|sc-xbox.py start}}). You might also want to copy {{ic|XInputTest.exe}} from {{ic|xbox360cemu.v.3.0}} to the same directory and run it with Wine in order to test if the mappings work correctly. However neither mouse nor keyboard emulation work with this method.<br />
<br />
Alternatively you can use {{AUR|sc-controller}} for a similar graphical setup as Steam's own configurator. As of writing, it's a bit buggy here and there but offers an easy click and go way of configuring the controller.<br />
<br />
=== Xbox 360 controller ===<br />
<br />
Both the wired and wireless (with the ''Xbox 360 Wireless Receiver for Windows'') controllers are supported by the {{ic|xpad}} kernel module and should work without additional packages. (Note that using a wireless Xbox360 controller with the Play&Charge USB cable will not work. The cable is for recharging only and does not transmit any input data over the wire.)<br />
<br />
It has been reported that the default xpad driver has some issues with a few newer wired and wireless controllers, such as:<br />
* incorrect button mapping. ([https://github.com/ValveSoftware/steam-for-linux/issues/95#issuecomment-14009081 discussion in Steam bugtracker])<br />
* not-working sync. All four LEDs keep blinking, but controller works. ([https://bbs.archlinux.org/viewtopic.php?id=156028 discussion in Arch Forum])<br />
<br />
If you experience such issues, you can use either [[#SteamOS xpad]] or [[#xboxdrv]] instead of the default {{ic|xpad}} driver.<br />
<br />
If you wish to use the controller for controlling the mouse, or mapping buttons to keys, etc. you should use the {{AUR|xf86-input-joystick}} package (configuration help can be found using {{man|4|joystick|url=}}). If the mouse locks itself in a corner, it might help changing the {{ic|MatchDevicePath}} in {{ic|/etc/X11/xorg.conf.d/50-joystick.conf}} from {{ic|/dev/input/event*}} to {{ic|/dev/input/js*}}.<br />
<br />
{{Tip|If you use the [[TLP]] power management tool, you may experience connection issues with your Microsoft wireless adapter (e.g. the indicator LED will go out after the adapter has been connected for a few seconds, and controller connection attempts fail). This is due to TLP's USB autosuspend functionality, and the solution is to add the Microsoft wireless adapter's device ID to this feature's blacklist (USB_BLACKLIST, check [http://linrunner.de/en/tlp/docs/tlp-configuration.html#usb TLP configuration] for more details).}}<br />
<br />
In order to connect via Bluetooth using KDE, add the following [[kernel parameter]] {{ic|1=bluetooth.disable_ertm=1}}.<br />
<br />
==== SteamOS xpad ====<br />
<br />
If you have issues with the default {{ic|xpad}} kernel module, you can install the SteamOS version. There is still a known issue with compatibility between wireless Xbox360 controllers and games made in GameMaker Studio. If you encounter this problem, the only known workaround is to use xboxdrv. YoYo Games has refused to acknowledge this as a bug with their product and it is unlikely to ever be fixed.<br />
<br />
First make sure you have [[DKMS]] installed and running, then install the modified kernel module {{AUR|steamos-xpad-dkms}}. During the installation you'll see that new xpad kernel module is strapped to your current kernel:<br />
<br />
Creating symlink /var/lib/dkms/steamos-xpad-dkms/0.1/source -&gt;<br />
/usr/src/steamos-xpad-dkms-0.1<br />
<br />
DKMS: add completed.<br />
<br />
Kernel preparation unnecessary for this kernel. Skipping...<br />
<br />
Building module:<br />
cleaning build area....<br />
make KERNELRELEASE=3.12.8-1-ARCH KVERSION=3.12.8-1-ARCH....<br />
cleaning build area....<br />
<br />
Then unload the old xpad module and load new one:<br />
<br />
# rmmod xpad<br />
# modprobe steamos-xpad<br />
<br />
Or just restart your computer.<br />
<br />
==== xboxdrv ====<br />
<br />
[https://gitlab.com/xboxdrv/xboxdrv xboxdrv] is an alternative to {{ic|xpad}} which provides more functionality and might work better with certain controllers. It works in userspace and can be launched as system service. <br />
<br />
Install it with the {{AUR|xboxdrv}} package. Then [[start]]/[[enable]] {{ic|xboxdrv.service}}.<br />
<br />
If you have issues with the controller being recognized but not working in steam games or working but with incorrect mappings, it may be required to modify you config as such:<br />
{{hc<br />
|/etc/default/xboxdrv|2=<br />
[xboxdrv]<br />
silent = true<br />
device-name = "Xbox 360 Wireless Receiver"<br />
mimic-xpad = true<br />
deadzone = 4000<br />
<br />
[xboxdrv-daemon]<br />
dbus = disabled<br />
}}<br />
<br />
Then [[restart]] {{ic|xboxdrv.service}}.<br />
<br />
===== Multiple controllers =====<br />
<br />
xboxdrv supports a multitude of controllers, but they need to be set up in {{ic|/etc/default/xboxdrv}}. For each extra controller, add an {{ic|1=next-controller = true}} line. For example, when using 4 controllers, add it 3 times:<br />
<br />
{{bc|<nowiki><br />
[xboxdrv]<br />
silent = true<br />
next-controller = true<br />
next-controller = true<br />
next-controller = true<br />
[xboxdrv-daemon]<br />
dbus = disabled<br />
</nowiki>}}<br />
<br />
Then [[restart]] {{ic|xboxdrv.service}}.<br />
<br />
===== Mimic Xbox 360 controller with other controllers =====<br />
<br />
xboxdrv can be used to make any controller register as an Xbox 360 controller with the {{ic|--mimic-xpad}} switch. This may be desirable for games that support Xbox 360 controllers out of the box, but have trouble detecting or working with other gamepads.<br />
<br />
First, you need to find out what each button and axis on the controller is called. You can use {{Pkg|evtest}} for this. Run {{ic|evtest}} and select the device event ID number ({{ic|/dev/input/event*}}) that corresponds to your controller. Press the buttons on the controller and move the axes to read the names of each button and axis.<br />
<br />
Here is an example of the output:<br />
{{bc|<nowiki><br />
<br />
Event: time 1380985017.964843, type 4 (EV_MSC), code 4 (MSC_SCAN), value 90003<br />
Event: time 1380985017.964843, type 1 (EV_KEY), code 290 (BTN_THUMB2), value 1<br />
Event: time 1380985017.964843, -------------- SYN_REPORT ------------<br />
Event: time 1380985018.076843, type 4 (EV_MSC), code 4 (MSC_SCAN), value 90003<br />
Event: time 1380985018.076843, type 1 (EV_KEY), code 290 (BTN_THUMB2), value 0<br />
Event: time 1380985018.076843, -------------- SYN_REPORT ------------<br />
Event: time 1380985018.460841, type 4 (EV_MSC), code 4 (MSC_SCAN), value 90002<br />
Event: time 1380985018.460841, type 1 (EV_KEY), code 289 (BTN_THUMB), value 1<br />
Event: time 1380985018.460841, -------------- SYN_REPORT ------------<br />
Event: time 1380985018.572835, type 4 (EV_MSC), code 4 (MSC_SCAN), value 90002<br />
Event: time 1380985018.572835, type 1 (EV_KEY), code 289 (BTN_THUMB), value 0<br />
Event: time 1380985018.572835, -------------- SYN_REPORT ------------<br />
Event: time 1380985019.980824, type 4 (EV_MSC), code 4 (MSC_SCAN), value 90006<br />
Event: time 1380985019.980824, type 1 (EV_KEY), code 293 (BTN_PINKIE), value 1<br />
Event: time 1380985019.980824, -------------- SYN_REPORT ------------<br />
Event: time 1380985020.092835, type 4 (EV_MSC), code 4 (MSC_SCAN), value 90006<br />
Event: time 1380985020.092835, type 1 (EV_KEY), code 293 (BTN_PINKIE), value 0<br />
Event: time 1380985020.092835, -------------- SYN_REPORT ------------<br />
Event: time 1380985023.596806, type 3 (EV_ABS), code 3 (ABS_RX), value 18<br />
Event: time 1380985023.596806, -------------- SYN_REPORT ------------<br />
Event: time 1380985023.612811, type 3 (EV_ABS), code 3 (ABS_RX), value 0<br />
Event: time 1380985023.612811, -------------- SYN_REPORT ------------<br />
Event: time 1380985023.708768, type 3 (EV_ABS), code 3 (ABS_RX), value 14<br />
Event: time 1380985023.708768, -------------- SYN_REPORT ------------<br />
Event: time 1380985023.724772, type 3 (EV_ABS), code 3 (ABS_RX), value 128<br />
Event: time 1380985023.724772, -------------- SYN_REPORT ------------<br />
</nowiki>}}<br />
<br />
In this case, {{ic|BTN_THUMB}}, {{ic|BTN_THUMB2}} and {{ic|BTN_PINKIE}} are buttons and {{ic|ABS_RX}} is the X axis of the right analogue stick.<br />
You can now mimic an Xbox 360 controller with the following command:<br />
<br />
$ xboxdrv --evdev /dev/input/event* --evdev-absmap ABS_RX=X2 --evdev-keymap BTN_THUMB2=a,BTN_THUMB=b,BTN_PINKIE=rt --mimic-xpad<br />
<br />
The above example is incomplete. It only maps one axis and 3 buttons for demonstration purposes. Use {{ic|xboxdrv --help-button}} to see the names of the Xbox controller buttons and axes and bind them accordingly by expanding the command above. Axes mappings should go after {{ic|--evdev-absmap}} and button mappings follow {{ic|--evdev-keymap}} (comma separated list; no spaces).<br />
<br />
By default, xboxdrv outputs all events to the terminal. You can use this to test that the mappings are correct. Append the {{ic|--silent}} option to keep it quiet.<br />
<br />
==== Using generic/clone controllers ====<br />
<br />
Some clone gamepads might require a specific initialization sequence in order to work ([https://superuser.com/a/1380235/303390 Super User answer]). For that you should run the following python script as the root user:<br />
<br />
{{bc|<nowiki><br />
#!/usr/bin/env python3<br />
<br />
import usb.core<br />
<br />
dev = usb.core.find(idVendor=0x045e, idProduct=0x028e)<br />
<br />
if dev is None:<br />
raise ValueError('Device not found')<br />
else:<br />
dev.ctrl_transfer(0xc1, 0x01, 0x0100, 0x00, 0x14) <br />
</nowiki>}}<br />
<br />
=== Xbox Wireless Controller / Xbox One Wireless Controller ===<br />
<br />
==== Connect Xbox Wireless Controller with usb cable ====<br />
<br />
This is supported by the kernel and should work without additional packages.<br />
<br />
==== Connect Xbox Wireless Controller with Bluetooth ====<br />
<br />
You will probably have to disable Enhanced Retransmission Mode (ERTM) to make it work.<br />
<br />
Use either:<br />
<br />
# echo 1 > /sys/module/bluetooth/parameters/disable_ertm<br />
<br />
Or add this file to your module configuration:<br />
<br />
{{hc<br />
|/etc/modprobe.d/xbox_bt.conf|2=<br />
options bluetooth disable_ertm=1<br />
}}<br />
<br />
===== xpadneo =====<br />
<br />
A relatively new driver which does (yet) support only the Xbox One S controller via Bluetooth is called [https://github.com/atar-axis/xpadneo/ xpadneo].<br />
In exchange for supporting just one controller so far, it enables one to read out the correct battery level, supports rumble (even the one on the trigger buttons - L2/R2), corrects the (sometimes wrong) button mapping and more.<br />
<br />
Installation is done using DKMS: {{AUR|xpadneo-dkms-git}}<br />
<br />
==== Connect Xbox Wireless Controller with Microsoft Xbox Wireless Adapter ====<br />
<br />
===== xow =====<br />
<br />
[https://github.com/medusalix/xow xow] is a project that allows connection with a wireless dongle. It is currently in very early stages of development. It can be installed via {{AUR|xow-git}}<br />
<br />
===Logitech Dual Action===<br />
<br />
The Logitech Dual Action gamepad has a very similar mapping to the PS2 pad, but some buttons and triggers need to be swapped to mimic the Xbox controller.<br />
<br />
# xboxdrv --evdev /dev/input/event* \<br />
--evdev-absmap ABS_X=x1,ABS_Y=y1,ABS_RZ=x2,ABS_Z=y2,ABS_HAT0X=dpad_x,ABS_HAT0Y=dpad_y \<br />
--axismap -Y1=Y1,-Y2=Y2 \<br />
--evdev-keymap BTN_TRIGGER=x,BTN_TOP=y,BTN_THUMB=a,BTN_THUMB2=b,BTN_BASE3=back,BTN_BASE4=start,BTN_BASE=lt,BTN_BASE2=rt,BTN_TOP2=lb,BTN_PINKIE=rb,BTN_BASE5=tl,BTN_BASE6=tr \<br />
--mimic-xpad --silent<br />
<br />
===PlayStation 2 controller via USB adapter===<br />
<br />
To fix the button mapping of PS2 dual adapters and mimic the Xbox controller you can run the following command:<br />
<br />
# xboxdrv --evdev /dev/input/event* \<br />
--evdev-absmap ABS_X=x1,ABS_Y=y1,ABS_RZ=x2,ABS_Z=y2,ABS_HAT0X=dpad_x,ABS_HAT0Y=dpad_y \<br />
--axismap -Y1=Y1,-Y2=Y2 \<br />
--evdev-keymap BTN_TOP=x,BTN_TRIGGER=y,BTN_THUMB2=a,BTN_THUMB=b,BTN_BASE3=back,BTN_BASE4=start,BTN_BASE=lb,BTN_BASE2=rb,BTN_TOP2=lt,BTN_PINKIE=rt,BTN_BASE5=tl,BTN_BASE6=tr \<br />
--mimic-xpad --silent<br />
<br />
===PlayStation 3 controller===<br />
====Pairing via USB====<br />
<br />
If you own a PS3 controller and can connect with USB, plug it to your computer and press the PS button. The controller will power up and one of the four LEDs should light up indicating the controller's number<br />
.<br />
<br />
====Pairing via Bluetooth====<br />
<br />
To connect your PS3 controller to your computer using Bluetooth, you first need to install {{Pkg|bluez}} and {{Pkg|bluez-plugins}} then connect your controller via USB. A pop-up should appear asking for pairing. Click on Trust & Authorize. You can now unplug your controller and press the PS button. The controller will connect and a LED will remain solid. You can now use it to play games. Connecting using the USB cable is only needed after the controller has been connected to another system.<br />
<br />
===PlayStation 4 controller===<br />
<br />
====Pairing via USB====<br />
<br />
Connect your controller via USB and press the {{ic|PS}} button.<br />
<br />
====Pairing via Bluetooth====<br />
<br />
If you want to use bluetooth mode, press {{ic|PS}} button and {{ic|Share}} button together, white led of gamepad should blink very quickly, then add wireless controller with your bluetooth manager (bluez, gnome-bluetooth.<br />
<br />
====Button mapping====<br />
<br />
To fix the button mapping of PS4 controller you can use the following command with xboxdrv (or try with the [https://github.com/chrippa/ds4drv ds4drv] program, {{AUR|ds4drv}}):<br />
<br />
# xboxdrv \<br />
--evdev /dev/input/by-id/usb-Sony_Computer_Entertainment_Wireless_Controller-event-joystick\<br />
--evdev-absmap ABS_X=x1,ABS_Y=y1 \<br />
--evdev-absmap ABS_Z=x2,ABS_RZ=y2 \<br />
--evdev-absmap ABS_HAT0X=dpad_x,ABS_HAT0Y=dpad_y \<br />
--evdev-keymap BTN_A=x,BTN_B=a \<br />
--evdev-keymap BTN_C=b,BTN_X=y \<br />
--evdev-keymap BTN_Y=lb,BTN_Z=rb \<br />
--evdev-keymap BTN_TL=lt,BTN_TR=rt \<br />
--evdev-keymap BTN_SELECT=tl,BTN_START=tr \<br />
--evdev-keymap BTN_TL2=back,BTN_TR2=start \<br />
--evdev-keymap BTN_MODE=guide \<br />
--axismap -y1=y1,-y2=y2 \<br />
--mimic-xpad \<br />
--silent<br />
<br />
====Fix Motion control conflict (gamepad won't work on somes apps)====<br />
<br />
Dualshock 4 V1 and V2 are both like 3 devices, touchpad, motion control, and joypad.<br />
<br />
With somes softwares like Parsec and Shadow cloud gaming streaming apps, motion control is in conflict with joypad, you can disable touchpad and motion control by adding the following udev rule :<br />
<br />
{{hc|1=/etc/udev/rules.d/51-disable-DS3-and-DS4-motion-controls.rules|2=<br />
SUBSYSTEM=="input", ATTRS{name}=="*Controller Motion Sensors", RUN+="/bin/rm %E{DEVNAME}", ENV{ID_INPUT_JOYSTICK}=""<br />
SUBSYSTEM=="input", ATTRS{name}=="*Controller Touchpad", RUN+="/bin/rm %E{DEVNAME}", ENV{ID_INPUT_JOYSTICK}=""<br />
}}<br />
<br />
This should work in USB and Bluetooth mode.<br />
<br />
====Disable touchpad acting as mouse====<br />
<br />
This fixes conflicts with games that actually use touchpad as part of the gamepad, such as Rise of the Tomb Raider.<br />
<br />
Edit {{ic|/etc/X11/xorg.conf.d/30ds4.conf}}.<br />
<br />
And then paste the following and restart X11:<br />
Section "InputClass"<br />
Identifier "ds4-touchpad"<br />
Driver "libinput"<br />
MatchProduct "Sony Interactive Entertainment Wireless Controller Touchpad"<br />
Option "Ignore" "True"<br />
EndSection<br />
<br />
== Troubleshooting ==<br />
<br />
=== Joystick moving mouse ===<br />
<br />
Sometimes USB joystick can be recognized as HID mouse (only in X, it is still being installed as {{ic|/dev/input/js0}} as well). Known issue is cursor being moved by the joystick, or escaping to en edge of a screen right after plugin. If your application can detect joystick by it self, you can remove the {{AUR|xf86-input-joystick}} package.<br />
<br />
A more gentle solution is described in [[#Disable joystick from controlling mouse]].<br />
<br />
=== Joystick not working in FNA/SDL based games ===<br />
If you are using a generic non-widely used gamepad you may encounter issues getting the gamepad recognized in games based on SDL. Since [https://github.com/flibitijibibo/FNA/commit/e55742cfe7e38b778a21ed8a12cb2f2081490d8d 14 May 2015], FNA supports dropping a {{ic|gamecontrollerdb.txt }} into the executable folder of the game, for example the [https://github.com/gabomdq/SDL_GameControllerDB SDL_GameControllerDB]{{Dead link|2020|03|17}}.<br />
<br />
As an alternative and for older versions of FNA or for SDL you can generate a mapping yourself by downloading the SDL source code via http://libsdl.org/, navigating to {{ic|/test/}}, compile the {{ic|controllermap.c}} program (alternatively install {{AUR|controllermap}}) and run the test. After completing the controllermap test, a guid will be generated that you can put in the {{ic|SDL_GAMECONTROLLERCONFIG}} environment variable which will then be picked up by SDL/FNA games. For example:<br />
<br />
$ export SDL_GAMECONTROLLERCONFIG="030000008f0e00000300000010010000,GreenAsia Inc. USB Joystick ,platform:Linux,x:b3,a:b2,b:b1,y:b0,back:b8,start:b9,dpleft:h0.8,dpdown:h0.0,dpdown:h0.4,dpright:h0.0,dpright:h0.2,dpup:h0.0,dpup:h0.1,leftshoulder:h0.0,leftshoulder:b6,lefttrigger:b4,rightshoulder:b7,righttrigger:b5,leftstick:b10,rightstick:b11,leftx:a0,lefty:a1,rightx:a3,righty:a2,"<br />
<br />
=== Joystick not recognized by all programs ===<br />
<br />
Some software, Steam for example, will only recognize the first joystick it encounters. Due to a bug in the driver for Microsoft wireless periphery devices this can in fact be the bluetooth dongle. If you find you have a {{ic|/dev/input/js*}} and {{ic|/dev/input/event*}} belonging to you keyboard's bluetooth transceiver you can get automatically get rid of it by creating according udev rules.<br />
Create a {{ic|/}}:<br />
{{hc|/etc/udev/rules.d/99-btcleanup.rules|<nowiki><br />
ACTION=="add", KERNEL=="js[0-9]*", SUBSYSTEM=="input", KERNELS=="...", ATTRS{bInterfaceSubClass}=="00", ATTRS{bInterfaceProtocol}=="00", ATTRS{bInterfaceNumber}=="02", RUN+="/usr/bin/rm /dev/input/js%n"<br />
ACTION=="add", KERNEL=="event*", SUBSYSTEM=="input", KERNELS=="...", ATTRS{bInterfaceSubClass}=="00", ATTRS{bInterfaceProtocol}=="00", ATTRS{bInterfaceNumber}=="02", RUN+="/usr/bin/rm /dev/input/event%n"<br />
</nowiki>}}<br />
Correct the {{ic|<nowiki>KERNELS=="..."</nowiki>}} to match your device. The correct value can be found by running<br />
<br />
# udevadm info -an /dev/input/js0<br />
<br />
Assuming the device in question is {{ic|/dev/input/js0}}. After you placed the rule reload the rules with<br />
<br />
# udevadm control --reload<br />
<br />
Then replug the device making you trouble. The joystick and event devices should be gone, although their number will still be reserved. But the files are out of the way.<br />
<br />
=== Steam Controller not pairing ===<br />
<br />
There are some unknown cases where the packaged udev rule for the Steam controller does not work ({{bug|47330}}). The most reliable workaround is to make the controller world readable. Copy the rule {{ic|/usr/lib/udev/rules.d/70-steam-controller.rules}} to {{ic|/etc/udev/rules.d}} with a later prioritiy and change anything that says {{ic|1=MODE="0660"}} to {{ic|1=MODE="066'''6'''"}} e.g.<br />
<br />
{{hc|/etc/udev/rules.d/99-steam-controller-perms.rules|<nowiki><br />
...<br />
SUBSYSTEM=="usb", ATTRS{idVendor}=="28de", MODE="0666"<br />
...<br />
</nowiki>}}<br />
<br />
You may have to reboot in order for the change to take effect.<br />
<br />
=== Steam Controller makes a game crash or not recognized ===<br />
<br />
If your Steam Controller is working well in Steam Big Picture mode, but not recognized by a game or the game starts crashing when you plug in the controller, this may be because of the native driver that has been added to the Linux kernel 4.18. Try to unload it, restart Steam and replug the controller.<br />
<br />
The module name of the driver is ''hid_steam'', so to unload it you may perform:<br />
# rmmod hid_steam</div>Goetzchttps://wiki.archlinux.org/index.php?title=Gamepad&diff=629859Gamepad2020-08-06T00:07:05Z<p>Goetzc: /* xboxdrv */ add official web page link</p>
<hr />
<div>[[Category:Input devices]]<br />
[[Category:Gaming]]<br />
[[ja:ゲームパッド]]<br />
[[ru:Gamepad]]<br />
Joysticks can be a bit of a hassle to get working in Linux. Not because they are poorly supported, but simply because you need to determine which modules to load to get your joystick working, and it's not always very obvious!<br />
<br />
== Joystick input systems ==<br />
<br />
Linux has two different input systems for Joysticks – the original Joystick interface and the newer evdev-based interface.<br />
<br />
{{ic|1=/dev/input/jsX}} maps to the Joystick API interface and {{ic|/dev/input/event*}} maps to the evdev ones (this also includes other input devices such as mice and keyboards). Symbolic links to those devices are also available in {{ic|/dev/input/by-id/}} and {{ic|/dev/input/by-path/}} where the legacy Joystick API has names ending with {{ic|-joystick}} while the evdev have names ending with {{ic|-event-joystick}}.<br />
<br />
Most new games will default to the evdev interface as it gives more detailed information about the buttons and axes available and also adds support for force feedback.<br />
<br />
While SDL1 defaults to evdev interface you can force it to use the old Joystick API by setting the environment variable {{ic|1=SDL_JOYSTICK_DEVICE=/dev/input/js0}}. This can help many games such as X3. SDL2 supports only the new evdev interface.<br />
<br />
== Determining which modules you need ==<br />
<br />
Unless you're using very old joystick that uses gameport or proprietary USB protocol, you will need just the generic USB human interface device (HID) modules.<br />
<br />
For an extensive overview of all joystick related modules in Linux, you will need access to the Linux kernel sources -- specifically the Documentation section. Unfortunately, pacman kernel packages do not include what we need. If you have the kernel sources downloaded, have a look at {{ic|Documentation/input/joydev/}}. You can browse the kernel source tree at [https://kernel.org/ kernel.org] by clicking the "browse" (cgit - the git frontend) link for the kernel that you're using, then clicking the "tree" link near the top. Here's a link to the [https://www.kernel.org/doc/html/latest/input/joydev/joystick.html documentation from the latest kernel].<br />
<br />
Some joysticks need specific modules, such as the Microsoft Sidewinder controllers ({{ic|sidewinder}}), or the Logitech digital controllers ({{ic|adi}}). Many older joysticks will work with the simple {{ic|analog}} module. If your joystick is plugging in to a gameport provided by your soundcard, you will need your soundcard drivers loaded - however, some cards, like the Soundblaster Live, have a specific gameport driver ({{ic|emu10k1-gp}}). Older ISA soundcards may need the {{ic|ns558}} module, which is a standard gameport module.<br />
<br />
As you can see, there are many different modules related to getting your joystick working in Linux, so I couldn't possibly cover everything here. Please have a look at the documentation mentioned above for details.<br />
<br />
=== Loading the modules for analogue devices ===<br />
<br />
You need to load a module for your gameport ({{ic|ns558}}, {{ic|emu10k1-gp}}, {{ic|cs461x}}, etc...), a module for your joystick ({{ic|analog}}, {{ic|sidewinder}}, {{ic|adi}}, etc...), and finally the kernel joystick device driver ({{ic|joydev}}). Add these to a new file in {{ic|/etc/modules-load.d/}}, or simply modprobe them. The {{ic|gameport}} module should load automatically, as this is a dependency of the other modules.<br />
<br />
=== USB joysticks ===<br />
<br />
You need to get USB working, and then modprobe your joystick driver, which is {{ic|usbhid}}, as well as {{ic|joydev}}. <br />
If you use a usb mouse or keyboard, {{ic|usbhid}} will be loaded already and you just have to load the {{ic|joydev}} module.<br />
<br />
====Troubleshooting====<br />
If your Xbox 360 joystick is connected with the Play&Charge USB cable it will show up in {{ic|lsusb}} but it will not show up as an input device in {{ic|/dev/input/js*}}, see note below.<br />
<br />
== Testing your configuration ==<br />
<br />
Once the modules are loaded, you should be able to find a new device: {{ic|/dev/input/js0}} and a file ending with {{ic|-event-joystick}} in {{ic|/dev/input/by-id}} directory. You can simply {{ic|cat}} those devices to see if the joystick works - move the stick around, press all the buttons - you should see mojibake printed when you move the sticks or press buttons. <br />
<br />
Both interfaces are also supported in wine and reported as separate devices. You can test them with {{ic|1=wine control joy.cpl}}.<br />
<br />
{{Tip| Input devices by default have '''input''' group; for example, {{pkg|pcsx2}} have no access to gamepad without rights. Make sure your user is in the '''input''' group.}}<br />
<br />
<br />
=== Joystick API ===<br />
There are a lot of applications that can test this old API, {{ic|jstest}} from the {{pkg|joyutils}} package is the simplest one. If the output is unreadable because the line printed is too long you can also use graphical tools. Plasma has a built in one in Input Devices panel in System Settings or {{AUR|jstest-gtk-git}} is an alternative.<br />
<br />
Use of {{ic|jstest}} is fairly simple, you just run {{ic|jstest /dev/input/js0}} and it will print a line with state of all the axes (normalised to {-32767,32767}) and buttons.<br />
<br />
After you start {{ic|jstest-gtk}}, it will just show you a list of joysticks available, you just need to select one and press Properties.<br />
<br />
=== evdev API ===<br />
<br />
The new 'evdev' API can be tested using the SDL2 joystick test application or using {{ic|evtest}} from community repository. Install {{AUR|sdl2-jstest-git}} and then run {{ic|sdl2-jstest --test 0}}. Use {{ic|sdl2-jstest --list}} to get IDs of other controllers if you have multiple ones connected.<br />
<br />
To test force feedback on the device, use {{ic|fftest}} from {{ic|linuxconsole}} package:<br />
$ fftest /dev/input/by-id/usb-*event-joystick<br />
<br />
==Setting up deadzones and calibration==<br />
If you want to set up the deadzones (or remove them completely) of your analog input you have to do it separately for the xorg (for mouse and keyboard emulation), Joystick API and evdev API.<br />
<br />
===Wine deadzones===<br />
Add the following registry entry and set it to a string from 0 to 10000 (affects all axes):<br />
HKEY_CURRENT_USER\Software\Wine\DirectInput\DefaultDeadZone<br />
Source: [http://wiki.winehq.org/UsefulRegistryKeys UsefulRegistryKeys]<br />
<br />
===Xorg deadzones===<br />
Add a similar line to {{ic|/etc/X11/xorg.conf.d/51-joystick.conf}} (create if it doesn't exist):<br />
{{hc|1=/etc/X11/xorg.conf.d/51-joystick.conf|2=<nowiki><br />
Section "InputClass"<br />
Option "MapAxis1" "deadzone=1000"<br />
EndSection<br />
</nowiki>}}<br />
1000 is the default value, but you can set anything between 0 and 30 000. To get the axis number see the "Testing Your Configuration" section of this article.<br />
If you already have an option with a specific axis just type in the {{ic|1=deadzone=value}} at the end of the parameter separated by a space.<br />
<br />
===Joystick API deadzones===<br />
The easiest way is using {{ic|jstest-gtk}} from {{AUR|jstest-gtk-git}}. Select the controller you want to edit, then click the Calibration button at the bottom of the dialog ('''don't''' click Start Calibration there). You can then set the CenterMin and CenterMax values (which control the center deadzone), RangeMin and RangeMax which control the end of throw deadzones. Note that the calibration settings are applied when the application opens the device, so you need to restart your game or test application to see updated calibration settings.<br />
<br />
After you set the deadzones use {{ic|jscal}} to dump the new values into a shell script:<br />
$ jscal -p /dev/input/jsX > jscal.sh # replace X with your joystick's number <br />
$ chmod +x jscal.sh<br />
<br />
Now you need to make a [[udev]] rule (for example {{ic|/etc/udev/rules.d and name it 85-jscal.rules}}) so the script will automatically run when you connect the controller:<br />
SUBSYSTEM=="input", ATTRS{idVendor}=="054c", ATTRS{idProduct}=="c268", ACTION=="add", RUN+="/usr/bin/bash /usr/bin/jscal.sh"<br />
To get the idVendor and idProduct use {{ic|udevadm info --attribute-walk --name /dev/input/jsX}}<br />
<br />
Use the `/dev/input/by-id/*-joystick` device names in case you use multiple controllers.<br />
<br />
===evdev API deadzones===<br />
The {{ic|evdev-joystick}} tool from the {{pkg|linuxconsole}} package can be used to view and change deadzones and calibration for {{ic|evdev}} API devices.<br />
<br />
To view your device configuration:<br />
$ evdev-joystick --showcal /dev/input/by-id/usb-*-event-joystick<br />
<br />
To change the deadzone for a particular axis, use a command like:<br />
$ evdev-joystick --evdev /dev/input/by-id/usb-*-event-joystick --axis 0 --deadzone 0<br />
<br />
To set the same deadzone for all axes at once, omit the "--axis 0" option.<br />
<br />
Use udev rules file to set them automatically when the controller is connected.<br />
<br />
Note that inside the kernel, the value is called {{ic|flatness}} and is set using the {{ic|EVIOCSABS}} {{ic|ioctl}}.<br />
<br />
Default configuration will look like similar to this:<br />
{{hc|$ evdev-joystick --showcal /dev/input/by-id/usb-Madcatz_Saitek_Pro_Flight_X-55_Rhino_Stick_G0000090-event-joystick|2= Supported Absolute axes:<br />
Absolute axis 0x00 (0) (X Axis) (min: 0, max: 65535, flatness: 4095 (=6.25%), fuzz: 255)<br />
Absolute axis 0x01 (1) (Y Axis) (min: 0, max: 65535, flatness: 4095 (=6.25%), fuzz: 255)<br />
Absolute axis 0x05 (5) (Z Rate Axis) (min: 0, max: 4095, flatness: 255 (=6.23%), fuzz: 15)<br />
Absolute axis 0x10 (16) (Hat zero, x axis) (min: -1, max: 1, flatness: 0 (=0.00%), fuzz: 0)<br />
Absolute axis 0x11 (17) (Hat zero, y axis) (min: -1, max: 1, flatness: 0 (=0.00%), fuzz: 0)}}<br />
<br />
While a more reasonable setting would be achieved with something like this (repeat for other axes):<br />
{{hc|$ evdev-joystick --evdev /dev/input/by-id/usb-Madcatz_Saitek_Pro_Flight_X-55_Rhino_Stick_G0000090-event-joystick --axis 0 --deadzone 512|2= Event device file: /dev/input/by-id/usb-Madcatz_Saitek_Pro_Flight_X-55_Rhino_Stick_G0000090-event-joystick<br />
Axis index to deal with: 0<br />
New dead zone value: 512<br />
Trying to set axis 0 deadzone to: 512<br />
Absolute axis 0x00 (0) (X Axis) Setting deadzone value to : 512<br />
(min: 0, max: 65535, flatness: 512 (=0.78%), fuzz: 255)}}<br />
<br />
===Configuring curves and responsiveness===<br />
In case your game requires just limited amount of buttons or has good support for multiple controllers, you may have good results with using {{ic|xboxdrv}} to change response curves of the joystick.<br />
<br />
Below are the setups I use for Saitek X-55 HOTAS:<br />
$ xboxdrv --evdev /dev/input/by-id/usb-Madcatz_Saitek_Pro_Flight_X-55_Rhino_Throttle_G0000021-event-joystick \<br />
--evdev-no-grab --evdev-absmap 'ABS_#40=x1,ABS_#41=y1,ABS_X=x2,ABS_Y=y2' --device-name 'Hat and throttle' \<br />
--ui-axismap 'x2^cal:-32000:0:32000=,y2^cal:-32000:0:32000=' --silent<br />
<br />
this maps the EV_ABS event with id of 40 and 41 (use xboxdrv with --evdev-debug to see the events registered), which is the normally inaccessible "mouse pointer" on the throttle, to first gamepad joystick and throttles to second joystick, it also clamps the top and lower ranges as they not always register fully.<br />
<br />
A bit more interesting is the setup for the stick:<br />
$ xboxdrv --evdev /dev/input/by-id/usb-Madcatz_Saitek_Pro_Flight_X-55_Rhino_Stick_G0000090-event-joystick \<br />
--evdev-no-grab --evdev-absmap 'ABS_X=x1' --evdev-absmap 'ABS_Y=y1' --device-name 'Joystick' \<br />
--ui-axismap 'x1^cal:-32537:-455:32561=,x1^dead:-900:700:1=,x1^resp:-32768:-21845:-2000:0:2000:21485:32767=' \<br />
--ui-axismap 'y1^cal:-32539:-177:32532=,y1^dead:-700:2500:1=,y1^resp:-32768:-21845:-2000:0:2000:21485:32767=' \<br />
--evdev-absmap 'ABS_RZ=x2' --ui-axismap 'x2^cal:-32000:-100:32000,x2^dead:-1500:1000:1=,x2^resp:-32768:-21845:-2000:0:2000:21485:32767=' \<br />
--silent<br />
<br />
this maps the 3 joystick axes to gamepad axes and changes the calibration (min value, centre value, max value), dead zones (negative side, positive side, flag to turn smoothing) and finally change of response curve to a more flat one in the middle.<br />
<br />
You can also modify the responsiveness by setting the 'sen' (sensitivity). Setting it to value of 0 will give you a linear sensitivity, value of -1 will give very insensitive axis while value of 1 will give very sensitive axis. You can use intermediate values to make it less or more sensitive. Internally xboxdrv uses a quadratic formula to calculate the resulting value, so this setting gives a more smooth result than 'resp' shown above.<br />
<br />
Nice thing about xboxdrv is that it exports resulting device as both old Joystick API and new style evdev API so it should be compatible with basically any application.<br />
<br />
== Disable joystick from controlling mouse ==<br />
If you want to play games with your controller, you might want to disable joystick control over mouse cursor. To do this, edit {{ic|/etc/X11/xorg.conf.d/51-joystick.conf}} (create if it doesn't exists) so that it looks like this:<br />
{{hc|/etc/X11/xorg.conf.d/51-joystick.conf |<br />
Section "InputClass"<br />
Identifier "joystick catchall"<br />
MatchIsJoystick "on"<br />
MatchDevicePath "/dev/input/event*"<br />
Driver "joystick"<br />
Option "StartKeysEnabled" "False" #Disable mouse<br />
Option "StartMouseEnabled" "False" #support<br />
EndSection}}<br />
<br />
== Using Joystick to send keystrokes ==<br />
<br />
A couple joystick to keystroke programs exist like {{AUR|qjoypad}} or {{AUR|antimicrox-git}}, all work well without the need for X.org configuration.<br />
<br />
=== Xorg configuration example ===<br />
<br />
This is a good solution for systems where restarting Xorg is a rare event because it is a static configuration loaded only on X startup. The example runs on a [[Kodi]] media PC, controlled with a Logitech Cordless RumblePad 2. Due to a problem with the d-pad (a.k.a. "hat") being recognized as another axis, [[Joy2key]] was used as a workaround. Since upgrade to Kodi version 11.0 and joy2key 1.6.3-1, this setup no longer worked and the following was created for letting Xorg handle joystick events.<br />
<br />
First, [[install]] the {{AUR|xf86-input-joystick}} package. Then, create {{ic|/etc/X11/xorg.conf.d/51-joystick.conf}} like so:<br />
{{bc|<nowiki><br />
Section "InputClass"<br />
Identifier "Joystick hat mapping"<br />
Option "StartKeysEnabled" "True"<br />
#MatchIsJoystick "on"<br />
Option "MapAxis5" "keylow=113 keyhigh=114"<br />
Option "MapAxis6" "keylow=111 keyhigh=116"<br />
EndSection<br />
</nowiki>}}<br />
{{Note|The {{ic|MatchIsJoystick "on"}} line does not seem to be required for the setup to work, but you may want to uncomment it.}}<br />
<br />
== Specific devices ==<br />
<br />
While most joysticks, especially USB based ones should just work, some may require (or give better results) if you use alternative drivers. If it doesn't work the first time, do not give up, and read those docs thoroughly!<br />
<br />
=== Dance pads ===<br />
Most dance pads should work. However some pads, especially those used from a video game console via an adapter, have a tendency to map the directional buttons as axis buttons. This prevents hitting left-right or up-down simultaneously. This behavior can be fixed for devices recognized by xpad via a module option:<br />
<br />
# modprobe -r xpad<br />
# modprobe xpad dpad_to_buttons=1<br />
<br />
If that did not work, you can try {{AUR|axisfix-git}} or patching the {{ic|joydev}} kernel module (https://github.com/adiel-mittmann/dancepad).<br />
<br />
=== Logitech Thunderpad Digital ===<br />
<br />
Logitech Thunderpad Digital won't show all the buttons if you use the {{ic|analog}} module. Use the device specific {{ic|adi}} module for this controller.<br />
<br />
=== Nintendo Gamecube Controller ===<br />
<br />
Dolphin Emulator has a [https://wiki.dolphin-emu.org/index.php?title=How_to_use_the_Official_GameCube_Controller_Adapter_for_Wii_U_in_Dolphin page on their wiki] that explains how to use the official Nintendo USB adapter with a Gamecube controller. This configuration also works with the Mayflash Controller Adapter if the switch is set to "Wii U".<br />
<br />
By default, the controller will register with [[udev]], but will only be readable by the root user. You can fix this by adding a udev device rule, like the below. <br />
<br />
{{hc<br />
|head=/etc/udev/rules.d/51-gcadapter.rules<br />
|output=<nowiki>SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ATTRS{idVendor}=="057e", ATTRS{idProduct}=="0337", MODE="0666"</nowiki><br />
}}<br />
<br />
This only matches the USB device with the specified vendor and product IDs, which match those of the official USB adapter. It sets the permissions of the device file to 0666 so that programs that aren't running as root can read the device's input. <br />
<br />
udev can be reloaded with the new configuration by executing<br />
<br />
# udevadm control --reload-rules<br />
<br />
=== Nintendo Switch Pro Controller and Joy-Cons ===<br />
<br />
==== Kernel Nintendo HID Driver ====<br />
<br />
The hid-nintendo kernel HID driver is currently in review on the linux-input mailing list. The most recent version of the changeset is currently being maintained in this[https://github.com/DanielOgorchock/linux] git repository, or this[https://patchwork.kernel.org/patch/11441647/] kernel patchset. It's also available as a dkms module named {{AUR|hid-nintendo-dkms}}. The driver provides support for rumble, battery level, and control of the player and home LEDs. It supports the Nintendo Switch Pro Controller over both USB and bluetooth in addition to the joy-cons.<br />
<br />
===== joycond Userspace Daemon =====<br />
<br />
The hid-nintendo kernel driver does not handle the combination of two joy-cons into one virtual input device. That functionality has been left up to userspace. {{AUR|joycond-git}} is a userspace daemon that combines two kernel joy-con evdev devices into one virtual input device using uinput. An application can use two joy-cons as if they are a single controller. When the daemon is active, switch controllers will be placed in a pseudo pairing mode, and the LEDs will start flashing. Holding the triggers can be used to pair controllers and make them usable. To pair two joy-cons together, press one trigger on each joy-con.<br />
<br />
===== Using hid-nintendo with Steam Games =====<br />
<br />
The hid-nintendo driver currently conflicts with steam using hidraw to implement its own pro controller driver. If you wish to use the Steam implementation, the hid-nintendo driver can be blacklisted. Alternatively if you want to use hid-nintendo with a Steam game directly, Steam can be started without access to hidraw using firejail:<br />
<br />
$ firejail --noprofile --blacklist=/sys/class/hidraw/ steam<br />
<br />
An [https://github.com/ValveSoftware/steam-for-linux/issues/6651 issue] has been opened on the steam-for-linux github repo.<br />
<br />
===== Using hid-nintendo with SDL2 Games =====<br />
<br />
To add a mapping for the joy-cons or the pro controller to an SDL2 game, {{AUR|controllermap}} can be run in the game's directory of games which have their own gamecontrollerdb.txt file.<br />
<br />
Alternatively, the mappings can be added to an environment variable:<br />
<br />
{{hc|1=~/.bashrc |2=# hid-nintendo SDL2 mappings<br />
export SDL_GAMECONTROLLERCONFIG="050000007e0500000920000001800000,Nintendo Switch Pro Controller,platform:Linux,a:b0,b:b1,x:b3,y:b2,back:b9,guide:b11,start:b10,leftstick:b12,rightstick:b13,leftshoulder:b5,rightshoulder:b6,dpup:b14,dpdown:b15,dpleft:b16,dpright:b17,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b7,righttrigger:b8,<br />
030000007e0500000920000011810000,Nintendo Switch Pro Controller,platform:Linux,a:b0,b:b1,x:b3,y:b2,back:b9,guide:b11,start:b10,leftstick:b12,rightstick:b13,leftshoulder:b5,rightshoulder:b6,dpup:h0.1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b7,righttrigger:b8,<br />
060000007e0500000620000000000000,Nintendo Switch Combined Joy-Cons,platform:Linux,a:b0,b:b1,x:b3,y:b2,back:b9,guide:b11,start:b10,leftstick:b12,rightstick:b13,leftshoulder:b5,rightshoulder:b6,dpup:b14,dpdown:b15,dpleft:b16,dpright:b17,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b7,righttrigger:b8,<br />
"}}<br />
<br />
==== Dolphin (Gamecube Controller Emulation) ====<br />
<br />
Shinyquagsire23 made a git repo called "HID Joy-Con Whispering"[https://github.com/shinyquagsire23/HID-Joy-Con-Whispering], which contains a userspace driver for the Joy Cons and the Switch Pro Controller over USB. Currently, it does not support rumble or gyroscope. For rumble support, see the hid-nintendo kernel driver section above.<br />
<br />
After running make, load the uinput module:<br />
<br />
# modprobe uinput<br />
<br />
Then to activate the driver:<br />
<br />
# ./uinputdriver > /dev/null<br />
<br />
Over on Dolphin's controller configuration menu, there should be an entry for evdev/0/joycon (not Nintendo Switch Pro Controller). Select it, and you should now be able to configure the controls.<br />
<br />
==== Steam ====<br />
<br />
While the controller works for native Linux games, this controller isn't detected by Steam. To fix this, we'll need to add a line to 70-steam-controller.rules.<br />
<br />
{{hc<br />
|head=/lib/udev/rules.d/70-steam-controller.rules<br />
|output=<nowiki># NS PRO Controller USB<br />
KERNEL=="hidraw*", ATTRS{idVendor}=="20d6", ATTRS{idProduct}=="a711", MODE="0660", TAG+="uaccess"</nowiki><br />
}}<br />
<br />
udev can be reloaded with the new configuration by executing<br />
<br />
# udevadm control --reload-rules<br />
<br />
=== PlayStation 3/4 controller ===<br />
<br />
The DualShock 3, DualShock 4 and Sixaxis controllers work out of the box when plugged in via USB (the PS button will need to be pushed to begin). They can also be used wirelessly via Bluetooth.<br />
<br />
Steam properly recognizes it as a PS3 pad and Big Picture can be launched with the PS button. Big Picture and some games may act as if it was a 360 controller. Gamepad control over mouse is on by default. You may want to turn it off before playing games, see [[#Joystick moving mouse]].<br />
<br />
=====Connecting via Bluetooth=====<br />
<br />
Install the {{Pkg|bluez}}, {{Pkg|bluez-plugins}}, and {{Pkg|bluez-utils}} packages, which includes the ''sixaxis'' plugin. Then [[start]] the [[bluetooth]] service and ensure bluetooth is powered on. If using ''bluetoothctl'' start it in a terminal and then plug the controller in via USB. You should be prompted to trust the controller in bluetoothctl. A graphical bluetooth front-end may program your PC's bluetooth address into the controller automatically. Hit the PlayStation button and check that the controller works while plugged in.<br />
<br />
You can now disconnect your controller. The next time you hit the PlayStation button it will connect without asking anything else.<br />
<br />
Alternatively, on a PS4 controller you can hold the share button and the PlayStation button simultaneously (for a few seconds) to put the gamepad in pairing mode, and pair as you would normally.<br />
<br />
GNOME's Settings also provides a graphical interface to pair sixaxis controllers when connected by wire.<br />
<br />
Remember to disconnect the controller when you are done as the controller will stay on when connected and drain the battery.<br />
<br />
{{Note|If the controller does not connect, make sure the bluetooth interface is turned on and the controllers have been trusted. (See [[Bluetooth]])}}<br />
<br />
=====Using Playstation 3 controllers with Steam=====<br />
<br />
{{out of date|Tested connecting PS3 controller via bluetooth and it worked in Steam version 1575605714 and some Steam games without performing the following steps.}}<br />
<br />
For Steam to recognize your controllers, it needs to be able to read their device file. The {{Pkg|steam}} package sets up udev rules for lots of controllers, but not the PlayStation 3 controller (aka. DualShock 3 controller). You can add the rules yourself:<br />
<br />
{{hc<br />
|/etc/udev/rules.d/99-dualshock-3.rules|2=<br />
# DualShock 3 controller, Bluetooth<br />
KERNEL=="hidraw*", KERNELS=="*054C:0268*", MODE="0660", TAG+="uaccess"<br />
<br />
# DualShock 3 controller, USB<br />
KERNEL=="hidraw*", ATTRS{idVendor}=="054c", ATTRS{idProduct}=="0268", MODE="0660", TAG+="uaccess"<br />
}}<br />
<br />
Make sure your user is in the "input" group:<br />
<br />
{{ic | usermod -aG input yourusername}}<br />
<br />
Reboot your system. Steam should now detect your PlayStation 3 controller.<br />
<br />
=====Using generic/clone controllers=====<br />
<br />
Using generic/clone Dualshock controllers is possible, however there is an issue that may require to install a patched package. The default Bluetooth protocol stack doesn't detect some of the clone controllers. The {{AUR|bluez-ps3}} package is a version patched to be able to detect them.<br />
<br />
=== iPEGA-9017s and other Bluetooth gamepads ===<br />
<br />
If you want to use one of the widely available bluetooth gamepads, such as iPEGA-9017s designed mostly for Android and iOS devices you would need {{AUR|xboxdrv}}, {{Pkg|bluez}}, {{Pkg|bluez-plugins}}, and {{Pkg|bluez-utils}}. You should connect it in gamepad mode (if there are different modes, choose the gamepad one). Technically it's ready to be used, but in most cases games would not recognize it, and you would have to map it individually for all application. The best way to simplify it and make it work with all applications is to mimic Microsoft X360 controller with {{AUR|xboxdrv}}.<br />
Once connected you can create a udev rule to give it a persistent name, that would come in handy when setting it up.<br />
<br />
{{hc<br />
|/etc/udev/rules.d/99-btjoy.rules|2=<br />
#Create a symlink to appropriate /dev/input/eventX at /dev/btjoy<br />
ACTION=="add", SUBSYSTEM=="input", ATTRS{name}=="Bluetooth Gamepad", ATTRS{uniq}=="00:17:02:01:ae:2a", SYMLINK+="btjoy"<br />
}}<br />
<br />
Replace "Bluetooth Gampad" with your device name and "00:17:02:01:ae:2a" with your device's address.<br />
<br />
Next, create a configuration for {{AUR|xboxdrv}} somewhere, for example:<br />
<br />
{{hc<br />
|~/.config/xboxdrv/ipega.conf|2=<br />
#iPEGA PG-9017S Config <br />
<br />
[xboxdrv]<br />
evdev-debug = true<br />
evdev-grab = true<br />
rumble = false<br />
mimic-xpad = true<br />
<br />
[evdev-absmap]<br />
ABS_HAT0X = dpad_x<br />
ABS_HAT0Y = dpad_y<br />
<br />
ABS_X = X1<br />
ABS_Y = Y1<br />
<br />
ABS_Z = X2<br />
ABS_RZ = Y2<br />
<br />
[axismap]<br />
-Y1 = Y1<br />
-Y2 = Y2<br />
<br />
[evdev-keymap]<br />
BTN_EAST=a<br />
BTN_C=b<br />
BTN_NORTH=y<br />
BTN_SOUTH=x<br />
BTN_TR2=start<br />
BTN_TL2=back<br />
BTN_Z=rt<br />
BTN_WEST=lt<br />
<br />
BTN_MODE = guide<br />
}}<br />
<br />
Refer to the xboxdrv man to see all the options.<br />
<br />
Now when you have the config and your device is connected you can start the {{AUR|xboxdrv}} like so:<br />
<br />
# xboxdrv --evdev /dev/btjoy --config .config/xboxdrv/ipega.conf<br />
<br />
Your games will now work with bluetooth gamepad as long as xboxdrv is running.<br />
<br />
==== iPEGA-9068 and 9087 ====<br />
<br />
For this model, use the same procedures as above, but with the configs:<br />
<br />
{{hc<br />
|~/.config/xboxdrv/ipega.conf|2=<br />
#iPEGA PG-9068 and PG-9087 Config <br />
<br />
[xboxdrv]<br />
evdev-debug = true<br />
evdev-grab = true<br />
rumble = false<br />
mimic-xpad = true<br />
<br />
[evdev-absmap]<br />
ABS_HAT0X = dpad_x<br />
ABS_HAT0Y = dpad_y<br />
<br />
ABS_X = X1<br />
ABS_Y = Y1<br />
<br />
ABS_Z = X2<br />
ABS_RZ = Y2<br />
<br />
[axismap]<br />
-Y1 = Y1<br />
-Y2 = Y2<br />
<br />
[evdev-keymap]<br />
BTN_A=a<br />
BTN_B=b<br />
BTN_Y=y<br />
BTN_X=x<br />
BTN_TR=rb<br />
BTN_TL=lb<br />
BTN_TR2=rt<br />
BTN_TL2=lt<br />
BTN_THUMBL=tl<br />
BTN_THUMBR=tr<br />
BTN_START=start<br />
BTN_SELECT=back<br />
<br />
BTN_MODE = guide<br />
}}<br />
<br />
=== Steam Controller ===<br />
<br />
{{Note|Kernel 4.18 [https://lkml.org/lkml/2018/4/16/380 provides a kernel driver] for wired/wireless use of the steam controller as a controller input device without [[Steam]].}}<br />
<br />
The [[Steam]] client will recognize the controller and provide keyboard/mouse/gamepad emulation while Steam is running. The in-game Steam overlay needs to be enabled and working in order for gamepad emulation to work. You may need to run {{ic|udevadm trigger}} with root privileges or plug the dongle out and in again, if the controller doesn't work immediately after installing and running Steam. If all else fails, try restarting the computer while the dongle is plugged in.<br />
<br />
For Steam client to be able to emulate other gamepads in games, you will need to follow this [https://steamcommunity.com/app/353370/discussions/2/1735465524711324558/ post] from Valve. Note that name of the file with udev rules may be different, for example {{ic|/usr/lib/udev/rules.d/70-steam-input.rules}}. A reboot may be required after making changes.<br />
<br />
If you can't get the Steam Controller to work, see [[#Steam Controller not pairing]].<br />
<br />
Alternatively you can install {{AUR|python-steamcontroller-git}} to have controller and mouse emulation without Steam or {{AUR|sc-controller}} for a versatile graphical configuration tool simillar to what is provided by the Steam client.<br />
<br />
{{Out of date|As of September 17, 2019 beta release, Steam has fixed the on screen keyboard from taking focus.}}<br />
<br />
On some desktop environments the on-screen keyboard might freeze when trying to input text after one or two characters. This is a problem with window focus. Check the settings for your [[window manager]] to see if it is possible to have focus follow the mouse or automatically focus new windows. Preventing the keyboard from receiving focus will fix the issue in [[Awesome]], see [[Awesome#Steam Keyboard]].<br />
<br />
{{Note|If you do not use the [[Steam runtime]], you might actually need to disable the overlay for the controller to work in certain games (Rocket Wars, Rocket League, Binding of Isaac, etc.). Right click on a game in your library, select "Properties", and uncheck "Enable Steam Overlay".}}<br />
<br />
==== Wine ====<br />
<br />
{{AUR|python-steamcontroller-git}} can also be used to make the Steam Controller work for games running under Wine. You need to find and download the application {{ic|xbox360cemu.v.3.0}} (e.g. from [https://github.com/jacobmischka/ds4-in-wine/tree/master/xbox360cemu.v.3.0 here]). Then copy the files {{ic|dinput8.dll}}, {{ic|xbox360cemu.ini}}, {{ic|xinput1_3.dll}} and {{ic|xinput_9_1_0.dll}} to the directory that contains your game executable. Edit {{ic|xbox360cemu.ini}} and only change the following values under {{ic|[PAD1]}} to remap the Steam Controller correctly to a XBox controller.<br />
<br />
{{hc|xbox360cemu.ini|2= Right Analog X=4<br />
Right Analog Y=-5<br />
A=1<br />
B=2<br />
X=3<br />
Y=4<br />
Back=7<br />
Start=8<br />
Left Thumb=10<br />
Right Thumb=11<br />
Left Trigger=a3<br />
Right Trigger=a6}}<br />
<br />
Now start python-steamcontroller in Xbox360 mode ({{ic|sc-xbox.py start}}). You might also want to copy {{ic|XInputTest.exe}} from {{ic|xbox360cemu.v.3.0}} to the same directory and run it with Wine in order to test if the mappings work correctly. However neither mouse nor keyboard emulation work with this method.<br />
<br />
Alternatively you can use {{AUR|sc-controller}} for a similar graphical setup as Steam's own configurator. As of writing, it's a bit buggy here and there but offers an easy click and go way of configuring the controller.<br />
<br />
=== Xbox 360 controller ===<br />
<br />
Both the wired and wireless (with the ''Xbox 360 Wireless Receiver for Windows'') controllers are supported by the {{ic|xpad}} kernel module and should work without additional packages. (Note that using a wireless Xbox360 controller with the Play&Charge USB cable will not work. The cable is for recharging only and does not transmit any input data over the wire.)<br />
<br />
It has been reported that the default xpad driver has some issues with a few newer wired and wireless controllers, such as:<br />
* incorrect button mapping. ([https://github.com/ValveSoftware/steam-for-linux/issues/95#issuecomment-14009081 discussion in Steam bugtracker])<br />
* not-working sync. All four LEDs keep blinking, but controller works. ([https://bbs.archlinux.org/viewtopic.php?id=156028 discussion in Arch Forum])<br />
<br />
If you experience such issues, you can use either [[#SteamOS xpad]] or [[#xboxdrv]] instead of the default {{ic|xpad}} driver.<br />
<br />
If you wish to use the controller for controlling the mouse, or mapping buttons to keys, etc. you should use the {{AUR|xf86-input-joystick}} package (configuration help can be found using {{man|4|joystick|url=}}). If the mouse locks itself in a corner, it might help changing the {{ic|MatchDevicePath}} in {{ic|/etc/X11/xorg.conf.d/50-joystick.conf}} from {{ic|/dev/input/event*}} to {{ic|/dev/input/js*}}.<br />
<br />
{{Tip|If you use the [[TLP]] power management tool, you may experience connection issues with your Microsoft wireless adapter (e.g. the indicator LED will go out after the adapter has been connected for a few seconds, and controller connection attempts fail). This is due to TLP's USB autosuspend functionality, and the solution is to add the Microsoft wireless adapter's device ID to this feature's blacklist (USB_BLACKLIST, check [http://linrunner.de/en/tlp/docs/tlp-configuration.html#usb TLP configuration] for more details).}}<br />
<br />
In order to connect via Bluetooth using KDE, add the following [[kernel parameter]] {{ic|1=bluetooth.disable_ertm=1}}.<br />
<br />
==== SteamOS xpad ====<br />
<br />
If you have issues with the default {{ic|xpad}} kernel module, you can install the SteamOS version. There is still a known issue with compatibility between wireless Xbox360 controllers and games made in GameMaker Studio. If you encounter this problem, the only known workaround is to use xboxdrv. YoYo Games has refused to acknowledge this as a bug with their product and it is unlikely to ever be fixed.<br />
<br />
First make sure you have [[DKMS]] installed and running, then install the modified kernel module {{AUR|steamos-xpad-dkms}}. During the installation you'll see that new xpad kernel module is strapped to your current kernel:<br />
<br />
Creating symlink /var/lib/dkms/steamos-xpad-dkms/0.1/source -&gt;<br />
/usr/src/steamos-xpad-dkms-0.1<br />
<br />
DKMS: add completed.<br />
<br />
Kernel preparation unnecessary for this kernel. Skipping...<br />
<br />
Building module:<br />
cleaning build area....<br />
make KERNELRELEASE=3.12.8-1-ARCH KVERSION=3.12.8-1-ARCH....<br />
cleaning build area....<br />
<br />
Then unload the old xpad module and load new one:<br />
<br />
# rmmod xpad<br />
# modprobe steamos-xpad<br />
<br />
Or just restart your computer.<br />
<br />
==== xboxdrv ====<br />
<br />
[https://gitlab.com/xboxdrv/xboxdrv xboxdrv] is an alternative to {{ic|xpad}} which provides more functionality and might work better with certain controllers. It works in userspace and can be launched as system service. <br />
<br />
Install it with the {{AUR|xboxdrv}} package. Then [[start]]/[[enable]] {{ic|xboxdrv.service}}.<br />
<br />
If you have issues with the controller being recognized but not working in steam games or working but with incorrect mappings, it may be required to modify you config as such:<br />
{{hc<br />
|/etc/default/xboxdrv|2=<br />
[xboxdrv]<br />
silent = true<br />
device-name = "Xbox 360 Wireless Receiver"<br />
mimic-xpad = true<br />
deadzone = 4000<br />
<br />
[xboxdrv-daemon]<br />
dbus = disabled<br />
}}<br />
<br />
Then [[restart]] {{ic|xboxdrv.service}}.<br />
<br />
===== Multiple controllers =====<br />
<br />
xboxdrv supports a multitude of controllers, but they need to be set up in {{ic|/etc/default/xboxdrv}}. For each extra controller, add an {{ic|1=next-controller = true}} line. For example, when using 4 controllers, add it 3 times:<br />
<br />
{{bc|<nowiki><br />
[xboxdrv]<br />
silent = true<br />
next-controller = true<br />
next-controller = true<br />
next-controller = true<br />
[xboxdrv-daemon]<br />
dbus = disabled<br />
</nowiki>}}<br />
<br />
Then [[restart]] {{ic|xboxdrv.service}}.<br />
<br />
===== Mimic Xbox 360 controller with other controllers =====<br />
<br />
xboxdrv can be used to make any controller register as an Xbox 360 controller with the {{ic|--mimic-xpad}} switch. This may be desirable for games that support Xbox 360 controllers out of the box, but have trouble detecting or working with other gamepads.<br />
<br />
First, you need to find out what each button and axis on the controller is called. You can use {{Pkg|evtest}} for this. Run {{ic|evtest}} and select the device event ID number ({{ic|/dev/input/event*}}) that corresponds to your controller. Press the buttons on the controller and move the axes to read the names of each button and axis.<br />
<br />
Here is an example of the output:<br />
{{bc|<nowiki><br />
<br />
Event: time 1380985017.964843, type 4 (EV_MSC), code 4 (MSC_SCAN), value 90003<br />
Event: time 1380985017.964843, type 1 (EV_KEY), code 290 (BTN_THUMB2), value 1<br />
Event: time 1380985017.964843, -------------- SYN_REPORT ------------<br />
Event: time 1380985018.076843, type 4 (EV_MSC), code 4 (MSC_SCAN), value 90003<br />
Event: time 1380985018.076843, type 1 (EV_KEY), code 290 (BTN_THUMB2), value 0<br />
Event: time 1380985018.076843, -------------- SYN_REPORT ------------<br />
Event: time 1380985018.460841, type 4 (EV_MSC), code 4 (MSC_SCAN), value 90002<br />
Event: time 1380985018.460841, type 1 (EV_KEY), code 289 (BTN_THUMB), value 1<br />
Event: time 1380985018.460841, -------------- SYN_REPORT ------------<br />
Event: time 1380985018.572835, type 4 (EV_MSC), code 4 (MSC_SCAN), value 90002<br />
Event: time 1380985018.572835, type 1 (EV_KEY), code 289 (BTN_THUMB), value 0<br />
Event: time 1380985018.572835, -------------- SYN_REPORT ------------<br />
Event: time 1380985019.980824, type 4 (EV_MSC), code 4 (MSC_SCAN), value 90006<br />
Event: time 1380985019.980824, type 1 (EV_KEY), code 293 (BTN_PINKIE), value 1<br />
Event: time 1380985019.980824, -------------- SYN_REPORT ------------<br />
Event: time 1380985020.092835, type 4 (EV_MSC), code 4 (MSC_SCAN), value 90006<br />
Event: time 1380985020.092835, type 1 (EV_KEY), code 293 (BTN_PINKIE), value 0<br />
Event: time 1380985020.092835, -------------- SYN_REPORT ------------<br />
Event: time 1380985023.596806, type 3 (EV_ABS), code 3 (ABS_RX), value 18<br />
Event: time 1380985023.596806, -------------- SYN_REPORT ------------<br />
Event: time 1380985023.612811, type 3 (EV_ABS), code 3 (ABS_RX), value 0<br />
Event: time 1380985023.612811, -------------- SYN_REPORT ------------<br />
Event: time 1380985023.708768, type 3 (EV_ABS), code 3 (ABS_RX), value 14<br />
Event: time 1380985023.708768, -------------- SYN_REPORT ------------<br />
Event: time 1380985023.724772, type 3 (EV_ABS), code 3 (ABS_RX), value 128<br />
Event: time 1380985023.724772, -------------- SYN_REPORT ------------<br />
</nowiki>}}<br />
<br />
In this case, {{ic|BTN_THUMB}}, {{ic|BTN_THUMB2}} and {{ic|BTN_PINKIE}} are buttons and {{ic|ABS_RX}} is the X axis of the right analogue stick.<br />
You can now mimic an Xbox 360 controller with the following command:<br />
<br />
$ xboxdrv --evdev /dev/input/event* --evdev-absmap ABS_RX=X2 --evdev-keymap BTN_THUMB2=a,BTN_THUMB=b,BTN_PINKIE=rt --mimic-xpad<br />
<br />
The above example is incomplete. It only maps one axis and 3 buttons for demonstration purposes. Use {{ic|xboxdrv --help-button}} to see the names of the Xbox controller buttons and axes and bind them accordingly by expanding the command above. Axes mappings should go after {{ic|--evdev-absmap}} and button mappings follow {{ic|--evdev-keymap}} (comma separated list; no spaces).<br />
<br />
By default, xboxdrv outputs all events to the terminal. You can use this to test that the mappings are correct. Append the {{ic|--silent}} option to keep it quiet.<br />
<br />
==== Using generic/clone controllers ====<br />
<br />
Some clone gamepads might require a specific initialization sequence in order to work ([https://superuser.com/a/1380235/303390 Super User answer]). For that you should run the following python script as the root user:<br />
<br />
{{bc|<nowiki><br />
#!/usr/bin/env python3<br />
<br />
import usb.core<br />
<br />
dev = usb.core.find(idVendor=0x045e, idProduct=0x028e)<br />
<br />
if dev is None:<br />
raise ValueError('Device not found')<br />
else:<br />
dev.ctrl_transfer(0xc1, 0x01, 0x0100, 0x00, 0x14) <br />
</nowiki>}}<br />
<br />
=== Xbox Wireless Controller / Xbox One Wireless Controller ===<br />
<br />
==== Connect Xbox Wireless Controller with usb cable ====<br />
<br />
This is supported by the kernel and should work without additional packages.<br />
<br />
==== Connect Xbox Wireless Controller with Bluetooth ====<br />
<br />
You will probably have to disable Enhanced Retransmission Mode (ERTM) to make it work.<br />
<br />
Use either:<br />
<br />
# echo 1 > /sys/module/bluetooth/parameters/disable_ertm<br />
<br />
Or add this file to your module configuration:<br />
<br />
{{hc<br />
|/etc/modprobe.d/xbox_bt.conf|2=<br />
options bluetooth disable_ertm=1<br />
}}<br />
<br />
===== xpadneo =====<br />
<br />
A relatively new driver which does (yet) support only the Xbox One S controller via Bluetooth is called [https://github.com/atar-axis/xpadneo/ xpadneo].<br />
In exchange for supporting just one controller so far, it enables one to read out the correct battery level, supports rumble (even the one on the trigger buttons - L2/R2), corrects the (sometimes wrong) button mapping and more.<br />
<br />
Installation is done using DKMS: {{AUR|xpadneo-dkms-git}}<br />
<br />
==== Connect Xbox Wireless Controller with Microsoft Xbox Wireless Adapter ====<br />
<br />
===== xow =====<br />
<br />
[https://github.com/medusalix/xow xow] is a project that allows connection with a wireless dongle. It is currently in very early stages of development. It can be installed via {{AUR|xow-git}}<br />
<br />
===Logitech Dual Action===<br />
<br />
The Logitech Dual Action gamepad has a very similar mapping to the PS2 pad, but some buttons and triggers need to be swapped to mimic the Xbox controller.<br />
<br />
# xboxdrv --evdev /dev/input/event* \<br />
--evdev-absmap ABS_X=x1,ABS_Y=y1,ABS_RZ=x2,ABS_Z=y2,ABS_HAT0X=dpad_x,ABS_HAT0Y=dpad_y \<br />
--axismap -Y1=Y1,-Y2=Y2 \<br />
--evdev-keymap BTN_TRIGGER=x,BTN_TOP=y,BTN_THUMB=a,BTN_THUMB2=b,BTN_BASE3=back,BTN_BASE4=start,BTN_BASE=lt,BTN_BASE2=rt,BTN_TOP2=lb,BTN_PINKIE=rb,BTN_BASE5=tl,BTN_BASE6=tr \<br />
--mimic-xpad --silent<br />
<br />
===PlayStation 2 controller via USB adapter===<br />
<br />
To fix the button mapping of PS2 dual adapters and mimic the Xbox controller you can run the following command:<br />
<br />
# xboxdrv --evdev /dev/input/event* \<br />
--evdev-absmap ABS_X=x1,ABS_Y=y1,ABS_RZ=x2,ABS_Z=y2,ABS_HAT0X=dpad_x,ABS_HAT0Y=dpad_y \<br />
--axismap -Y1=Y1,-Y2=Y2 \<br />
--evdev-keymap BTN_TOP=x,BTN_TRIGGER=y,BTN_THUMB2=a,BTN_THUMB=b,BTN_BASE3=back,BTN_BASE4=start,BTN_BASE=lb,BTN_BASE2=rb,BTN_TOP2=lt,BTN_PINKIE=rt,BTN_BASE5=tl,BTN_BASE6=tr \<br />
--mimic-xpad --silent<br />
<br />
===PlayStation 3 controller===<br />
====Pairing via USB====<br />
<br />
If you own a PS3 controller and can connect with USB, plug it to your computer and press the PS button. The controller will power up and one of the four LEDs should light up indicating the controller's number<br />
.<br />
<br />
====Pairing via Bluetooth====<br />
<br />
To connect your PS3 controller to your computer using Bluetooth, you first need to install {{Pkg|bluez}} and {{Pkg|bluez-plugins}} then connect your controller via USB. A pop-up should appear asking for pairing. Click on Trust & Authorize. You can now unplug your controller and press the PS button. The controller will connect and a LED will remain solid. You can now use it to play games. Connecting using the USB cable is only needed after the controller has been connected to another system.<br />
<br />
===PlayStation 4 controller===<br />
<br />
====Pairing via USB====<br />
<br />
Connect your controller via USB and press the {{ic|PS}} button.<br />
<br />
====Pairing via Bluetooth====<br />
<br />
If you want to use bluetooth mode, press {{ic|PS}} button and {{ic|Share}} button together, white led of gamepad should blink very quickly, then add wireless controller with your bluetooth manager (bluez, gnome-bluetooth.<br />
<br />
====Button mapping====<br />
<br />
To fix the button mapping of PS4 controller you can use the following command with xboxdrv (or try with the [https://github.com/chrippa/ds4drv ds4drv] program):<br />
<br />
# xboxdrv \<br />
--evdev /dev/input/by-id/usb-Sony_Computer_Entertainment_Wireless_Controller-event-joystick\<br />
--evdev-absmap ABS_X=x1,ABS_Y=y1 \<br />
--evdev-absmap ABS_Z=x2,ABS_RZ=y2 \<br />
--evdev-absmap ABS_HAT0X=dpad_x,ABS_HAT0Y=dpad_y \<br />
--evdev-keymap BTN_A=x,BTN_B=a \<br />
--evdev-keymap BTN_C=b,BTN_X=y \<br />
--evdev-keymap BTN_Y=lb,BTN_Z=rb \<br />
--evdev-keymap BTN_TL=lt,BTN_TR=rt \<br />
--evdev-keymap BTN_SELECT=tl,BTN_START=tr \<br />
--evdev-keymap BTN_TL2=back,BTN_TR2=start \<br />
--evdev-keymap BTN_MODE=guide \<br />
--axismap -y1=y1,-y2=y2 \<br />
--mimic-xpad \<br />
--silent<br />
<br />
====Fix Motion control conflict (gamepad won't work on somes apps)====<br />
<br />
Dualshock 4 V1 and V2 are both like 3 devices, touchpad, motion control, and joypad.<br />
<br />
With somes softwares like Parsec and Shadow cloud gaming streaming apps, motion control is in conflict with joypad, you can disable touchpad and motion control by adding the following udev rule :<br />
<br />
{{hc|1=/etc/udev/rules.d/51-disable-DS3-and-DS4-motion-controls.rules|2=<br />
SUBSYSTEM=="input", ATTRS{name}=="*Controller Motion Sensors", RUN+="/bin/rm %E{DEVNAME}", ENV{ID_INPUT_JOYSTICK}=""<br />
SUBSYSTEM=="input", ATTRS{name}=="*Controller Touchpad", RUN+="/bin/rm %E{DEVNAME}", ENV{ID_INPUT_JOYSTICK}=""<br />
}}<br />
<br />
This should work in USB and Bluetooth mode.<br />
<br />
====Disable touchpad acting as mouse====<br />
<br />
This fixes conflicts with games that actually use touchpad as part of the gamepad, such as Rise of the Tomb Raider.<br />
<br />
Edit {{ic|/etc/X11/xorg.conf.d/30ds4.conf}}.<br />
<br />
And then paste the following and restart X11:<br />
Section "InputClass"<br />
Identifier "ds4-touchpad"<br />
Driver "libinput"<br />
MatchProduct "Sony Interactive Entertainment Wireless Controller Touchpad"<br />
Option "Ignore" "True"<br />
EndSection<br />
<br />
== Troubleshooting ==<br />
<br />
=== Joystick moving mouse ===<br />
<br />
Sometimes USB joystick can be recognized as HID mouse (only in X, it is still being installed as {{ic|/dev/input/js0}} as well). Known issue is cursor being moved by the joystick, or escaping to en edge of a screen right after plugin. If your application can detect joystick by it self, you can remove the {{AUR|xf86-input-joystick}} package.<br />
<br />
A more gentle solution is described in [[#Disable joystick from controlling mouse]].<br />
<br />
=== Joystick not working in FNA/SDL based games ===<br />
If you are using a generic non-widely used gamepad you may encounter issues getting the gamepad recognized in games based on SDL. Since [https://github.com/flibitijibibo/FNA/commit/e55742cfe7e38b778a21ed8a12cb2f2081490d8d 14 May 2015], FNA supports dropping a {{ic|gamecontrollerdb.txt }} into the executable folder of the game, for example the [https://github.com/gabomdq/SDL_GameControllerDB SDL_GameControllerDB]{{Dead link|2020|03|17}}.<br />
<br />
As an alternative and for older versions of FNA or for SDL you can generate a mapping yourself by downloading the SDL source code via http://libsdl.org/, navigating to {{ic|/test/}}, compile the {{ic|controllermap.c}} program (alternatively install {{AUR|controllermap}}) and run the test. After completing the controllermap test, a guid will be generated that you can put in the {{ic|SDL_GAMECONTROLLERCONFIG}} environment variable which will then be picked up by SDL/FNA games. For example:<br />
<br />
$ export SDL_GAMECONTROLLERCONFIG="030000008f0e00000300000010010000,GreenAsia Inc. USB Joystick ,platform:Linux,x:b3,a:b2,b:b1,y:b0,back:b8,start:b9,dpleft:h0.8,dpdown:h0.0,dpdown:h0.4,dpright:h0.0,dpright:h0.2,dpup:h0.0,dpup:h0.1,leftshoulder:h0.0,leftshoulder:b6,lefttrigger:b4,rightshoulder:b7,righttrigger:b5,leftstick:b10,rightstick:b11,leftx:a0,lefty:a1,rightx:a3,righty:a2,"<br />
<br />
=== Joystick not recognized by all programs ===<br />
<br />
Some software, Steam for example, will only recognize the first joystick it encounters. Due to a bug in the driver for Microsoft wireless periphery devices this can in fact be the bluetooth dongle. If you find you have a {{ic|/dev/input/js*}} and {{ic|/dev/input/event*}} belonging to you keyboard's bluetooth transceiver you can get automatically get rid of it by creating according udev rules.<br />
Create a {{ic|/}}:<br />
{{hc|/etc/udev/rules.d/99-btcleanup.rules|<nowiki><br />
ACTION=="add", KERNEL=="js[0-9]*", SUBSYSTEM=="input", KERNELS=="...", ATTRS{bInterfaceSubClass}=="00", ATTRS{bInterfaceProtocol}=="00", ATTRS{bInterfaceNumber}=="02", RUN+="/usr/bin/rm /dev/input/js%n"<br />
ACTION=="add", KERNEL=="event*", SUBSYSTEM=="input", KERNELS=="...", ATTRS{bInterfaceSubClass}=="00", ATTRS{bInterfaceProtocol}=="00", ATTRS{bInterfaceNumber}=="02", RUN+="/usr/bin/rm /dev/input/event%n"<br />
</nowiki>}}<br />
Correct the {{ic|<nowiki>KERNELS=="..."</nowiki>}} to match your device. The correct value can be found by running<br />
<br />
# udevadm info -an /dev/input/js0<br />
<br />
Assuming the device in question is {{ic|/dev/input/js0}}. After you placed the rule reload the rules with<br />
<br />
# udevadm control --reload<br />
<br />
Then replug the device making you trouble. The joystick and event devices should be gone, although their number will still be reserved. But the files are out of the way.<br />
<br />
=== Steam Controller not pairing ===<br />
<br />
There are some unknown cases where the packaged udev rule for the Steam controller does not work ({{bug|47330}}). The most reliable workaround is to make the controller world readable. Copy the rule {{ic|/usr/lib/udev/rules.d/70-steam-controller.rules}} to {{ic|/etc/udev/rules.d}} with a later prioritiy and change anything that says {{ic|1=MODE="0660"}} to {{ic|1=MODE="066'''6'''"}} e.g.<br />
<br />
{{hc|/etc/udev/rules.d/99-steam-controller-perms.rules|<nowiki><br />
...<br />
SUBSYSTEM=="usb", ATTRS{idVendor}=="28de", MODE="0666"<br />
...<br />
</nowiki>}}<br />
<br />
You may have to reboot in order for the change to take effect.<br />
<br />
=== Steam Controller makes a game crash or not recognized ===<br />
<br />
If your Steam Controller is working well in Steam Big Picture mode, but not recognized by a game or the game starts crashing when you plug in the controller, this may be because of the native driver that has been added to the Linux kernel 4.18. Try to unload it, restart Steam and replug the controller.<br />
<br />
The module name of the driver is ''hid_steam'', so to unload it you may perform:<br />
# rmmod hid_steam</div>Goetzchttps://wiki.archlinux.org/index.php?title=Lenovo_ThinkPad_X1_Carbon_(Gen_7)&diff=614399Lenovo ThinkPad X1 Carbon (Gen 7)2020-05-19T14:31:41Z<p>Goetzc: /* Fingerprint sensor */ trim how-to which is already part of Fprint article</p>
<hr />
<div>[[Category:Lenovo]]<br />
[[ja:Lenovo ThinkPad X1 Carbon (Gen 7)]]<br />
{{Related articles start}}<br />
{{Related|Lenovo ThinkPad X1 Carbon}}<br />
{{Related|Lenovo ThinkPad X1 Carbon (Gen 2)}}<br />
{{Related|Lenovo ThinkPad X1 Carbon (Gen 3)}}<br />
{{Related|Lenovo ThinkPad X1 Carbon (Gen 4)}}<br />
{{Related|Lenovo ThinkPad X1 Carbon (Gen 5)}}<br />
{{Related|Lenovo ThinkPad X1 Carbon (Gen 6)}}<br />
{{Related|Lenovo ThinkPad X1 Yoga (Gen 3)}}<br />
{{Related|Lenovo ThinkPad X1 Yoga (Gen 4)}}<br />
{{Related articles end}}<br />
<br />
{{tip| A great resource for thinkpads is https://www.thinkwiki.org/wiki/ThinkWiki}}<br />
<br />
The Lenovo ThinkPad X1 Carbon, 7th generation is an ultrabook introduced in early 2019. It features a 14" screen, 8th-gen or 10th-gen Intel Core processors and integrated [[Intel graphics|Intel UHD 620 graphics]].<br />
<br />
To ensure you have this version, [[install]] the package {{Pkg|dmidecode}} and run:<br />
<br />
{{bc|# dmidecode -s system-version<br />
ThinkPad X1 Carbon 7th<br />
}}<br />
<br />
{| class="wikitable" style="float: right; clear: right; margin: 0 0 0.5em 0.5em; max-width: 420px; width: 100%;"<br />
| '''Device''' || '''Working''' || '''Modules'''<br />
|-<br />
| [[Intel graphics]] || {{Yes}} || i915, (intel_agp)<br />
|-<br />
| [[Wireless network configuration#iwlwifi|Wireless network]] || {{Yes}} || iwlmvm<br />
|-<br />
| Native Ethernet with [https://www.lenovo.com/us/en/accessories-and-monitors/cables-and-adapters/adapters/CABLE-BO-Ethernet-Extension-Adapter-2/p/4X90Q84427 dongle] || {{Yes}} || ?<br />
|-<br />
| Mobile broadband Fibocom || {{Yes}}¹ || ?<br />
|-<br />
| Audio || {{Yes}} || snd_hda_intel<br />
|-<br />
| Microphone || {{Yes}}⁴ || snd_sof<br />
|-<br />
| [[Touchpad]] || {{Yes}} || psmouse, rmi_smbus, i2c_i801<br />
|-<br />
| [[TrackPoint]] || {{Yes}} || psmouse, rmi_smbus, i2c_i801<br />
|-<br />
| Camera || {{Yes}} || uvcvideo<br />
|-<br />
| [[fprint|Fingerprint reader]] || {{Yes}}² || ?<br />
|-<br />
| [[Power management]] || {{Yes}}³ || ?<br />
|-<br />
| [[Bluetooth]] || {{Yes}} || btusb<br />
|-<br />
| Keyboard backlight || {{Yes}} || thinkpad_acpi<br />
|-<br />
| Function/Multimedia keys || {{Yes}} || ?<br />
|-<br />
| colspan=3 style="font-size: 70%; border: none;" | <ol><br />
<li>The Fibocom LTE module has Linux support once switched to USB mode; see [https://forums.lenovo.com/t5/Other-Linux-Discussions/How-To-Configure-X1-Carbon-Gen-7-on-Debian-FingerPrint-4G-Modem/td-p/4550327] and [https://github.com/abrasive/xmm7360]</li><br />
<li>An official driver and a reverse engineered driver are in the works [https://gitlab.freedesktop.org/libfprint/libfprint/issues/181] (''06cb:00bd'').</li><br />
<li>S3 suspend requires changes to BIOS settings, see section on [[#Sleep/Suspend]].</li><br />
<li>The internal microphone doesn't work on versions of the {{pkg|linux}} kernel before 5.3. On version 5.3 and newer the SOF firmware can be enabled, see [[{{TALKPAGENAME}}#Microphone|Talk#Microphone]].</li><br />
|}<br />
<br />
== BIOS ==<br />
<br />
{{warning|1=There are reports that enrolling custom Secure Boot keys may brick this machine because of firmware bugs.}} <br />
<br />
The most convenient way to install Arch Linux is by disabling "Secure Boot" {{ic|Security -> Secure Boot - Set to "Disabled"}}. However it is possible to self-sign your kernel and boot with it enabled. For further information have a look at the [[Secure Boot]] article.<br />
<br />
In case your {{ic|efivars}} are not properly set it is most likely due to you not being booted into [[UEFI]]. Should the problem persist be sure to consult the [[UEFI#UEFI variables]] section.<br />
<br />
=== Updates ===<br />
<br />
==== Automatic (Linux Vendor Firmware Service) ====<br />
<br />
[https://blogs.gnome.org/hughsie/2018/08/06/please-welcome-lenovo-to-the-lvfs/ In August of 2018 Lenovo has joined] the [https://fwupd.org/ Linux Vendor Firmware Service (LVFS)] project, which enables firmware updates from within the OS.<br />
BIOS updates (and possibly other firmware such as the Thunderbolt controller) can be queried for and installed through [[fwupd]].<br />
<br />
==== Manual (fwupdmgr) ====<br />
<br />
Lenovo may in the future provide cabinet files that can be directly installed with fwupdmgr.<br />
Check for Linux {{ic|.cab}} files from the [https://pcsupport.lenovo.com/us/en/products/laptops-and-netbooks/thinkpad-x-series-laptops/thinkpad-x1-carbon-7th-gen-type-20qd-20qe/downloads Lenovo ThinkPad X1 Carbon (Gen 7) driver website].<br />
<br />
#Make sure the AC adapter is firmly connected to the target computer.<br />
#Launch Terminal.<br />
#Move to the directory where the cabinet file was placed.<br />
#Run {{ic|fwupdmgr install xxxxxxxx.cab}} to schedule firmware update.<br />
#Restart the system.<br />
#The computer will be restarted and the UEFI BIOS will be updated.<br />
<br />
=== Sleep/Suspend ===<br />
<br />
The BIOS has two "Sleep State" options, Windows and Linux, which you can find in at {{ic|Config -> Power -> Sleep State}}. The Linux option is the traditional S3 power state where all hardware components are turned off except for the RAM, and it should work normally. The Windows option is a newer software-based "modern standby" which works on Linux (despite the name). One possible benefit to the Windows sleep state is faster wake up time, and one possible drawback is increased power usage.<br />
<br />
=== S3 Suspend Bug with Bluetooth Devices ===<br />
<br />
Occasionally your Thinkpad will wake up immediately after suspending with certain [[bluetooth]] devices added. To prevent this, remove the devices or disable [[bluetooth]] before suspending.<br />
<br />
=== BIOS configurations ===<br />
<br />
* {{ic|Config -> Thunderbolt BIOS Assist Mode - Set to "Enabled"}}. When disabled, on Linux, power usage appears to be significantly higher because of a substantial number of CPU wakeups during s2idle.<br />
<br />
{{tip| You may need to disable Kernel DMA protection in {{ic|Security -> Virtualization -> Kernel DMA Protection - Set to "Disabled"}}}}<br />
<br />
== Firmware issues ==<br />
The following issues can all be resolved by upgrading the firmware with fwupdmgr (''see [[#Updates|#BIOS Updates]]''), but there may be alternative manual/temporary fixes.<br />
=== Touchpad issues ===<br />
<br />
Due to a bug in a touchpad firmware, the touchpad might not work with following logs in dmesg:<br />
{{bc|<br />
[ 4.499490] i2c_designware i2c_designware.1: i2c_dw_handle_tx_abort: lost arbitration<br />
[...]<br />
[ 12.668795] i2c_hid i2c-SYNA8005:00: failed to set a report to device.<br />
[ 13.678765] i2c_designware i2c_designware.1: controller timed out<br />
}}<br />
<br />
=== Freeze when suspending ===<br />
There are reports of the system freezing after initiating a suspend or hibernate. A temporary fix is to add {{ic|1=snd_hda_intel.dmic_detect=0}} to your kernel parameters. see [https://www.reddit.com/r/archlinux/comments/e5oe4p/systemctl_suspend_causes_freeze/fa8mzft/]<br />
<br />
=== Power management/Throttling issues ===<br />
A [https://forums.lenovo.com/t5/Other-Linux-Discussions/X1C6-T480s-low-cTDP-and-trip-temperature-in-Linux/td-p/4028489/highlight/true bug] causes the CPU to consume less power than under Windows and throttle at 80°C instead of 97°. <br />
<br />
Lenovo has confirmed the issue, [https://forums.lenovo.com/t5/Other-Linux-Discussions/X1C6-T480s-low-cTDP-and-trip-temperature-in-Linux/m-p/4534535/highlight/true#M13642 explained the cause] and published [https://forums.lenovo.com/t5/Other-Linux-Discussions/X1C6-T480s-low-cTDP-and-trip-temperature-in-Linux/m-p/4535310/highlight/true#M13653 updates for the embedded controller and the BIOS] to LVFS .<br />
<br />
The alternative fix is to install {{Pkg|throttled}}, then run <br />
<br />
sudo systemctl enable --now lenovo_fix.service<br />
<br />
== Audio ==<br />
{{Note|The 4-channel audio and microphone work out-of-the-box as of 5.6.7-arch1-1 using [https://github.com/thesofproject/sof SOF Firmware] and the latest git version of PulseAudio (version 13.99, soon-to-be released as 14). You can install that version using {{AUR|pulseaudio-git}}). For the released version of PulseAudio (13 and older), please use the indications below.}}<br />
<br />
<br />
To get it working with PulseAudio 13 and older, follow those steps:<br />
<br />
1. Install {{ic|sof-firmware}} (tested with 1.4.2-1)<br />
<br />
2. Configure PulseAudio's to load Alsa modules with the correct {{ic|device}} and {{ic|channel}} settings, by adding these two lines to {{ic|/etc/pulse/default.pa}}:<br />
<br />
load-module module-alsa-sink device=hw:0,0 channels=4<br />
load-module module-alsa-source device=hw:0,6 channels=4<br />
<br />
Note that Alsa card numbers can change when adding more audio devices (like, connecting a USB headset or a docking station). To ensure that index '0' always maps to internal audio, add {{ic|1=snd slots=snd_soc_skl_hda_dsp}} to your module loading options.<br />
<br />
3. Reboot, then use {{ic|alsamixer}} to increase the "master" channel level of the {{ic|sof-hda-dsp}} sound card (use the {{ic|<F6>}} key to switch cards). If you do not see {{ic|sof-hda-dsp}} in {{ic|alsamixer}}, you may need to add {{ic|blacklist snd_hda_intel}} and {{ic|blacklist snd_soc_skl}} to {{ic|/etc/modprobe.d/blacklist.conf}} and reboot again.<br />
<br />
4. If the output sounds tinny, try muting the "speaker" item in alsamixer.<br />
<br />
== Fingerprint sensor ==<br />
<br />
An official Lenovo testing firmware with Linux support is avaible, in lvfs-testing. You'll need to install [[fwupd]] to update the Synaptics Prometheus driver for the fingerprint sensor.<br />
<br />
It is important to ensure you are running “FW version 10.01.3022383” or later. You can check this using {{ic|fwupdmgr get-devices}} as the root user.<br />
<br />
You have to update it with the lvfs-testing remote:<br />
<br />
# fwupdmgr enable-remote lvfs-testing<br />
# fwupdmgr get-devices<br />
# fwupdmgr refresh<br />
# fwupdmgr get-updates<br />
<br />
Prometheus Fingerprint Reader Device Update:<br />
<br />
New Version: 10.02.3110269<br />
New features and enhancements: Support Linux system<br />
<br />
# fwupdmgr update<br />
# fwupdmgr disable-remote lvfs-testing<br />
<br />
To use the finger print sensor follow the instructions from [[Fprint]].<br />
<br />
== Disabling red LED in ThinkPad logo ==<br />
<br />
You can temporarily disable the red LED in the ThinkPad logo on the cover:<br />
<br />
1. Enable writing to the embedded controller registers by adding the kernel parameter {{ic|1=ec_sys.write_support=1}}. <br />
If you use UEFI boot, you can add this parameter in {{ic|/boot/efi/loader/entries/arch.conf}} under "options".<br />
<br />
2. Disable the LED with this command: <br />
<br />
# echo -n -e "\x0a" | sudo dd of="/sys/kernel/debug/ec/ec0/io" bs=1 seek=12 count=1 conv=notrunc 2> /dev/null<br />
<br />
This would need to be run after each suspend/reboot to be permanent.<br />
<br />
== Additional resources ==<br />
<br />
* [https://www.thinkwiki.org/wiki/Category:X1_Carbon_(7th_Gen) ThinkWiki X1 Carbon 7th Gen page]{{Dead link|2020|03|29|status=404}}<br />
* [https://gist.github.com/greigdp/bb70fbc331a0aaf447c2d38eacb85b8f Dell XPS 13 9370 quirks]: Some pointers on getting Watt usage down to ~2W, Intel video powersaving features might be interesting, see also the [[Intel graphics]] page for interesting power-saving options.<br />
* [https://01.org/blogs/rzhang/2015/best-practice-debug-linux-suspend/hibernate-issues Intel Blog: Best practice to debug Linux* suspend/hibernate issues], including the [https://github.com/01org/pm-graph pm-graph] tool to analyze power usage during suspend<br />
* [https://forums.linuxmint.com/viewtopic.php?t=91453 How to fix volume control (ALSA problem)] This is where the volume fix came from originally.<br />
* [https://docs.microsoft.com/en-us/windows/win32/power/system-power-states Windows System Power States]<br />
* [https://www.kernel.org/doc/Documentation/power/states.txt System Power Management Sleep States at kernel.org]</div>Goetzchttps://wiki.archlinux.org/index.php?title=Talk:Lenovo_ThinkPad_X1_Carbon_(Gen_7)&diff=605208Talk:Lenovo ThinkPad X1 Carbon (Gen 7)2020-04-09T18:07:00Z<p>Goetzc: /* New audio situation */ {{Unsigned}} https://wiki.archlinux.org/index.php?title=Talk%3ALenovo_ThinkPad_X1_Carbon_%28Gen_7%29&type=revision&diff=604721&oldid=600890</p>
<hr />
<div>== <s>Touchpad with 5.4.x</s> ==<br />
With linux 5.4 touchpad stopped working on about 50% of bootups.<br />
With touchpad not working I'm getting following messages in dmesg.<br />
{{bc|1=<br />
[ 4.499490] i2c_designware i2c_designware.1: i2c_dw_handle_tx_abort: lost arbitration<br />
[ 5.518759] i2c_designware i2c_designware.1: controller timed out<br />
[ 5.519959] i2c_hid i2c-SYNA8005:00: failed to retrieve report from device.<br />
[ 5.521187] input: SYNA8005:00 06CB:CD8C Mouse as /devices/pci0000:00/0000:00:15.1/i2c_designware.1/i2c-9/i2c-SYNA8005:00/0018:06CB:CD8C.0001/input/input9<br />
[ 5.521337] input: SYNA8005:00 06CB:CD8C Touchpad as /devices/pci0000:00/0000:00:15.1/i2c_designware.1/i2c-9/i2c-SYNA8005:00/0018:06CB:CD8C.0001/input/input10<br />
[ 5.521442] hid-generic 0018:06CB:CD8C.0001: input,hidraw0: I2C HID v1.00 Mouse [SYNA8005:00 06CB:CD8C] on i2c-SYNA8005:00<br />
[ 6.585507] i2c_designware i2c_designware.1: controller timed out<br />
[ 6.585590] i2c_hid i2c-SYNA8005:00: failed to retrieve report from device.<br />
[ 6.585678] hid-multitouch 0018:06CB:CD8C.0001: failed to fetch feature 8<br />
[ 7.599201] i2c_designware i2c_designware.1: controller timed out<br />
[ 7.599319] i2c_hid i2c-SYNA8005:00: failed to retrieve report from device.<br />
[ 7.599385] hid-multitouch 0018:06CB:CD8C.0001: failed to fetch feature 8<br />
[ 8.612535] i2c_designware i2c_designware.1: controller timed out<br />
[ 8.612636] i2c_hid i2c-SYNA8005:00: failed to retrieve report from device.<br />
[ 8.612711] hid-multitouch 0018:06CB:CD8C.0001: failed to fetch feature 7<br />
[ 9.625537] i2c_designware i2c_designware.1: controller timed out<br />
[ 9.625642] i2c_hid i2c-SYNA8005:00: failed to retrieve report from device.<br />
[ 9.625873] input: SYNA8005:00 06CB:CD8C Mouse as /devices/pci0000:00/0000:00:15.1/i2c_designware.1/i2c-9/i2c-SYNA8005:00/0018:06CB:CD8C.0001/input/input19<br />
[ 9.626417] input: SYNA8005:00 06CB:CD8C Touchpad as /devices/pci0000:00/0000:00:15.1/i2c_designware.1/i2c-9/i2c-SYNA8005:00/0018:06CB:CD8C.0001/input/input20<br />
[ 9.627084] hid-multitouch 0018:06CB:CD8C.0001: input,hidraw0: I2C HID v1.00 Mouse [SYNA8005:00 06CB:CD8C] on i2c-SYNA8005:00<br />
[ 10.132275] kauditd_printk_skb: 15 callbacks suppressed'<br />
[ 10.639147] i2c_designware i2c_designware.1: controller timed out<br />
[ 10.639250] i2c_hid i2c-SYNA8005:00: failed to set a report to device.<br />
[ 11.652134] i2c_designware i2c_designware.1: controller timed out<br />
[ 11.652167] i2c_hid i2c-SYNA8005:00: failed to set a report to device.<br />
[ 12.668764] i2c_designware i2c_designware.1: controller timed out<br />
[ 12.668795] i2c_hid i2c-SYNA8005:00: failed to set a report to device.<br />
[ 13.678765] i2c_designware i2c_designware.1: controller timed out<br />
[ 14.692095] i2c_designware i2c_designware.1: controller timed out<br />
[ every second ...]<br />
[ 26.852160] i2c_designware i2c_designware.1: controller timed out<br />
}} [[User:Kubuxu|Kubuxu]] ([[User talk:Kubuxu|talk]]) 13:47, 16 December 2019 (UTC)<br />
: This might be totally unrelated, but I had both sleep and touchpad break the other day and temporarily fixed it with the snd_hda_intel.dmic_detect=0 kernel option (see [https://old.reddit.com/r/archlinux/comments/e5oe4p/systemctl_suspend_causes_freeze/?st=k49hi5rf&sh=0c42e7c9 this] [[User:Wrycode|wrycode]] ([[User talk:Wrycode|talk]]) 06:28, 17 December 2019 (UTC)<br />
: I have {{ic|snd_hda_intel}} blacklisted to make sure that SOF is used. So far I had one SOF related DSP crash but apart from that SOF seems fine. There is also touchpad firmware update I've applied, I will let you all now about the results. [[User:Kubuxu|Kubuxu]] ([[User talk:Kubuxu|talk]]) 12:11, 17 December 2019 (UTC)<br />
: After updating Touchpad firware (using {{ic|fwupdmgr}}) to 1.3.3013412 problem seems to be resolved. [[User:Kubuxu|Kubuxu]] ([[User talk:Kubuxu|talk]]) 12:43, 27 December 2019 (UTC)<br />
:: Confirmed here as well [[User:Wrycode|wrycode]] ([[User talk:Wrycode|talk]]) 02:42, 28 December 2019 (UTC)<br />
:: Did anyone experience issues with updating this firmware with {{ic|fwupdmgr}}? I continuously get {{ic|1=No upgrades for Touchpad: current version is 1.3.3013337: 1.3.3013337=same}}. I even tried to download the .cab file and use {{ic|fwupdmgr install}} and get {{ic|No supported devices found}} [[User:In0ni|In0ni]] ([[User talk:In0ni|talk]]) 00:20, 7 January 2020 (UTC)<br />
::: Seems like you have the latest update already. [[User:Wrycode|wrycode]] ([[User talk:Wrycode|talk]]) 18:18, 7 January 2020 (UTC)<br />
:::: Latest firmware should be 1.3.3013412 -- not 1.3.3013337. I'm having the issue this discussion is talking about which the latest version fixes. What version of the firmware did you update to? [[User:In0ni|In0ni]] ([[User talk:In0ni|talk]]) 04:19, 9 January 2020 (UTC)<br />
::::: Sorry, I assumed 1.3.3013412 and 1.3.3013337 were the same version or something (the version is listed as "PR3013337/PR3013412" in the Readme on Lenovo's site. I updated to 1.3.3013337 from 1.1.2949533 and my touchpad issues went away. But if you're still having issues with the touchpad then maybe it wasn't actually the firmware update that fixed it for me? I'm on kernel 5.4.8 and everything works except for the microphone. [[User:Wrycode|wrycode]] ([[User talk:Wrycode|talk]]) 04:38, 10 January 2020 (UTC)<br />
: Updated Wiki page with the info [[User:Kubuxu|Kubuxu]] ([[User talk:Kubuxu|talk]]) 17:38, 29 December 2019 (UTC)<br />
: Where are you getting the firmware? The only version I can find is an exe [[User:Mondoman712|Mondoman712]] ([[User talk:Mondoman712|talk]]) 14:07, 23 January 2020 (UTC)<br />
:: I'm using fwupdmgr [[User:Kubuxu|Kubuxu]] ([[User talk:Kubuxu|talk]]) 17:14, 23 January 2020 (UTC)<br />
::: The touchpad wasn't showing up for me there, but it wasn't working when I tried so I rebooted and then it appeared. [[User:Mondoman712|Mondoman712]] ([[User talk:Mondoman712|talk]]) 18:19, 23 January 2020 (UTC)<br />
<br />
== Microphone ==<br />
Did you get your microphone to work neither alsamixer or pavucontrol seem to detect a microphone. ? [[User:Nitrobay|Nitrobay]] ([[User talk:Nitrobay|talk]]) 11:38, 17 August 2019 (UTC)<br />
: I can confirm using [[Advanced_Linux_Sound_Architecture/Troubleshooting#Microphone|this test]], only externally connected microphones work. — [[User:goetzc|goetzc]] ([[User talk:goetzc|wanna talk?]]) 14:24, 17 August 2019 (UTC)<br />
: Looks like Linux kernel 5.3 will include the [https://thesofproject.github.io/latest/index.html SOF firmware update] with the fix for the microphone. — [[User:goetzc|goetzc]] ([[User talk:goetzc|wanna talk?]]) 14:25, 6 September 2019 (UTC)<br />
: After updating to Linux kernel 5.3.1 the microphone still does not work [[User:Moreka|Moreka]] ([[User talk:Moreka|talk]]) 17:30, 23 September 2019 (UTC) [[User:Moreka]] 17:30, 23 September 2019 (UTC)<br />
: I found a configuration that makes the microphones to work ;) but couldn't paste the instructions or a link to them. I created a forum post under Laptop Issues and titled [SOLVED] Fix for microphone on Lenovo X1 Gen 7 [[User:Alphazo|Alphazo]] ([[User talk:Alphazo|talk]]) 10:15, 13 October 2019 (UTC)<br />
: Like others, I wasn't able to get microphone working by following that guide. My results are identical to that of "Mocco" from that forum. Unless I'm misunderstanding the sidebar, I think we should flag microphone to "not working" for this page. [[User:Parth|Parth]] ([[User talk:Parth|talk]]) 23:54, 20 October 2019 (UTC)<br />
: I wasn't able to get microphone working by following that guide as well. I also think we should flag microphone to "not working" for this page. [[User:Moreka|Moreka]] 06:04, 22 October 2019 (UTC)<br />
: Managed to get it working following Alphazo's guide. There are a few typos however, I indicated the required fix in post #9. Hope it helps. [[User:Tbw|Tbw]] ([[User talk:Tbw|talk]]) 21:23, 22 October 2019 (UTC)<br />
: I'll give it another shot and report back [[User:Parth|Parth]] ([[User talk:Parth|talk]]) 17:17, 30 October 2019 (UTC)<br />
: I was able to make the microphone + sound playback work with following the Lenovo docx file and using the sof-hda-generic.tplg and sof-cnl.ri provided in the latest linux firmware package shipped with ubuntu (just download the package and copy the two files in the correct directories). Also the changes in /etc/pulse/default.pa are not necessary. [[User:moreka|moreka]] 17:08, 31 October 2019 (UTC)<br />
: With recent kernel the SOF was disabled [https://bugs.archlinux.org/task/63464]. Solution for me was to install linux-pf and disable CONFIG_SND_SOC_INTEL_SST, enable SOT. [[User:Kubuxu|Kubuxu]] ([[User talk:Kubuxu|talk]]) 14:12, 19 November 2019 (UTC)<br />
: Please test with [https://git.archlinux.org/svntogit/packages.git/log/trunk?h=packages/linux&id=d6bbb261bd2c8f83b9c93041dae9aa4175e20e6e linux 5.4.1-arch1] (in testing) and [https://www.archlinux.org/packages/extra/any/sof-firmware/ sof-firmware] (new). SOF is re-enabled except on Broadwell/Baytrail platforms. [[User:Dpward|Dpward]] ([[User talk:Dpward|talk]]) 17:42, 1 December 2019 (UTC)<br />
: I tested with the new kernel and sof-firmware package (from the Arch repositories). Doing the configs as in the docx file, the sound works well, but the microphone records sounds in a wrong way; it sounds as if it is slow-motion. [[User:moreka]] 15:16, 3 December 2019 (UTC)<br />
: I experienced the same issue like moreka after installing the current kernel (5.4.2.arch1-1) and sof-firmware (1.3.1-1) from the core repo. Also since sof is in use the speakers only provide stereo audio and not using the 4.0 channel profile. [[User:Bin101|Bin101]] ([[User talk:Bin101|talk]]) 19:09, 6 December 2019 (UTC)<br />
: When using {{pkg|sof-firmware}} version 1.4.1 (and latest kernel 5.4.2) the sound card doesn't get recognized at all. Reverting back to sof-firmware 1.3.1 makes the card work again, in the same way explained by users Moreka and Bin101. — [[User:goetzc|Götz]] ([[User talk:goetzc|wanna talk?]]) 13:33, 9 December 2019 (UTC)<br />
: Yeah a whole host of things broke for me in 5.4.2: hibernate, touchpad & sound all broke for me in 5.4.2. [[User:Parth|Parth]] ([[User talk:Parth|talk]]) 04:43, 10 December 2019 (UTC)<br />
: With 5.4.3 the Mic works with custom topology file {{ic|sof-hda-generic-4ch.tplg}}. The touchpad is broken on about 50% of bootups. I will start a new thread about it. [[User:Kubuxu|Kubuxu]] ([[User talk:Kubuxu|talk]]) 13:37, 16 December 2019 (UTC)<br />
: <s>I was (finally!) able to get the mic to work on a HP EliteBook x360 1030 G4, using kernel 5.4.1 and sof-firmware 1.3.1.</s> Spoke too soon. Not working after all. Details [https://bbs.archlinux.org/viewtopic.php?pid=1878341#p1878341 here]. [[User:Darose|Darose]] 21:18, 18 December 2019 (UTC)<br />
: Still problematic with kernel 5.5-rc6 (compiled myself). Just the two top speakers are firing (not the rear ones). Super annoying. The microphone works, though... Using sof-firmware 1.3 (from Arch repo) [[User:Moreka]] 14:18, 17 January 2020<br />
: For me, it was necessary, to add ''/etc/modprobe.d/alsa.conf'' containing {{ic|options snd slots&#61;,snd_usb_audio}}. [[User:Jaydoe|Jaydoe]] ([[User talk:Jaydoe|talk]]) 10:18, 9 February 2020 (UTC)<br />
: I got the microphone (and sound) working (but not both audio keys LEDs) following the [https://wiki.archlinux.org/index.php?title=Lenovo_ThinkPad_X1_Carbon_(Gen_7)&oldid=596943#Audio current edition] steps. Use latest repo kernel and sof-firmware, also revert any other configuration change you may have done in the past. — [[User:goetzc|Götz]] ([[User talk:goetzc|wanna talk?]]) 00:31, 11 February 2020 (UTC)<br />
:: The kb-light.py script from https://wiki.archlinux.org/index.php/Keyboard_backlight works for the keyboard backlight. [[User:Wrycode|wrycode]] ([[User talk:Wrycode|talk]]) 18:12, 16 February 2020 (UTC)<br />
::: Thanks for you suggestion Wrycode, I meant both audio/sound keys LEDs are not working (just corrected it), not the whole keyboard backlight :) — [[User:goetzc|Götz]] ([[User talk:goetzc|wanna talk?]]) 19:12, 16 February 2020 (UTC)<br />
<br />
== Volume Controls ==<br />
<br />
The section [[Lenovo_ThinkPad_X1_Carbon_(Gen_7)#Volume_Controls|Volume Controls]] fixes the quite/loud volume control, but seems <s>to disable</s> (they are already disabled) the two top-firing speakers, only the two bottom-firing sub-woofers are enabled. --[[User:Goetzc|Goetzc]] ([[User talk:Goetzc|talk]]) 17:12, 9 August 2019 (UTC)<br />
: So this seems to fix the volume control indeed, but the top-firing speakers were already and are still muted, might be a driver bug, but a workaround from another Dolby Atmos laptop might work here. --[[User:Goetzc|Goetzc]] ([[User talk:Goetzc|talk]]) 17:32, 9 August 2019 (UTC)<br />
:: Did you remember to run alsamixer from {{Pkg|alsa-utils}} after installation and turn on/equalize all of the speakers? Mine (top and bottom) are working fine. [[User:Wrycode|wrycode]] ([[User talk:Wrycode|talk]]) 03:54, 13 August 2019 (UTC)<br />
::: You are correct Wrycode, thanks! The "''Master''" volume was low, rising it to 100% makes the top speakers work as expected :) Will add this to the section. <br />
::: Do you happen to know how to make this change (setting the "''Element Master''") so that it's not done on the system {{ic|analog-output.conf.common}} file, and thus the change survives when PulseAudio package is updated? — [[User:goetzc|goetzc]] ([[User talk:goetzc|wanna talk?]])<br />
:::: I did some digging around and I can't find a way to do this. Pulseaudio might not have a user config option for the alsa paths in /usr/. Added the NoUpgrade workaround on the main page. [[User:Wrycode|wrycode]] ([[User talk:Wrycode|talk]]) 02:05, 20 August 2019 (UTC)<br />
<br />
:There is [https://askubuntu.com/a/988993/509340 this interesting] method, which uses 'hdajackretask' from the {{pkg|alsa-tools}} package to remap some pins. The comment is for a different laptop (Asus UX550 using Realtek ALC295), but it exhibits the same issue. We would need to determine the correct pins for this hardware (Realtek ALC285), don't know how, though. — [[User:goetzc|goetzc]] ([[User talk:goetzc|wanna talk?]]) 19:08, 25 August 2019 (UTC)<br />
<br />
I turned on all the speakers with alsamixer from {{Pkg|alsa-utils}} and tried "''Analog Stereo Output''" and "''Analog Surround 4.0 Output''" with {{Pkg|pavucontrol}} but none of these configurations gives a reasonable result. The former makes the front speakers much louder than the rear ones and the latter makes the front speakers silent, testing them with:<br />
<br />
# speaker-test -c4 -l1 -twav<br />
<br />
I was able to compare the sound quality on Windows and it is clear that the bass sound is clearly missing. Is it similar for you or am I missing something ? [[User:Thenitronos|Thenitronos]] ([[User talk:Thenitronos|talk]]) 00:07, 1 February 2020 (UTC)<br />
:This is a new issue, I'm experiencing it too. [[User:Wrycode|wrycode]] ([[User talk:Wrycode|talk]]) 01:29, 1 February 2020 (UTC)<br />
:: I had the same issue with Linux kernel 5.4, but with kernel 5.3 it works (you can get it from the [[Arch Linux Archive]]) when following the [[Lenovo ThinkPad X1 Carbon (Gen 7)#Volume controls|Volume controls]] section (editing the {{ic|analog-output.conf.common}} file). I hope that [https://kernelnewbies.org/LinuxChanges#Linux_5.5.Audio 5.5] fixes this, haven't tried yet. — [[User:goetzc|Götz]] ([[User talk:goetzc|wanna talk?]]) 17:15, 1 February 2020 (UTC)<br />
:: It is also possible to set the 4.0 sound profile with {{ic|pactl set-card-profile alsa_card.pci-0000_00_1f.3 output:analog-surround-40}}, not sure if all Carbon 7th Gen use the same identifier, but that's the idea. — [[User:goetzc|Götz]] ([[User talk:goetzc|wanna talk?]])<br />
<br />
I tested the volume control section today and I can confirm it's not working. Only the bottom facing speakers fire resulting in no bass or midrange. The microphone does work well. There is some discussion of this in the following <br />
[https://gist.github.com/hamidzr/dd81e429dc86f4327ded7a2030e7d7d9 Gist.] [[User:Hackerman|Hackerman]] ([[User talk:Hackerman|talk]]) 19:05, 10 February 2020 (UTC)<br />
: Oh, that Gist is a very big configuration change! I have all four mics and four speakers working nicely (but not both audio keys LEDs) following the steps added by [[user:VictorTrac]], check out the [https://wiki.archlinux.org/index.php?title=Lenovo_ThinkPad_X1_Carbon_(Gen_7)&oldid=596943#Audio current edition]. Use latest repo kernel and sof-firmware, also revert any other configuration change you may have done in the past. — [[User:goetzc|Götz]] ([[User talk:goetzc|wanna talk?]])<br />
:: That was it! Thank you! I needed to mute the speaker channel. I'm glad to have a working array microphone. [[User:Hackerman|Hackerman]] ([[User talk:Hackerman|talk]]) 02:30, 11 February 2020 (UTC)<br />
<br />
== <s>Screen Brightness Function Keys</s> ==<br />
<br />
Is anyone having issues getting the screen brightness function keys working? I had to install [[acpid]] and setup ACPI events and actions to handle it, along with installing the {{Pkg|acpilight}} package. <br />
<br />
My events:<br />
<br />
/etc/acpi/events/FnF5-brightnessdown<br />
# video/brightnessdown BRTDN 00000087 00000000<br />
event=video/brightnessdown<br />
action=xbacklight -dec 3<br />
<br />
/etc/acpi/events/FnF6-brightnessup<br />
# video/brightnessup BRTUP 00000086 00000000<br />
event=video/brightnessup<br />
action=xbacklight -inc 3<br />
<br />
xev doesn't recognise the brightness function keys, so I can't handle the key presses with my window manager. At least that is what I believe, please correct me if I have this all wrong. <br />
[[User:Raybangs|Raybangs]] ([[User talk:Raybangs|talk]]) 10:16, 23 August 2019 (UTC)<br />
<br />
:I didn't have to go through that to get screen brightness going. Can you tell me more about your setup? I'm using Plasma and my brightness controls worked out of the box. [[User:Johncrist1988|Johncrist1988]] ([[User talk:Johncrist1988|talk]]) 14:16, 23 August 2019 (UTC)<br />
<br />
:It works for me also, using {{pkg|brightnessctl}} (as root) or {{pkg|light}} on [[Sway]] or Plasma. — [[User:goetzc|goetzc]] ([[User talk:goetzc|wanna talk?]]) 18:50, 25 August 2019 (UTC)<br />
<br />
:Interesting. I'm using a pretty simple base Arch install with AwesomeWM. I will try {{pkg|brightnessctl}} and see how that goes. {{Unsigned|21:25, 3 September 2019 (UTC)|Raybangs}}<br />
<br />
== UEFI BIOS Update ==<br />
<br />
Currently UEFI BIOS seems to be at [https://pcsupport.lenovo.com/hn/en/products/LAPTOPS-AND-NETBOOKS/THINKPAD-X-SERIES-LAPTOPS/THINKPAD-X1-CARBON-7TH-GEN-TYPE-20QD-20QE/downloads/DS540232 version 1.16]. I am unable to find the .cab file in the link provided, on the [https://fwupd.org/lvfs/devicelist LVFS Device List], nor have had luck with web searches.<br />
<br />
I also followed instructions for [https://wiki.archlinux.org/index.php/Fwupd#Setup_for_UEFI_BIOS_upgrade | UEFI BIOS upgrade from fwupd] on the wiki. Has anyone succeeded in upgrading the firmware to the latest version on Linux? Would using the bootable iso on a USB from the first link work? According the the [https://download.lenovo.com/pccbbs/mobiles/n2hur06w.txt README] it should work (but hesitant to put the iso on USB). [[User:In0ni|In0ni]] ([[User talk:In0ni|talk]]) 22:34, 1 September 2019 (UTC)<br />
: Using the bootable iso on a USB should work fine (vs. a CD/DVD). However, I'm hesitant to upgrade because the 1.05 update is supposedly required before updating to the lates version: <br />
UEFI: ---- / ECP: 1.05<br />
- (Fix) Fixed an issue where system may hang in UEFI BIOS updating process.<br />
(Note) This package must be applied prior to n2hur04w or later package version.`<br />
:The cab files are not available yet. The only way to apply the updates (except for one that's available via fwupdmgr) is through the bootable ISO. I don't see any reason to update personally but if someone else does, please let us know how it goes. [[User:Wrycode|wrycode]] ([[User talk:Wrycode|talk]]) 20:09, 10 September 2019 (UTC)<br />
:: Just BTW for anyone else reading this, I updated via the bootable ISO and it didn't brick my device. Also, the .cab files for Linux are hidden in that link (if you click on the sorting menu, it appears to show only Windows updates but if you click on the categories the Linux files are hidden in there somewhere). [[User:Wrycode|wrycode]] ([[User talk:Wrycode|talk]]) 22:48, 17 December 2019 (UTC)<br />
::: I did upgrade it using {{ic|fwupdmgr install <file_name.cab>}}, after some specific version and restarts, the automatic updates did work using {{ic|fwupdmgr update}}. — [[User:goetzc|Götz]] ([[User talk:goetzc|wanna talk?]]) 21:52, 19 December 2019 (UTC)<br />
<br />
== <s>Why enable S3 sleep? </s>==<br />
<br />
Could someone add a small bit about why S3 sleep should be enabled? I have been using the default S0 sleep for a few weeks and don't see any issues with it. ~ [[User:Akvadrako|Akvadrako]] ([[User talk:Akvadrako|talk]]) 09:55, 10 September 2019 (UTC)<br />
:I was under the impression that S3 sleep is 'normal' sleep (everything powered off except for a trickle to the ram), but I'm not sure what modern Windows does instead. The S0 sleep state means "on", that is, the computer is not asleep, according to https://superuser.com/questions/71835/what-is-the-difference-between-these-four-sleep-states [[User:Wrycode|wrycode]] ([[User talk:Wrycode|talk]]) 04:43, 24 September 2019 (UTC)<br />
<br />
: Windows only supports S0 sleep and it’s the default, so I think it’s debatable what’s normal. But does that really matter? I’m interested in the practical difference. Maybe I’ll benchmark S3 sometime but for now I can say S0 uses about 0.5W and wakes up in about 1s. ~ [[User:Akvadrako|Akvadrako]] ([[User talk:Akvadrako|talk]]) 07:51, 24 September 2019 (UTC)<br />
:: S0 sleep isn't the traditional Suspend-to-RAM "sleep" that Linux users are expecting, that's what I meant by "normal". You are right that S0 is the default for Windows now. https://www.kernel.org/doc/Documentation/power/states.txt] has some details about the sleep states in Linux, and https://docs.microsoft.com/en-us/windows/win32/power/system-power-states has the same for Windows. It's a software-only idle, so it must use slightly more power than S3, where all components are shut down except for the ram. The Windows page claims that S0 wakes up faster than s3 (which would make sense). Another implication: Windows can do stuff after you close the laptop lid like download updates. Windows separately performs a suspend-to-disk whenever you close the lid, so if you remove the battery or the battery runs out your work will still be saved. It's possible Linux can do this too with S0. I just switched to the "Windows" sleep state from the BIOS to try it out and the wake time isn't noticeably different, but my laptop doesn't wake when I open the lid or press the power button. The only way to wake it up is to press the "Fn" key, very odd (especially because I remapped "Fn" to "Ctrl" from the BIOS, so I'm really pressing "Ctrl"). You're not seeing anything like this? [[User:Wrycode|wrycode]] ([[User talk:Wrycode|talk]]) 01:04, 16 October 2019 (UTC)<br />
<br />
:: Normally I do press the Fn button to wake, unless I'm using my external keyboard with AC, though it doesn't bother me. So it seems that and possibly some power savings are the advantages of S3. ~ [[User:Akvadrako|Akvadrako]] ([[User talk:Akvadrako|talk]]) 10:26, 16 October 2019 (UTC)<br />
<br />
== <s>Different lspci output </s>==<br />
<br />
Can anyone check what's their lspci output? I have realised I am running with a completely different setup of the components myself:<br />
<br />
<div class="toccolours mw-collapsible mw-collapsed" style="width:400px; overflow:auto;"><br />
<div style="font-weight:bold;line-height:1.6;">{{ic|lspci}}</div><br />
<div class="mw-collapsible-content"><br />
{{bc|<br />
00:00.0 Host bridge: Intel Corporation Coffee Lake HOST and DRAM Controller (rev 0c)<br />
00:02.0 VGA compatible controller: Intel Corporation UHD Graphics 620 (Whiskey Lake) (rev 02)<br />
00:04.0 Signal processing controller: Intel Corporation Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor Thermal Subsystem (rev 0c)<br />
00:08.0 System peripheral: Intel Corporation Xeon E3-1200 v5/v6 / E3-1500 v5 / 6th/7th Gen Core Processor Gaussian Mixture Model<br />
00:12.0 Signal processing controller: Intel Corporation Cannon Point-LP Thermal Controller (rev 11)<br />
00:14.0 USB controller: Intel Corporation Cannon Point-LP USB 3.1 xHCI Controller (rev 11)<br />
00:14.2 RAM memory: Intel Corporation Cannon Point-LP Shared SRAM (rev 11)<br />
00:14.3 Network controller: Intel Corporation Cannon Point-LP CNVi [Wireless-AC] (rev 11)<br />
00:15.0 Serial bus controller [0c80]: Intel Corporation Cannon Point-LP Serial IO I2C Controller #0 (rev 11)<br />
00:15.1 Serial bus controller [0c80]: Intel Corporation Cannon Point-LP Serial IO I2C Controller #1 (rev 11)<br />
00:16.0 Communication controller: Intel Corporation Cannon Point-LP MEI Controller #1 (rev 11)<br />
00:1c.0 PCI bridge: Intel Corporation Cannon Point-LP PCI Express Root Port #1 (rev f1)<br />
00:1d.0 PCI bridge: Intel Corporation Cannon Point-LP PCI Express Root Port #9 (rev f1)<br />
00:1d.4 PCI bridge: Intel Corporation Cannon Point-LP PCI Express Root Port #13 (rev f1)<br />
00:1f.0 ISA bridge: Intel Corporation Cannon Point-LP LPC Controller (rev 11)<br />
00:1f.3 Audio device: Intel Corporation Cannon Point-LP High Definition Audio Controller (rev 11)<br />
00:1f.4 SMBus: Intel Corporation Cannon Point-LP SMBus Controller (rev 11)<br />
00:1f.5 Serial bus controller [0c80]: Intel Corporation Cannon Point-LP SPI Controller (rev 11)<br />
00:1f.6 Ethernet controller: Intel Corporation Ethernet Connection (6) I219-V (rev 11)<br />
02:00.0 Wireless controller [0d40]: Intel Corporation XMM7360 LTE Advanced Modem (rev 01)<br />
03:00.0 Non-Volatile memory controller: Sandisk Corp WD Black 2018/PC SN720 NVMe SSD<br />
05:00.0 PCI bridge: Intel Corporation JHL6540 Thunderbolt 3 Bridge (C step) [Alpine Ridge 4C 2016] (rev 02)<br />
06:00.0 PCI bridge: Intel Corporation JHL6540 Thunderbolt 3 Bridge (C step) [Alpine Ridge 4C 2016] (rev 02)<br />
06:01.0 PCI bridge: Intel Corporation JHL6540 Thunderbolt 3 Bridge (C step) [Alpine Ridge 4C 2016] (rev 02)<br />
06:02.0 PCI bridge: Intel Corporation JHL6540 Thunderbolt 3 Bridge (C step) [Alpine Ridge 4C 2016] (rev 02)<br />
06:04.0 PCI bridge: Intel Corporation JHL6540 Thunderbolt 3 Bridge (C step) [Alpine Ridge 4C 2016] (rev 02)<br />
07:00.0 System peripheral: Intel Corporation JHL6540 Thunderbolt 3 NHI (C step) [Alpine Ridge 4C 2016] (rev 02)<br />
2d:00.0 USB controller: Intel Corporation JHL6540 Thunderbolt 3 USB Controller (C step) [Alpine Ridge 4C 2016] (rev 02)<br />
}}<br />
</div></div><br />
<br />
Just in case, on e of the most relevant differences is that I'm not using Fibocom modem but rather the Intel XMM7360 LTE<br />
: Is the Intel XMM7360 LTE a stock configuration option? Have you gotten it to work with Linux? [[User:Wrycode|wrycode]] ([[User talk:Wrycode|talk]]) 05:48, 14 October 2019 (UTC)<br />
I don't have the same lspci output either. I'm in favor of removing that section. It takes up too much space and it's irrelevant/misleading. If we must, the other 6 X1C pages have something like this: <br />
# dmidecode -t system | grep Version<br />
Version: ThinkPad X1 Carbon 7th<br />
[[User:Wrycode|wrycode]] ([[User talk:Wrycode|talk]]) 04:59, 10 January 2020 (UTC)<br />
<br />
== Fibocom LTE now available! ==<br />
<br />
I just saw this [https://forums.lenovo.com/t5/Other-Linux-Discussions/How-To-Configure-X1-Carbon-Gen-7-on-Debian-FingerPrint-4G-Modem/td-p/4550327 Lenovo forum thread] which links to [https://github.com/abrasive/xmm7360 this tool] to flip the Fibocom into USB mode (which has a Linux driver). [[User:Wrycode|wrycode]] ([[User talk:Wrycode|talk]]) 02:49, 13 December 2019 (UTC)<br />
<br />
I did some initial testing but I need to wait for a new sim card to look deeper into this. <br />
* just install acpi_call from the official repositories<br />
* the https://github.com/abrasive/xmm7360 script works exactly as described. NOTE: the modem command interface accessible at /dev/ttyACM0 will be all kinds of broken if you have ModemManager running, so make sure to wait until you've enabled full functionality and unlocked the modem before starting ModemManager.service.<br />
* AT+GTUSBMODE=7 and AT+CFUN=15 work fine to get the modem working but first you have to issue the [https://github.com/abrasive/xmm7360#fcc-lock FCC Lock] commands.<br />
* Now you should be able to run modem-manager-gui and send and receive SMS messages<br />
* to get 4G data, separately configure a new "mobile broadband" GSM connection in Network Manager (you can just use nm-connection editor). I accepted all of the default settings, (including the "number"), except for putting my network's APN in.<br />
* Now the connection should be available to you in one of Network Manager's user interfaces. If you get an error when you select the connection like "device not available", see if /var/lib/NetworkManager/NetworkManager.state has WWANEnabled set to false; to change it you might have to mess around with /etc/NetworkManager/NetworkManager.conf or the nm-applet GUI<br />
* despite what the README says, the modem stayed accessible for me between suspends (but you have to re-run the script after a reboot) <br />
<br />
There's [https://github.com/juhovh/xmm7360_usb this alternative repository] which provides a kernel module for the modem that supposedly stays persistent between reboots. I think the author uses Debian so the makefile would have to be modified for building kernel modules on Arch. [[User:Wrycode|wrycode]] ([[User talk:Wrycode|talk]]) 21:43, 13 December 2019 (UTC)<br />
<br />
== Missing RTC device ==<br />
<br />
{{ic|hwlock --verbose}} returns:<br />
{{bc|<br />
hwclock from util-linux 2.34<br />
System Time: 1577636985.183322<br />
Trying to open: /dev/rtc0<br />
Trying to open: /dev/rtc<br />
Trying to open: /dev/misc/rtc<br />
No usable clock interface found.<br />
hwclock: Cannot access the Hardware Clock via any known method.<br />
}}<br />
<br />
Related messages from dmesg:<br />
{{bc|<br />
[ 0.764314] PM: RTC time: 15:54:28, date: 2019-12-29<br />
[ 1.438054] hctosys: unable to open rtc device (rtc0)<br />
}}<br />
Kernel 5.4.6.arch3-1<br />
[[User:Kubuxu|Kubuxu]] ([[User talk:Kubuxu|talk]]) 16:33, 29 December 2019 (UTC)<br />
: Probably a newer kernel bug because hwclock used to work but now I don't have an rtc device available in /dev/ [[User:Wrycode|wrycode]] ([[User talk:Wrycode|talk]]) 03:15, 16 January 2020 (UTC)<br />
: I no longer have this issue. [[User:Wrycode|wrycode]] ([[User talk:Wrycode|talk]]) 02:27, 8 April 2020 (UTC)<br />
<br />
== Incorrect ethernet dongle information? ==<br />
<br />
I believe the information in the sidebar about the native ethernet dongle has been incorrectly copied and pasted from a previous model, like it was for the [[Lenovo ThinkPad X1 Yoga (Gen 4)|X1Y4]]. Can an X1C7 owner confirm this? [[User:Andersk|Andersk]] ([[User talk:Andersk|talk]]) 06:26, 4 January 2020 (UTC)<br />
<br />
I can confirm that it works out of the box with no problems [[User:GH0S1|GH0S1]] ([[User talk:GH0S1|talk]]) 19:11, 5 January 2020 (UTC)<br />
<br />
But do you have [https://www3.lenovo.com/us/en/accessories-and-monitors/cables-and-adapters/adapters/CABLE-BO-TP-OneLink%2B-to-RJ45-Adapter/p/4X90K06975 the dongle that’s linked], as opposed to say [https://www.lenovo.com/us/en/accessories-and-monitors/cables-and-adapters/adapters/CABLE-BO-Ethernet-Extension-Adapter-2/p/4X90Q84427 this one]? All the pictures I can find suggest that the former is copied-and-pasted from previous models and won’t fit in the X1C7. [[User:Andersk|Andersk]] ([[User talk:Andersk|talk]]) 00:41, 6 January 2020 (UTC)<br />
<br />
You are right. I have the newer dongle. It doesn't look like the older and wider dongle would fit. [[User:GH0S1|GH0S1]] ([[User talk:GH0S1|talk]])<br />
<br />
Cool. Edited the link; feel free to make further edits. [[User:Andersk|Andersk]] ([[User talk:Andersk|talk]]) 01:06, 7 January 2020 (UTC)<br />
<br />
== Secondary IR webcam as a light sensor for automatic kbd backlight adjustment ==<br />
<br />
Some models of this laptop have a second IR [[webcam]] (originally to be used with Windows Hello) which is always uncovered by the privacy slider. I think it would be feasible to use this camera as a light sensor to automatically adjust the brightness of the keyboard's backlight. There are applications like {{aur|clight}} that adjust screen brightness by using the primary/normal webcam. Using {{ic|v4l2-ctl --list-devices}} shows there are six devices, {{ic|/dev/video{0,1,2,3} }} and {{ic|/dev/media{0,1} }}, for which only {{ic|video0}} shows data from the primary camera. Have any one got the IR camera to work? — [[User:goetzc|Götz]] ([[User talk:goetzc|wanna talk?]]) 23:53, 16 February 2020 (UTC)<br />
* {{ic|/dev/video2}} contains data from IR camera, but it is IR only (without any IR sources it will be black), you can test it by opening the device with mpv: {{ic|av://v4l2:/dev/video2}} and shining TV remote onto the camera. [[User:Kubuxu|Kubuxu]] ([[User talk:Kubuxu|talk]]) 03:29, 27 February 2020 (UTC)<br />
* On my X1 Yoga (4) the IR camera is also covered by the privacy slider. Only what seems to be the ir led/ir blaster for windows hello is uncovered. Is there any way to turn these leds on? (Maybe even use it as a IR remote, if the wavelength matches) [[User:HNAtd|HNAtd]] ([[User talk:HNAtd|talk]]) 21:12, 1 March 2020 (UTC)<br />
* I found it: you can turn this led on using the /dev/video2 device and https://github.com/PetePriority/chicony-ir-toggle. So video0 is the main camera, video2 is the ir-led-control-channel and ir camera, but what is video{1,3}? [[User:HNAtd|HNAtd]] ([[User talk:HNAtd|talk]]) 21:24, 1 March 2020 (UTC)<br />
<br />
== Battery Issues ==<br />
<br />
Hey All, I haven't contributed to the wiki before so bear with me.<br />
<br />
I believe these battery issues might be worth adding, but I'm not sure where I should add them in the page:<br />
<br />
https://bbs.archlinux.org/viewtopic.php?id=252847<br />
https://forums.lenovo.com/t5/ThinkPad-X-Series-Laptops/X1-Carbon-Gen-7-regularly-mistakes-empty-battery-and-shuts-down/m-p/4561156?page=4<br />
<br />
Any ideas? Should they be added at all? Thanks.<br />
<br />
[[User:Caustic|Caustic]] ([[User talk:Caustic|talk]]) 21:13, 9 March 2020 (UTC)<br />
: Why don't you at least document what you did here in the talk page? I'm guessing it's an issue with GNOME. [[User:Wrycode|wrycode]] ([[User talk:Wrycode|talk]]) 02:25, 8 April 2020 (UTC)<br />
<br />
== New audio situation ==<br />
<br />
This fix worked for me after audio broke again. And the headphone/speaker switch works automatically.<br />
<br />
https://bbs.archlinux.org/viewtopic.php?pid=1887142#p1887142<br />
<br />
Eventually upstream should sort it out so that the only dirty hack required will be installing sof-firmware. {{Unsigned|02:16, 8 April 2020|Wrycode}}<br />
<br />
:Looks like the latest update to kernel 5.6.3 solves most problems: everything is recognised without that hack, except microphone in gnome-settings (but it's there in pavuctl). If confirmed by you guys, we might be able to remove or at least edit that section a bit. [[User:Gdonval|Gdonval]] ([[User talk:Gdonval|talk]]) 13:18, 8 April 2020 (UTC)</div>Goetzchttps://wiki.archlinux.org/index.php?title=Pantheon&diff=603989Pantheon2020-04-04T04:22:36Z<p>Goetzc: /* Desktop Environment */ style</p>
<hr />
<div>[[Category:Desktop environments]]<br />
[[ja:Pantheon]]<br />
[[pl:Pantheon]]<br />
[[zh-hans:Pantheon]]<br />
[https://bbs.archlinux.org/viewtopic.php?id=152930 Pantheon] is the desktop environment originally created for the [http://elementary.io/ elementary OS] distribution. It is written from scratch in [[Wikipedia:Vala (programming language)|Vala]], using [[GTK|GTK 3]] and [https://github.com/elementary/granite Granite]. With regards to usability and appearance, the desktop has some similarities with [[GNOME Shell]] and [[Wikipedia:MacOS|macOS]].<br />
<br />
== Project Status ==<br />
<br />
Although the [https://elementary.io/ elementary OS] release schedule and toolchain are bound to [[Arch_compared_to_other_distributions#Ubuntu|Ubuntu's]] LTS release cycle, [https://elementarycommunity.slack.com/ development] moves quickly and has recently moved to [https://github.com/elementary github].<br />
<br />
== Installation ==<br />
<br />
=== Packages ===<br />
<br />
==== Unofficial repository ====<br />
<br />
Alucryd's unofficial repository contains more and more [https://github.com/alucryd/aur-alucryd/tree/master/pantheon up-to-date] packages than the few available in the [[community repository]]. To use it add the following lines at the top of your sources in {{Ic|/etc/pacman.conf}}:<br />
{{bc|<nowiki><br />
[extra-alucryd]<br />
Server = https://pkgbuild.com/~alucryd/$repo/$arch<br />
</nowiki>}}<br />
Do note that some packages are missing from the repository due to [https://github.com/alucryd/aur-alucryd/issues/88#issuecomment-434606676 issues] with upstream. You will have to supplement the repo with locally compiled packages.<br />
<br />
==== AUR ====<br />
<br />
Alternatively, the [[PKGBUILD]]s for the pantheon packages are also available in the [[AUR]].<br />
<br />
=== Desktop Environment ===<br />
<br />
For the minimal Pantheon shell, install {{AUR|pantheon-session-git}}, which pulls —among other dependencies— the core components:<br />
* {{AUR|cerbere-git}}: Watchdog service; restarts core components if they crash.<br />
* {{AUR|gala-git}}: Window and composting manager <br />
* {{AUR|wingpanel-git}}: Top panel (holds the launcher, clock, and indicators)<br />
* {{AUR|pantheon-applications-menu-git}}: Application launcher formerly known as "Slingshot"<br />
* {{Pkg|plank}}: macOS-style Dock<br />
<br />
=== Services and Configuration ===<br />
<br />
These optional packages provide background services and default settings for Pantheon and elementary OS applications:<br />
* {{AUR|pantheon-default-settings-git}}: Default appearance, behavior, and configuration; pulls in theme packages {{Pkg|elementary-icon-theme}}, {{AUR|gtk-theme-elementary-git}}, and {{AUR|elementary-wallpapers-git}}<br />
* {{AUR|gnome-settings-daemon-elementary}}: A patched {{AUR|gnome-settings-daemon-ubuntu}} required by {{AUR|pantheon-dpms-helper-git}} and {{AUR|wingpanel-indicator-power-git}}<br />
* {{AUR|pantheon-print-git}}: Print settings dialog<br />
* {{AUR|pantheon-polkit-agent-git}}: Polkit authentication agent<br />
<br />
=== Theme ===<br />
<br />
These optional packages contribute to the look and feel of the desktop:<br />
* {{Pkg|elementary-icon-theme}} or {{AUR|elementary-icon-theme-git}}: Icon theme designed to be smooth, sexy, clear, and efficient<br />
* {{Pkg|lightdm-pantheon-greeter}} or {{AUR|lightdm-pantheon-greeter-git}}: LightDM greeter<br />
It is also recommended to install the following fonts:<br />
* {{Pkg|ttf-opensans}}: Open Sans Fonts<br />
* {{AUR|ttf-raleway}}: Raleway Font<br />
* {{Pkg|ttf-dejavu}}: Font family based on the Bitstream Vera Fonts<br />
* {{Pkg|ttf-droid}}: General-purpose fonts released by Google as part of Android<br />
* {{Pkg|gnu-free-fonts}}: Set of free outline fonts covering the Unicode character set<br />
* {{Pkg|ttf-liberation}}: Red Hats Liberation fonts<br />
<br />
=== Applications ===<br />
<br />
These are some of the original, patched, and selected packages that comprise the optional elementary OS software suite:<br />
* {{Pkg|pantheon-files}} or {{AUR|pantheon-files-git}}: File explorer developed from Marlin<br />
* {{Pkg|pantheon-terminal}} or {{AUR|pantheon-terminal-git}}: Terminal emulator<br />
* {{Pkg|pantheon-code}} or {{AUR|pantheon-code-git}}: Text editor formerly known as "Scratch"<br />
* {{Pkg|pantheon-calculator}} or {{AUR|pantheon-calculator-git}}: Calculator<br />
* {{Pkg|pantheon-music}} or {{AUR|pantheon-music-git}}: Audio player formerly known as "Noise"<br />
* {{Pkg|pantheon-videos}} or {{AUR|pantheon-videos-git}}: Video player formerly known as "Audience"<br />
* {{AUR|pantheon-calendar-git}}: Calendar application formerly known as "Maya", integrates with {{AUR|wingpanel-indicator-datetime-git}}<br />
* {{AUR|epiphany-pantheon}}: Web browser replacing {{AUR|midori-granite}}<br />
* {{AUR|pantheon-mail-git}}: Email client developed from {{Pkg|geary}}<br />
* {{Pkg|pantheon-screenshot}} or {{AUR|pantheon-screenshot-git}}: Screenshot tool<br />
* {{AUR|eidete-bzr}}: Simple screencaster<br />
* {{Pkg|pantheon-photos}} or {{AUR|pantheon-photos-git}}: Photo manager developed from {{Pkg|shotwell}}<br />
* {{AUR|pantheon-camera-git}}: Webcam app formerly known as "Snap"<br />
* {{Pkg|simple-scan}}: Simple scan utility<br />
* {{Pkg|switchboard}} or {{AUR|switchboard-git}}: Pluggable settings manager similar to {{Pkg|gnome-control-center}}<br />
<br />
== Launching Pantheon ==<br />
<br />
=== Via [[Display manager]] ===<br />
<br />
{{AUR|pantheon-session-git}} provides a {{Pkg|gnome-session}} entry for display managers such as {{Pkg|gdm}} or {{Pkg|lightdm}}.<br />
<br />
==== Autostart applications with a display manager ====<br />
<br />
As a gnome-session, Pantheon implements [[GNOME#Autostart|XDG Autostart]].<br />
<br />
=== Via [[xinit]] ===<br />
<br />
{{Out of date|cerbere has been [https://github.com/elementary/cerbere/issues/36 retired]}}<br />
<br />
Alternatively, you can use {{Ic|~/.xinitrc}} to launch the Pantheon shell, by adding {{ic|exec cerbere}} to the end of the file.<br />
<br />
==== Autostart applications with ''xinit'' ====<br />
<br />
For applications which do not provide a [[Systemd#Using_units|systemd unit]], consider these options:<br />
<br />
* Run once when X starts:<br />
:Add it to your [[#Via_xinit|{{Ic|~/.xinitrc}}]] [[Shell]] script, before the {{ic|exec cerbere}} line.<br />
<br />
* Keep running in the background:<br />
:Add it to the [[#Configuration|dconf key]] {{Ic|io.elementary.desktop.cerbere.monitored-processes}}.<br />
:Should the process stop, {{Pkg|cerbere}} will respawn it.<br />
<br />
* Launch from a [[.desktop]] file:<br />
:Use a program like {{AUR|dapper}}, {{AUR|dex-git}}, or {{AUR|fbautostart}} to implement [[XDG Autostart]].<br />
<br />
==Configuration==<br />
<br />
Configure Pantheon via {{Pkg|switchboard}} or {{AUR|switchboard-git}} and its plugs (''switchboard-plug-*''), which must be installed separately. Not all of {{Pkg|gnome-control-center}}'s settings panels have been ported. In addition, except [[plank]], all the Pantheon components store their configuration in the {{Ic|org.pantheon}} or {{Ic|io.elementary}} [[GNOME#Configuration|gsettings keys]], which can be edited with {{Pkg|dconf-editor}}.<br />
<br />
{{Note|{{AUR|switchboard-plug-elementary-tweaks-git}} provides easy access to [https://raw.githubusercontent.com/elementary-tweaks/elementary-tweaks/master/docs/screenshot.png customizations for various aspects of the Pantheon desktop and applications], similar to {{Pkg|gnome-tweaks}}.}}<br />
<br />
=== Wingpanel ===<br />
<br />
Wingpanel does not come with any indicators; they must be installed separately.<br />
<br />
At the minimum, you'll probably want to install:<br />
* {{Pkg|pantheon-applications-menu}} or {{AUR|pantheon-applications-menu-git}}: Applications menu and "Run" dialog<br />
* {{Pkg|wingpanel-indicator-datetime}} or {{AUR|wingpanel-indicator-datetime-git}}: Clock and calendar widget<br />
* {{Pkg|wingpanel-indicator-session}} or {{AUR|wingpanel-indicator-session-git}}: User and session menu (Switch user, Logout, Shutdown, etc.)<br />
<br />
==== Third-party indicators ====<br />
<br />
* If launched by a [[#Via Display manager|display manager]], append {{Ic|Pantheon;}} to {{ic|1=OnlyShowIn=}} in third-party indicators' [[XDG_Autostart|*.desktop files]]<br />
<br />
* If launched by [[#Via xinit|~/.xinitrc]], add third-party indicators to one of the start-up methods described [[#Launching Pantheon|above]].<br />
<br />
* [[Unity|Ayatana Indicators]] require {{AUR|wingpanel-indicator-ayatana}} or {{AUR|wingpanel-indicator-namarupa-git}} to appear in {{Pkg|wingpanel}}.<br />
<br />
==== Indicator-session menus unresponsive ====<br />
<br />
* {{Pkg|wingpanel-indicator-session}} needs [[light-locker]] or {{AUR|xscreensaver-dbus-screenlock}} installed for the {{Ic|Lock}} menu item.<br />
<br />
=== Plank ===<br />
<br />
==== Adding new application icons ====<br />
<br />
Either drag and drop a desktop file on to the dock, or right click on a running application and select "Keep in dock". You can then reorder icons by drag and drop.<br />
{{Note|Plank stores .dockitem launchers in {{ic|~/.config/plank/}} and configuration in the gsettings key {{ic|net.launchpad.plank}}}}<br />
<br />
=== Pantheon Files ===<br />
<br />
==== Enable context menu entries ====<br />
<br />
If you want to enable context menu entries such as for {{Pkg|file-roller}} to extract/compress archives, then you have to additionally install {{Pkg|contractor}} or {{AUR|contractor-git}}.<br />
<br />
=== Terminal ===<br />
<br />
====Opacity====<br />
<br />
To make {{Pkg|pantheon-terminal}} (semi-)transparent, [[#Configuration|set the dconf key]] {{ic|io.elementary.terminal.settings.background}} to your desired background color and opacity.<br />
<br />
== Known Issues ==<br />
<br />
=== Appearance ===<br />
<br />
==== Pantheon-terminal transparency ====<br />
<br />
Transparency in pantheon-terminal is not yet fully functional with GTK themes other than the elmentary OS theme. Either use {{Pkg|gtk-theme-elementary}}, {{AUR|gtk-theme-elementary-git}} or add the following code to your theme's css or the override file in {{ic|~/.config/gtk-3.0/gtk.css}}:<br />
/************<br />
* Terminal *<br />
***********/<br />
<br />
PantheonTerminalPantheonTerminalWindow.background {<br />
background-color: transparent;<br />
}<br />
<br />
==== Wingpanel transparency ====<br />
<br />
Wingpanel is transparent by design when using {{Pkg|gtk-theme-elementary}} or {{AUR|gtk-theme-elementary-git}}, and becomes opaque when a maximized window occupies your screen. However, using other GTK themes will produce a solid panel most of the time.<br />
<br />
To achieve the former behavior within another theme, add the following code to its css or the override file in {{ic|~/.config/gtk-3.0/gtk.css}}:<br />
<br />
/*********************<br />
* wingpanel support *<br />
********************/<br />
<br />
.panel {<br />
background-color: transparent;<br />
transition: all 1s ease-in-out;<br />
}<br />
<br />
.panel.maximized {<br />
background-color: #000;<br />
}<br />
<br />
=== Desktop crashes at login ===<br />
<br />
==== "Oh no! Something has gone wrong." ====<br />
<br />
One of the {{ic|RequiredComponents}} in Pantheon's session file may be failing, causing gnome-session to crash as well.<br />
<br />
You may work around this by editing {{ic|/usr/share/gnome-session/sessions/pantheon.session}}, removing {{ic|org.gnome.SettingsDaemon}} and everything after it on that line.<br />
<br />
==== Subsequent login attempts return to display manager ====<br />
<br />
See [[GNOME/Troubleshooting#gnome-shell / gnome-session crashes on session startup|gnome-session crashes on session startup]].<br />
<br />
Most of the time, waiting a little longer to log in is sufficent to clear whatever blockage the previous session has left behind.</div>Goetzchttps://wiki.archlinux.org/index.php?title=Steam/Troubleshooting&diff=602430Steam/Troubleshooting2020-03-24T00:34:25Z<p>Goetzc: /* Other issues */ HiDPI</p>
<hr />
<div>[[Category:Gaming]]<br />
[[ja:Steam/トラブルシューティング]]<br />
== Introduction ==<br />
<br />
# Make sure that you have followed [[Steam#Installation]].<br />
# If the Steam client / a game is not starting and/or you have error message about a library, read [[#Steam runtime]] and see [[#Debugging shared libraries]].<br />
# If the issue is related to networking, make sure that you have forwarded the [https://support.steampowered.com/kb_article.php?ref=8571-GLVN-8711 required ports for Steam].<br />
# If the issue is about a game, consult [[Steam/Game-specific troubleshooting]].<br />
<br />
=== Relevant online resources ===<br />
<br />
* [https://bbs.archlinux.org/viewforum.php?id=32 Multimedia and Games / Arch Linux Forums]<br />
* [https://github.com/ValveSoftware/steam-for-linux ValveSoftware/steam-for-linux] – Issue tracking for the Steam for Linux client<br />
* [https://steamcommunity.com/ Steam Community discussions of the game]<br />
* [https://help.steampowered.com/en/ Steam Support FAQ]<br />
<br />
== Steam runtime ==<br />
<br />
Steam for Linux ships with its own set of libraries called the [https://github.com/ValveSoftware/steam-runtime Steam runtime]. By default Steam launches all Steam Applications within the runtime environment.<br />
The Steam runtime is located at {{ic|~/.steam/root/ubuntu12_32/steam-runtime/}}.<br />
<br />
If you mix the Steam runtime libraries with system libraries you will run into binary incompatibility issues, see [https://github.com/ValveSoftware/steam-for-linux/issues/4768 steam-for-linux issue #4768].<br />
Binary incompatibility can lead to the Steam client and games not starting (manifesting as a crash, as hanging or silently returning), audio issues and various other problems.<br />
<br />
The {{Pkg|steam}} package offers three ways to launch Steam:<br />
<br />
* {{ic|steam-runtime}} (alias {{ic|steam}}), which overrides runtime libraries known to cause problems via the {{ic|LD_PRELOAD}} [[environment variable]] (see {{man|8|ld.so}}).<br />
* {{ic|steam-native}}, see [[#Steam native runtime]]<br />
* {{ic|/usr/lib/steam/steam}}, the default Steam launch script<br />
<br />
As the Steam runtime libraries are older they can lack newer features, e.g. the OpenAL version of the Steam runtime lacks [[Gaming#Binaural_Audio_with_OpenAL|HRTF]] and surround71 support.<br />
<br />
=== Steam native runtime ===<br />
<br />
{{Warning|Using the Steam native runtime is not recommended as it might break some games due to binary incompatibility and it might miss some libraries present in the Steam runtime.}}<br />
<br />
The {{ic|steam-native}} script launches Steam with the {{ic|1=STEAM_RUNTIME=0}} environment variable making it ignore its runtime and only use system libraries.<br />
<br />
The {{Pkg|steam-native-runtime}} meta package depends on over 120 packages to pose a native replacement of the Steam runtime, some games may however still require additional packages. You can also use the Steam native runtime without {{Pkg|steam-native-runtime}} by manually installing just the packages you need. See [[#Finding missing runtime libraries]].<br />
<br />
== Debugging shared libraries ==<br />
<br />
To see the shared libraries required by a program or a shared library run the {{ic|ldd}} command on it, see {{man|1|ldd}}. The {{ic|LD_LIBRARY_PATH}} and {{ic|LD_PRELOAD}} [[environment variables]] can alter which shared libraries are loaded, see {{man|8|ld.so}}. <br />
To correctly debug a program or shared library it is therefore important that these environment variables in your debug environment match the environment you wish to debug.<br />
<br />
If you figure out a missing library you can use [[pacman]] or [[pkgfile]] to search for packages that contain the missing library.<br />
<br />
=== Finding missing game libraries ===<br />
<br />
If a game fails to start, a possible reason is that it is missing required libraries. You can find out what libraries it requests by running {{ic|ldd ''game_executable''}}. {{ic|''game_executable''}} is likely located somewhere in {{ic|~/.steam/root/steamapps/common/}}. Please note that most of these "missing" libraries are actually already included with Steam, and do not need to be installed globally.<br />
<br />
=== Finding missing runtime libraries ===<br />
<br />
If individual games or Steam itself is failing to launch when using {{ic|steam-native}} you are probably missing libraries. To find the required libraries run:<br />
<br />
$ cd ~/.steam/root/ubuntu12_32<br />
$ file * | grep ELF | cut -d: -f1 | LD_LIBRARY_PATH=. xargs ldd | grep 'not found' | sort | uniq<br />
<br />
Alternatively, run Steam with {{ic|steam-runtime}} and use the following command to see which non-system libraries Steam is using (not all of these are part of the Steam runtime):<br />
<br />
$ for i in $(pgrep steam); do sed '/\.local/!d;s/.* //g' /proc/$i/maps; done | sort | uniq<br />
<br />
== Debugging Steam ==<br />
<br />
The Steam launcher redirects its stdout and stderr to {{ic|/tmp/dumps/''USER''_stdout.txt}}.<br />
This means you do not have to run Steam from the command-line to see that output.<br />
<br />
It is possible to debug Steam to gain more information which could be useful to find out why something does not work.<br />
<br />
You can set {{ic|DEBUGGER}} environment variable with one of {{ic|gdb}}, {{ic|cgdb}}, {{ic|valgrind}}, {{ic|callgrind}}, {{ic|strace}} and then start {{ic|steam}}.<br />
<br />
For example with {{Pkg|gdb}}<br />
{{bc|1=$ DEBUGGER=gdb steam}}<br />
<br />
{{ic|gdb}} will open, then type {{ic|run}} which will start {{ic|steam}} and once crash happens you can type {{ic|backtrace}} to see call stack.<br />
<br />
== Runtime issues ==<br />
<br />
=== Segmentation fault when disabling runtime ===<br />
<br />
:[https://github.com/ValveSoftware/steam-for-linux/issues/3863 steam-for-linux issue #3863]<br />
<br />
As per the bug report above, Steam crashes with the following error message when run with {{ic|1=STEAM_RUNTIME=0}}:<br />
<br />
/home/''USER''/.local/share/Steam/steam.sh: line 756: <variable numeric code> Segmentation fault (core dumped)<br />
<br />
This happens because {{ic|steamclient.so}} is linked to {{ic|libudev.so.0}} ({{AUR|lib32-libudev0}}) which conflicts with {{ic|libudev.so.1}} ({{Pkg|lib32-systemd}}).<br />
<br />
A proposed workaround is to copy Steam's packaged 32-bit versions of libusb and libgudev to {{ic|/usr/lib32}}:<br />
<br />
# cp ~/.steam/root/ubuntu12_32/steam-runtime/i386/usr/lib/i386-linux-gnu/libgudev* /usr/lib32<br />
# cp ~/.steam/root/ubuntu12_32/steam-runtime/i386/lib/i386-linux-gnu/libusb* /usr/lib32<br />
<br />
Notice that the workaround is necessary because the bug affects systems with lib32-libgudev and lib32-libusb installed.<br />
<br />
Alternatively it has been successful to prioritize the loading of the libudev.so.1 (see [https://github.com/ValveSoftware/steam-for-linux/issues/3863#issuecomment-203929113 comment on the same issue]):<br />
{{bc|1=$ LD_PRELOAD=/usr/lib32/libudev.so.1 STEAM_RUNTIME=0 steam}}<br />
<br />
=== 'GLBCXX_3.X.XX' not found when using Bumblebee ===<br />
<br />
This error is likely caused because Steam packages its own out of date {{ic|libstdc++.so.6}}. See [[#Finding missing runtime libraries]] about working around the bad library. See also [https://github.com/ValveSoftware/steam-for-linux/issues/3773 steam-for-linux issue 3773].<br />
<br />
=== Game crashes immediately ===<br />
<br />
This is likely due to [[#Steam runtime]] issues, see [[#Debugging shared libraries]].<br />
<br />
Disabling the in-game Steam Overlay in the game properties might help.<br />
<br />
And finally, if those don't work, you should check Steam's output for any error from the game. You may encounter the following:<br />
* {{ic|munmap_chunk(): invalid pointer}}<br />
* {{ic|free(): invalid pointer}}<br />
<br />
In these cases, try replacing the {{ic|libsteam_api.so}} file from the problematic game with one of a game that works. This error usually happens for games that were not updated recently when Steam runtime is disabled. This error has been encountered with AYIM, Bastion and Monaco.<br />
<br />
=== Game and Steam crashes after game start ===<br />
If the following error is output:<br />
failed to dlopen engine.so error=/home/''GAMEPATH''/bin/libgcc_s.so.1: version `GCC_7.0.0' not found (required by /usr/lib32/libopenal.so.1)<br />
<br />
moving the incompatible lib can be a workaround.<br />
mv .local/share/Steam/steamapps/common/''GAME''/bin/libgcc_s.so.1 .local/share/Steam/steamapps/common/''GAME''/bin/libgcc_s.so.1.b<br />
<br />
=== Version `CURL_OPENSSL_3` not found ===<br />
<br />
This is because {{Pkg|curl}} alone is not compatible with previous versions. You need to install the compatibility libraries:<br />
<br />
One of the following messages may show up:<br />
<br />
# Nuclear Throne<br />
./nuclearthrone: /usr/lib32/libcurl.so.4: version `CURL_OPENSSL_3' not found (required by ./nuclearthrone)<br />
<br />
# Devil Daggers<br />
./devildaggers: /usr/lib/libcurl.so.4: version `CURL_OPENSSL_3' not found (required by ./devildaggers)<br />
<br />
You need to install either {{Pkg|libcurl-compat}} or {{Pkg|lib32-libcurl-compat}} and link the compatibility library manually:<br />
<br />
# Nuclear Throne<br />
$ ln -s /usr/lib32/libcurl-compat.so.4.4.0 "''LIBRARY''/steamapps/common/Nuclear Throne/lib/libcurl.so.4"<br />
<br />
# Devil Daggers<br />
$ ln -s /usr/lib/libcurl-compat.so.4.4.0 ''LIBRARY''/steamapps/common/devildaggers/lib64/libcurl.so.4<br />
<br />
=== Steam webview/game browser not working in native runtime (Black screen) ===<br />
Since the new Steam Friends UI update, the client webview isn't working correctly with the native-runtime.<br />
<br />
./steamwebhelper: error while loading shared libraries: libpcre.so.3: cannot open shared object file: No such file or directory<br />
It can be solved preloading glib libraries; Those don't require libpcre and selinux to work.<br />
<br />
$ LD_PRELOAD="/usr/lib/libgio-2.0.so.0 /usr/lib/libglib-2.0.so.0" steam-native<br />
<br />
Alternatively, you may create a symbolic link to the native Arch libpcre library.<br />
<br />
# ln -s /usr/lib/libpcre.so /usr/lib64/libpcre.so.3<br />
<br />
=== Steam: An X Error occurred ===<br />
When using an NVidia GPU and proprietary drivers, Steam may fail to start and (if run from the terminal) produce errors of the form:<br />
<br />
Steam: An X Error occurred<br />
X Error of failed request: GLXBadContext<br />
Major opcode of failed request: 151<br />
Serial number of failed request: 51<br />
xerror_handler: X failed, continuing<br />
<br />
Install the package {{Pkg|lib32-nvidia-utils}} (or {{AUR|lib32-nvidia-390xx-utils}} if using an old GPU).<br />
<br />
== Audio issues ==<br />
<br />
If the sections below do not address the issue, using the [[#Steam native runtime]] might help.<br />
<br />
=== Configure PulseAudio ===<br />
<br />
Games that explicitly depend on ALSA can break PulseAudio. Follow the directions for [[PulseAudio#ALSA]] to make these games use PulseAudio instead.<br />
<br />
=== No audio or 756 Segmentation fault ===<br />
<br />
First [[#Configure PulseAudio]] and see if that resolves the issue. If you do not have audio in the videos which play within the Steam client, it is possible that the ALSA libraries packaged with Steam are not working.<br />
<br />
Attempting to playback a video within the steam client results in an error similar to:<br />
<br />
ALSA lib pcm_dmix.c:1018:(snd_pcm_dmix_open) unable to open slave<br />
<br />
A workaround is to rename or delete the {{ic|alsa-lib}} folder and the {{ic|libasound.so.*}} files. They can be found at:<br />
<br />
~/.steam/steam/ubuntu12_32/steam-runtime/i386/usr/lib/i386-linux-gnu/<br />
<br />
An alternative workaround is to add the {{ic|libasound.so.*}} library to the {{ic|LD_PRELOAD}} environment variable:<br />
<br />
LD_PRELOAD='/usr/$LIB/libasound.so.2 '${LD_PRELOAD} steam<br />
<br />
If audio still won't work, adding the Pulseaudio-libs to the {{ic|LD_PRELOAD}} variable may help:<br />
<br />
LD_PRELOAD='/usr/$LIB/libpulse.so.0 /usr/$LIB/libpulse-simple.so.0 '${LD_PRELOAD}<br />
<br />
Be advised that their names may change over time. If so, it is necessary to take a look in <br />
<br />
~/.steam/ubuntu12_32/steam-runtime/i386/usr/lib/i386-linux-gnu<br />
<br />
and find the new libraries and their versions.<br />
<br />
Bugs reports have been filed: [https://github.com/ValveSoftware/steam-for-linux/issues/3376 #3376] and [https://github.com/ValveSoftware/steam-for-linux/issues/3504 #3504]<br />
<br />
=== FMOD sound engine ===<br />
{{Accuracy|No source / bug report.}}<br />
<br />
The [https://www.fmod.com/ FMOD] audio middleware package is a bit buggy, and as a result games using it may have sound problems.<br />
<br />
It usually occurs when an unused sound device is used as default for ALSA. See [[Advanced Linux Sound Architecture#Set the default sound card]].<br />
<br />
:Affected games: Hotline Miami, Hotline Miami 2, Transistor<br />
<br />
=== PulseAudio & OpenAL: Audio streams can't be moved between devices ===<br />
<br />
If you use [[PulseAudio]] and cannot move an audio stream between sinks, it might be because recent OpenAL versions default to disallow audio streams from being moved. Try to add the following to your {{ic|~/.alsoftrc}}:<br />
<br />
[pulse]<br />
allow-moves=true<br />
<br />
== Steam client issues ==<br />
<br />
=== Cannot add library folder because of missing execute permissions ===<br />
<br />
If you add another Steam library folder on another drive, you might get the error message:<br />
<br />
New Steam library folder must be on a filesystem mounted with execute permissions<br />
<br />
Make sure you are mounting the filesystem with the correct flags in your {{ic|/etc/fstab}}, usually by adding {{ic|exec}} to the list of mount parameter. The parameter must occur after any {{ic|user}} or {{ic|users}} parameter since these can imply {{ic|noexec}}.<br />
<br />
This error might also occur if your library folder does not contain a {{ic|steamapps}} directory. Previous versions used {{ic|SteamApps}} instead, so ensure the name is fully lowercase.<br />
<br />
This error can also occur because of Steam runtime issues and may be fixed following the [[#Finding missing runtime libraries]] section or due to no space being left on the device. For debugging purposes it might be useful to run Steam from the console and observe the log.<br />
<br />
=== Unusually slow download speed ===<br />
<br />
If your Steam apps (games, software…) download speed through the client is unusually slow, but browsing the Steam store and streaming videos is unaffected, installing a DNS cache program, such as [[dnsmasq]] can help [https://steamcommunity.com/app/221410/discussions/2/616189106498372437/].<br />
<br />
Something else that might help would be disabling [[IPv6]][https://github.com/ValveSoftware/steam-for-linux/issues/6126].<br />
<br />
=== "Needs to be online" error ===<br />
If the Steam launcher refuses to start and you get an error saying: "''Fatal Error: Steam needs to be online to update''" while you are online, then there might be issues with name resolving. <br />
<br />
Try to install {{Pkg|lib32-libcurl-compat}} or {{Pkg|nss-mdns}} or {{Pkg|lib32-nss}}.<br />
<br />
This may also be as simple as DNS resolution not correctly working and is not always obvious since modern browsers will user their own DNS servers. A possible fix if you didn't follow all the directions from the resolved wiki article. Make sure /run/systemd/resolve/resolv.conf contains name servers as expected:<br />
<br />
cat /run/systemd/resolve/resolv.conf<br />
<br />
Create the symbolic link (the -f option will force overwrite any current file):<br />
<br />
ln -sf /run/systemd/resolve/resolv.conf /etc/resolv.conf<br />
<br />
=== Steam forgets password ===<br />
<br />
:Related: [https://github.com/ValveSoftware/steam-for-linux/issues/5030 steam-for-linux#5030]<br />
Steam for Linux has a bug which causes it to forget the password of some users.<br />
<br />
As a workaround, after logging in to Steam, run<br />
$ chmod -w ~/.steam/registry.vdf<br />
This will make the file read-only so Steam cannot modify it, and thus not log you out.<br />
<br />
=== Preventing crash memory dumps ===<br />
<br />
Every time Steam crashes, it writes a memory dump to {{ic|/tmp/dumps/}}. If Steam falls into a crash loop, the dump files can become quite large. When {{ic|/tmp}} is mounted as [[tmpfs]], memory and swap file can be consumed needlessly.<br />
<br />
To prevent this, link {{ic|/tmp/dumps/}} to {{ic|/dev/null}}:<br />
# ln -s /dev/null /tmp/dumps<br />
<br />
Or alternatively, create and modify permissions on {{ic|/tmp/dumps}}. Then Steam will be unable to write dump files to the directory.<br />
<br />
# mkdir /tmp/dumps<br />
# chmod 600 /tmp/dumps<br />
<br />
This also has the added benefit of Steam not uploading these dumps to Valve's servers.<br />
<br />
=== Steam license problem with playing videos ===<br />
<br />
Steam uses [[w:Widevine|Google's Widevine DRM]] for some videos. If it is not installed you will get the following error:<br />
<br />
This video requires a license to play which cannot be retrieved. This may be a temporary network condition. Please restart the video to try again.<br />
<br />
To solve this issue follow the [https://support.steampowered.com/kb_article.php?ref=8699-OASD-1871#15 ''Streaming Videos on Steam'' support page].<br />
<br />
=== No context menu for joining/inviting friends ===<br />
<br />
Since the new Steam Friends UI update, it may be the case that in the right-click menu the entries for "Join Game", "Invite to Game" and "View Game Info" are missing.<br />
<br />
In order to fix this, it maybe be necessary to install {{Pkg|lsof}}.<br />
<br />
=== Slow and unresponsive user interface ===<br />
<br />
If you experience extremely slow and sluggish performance when using the Steam client it might help to disable the option "Enable GPU accelerated rendering in web views" under the "Interface" tab in the Steam client settings.<br />
<br />
=== Steam fails to start correctly ===<br />
<br />
One troubleshooting step is to run <br />
<br />
# steam-runtime --reset<br />
<br />
This can fix various issues that come with a broken install.<br />
<br />
== Steam Remote Play issues ==<br />
<br />
See [[Steam#Steam Remote Play]].<br />
<br />
=== Remote Play does not work from Arch Linux host to Arch Linux guest ===<br />
<br />
Chances are you are missing {{Pkg|lib32-libcanberra}}. Once you [[install]] that, it should work as expected.<br />
<br />
With that, Steam should no longer crash when trying to launch a game through Remote Play.<br />
<br />
=== Hardware decoding not available ===<br />
<br />
Remote Play hardware decoding uses {{ic|vaapi}}, but steam requires {{ic|libva2_32bit}}, where as Arch defaults to 64bit.<br />
<br />
As a basic set, this is {{Pkg|libva}} and {{Pkg|lib32-libva}}. Intel graphics users will also require both {{Pkg|libva-intel-driver}} and {{Pkg|lib32-libva-intel-driver}}. <br />
<br />
For more information about vaapi see [[hardware video acceleration]].<br />
<br />
It may also be necessary to remove the steam runtime version of libva, in order to force it to use system libraries. The current library in use can be found by using:<br />
<br />
pgrep steam | xargs -I {} cat /proc/{}/maps | grep libva<br />
<br />
If this shows locations in {{ic|~/.local/Share/steam}} steam is still using it's packaged version of libva. This can be rectified by deleting the libva library files at {{ic|~/.local/share/Steam/ubuntu12_32/steam-runtime/i386/usr/lib/i386-linux-gnu/libva*}}, so that steam falls back to the system libraries.<br />
<br />
=== Big Picture Mode minimizes itself after losing focus ===<br />
<br />
This can occur when you play a game via Remote Play or if you have a multi-monitor setup and move the mouse outside of BPM's window. To prevent this, set the following environment variable and restart Steam<br />
<br />
export SDL_VIDEO_MINIMIZE_ON_FOCUS_LOSS=0<br />
<br />
See also the [https://github.com/ValveSoftware/steam-for-linux/issues/4769 steam-for-linux issue 4769].<br />
<br />
== Other issues ==<br />
<br />
=== Wrong ELF class ===<br />
<br />
If you see this message in Steam's console output<br />
<br />
ERROR: ld.so: object '~/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.<br />
<br />
you can safely ignore it. It is not really any error: Steam includes both 64- and 32-bit versions of some libraries and only one version will load successfully. This "error" is displayed even when Steam (and the in-game overlay) is working perfectly.<br />
<br />
=== Multiple monitors setup ===<br />
{{Expansion|Is this Nvidia-only? Can this be reproduced by anyone? Is there an upstream report?}}<br />
A setup with multiple monitors may prevent games from starting. Try to disable all additional displays, and then run a game. You can enable them after the game successfully started. <br />
<br />
Also you can try running Steam with this environment variable set:<br />
<br />
export LD_LIBRARY_PATH=/usr/lib32/nvidia:/usr/lib/nvidia:$LD_LIBRARY_PATH<br />
<br />
=== Text is corrupt or missing ===<br />
<br />
The Steam Support [https://support.steampowered.com/kb_article.php?ref=1974-YFKL-4947 instructions] for Windows seem to work on Linux also.<br />
<br />
You can install them via the {{AUR|steam-fonts}} package, or manually by downloading and [[fonts#Manual installation|installing]] [https://support.steampowered.com/downloads/1974-YFKL-4947/SteamFonts.zip SteamFonts.zip].<br />
<br />
{{Note|When steam cannot find the Arial fonts, font-config likes to fall back onto the Helveticia bitmap font. Steam does not render this and possibly other bitmap fonts correctly, so either removing problem fonts or [[Font configuration#Disable bitmap fonts|disabling bitmap fonts]] will most likely fix the issue without installing the Arial or ArialBold fonts.<br />
<br />
The font being used in place of Arial can be found with the command {{bc|$ fc-match -v Arial}}}}<br />
<br />
=== SetLocale('en_US.UTF-8') fails at game startup or typing non-ASCII characters does not work in the Steam client ===<br />
<br />
You need to generate the {{ic|en_US.UTF-8 UTF-8}} locale. See [[Locale#Generating locales]].<br />
<br />
=== Missing libc ===<br />
<br />
This could be due to a corrupt Steam executable. Check the output of:<br />
<br />
$ ldd ~/.local/share/Steam/ubuntu12_32/steam<br />
<br />
Should {{ic|ldd}} claim that it is not a dynamic executable, then Steam likely corrupted the binary during an update. The following should fix the issue:<br />
<br />
$ cd ~/.local/share/Steam/<br />
$ ./steam.sh --reset<br />
<br />
If it doesn't, try to delete the {{ic|~/.local/share/Steam/}} directory and launch Steam again, telling it to reinstall itself.<br />
<br />
This error message can also occur due to a bug in Steam which occurs when your {{ic|$HOME}} directory ends in a slash (Valve GitHub [https://github.com/ValveSoftware/steam-for-linux/issues/3730 issue 3730]). This can be fixed by editing {{ic|/etc/passwd}} and changing {{ic|/home/<username>/}} to {{ic|home/<username>}}, then logging out and in again. Afterwards, Steam should repair itself automatically.<br />
<br />
=== Games do not launch on older Intel hardware ===<br />
<br />
:[https://steamcommunity.com/app/8930/discussions/1/540744299927655197/ source]<br />
<br />
On older Intel hardware which doesn't support OpenGL 3, such as Intel GMA chips or Westmere CPUs, games may immediately crash when run. It appears as a {{ic|gameoverlayrenderer.so}} error in {{ic|/tmp/dumps/mobile_stdout.txt}}, but looking in {{ic|/tmp/gameoverlayrenderer.log}} it shows a GLXBadFBConfig error. <br />
<br />
This can be fixed, by forcing the game to use a later version of OpenGL than it wants.<br />
Add {{ic|1=MESA_GL_VERSION_OVERRIDE=3.1 MESA_GLSL_VERSION_OVERRIDE=140}} to your [[launch option]]s.<br />
<br />
=== Mesa: Game does not launch, complaining about OpenGL version supported by the card ===<br />
<br />
Some games are badly programmed, to use any OpenGL version above 3.0.<br />
With Mesa, an application has to request a specific core profile.<br />
If it doesn't make such a request, only OpenGL 3.0 and lower are available.<br />
<br />
This can be fixed, by forcing the game to use a version of OpenGL it actually needs.<br />
Add {{ic|1=MESA_GL_VERSION_OVERRIDE=4.1 MESA_GLSL_VERSION_OVERRIDE=410}} to your [[launch option]]s.<br />
<br />
=== 2K games do not run on XFS partitions ===<br />
<br />
{{Expansion|Seems to be a general issue, e.g. [https://github.com/ValveSoftware/Source-1-Games/issues/1685]}}<br />
<br />
If you are running 2K games such as Civilization 5 on [[XFS]] partitions, then the game may not start or run properly due to how the game loads files as it starts.<br />
[https://bbs.archlinux.org/viewtopic.php?id=185222]<br />
<br />
=== Steam controller not being detected correctly ===<br />
<br />
See [[Gamepad#Steam Controller]].<br />
<br />
=== Steam controller makes a game crash ===<br />
<br />
See [[Gamepad#Steam Controller makes a game crash or not recognized]].<br />
<br />
=== Steam hangs on "Installing breakpad exception handler..." ===<br />
<br />
[https://bbs.archlinux.org/viewtopic.php?id=177245 BBS#177245]<br />
<br />
You have an Nvidia GPU and Steam has the following output:<br />
<br />
Running Steam on arch rolling 64-bit<br />
STEAM_RUNTIME is enabled automatically<br />
Installing breakpad exception handler for appid(steam)/version(0_client)<br />
<br />
Then nothing else happens. Ensure you have the correct drivers installed as well as their 32-bit versions (the 64-bit and 32-bit variants have to have the same versions): see [[NVIDIA#Installation]].<br />
<br />
=== Killing standalone compositors when launching games ===<br />
<br />
Further to this, utilising the {{ic|%command%}} switch, you can kill standalone compositors (such as Xcompmgr or [[Compton]]) - which can cause lag and tearing in some games on some systems - and relaunch them after the game ends by adding the following to your game's launch options.<br />
<br />
killall compton && %command%; compton -b &<br />
<br />
Replace {{ic|compton}} in the above command with whatever your compositor is. You can also add -options to {{ic|%command%}} or {{ic|compton}}, of course.<br />
<br />
Steam will latch on to any processes launched after {{ic|%command%}} and your Steam status will show as in game. So in this example, we run the compositor through {{ic|nohup}} so it is not attached to Steam (it will keep running if you close Steam) and follow it with an ampersand so that the line of commands ends, clearing your Steam status.<br />
<br />
=== Symbol lookup error using DRI3 ===<br />
<br />
Steam outputs this error and exits.<br />
<br />
symbol lookup error: /usr/lib/libxcb-dri3.so.0: undefined symbol: xcb_send_request_with_fds<br />
<br />
To work around this, run Steam with {{ic|1=LIBGL_DRI3_DISABLE=1}}, disabling DRI3 for Steam.<br />
<br />
=== Launching games on Nvidia optimus laptops ===<br />
<br />
To be able to play games which require using Nvidia GPU (for example, Hitman 2016) on optimus enabled laptop, you should start game with ''primusrun'' prefix in launch options. Otherwise, game will not work.<br />
<br />
Find the game in steam library, right click -> Properties -> SET LAUNCH OPTIONS. Change options to<br />
<br />
{{ic|1=primusrun %command%}}<br />
<br />
Running steam with primusrum used to work. While steam has changed some behavior that now running steam with primusrun would not have effect on launching games. As a result, you need to set launch options for each game (and you do NOT have to run steam with primusrun).<br />
<br />
For primusrun, VSYNC is enabled by default it could result in a mouse input delay lag, slightly decrease performance and in-game FPS might be locked to a refresh rate of a monitor/display.<br />
In order to disable VSYNC for primusrun default value of option vblank_mode needs to be overridden by environment variable.<br />
<br />
{{ic|1=vblank_mode=0 primusrun %command%}}<br />
<br />
Same with optirun that uses primus as a bridge. <br />
<br />
{{ic|1=vblank_mode=0 optirun -b primus %command%}}<br />
<br />
If that did not work try:<br />
<br />
{{ic|1=LD_PRELOAD="libpthread.so.0 libGL.so.1" __GL_THREADED_OPTIMIZATIONS=1 optirun %command%}}<br />
<br />
For more details see [[Bumblebee#Primusrun mouse delay (disable VSYNC)]].<br />
<br />
=== HiDPI ===<br />
[[HiDPI]] support should work out of the box, although on some systems it is necessary to [[HiDPI#Steam|force it]] setting the {{ic|1=GDK_SCALE=}} environment variable to set the desired scale factor.</div>Goetzchttps://wiki.archlinux.org/index.php?title=Keyboard_backlight&diff=602071Keyboard backlight2020-03-19T16:41:25Z<p>Goetzc: remove redundancy</p>
<hr />
<div>[[Category:Keyboards]]<br />
[[ja:キーボードバックライト]]<br />
[[pt:Keyboard backlight]]<br />
There a various methods to control the ''keyboard backlight'' brightness level.<br />
<br />
== Any vendor ==<br />
<br />
There are a variety ways to manage the brightness level and different helpers tools to accomplish this, such as {{pkg|brightnessctl}} or {{pkg|light}}.<br />
<br />
The {{ic|sys}} pseudo-file system exposes an interface to the keyboard backlight. The current brightness level can be get by reading {{ic|/sys/class/leds/tpacpi::kbd_backlight/brightness}}. For example to get the maximum brightness level:<br />
<br />
cat /sys/class/leds/tpacpi::kbd_backlight/max_brightness<br />
<br />
To set the brightness to 1:<br />
<br />
echo 1 | sudo tee /sys/class/leds/tpacpi::kbd_backlight/brightness<br />
<br />
When using {{ic|brightnessctl}} you can get a list of available brightness controls with {{ic|brightnessctl --list}}, then to show the kbd backlight information:<br />
<br />
brightnessctl --device='tpacpi::kbd_backlight' info<br />
<br />
This will show the absolute and relative current value and the maximum absolute value. To set a different value:<br />
<br />
brightnessctl --device='tpacpi::kbd_backlight' set 1 <br />
<br />
=== D-Bus ===<br />
<br />
You can control your computer keyboard backlight via the [[D-Bus]] interface. The benefits of using it are that no modification to device files is required and it is vendor agnostic.<br />
<br />
The following is an example implementation in Python 3. [[Install]] {{pkg|upower}} and {{pkg|python-dbus}} packages then place the following script in {{ic|/usr/local/bin/}} and make it executable. You can then map your keyboard shortcuts to run {{ic|/usr/local/bin/kb-light.py + x}} and {{ic|/usr/local/bin/kb-light.py - x}} to increase and decrease your keyboard backlight level by {{ic|x}} amounts.<br />
<br />
{{Tip|1=You should try with an x = 1 to determine the limits of the keyboard backlight levels}}<br />
<br />
{{hc|/usr/local/bin/kb-light.py|<nowiki><br />
#!/usr/bin/env python3<br />
<br />
import dbus<br />
import sys<br />
<br />
def kb_light_set(delta):<br />
bus = dbus.SystemBus()<br />
kbd_backlight_proxy = bus.get_object('org.freedesktop.UPower', '/org/freedesktop/UPower/KbdBacklight')<br />
kbd_backlight = dbus.Interface(kbd_backlight_proxy, 'org.freedesktop.UPower.KbdBacklight')<br />
<br />
current = kbd_backlight.GetBrightness()<br />
maximum = kbd_backlight.GetMaxBrightness()<br />
new = max(0, min(current + delta, maximum))<br />
<br />
if 0 <= new <= maximum:<br />
current = new<br />
kbd_backlight.SetBrightness(current)<br />
<br />
# Return current backlight level percentage<br />
return 100 * current / maximum<br />
<br />
if __name__ == '__main__':<br />
if len(sys.argv) == 2 or len(sys.argv) == 3:<br />
if sys.argv[1] == "--up" or sys.argv[1] == "+":<br />
if len(sys.argv) == 3:<br />
print(kb_light_set(int(sys.argv[2])))<br />
else:<br />
print(kb_light_set(17))<br />
elif sys.argv[1] == "--down" or sys.argv[1] == "-":<br />
if len(sys.argv) == 3:<br />
print(kb_light_set(-int(sys.argv[2])))<br />
else:<br />
print(kb_light_set(-17))<br />
else:<br />
print("Unknown argument:", sys.argv[1])<br />
else:<br />
print("Script takes one or two argument.", len(sys.argv) - 1, "arguments provided.")<br />
<br />
</nowiki><br />
}}<br />
<br />
Alternatively the following bash one-liner will set the backlight to the value specified in the ''argument'':<br />
<br />
{{bc|<nowiki><br />
setKeyboardLight () {<br />
dbus-send --system --type=method_call --dest="org.freedesktop.UPower" "/org/freedesktop/UPower/KbdBacklight" "org.freedesktop.UPower.KbdBacklight.SetBrightness" int32:$1 <br />
}</nowiki><br />
}}<br />
<br />
==== On GNOME ====<br />
<br />
The following can be run from a terminal or mapped to keybindings <br />
<br />
gdbus call --session --dest org.gnome.SettingsDaemon.Power --object-path /org/gnome/SettingsDaemon/Power --method org.gnome.SettingsDaemon.Power.Keyboard.StepUp<br />
gdbus call --session --dest org.gnome.SettingsDaemon.Power --object-path /org/gnome/SettingsDaemon/Power --method org.gnome.SettingsDaemon.Power.Keyboard.StepDown<br />
<br />
==== On MATE ====<br />
<br />
{{Style|Informal and unclear description. No relevance to MATE.}}<br />
<br />
In case you use [[MATE]] environment you might get tired with repeated lighting keyboard backlight while logging in, unlocking screen or waking up dimmed display. Following setup prevent from automatic lighting up during any action. The only triggers remain plugging in the adapter and fresh boot. After that you can control keyboard backlight only via hotkeys (eg. ThinkPad Fn + spacebar).<br />
<br />
To prevent automatic lightning up just edit file {{ic|/usr/share/dbus-1/system.d/org.freedesktop.UPower.conf}} as follows (two occurrences of "deny"):<br />
<br />
{{hc|/usr/share/dbus-1/system.d/org.freedesktop.UPower.conf|<nowiki><br />
<?xml version="1.0" encoding="UTF-8"?> <!-- -*- XML -*- --><br />
<br />
<!DOCTYPE busconfig PUBLIC<br />
"-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"<br />
"http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd"><br />
<busconfig><br />
<!-- Only root can own the service --><br />
<policy user="root"><br />
<allow own="org.freedesktop.UPower"/><br />
</policy><br />
<policy context="default"><br />
<br />
<allow send_destination="org.freedesktop.UPower"<br />
send_interface="org.freedesktop.DBus.Introspectable"/><br />
<br />
<allow send_destination="org.freedesktop.UPower"<br />
send_interface="org.freedesktop.DBus.Peer"/><br />
<allow send_destination="org.freedesktop.UPower"<br />
send_interface="org.freedesktop.DBus.Properties"/><br />
<allow send_destination="org.freedesktop.UPower.Device"<br />
send_interface="org.freedesktop.DBus.Properties"/><br />
<deny send_destination="org.freedesktop.UPower.KbdBacklight"<br />
send_interface="org.freedesktop.DBus.Properties"/><br />
<allow send_destination="org.freedesktop.UPower.Wakeups"<br />
send_interface="org.freedesktop.DBus.Properties"/><br />
<br />
<allow send_destination="org.freedesktop.UPower"<br />
send_interface="org.freedesktop.UPower"/><br />
<allow send_destination="org.freedesktop.UPower"<br />
send_interface="org.freedesktop.UPower.Device"/><br />
<deny send_destination="org.freedesktop.UPower"<br />
send_interface="org.freedesktop.UPower.KbdBacklight"/><br />
<allow send_destination="org.freedesktop.UPower"<br />
send_interface="org.freedesktop.UPower.Wakeups"/><br />
</policy><br />
</busconfig><br />
</nowiki>}}</div>Goetzchttps://wiki.archlinux.org/index.php?title=Talk:Lenovo_ThinkPad_X1_Carbon_(Gen_7)&diff=597805Talk:Lenovo ThinkPad X1 Carbon (Gen 7)2020-02-17T19:56:56Z<p>Goetzc: /* Volume Controls */ reword</p>
<hr />
<div>== <s>Touchpad with 5.4.x</s> ==<br />
With linux 5.4 touchpad stopped working on about 50% of bootups.<br />
With touchpad not working I'm getting following messages in dmesg.<br />
{{bc|1=<br />
[ 4.499490] i2c_designware i2c_designware.1: i2c_dw_handle_tx_abort: lost arbitration<br />
[ 5.518759] i2c_designware i2c_designware.1: controller timed out<br />
[ 5.519959] i2c_hid i2c-SYNA8005:00: failed to retrieve report from device.<br />
[ 5.521187] input: SYNA8005:00 06CB:CD8C Mouse as /devices/pci0000:00/0000:00:15.1/i2c_designware.1/i2c-9/i2c-SYNA8005:00/0018:06CB:CD8C.0001/input/input9<br />
[ 5.521337] input: SYNA8005:00 06CB:CD8C Touchpad as /devices/pci0000:00/0000:00:15.1/i2c_designware.1/i2c-9/i2c-SYNA8005:00/0018:06CB:CD8C.0001/input/input10<br />
[ 5.521442] hid-generic 0018:06CB:CD8C.0001: input,hidraw0: I2C HID v1.00 Mouse [SYNA8005:00 06CB:CD8C] on i2c-SYNA8005:00<br />
[ 6.585507] i2c_designware i2c_designware.1: controller timed out<br />
[ 6.585590] i2c_hid i2c-SYNA8005:00: failed to retrieve report from device.<br />
[ 6.585678] hid-multitouch 0018:06CB:CD8C.0001: failed to fetch feature 8<br />
[ 7.599201] i2c_designware i2c_designware.1: controller timed out<br />
[ 7.599319] i2c_hid i2c-SYNA8005:00: failed to retrieve report from device.<br />
[ 7.599385] hid-multitouch 0018:06CB:CD8C.0001: failed to fetch feature 8<br />
[ 8.612535] i2c_designware i2c_designware.1: controller timed out<br />
[ 8.612636] i2c_hid i2c-SYNA8005:00: failed to retrieve report from device.<br />
[ 8.612711] hid-multitouch 0018:06CB:CD8C.0001: failed to fetch feature 7<br />
[ 9.625537] i2c_designware i2c_designware.1: controller timed out<br />
[ 9.625642] i2c_hid i2c-SYNA8005:00: failed to retrieve report from device.<br />
[ 9.625873] input: SYNA8005:00 06CB:CD8C Mouse as /devices/pci0000:00/0000:00:15.1/i2c_designware.1/i2c-9/i2c-SYNA8005:00/0018:06CB:CD8C.0001/input/input19<br />
[ 9.626417] input: SYNA8005:00 06CB:CD8C Touchpad as /devices/pci0000:00/0000:00:15.1/i2c_designware.1/i2c-9/i2c-SYNA8005:00/0018:06CB:CD8C.0001/input/input20<br />
[ 9.627084] hid-multitouch 0018:06CB:CD8C.0001: input,hidraw0: I2C HID v1.00 Mouse [SYNA8005:00 06CB:CD8C] on i2c-SYNA8005:00<br />
[ 10.132275] kauditd_printk_skb: 15 callbacks suppressed'<br />
[ 10.639147] i2c_designware i2c_designware.1: controller timed out<br />
[ 10.639250] i2c_hid i2c-SYNA8005:00: failed to set a report to device.<br />
[ 11.652134] i2c_designware i2c_designware.1: controller timed out<br />
[ 11.652167] i2c_hid i2c-SYNA8005:00: failed to set a report to device.<br />
[ 12.668764] i2c_designware i2c_designware.1: controller timed out<br />
[ 12.668795] i2c_hid i2c-SYNA8005:00: failed to set a report to device.<br />
[ 13.678765] i2c_designware i2c_designware.1: controller timed out<br />
[ 14.692095] i2c_designware i2c_designware.1: controller timed out<br />
[ every second ...]<br />
[ 26.852160] i2c_designware i2c_designware.1: controller timed out<br />
}} [[User:Kubuxu|Kubuxu]] ([[User talk:Kubuxu|talk]]) 13:47, 16 December 2019 (UTC)<br />
: This might be totally unrelated, but I had both sleep and touchpad break the other day and temporarily fixed it with the snd_hda_intel.dmic_detect=0 kernel option (see [https://old.reddit.com/r/archlinux/comments/e5oe4p/systemctl_suspend_causes_freeze/?st=k49hi5rf&sh=0c42e7c9 this] [[User:Wrycode|wrycode]] ([[User talk:Wrycode|talk]]) 06:28, 17 December 2019 (UTC)<br />
: I have {{ic|snd_hda_intel}} blacklisted to make sure that SOF is used. So far I had one SOF related DSP crash but apart from that SOF seems fine. There is also touchpad firmware update I've applied, I will let you all now about the results. [[User:Kubuxu|Kubuxu]] ([[User talk:Kubuxu|talk]]) 12:11, 17 December 2019 (UTC)<br />
: After updating Touchpad firware (using {{ic|fwupdmgr}}) to 1.3.3013412 problem seems to be resolved. [[User:Kubuxu|Kubuxu]] ([[User talk:Kubuxu|talk]]) 12:43, 27 December 2019 (UTC)<br />
:: Confirmed here as well [[User:Wrycode|wrycode]] ([[User talk:Wrycode|talk]]) 02:42, 28 December 2019 (UTC)<br />
:: Did anyone experience issues with updating this firmware with {{ic|fwupdmgr}}? I continuously get {{ic|1=No upgrades for Touchpad: current version is 1.3.3013337: 1.3.3013337=same}}. I even tried to download the .cab file and use {{ic|fwupdmgr install}} and get {{ic|No supported devices found}} [[User:In0ni|In0ni]] ([[User talk:In0ni|talk]]) 00:20, 7 January 2020 (UTC)<br />
::: Seems like you have the latest update already. [[User:Wrycode|wrycode]] ([[User talk:Wrycode|talk]]) 18:18, 7 January 2020 (UTC)<br />
:::: Latest firmware should be 1.3.3013412 -- not 1.3.3013337. I'm having the issue this discussion is talking about which the latest version fixes. What version of the firmware did you update to? [[User:In0ni|In0ni]] ([[User talk:In0ni|talk]]) 04:19, 9 January 2020 (UTC)<br />
::::: Sorry, I assumed 1.3.3013412 and 1.3.3013337 were the same version or something (the version is listed as "PR3013337/PR3013412" in the Readme on Lenovo's site. I updated to 1.3.3013337 from 1.1.2949533 and my touchpad issues went away. But if you're still having issues with the touchpad then maybe it wasn't actually the firmware update that fixed it for me? I'm on kernel 5.4.8 and everything works except for the microphone. [[User:Wrycode|wrycode]] ([[User talk:Wrycode|talk]]) 04:38, 10 January 2020 (UTC)<br />
: Updated Wiki page with the info [[User:Kubuxu|Kubuxu]] ([[User talk:Kubuxu|talk]]) 17:38, 29 December 2019 (UTC)<br />
: Where are you getting the firmware? The only version I can find is an exe [[User:Mondoman712|Mondoman712]] ([[User talk:Mondoman712|talk]]) 14:07, 23 January 2020 (UTC)<br />
:: I'm using fwupdmgr [[User:Kubuxu|Kubuxu]] ([[User talk:Kubuxu|talk]]) 17:14, 23 January 2020 (UTC)<br />
::: The touchpad wasn't showing up for me there, but it wasn't working when I tried so I rebooted and then it appeared. [[User:Mondoman712|Mondoman712]] ([[User talk:Mondoman712|talk]]) 18:19, 23 January 2020 (UTC)<br />
<br />
== Microphone ==<br />
Did you get your microphone to work neither alsamixer or pavucontrol seem to detect a microphone. ? [[User:Nitrobay|Nitrobay]] ([[User talk:Nitrobay|talk]]) 11:38, 17 August 2019 (UTC)<br />
: I can confirm using [[Advanced_Linux_Sound_Architecture/Troubleshooting#Microphone|this test]], only externally connected microphones work. — [[User:goetzc|goetzc]] ([[User talk:goetzc|wanna talk?]]) 14:24, 17 August 2019 (UTC)<br />
: Looks like Linux kernel 5.3 will include the [https://thesofproject.github.io/latest/index.html SOF firmware update] with the fix for the microphone. — [[User:goetzc|goetzc]] ([[User talk:goetzc|wanna talk?]]) 14:25, 6 September 2019 (UTC)<br />
: After updating to Linux kernel 5.3.1 the microphone still does not work [[User:Moreka|Moreka]] ([[User talk:Moreka|talk]]) 17:30, 23 September 2019 (UTC) [[User:Moreka]] 17:30, 23 September 2019 (UTC)<br />
: I found a configuration that makes the microphones to work ;) but couldn't paste the instructions or a link to them. I created a forum post under Laptop Issues and titled [SOLVED] Fix for microphone on Lenovo X1 Gen 7 [[User:Alphazo|Alphazo]] ([[User talk:Alphazo|talk]]) 10:15, 13 October 2019 (UTC)<br />
: Like others, I wasn't able to get microphone working by following that guide. My results are identical to that of "Mocco" from that forum. Unless I'm misunderstanding the sidebar, I think we should flag microphone to "not working" for this page. [[User:Parth|Parth]] ([[User talk:Parth|talk]]) 23:54, 20 October 2019 (UTC)<br />
: I wasn't able to get microphone working by following that guide as well. I also think we should flag microphone to "not working" for this page. [[User:Moreka|Moreka]] 06:04, 22 October 2019 (UTC)<br />
: Managed to get it working following Alphazo's guide. There are a few typos however, I indicated the required fix in post #9. Hope it helps. [[User:Tbw|Tbw]] ([[User talk:Tbw|talk]]) 21:23, 22 October 2019 (UTC)<br />
: I'll give it another shot and report back [[User:Parth|Parth]] ([[User talk:Parth|talk]]) 17:17, 30 October 2019 (UTC)<br />
: I was able to make the microphone + sound playback work with following the Lenovo docx file and using the sof-hda-generic.tplg and sof-cnl.ri provided in the latest linux firmware package shipped with ubuntu (just download the package and copy the two files in the correct directories). Also the changes in /etc/pulse/default.pa are not necessary. [[User:moreka|moreka]] 17:08, 31 October 2019 (UTC)<br />
: With recent kernel the SOF was disabled [https://bugs.archlinux.org/task/63464]. Solution for me was to install linux-pf and disable CONFIG_SND_SOC_INTEL_SST, enable SOT. [[User:Kubuxu|Kubuxu]] ([[User talk:Kubuxu|talk]]) 14:12, 19 November 2019 (UTC)<br />
: Please test with [https://git.archlinux.org/svntogit/packages.git/log/trunk?h=packages/linux&id=d6bbb261bd2c8f83b9c93041dae9aa4175e20e6e linux 5.4.1-arch1] (in testing) and [https://www.archlinux.org/packages/extra/any/sof-firmware/ sof-firmware] (new). SOF is re-enabled except on Broadwell/Baytrail platforms. [[User:Dpward|Dpward]] ([[User talk:Dpward|talk]]) 17:42, 1 December 2019 (UTC)<br />
: I tested with the new kernel and sof-firmware package (from the Arch repositories). Doing the configs as in the docx file, the sound works well, but the microphone records sounds in a wrong way; it sounds as if it is slow-motion. [[User:moreka]] 15:16, 3 December 2019 (UTC)<br />
: I experienced the same issue like moreka after installing the current kernel (5.4.2.arch1-1) and sof-firmware (1.3.1-1) from the core repo. Also since sof is in use the speakers only provide stereo audio and not using the 4.0 channel profile. [[User:Bin101|Bin101]] ([[User talk:Bin101|talk]]) 19:09, 6 December 2019 (UTC)<br />
: When using {{pkg|sof-firmware}} version 1.4.1 (and latest kernel 5.4.2) the sound card doesn't get recognized at all. Reverting back to sof-firmware 1.3.1 makes the card work again, in the same way explained by users Moreka and Bin101. — [[User:goetzc|Götz]] ([[User talk:goetzc|wanna talk?]]) 13:33, 9 December 2019 (UTC)<br />
: Yeah a whole host of things broke for me in 5.4.2: hibernate, touchpad & sound all broke for me in 5.4.2. [[User:Parth|Parth]] ([[User talk:Parth|talk]]) 04:43, 10 December 2019 (UTC)<br />
: With 5.4.3 the Mic works with custom topology file {{ic|sof-hda-generic-4ch.tplg}}. The touchpad is broken on about 50% of bootups. I will start a new thread about it. [[User:Kubuxu|Kubuxu]] ([[User talk:Kubuxu|talk]]) 13:37, 16 December 2019 (UTC)<br />
: <s>I was (finally!) able to get the mic to work on a HP EliteBook x360 1030 G4, using kernel 5.4.1 and sof-firmware 1.3.1.</s> Spoke too soon. Not working after all. Details [https://bbs.archlinux.org/viewtopic.php?pid=1878341#p1878341 here]. [[User:Darose|Darose]] 21:18, 18 December 2019 (UTC)<br />
: Still problematic with kernel 5.5-rc6 (compiled myself). Just the two top speakers are firing (not the rear ones). Super annoying. The microphone works, though... Using sof-firmware 1.3 (from Arch repo) [[User:Moreka]] 14:18, 17 January 2020<br />
: For me, it was necessary, to add ''/etc/modprobe.d/alsa.conf'' containing {{ic|options snd slots&#61;,snd_usb_audio}}. [[User:Jaydoe|Jaydoe]] ([[User talk:Jaydoe|talk]]) 10:18, 9 February 2020 (UTC)<br />
: I got the microphone (and sound) working (but not both audio keys LEDs) following the [https://wiki.archlinux.org/index.php?title=Lenovo_ThinkPad_X1_Carbon_(Gen_7)&oldid=596943#Audio current edition] steps. Use latest repo kernel and sof-firmware, also revert any other configuration change you may have done in the past. — [[User:goetzc|Götz]] ([[User talk:goetzc|wanna talk?]]) 00:31, 11 February 2020 (UTC)<br />
:: The kb-light.py script from https://wiki.archlinux.org/index.php/Keyboard_backlight works for the keyboard backlight. [[User:Wrycode|wrycode]] ([[User talk:Wrycode|talk]]) 18:12, 16 February 2020 (UTC)<br />
::: Thanks for you suggestion Wrycode, I meant both audio/sound keys LEDs are not working (just corrected it), not the whole keyboard backlight :) — [[User:goetzc|Götz]] ([[User talk:goetzc|wanna talk?]]) 19:12, 16 February 2020 (UTC)<br />
<br />
== Volume Controls ==<br />
<br />
The section [[Lenovo_ThinkPad_X1_Carbon_(Gen_7)#Volume_Controls|Volume Controls]] fixes the quite/loud volume control, but seems <s>to disable</s> (they are already disabled) the two top-firing speakers, only the two bottom-firing sub-woofers are enabled. --[[User:Goetzc|Goetzc]] ([[User talk:Goetzc|talk]]) 17:12, 9 August 2019 (UTC)<br />
: So this seems to fix the volume control indeed, but the top-firing speakers were already and are still muted, might be a driver bug, but a workaround from another Dolby Atmos laptop might work here. --[[User:Goetzc|Goetzc]] ([[User talk:Goetzc|talk]]) 17:32, 9 August 2019 (UTC)<br />
:: Did you remember to run alsamixer from {{Pkg|alsa-utils}} after installation and turn on/equalize all of the speakers? Mine (top and bottom) are working fine. [[User:Wrycode|wrycode]] ([[User talk:Wrycode|talk]]) 03:54, 13 August 2019 (UTC)<br />
::: You are correct Wrycode, thanks! The "''Master''" volume was low, rising it to 100% makes the top speakers work as expected :) Will add this to the section. <br />
::: Do you happen to know how to make this change (setting the "''Element Master''") so that it's not done on the system {{ic|analog-output.conf.common}} file, and thus the change survives when PulseAudio package is updated? — [[User:goetzc|goetzc]] ([[User talk:goetzc|wanna talk?]])<br />
:::: I did some digging around and I can't find a way to do this. Pulseaudio might not have a user config option for the alsa paths in /usr/. Added the NoUpgrade workaround on the main page. [[User:Wrycode|wrycode]] ([[User talk:Wrycode|talk]]) 02:05, 20 August 2019 (UTC)<br />
<br />
:There is [https://askubuntu.com/a/988993/509340 this interesting] method, which uses 'hdajackretask' from the {{pkg|alsa-tools}} package to remap some pins. The comment is for a different laptop (Asus UX550 using Realtek ALC295), but it exhibits the same issue. We would need to determine the correct pins for this hardware (Realtek ALC285), don't know how, though. — [[User:goetzc|goetzc]] ([[User talk:goetzc|wanna talk?]]) 19:08, 25 August 2019 (UTC)<br />
<br />
I turned on all the speakers with alsamixer from {{Pkg|alsa-utils}} and tried "''Analog Stereo Output''" and "''Analog Surround 4.0 Output''" with {{Pkg|pavucontrol}} but none of these configurations gives a reasonable result. The former makes the front speakers much louder than the rear ones and the latter makes the front speakers silent, testing them with:<br />
<br />
# speaker-test -c4 -l1 -twav<br />
<br />
I was able to compare the sound quality on Windows and it is clear that the bass sound is clearly missing. Is it similar for you or am I missing something ? [[User:Thenitronos|Thenitronos]] ([[User talk:Thenitronos|talk]]) 00:07, 1 February 2020 (UTC)<br />
:This is a new issue, I'm experiencing it too. [[User:Wrycode|wrycode]] ([[User talk:Wrycode|talk]]) 01:29, 1 February 2020 (UTC)<br />
:: I had the same issue with Linux kernel 5.4, but with kernel 5.3 it works (you can get it from the [[Arch Linux Archive]]) when following the [[Lenovo ThinkPad X1 Carbon (Gen 7)#Volume controls|Volume controls]] section (editing the {{ic|analog-output.conf.common}} file). I hope that [https://kernelnewbies.org/LinuxChanges#Linux_5.5.Audio 5.5] fixes this, haven't tried yet. — [[User:goetzc|Götz]] ([[User talk:goetzc|wanna talk?]]) 17:15, 1 February 2020 (UTC)<br />
:: It is also possible to set the 4.0 sound profile with {{ic|pactl set-card-profile alsa_card.pci-0000_00_1f.3 output:analog-surround-40}}, not sure if all Carbon 7th Gen use the same identifier, but that's the idea. — [[User:goetzc|Götz]] ([[User talk:goetzc|wanna talk?]])<br />
<br />
I tested the volume control section today and I can confirm it's not working. Only the bottom facing speakers fire resulting in no bass or midrange. The microphone does work well. There is some discussion of this in the following <br />
[https://gist.github.com/hamidzr/dd81e429dc86f4327ded7a2030e7d7d9 Gist.] [[User:Hackerman|Hackerman]] ([[User talk:Hackerman|talk]]) 19:05, 10 February 2020 (UTC)<br />
: Oh, that Gist is a very big configuration change! I have all four mics and four speakers working nicely (but not both audio keys LEDs) following the steps added by [[user:VictorTrac]], check out the [https://wiki.archlinux.org/index.php?title=Lenovo_ThinkPad_X1_Carbon_(Gen_7)&oldid=596943#Audio current edition]. Use latest repo kernel and sof-firmware, also revert any other configuration change you may have done in the past. — [[User:goetzc|Götz]] ([[User talk:goetzc|wanna talk?]])<br />
:: That was it! Thank you! I needed to mute the speaker channel. I'm glad to have a working array microphone. [[User:Hackerman|Hackerman]] ([[User talk:Hackerman|talk]]) 02:30, 11 February 2020 (UTC)<br />
<br />
== Screen Brightness Function Keys ==<br />
<br />
Is anyone having issues getting the screen brightness function keys working? I had to install [[acpid]] and setup ACPI events and actions to handle it, along with installing the {{Pkg|acpilight}} package. <br />
<br />
My events:<br />
<br />
/etc/acpi/events/FnF5-brightnessdown<br />
# video/brightnessdown BRTDN 00000087 00000000<br />
event=video/brightnessdown<br />
action=xbacklight -dec 3<br />
<br />
/etc/acpi/events/FnF6-brightnessup<br />
# video/brightnessup BRTUP 00000086 00000000<br />
event=video/brightnessup<br />
action=xbacklight -inc 3<br />
<br />
xev doesn't recognise the brightness function keys, so I can't handle the key presses with my window manager. At least that is what I believe, please correct me if I have this all wrong. <br />
[[User:Raybangs|Raybangs]] ([[User talk:Raybangs|talk]]) 10:16, 23 August 2019 (UTC)<br />
<br />
:I didn't have to go through that to get screen brightness going. Can you tell me more about your setup? I'm using Plasma and my brightness controls worked out of the box. [[User:Johncrist1988|Johncrist1988]] ([[User talk:Johncrist1988|talk]]) 14:16, 23 August 2019 (UTC)<br />
<br />
:It works for me also, using {{pkg|brightnessctl}} (as root) or {{pkg|light}} on [[Sway]] or Plasma. — [[User:goetzc|goetzc]] ([[User talk:goetzc|wanna talk?]]) 18:50, 25 August 2019 (UTC)<br />
<br />
:Interesting. I'm using a pretty simple base Arch install with AwesomeWM. I will try {{pkg|brightnessctl}} and see how that goes. {{Unsigned|21:25, 3 September 2019 (UTC)|Raybangs}}<br />
<br />
== UEFI BIOS Update ==<br />
<br />
Currently UEFI BIOS seems to be at [https://pcsupport.lenovo.com/hn/en/products/LAPTOPS-AND-NETBOOKS/THINKPAD-X-SERIES-LAPTOPS/THINKPAD-X1-CARBON-7TH-GEN-TYPE-20QD-20QE/downloads/DS540232 version 1.16]. I am unable to find the .cab file in the link provided, on the [https://fwupd.org/lvfs/devicelist LVFS Device List], nor have had luck with web searches.<br />
<br />
I also followed instructions for [https://wiki.archlinux.org/index.php/Fwupd#Setup_for_UEFI_BIOS_upgrade | UEFI BIOS upgrade from fwupd] on the wiki. Has anyone succeeded in upgrading the firmware to the latest version on Linux? Would using the bootable iso on a USB from the first link work? According the the [https://download.lenovo.com/pccbbs/mobiles/n2hur06w.txt README] it should work (but hesitant to put the iso on USB). [[User:In0ni|In0ni]] ([[User talk:In0ni|talk]]) 22:34, 1 September 2019 (UTC)<br />
: Using the bootable iso on a USB should work fine (vs. a CD/DVD). However, I'm hesitant to upgrade because the 1.05 update is supposedly required before updating to the lates version: <br />
UEFI: ---- / ECP: 1.05<br />
- (Fix) Fixed an issue where system may hang in UEFI BIOS updating process.<br />
(Note) This package must be applied prior to n2hur04w or later package version.`<br />
:The cab files are not available yet. The only way to apply the updates (except for one that's available via fwupdmgr) is through the bootable ISO. I don't see any reason to update personally but if someone else does, please let us know how it goes. [[User:Wrycode|wrycode]] ([[User talk:Wrycode|talk]]) 20:09, 10 September 2019 (UTC)<br />
:: Just BTW for anyone else reading this, I updated via the bootable ISO and it didn't brick my device. Also, the .cab files for Linux are hidden in that link (if you click on the sorting menu, it appears to show only Windows updates but if you click on the categories the Linux files are hidden in there somewhere). [[User:Wrycode|wrycode]] ([[User talk:Wrycode|talk]]) 22:48, 17 December 2019 (UTC)<br />
::: I did upgrade it using {{ic|fwupdmgr install <file_name.cab>}}, after some specific version and restarts, the automatic updates did work using {{ic|fwupdmgr update}}. — [[User:goetzc|Götz]] ([[User talk:goetzc|wanna talk?]]) 21:52, 19 December 2019 (UTC)<br />
<br />
== <s>Why enable S3 sleep? </s>==<br />
<br />
Could someone add a small bit about why S3 sleep should be enabled? I have been using the default S0 sleep for a few weeks and don't see any issues with it. ~ [[User:Akvadrako|Akvadrako]] ([[User talk:Akvadrako|talk]]) 09:55, 10 September 2019 (UTC)<br />
:I was under the impression that S3 sleep is 'normal' sleep (everything powered off except for a trickle to the ram), but I'm not sure what modern Windows does instead. The S0 sleep state means "on", that is, the computer is not asleep, according to https://superuser.com/questions/71835/what-is-the-difference-between-these-four-sleep-states [[User:Wrycode|wrycode]] ([[User talk:Wrycode|talk]]) 04:43, 24 September 2019 (UTC)<br />
<br />
: Windows only supports S0 sleep and it’s the default, so I think it’s debatable what’s normal. But does that really matter? I’m interested in the practical difference. Maybe I’ll benchmark S3 sometime but for now I can say S0 uses about 0.5W and wakes up in about 1s. ~ [[User:Akvadrako|Akvadrako]] ([[User talk:Akvadrako|talk]]) 07:51, 24 September 2019 (UTC)<br />
:: S0 sleep isn't the traditional Suspend-to-RAM "sleep" that Linux users are expecting, that's what I meant by "normal". You are right that S0 is the default for Windows now. https://www.kernel.org/doc/Documentation/power/states.txt] has some details about the sleep states in Linux, and https://docs.microsoft.com/en-us/windows/win32/power/system-power-states has the same for Windows. It's a software-only idle, so it must use slightly more power than S3, where all components are shut down except for the ram. The Windows page claims that S0 wakes up faster than s3 (which would make sense). Another implication: Windows can do stuff after you close the laptop lid like download updates. Windows separately performs a suspend-to-disk whenever you close the lid, so if you remove the battery or the battery runs out your work will still be saved. It's possible Linux can do this too with S0. I just switched to the "Windows" sleep state from the BIOS to try it out and the wake time isn't noticeably different, but my laptop doesn't wake when I open the lid or press the power button. The only way to wake it up is to press the "Fn" key, very odd (especially because I remapped "Fn" to "Ctrl" from the BIOS, so I'm really pressing "Ctrl"). You're not seeing anything like this? [[User:Wrycode|wrycode]] ([[User talk:Wrycode|talk]]) 01:04, 16 October 2019 (UTC)<br />
<br />
:: Normally I do press the Fn button to wake, unless I'm using my external keyboard with AC, though it doesn't bother me. So it seems that and possibly some power savings are the advantages of S3. ~ [[User:Akvadrako|Akvadrako]] ([[User talk:Akvadrako|talk]]) 10:26, 16 October 2019 (UTC)<br />
<br />
== Different lspci output ==<br />
<br />
Can anyone check what's their lspci output? I have realised I am running with a completely different setup of the components myself:<br />
<br />
<div class="toccolours mw-collapsible mw-collapsed" style="width:400px; overflow:auto;"><br />
<div style="font-weight:bold;line-height:1.6;">{{ic|lspci}}</div><br />
<div class="mw-collapsible-content"><br />
{{bc|<br />
00:00.0 Host bridge: Intel Corporation Coffee Lake HOST and DRAM Controller (rev 0c)<br />
00:02.0 VGA compatible controller: Intel Corporation UHD Graphics 620 (Whiskey Lake) (rev 02)<br />
00:04.0 Signal processing controller: Intel Corporation Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor Thermal Subsystem (rev 0c)<br />
00:08.0 System peripheral: Intel Corporation Xeon E3-1200 v5/v6 / E3-1500 v5 / 6th/7th Gen Core Processor Gaussian Mixture Model<br />
00:12.0 Signal processing controller: Intel Corporation Cannon Point-LP Thermal Controller (rev 11)<br />
00:14.0 USB controller: Intel Corporation Cannon Point-LP USB 3.1 xHCI Controller (rev 11)<br />
00:14.2 RAM memory: Intel Corporation Cannon Point-LP Shared SRAM (rev 11)<br />
00:14.3 Network controller: Intel Corporation Cannon Point-LP CNVi [Wireless-AC] (rev 11)<br />
00:15.0 Serial bus controller [0c80]: Intel Corporation Cannon Point-LP Serial IO I2C Controller #0 (rev 11)<br />
00:15.1 Serial bus controller [0c80]: Intel Corporation Cannon Point-LP Serial IO I2C Controller #1 (rev 11)<br />
00:16.0 Communication controller: Intel Corporation Cannon Point-LP MEI Controller #1 (rev 11)<br />
00:1c.0 PCI bridge: Intel Corporation Cannon Point-LP PCI Express Root Port #1 (rev f1)<br />
00:1d.0 PCI bridge: Intel Corporation Cannon Point-LP PCI Express Root Port #9 (rev f1)<br />
00:1d.4 PCI bridge: Intel Corporation Cannon Point-LP PCI Express Root Port #13 (rev f1)<br />
00:1f.0 ISA bridge: Intel Corporation Cannon Point-LP LPC Controller (rev 11)<br />
00:1f.3 Audio device: Intel Corporation Cannon Point-LP High Definition Audio Controller (rev 11)<br />
00:1f.4 SMBus: Intel Corporation Cannon Point-LP SMBus Controller (rev 11)<br />
00:1f.5 Serial bus controller [0c80]: Intel Corporation Cannon Point-LP SPI Controller (rev 11)<br />
00:1f.6 Ethernet controller: Intel Corporation Ethernet Connection (6) I219-V (rev 11)<br />
02:00.0 Wireless controller [0d40]: Intel Corporation XMM7360 LTE Advanced Modem (rev 01)<br />
03:00.0 Non-Volatile memory controller: Sandisk Corp WD Black 2018/PC SN720 NVMe SSD<br />
05:00.0 PCI bridge: Intel Corporation JHL6540 Thunderbolt 3 Bridge (C step) [Alpine Ridge 4C 2016] (rev 02)<br />
06:00.0 PCI bridge: Intel Corporation JHL6540 Thunderbolt 3 Bridge (C step) [Alpine Ridge 4C 2016] (rev 02)<br />
06:01.0 PCI bridge: Intel Corporation JHL6540 Thunderbolt 3 Bridge (C step) [Alpine Ridge 4C 2016] (rev 02)<br />
06:02.0 PCI bridge: Intel Corporation JHL6540 Thunderbolt 3 Bridge (C step) [Alpine Ridge 4C 2016] (rev 02)<br />
06:04.0 PCI bridge: Intel Corporation JHL6540 Thunderbolt 3 Bridge (C step) [Alpine Ridge 4C 2016] (rev 02)<br />
07:00.0 System peripheral: Intel Corporation JHL6540 Thunderbolt 3 NHI (C step) [Alpine Ridge 4C 2016] (rev 02)<br />
2d:00.0 USB controller: Intel Corporation JHL6540 Thunderbolt 3 USB Controller (C step) [Alpine Ridge 4C 2016] (rev 02)<br />
}}<br />
</div></div><br />
<br />
Just in case, on e of the most relevant differences is that I'm not using Fibocom modem but rather the Intel XMM7360 LTE<br />
: Is the Intel XMM7360 LTE a stock configuration option? Have you gotten it to work with Linux? [[User:Wrycode|wrycode]] ([[User talk:Wrycode|talk]]) 05:48, 14 October 2019 (UTC)<br />
I don't have the same lspci output either. I'm in favor of removing that section. It takes up too much space and it's irrelevant/misleading. If we must, the other 6 X1C pages have something like this: <br />
# dmidecode -t system | grep Version<br />
Version: ThinkPad X1 Carbon 7th<br />
[[User:Wrycode|wrycode]] ([[User talk:Wrycode|talk]]) 04:59, 10 January 2020 (UTC)<br />
<br />
== Fibocom LTE now available! ==<br />
<br />
I just saw this [https://forums.lenovo.com/t5/Other-Linux-Discussions/How-To-Configure-X1-Carbon-Gen-7-on-Debian-FingerPrint-4G-Modem/td-p/4550327 Lenovo forum thread] which links to [https://github.com/abrasive/xmm7360 this tool] to flip the Fibocom into USB mode (which has a Linux driver). [[User:Wrycode|wrycode]] ([[User talk:Wrycode|talk]]) 02:49, 13 December 2019 (UTC)<br />
<br />
I did some initial testing but I need to wait for a new sim card to look deeper into this. <br />
* just install acpi_call from the official repositories<br />
* the https://github.com/abrasive/xmm7360 script works exactly as described. NOTE: the modem command interface accessible at /dev/ttyACM0 will be all kinds of broken if you have ModemManager running, so make sure to wait until you've enabled full functionality and unlocked the modem before starting ModemManager.service.<br />
* AT+GTUSBMODE=7 and AT+CFUN=15 work fine to get the modem working but first you have to issue the [https://github.com/abrasive/xmm7360#fcc-lock FCC Lock] commands.<br />
* Now you should be able to run modem-manager-gui and send and receive SMS messages<br />
* to get 4G data, separately configure a new "mobile broadband" GSM connection in Network Manager (you can just use nm-connection editor). I accepted all of the default settings, (including the "number"), except for putting my network's APN in.<br />
* Now the connection should be available to you in one of Network Manager's user interfaces. If you get an error when you select the connection like "device not available", see if /var/lib/NetworkManager/NetworkManager.state has WWANEnabled set to false; to change it you might have to mess around with /etc/NetworkManager/NetworkManager.conf or the nm-applet GUI<br />
* despite what the README says, the modem stayed accessible for me between suspends (but you have to re-run the script after a reboot) <br />
<br />
There's [https://github.com/juhovh/xmm7360_usb this alternative repository] which provides a kernel module for the modem that supposedly stays persistent between reboots. I think the author uses Debian so the makefile would have to be modified for building kernel modules on Arch. [[User:Wrycode|wrycode]] ([[User talk:Wrycode|talk]]) 21:43, 13 December 2019 (UTC)<br />
<br />
== Missing RTC device ==<br />
<br />
{{ic|hwlock --verbose}} returns:<br />
{{bc|<br />
hwclock from util-linux 2.34<br />
System Time: 1577636985.183322<br />
Trying to open: /dev/rtc0<br />
Trying to open: /dev/rtc<br />
Trying to open: /dev/misc/rtc<br />
No usable clock interface found.<br />
hwclock: Cannot access the Hardware Clock via any known method.<br />
}}<br />
<br />
Related messages from dmesg:<br />
{{bc|<br />
[ 0.764314] PM: RTC time: 15:54:28, date: 2019-12-29<br />
[ 1.438054] hctosys: unable to open rtc device (rtc0)<br />
}}<br />
Kernel 5.4.6.arch3-1<br />
[[User:Kubuxu|Kubuxu]] ([[User talk:Kubuxu|talk]]) 16:33, 29 December 2019 (UTC)<br />
: Probably a newer kernel bug because hwclock used to work but now I don't have an rtc device available in /dev/ [[User:Wrycode|wrycode]] ([[User talk:Wrycode|talk]]) 03:15, 16 January 2020 (UTC)<br />
<br />
== Incorrect ethernet dongle information? ==<br />
<br />
I believe the information in the sidebar about the native ethernet dongle has been incorrectly copied and pasted from a previous model, like it was for the [[Lenovo ThinkPad X1 Yoga (Gen 4)|X1Y4]]. Can an X1C7 owner confirm this? [[User:Andersk|Andersk]] ([[User talk:Andersk|talk]]) 06:26, 4 January 2020 (UTC)<br />
<br />
I can confirm that it works out of the box with no problems [[User:GH0S1|GH0S1]] ([[User talk:GH0S1|talk]]) 19:11, 5 January 2020 (UTC)<br />
<br />
But do you have [https://www3.lenovo.com/us/en/accessories-and-monitors/cables-and-adapters/adapters/CABLE-BO-TP-OneLink%2B-to-RJ45-Adapter/p/4X90K06975 the dongle that’s linked], as opposed to say [https://www.lenovo.com/us/en/accessories-and-monitors/cables-and-adapters/adapters/CABLE-BO-Ethernet-Extension-Adapter-2/p/4X90Q84427 this one]? All the pictures I can find suggest that the former is copied-and-pasted from previous models and won’t fit in the X1C7. [[User:Andersk|Andersk]] ([[User talk:Andersk|talk]]) 00:41, 6 January 2020 (UTC)<br />
<br />
You are right. I have the newer dongle. It doesn't look like the older and wider dongle would fit. [[User:GH0S1|GH0S1]] ([[User talk:GH0S1|talk]])<br />
<br />
Cool. Edited the link; feel free to make further edits. [[User:Andersk|Andersk]] ([[User talk:Andersk|talk]]) 01:06, 7 January 2020 (UTC)<br />
<br />
== Secondary IR webcam as a light sensor for automatic kbd backlight adjustment ==<br />
<br />
Some models of this laptop have a second IR [[webcam]] (originally to be used with Windows Hello) which is always uncovered by the privacy slider. I think it would be feasible to use this camera as a light sensor to automatically adjust the brightness of the keyboard's backlight. There are applications like {{aur|clight}} that adjust screen brightness by using the primary/normal webcam. Using {{ic|v4l2-ctl --list-devices}} shows there are six devices, {{ic|/dev/video{0,1,2,3} }} and {{ic|/dev/media{0,1} }}, for which only {{ic|video0}} shows data from the primary camera. Have any one got the IR camera to work? — [[User:goetzc|Götz]] ([[User talk:goetzc|wanna talk?]]) 23:53, 16 February 2020 (UTC)</div>Goetzchttps://wiki.archlinux.org/index.php?title=Talk:Lenovo_ThinkPad_X1_Carbon_(Gen_7)&diff=597744Talk:Lenovo ThinkPad X1 Carbon (Gen 7)2020-02-16T23:53:34Z<p>Goetzc: /* Secondary IR webcam as a light sensor for automatic kbd backlight adjustment */ new section</p>
<hr />
<div>== <s>Touchpad with 5.4.x</s> ==<br />
With linux 5.4 touchpad stopped working on about 50% of bootups.<br />
With touchpad not working I'm getting following messages in dmesg.<br />
{{bc|1=<br />
[ 4.499490] i2c_designware i2c_designware.1: i2c_dw_handle_tx_abort: lost arbitration<br />
[ 5.518759] i2c_designware i2c_designware.1: controller timed out<br />
[ 5.519959] i2c_hid i2c-SYNA8005:00: failed to retrieve report from device.<br />
[ 5.521187] input: SYNA8005:00 06CB:CD8C Mouse as /devices/pci0000:00/0000:00:15.1/i2c_designware.1/i2c-9/i2c-SYNA8005:00/0018:06CB:CD8C.0001/input/input9<br />
[ 5.521337] input: SYNA8005:00 06CB:CD8C Touchpad as /devices/pci0000:00/0000:00:15.1/i2c_designware.1/i2c-9/i2c-SYNA8005:00/0018:06CB:CD8C.0001/input/input10<br />
[ 5.521442] hid-generic 0018:06CB:CD8C.0001: input,hidraw0: I2C HID v1.00 Mouse [SYNA8005:00 06CB:CD8C] on i2c-SYNA8005:00<br />
[ 6.585507] i2c_designware i2c_designware.1: controller timed out<br />
[ 6.585590] i2c_hid i2c-SYNA8005:00: failed to retrieve report from device.<br />
[ 6.585678] hid-multitouch 0018:06CB:CD8C.0001: failed to fetch feature 8<br />
[ 7.599201] i2c_designware i2c_designware.1: controller timed out<br />
[ 7.599319] i2c_hid i2c-SYNA8005:00: failed to retrieve report from device.<br />
[ 7.599385] hid-multitouch 0018:06CB:CD8C.0001: failed to fetch feature 8<br />
[ 8.612535] i2c_designware i2c_designware.1: controller timed out<br />
[ 8.612636] i2c_hid i2c-SYNA8005:00: failed to retrieve report from device.<br />
[ 8.612711] hid-multitouch 0018:06CB:CD8C.0001: failed to fetch feature 7<br />
[ 9.625537] i2c_designware i2c_designware.1: controller timed out<br />
[ 9.625642] i2c_hid i2c-SYNA8005:00: failed to retrieve report from device.<br />
[ 9.625873] input: SYNA8005:00 06CB:CD8C Mouse as /devices/pci0000:00/0000:00:15.1/i2c_designware.1/i2c-9/i2c-SYNA8005:00/0018:06CB:CD8C.0001/input/input19<br />
[ 9.626417] input: SYNA8005:00 06CB:CD8C Touchpad as /devices/pci0000:00/0000:00:15.1/i2c_designware.1/i2c-9/i2c-SYNA8005:00/0018:06CB:CD8C.0001/input/input20<br />
[ 9.627084] hid-multitouch 0018:06CB:CD8C.0001: input,hidraw0: I2C HID v1.00 Mouse [SYNA8005:00 06CB:CD8C] on i2c-SYNA8005:00<br />
[ 10.132275] kauditd_printk_skb: 15 callbacks suppressed'<br />
[ 10.639147] i2c_designware i2c_designware.1: controller timed out<br />
[ 10.639250] i2c_hid i2c-SYNA8005:00: failed to set a report to device.<br />
[ 11.652134] i2c_designware i2c_designware.1: controller timed out<br />
[ 11.652167] i2c_hid i2c-SYNA8005:00: failed to set a report to device.<br />
[ 12.668764] i2c_designware i2c_designware.1: controller timed out<br />
[ 12.668795] i2c_hid i2c-SYNA8005:00: failed to set a report to device.<br />
[ 13.678765] i2c_designware i2c_designware.1: controller timed out<br />
[ 14.692095] i2c_designware i2c_designware.1: controller timed out<br />
[ every second ...]<br />
[ 26.852160] i2c_designware i2c_designware.1: controller timed out<br />
}} [[User:Kubuxu|Kubuxu]] ([[User talk:Kubuxu|talk]]) 13:47, 16 December 2019 (UTC)<br />
: This might be totally unrelated, but I had both sleep and touchpad break the other day and temporarily fixed it with the snd_hda_intel.dmic_detect=0 kernel option (see [https://old.reddit.com/r/archlinux/comments/e5oe4p/systemctl_suspend_causes_freeze/?st=k49hi5rf&sh=0c42e7c9 this] [[User:Wrycode|wrycode]] ([[User talk:Wrycode|talk]]) 06:28, 17 December 2019 (UTC)<br />
: I have {{ic|snd_hda_intel}} blacklisted to make sure that SOF is used. So far I had one SOF related DSP crash but apart from that SOF seems fine. There is also touchpad firmware update I've applied, I will let you all now about the results. [[User:Kubuxu|Kubuxu]] ([[User talk:Kubuxu|talk]]) 12:11, 17 December 2019 (UTC)<br />
: After updating Touchpad firware (using {{ic|fwupdmgr}}) to 1.3.3013412 problem seems to be resolved. [[User:Kubuxu|Kubuxu]] ([[User talk:Kubuxu|talk]]) 12:43, 27 December 2019 (UTC)<br />
:: Confirmed here as well [[User:Wrycode|wrycode]] ([[User talk:Wrycode|talk]]) 02:42, 28 December 2019 (UTC)<br />
:: Did anyone experience issues with updating this firmware with {{ic|fwupdmgr}}? I continuously get {{ic|1=No upgrades for Touchpad: current version is 1.3.3013337: 1.3.3013337=same}}. I even tried to download the .cab file and use {{ic|fwupdmgr install}} and get {{ic|No supported devices found}} [[User:In0ni|In0ni]] ([[User talk:In0ni|talk]]) 00:20, 7 January 2020 (UTC)<br />
::: Seems like you have the latest update already. [[User:Wrycode|wrycode]] ([[User talk:Wrycode|talk]]) 18:18, 7 January 2020 (UTC)<br />
:::: Latest firmware should be 1.3.3013412 -- not 1.3.3013337. I'm having the issue this discussion is talking about which the latest version fixes. What version of the firmware did you update to? [[User:In0ni|In0ni]] ([[User talk:In0ni|talk]]) 04:19, 9 January 2020 (UTC)<br />
::::: Sorry, I assumed 1.3.3013412 and 1.3.3013337 were the same version or something (the version is listed as "PR3013337/PR3013412" in the Readme on Lenovo's site. I updated to 1.3.3013337 from 1.1.2949533 and my touchpad issues went away. But if you're still having issues with the touchpad then maybe it wasn't actually the firmware update that fixed it for me? I'm on kernel 5.4.8 and everything works except for the microphone. [[User:Wrycode|wrycode]] ([[User talk:Wrycode|talk]]) 04:38, 10 January 2020 (UTC)<br />
: Updated Wiki page with the info [[User:Kubuxu|Kubuxu]] ([[User talk:Kubuxu|talk]]) 17:38, 29 December 2019 (UTC)<br />
: Where are you getting the firmware? The only version I can find is an exe [[User:Mondoman712|Mondoman712]] ([[User talk:Mondoman712|talk]]) 14:07, 23 January 2020 (UTC)<br />
:: I'm using fwupdmgr [[User:Kubuxu|Kubuxu]] ([[User talk:Kubuxu|talk]]) 17:14, 23 January 2020 (UTC)<br />
::: The touchpad wasn't showing up for me there, but it wasn't working when I tried so I rebooted and then it appeared. [[User:Mondoman712|Mondoman712]] ([[User talk:Mondoman712|talk]]) 18:19, 23 January 2020 (UTC)<br />
<br />
== Microphone ==<br />
Did you get your microphone to work neither alsamixer or pavucontrol seem to detect a microphone. ? [[User:Nitrobay|Nitrobay]] ([[User talk:Nitrobay|talk]]) 11:38, 17 August 2019 (UTC)<br />
: I can confirm using [[Advanced_Linux_Sound_Architecture/Troubleshooting#Microphone|this test]], only externally connected microphones work. — [[User:goetzc|goetzc]] ([[User talk:goetzc|wanna talk?]]) 14:24, 17 August 2019 (UTC)<br />
: Looks like Linux kernel 5.3 will include the [https://thesofproject.github.io/latest/index.html SOF firmware update] with the fix for the microphone. — [[User:goetzc|goetzc]] ([[User talk:goetzc|wanna talk?]]) 14:25, 6 September 2019 (UTC)<br />
: After updating to Linux kernel 5.3.1 the microphone still does not work [[User:Moreka|Moreka]] ([[User talk:Moreka|talk]]) 17:30, 23 September 2019 (UTC) [[User:Moreka]] 17:30, 23 September 2019 (UTC)<br />
: I found a configuration that makes the microphones to work ;) but couldn't paste the instructions or a link to them. I created a forum post under Laptop Issues and titled [SOLVED] Fix for microphone on Lenovo X1 Gen 7 [[User:Alphazo|Alphazo]] ([[User talk:Alphazo|talk]]) 10:15, 13 October 2019 (UTC)<br />
: Like others, I wasn't able to get microphone working by following that guide. My results are identical to that of "Mocco" from that forum. Unless I'm misunderstanding the sidebar, I think we should flag microphone to "not working" for this page. [[User:Parth|Parth]] ([[User talk:Parth|talk]]) 23:54, 20 October 2019 (UTC)<br />
: I wasn't able to get microphone working by following that guide as well. I also think we should flag microphone to "not working" for this page. [[User:Moreka|Moreka]] 06:04, 22 October 2019 (UTC)<br />
: Managed to get it working following Alphazo's guide. There are a few typos however, I indicated the required fix in post #9. Hope it helps. [[User:Tbw|Tbw]] ([[User talk:Tbw|talk]]) 21:23, 22 October 2019 (UTC)<br />
: I'll give it another shot and report back [[User:Parth|Parth]] ([[User talk:Parth|talk]]) 17:17, 30 October 2019 (UTC)<br />
: I was able to make the microphone + sound playback work with following the Lenovo docx file and using the sof-hda-generic.tplg and sof-cnl.ri provided in the latest linux firmware package shipped with ubuntu (just download the package and copy the two files in the correct directories). Also the changes in /etc/pulse/default.pa are not necessary. [[User:moreka|moreka]] 17:08, 31 October 2019 (UTC)<br />
: With recent kernel the SOF was disabled [https://bugs.archlinux.org/task/63464]. Solution for me was to install linux-pf and disable CONFIG_SND_SOC_INTEL_SST, enable SOT. [[User:Kubuxu|Kubuxu]] ([[User talk:Kubuxu|talk]]) 14:12, 19 November 2019 (UTC)<br />
: Please test with [https://git.archlinux.org/svntogit/packages.git/log/trunk?h=packages/linux&id=d6bbb261bd2c8f83b9c93041dae9aa4175e20e6e linux 5.4.1-arch1] (in testing) and [https://www.archlinux.org/packages/extra/any/sof-firmware/ sof-firmware] (new). SOF is re-enabled except on Broadwell/Baytrail platforms. [[User:Dpward|Dpward]] ([[User talk:Dpward|talk]]) 17:42, 1 December 2019 (UTC)<br />
: I tested with the new kernel and sof-firmware package (from the Arch repositories). Doing the configs as in the docx file, the sound works well, but the microphone records sounds in a wrong way; it sounds as if it is slow-motion. [[User:moreka]] 15:16, 3 December 2019 (UTC)<br />
: I experienced the same issue like moreka after installing the current kernel (5.4.2.arch1-1) and sof-firmware (1.3.1-1) from the core repo. Also since sof is in use the speakers only provide stereo audio and not using the 4.0 channel profile. [[User:Bin101|Bin101]] ([[User talk:Bin101|talk]]) 19:09, 6 December 2019 (UTC)<br />
: When using {{pkg|sof-firmware}} version 1.4.1 (and latest kernel 5.4.2) the sound card doesn't get recognized at all. Reverting back to sof-firmware 1.3.1 makes the card work again, in the same way explained by users Moreka and Bin101. — [[User:goetzc|Götz]] ([[User talk:goetzc|wanna talk?]]) 13:33, 9 December 2019 (UTC)<br />
: Yeah a whole host of things broke for me in 5.4.2: hibernate, touchpad & sound all broke for me in 5.4.2. [[User:Parth|Parth]] ([[User talk:Parth|talk]]) 04:43, 10 December 2019 (UTC)<br />
: With 5.4.3 the Mic works with custom topology file {{ic|sof-hda-generic-4ch.tplg}}. The touchpad is broken on about 50% of bootups. I will start a new thread about it. [[User:Kubuxu|Kubuxu]] ([[User talk:Kubuxu|talk]]) 13:37, 16 December 2019 (UTC)<br />
: <s>I was (finally!) able to get the mic to work on a HP EliteBook x360 1030 G4, using kernel 5.4.1 and sof-firmware 1.3.1.</s> Spoke too soon. Not working after all. Details [https://bbs.archlinux.org/viewtopic.php?pid=1878341#p1878341 here]. [[User:Darose|Darose]] 21:18, 18 December 2019 (UTC)<br />
: Still problematic with kernel 5.5-rc6 (compiled myself). Just the two top speakers are firing (not the rear ones). Super annoying. The microphone works, though... Using sof-firmware 1.3 (from Arch repo) [[User:Moreka]] 14:18, 17 January 2020<br />
: For me, it was necessary, to add ''/etc/modprobe.d/alsa.conf'' containing {{ic|options snd slots&#61;,snd_usb_audio}}. [[User:Jaydoe|Jaydoe]] ([[User talk:Jaydoe|talk]]) 10:18, 9 February 2020 (UTC)<br />
: I got the microphone (and sound) working (but not both audio keys LEDs) following the [https://wiki.archlinux.org/index.php?title=Lenovo_ThinkPad_X1_Carbon_(Gen_7)&oldid=596943#Audio current edition] steps. Use latest repo kernel and sof-firmware, also revert any other configuration change you may have done in the past. — [[User:goetzc|Götz]] ([[User talk:goetzc|wanna talk?]]) 00:31, 11 February 2020 (UTC)<br />
:: The kb-light.py script from https://wiki.archlinux.org/index.php/Keyboard_backlight works for the keyboard backlight. [[User:Wrycode|wrycode]] ([[User talk:Wrycode|talk]]) 18:12, 16 February 2020 (UTC)<br />
::: Thanks for you suggestion Wrycode, I meant both audio/sound keys LEDs are not working (just corrected it), not the whole keyboard backlight :) — [[User:goetzc|Götz]] ([[User talk:goetzc|wanna talk?]]) 19:12, 16 February 2020 (UTC)<br />
<br />
== Volume Controls ==<br />
<br />
The section [[Lenovo_ThinkPad_X1_Carbon_(Gen_7)#Volume_Controls|Volume Controls]] fixes the quite/loud volume control, but seems <s>to disable</s> (they are already disabled) the two top-firing speakers, only the two bottom-firing sub-woofers are enabled. --[[User:Goetzc|Goetzc]] ([[User talk:Goetzc|talk]]) 17:12, 9 August 2019 (UTC)<br />
: So this seems to fix the volume control indeed, but the top-firing speakers were already and are still muted, might be a driver bug, but a workaround from another Dolby Atmos laptop might work here. --[[User:Goetzc|Goetzc]] ([[User talk:Goetzc|talk]]) 17:32, 9 August 2019 (UTC)<br />
:: Did you remember to run alsamixer from {{Pkg|alsa-utils}} after installation and turn on/equalize all of the speakers? Mine (top and bottom) are working fine. [[User:Wrycode|wrycode]] ([[User talk:Wrycode|talk]]) 03:54, 13 August 2019 (UTC)<br />
::: You are correct Wrycode, thanks! The "''Master''" volume was low, rising it to 100% makes the top speakers work as expected :) Will add this to the section. <br />
::: Do you happen to know how to make this change (setting the "''Element Master''") so that it's not done on the system {{ic|analog-output.conf.common}} file, and thus the change survives when PulseAudio package is updated? — [[User:goetzc|goetzc]] ([[User talk:goetzc|wanna talk?]])<br />
:::: I did some digging around and I can't find a way to do this. Pulseaudio might not have a user config option for the alsa paths in /usr/. Added the NoUpgrade workaround on the main page. [[User:Wrycode|wrycode]] ([[User talk:Wrycode|talk]]) 02:05, 20 August 2019 (UTC)<br />
<br />
:There is [https://askubuntu.com/a/988993/509340 this interesting] method, which uses 'hdajackretask' from the {{pkg|alsa-tools}} package to remap some pins. The comment is for a different laptop (Asus UX550 using Realtek ALC295), but it exhibits the same issue. We would need to determine the correct pins for this hardware (Realtek ALC285), don't know how, though. — [[User:goetzc|goetzc]] ([[User talk:goetzc|wanna talk?]]) 19:08, 25 August 2019 (UTC)<br />
<br />
I turned on all the speakers with alsamixer from {{Pkg|alsa-utils}} and tried "''Analog Stereo Output''" and "''Analog Surround 4.0 Output''" with {{Pkg|pavucontrol}} but none of these configurations gives a reasonable result. The former makes the front speakers much louder than the rear ones and the latter makes the front speakers silent, testing them with:<br />
<br />
# speaker-test -c4 -l1 -twav<br />
<br />
I was able to compare the sound quality on Windows and it is clear that the bass sound is clearly missing. Is it similar for you or am I missing something ? [[User:Thenitronos|Thenitronos]] ([[User talk:Thenitronos|talk]]) 00:07, 1 February 2020 (UTC)<br />
:This is a new issue, I'm experiencing it too. [[User:Wrycode|wrycode]] ([[User talk:Wrycode|talk]]) 01:29, 1 February 2020 (UTC)<br />
:: I had the same issue with Linux kernel 5.4, but with kernel 5.3 it works (you can get it from the [[Arch Linux Archive]]) when following the [[Lenovo ThinkPad X1 Carbon (Gen 7)#Volume controls|Volume controls]] section (editing the {{ic|analog-output.conf.common}} file). I hope that [https://kernelnewbies.org/LinuxChanges#Linux_5.5.Audio 5.5] fixes this, haven't tried yet. — [[User:goetzc|Götz]] ([[User talk:goetzc|wanna talk?]]) 17:15, 1 February 2020 (UTC)<br />
:: It is also possible to set the 4.0 sound profile with {{ic|pactl set-card-profile alsa_card.pci-0000_00_1f.3 output:analog-surround-40}}, not sure if all Carbon 7th Gen use the same identifier, but that's the idea. — [[User:goetzc|Götz]] ([[User talk:goetzc|wanna talk?]])<br />
<br />
I tested the volume control section today and I can confirm it's not working. Only the bottom facing speakers fire resulting in no bass or midrange. The microphone does work well. There is some discussion of this in the following <br />
[https://gist.github.com/hamidzr/dd81e429dc86f4327ded7a2030e7d7d9 Gist.] [[User:Hackerman|Hackerman]] ([[User talk:Hackerman|talk]]) 19:05, 10 February 2020 (UTC)<br />
: Oh, that Gist is a very big configuration change! I have all four mics and four speakers working nicely (but not the kbd lights!) following the steps added by [[user:VictorTrac]], check out the [https://wiki.archlinux.org/index.php?title=Lenovo_ThinkPad_X1_Carbon_(Gen_7)&oldid=596943#Audio current edition]. Use latest repo kernel and sof-firmware, also revert any other configuration change you may have done in the past. — [[User:goetzc|Götz]] ([[User talk:goetzc|wanna talk?]])<br />
:: That was it! Thank you! I needed to mute the speaker channel. I'm glad to have a working array microphone. [[User:Hackerman|Hackerman]] ([[User talk:Hackerman|talk]]) 02:30, 11 February 2020 (UTC)<br />
<br />
== Screen Brightness Function Keys ==<br />
<br />
Is anyone having issues getting the screen brightness function keys working? I had to install [[acpid]] and setup ACPI events and actions to handle it, along with installing the {{Pkg|acpilight}} package. <br />
<br />
My events:<br />
<br />
/etc/acpi/events/FnF5-brightnessdown<br />
# video/brightnessdown BRTDN 00000087 00000000<br />
event=video/brightnessdown<br />
action=xbacklight -dec 3<br />
<br />
/etc/acpi/events/FnF6-brightnessup<br />
# video/brightnessup BRTUP 00000086 00000000<br />
event=video/brightnessup<br />
action=xbacklight -inc 3<br />
<br />
xev doesn't recognise the brightness function keys, so I can't handle the key presses with my window manager. At least that is what I believe, please correct me if I have this all wrong. <br />
[[User:Raybangs|Raybangs]] ([[User talk:Raybangs|talk]]) 10:16, 23 August 2019 (UTC)<br />
<br />
:I didn't have to go through that to get screen brightness going. Can you tell me more about your setup? I'm using Plasma and my brightness controls worked out of the box. [[User:Johncrist1988|Johncrist1988]] ([[User talk:Johncrist1988|talk]]) 14:16, 23 August 2019 (UTC)<br />
<br />
:It works for me also, using {{pkg|brightnessctl}} (as root) or {{pkg|light}} on [[Sway]] or Plasma. — [[User:goetzc|goetzc]] ([[User talk:goetzc|wanna talk?]]) 18:50, 25 August 2019 (UTC)<br />
<br />
:Interesting. I'm using a pretty simple base Arch install with AwesomeWM. I will try {{pkg|brightnessctl}} and see how that goes. {{Unsigned|21:25, 3 September 2019 (UTC)|Raybangs}}<br />
<br />
== UEFI BIOS Update ==<br />
<br />
Currently UEFI BIOS seems to be at [https://pcsupport.lenovo.com/hn/en/products/LAPTOPS-AND-NETBOOKS/THINKPAD-X-SERIES-LAPTOPS/THINKPAD-X1-CARBON-7TH-GEN-TYPE-20QD-20QE/downloads/DS540232 version 1.16]. I am unable to find the .cab file in the link provided, on the [https://fwupd.org/lvfs/devicelist LVFS Device List], nor have had luck with web searches.<br />
<br />
I also followed instructions for [https://wiki.archlinux.org/index.php/Fwupd#Setup_for_UEFI_BIOS_upgrade | UEFI BIOS upgrade from fwupd] on the wiki. Has anyone succeeded in upgrading the firmware to the latest version on Linux? Would using the bootable iso on a USB from the first link work? According the the [https://download.lenovo.com/pccbbs/mobiles/n2hur06w.txt README] it should work (but hesitant to put the iso on USB). [[User:In0ni|In0ni]] ([[User talk:In0ni|talk]]) 22:34, 1 September 2019 (UTC)<br />
: Using the bootable iso on a USB should work fine (vs. a CD/DVD). However, I'm hesitant to upgrade because the 1.05 update is supposedly required before updating to the lates version: <br />
UEFI: ---- / ECP: 1.05<br />
- (Fix) Fixed an issue where system may hang in UEFI BIOS updating process.<br />
(Note) This package must be applied prior to n2hur04w or later package version.`<br />
:The cab files are not available yet. The only way to apply the updates (except for one that's available via fwupdmgr) is through the bootable ISO. I don't see any reason to update personally but if someone else does, please let us know how it goes. [[User:Wrycode|wrycode]] ([[User talk:Wrycode|talk]]) 20:09, 10 September 2019 (UTC)<br />
:: Just BTW for anyone else reading this, I updated via the bootable ISO and it didn't brick my device. Also, the .cab files for Linux are hidden in that link (if you click on the sorting menu, it appears to show only Windows updates but if you click on the categories the Linux files are hidden in there somewhere). [[User:Wrycode|wrycode]] ([[User talk:Wrycode|talk]]) 22:48, 17 December 2019 (UTC)<br />
::: I did upgrade it using {{ic|fwupdmgr install <file_name.cab>}}, after some specific version and restarts, the automatic updates did work using {{ic|fwupdmgr update}}. — [[User:goetzc|Götz]] ([[User talk:goetzc|wanna talk?]]) 21:52, 19 December 2019 (UTC)<br />
<br />
== <s>Why enable S3 sleep? </s>==<br />
<br />
Could someone add a small bit about why S3 sleep should be enabled? I have been using the default S0 sleep for a few weeks and don't see any issues with it. ~ [[User:Akvadrako|Akvadrako]] ([[User talk:Akvadrako|talk]]) 09:55, 10 September 2019 (UTC)<br />
:I was under the impression that S3 sleep is 'normal' sleep (everything powered off except for a trickle to the ram), but I'm not sure what modern Windows does instead. The S0 sleep state means "on", that is, the computer is not asleep, according to https://superuser.com/questions/71835/what-is-the-difference-between-these-four-sleep-states [[User:Wrycode|wrycode]] ([[User talk:Wrycode|talk]]) 04:43, 24 September 2019 (UTC)<br />
<br />
: Windows only supports S0 sleep and it’s the default, so I think it’s debatable what’s normal. But does that really matter? I’m interested in the practical difference. Maybe I’ll benchmark S3 sometime but for now I can say S0 uses about 0.5W and wakes up in about 1s. ~ [[User:Akvadrako|Akvadrako]] ([[User talk:Akvadrako|talk]]) 07:51, 24 September 2019 (UTC)<br />
:: S0 sleep isn't the traditional Suspend-to-RAM "sleep" that Linux users are expecting, that's what I meant by "normal". You are right that S0 is the default for Windows now. https://www.kernel.org/doc/Documentation/power/states.txt] has some details about the sleep states in Linux, and https://docs.microsoft.com/en-us/windows/win32/power/system-power-states has the same for Windows. It's a software-only idle, so it must use slightly more power than S3, where all components are shut down except for the ram. The Windows page claims that S0 wakes up faster than s3 (which would make sense). Another implication: Windows can do stuff after you close the laptop lid like download updates. Windows separately performs a suspend-to-disk whenever you close the lid, so if you remove the battery or the battery runs out your work will still be saved. It's possible Linux can do this too with S0. I just switched to the "Windows" sleep state from the BIOS to try it out and the wake time isn't noticeably different, but my laptop doesn't wake when I open the lid or press the power button. The only way to wake it up is to press the "Fn" key, very odd (especially because I remapped "Fn" to "Ctrl" from the BIOS, so I'm really pressing "Ctrl"). You're not seeing anything like this? [[User:Wrycode|wrycode]] ([[User talk:Wrycode|talk]]) 01:04, 16 October 2019 (UTC)<br />
<br />
:: Normally I do press the Fn button to wake, unless I'm using my external keyboard with AC, though it doesn't bother me. So it seems that and possibly some power savings are the advantages of S3. ~ [[User:Akvadrako|Akvadrako]] ([[User talk:Akvadrako|talk]]) 10:26, 16 October 2019 (UTC)<br />
<br />
== Different lspci output ==<br />
<br />
Can anyone check what's their lspci output? I have realised I am running with a completely different setup of the components myself:<br />
<br />
<div class="toccolours mw-collapsible mw-collapsed" style="width:400px; overflow:auto;"><br />
<div style="font-weight:bold;line-height:1.6;">{{ic|lspci}}</div><br />
<div class="mw-collapsible-content"><br />
{{bc|<br />
00:00.0 Host bridge: Intel Corporation Coffee Lake HOST and DRAM Controller (rev 0c)<br />
00:02.0 VGA compatible controller: Intel Corporation UHD Graphics 620 (Whiskey Lake) (rev 02)<br />
00:04.0 Signal processing controller: Intel Corporation Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor Thermal Subsystem (rev 0c)<br />
00:08.0 System peripheral: Intel Corporation Xeon E3-1200 v5/v6 / E3-1500 v5 / 6th/7th Gen Core Processor Gaussian Mixture Model<br />
00:12.0 Signal processing controller: Intel Corporation Cannon Point-LP Thermal Controller (rev 11)<br />
00:14.0 USB controller: Intel Corporation Cannon Point-LP USB 3.1 xHCI Controller (rev 11)<br />
00:14.2 RAM memory: Intel Corporation Cannon Point-LP Shared SRAM (rev 11)<br />
00:14.3 Network controller: Intel Corporation Cannon Point-LP CNVi [Wireless-AC] (rev 11)<br />
00:15.0 Serial bus controller [0c80]: Intel Corporation Cannon Point-LP Serial IO I2C Controller #0 (rev 11)<br />
00:15.1 Serial bus controller [0c80]: Intel Corporation Cannon Point-LP Serial IO I2C Controller #1 (rev 11)<br />
00:16.0 Communication controller: Intel Corporation Cannon Point-LP MEI Controller #1 (rev 11)<br />
00:1c.0 PCI bridge: Intel Corporation Cannon Point-LP PCI Express Root Port #1 (rev f1)<br />
00:1d.0 PCI bridge: Intel Corporation Cannon Point-LP PCI Express Root Port #9 (rev f1)<br />
00:1d.4 PCI bridge: Intel Corporation Cannon Point-LP PCI Express Root Port #13 (rev f1)<br />
00:1f.0 ISA bridge: Intel Corporation Cannon Point-LP LPC Controller (rev 11)<br />
00:1f.3 Audio device: Intel Corporation Cannon Point-LP High Definition Audio Controller (rev 11)<br />
00:1f.4 SMBus: Intel Corporation Cannon Point-LP SMBus Controller (rev 11)<br />
00:1f.5 Serial bus controller [0c80]: Intel Corporation Cannon Point-LP SPI Controller (rev 11)<br />
00:1f.6 Ethernet controller: Intel Corporation Ethernet Connection (6) I219-V (rev 11)<br />
02:00.0 Wireless controller [0d40]: Intel Corporation XMM7360 LTE Advanced Modem (rev 01)<br />
03:00.0 Non-Volatile memory controller: Sandisk Corp WD Black 2018/PC SN720 NVMe SSD<br />
05:00.0 PCI bridge: Intel Corporation JHL6540 Thunderbolt 3 Bridge (C step) [Alpine Ridge 4C 2016] (rev 02)<br />
06:00.0 PCI bridge: Intel Corporation JHL6540 Thunderbolt 3 Bridge (C step) [Alpine Ridge 4C 2016] (rev 02)<br />
06:01.0 PCI bridge: Intel Corporation JHL6540 Thunderbolt 3 Bridge (C step) [Alpine Ridge 4C 2016] (rev 02)<br />
06:02.0 PCI bridge: Intel Corporation JHL6540 Thunderbolt 3 Bridge (C step) [Alpine Ridge 4C 2016] (rev 02)<br />
06:04.0 PCI bridge: Intel Corporation JHL6540 Thunderbolt 3 Bridge (C step) [Alpine Ridge 4C 2016] (rev 02)<br />
07:00.0 System peripheral: Intel Corporation JHL6540 Thunderbolt 3 NHI (C step) [Alpine Ridge 4C 2016] (rev 02)<br />
2d:00.0 USB controller: Intel Corporation JHL6540 Thunderbolt 3 USB Controller (C step) [Alpine Ridge 4C 2016] (rev 02)<br />
}}<br />
</div></div><br />
<br />
Just in case, on e of the most relevant differences is that I'm not using Fibocom modem but rather the Intel XMM7360 LTE<br />
: Is the Intel XMM7360 LTE a stock configuration option? Have you gotten it to work with Linux? [[User:Wrycode|wrycode]] ([[User talk:Wrycode|talk]]) 05:48, 14 October 2019 (UTC)<br />
I don't have the same lspci output either. I'm in favor of removing that section. It takes up too much space and it's irrelevant/misleading. If we must, the other 6 X1C pages have something like this: <br />
# dmidecode -t system | grep Version<br />
Version: ThinkPad X1 Carbon 7th<br />
[[User:Wrycode|wrycode]] ([[User talk:Wrycode|talk]]) 04:59, 10 January 2020 (UTC)<br />
<br />
== Fibocom LTE now available! ==<br />
<br />
I just saw this [https://forums.lenovo.com/t5/Other-Linux-Discussions/How-To-Configure-X1-Carbon-Gen-7-on-Debian-FingerPrint-4G-Modem/td-p/4550327 Lenovo forum thread] which links to [https://github.com/abrasive/xmm7360 this tool] to flip the Fibocom into USB mode (which has a Linux driver). [[User:Wrycode|wrycode]] ([[User talk:Wrycode|talk]]) 02:49, 13 December 2019 (UTC)<br />
<br />
I did some initial testing but I need to wait for a new sim card to look deeper into this. <br />
* just install acpi_call from the official repositories<br />
* the https://github.com/abrasive/xmm7360 script works exactly as described. NOTE: the modem command interface accessible at /dev/ttyACM0 will be all kinds of broken if you have ModemManager running, so make sure to wait until you've enabled full functionality and unlocked the modem before starting ModemManager.service.<br />
* AT+GTUSBMODE=7 and AT+CFUN=15 work fine to get the modem working but first you have to issue the [https://github.com/abrasive/xmm7360#fcc-lock FCC Lock] commands.<br />
* Now you should be able to run modem-manager-gui and send and receive SMS messages<br />
* to get 4G data, separately configure a new "mobile broadband" GSM connection in Network Manager (you can just use nm-connection editor). I accepted all of the default settings, (including the "number"), except for putting my network's APN in.<br />
* Now the connection should be available to you in one of Network Manager's user interfaces. If you get an error when you select the connection like "device not available", see if /var/lib/NetworkManager/NetworkManager.state has WWANEnabled set to false; to change it you might have to mess around with /etc/NetworkManager/NetworkManager.conf or the nm-applet GUI<br />
* despite what the README says, the modem stayed accessible for me between suspends (but you have to re-run the script after a reboot) <br />
<br />
There's [https://github.com/juhovh/xmm7360_usb this alternative repository] which provides a kernel module for the modem that supposedly stays persistent between reboots. I think the author uses Debian so the makefile would have to be modified for building kernel modules on Arch. [[User:Wrycode|wrycode]] ([[User talk:Wrycode|talk]]) 21:43, 13 December 2019 (UTC)<br />
<br />
== Missing RTC device ==<br />
<br />
{{ic|hwlock --verbose}} returns:<br />
{{bc|<br />
hwclock from util-linux 2.34<br />
System Time: 1577636985.183322<br />
Trying to open: /dev/rtc0<br />
Trying to open: /dev/rtc<br />
Trying to open: /dev/misc/rtc<br />
No usable clock interface found.<br />
hwclock: Cannot access the Hardware Clock via any known method.<br />
}}<br />
<br />
Related messages from dmesg:<br />
{{bc|<br />
[ 0.764314] PM: RTC time: 15:54:28, date: 2019-12-29<br />
[ 1.438054] hctosys: unable to open rtc device (rtc0)<br />
}}<br />
Kernel 5.4.6.arch3-1<br />
[[User:Kubuxu|Kubuxu]] ([[User talk:Kubuxu|talk]]) 16:33, 29 December 2019 (UTC)<br />
: Probably a newer kernel bug because hwclock used to work but now I don't have an rtc device available in /dev/ [[User:Wrycode|wrycode]] ([[User talk:Wrycode|talk]]) 03:15, 16 January 2020 (UTC)<br />
<br />
== Incorrect ethernet dongle information? ==<br />
<br />
I believe the information in the sidebar about the native ethernet dongle has been incorrectly copied and pasted from a previous model, like it was for the [[Lenovo ThinkPad X1 Yoga (Gen 4)|X1Y4]]. Can an X1C7 owner confirm this? [[User:Andersk|Andersk]] ([[User talk:Andersk|talk]]) 06:26, 4 January 2020 (UTC)<br />
<br />
I can confirm that it works out of the box with no problems [[User:GH0S1|GH0S1]] ([[User talk:GH0S1|talk]]) 19:11, 5 January 2020 (UTC)<br />
<br />
But do you have [https://www3.lenovo.com/us/en/accessories-and-monitors/cables-and-adapters/adapters/CABLE-BO-TP-OneLink%2B-to-RJ45-Adapter/p/4X90K06975 the dongle that’s linked], as opposed to say [https://www.lenovo.com/us/en/accessories-and-monitors/cables-and-adapters/adapters/CABLE-BO-Ethernet-Extension-Adapter-2/p/4X90Q84427 this one]? All the pictures I can find suggest that the former is copied-and-pasted from previous models and won’t fit in the X1C7. [[User:Andersk|Andersk]] ([[User talk:Andersk|talk]]) 00:41, 6 January 2020 (UTC)<br />
<br />
You are right. I have the newer dongle. It doesn't look like the older and wider dongle would fit. [[User:GH0S1|GH0S1]] ([[User talk:GH0S1|talk]])<br />
<br />
Cool. Edited the link; feel free to make further edits. [[User:Andersk|Andersk]] ([[User talk:Andersk|talk]]) 01:06, 7 January 2020 (UTC)<br />
<br />
== Secondary IR webcam as a light sensor for automatic kbd backlight adjustment ==<br />
<br />
Some models of this laptop have a second IR [[webcam]] (originally to be used with Windows Hello) which is always uncovered by the privacy slider. I think it would be feasible to use this camera as a light sensor to automatically adjust the brightness of the keyboard's backlight. There are applications like {{aur|clight}} that adjust screen brightness by using the primary/normal webcam. Using {{ic|v4l2-ctl --list-devices}} shows there are six devices, {{ic|/dev/video{0,1,2,3} }} and {{ic|/dev/media{0,1} }}, for which only {{ic|video0}} shows data from the primary camera. Have any one got the IR camera to work? — [[User:goetzc|Götz]] ([[User talk:goetzc|wanna talk?]]) 23:53, 16 February 2020 (UTC)</div>Goetzchttps://wiki.archlinux.org/index.php?title=Keyboard_backlight&diff=597734Keyboard backlight2020-02-16T19:14:26Z<p>Goetzc: /* D-Bus */ minor edit</p>
<hr />
<div>[[Category:Keyboards]]<br />
[[ja:キーボードバックライト]]<br />
[[pt:Keyboard backlight]]<br />
There a various methods to control the ''keyboard backlight'' brightness level.<br />
<br />
== Any vendor ==<br />
<br />
There are a variety ways to manage the brightness level and different helpers tools to accomplish this, such as {{pkg|brightnessctl}} or {{pkg|light}}.<br />
<br />
The the {{ic|sys}} pseudo-file system exposes an interface to the keyboard backlight. The current brightness level can be get by reading {{ic|/sys/class/leds/tpacpi::kbd_backlight/brightness}}. For example to get the maximum brightness level:<br />
<br />
cat /sys/class/leds/tpacpi::kbd_backlight/max_brightness<br />
<br />
To set the brightness to 1:<br />
<br />
echo 1 | sudo tee /sys/class/leds/tpacpi::kbd_backlight/brightness<br />
<br />
When using {{ic|brightnessctl}} you can get a list of available brightness controls with {{ic|brightnessctl --list}}, then to show the kbd backlight information:<br />
<br />
brightnessctl --device='tpacpi::kbd_backlight' info<br />
<br />
This will show the absolute and relative current value and the maximum absolute value. To set a different value:<br />
<br />
brightnessctl --device='tpacpi::kbd_backlight' set 1 <br />
<br />
=== D-Bus ===<br />
<br />
You can control your computer keyboard backlight via the [[D-Bus]] interface. The benefits of using it are that no modification to device files is required and it is vendor agnostic.<br />
<br />
The following is an example implementation in Python 3. [[Install]] {{pkg|upower}} and {{pkg|python-dbus}} packages then place the following script in {{ic|/usr/local/bin/}} and make it executable. You can then map your keyboard shortcuts to run {{ic|/usr/local/bin/kb-light.py + x}} and {{ic|/usr/local/bin/kb-light.py - x}} to increase and decrease your keyboard backlight level by {{ic|x}} amounts.<br />
<br />
{{Tip|1=You should try with an x = 1 to determine the limits of the keyboard backlight levels}}<br />
<br />
{{hc|/usr/local/bin/kb-light.py|<nowiki><br />
#!/usr/bin/env python3<br />
<br />
import dbus<br />
import sys<br />
<br />
def kb_light_set(delta):<br />
bus = dbus.SystemBus()<br />
kbd_backlight_proxy = bus.get_object('org.freedesktop.UPower', '/org/freedesktop/UPower/KbdBacklight')<br />
kbd_backlight = dbus.Interface(kbd_backlight_proxy, 'org.freedesktop.UPower.KbdBacklight')<br />
<br />
current = kbd_backlight.GetBrightness()<br />
maximum = kbd_backlight.GetMaxBrightness()<br />
new = max(0, min(current + delta, maximum))<br />
<br />
if 0 <= new <= maximum:<br />
current = new<br />
kbd_backlight.SetBrightness(current)<br />
<br />
# Return current backlight level percentage<br />
return 100 * current / maximum<br />
<br />
if __name__ == '__main__':<br />
if len(sys.argv) == 2 or len(sys.argv) == 3:<br />
if sys.argv[1] == "--up" or sys.argv[1] == "+":<br />
if len(sys.argv) == 3:<br />
print(kb_light_set(int(sys.argv[2])))<br />
else:<br />
print(kb_light_set(17))<br />
elif sys.argv[1] == "--down" or sys.argv[1] == "-":<br />
if len(sys.argv) == 3:<br />
print(kb_light_set(-int(sys.argv[2])))<br />
else:<br />
print(kb_light_set(-17))<br />
else:<br />
print("Unknown argument:", sys.argv[1])<br />
else:<br />
print("Script takes one or two argument.", len(sys.argv) - 1, "arguments provided.")<br />
<br />
</nowiki><br />
}}<br />
<br />
Alternatively the following bash one-liner will set the backlight to the value specified in the ''argument'':<br />
<br />
{{bc|<nowiki><br />
setKeyboardLight () {<br />
dbus-send --system --type=method_call --dest="org.freedesktop.UPower" "/org/freedesktop/UPower/KbdBacklight" "org.freedesktop.UPower.KbdBacklight.SetBrightness" int32:$1 <br />
}</nowiki><br />
}}<br />
<br />
=== D-Bus control backlight in MATE environment ===<br />
<br />
{{Style|Informal and unclear description. No relevance to MATE.}}<br />
<br />
In case you use [[MATE]] environment you might get tired with repeated lighting keyboard backlight while logging in, unlocking screen or waking up dimmed display. Following setup prevent from automatic lighting up during any action. The only triggers remain plugging in the adapter and fresh boot. After that you can control keyboard backlight only via hotkeys (eg. ThinkPad Fn + spacebar).<br />
<br />
To prevent automatic lightning up just edit file {{ic|/usr/share/dbus-1/system.d/org.freedesktop.UPower.conf}} as follows (two occurrences of "deny"):<br />
<br />
{{hc|/usr/share/dbus-1/system.d/org.freedesktop.UPower.conf|<nowiki><br />
<?xml version="1.0" encoding="UTF-8"?> <!-- -*- XML -*- --><br />
<br />
<!DOCTYPE busconfig PUBLIC<br />
"-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"<br />
"http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd"><br />
<busconfig><br />
<!-- Only root can own the service --><br />
<policy user="root"><br />
<allow own="org.freedesktop.UPower"/><br />
</policy><br />
<policy context="default"><br />
<br />
<allow send_destination="org.freedesktop.UPower"<br />
send_interface="org.freedesktop.DBus.Introspectable"/><br />
<br />
<allow send_destination="org.freedesktop.UPower"<br />
send_interface="org.freedesktop.DBus.Peer"/><br />
<allow send_destination="org.freedesktop.UPower"<br />
send_interface="org.freedesktop.DBus.Properties"/><br />
<allow send_destination="org.freedesktop.UPower.Device"<br />
send_interface="org.freedesktop.DBus.Properties"/><br />
<deny send_destination="org.freedesktop.UPower.KbdBacklight"<br />
send_interface="org.freedesktop.DBus.Properties"/><br />
<allow send_destination="org.freedesktop.UPower.Wakeups"<br />
send_interface="org.freedesktop.DBus.Properties"/><br />
<br />
<allow send_destination="org.freedesktop.UPower"<br />
send_interface="org.freedesktop.UPower"/><br />
<allow send_destination="org.freedesktop.UPower"<br />
send_interface="org.freedesktop.UPower.Device"/><br />
<deny send_destination="org.freedesktop.UPower"<br />
send_interface="org.freedesktop.UPower.KbdBacklight"/><br />
<allow send_destination="org.freedesktop.UPower"<br />
send_interface="org.freedesktop.UPower.Wakeups"/><br />
</policy><br />
</busconfig><br />
</nowiki>}}</div>Goetzchttps://wiki.archlinux.org/index.php?title=Talk:Lenovo_ThinkPad_X1_Carbon_(Gen_7)&diff=597733Talk:Lenovo ThinkPad X1 Carbon (Gen 7)2020-02-16T19:13:23Z<p>Goetzc: /* Microphone */ response about kbd audio keys LEDs not working</p>
<hr />
<div>== <s>Touchpad with 5.4.x</s> ==<br />
With linux 5.4 touchpad stopped working on about 50% of bootups.<br />
With touchpad not working I'm getting following messages in dmesg.<br />
{{bc|1=<br />
[ 4.499490] i2c_designware i2c_designware.1: i2c_dw_handle_tx_abort: lost arbitration<br />
[ 5.518759] i2c_designware i2c_designware.1: controller timed out<br />
[ 5.519959] i2c_hid i2c-SYNA8005:00: failed to retrieve report from device.<br />
[ 5.521187] input: SYNA8005:00 06CB:CD8C Mouse as /devices/pci0000:00/0000:00:15.1/i2c_designware.1/i2c-9/i2c-SYNA8005:00/0018:06CB:CD8C.0001/input/input9<br />
[ 5.521337] input: SYNA8005:00 06CB:CD8C Touchpad as /devices/pci0000:00/0000:00:15.1/i2c_designware.1/i2c-9/i2c-SYNA8005:00/0018:06CB:CD8C.0001/input/input10<br />
[ 5.521442] hid-generic 0018:06CB:CD8C.0001: input,hidraw0: I2C HID v1.00 Mouse [SYNA8005:00 06CB:CD8C] on i2c-SYNA8005:00<br />
[ 6.585507] i2c_designware i2c_designware.1: controller timed out<br />
[ 6.585590] i2c_hid i2c-SYNA8005:00: failed to retrieve report from device.<br />
[ 6.585678] hid-multitouch 0018:06CB:CD8C.0001: failed to fetch feature 8<br />
[ 7.599201] i2c_designware i2c_designware.1: controller timed out<br />
[ 7.599319] i2c_hid i2c-SYNA8005:00: failed to retrieve report from device.<br />
[ 7.599385] hid-multitouch 0018:06CB:CD8C.0001: failed to fetch feature 8<br />
[ 8.612535] i2c_designware i2c_designware.1: controller timed out<br />
[ 8.612636] i2c_hid i2c-SYNA8005:00: failed to retrieve report from device.<br />
[ 8.612711] hid-multitouch 0018:06CB:CD8C.0001: failed to fetch feature 7<br />
[ 9.625537] i2c_designware i2c_designware.1: controller timed out<br />
[ 9.625642] i2c_hid i2c-SYNA8005:00: failed to retrieve report from device.<br />
[ 9.625873] input: SYNA8005:00 06CB:CD8C Mouse as /devices/pci0000:00/0000:00:15.1/i2c_designware.1/i2c-9/i2c-SYNA8005:00/0018:06CB:CD8C.0001/input/input19<br />
[ 9.626417] input: SYNA8005:00 06CB:CD8C Touchpad as /devices/pci0000:00/0000:00:15.1/i2c_designware.1/i2c-9/i2c-SYNA8005:00/0018:06CB:CD8C.0001/input/input20<br />
[ 9.627084] hid-multitouch 0018:06CB:CD8C.0001: input,hidraw0: I2C HID v1.00 Mouse [SYNA8005:00 06CB:CD8C] on i2c-SYNA8005:00<br />
[ 10.132275] kauditd_printk_skb: 15 callbacks suppressed'<br />
[ 10.639147] i2c_designware i2c_designware.1: controller timed out<br />
[ 10.639250] i2c_hid i2c-SYNA8005:00: failed to set a report to device.<br />
[ 11.652134] i2c_designware i2c_designware.1: controller timed out<br />
[ 11.652167] i2c_hid i2c-SYNA8005:00: failed to set a report to device.<br />
[ 12.668764] i2c_designware i2c_designware.1: controller timed out<br />
[ 12.668795] i2c_hid i2c-SYNA8005:00: failed to set a report to device.<br />
[ 13.678765] i2c_designware i2c_designware.1: controller timed out<br />
[ 14.692095] i2c_designware i2c_designware.1: controller timed out<br />
[ every second ...]<br />
[ 26.852160] i2c_designware i2c_designware.1: controller timed out<br />
}} [[User:Kubuxu|Kubuxu]] ([[User talk:Kubuxu|talk]]) 13:47, 16 December 2019 (UTC)<br />
: This might be totally unrelated, but I had both sleep and touchpad break the other day and temporarily fixed it with the snd_hda_intel.dmic_detect=0 kernel option (see [https://old.reddit.com/r/archlinux/comments/e5oe4p/systemctl_suspend_causes_freeze/?st=k49hi5rf&sh=0c42e7c9 this] [[User:Wrycode|wrycode]] ([[User talk:Wrycode|talk]]) 06:28, 17 December 2019 (UTC)<br />
: I have {{ic|snd_hda_intel}} blacklisted to make sure that SOF is used. So far I had one SOF related DSP crash but apart from that SOF seems fine. There is also touchpad firmware update I've applied, I will let you all now about the results. [[User:Kubuxu|Kubuxu]] ([[User talk:Kubuxu|talk]]) 12:11, 17 December 2019 (UTC)<br />
: After updating Touchpad firware (using {{ic|fwupdmgr}}) to 1.3.3013412 problem seems to be resolved. [[User:Kubuxu|Kubuxu]] ([[User talk:Kubuxu|talk]]) 12:43, 27 December 2019 (UTC)<br />
:: Confirmed here as well [[User:Wrycode|wrycode]] ([[User talk:Wrycode|talk]]) 02:42, 28 December 2019 (UTC)<br />
:: Did anyone experience issues with updating this firmware with {{ic|fwupdmgr}}? I continuously get {{ic|1=No upgrades for Touchpad: current version is 1.3.3013337: 1.3.3013337=same}}. I even tried to download the .cab file and use {{ic|fwupdmgr install}} and get {{ic|No supported devices found}} [[User:In0ni|In0ni]] ([[User talk:In0ni|talk]]) 00:20, 7 January 2020 (UTC)<br />
::: Seems like you have the latest update already. [[User:Wrycode|wrycode]] ([[User talk:Wrycode|talk]]) 18:18, 7 January 2020 (UTC)<br />
:::: Latest firmware should be 1.3.3013412 -- not 1.3.3013337. I'm having the issue this discussion is talking about which the latest version fixes. What version of the firmware did you update to? [[User:In0ni|In0ni]] ([[User talk:In0ni|talk]]) 04:19, 9 January 2020 (UTC)<br />
::::: Sorry, I assumed 1.3.3013412 and 1.3.3013337 were the same version or something (the version is listed as "PR3013337/PR3013412" in the Readme on Lenovo's site. I updated to 1.3.3013337 from 1.1.2949533 and my touchpad issues went away. But if you're still having issues with the touchpad then maybe it wasn't actually the firmware update that fixed it for me? I'm on kernel 5.4.8 and everything works except for the microphone. [[User:Wrycode|wrycode]] ([[User talk:Wrycode|talk]]) 04:38, 10 January 2020 (UTC)<br />
: Updated Wiki page with the info [[User:Kubuxu|Kubuxu]] ([[User talk:Kubuxu|talk]]) 17:38, 29 December 2019 (UTC)<br />
: Where are you getting the firmware? The only version I can find is an exe [[User:Mondoman712|Mondoman712]] ([[User talk:Mondoman712|talk]]) 14:07, 23 January 2020 (UTC)<br />
:: I'm using fwupdmgr [[User:Kubuxu|Kubuxu]] ([[User talk:Kubuxu|talk]]) 17:14, 23 January 2020 (UTC)<br />
::: The touchpad wasn't showing up for me there, but it wasn't working when I tried so I rebooted and then it appeared. [[User:Mondoman712|Mondoman712]] ([[User talk:Mondoman712|talk]]) 18:19, 23 January 2020 (UTC)<br />
<br />
== Microphone ==<br />
Did you get your microphone to work neither alsamixer or pavucontrol seem to detect a microphone. ? [[User:Nitrobay|Nitrobay]] ([[User talk:Nitrobay|talk]]) 11:38, 17 August 2019 (UTC)<br />
: I can confirm using [[Advanced_Linux_Sound_Architecture/Troubleshooting#Microphone|this test]], only externally connected microphones work. — [[User:goetzc|goetzc]] ([[User talk:goetzc|wanna talk?]]) 14:24, 17 August 2019 (UTC)<br />
: Looks like Linux kernel 5.3 will include the [https://thesofproject.github.io/latest/index.html SOF firmware update] with the fix for the microphone. — [[User:goetzc|goetzc]] ([[User talk:goetzc|wanna talk?]]) 14:25, 6 September 2019 (UTC)<br />
: After updating to Linux kernel 5.3.1 the microphone still does not work [[User:Moreka|Moreka]] ([[User talk:Moreka|talk]]) 17:30, 23 September 2019 (UTC) [[User:Moreka]] 17:30, 23 September 2019 (UTC)<br />
: I found a configuration that makes the microphones to work ;) but couldn't paste the instructions or a link to them. I created a forum post under Laptop Issues and titled [SOLVED] Fix for microphone on Lenovo X1 Gen 7 [[User:Alphazo|Alphazo]] ([[User talk:Alphazo|talk]]) 10:15, 13 October 2019 (UTC)<br />
: Like others, I wasn't able to get microphone working by following that guide. My results are identical to that of "Mocco" from that forum. Unless I'm misunderstanding the sidebar, I think we should flag microphone to "not working" for this page. [[User:Parth|Parth]] ([[User talk:Parth|talk]]) 23:54, 20 October 2019 (UTC)<br />
: I wasn't able to get microphone working by following that guide as well. I also think we should flag microphone to "not working" for this page. [[User:Moreka|Moreka]] 06:04, 22 October 2019 (UTC)<br />
: Managed to get it working following Alphazo's guide. There are a few typos however, I indicated the required fix in post #9. Hope it helps. [[User:Tbw|Tbw]] ([[User talk:Tbw|talk]]) 21:23, 22 October 2019 (UTC)<br />
: I'll give it another shot and report back [[User:Parth|Parth]] ([[User talk:Parth|talk]]) 17:17, 30 October 2019 (UTC)<br />
: I was able to make the microphone + sound playback work with following the Lenovo docx file and using the sof-hda-generic.tplg and sof-cnl.ri provided in the latest linux firmware package shipped with ubuntu (just download the package and copy the two files in the correct directories). Also the changes in /etc/pulse/default.pa are not necessary. [[User:moreka|moreka]] 17:08, 31 October 2019 (UTC)<br />
: With recent kernel the SOF was disabled [https://bugs.archlinux.org/task/63464]. Solution for me was to install linux-pf and disable CONFIG_SND_SOC_INTEL_SST, enable SOT. [[User:Kubuxu|Kubuxu]] ([[User talk:Kubuxu|talk]]) 14:12, 19 November 2019 (UTC)<br />
: Please test with [https://git.archlinux.org/svntogit/packages.git/log/trunk?h=packages/linux&id=d6bbb261bd2c8f83b9c93041dae9aa4175e20e6e linux 5.4.1-arch1] (in testing) and [https://www.archlinux.org/packages/extra/any/sof-firmware/ sof-firmware] (new). SOF is re-enabled except on Broadwell/Baytrail platforms. [[User:Dpward|Dpward]] ([[User talk:Dpward|talk]]) 17:42, 1 December 2019 (UTC)<br />
: I tested with the new kernel and sof-firmware package (from the Arch repositories). Doing the configs as in the docx file, the sound works well, but the microphone records sounds in a wrong way; it sounds as if it is slow-motion. [[User:moreka]] 15:16, 3 December 2019 (UTC)<br />
: I experienced the same issue like moreka after installing the current kernel (5.4.2.arch1-1) and sof-firmware (1.3.1-1) from the core repo. Also since sof is in use the speakers only provide stereo audio and not using the 4.0 channel profile. [[User:Bin101|Bin101]] ([[User talk:Bin101|talk]]) 19:09, 6 December 2019 (UTC)<br />
: When using {{pkg|sof-firmware}} version 1.4.1 (and latest kernel 5.4.2) the sound card doesn't get recognized at all. Reverting back to sof-firmware 1.3.1 makes the card work again, in the same way explained by users Moreka and Bin101. — [[User:goetzc|Götz]] ([[User talk:goetzc|wanna talk?]]) 13:33, 9 December 2019 (UTC)<br />
: Yeah a whole host of things broke for me in 5.4.2: hibernate, touchpad & sound all broke for me in 5.4.2. [[User:Parth|Parth]] ([[User talk:Parth|talk]]) 04:43, 10 December 2019 (UTC)<br />
: With 5.4.3 the Mic works with custom topology file {{ic|sof-hda-generic-4ch.tplg}}. The touchpad is broken on about 50% of bootups. I will start a new thread about it. [[User:Kubuxu|Kubuxu]] ([[User talk:Kubuxu|talk]]) 13:37, 16 December 2019 (UTC)<br />
: <s>I was (finally!) able to get the mic to work on a HP EliteBook x360 1030 G4, using kernel 5.4.1 and sof-firmware 1.3.1.</s> Spoke too soon. Not working after all. Details [https://bbs.archlinux.org/viewtopic.php?pid=1878341#p1878341 here]. [[User:Darose|Darose]] 21:18, 18 December 2019 (UTC)<br />
: Still problematic with kernel 5.5-rc6 (compiled myself). Just the two top speakers are firing (not the rear ones). Super annoying. The microphone works, though... Using sof-firmware 1.3 (from Arch repo) [[User:Moreka]] 14:18, 17 January 2020<br />
: For me, it was necessary, to add ''/etc/modprobe.d/alsa.conf'' containing {{ic|options snd slots&#61;,snd_usb_audio}}. [[User:Jaydoe|Jaydoe]] ([[User talk:Jaydoe|talk]]) 10:18, 9 February 2020 (UTC)<br />
: I got the microphone (and sound) working (but not both audio keys LEDs) following the [https://wiki.archlinux.org/index.php?title=Lenovo_ThinkPad_X1_Carbon_(Gen_7)&oldid=596943#Audio current edition] steps. Use latest repo kernel and sof-firmware, also revert any other configuration change you may have done in the past. — [[User:goetzc|Götz]] ([[User talk:goetzc|wanna talk?]]) 00:31, 11 February 2020 (UTC)<br />
:: The kb-light.py script from https://wiki.archlinux.org/index.php/Keyboard_backlight works for the keyboard backlight. [[User:Wrycode|wrycode]] ([[User talk:Wrycode|talk]]) 18:12, 16 February 2020 (UTC)<br />
::: Thanks for you suggestion Wrycode, I meant both audio/sound keys LEDs are not working (just corrected it), not the whole keyboard backlight :) — [[User:goetzc|Götz]] ([[User talk:goetzc|wanna talk?]]) 19:12, 16 February 2020 (UTC)<br />
<br />
== Volume Controls ==<br />
<br />
The section [[Lenovo_ThinkPad_X1_Carbon_(Gen_7)#Volume_Controls|Volume Controls]] fixes the quite/loud volume control, but seems <s>to disable</s> (they are already disabled) the two top-firing speakers, only the two bottom-firing sub-woofers are enabled. --[[User:Goetzc|Goetzc]] ([[User talk:Goetzc|talk]]) 17:12, 9 August 2019 (UTC)<br />
: So this seems to fix the volume control indeed, but the top-firing speakers were already and are still muted, might be a driver bug, but a workaround from another Dolby Atmos laptop might work here. --[[User:Goetzc|Goetzc]] ([[User talk:Goetzc|talk]]) 17:32, 9 August 2019 (UTC)<br />
:: Did you remember to run alsamixer from {{Pkg|alsa-utils}} after installation and turn on/equalize all of the speakers? Mine (top and bottom) are working fine. [[User:Wrycode|wrycode]] ([[User talk:Wrycode|talk]]) 03:54, 13 August 2019 (UTC)<br />
::: You are correct Wrycode, thanks! The "''Master''" volume was low, rising it to 100% makes the top speakers work as expected :) Will add this to the section. <br />
::: Do you happen to know how to make this change (setting the "''Element Master''") so that it's not done on the system {{ic|analog-output.conf.common}} file, and thus the change survives when PulseAudio package is updated? — [[User:goetzc|goetzc]] ([[User talk:goetzc|wanna talk?]])<br />
:::: I did some digging around and I can't find a way to do this. Pulseaudio might not have a user config option for the alsa paths in /usr/. Added the NoUpgrade workaround on the main page. [[User:Wrycode|wrycode]] ([[User talk:Wrycode|talk]]) 02:05, 20 August 2019 (UTC)<br />
<br />
:There is [https://askubuntu.com/a/988993/509340 this interesting] method, which uses 'hdajackretask' from the {{pkg|alsa-tools}} package to remap some pins. The comment is for a different laptop (Asus UX550 using Realtek ALC295), but it exhibits the same issue. We would need to determine the correct pins for this hardware (Realtek ALC285), don't know how, though. — [[User:goetzc|goetzc]] ([[User talk:goetzc|wanna talk?]]) 19:08, 25 August 2019 (UTC)<br />
<br />
I turned on all the speakers with alsamixer from {{Pkg|alsa-utils}} and tried "''Analog Stereo Output''" and "''Analog Surround 4.0 Output''" with {{Pkg|pavucontrol}} but none of these configurations gives a reasonable result. The former makes the front speakers much louder than the rear ones and the latter makes the front speakers silent, testing them with:<br />
<br />
# speaker-test -c4 -l1 -twav<br />
<br />
I was able to compare the sound quality on Windows and it is clear that the bass sound is clearly missing. Is it similar for you or am I missing something ? [[User:Thenitronos|Thenitronos]] ([[User talk:Thenitronos|talk]]) 00:07, 1 February 2020 (UTC)<br />
:This is a new issue, I'm experiencing it too. [[User:Wrycode|wrycode]] ([[User talk:Wrycode|talk]]) 01:29, 1 February 2020 (UTC)<br />
:: I had the same issue with Linux kernel 5.4, but with kernel 5.3 it works (you can get it from the [[Arch Linux Archive]]) when following the [[Lenovo ThinkPad X1 Carbon (Gen 7)#Volume controls|Volume controls]] section (editing the {{ic|analog-output.conf.common}} file). I hope that [https://kernelnewbies.org/LinuxChanges#Linux_5.5.Audio 5.5] fixes this, haven't tried yet. — [[User:goetzc|Götz]] ([[User talk:goetzc|wanna talk?]]) 17:15, 1 February 2020 (UTC)<br />
:: It is also possible to set the 4.0 sound profile with {{ic|pactl set-card-profile alsa_card.pci-0000_00_1f.3 output:analog-surround-40}}, not sure if all Carbon 7th Gen use the same identifier, but that's the idea. — [[User:goetzc|Götz]] ([[User talk:goetzc|wanna talk?]])<br />
<br />
I tested the volume control section today and I can confirm it's not working. Only the bottom facing speakers fire resulting in no bass or midrange. The microphone does work well. There is some discussion of this in the following <br />
[https://gist.github.com/hamidzr/dd81e429dc86f4327ded7a2030e7d7d9 Gist.] [[User:Hackerman|Hackerman]] ([[User talk:Hackerman|talk]]) 19:05, 10 February 2020 (UTC)<br />
: Oh, that Gist is a very big configuration change! I have all four mics and four speakers working nicely (but not the kbd lights!) following the steps added by [[user:VictorTrac]], check out the [https://wiki.archlinux.org/index.php?title=Lenovo_ThinkPad_X1_Carbon_(Gen_7)&oldid=596943#Audio current edition]. Use latest repo kernel and sof-firmware, also revert any other configuration change you may have done in the past. — [[User:goetzc|Götz]] ([[User talk:goetzc|wanna talk?]])<br />
:: That was it! Thank you! I needed to mute the speaker channel. I'm glad to have a working array microphone. [[User:Hackerman|Hackerman]] ([[User talk:Hackerman|talk]]) 02:30, 11 February 2020 (UTC)<br />
<br />
== Screen Brightness Function Keys ==<br />
<br />
Is anyone having issues getting the screen brightness function keys working? I had to install [[acpid]] and setup ACPI events and actions to handle it, along with installing the {{Pkg|acpilight}} package. <br />
<br />
My events:<br />
<br />
/etc/acpi/events/FnF5-brightnessdown<br />
# video/brightnessdown BRTDN 00000087 00000000<br />
event=video/brightnessdown<br />
action=xbacklight -dec 3<br />
<br />
/etc/acpi/events/FnF6-brightnessup<br />
# video/brightnessup BRTUP 00000086 00000000<br />
event=video/brightnessup<br />
action=xbacklight -inc 3<br />
<br />
xev doesn't recognise the brightness function keys, so I can't handle the key presses with my window manager. At least that is what I believe, please correct me if I have this all wrong. <br />
[[User:Raybangs|Raybangs]] ([[User talk:Raybangs|talk]]) 10:16, 23 August 2019 (UTC)<br />
<br />
:I didn't have to go through that to get screen brightness going. Can you tell me more about your setup? I'm using Plasma and my brightness controls worked out of the box. [[User:Johncrist1988|Johncrist1988]] ([[User talk:Johncrist1988|talk]]) 14:16, 23 August 2019 (UTC)<br />
<br />
:It works for me also, using {{pkg|brightnessctl}} (as root) or {{pkg|light}} on [[Sway]] or Plasma. — [[User:goetzc|goetzc]] ([[User talk:goetzc|wanna talk?]]) 18:50, 25 August 2019 (UTC)<br />
<br />
:Interesting. I'm using a pretty simple base Arch install with AwesomeWM. I will try {{pkg|brightnessctl}} and see how that goes. {{Unsigned|21:25, 3 September 2019 (UTC)|Raybangs}}<br />
<br />
== UEFI BIOS Update ==<br />
<br />
Currently UEFI BIOS seems to be at [https://pcsupport.lenovo.com/hn/en/products/LAPTOPS-AND-NETBOOKS/THINKPAD-X-SERIES-LAPTOPS/THINKPAD-X1-CARBON-7TH-GEN-TYPE-20QD-20QE/downloads/DS540232 version 1.16]. I am unable to find the .cab file in the link provided, on the [https://fwupd.org/lvfs/devicelist LVFS Device List], nor have had luck with web searches.<br />
<br />
I also followed instructions for [https://wiki.archlinux.org/index.php/Fwupd#Setup_for_UEFI_BIOS_upgrade | UEFI BIOS upgrade from fwupd] on the wiki. Has anyone succeeded in upgrading the firmware to the latest version on Linux? Would using the bootable iso on a USB from the first link work? According the the [https://download.lenovo.com/pccbbs/mobiles/n2hur06w.txt README] it should work (but hesitant to put the iso on USB). [[User:In0ni|In0ni]] ([[User talk:In0ni|talk]]) 22:34, 1 September 2019 (UTC)<br />
: Using the bootable iso on a USB should work fine (vs. a CD/DVD). However, I'm hesitant to upgrade because the 1.05 update is supposedly required before updating to the lates version: <br />
UEFI: ---- / ECP: 1.05<br />
- (Fix) Fixed an issue where system may hang in UEFI BIOS updating process.<br />
(Note) This package must be applied prior to n2hur04w or later package version.`<br />
:The cab files are not available yet. The only way to apply the updates (except for one that's available via fwupdmgr) is through the bootable ISO. I don't see any reason to update personally but if someone else does, please let us know how it goes. [[User:Wrycode|wrycode]] ([[User talk:Wrycode|talk]]) 20:09, 10 September 2019 (UTC)<br />
:: Just BTW for anyone else reading this, I updated via the bootable ISO and it didn't brick my device. Also, the .cab files for Linux are hidden in that link (if you click on the sorting menu, it appears to show only Windows updates but if you click on the categories the Linux files are hidden in there somewhere). [[User:Wrycode|wrycode]] ([[User talk:Wrycode|talk]]) 22:48, 17 December 2019 (UTC)<br />
::: I did upgrade it using {{ic|fwupdmgr install <file_name.cab>}}, after some specific version and restarts, the automatic updates did work using {{ic|fwupdmgr update}}. — [[User:goetzc|Götz]] ([[User talk:goetzc|wanna talk?]]) 21:52, 19 December 2019 (UTC)<br />
<br />
== <s>Why enable S3 sleep? </s>==<br />
<br />
Could someone add a small bit about why S3 sleep should be enabled? I have been using the default S0 sleep for a few weeks and don't see any issues with it. ~ [[User:Akvadrako|Akvadrako]] ([[User talk:Akvadrako|talk]]) 09:55, 10 September 2019 (UTC)<br />
:I was under the impression that S3 sleep is 'normal' sleep (everything powered off except for a trickle to the ram), but I'm not sure what modern Windows does instead. The S0 sleep state means "on", that is, the computer is not asleep, according to https://superuser.com/questions/71835/what-is-the-difference-between-these-four-sleep-states [[User:Wrycode|wrycode]] ([[User talk:Wrycode|talk]]) 04:43, 24 September 2019 (UTC)<br />
<br />
: Windows only supports S0 sleep and it’s the default, so I think it’s debatable what’s normal. But does that really matter? I’m interested in the practical difference. Maybe I’ll benchmark S3 sometime but for now I can say S0 uses about 0.5W and wakes up in about 1s. ~ [[User:Akvadrako|Akvadrako]] ([[User talk:Akvadrako|talk]]) 07:51, 24 September 2019 (UTC)<br />
:: S0 sleep isn't the traditional Suspend-to-RAM "sleep" that Linux users are expecting, that's what I meant by "normal". You are right that S0 is the default for Windows now. https://www.kernel.org/doc/Documentation/power/states.txt] has some details about the sleep states in Linux, and https://docs.microsoft.com/en-us/windows/win32/power/system-power-states has the same for Windows. It's a software-only idle, so it must use slightly more power than S3, where all components are shut down except for the ram. The Windows page claims that S0 wakes up faster than s3 (which would make sense). Another implication: Windows can do stuff after you close the laptop lid like download updates. Windows separately performs a suspend-to-disk whenever you close the lid, so if you remove the battery or the battery runs out your work will still be saved. It's possible Linux can do this too with S0. I just switched to the "Windows" sleep state from the BIOS to try it out and the wake time isn't noticeably different, but my laptop doesn't wake when I open the lid or press the power button. The only way to wake it up is to press the "Fn" key, very odd (especially because I remapped "Fn" to "Ctrl" from the BIOS, so I'm really pressing "Ctrl"). You're not seeing anything like this? [[User:Wrycode|wrycode]] ([[User talk:Wrycode|talk]]) 01:04, 16 October 2019 (UTC)<br />
<br />
:: Normally I do press the Fn button to wake, unless I'm using my external keyboard with AC, though it doesn't bother me. So it seems that and possibly some power savings are the advantages of S3. ~ [[User:Akvadrako|Akvadrako]] ([[User talk:Akvadrako|talk]]) 10:26, 16 October 2019 (UTC)<br />
<br />
== Different lspci output ==<br />
<br />
Can anyone check what's their lspci output? I have realised I am running with a completely different setup of the components myself:<br />
<br />
<div class="toccolours mw-collapsible mw-collapsed" style="width:400px; overflow:auto;"><br />
<div style="font-weight:bold;line-height:1.6;">{{ic|lspci}}</div><br />
<div class="mw-collapsible-content"><br />
{{bc|<br />
00:00.0 Host bridge: Intel Corporation Coffee Lake HOST and DRAM Controller (rev 0c)<br />
00:02.0 VGA compatible controller: Intel Corporation UHD Graphics 620 (Whiskey Lake) (rev 02)<br />
00:04.0 Signal processing controller: Intel Corporation Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor Thermal Subsystem (rev 0c)<br />
00:08.0 System peripheral: Intel Corporation Xeon E3-1200 v5/v6 / E3-1500 v5 / 6th/7th Gen Core Processor Gaussian Mixture Model<br />
00:12.0 Signal processing controller: Intel Corporation Cannon Point-LP Thermal Controller (rev 11)<br />
00:14.0 USB controller: Intel Corporation Cannon Point-LP USB 3.1 xHCI Controller (rev 11)<br />
00:14.2 RAM memory: Intel Corporation Cannon Point-LP Shared SRAM (rev 11)<br />
00:14.3 Network controller: Intel Corporation Cannon Point-LP CNVi [Wireless-AC] (rev 11)<br />
00:15.0 Serial bus controller [0c80]: Intel Corporation Cannon Point-LP Serial IO I2C Controller #0 (rev 11)<br />
00:15.1 Serial bus controller [0c80]: Intel Corporation Cannon Point-LP Serial IO I2C Controller #1 (rev 11)<br />
00:16.0 Communication controller: Intel Corporation Cannon Point-LP MEI Controller #1 (rev 11)<br />
00:1c.0 PCI bridge: Intel Corporation Cannon Point-LP PCI Express Root Port #1 (rev f1)<br />
00:1d.0 PCI bridge: Intel Corporation Cannon Point-LP PCI Express Root Port #9 (rev f1)<br />
00:1d.4 PCI bridge: Intel Corporation Cannon Point-LP PCI Express Root Port #13 (rev f1)<br />
00:1f.0 ISA bridge: Intel Corporation Cannon Point-LP LPC Controller (rev 11)<br />
00:1f.3 Audio device: Intel Corporation Cannon Point-LP High Definition Audio Controller (rev 11)<br />
00:1f.4 SMBus: Intel Corporation Cannon Point-LP SMBus Controller (rev 11)<br />
00:1f.5 Serial bus controller [0c80]: Intel Corporation Cannon Point-LP SPI Controller (rev 11)<br />
00:1f.6 Ethernet controller: Intel Corporation Ethernet Connection (6) I219-V (rev 11)<br />
02:00.0 Wireless controller [0d40]: Intel Corporation XMM7360 LTE Advanced Modem (rev 01)<br />
03:00.0 Non-Volatile memory controller: Sandisk Corp WD Black 2018/PC SN720 NVMe SSD<br />
05:00.0 PCI bridge: Intel Corporation JHL6540 Thunderbolt 3 Bridge (C step) [Alpine Ridge 4C 2016] (rev 02)<br />
06:00.0 PCI bridge: Intel Corporation JHL6540 Thunderbolt 3 Bridge (C step) [Alpine Ridge 4C 2016] (rev 02)<br />
06:01.0 PCI bridge: Intel Corporation JHL6540 Thunderbolt 3 Bridge (C step) [Alpine Ridge 4C 2016] (rev 02)<br />
06:02.0 PCI bridge: Intel Corporation JHL6540 Thunderbolt 3 Bridge (C step) [Alpine Ridge 4C 2016] (rev 02)<br />
06:04.0 PCI bridge: Intel Corporation JHL6540 Thunderbolt 3 Bridge (C step) [Alpine Ridge 4C 2016] (rev 02)<br />
07:00.0 System peripheral: Intel Corporation JHL6540 Thunderbolt 3 NHI (C step) [Alpine Ridge 4C 2016] (rev 02)<br />
2d:00.0 USB controller: Intel Corporation JHL6540 Thunderbolt 3 USB Controller (C step) [Alpine Ridge 4C 2016] (rev 02)<br />
}}<br />
</div></div><br />
<br />
Just in case, on e of the most relevant differences is that I'm not using Fibocom modem but rather the Intel XMM7360 LTE<br />
: Is the Intel XMM7360 LTE a stock configuration option? Have you gotten it to work with Linux? [[User:Wrycode|wrycode]] ([[User talk:Wrycode|talk]]) 05:48, 14 October 2019 (UTC)<br />
I don't have the same lspci output either. I'm in favor of removing that section. It takes up too much space and it's irrelevant/misleading. If we must, the other 6 X1C pages have something like this: <br />
# dmidecode -t system | grep Version<br />
Version: ThinkPad X1 Carbon 7th<br />
[[User:Wrycode|wrycode]] ([[User talk:Wrycode|talk]]) 04:59, 10 January 2020 (UTC)<br />
<br />
== Fibocom LTE now available! ==<br />
<br />
I just saw this [https://forums.lenovo.com/t5/Other-Linux-Discussions/How-To-Configure-X1-Carbon-Gen-7-on-Debian-FingerPrint-4G-Modem/td-p/4550327 Lenovo forum thread] which links to [https://github.com/abrasive/xmm7360 this tool] to flip the Fibocom into USB mode (which has a Linux driver). [[User:Wrycode|wrycode]] ([[User talk:Wrycode|talk]]) 02:49, 13 December 2019 (UTC)<br />
<br />
I did some initial testing but I need to wait for a new sim card to look deeper into this. <br />
* just install acpi_call from the official repositories<br />
* the https://github.com/abrasive/xmm7360 script works exactly as described. NOTE: the modem command interface accessible at /dev/ttyACM0 will be all kinds of broken if you have ModemManager running, so make sure to wait until you've enabled full functionality and unlocked the modem before starting ModemManager.service.<br />
* AT+GTUSBMODE=7 and AT+CFUN=15 work fine to get the modem working but first you have to issue the [https://github.com/abrasive/xmm7360#fcc-lock FCC Lock] commands.<br />
* Now you should be able to run modem-manager-gui and send and receive SMS messages<br />
* to get 4G data, separately configure a new "mobile broadband" GSM connection in Network Manager (you can just use nm-connection editor). I accepted all of the default settings, (including the "number"), except for putting my network's APN in.<br />
* Now the connection should be available to you in one of Network Manager's user interfaces. If you get an error when you select the connection like "device not available", see if /var/lib/NetworkManager/NetworkManager.state has WWANEnabled set to false; to change it you might have to mess around with /etc/NetworkManager/NetworkManager.conf or the nm-applet GUI<br />
* despite what the README says, the modem stayed accessible for me between suspends (but you have to re-run the script after a reboot) <br />
<br />
There's [https://github.com/juhovh/xmm7360_usb this alternative repository] which provides a kernel module for the modem that supposedly stays persistent between reboots. I think the author uses Debian so the makefile would have to be modified for building kernel modules on Arch. [[User:Wrycode|wrycode]] ([[User talk:Wrycode|talk]]) 21:43, 13 December 2019 (UTC)<br />
<br />
== Missing RTC device ==<br />
<br />
{{ic|hwlock --verbose}} returns:<br />
{{bc|<br />
hwclock from util-linux 2.34<br />
System Time: 1577636985.183322<br />
Trying to open: /dev/rtc0<br />
Trying to open: /dev/rtc<br />
Trying to open: /dev/misc/rtc<br />
No usable clock interface found.<br />
hwclock: Cannot access the Hardware Clock via any known method.<br />
}}<br />
<br />
Related messages from dmesg:<br />
{{bc|<br />
[ 0.764314] PM: RTC time: 15:54:28, date: 2019-12-29<br />
[ 1.438054] hctosys: unable to open rtc device (rtc0)<br />
}}<br />
Kernel 5.4.6.arch3-1<br />
[[User:Kubuxu|Kubuxu]] ([[User talk:Kubuxu|talk]]) 16:33, 29 December 2019 (UTC)<br />
: Probably a newer kernel bug because hwclock used to work but now I don't have an rtc device available in /dev/ [[User:Wrycode|wrycode]] ([[User talk:Wrycode|talk]]) 03:15, 16 January 2020 (UTC)<br />
<br />
== Incorrect ethernet dongle information? ==<br />
<br />
I believe the information in the sidebar about the native ethernet dongle has been incorrectly copied and pasted from a previous model, like it was for the [[Lenovo ThinkPad X1 Yoga (Gen 4)|X1Y4]]. Can an X1C7 owner confirm this? [[User:Andersk|Andersk]] ([[User talk:Andersk|talk]]) 06:26, 4 January 2020 (UTC)<br />
<br />
I can confirm that it works out of the box with no problems [[User:GH0S1|GH0S1]] ([[User talk:GH0S1|talk]]) 19:11, 5 January 2020 (UTC)<br />
<br />
But do you have [https://www3.lenovo.com/us/en/accessories-and-monitors/cables-and-adapters/adapters/CABLE-BO-TP-OneLink%2B-to-RJ45-Adapter/p/4X90K06975 the dongle that’s linked], as opposed to say [https://www.lenovo.com/us/en/accessories-and-monitors/cables-and-adapters/adapters/CABLE-BO-Ethernet-Extension-Adapter-2/p/4X90Q84427 this one]? All the pictures I can find suggest that the former is copied-and-pasted from previous models and won’t fit in the X1C7. [[User:Andersk|Andersk]] ([[User talk:Andersk|talk]]) 00:41, 6 January 2020 (UTC)<br />
<br />
You are right. I have the newer dongle. It doesn't look like the older and wider dongle would fit. [[User:GH0S1|GH0S1]] ([[User talk:GH0S1|talk]])<br />
<br />
Cool. Edited the link; feel free to make further edits. [[User:Andersk|Andersk]] ([[User talk:Andersk|talk]]) 01:06, 7 January 2020 (UTC)</div>Goetzchttps://wiki.archlinux.org/index.php?title=Lenovo_ThinkPad_X1_Carbon_(Gen_7)&diff=597731Lenovo ThinkPad X1 Carbon (Gen 7)2020-02-16T19:02:35Z<p>Goetzc: /* Audio */ rephrase a bit</p>
<hr />
<div>[[Category:Lenovo]]<br />
[[ja:Lenovo ThinkPad X1 Carbon (Gen 7)]]<br />
{{Related articles start}}<br />
{{Related|Lenovo ThinkPad X1 Carbon}}<br />
{{Related|Lenovo ThinkPad X1 Carbon (Gen 2)}}<br />
{{Related|Lenovo ThinkPad X1 Carbon (Gen 3)}}<br />
{{Related|Lenovo ThinkPad X1 Carbon (Gen 4)}}<br />
{{Related|Lenovo ThinkPad X1 Carbon (Gen 5)}}<br />
{{Related|Lenovo ThinkPad X1 Carbon (Gen 6)}}<br />
{{Related|Lenovo ThinkPad X1 Yoga (Gen 3)}}<br />
{{Related|Lenovo ThinkPad X1 Yoga (Gen 4)}}<br />
{{Related articles end}}<br />
<br />
{{tip| A great resource for thinkpads is https://www.thinkwiki.org/wiki/ThinkWiki}}<br />
<br />
The Lenovo ThinkPad X1 Carbon, 7th generation is an ultrabook introduced in early 2019. It features a 14" screen, 8th-gen or 10th-gen Intel Core processors and integrated [[Intel graphics|Intel UHD 620 graphics]].<br />
<br />
To ensure you have this version, [[install]] the package {{Pkg|dmidecode}} and run:<br />
<br />
{{bc|# dmidecode -s system-version<br />
ThinkPad X1 Carbon 7th<br />
}}<br />
<br />
{| class="wikitable" style="float: right; clear: right; margin: 0 0 0.5em 0.5em; max-width: 420px; width: 100%;"<br />
| '''Device''' || '''Working''' || '''Modules'''<br />
|-<br />
| [[Intel graphics]] || {{Yes}} || i915, (intel_agp)<br />
|-<br />
| [[Wireless network configuration#iwlwifi|Wireless network]] || {{Yes}} || iwlmvm<br />
|-<br />
| Native Ethernet with [https://www.lenovo.com/us/en/accessories-and-monitors/cables-and-adapters/adapters/CABLE-BO-Ethernet-Extension-Adapter-2/p/4X90Q84427 dongle] || {{Yes}} || ?<br />
|-<br />
| Mobile broadband Fibocom || {{Yes}}¹ || ?<br />
|-<br />
| Audio || {{Yes}} || snd_hda_intel<br />
|-<br />
| Microphone || {{Yes}}⁴ || snd_sof<br />
|-<br />
| [[Touchpad]] || {{Yes}} || psmouse, rmi_smbus, i2c_i801<br />
|-<br />
| [[TrackPoint]] || {{Yes}} || psmouse, rmi_smbus, i2c_i801<br />
|-<br />
| Camera || {{Yes}} || uvcvideo<br />
|-<br />
| [[fprint|Fingerprint reader]] || {{Y|Partial}}² || ?<br />
|-<br />
| [[Power management]] || {{Yes}}³ || ?<br />
|-<br />
| [[Bluetooth]] || {{Yes}} || btusb<br />
|-<br />
| Keyboard backlight || {{Yes}} || thinkpad_acpi<br />
|-<br />
| Function/Multimedia keys || {{Yes}} || ?<br />
|-<br />
| colspan=3 style="font-size: 70%; border: none;" | <ol><br />
<li>The Fibocom LTE module has Linux support once switched to USB mode; see [https://forums.lenovo.com/t5/Other-Linux-Discussions/How-To-Configure-X1-Carbon-Gen-7-on-Debian-FingerPrint-4G-Modem/td-p/4550327] and [https://github.com/abrasive/xmm7360]</li><br />
<li>An official driver and a reverse engineered driver are in the works [https://gitlab.freedesktop.org/libfprint/libfprint/issues/181] (''06cb:00bd'').</li><br />
<li>S3 suspend requires changes to BIOS settings, see section on [[#Sleep/Suspend]].</li><br />
<li>The internal microphone doesn't work on versions of the {{pkg|linux}} kernel before 5.3. On version 5.3 and newer the SOF firmware can be enabled, see [[{{TALKPAGENAME}}#Microphone|Talk#Microphone]].</li><br />
|}<br />
<br />
== BIOS ==<br />
<br />
{{warning|1=There are reports that enrolling custom Secure Boot keys may brick this machine because of firmware bugs.}} <br />
<br />
The most convenient way to install Arch Linux is by disabling "Secure Boot" {{ic|Security -> Secure Boot - Set to "Disabled"}}. However it is possible to self-sign your kernel and boot with it enabled. For further information have a look at the [[Secure Boot]] article.<br />
<br />
In case your {{ic|efivars}} are not properly set it is most likely due to you not being booted into [[UEFI]]. Should the problem persist be sure to consult the [[UEFI#UEFI variables]] section.<br />
<br />
=== Updates ===<br />
<br />
==== Automatic (Linux Vendor Firmware Service) ====<br />
<br />
[https://blogs.gnome.org/hughsie/2018/08/06/please-welcome-lenovo-to-the-lvfs/ In August of 2018 Lenovo has joined] the [https://fwupd.org/ Linux Vendor Firmware Service (LVFS)] project, which enables firmware updates from within the OS.<br />
BIOS updates (and possibly other firmware such as the Thunderbolt controller) can be queried for and installed through [[fwupd]].<br />
<br />
==== Manual (fwupdmgr) ====<br />
<br />
Lenovo may in the future provide cabinet files that can be directly installed with fwupdmgr.<br />
Check for Linux {{ic|.cab}} files from the [https://pcsupport.lenovo.com/us/en/products/laptops-and-netbooks/thinkpad-x-series-laptops/thinkpad-x1-carbon-7th-gen-type-20qd-20qe/downloads Lenovo ThinkPad X1 Carbon (Gen 7) driver website].<br />
<br />
#Make sure the AC adapter is firmly connected to the target computer.<br />
#Launch Terminal.<br />
#Move to the directory where the cabinet file was placed.<br />
#Run {{ic|fwupdmgr install xxxxxxxx.cab}} to schedule firmware update.<br />
#Restart the system.<br />
#The computer will be restarted and the UEFI BIOS will be updated.<br />
<br />
=== Sleep/Suspend ===<br />
<br />
The BIOS has two "Sleep State" options, Windows and Linux, which you can find in at {{ic|Config -> Power -> Sleep State}}. The Linux option is the traditional S3 power state where all hardware components are turned off except for the RAM, and it should work normally. The Windows option is a newer software-based "modern standby" which works on Linux (despite the name). One possible benefit to the Windows sleep state is faster wake up time, and one possible drawback is increased power usage.<br />
<br />
=== S3 Suspend Bug with Bluetooth Devices ===<br />
<br />
Occasionally your Thinkpad will wake up immediately after suspending with certain [[bluetooth]] devices added. To prevent this, remove the devices or disable [[bluetooth]] before suspending.<br />
<br />
=== BIOS configurations ===<br />
<br />
* {{ic|Config -> Thunderbolt BIOS Assist Mode - Set to "Enabled"}}. When disabled, on Linux, power usage appears to be significantly higher because of a substantial number of CPU wakeups during s2idle.<br />
<br />
== Firmware issues ==<br />
The following issues can all be resolved by upgrading the firmware with fwupdmgr (''see [[#Updates|#BIOS Updates]]''), but there may be alternative manual/temporary fixes.<br />
=== Touchpad issues ===<br />
<br />
Due to a bug in a touchpad firmware, the touchpad might not work with following logs in dmesg:<br />
{{bc|<br />
[ 4.499490] i2c_designware i2c_designware.1: i2c_dw_handle_tx_abort: lost arbitration<br />
[...]<br />
[ 12.668795] i2c_hid i2c-SYNA8005:00: failed to set a report to device.<br />
[ 13.678765] i2c_designware i2c_designware.1: controller timed out<br />
}}<br />
<br />
=== Freeze when suspending ===<br />
There are reports of the system freezing after initiating a suspend or hibernate. A temporary fix is to add {{ic|1=snd_hda_intel.dmic_detect=0}} to your kernel parameters. see [https://www.reddit.com/r/archlinux/comments/e5oe4p/systemctl_suspend_causes_freeze/fa8mzft/]<br />
<br />
=== Power management/Throttling issues ===<br />
A [https://forums.lenovo.com/t5/Other-Linux-Discussions/X1C6-T480s-low-cTDP-and-trip-temperature-in-Linux/td-p/4028489/highlight/true bug] causes the CPU to consume less power than under Windows and throttle at 80°C instead of 97°. <br />
<br />
Lenovo has confirmed the issue, [https://forums.lenovo.com/t5/Other-Linux-Discussions/X1C6-T480s-low-cTDP-and-trip-temperature-in-Linux/m-p/4534535/highlight/true#M13642 explained the cause] and published [https://forums.lenovo.com/t5/Other-Linux-Discussions/X1C6-T480s-low-cTDP-and-trip-temperature-in-Linux/m-p/4535310/highlight/true#M13653 updates for the embedded controller and the BIOS] to LVFS .<br />
<br />
The alternative fix is to install {{Pkg|throttled}}, then run <br />
<br />
sudo systemctl enable --now lenovo_fix.service<br />
<br />
== Audio ==<br />
The 4-channel audio and microphone works as of 5.5.1-arch1-1 using [https://github.com/thesofproject/sof SOF Firmware]. Steps to get it working:<br />
<br />
1. Install {{ic|sof-firmware}} (tested with 1.4.2-1)<br />
<br />
2. Blacklist incompatible {{ic|hda_intel}} and {{ic|soc_skl}} modules:<br />
<br />
{{hc|/etc/modprobe.d/blacklist.conf|<br />
blacklist snd_hda_intel<br />
blacklist snd_soc_skl<br />
}}<br />
<br />
3. Configure PulseAudio's to load Alsa modules with the correct {{ic|device}} and {{ic|channnel}} settings, by adding these two lines to {{ic|/etc/pulse/default.pa}}:<br />
<br />
load-module module-alsa-sink device=hw:0,0 channels=4<br />
load-module module-alsa-source device=hw:0,7 channels=4<br />
<br />
4. Reboot, then use {{ic|alsamixer}} to increase the "master" channel level of the {{ic|sof-hda-dsp}} sound card (use the {{ic|<F6>}} key to switch cards).<br />
<br />
5. If the output sounds tinny, try muting the "speaker" item in alsamixer.<br />
<br />
== Fingerprint sensor ==<br />
<br />
An official driver and a reverse engineered driver are in the works.[https://gitlab.freedesktop.org/libfprint/libfprint/issues/181]<br />
<br />
== Disabling red LED in ThinkPad logo ==<br />
<br />
You can temporarily disable the red LED in the ThinkPad logo on the cover:<br />
<br />
1. Enable writing to the embedded controller registers by adding the kernel parameter {{ic|1=ec_sys.write_support=1}}. <br />
If you use UEFI boot, you can add this parameter in {{ic|/boot/efi/loader/entries/arch.conf}} under "options".<br />
<br />
2. Disable the LED with this command: <br />
<br />
# echo -n -e "\x0a" | sudo dd of="/sys/kernel/debug/ec/ec0/io" bs=1 seek=12 count=1 conv=notrunc 2> /dev/null<br />
<br />
This would need to be run after each suspend/reboot to be permanent.<br />
<br />
== Additional resources ==<br />
<br />
* [https://www.thinkwiki.org/wiki/Category:X1_Carbon_(7th_Gen) ThinkWiki X1 Carbon 7th Gen page]<br />
* [https://gist.github.com/greigdp/bb70fbc331a0aaf447c2d38eacb85b8f Dell XPS 13 9370 quirks]: Some pointers on getting Watt usage down to ~2W, Intel video powersaving features might be interesting, see also the [[Intel graphics]] page for interesting power-saving options.<br />
* [https://01.org/blogs/rzhang/2015/best-practice-debug-linux-suspend/hibernate-issues Intel Blog: Best practice to debug Linux* suspend/hibernate issues], including the [https://github.com/01org/pm-graph pm-graph] tool to analyze power usage during suspend<br />
* [https://forums.linuxmint.com/viewtopic.php?t=91453 How to fix volume control (ALSA problem)] This is where the volume fix came from originally.<br />
* [https://docs.microsoft.com/en-us/windows/win32/power/system-power-states Windows System Power States]<br />
* [https://www.kernel.org/doc/Documentation/power/states.txt System Power Management Sleep States at kernel.org]</div>Goetzchttps://wiki.archlinux.org/index.php?title=Talk:Lenovo_ThinkPad_X1_Carbon_(Gen_7)&diff=597193Talk:Lenovo ThinkPad X1 Carbon (Gen 7)2020-02-11T00:31:05Z<p>Goetzc: /* Microphone */ Explain how I got it working</p>
<hr />
<div>== <s>Touchpad with 5.4.x</s> ==<br />
With linux 5.4 touchpad stopped working on about 50% of bootups.<br />
With touchpad not working I'm getting following messages in dmesg.<br />
{{bc|1=<br />
[ 4.499490] i2c_designware i2c_designware.1: i2c_dw_handle_tx_abort: lost arbitration<br />
[ 5.518759] i2c_designware i2c_designware.1: controller timed out<br />
[ 5.519959] i2c_hid i2c-SYNA8005:00: failed to retrieve report from device.<br />
[ 5.521187] input: SYNA8005:00 06CB:CD8C Mouse as /devices/pci0000:00/0000:00:15.1/i2c_designware.1/i2c-9/i2c-SYNA8005:00/0018:06CB:CD8C.0001/input/input9<br />
[ 5.521337] input: SYNA8005:00 06CB:CD8C Touchpad as /devices/pci0000:00/0000:00:15.1/i2c_designware.1/i2c-9/i2c-SYNA8005:00/0018:06CB:CD8C.0001/input/input10<br />
[ 5.521442] hid-generic 0018:06CB:CD8C.0001: input,hidraw0: I2C HID v1.00 Mouse [SYNA8005:00 06CB:CD8C] on i2c-SYNA8005:00<br />
[ 6.585507] i2c_designware i2c_designware.1: controller timed out<br />
[ 6.585590] i2c_hid i2c-SYNA8005:00: failed to retrieve report from device.<br />
[ 6.585678] hid-multitouch 0018:06CB:CD8C.0001: failed to fetch feature 8<br />
[ 7.599201] i2c_designware i2c_designware.1: controller timed out<br />
[ 7.599319] i2c_hid i2c-SYNA8005:00: failed to retrieve report from device.<br />
[ 7.599385] hid-multitouch 0018:06CB:CD8C.0001: failed to fetch feature 8<br />
[ 8.612535] i2c_designware i2c_designware.1: controller timed out<br />
[ 8.612636] i2c_hid i2c-SYNA8005:00: failed to retrieve report from device.<br />
[ 8.612711] hid-multitouch 0018:06CB:CD8C.0001: failed to fetch feature 7<br />
[ 9.625537] i2c_designware i2c_designware.1: controller timed out<br />
[ 9.625642] i2c_hid i2c-SYNA8005:00: failed to retrieve report from device.<br />
[ 9.625873] input: SYNA8005:00 06CB:CD8C Mouse as /devices/pci0000:00/0000:00:15.1/i2c_designware.1/i2c-9/i2c-SYNA8005:00/0018:06CB:CD8C.0001/input/input19<br />
[ 9.626417] input: SYNA8005:00 06CB:CD8C Touchpad as /devices/pci0000:00/0000:00:15.1/i2c_designware.1/i2c-9/i2c-SYNA8005:00/0018:06CB:CD8C.0001/input/input20<br />
[ 9.627084] hid-multitouch 0018:06CB:CD8C.0001: input,hidraw0: I2C HID v1.00 Mouse [SYNA8005:00 06CB:CD8C] on i2c-SYNA8005:00<br />
[ 10.132275] kauditd_printk_skb: 15 callbacks suppressed'<br />
[ 10.639147] i2c_designware i2c_designware.1: controller timed out<br />
[ 10.639250] i2c_hid i2c-SYNA8005:00: failed to set a report to device.<br />
[ 11.652134] i2c_designware i2c_designware.1: controller timed out<br />
[ 11.652167] i2c_hid i2c-SYNA8005:00: failed to set a report to device.<br />
[ 12.668764] i2c_designware i2c_designware.1: controller timed out<br />
[ 12.668795] i2c_hid i2c-SYNA8005:00: failed to set a report to device.<br />
[ 13.678765] i2c_designware i2c_designware.1: controller timed out<br />
[ 14.692095] i2c_designware i2c_designware.1: controller timed out<br />
[ every second ...]<br />
[ 26.852160] i2c_designware i2c_designware.1: controller timed out<br />
}} [[User:Kubuxu|Kubuxu]] ([[User talk:Kubuxu|talk]]) 13:47, 16 December 2019 (UTC)<br />
: This might be totally unrelated, but I had both sleep and touchpad break the other day and temporarily fixed it with the snd_hda_intel.dmic_detect=0 kernel option (see [https://old.reddit.com/r/archlinux/comments/e5oe4p/systemctl_suspend_causes_freeze/?st=k49hi5rf&sh=0c42e7c9 this] [[User:Wrycode|wrycode]] ([[User talk:Wrycode|talk]]) 06:28, 17 December 2019 (UTC)<br />
: I have {{ic|snd_hda_intel}} blacklisted to make sure that SOF is used. So far I had one SOF related DSP crash but apart from that SOF seems fine. There is also touchpad firmware update I've applied, I will let you all now about the results. [[User:Kubuxu|Kubuxu]] ([[User talk:Kubuxu|talk]]) 12:11, 17 December 2019 (UTC)<br />
: After updating Touchpad firware (using {{ic|fwupdmgr}}) to 1.3.3013412 problem seems to be resolved. [[User:Kubuxu|Kubuxu]] ([[User talk:Kubuxu|talk]]) 12:43, 27 December 2019 (UTC)<br />
:: Confirmed here as well [[User:Wrycode|wrycode]] ([[User talk:Wrycode|talk]]) 02:42, 28 December 2019 (UTC)<br />
:: Did anyone experience issues with updating this firmware with {{ic|fwupdmgr}}? I continuously get {{ic|1=No upgrades for Touchpad: current version is 1.3.3013337: 1.3.3013337=same}}. I even tried to download the .cab file and use {{ic|fwupdmgr install}} and get {{ic|No supported devices found}} [[User:In0ni|In0ni]] ([[User talk:In0ni|talk]]) 00:20, 7 January 2020 (UTC)<br />
::: Seems like you have the latest update already. [[User:Wrycode|wrycode]] ([[User talk:Wrycode|talk]]) 18:18, 7 January 2020 (UTC)<br />
:::: Latest firmware should be 1.3.3013412 -- not 1.3.3013337. I'm having the issue this discussion is talking about which the latest version fixes. What version of the firmware did you update to? [[User:In0ni|In0ni]] ([[User talk:In0ni|talk]]) 04:19, 9 January 2020 (UTC)<br />
::::: Sorry, I assumed 1.3.3013412 and 1.3.3013337 were the same version or something (the version is listed as "PR3013337/PR3013412" in the Readme on Lenovo's site. I updated to 1.3.3013337 from 1.1.2949533 and my touchpad issues went away. But if you're still having issues with the touchpad then maybe it wasn't actually the firmware update that fixed it for me? I'm on kernel 5.4.8 and everything works except for the microphone. [[User:Wrycode|wrycode]] ([[User talk:Wrycode|talk]]) 04:38, 10 January 2020 (UTC)<br />
: Updated Wiki page with the info [[User:Kubuxu|Kubuxu]] ([[User talk:Kubuxu|talk]]) 17:38, 29 December 2019 (UTC)<br />
: Where are you getting the firmware? The only version I can find is an exe [[User:Mondoman712|Mondoman712]] ([[User talk:Mondoman712|talk]]) 14:07, 23 January 2020 (UTC)<br />
:: I'm using fwupdmgr [[User:Kubuxu|Kubuxu]] ([[User talk:Kubuxu|talk]]) 17:14, 23 January 2020 (UTC)<br />
::: The touchpad wasn't showing up for me there, but it wasn't working when I tried so I rebooted and then it appeared. [[User:Mondoman712|Mondoman712]] ([[User talk:Mondoman712|talk]]) 18:19, 23 January 2020 (UTC)<br />
<br />
== Microphone ==<br />
Did you get your microphone to work neither alsamixer or pavucontrol seem to detect a microphone. ? [[User:Nitrobay|Nitrobay]] ([[User talk:Nitrobay|talk]]) 11:38, 17 August 2019 (UTC)<br />
: I can confirm using [[Advanced_Linux_Sound_Architecture/Troubleshooting#Microphone|this test]], only externally connected microphones work. — [[User:goetzc|goetzc]] ([[User talk:goetzc|wanna talk?]]) 14:24, 17 August 2019 (UTC)<br />
: Looks like Linux kernel 5.3 will include the [https://thesofproject.github.io/latest/index.html SOF firmware update] with the fix for the microphone. — [[User:goetzc|goetzc]] ([[User talk:goetzc|wanna talk?]]) 14:25, 6 September 2019 (UTC)<br />
: After updating to Linux kernel 5.3.1 the microphone still does not work [[User:Moreka|Moreka]] ([[User talk:Moreka|talk]]) 17:30, 23 September 2019 (UTC) [[User:Moreka]] 17:30, 23 September 2019 (UTC)<br />
: I found a configuration that makes the microphones to work ;) but couldn't paste the instructions or a link to them. I created a forum post under Laptop Issues and titled [SOLVED] Fix for microphone on Lenovo X1 Gen 7 [[User:Alphazo|Alphazo]] ([[User talk:Alphazo|talk]]) 10:15, 13 October 2019 (UTC)<br />
: Like others, I wasn't able to get microphone working by following that guide. My results are identical to that of "Mocco" from that forum. Unless I'm misunderstanding the sidebar, I think we should flag microphone to "not working" for this page. [[User:Parth|Parth]] ([[User talk:Parth|talk]]) 23:54, 20 October 2019 (UTC)<br />
: I wasn't able to get microphone working by following that guide as well. I also think we should flag microphone to "not working" for this page. [[User:Moreka|Moreka]] 06:04, 22 October 2019 (UTC)<br />
: Managed to get it working following Alphazo's guide. There are a few typos however, I indicated the required fix in post #9. Hope it helps. [[User:Tbw|Tbw]] ([[User talk:Tbw|talk]]) 21:23, 22 October 2019 (UTC)<br />
: I'll give it another shot and report back [[User:Parth|Parth]] ([[User talk:Parth|talk]]) 17:17, 30 October 2019 (UTC)<br />
: I was able to make the microphone + sound playback work with following the Lenovo docx file and using the sof-hda-generic.tplg and sof-cnl.ri provided in the latest linux firmware package shipped with ubuntu (just download the package and copy the two files in the correct directories). Also the changes in /etc/pulse/default.pa are not necessary. [[User:moreka|moreka]] 17:08, 31 October 2019 (UTC)<br />
: With recent kernel the SOF was disabled [https://bugs.archlinux.org/task/63464]. Solution for me was to install linux-pf and disable CONFIG_SND_SOC_INTEL_SST, enable SOT. [[User:Kubuxu|Kubuxu]] ([[User talk:Kubuxu|talk]]) 14:12, 19 November 2019 (UTC)<br />
: Please test with [https://git.archlinux.org/svntogit/packages.git/log/trunk?h=packages/linux&id=d6bbb261bd2c8f83b9c93041dae9aa4175e20e6e linux 5.4.1-arch1] (in testing) and [https://www.archlinux.org/packages/extra/any/sof-firmware/ sof-firmware] (new). SOF is re-enabled except on Broadwell/Baytrail platforms. [[User:Dpward|Dpward]] ([[User talk:Dpward|talk]]) 17:42, 1 December 2019 (UTC)<br />
: I tested with the new kernel and sof-firmware package (from the Arch repositories). Doing the configs as in the docx file, the sound works well, but the microphone records sounds in a wrong way; it sounds as if it is slow-motion. [[User:moreka]] 15:16, 3 December 2019 (UTC)<br />
: I experienced the same issue like moreka after installing the current kernel (5.4.2.arch1-1) and sof-firmware (1.3.1-1) from the core repo. Also since sof is in use the speakers only provide stereo audio and not using the 4.0 channel profile. [[User:Bin101|Bin101]] ([[User talk:Bin101|talk]]) 19:09, 6 December 2019 (UTC)<br />
: When using {{pkg|sof-firmware}} version 1.4.1 (and latest kernel 5.4.2) the sound card doesn't get recognized at all. Reverting back to sof-firmware 1.3.1 makes the card work again, in the same way explained by users Moreka and Bin101. — [[User:goetzc|Götz]] ([[User talk:goetzc|wanna talk?]]) 13:33, 9 December 2019 (UTC)<br />
: Yeah a whole host of things broke for me in 5.4.2: hibernate, touchpad & sound all broke for me in 5.4.2. [[User:Parth|Parth]] ([[User talk:Parth|talk]]) 04:43, 10 December 2019 (UTC)<br />
: With 5.4.3 the Mic works with custom topology file {{ic|sof-hda-generic-4ch.tplg}}. The touchpad is broken on about 50% of bootups. I will start a new thread about it. [[User:Kubuxu|Kubuxu]] ([[User talk:Kubuxu|talk]]) 13:37, 16 December 2019 (UTC)<br />
: <s>I was (finally!) able to get the mic to work on a HP EliteBook x360 1030 G4, using kernel 5.4.1 and sof-firmware 1.3.1.</s> Spoke too soon. Not working after all. Details [https://bbs.archlinux.org/viewtopic.php?pid=1878341#p1878341 here]. [[User:Darose|Darose]] 21:18, 18 December 2019 (UTC)<br />
: Still problematic with kernel 5.5-rc6 (compiled myself). Just the two top speakers are firing (not the rear ones). Super annoying. The microphone works, though... Using sof-firmware 1.3 (from Arch repo) [[User:Moreka]] 14:18, 17 January 2020<br />
: For me, it was necessary, to add ''/etc/modprobe.d/alsa.conf'' containing {{ic|options snd slots&#61;,snd_usb_audio}}. [[User:Jaydoe|Jaydoe]] ([[User talk:Jaydoe|talk]]) 10:18, 9 February 2020 (UTC)<br />
: I got the microphone (and sound) working (but not the kbd lights!) following the [https://wiki.archlinux.org/index.php?title=Lenovo_ThinkPad_X1_Carbon_(Gen_7)&oldid=596943#Audio current edition] steps. Use latest repo kernel and sof-firmware, also revert any other configuration change you may have done in the past. — [[User:goetzc|Götz]] ([[User talk:goetzc|wanna talk?]]) 00:31, 11 February 2020 (UTC)<br />
<br />
== <s>Disabling red LED in Thinkpad logo stops</s> ==<br />
<br />
This service doesn't work after a suspend. [[User:Wrycode|wrycode]] ([[User talk:Wrycode|talk]]) 15:36, 9 August 2019 (UTC)<br />
I removed the script and systemd service. They were copied verbatim from the Gen 6 page and don't work as described.[[User:Wrycode|wrycode]] ([[User talk:Wrycode|talk]]) 05:10, 10 January 2020 (UTC)<br />
<br />
== Volume Controls ==<br />
<br />
The section [[Lenovo_ThinkPad_X1_Carbon_(Gen_7)#Volume_Controls|Volume Controls]] fixes the quite/loud volume control, but seems <s>to disable</s> (they are already disabled) the two top-firing speakers, only the two bottom-firing sub-woofers are enabled. --[[User:Goetzc|Goetzc]] ([[User talk:Goetzc|talk]]) 17:12, 9 August 2019 (UTC)<br />
: So this seems to fix the volume control indeed, but the top-firing speakers were already and are still muted, might be a driver bug, but a workaround from another Dolby Atmos laptop might work here. --[[User:Goetzc|Goetzc]] ([[User talk:Goetzc|talk]]) 17:32, 9 August 2019 (UTC)<br />
:: Did you remember to run alsamixer from {{Pkg|alsa-utils}} after installation and turn on/equalize all of the speakers? Mine (top and bottom) are working fine. [[User:Wrycode|wrycode]] ([[User talk:Wrycode|talk]]) 03:54, 13 August 2019 (UTC)<br />
::: You are correct Wrycode, thanks! The "''Master''" volume was low, rising it to 100% makes the top speakers work as expected :) Will add this to the section. <br />
::: Do you happen to know how to make this change (setting the "''Element Master''") so that it's not done on the system {{ic|analog-output.conf.common}} file, and thus the change survives when PulseAudio package is updated? — [[User:goetzc|goetzc]] ([[User talk:goetzc|wanna talk?]])<br />
:::: I did some digging around and I can't find a way to do this. Pulseaudio might not have a user config option for the alsa paths in /usr/. Added the NoUpgrade workaround on the main page. [[User:Wrycode|wrycode]] ([[User talk:Wrycode|talk]]) 02:05, 20 August 2019 (UTC)<br />
<br />
:There is [https://askubuntu.com/a/988993/509340 this interesting] method, which uses 'hdajackretask' from the {{pkg|alsa-tools}} package to remap some pins. The comment is for a different laptop (Asus UX550 using Realtek ALC295), but it exhibits the same issue. We would need to determine the correct pins for this hardware (Realtek ALC285), don't know how, though. — [[User:goetzc|goetzc]] ([[User talk:goetzc|wanna talk?]]) 19:08, 25 August 2019 (UTC)<br />
<br />
I turned on all the speakers with alsamixer from {{Pkg|alsa-utils}} and tried "''Analog Stereo Output''" and "''Analog Surround 4.0 Output''" with {{Pkg|pavucontrol}} but none of these configurations gives a reasonable result. The former makes the front speakers much louder than the rear ones and the latter makes the front speakers silent, testing them with:<br />
<br />
# speaker-test -c4 -l1 -twav<br />
<br />
I was able to compare the sound quality on Windows and it is clear that the bass sound is clearly missing. Is it similar for you or am I missing something ? [[User:Thenitronos|Thenitronos]] ([[User talk:Thenitronos|talk]]) 00:07, 1 February 2020 (UTC)<br />
:This is a new issue, I'm experiencing it too. [[User:Wrycode|wrycode]] ([[User talk:Wrycode|talk]]) 01:29, 1 February 2020 (UTC)<br />
:: I had the same issue with Linux kernel 5.4, but with kernel 5.3 it works (you can get it from the [[Arch Linux Archive]]) when following the [[Lenovo ThinkPad X1 Carbon (Gen 7)#Volume controls|Volume controls]] section (editing the {{ic|analog-output.conf.common}} file). I hope that [https://kernelnewbies.org/LinuxChanges#Linux_5.5.Audio 5.5] fixes this, haven't tried yet. — [[User:goetzc|Götz]] ([[User talk:goetzc|wanna talk?]]) 17:15, 1 February 2020 (UTC)<br />
:: It is also possible to set the 4.0 sound profile with {{ic|pactl set-card-profile alsa_card.pci-0000_00_1f.3 output:analog-surround-40}}, not sure if all Carbon 7th Gen use the same identifier, but that's the idea. — [[User:goetzc|Götz]] ([[User talk:goetzc|wanna talk?]])<br />
<br />
I tested the volume control section today and I can confirm it's not working. Only the bottom facing speakers fire resulting in no bass or midrange. The microphone does work well. There is some discussion of this in the following <br />
[https://gist.github.com/hamidzr/dd81e429dc86f4327ded7a2030e7d7d9 Gist.] [[User:Hackerman|Hackerman]] ([[User talk:Hackerman|talk]]) 19:05, 10 February 2020 (UTC)<br />
: Oh, that Gist is a very big configuration change! I have all four mics and four speakers working nicely (but not the kbd lights!) following the steps added by [[user:VictorTrac]], check out the [https://wiki.archlinux.org/index.php?title=Lenovo_ThinkPad_X1_Carbon_(Gen_7)&oldid=596943#Audio current edition]. Use latest repo kernel and sof-firmware, also revert any other configuration change you may have done in the past. — [[User:goetzc|Götz]] ([[User talk:goetzc|wanna talk?]])<br />
<br />
== Screen Brightness Function Keys ==<br />
<br />
Is anyone having issues getting the screen brightness function keys working? I had to install [[acpid]] and setup ACPI events and actions to handle it, along with installing the {{Pkg|acpilight}} package. <br />
<br />
My events:<br />
<br />
/etc/acpi/events/FnF5-brightnessdown<br />
# video/brightnessdown BRTDN 00000087 00000000<br />
event=video/brightnessdown<br />
action=xbacklight -dec 3<br />
<br />
/etc/acpi/events/FnF6-brightnessup<br />
# video/brightnessup BRTUP 00000086 00000000<br />
event=video/brightnessup<br />
action=xbacklight -inc 3<br />
<br />
xev doesn't recognise the brightness function keys, so I can't handle the key presses with my window manager. At least that is what I believe, please correct me if I have this all wrong. <br />
[[User:Raybangs|Raybangs]] ([[User talk:Raybangs|talk]]) 10:16, 23 August 2019 (UTC)<br />
<br />
:I didn't have to go through that to get screen brightness going. Can you tell me more about your setup? I'm using Plasma and my brightness controls worked out of the box. [[User:Johncrist1988|Johncrist1988]] ([[User talk:Johncrist1988|talk]]) 14:16, 23 August 2019 (UTC)<br />
<br />
:It works for me also, using {{pkg|brightnessctl}} (as root) or {{pkg|light}} on [[Sway]] or Plasma. — [[User:goetzc|goetzc]] ([[User talk:goetzc|wanna talk?]]) 18:50, 25 August 2019 (UTC)<br />
<br />
:Interesting. I'm using a pretty simple base Arch install with AwesomeWM. I will try {{pkg|brightnessctl}} and see how that goes. {{Unsigned|21:25, 3 September 2019 (UTC)|Raybangs}}<br />
<br />
== UEFI BIOS Update ==<br />
<br />
Currently UEFI BIOS seems to be at [https://pcsupport.lenovo.com/hn/en/products/LAPTOPS-AND-NETBOOKS/THINKPAD-X-SERIES-LAPTOPS/THINKPAD-X1-CARBON-7TH-GEN-TYPE-20QD-20QE/downloads/DS540232 version 1.16]. I am unable to find the .cab file in the link provided, on the [https://fwupd.org/lvfs/devicelist LVFS Device List], nor have had luck with web searches.<br />
<br />
I also followed instructions for [https://wiki.archlinux.org/index.php/Fwupd#Setup_for_UEFI_BIOS_upgrade | UEFI BIOS upgrade from fwupd] on the wiki. Has anyone succeeded in upgrading the firmware to the latest version on Linux? Would using the bootable iso on a USB from the first link work? According the the [https://download.lenovo.com/pccbbs/mobiles/n2hur06w.txt README] it should work (but hesitant to put the iso on USB). [[User:In0ni|In0ni]] ([[User talk:In0ni|talk]]) 22:34, 1 September 2019 (UTC)<br />
: Using the bootable iso on a USB should work fine (vs. a CD/DVD). However, I'm hesitant to upgrade because the 1.05 update is supposedly required before updating to the lates version: <br />
UEFI: ---- / ECP: 1.05<br />
- (Fix) Fixed an issue where system may hang in UEFI BIOS updating process.<br />
(Note) This package must be applied prior to n2hur04w or later package version.`<br />
:The cab files are not available yet. The only way to apply the updates (except for one that's available via fwupdmgr) is through the bootable ISO. I don't see any reason to update personally but if someone else does, please let us know how it goes. [[User:Wrycode|wrycode]] ([[User talk:Wrycode|talk]]) 20:09, 10 September 2019 (UTC)<br />
:: Just BTW for anyone else reading this, I updated via the bootable ISO and it didn't brick my device. Also, the .cab files for Linux are hidden in that link (if you click on the sorting menu, it appears to show only Windows updates but if you click on the categories the Linux files are hidden in there somewhere). [[User:Wrycode|wrycode]] ([[User talk:Wrycode|talk]]) 22:48, 17 December 2019 (UTC)<br />
::: I did upgrade it using {{ic|fwupdmgr install <file_name.cab>}}, after some specific version and restarts, the automatic updates did work using {{ic|fwupdmgr update}}. — [[User:goetzc|Götz]] ([[User talk:goetzc|wanna talk?]]) 21:52, 19 December 2019 (UTC)<br />
<br />
== <s>Why enable S3 sleep? </s>==<br />
<br />
Could someone add a small bit about why S3 sleep should be enabled? I have been using the default S0 sleep for a few weeks and don't see any issues with it. ~ [[User:Akvadrako|Akvadrako]] ([[User talk:Akvadrako|talk]]) 09:55, 10 September 2019 (UTC)<br />
:I was under the impression that S3 sleep is 'normal' sleep (everything powered off except for a trickle to the ram), but I'm not sure what modern Windows does instead. The S0 sleep state means "on", that is, the computer is not asleep, according to https://superuser.com/questions/71835/what-is-the-difference-between-these-four-sleep-states [[User:Wrycode|wrycode]] ([[User talk:Wrycode|talk]]) 04:43, 24 September 2019 (UTC)<br />
<br />
: Windows only supports S0 sleep and it’s the default, so I think it’s debatable what’s normal. But does that really matter? I’m interested in the practical difference. Maybe I’ll benchmark S3 sometime but for now I can say S0 uses about 0.5W and wakes up in about 1s. ~ [[User:Akvadrako|Akvadrako]] ([[User talk:Akvadrako|talk]]) 07:51, 24 September 2019 (UTC)<br />
:: S0 sleep isn't the traditional Suspend-to-RAM "sleep" that Linux users are expecting, that's what I meant by "normal". You are right that S0 is the default for Windows now. https://www.kernel.org/doc/Documentation/power/states.txt] has some details about the sleep states in Linux, and https://docs.microsoft.com/en-us/windows/win32/power/system-power-states has the same for Windows. It's a software-only idle, so it must use slightly more power than S3, where all components are shut down except for the ram. The Windows page claims that S0 wakes up faster than s3 (which would make sense). Another implication: Windows can do stuff after you close the laptop lid like download updates. Windows separately performs a suspend-to-disk whenever you close the lid, so if you remove the battery or the battery runs out your work will still be saved. It's possible Linux can do this too with S0. I just switched to the "Windows" sleep state from the BIOS to try it out and the wake time isn't noticeably different, but my laptop doesn't wake when I open the lid or press the power button. The only way to wake it up is to press the "Fn" key, very odd (especially because I remapped "Fn" to "Ctrl" from the BIOS, so I'm really pressing "Ctrl"). You're not seeing anything like this? [[User:Wrycode|wrycode]] ([[User talk:Wrycode|talk]]) 01:04, 16 October 2019 (UTC)<br />
<br />
:: Normally I do press the Fn button to wake, unless I'm using my external keyboard with AC, though it doesn't bother me. So it seems that and possibly some power savings are the advantages of S3. ~ [[User:Akvadrako|Akvadrako]] ([[User talk:Akvadrako|talk]]) 10:26, 16 October 2019 (UTC)<br />
<br />
== Different lspci output ==<br />
<br />
Can anyone check what's their lspci output? I have realised I am running with a completely different setup of the components myself:<br />
<br />
<div class="toccolours mw-collapsible mw-collapsed" style="width:400px; overflow:auto;"><br />
<div style="font-weight:bold;line-height:1.6;">{{ic|lspci}}</div><br />
<div class="mw-collapsible-content"><br />
{{bc|<br />
00:00.0 Host bridge: Intel Corporation Coffee Lake HOST and DRAM Controller (rev 0c)<br />
00:02.0 VGA compatible controller: Intel Corporation UHD Graphics 620 (Whiskey Lake) (rev 02)<br />
00:04.0 Signal processing controller: Intel Corporation Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor Thermal Subsystem (rev 0c)<br />
00:08.0 System peripheral: Intel Corporation Xeon E3-1200 v5/v6 / E3-1500 v5 / 6th/7th Gen Core Processor Gaussian Mixture Model<br />
00:12.0 Signal processing controller: Intel Corporation Cannon Point-LP Thermal Controller (rev 11)<br />
00:14.0 USB controller: Intel Corporation Cannon Point-LP USB 3.1 xHCI Controller (rev 11)<br />
00:14.2 RAM memory: Intel Corporation Cannon Point-LP Shared SRAM (rev 11)<br />
00:14.3 Network controller: Intel Corporation Cannon Point-LP CNVi [Wireless-AC] (rev 11)<br />
00:15.0 Serial bus controller [0c80]: Intel Corporation Cannon Point-LP Serial IO I2C Controller #0 (rev 11)<br />
00:15.1 Serial bus controller [0c80]: Intel Corporation Cannon Point-LP Serial IO I2C Controller #1 (rev 11)<br />
00:16.0 Communication controller: Intel Corporation Cannon Point-LP MEI Controller #1 (rev 11)<br />
00:1c.0 PCI bridge: Intel Corporation Cannon Point-LP PCI Express Root Port #1 (rev f1)<br />
00:1d.0 PCI bridge: Intel Corporation Cannon Point-LP PCI Express Root Port #9 (rev f1)<br />
00:1d.4 PCI bridge: Intel Corporation Cannon Point-LP PCI Express Root Port #13 (rev f1)<br />
00:1f.0 ISA bridge: Intel Corporation Cannon Point-LP LPC Controller (rev 11)<br />
00:1f.3 Audio device: Intel Corporation Cannon Point-LP High Definition Audio Controller (rev 11)<br />
00:1f.4 SMBus: Intel Corporation Cannon Point-LP SMBus Controller (rev 11)<br />
00:1f.5 Serial bus controller [0c80]: Intel Corporation Cannon Point-LP SPI Controller (rev 11)<br />
00:1f.6 Ethernet controller: Intel Corporation Ethernet Connection (6) I219-V (rev 11)<br />
02:00.0 Wireless controller [0d40]: Intel Corporation XMM7360 LTE Advanced Modem (rev 01)<br />
03:00.0 Non-Volatile memory controller: Sandisk Corp WD Black 2018/PC SN720 NVMe SSD<br />
05:00.0 PCI bridge: Intel Corporation JHL6540 Thunderbolt 3 Bridge (C step) [Alpine Ridge 4C 2016] (rev 02)<br />
06:00.0 PCI bridge: Intel Corporation JHL6540 Thunderbolt 3 Bridge (C step) [Alpine Ridge 4C 2016] (rev 02)<br />
06:01.0 PCI bridge: Intel Corporation JHL6540 Thunderbolt 3 Bridge (C step) [Alpine Ridge 4C 2016] (rev 02)<br />
06:02.0 PCI bridge: Intel Corporation JHL6540 Thunderbolt 3 Bridge (C step) [Alpine Ridge 4C 2016] (rev 02)<br />
06:04.0 PCI bridge: Intel Corporation JHL6540 Thunderbolt 3 Bridge (C step) [Alpine Ridge 4C 2016] (rev 02)<br />
07:00.0 System peripheral: Intel Corporation JHL6540 Thunderbolt 3 NHI (C step) [Alpine Ridge 4C 2016] (rev 02)<br />
2d:00.0 USB controller: Intel Corporation JHL6540 Thunderbolt 3 USB Controller (C step) [Alpine Ridge 4C 2016] (rev 02)<br />
}}<br />
</div></div><br />
<br />
Just in case, on e of the most relevant differences is that I'm not using Fibocom modem but rather the Intel XMM7360 LTE<br />
: Is the Intel XMM7360 LTE a stock configuration option? Have you gotten it to work with Linux? [[User:Wrycode|wrycode]] ([[User talk:Wrycode|talk]]) 05:48, 14 October 2019 (UTC)<br />
I don't have the same lspci output either. I'm in favor of removing that section. It takes up too much space and it's irrelevant/misleading. If we must, the other 6 X1C pages have something like this: <br />
# dmidecode -t system | grep Version<br />
Version: ThinkPad X1 Carbon 7th<br />
[[User:Wrycode|wrycode]] ([[User talk:Wrycode|talk]]) 04:59, 10 January 2020 (UTC)<br />
<br />
== Fibocom LTE now available! ==<br />
<br />
I just saw this [https://forums.lenovo.com/t5/Other-Linux-Discussions/How-To-Configure-X1-Carbon-Gen-7-on-Debian-FingerPrint-4G-Modem/td-p/4550327 Lenovo forum thread] which links to [https://github.com/abrasive/xmm7360 this tool] to flip the Fibocom into USB mode (which has a Linux driver). [[User:Wrycode|wrycode]] ([[User talk:Wrycode|talk]]) 02:49, 13 December 2019 (UTC)<br />
<br />
I did some initial testing but I need to wait for a new sim card to look deeper into this. <br />
* just install acpi_call from the official repositories<br />
* the https://github.com/abrasive/xmm7360 script works exactly as described. NOTE: the modem command interface accessible at /dev/ttyACM0 will be all kinds of broken if you have ModemManager running, so make sure to wait until you've enabled full functionality and unlocked the modem before starting ModemManager.service.<br />
* AT+GTUSBMODE=7 and AT+CFUN=15 work fine to get the modem working but first you have to issue the [https://github.com/abrasive/xmm7360#fcc-lock FCC Lock] commands.<br />
* Now you should be able to run modem-manager-gui and send and receive SMS messages<br />
* to get 4G data, separately configure a new "mobile broadband" GSM connection in Network Manager (you can just use nm-connection editor). I accepted all of the default settings, (including the "number"), except for putting my network's APN in.<br />
* Now the connection should be available to you in one of Network Manager's user interfaces. If you get an error when you select the connection like "device not available", see if /var/lib/NetworkManager/NetworkManager.state has WWANEnabled set to false; to change it you might have to mess around with /etc/NetworkManager/NetworkManager.conf or the nm-applet GUI<br />
* despite what the README says, the modem stayed accessible for me between suspends (but you have to re-run the script after a reboot) <br />
<br />
There's [https://github.com/juhovh/xmm7360_usb this alternative repository] which provides a kernel module for the modem that supposedly stays persistent between reboots. I think the author uses Debian so the makefile would have to be modified for building kernel modules on Arch. [[User:Wrycode|wrycode]] ([[User talk:Wrycode|talk]]) 21:43, 13 December 2019 (UTC)<br />
<br />
== Missing RTC device ==<br />
<br />
{{ic|hwlock --verbose}} returns:<br />
{{bc|<br />
hwclock from util-linux 2.34<br />
System Time: 1577636985.183322<br />
Trying to open: /dev/rtc0<br />
Trying to open: /dev/rtc<br />
Trying to open: /dev/misc/rtc<br />
No usable clock interface found.<br />
hwclock: Cannot access the Hardware Clock via any known method.<br />
}}<br />
<br />
Related messages from dmesg:<br />
{{bc|<br />
[ 0.764314] PM: RTC time: 15:54:28, date: 2019-12-29<br />
[ 1.438054] hctosys: unable to open rtc device (rtc0)<br />
}}<br />
Kernel 5.4.6.arch3-1<br />
[[User:Kubuxu|Kubuxu]] ([[User talk:Kubuxu|talk]]) 16:33, 29 December 2019 (UTC)<br />
: Probably a newer kernel bug because hwclock used to work but now I don't have an rtc device available in /dev/ [[User:Wrycode|wrycode]] ([[User talk:Wrycode|talk]]) 03:15, 16 January 2020 (UTC)<br />
<br />
== Incorrect ethernet dongle information? ==<br />
<br />
I believe the information in the sidebar about the native ethernet dongle has been incorrectly copied and pasted from a previous model, like it was for the [[Lenovo ThinkPad X1 Yoga (Gen 4)|X1Y4]]. Can an X1C7 owner confirm this? [[User:Andersk|Andersk]] ([[User talk:Andersk|talk]]) 06:26, 4 January 2020 (UTC)<br />
<br />
I can confirm that it works out of the box with no problems [[User:GH0S1|GH0S1]] ([[User talk:GH0S1|talk]]) 19:11, 5 January 2020 (UTC)<br />
<br />
But do you have [https://www3.lenovo.com/us/en/accessories-and-monitors/cables-and-adapters/adapters/CABLE-BO-TP-OneLink%2B-to-RJ45-Adapter/p/4X90K06975 the dongle that’s linked], as opposed to say [https://www.lenovo.com/us/en/accessories-and-monitors/cables-and-adapters/adapters/CABLE-BO-Ethernet-Extension-Adapter-2/p/4X90Q84427 this one]? All the pictures I can find suggest that the former is copied-and-pasted from previous models and won’t fit in the X1C7. [[User:Andersk|Andersk]] ([[User talk:Andersk|talk]]) 00:41, 6 January 2020 (UTC)<br />
<br />
You are right. I have the newer dongle. It doesn't look like the older and wider dongle would fit. [[User:GH0S1|GH0S1]] ([[User talk:GH0S1|talk]])<br />
<br />
Cool. Edited the link; feel free to make further edits. [[User:Andersk|Andersk]] ([[User talk:Andersk|talk]]) 01:06, 7 January 2020 (UTC)</div>Goetzchttps://wiki.archlinux.org/index.php?title=Talk:Lenovo_ThinkPad_X1_Carbon_(Gen_7)&diff=597192Talk:Lenovo ThinkPad X1 Carbon (Gen 7)2020-02-11T00:25:11Z<p>Goetzc: /* Volume Controls */ comment on how I got it working</p>
<hr />
<div>== <s>Touchpad with 5.4.x</s> ==<br />
With linux 5.4 touchpad stopped working on about 50% of bootups.<br />
With touchpad not working I'm getting following messages in dmesg.<br />
{{bc|1=<br />
[ 4.499490] i2c_designware i2c_designware.1: i2c_dw_handle_tx_abort: lost arbitration<br />
[ 5.518759] i2c_designware i2c_designware.1: controller timed out<br />
[ 5.519959] i2c_hid i2c-SYNA8005:00: failed to retrieve report from device.<br />
[ 5.521187] input: SYNA8005:00 06CB:CD8C Mouse as /devices/pci0000:00/0000:00:15.1/i2c_designware.1/i2c-9/i2c-SYNA8005:00/0018:06CB:CD8C.0001/input/input9<br />
[ 5.521337] input: SYNA8005:00 06CB:CD8C Touchpad as /devices/pci0000:00/0000:00:15.1/i2c_designware.1/i2c-9/i2c-SYNA8005:00/0018:06CB:CD8C.0001/input/input10<br />
[ 5.521442] hid-generic 0018:06CB:CD8C.0001: input,hidraw0: I2C HID v1.00 Mouse [SYNA8005:00 06CB:CD8C] on i2c-SYNA8005:00<br />
[ 6.585507] i2c_designware i2c_designware.1: controller timed out<br />
[ 6.585590] i2c_hid i2c-SYNA8005:00: failed to retrieve report from device.<br />
[ 6.585678] hid-multitouch 0018:06CB:CD8C.0001: failed to fetch feature 8<br />
[ 7.599201] i2c_designware i2c_designware.1: controller timed out<br />
[ 7.599319] i2c_hid i2c-SYNA8005:00: failed to retrieve report from device.<br />
[ 7.599385] hid-multitouch 0018:06CB:CD8C.0001: failed to fetch feature 8<br />
[ 8.612535] i2c_designware i2c_designware.1: controller timed out<br />
[ 8.612636] i2c_hid i2c-SYNA8005:00: failed to retrieve report from device.<br />
[ 8.612711] hid-multitouch 0018:06CB:CD8C.0001: failed to fetch feature 7<br />
[ 9.625537] i2c_designware i2c_designware.1: controller timed out<br />
[ 9.625642] i2c_hid i2c-SYNA8005:00: failed to retrieve report from device.<br />
[ 9.625873] input: SYNA8005:00 06CB:CD8C Mouse as /devices/pci0000:00/0000:00:15.1/i2c_designware.1/i2c-9/i2c-SYNA8005:00/0018:06CB:CD8C.0001/input/input19<br />
[ 9.626417] input: SYNA8005:00 06CB:CD8C Touchpad as /devices/pci0000:00/0000:00:15.1/i2c_designware.1/i2c-9/i2c-SYNA8005:00/0018:06CB:CD8C.0001/input/input20<br />
[ 9.627084] hid-multitouch 0018:06CB:CD8C.0001: input,hidraw0: I2C HID v1.00 Mouse [SYNA8005:00 06CB:CD8C] on i2c-SYNA8005:00<br />
[ 10.132275] kauditd_printk_skb: 15 callbacks suppressed'<br />
[ 10.639147] i2c_designware i2c_designware.1: controller timed out<br />
[ 10.639250] i2c_hid i2c-SYNA8005:00: failed to set a report to device.<br />
[ 11.652134] i2c_designware i2c_designware.1: controller timed out<br />
[ 11.652167] i2c_hid i2c-SYNA8005:00: failed to set a report to device.<br />
[ 12.668764] i2c_designware i2c_designware.1: controller timed out<br />
[ 12.668795] i2c_hid i2c-SYNA8005:00: failed to set a report to device.<br />
[ 13.678765] i2c_designware i2c_designware.1: controller timed out<br />
[ 14.692095] i2c_designware i2c_designware.1: controller timed out<br />
[ every second ...]<br />
[ 26.852160] i2c_designware i2c_designware.1: controller timed out<br />
}} [[User:Kubuxu|Kubuxu]] ([[User talk:Kubuxu|talk]]) 13:47, 16 December 2019 (UTC)<br />
: This might be totally unrelated, but I had both sleep and touchpad break the other day and temporarily fixed it with the snd_hda_intel.dmic_detect=0 kernel option (see [https://old.reddit.com/r/archlinux/comments/e5oe4p/systemctl_suspend_causes_freeze/?st=k49hi5rf&sh=0c42e7c9 this] [[User:Wrycode|wrycode]] ([[User talk:Wrycode|talk]]) 06:28, 17 December 2019 (UTC)<br />
: I have {{ic|snd_hda_intel}} blacklisted to make sure that SOF is used. So far I had one SOF related DSP crash but apart from that SOF seems fine. There is also touchpad firmware update I've applied, I will let you all now about the results. [[User:Kubuxu|Kubuxu]] ([[User talk:Kubuxu|talk]]) 12:11, 17 December 2019 (UTC)<br />
: After updating Touchpad firware (using {{ic|fwupdmgr}}) to 1.3.3013412 problem seems to be resolved. [[User:Kubuxu|Kubuxu]] ([[User talk:Kubuxu|talk]]) 12:43, 27 December 2019 (UTC)<br />
:: Confirmed here as well [[User:Wrycode|wrycode]] ([[User talk:Wrycode|talk]]) 02:42, 28 December 2019 (UTC)<br />
:: Did anyone experience issues with updating this firmware with {{ic|fwupdmgr}}? I continuously get {{ic|1=No upgrades for Touchpad: current version is 1.3.3013337: 1.3.3013337=same}}. I even tried to download the .cab file and use {{ic|fwupdmgr install}} and get {{ic|No supported devices found}} [[User:In0ni|In0ni]] ([[User talk:In0ni|talk]]) 00:20, 7 January 2020 (UTC)<br />
::: Seems like you have the latest update already. [[User:Wrycode|wrycode]] ([[User talk:Wrycode|talk]]) 18:18, 7 January 2020 (UTC)<br />
:::: Latest firmware should be 1.3.3013412 -- not 1.3.3013337. I'm having the issue this discussion is talking about which the latest version fixes. What version of the firmware did you update to? [[User:In0ni|In0ni]] ([[User talk:In0ni|talk]]) 04:19, 9 January 2020 (UTC)<br />
::::: Sorry, I assumed 1.3.3013412 and 1.3.3013337 were the same version or something (the version is listed as "PR3013337/PR3013412" in the Readme on Lenovo's site. I updated to 1.3.3013337 from 1.1.2949533 and my touchpad issues went away. But if you're still having issues with the touchpad then maybe it wasn't actually the firmware update that fixed it for me? I'm on kernel 5.4.8 and everything works except for the microphone. [[User:Wrycode|wrycode]] ([[User talk:Wrycode|talk]]) 04:38, 10 January 2020 (UTC)<br />
: Updated Wiki page with the info [[User:Kubuxu|Kubuxu]] ([[User talk:Kubuxu|talk]]) 17:38, 29 December 2019 (UTC)<br />
: Where are you getting the firmware? The only version I can find is an exe [[User:Mondoman712|Mondoman712]] ([[User talk:Mondoman712|talk]]) 14:07, 23 January 2020 (UTC)<br />
:: I'm using fwupdmgr [[User:Kubuxu|Kubuxu]] ([[User talk:Kubuxu|talk]]) 17:14, 23 January 2020 (UTC)<br />
::: The touchpad wasn't showing up for me there, but it wasn't working when I tried so I rebooted and then it appeared. [[User:Mondoman712|Mondoman712]] ([[User talk:Mondoman712|talk]]) 18:19, 23 January 2020 (UTC)<br />
<br />
== Microphone ==<br />
Did you get your microphone to work neither alsamixer or pavucontrol seem to detect a microphone. ? [[User:Nitrobay|Nitrobay]] ([[User talk:Nitrobay|talk]]) 11:38, 17 August 2019 (UTC)<br />
: I can confirm using [[Advanced_Linux_Sound_Architecture/Troubleshooting#Microphone|this test]], only externally connected microphones work. — [[User:goetzc|goetzc]] ([[User talk:goetzc|wanna talk?]]) 14:24, 17 August 2019 (UTC)<br />
: Looks like Linux kernel 5.3 will include the [https://thesofproject.github.io/latest/index.html SOF firmware update] with the fix for the microphone. — [[User:goetzc|goetzc]] ([[User talk:goetzc|wanna talk?]]) 14:25, 6 September 2019 (UTC)<br />
: After updating to Linux kernel 5.3.1 the microphone still does not work [[User:Moreka|Moreka]] ([[User talk:Moreka|talk]]) 17:30, 23 September 2019 (UTC) [[User:Moreka]] 17:30, 23 September 2019 (UTC)<br />
: I found a configuration that makes the microphones to work ;) but couldn't paste the instructions or a link to them. I created a forum post under Laptop Issues and titled [SOLVED] Fix for microphone on Lenovo X1 Gen 7 [[User:Alphazo|Alphazo]] ([[User talk:Alphazo|talk]]) 10:15, 13 October 2019 (UTC)<br />
: Like others, I wasn't able to get microphone working by following that guide. My results are identical to that of "Mocco" from that forum. Unless I'm misunderstanding the sidebar, I think we should flag microphone to "not working" for this page. [[User:Parth|Parth]] ([[User talk:Parth|talk]]) 23:54, 20 October 2019 (UTC)<br />
: I wasn't able to get microphone working by following that guide as well. I also think we should flag microphone to "not working" for this page. [[User:Moreka|Moreka]] 06:04, 22 October 2019 (UTC)<br />
: Managed to get it working following Alphazo's guide. There are a few typos however, I indicated the required fix in post #9. Hope it helps. [[User:Tbw|Tbw]] ([[User talk:Tbw|talk]]) 21:23, 22 October 2019 (UTC)<br />
: I'll give it another shot and report back [[User:Parth|Parth]] ([[User talk:Parth|talk]]) 17:17, 30 October 2019 (UTC)<br />
: I was able to make the microphone + sound playback work with following the Lenovo docx file and using the sof-hda-generic.tplg and sof-cnl.ri provided in the latest linux firmware package shipped with ubuntu (just download the package and copy the two files in the correct directories). Also the changes in /etc/pulse/default.pa are not necessary. [[User:moreka|moreka]] 17:08, 31 October 2019 (UTC)<br />
: With recent kernel the SOF was disabled [https://bugs.archlinux.org/task/63464]. Solution for me was to install linux-pf and disable CONFIG_SND_SOC_INTEL_SST, enable SOT. [[User:Kubuxu|Kubuxu]] ([[User talk:Kubuxu|talk]]) 14:12, 19 November 2019 (UTC)<br />
: Please test with [https://git.archlinux.org/svntogit/packages.git/log/trunk?h=packages/linux&id=d6bbb261bd2c8f83b9c93041dae9aa4175e20e6e linux 5.4.1-arch1] (in testing) and [https://www.archlinux.org/packages/extra/any/sof-firmware/ sof-firmware] (new). SOF is re-enabled except on Broadwell/Baytrail platforms. [[User:Dpward|Dpward]] ([[User talk:Dpward|talk]]) 17:42, 1 December 2019 (UTC)<br />
: I tested with the new kernel and sof-firmware package (from the Arch repositories). Doing the configs as in the docx file, the sound works well, but the microphone records sounds in a wrong way; it sounds as if it is slow-motion. [[User:moreka]] 15:16, 3 December 2019 (UTC)<br />
: I experienced the same issue like moreka after installing the current kernel (5.4.2.arch1-1) and sof-firmware (1.3.1-1) from the core repo. Also since sof is in use the speakers only provide stereo audio and not using the 4.0 channel profile. [[User:Bin101|Bin101]] ([[User talk:Bin101|talk]]) 19:09, 6 December 2019 (UTC)<br />
: When using {{pkg|sof-firmware}} version 1.4.1 (and latest kernel 5.4.2) the sound card doesn't get recognized at all. Reverting back to sof-firmware 1.3.1 makes the card work again, in the same way explained by users Moreka and Bin101. — [[User:goetzc|Götz]] ([[User talk:goetzc|wanna talk?]]) 13:33, 9 December 2019 (UTC)<br />
: Yeah a whole host of things broke for me in 5.4.2: hibernate, touchpad & sound all broke for me in 5.4.2. [[User:Parth|Parth]] ([[User talk:Parth|talk]]) 04:43, 10 December 2019 (UTC)<br />
: With 5.4.3 the Mic works with custom topology file {{ic|sof-hda-generic-4ch.tplg}}. The touchpad is broken on about 50% of bootups. I will start a new thread about it. [[User:Kubuxu|Kubuxu]] ([[User talk:Kubuxu|talk]]) 13:37, 16 December 2019 (UTC)<br />
: <s>I was (finally!) able to get the mic to work on a HP EliteBook x360 1030 G4, using kernel 5.4.1 and sof-firmware 1.3.1.</s> Spoke too soon. Not working after all. Details [https://bbs.archlinux.org/viewtopic.php?pid=1878341#p1878341 here]. [[User:Darose|Darose]] 21:18, 18 December 2019 (UTC)<br />
: Still problematic with kernel 5.5-rc6 (compiled myself). Just the two top speakers are firing (not the rear ones). Super annoying. The microphone works, though... Using sof-firmware 1.3 (from Arch repo) [[User:Moreka]] 14:18, 17 January 2020<br />
: For me, it was necessary, to add ''/etc/modprobe.d/alsa.conf'' containing {{ic|options snd slots&#61;,snd_usb_audio}}. [[User:Jaydoe|Jaydoe]] ([[User talk:Jaydoe|talk]]) 10:18, 9 February 2020 (UTC)<br />
<br />
== <s>Disabling red LED in Thinkpad logo stops</s> ==<br />
<br />
This service doesn't work after a suspend. [[User:Wrycode|wrycode]] ([[User talk:Wrycode|talk]]) 15:36, 9 August 2019 (UTC)<br />
I removed the script and systemd service. They were copied verbatim from the Gen 6 page and don't work as described.[[User:Wrycode|wrycode]] ([[User talk:Wrycode|talk]]) 05:10, 10 January 2020 (UTC)<br />
<br />
== Volume Controls ==<br />
<br />
The section [[Lenovo_ThinkPad_X1_Carbon_(Gen_7)#Volume_Controls|Volume Controls]] fixes the quite/loud volume control, but seems <s>to disable</s> (they are already disabled) the two top-firing speakers, only the two bottom-firing sub-woofers are enabled. --[[User:Goetzc|Goetzc]] ([[User talk:Goetzc|talk]]) 17:12, 9 August 2019 (UTC)<br />
: So this seems to fix the volume control indeed, but the top-firing speakers were already and are still muted, might be a driver bug, but a workaround from another Dolby Atmos laptop might work here. --[[User:Goetzc|Goetzc]] ([[User talk:Goetzc|talk]]) 17:32, 9 August 2019 (UTC)<br />
:: Did you remember to run alsamixer from {{Pkg|alsa-utils}} after installation and turn on/equalize all of the speakers? Mine (top and bottom) are working fine. [[User:Wrycode|wrycode]] ([[User talk:Wrycode|talk]]) 03:54, 13 August 2019 (UTC)<br />
::: You are correct Wrycode, thanks! The "''Master''" volume was low, rising it to 100% makes the top speakers work as expected :) Will add this to the section. <br />
::: Do you happen to know how to make this change (setting the "''Element Master''") so that it's not done on the system {{ic|analog-output.conf.common}} file, and thus the change survives when PulseAudio package is updated? — [[User:goetzc|goetzc]] ([[User talk:goetzc|wanna talk?]])<br />
:::: I did some digging around and I can't find a way to do this. Pulseaudio might not have a user config option for the alsa paths in /usr/. Added the NoUpgrade workaround on the main page. [[User:Wrycode|wrycode]] ([[User talk:Wrycode|talk]]) 02:05, 20 August 2019 (UTC)<br />
<br />
:There is [https://askubuntu.com/a/988993/509340 this interesting] method, which uses 'hdajackretask' from the {{pkg|alsa-tools}} package to remap some pins. The comment is for a different laptop (Asus UX550 using Realtek ALC295), but it exhibits the same issue. We would need to determine the correct pins for this hardware (Realtek ALC285), don't know how, though. — [[User:goetzc|goetzc]] ([[User talk:goetzc|wanna talk?]]) 19:08, 25 August 2019 (UTC)<br />
<br />
I turned on all the speakers with alsamixer from {{Pkg|alsa-utils}} and tried "''Analog Stereo Output''" and "''Analog Surround 4.0 Output''" with {{Pkg|pavucontrol}} but none of these configurations gives a reasonable result. The former makes the front speakers much louder than the rear ones and the latter makes the front speakers silent, testing them with:<br />
<br />
# speaker-test -c4 -l1 -twav<br />
<br />
I was able to compare the sound quality on Windows and it is clear that the bass sound is clearly missing. Is it similar for you or am I missing something ? [[User:Thenitronos|Thenitronos]] ([[User talk:Thenitronos|talk]]) 00:07, 1 February 2020 (UTC)<br />
:This is a new issue, I'm experiencing it too. [[User:Wrycode|wrycode]] ([[User talk:Wrycode|talk]]) 01:29, 1 February 2020 (UTC)<br />
:: I had the same issue with Linux kernel 5.4, but with kernel 5.3 it works (you can get it from the [[Arch Linux Archive]]) when following the [[Lenovo ThinkPad X1 Carbon (Gen 7)#Volume controls|Volume controls]] section (editing the {{ic|analog-output.conf.common}} file). I hope that [https://kernelnewbies.org/LinuxChanges#Linux_5.5.Audio 5.5] fixes this, haven't tried yet. — [[User:goetzc|Götz]] ([[User talk:goetzc|wanna talk?]]) 17:15, 1 February 2020 (UTC)<br />
:: It is also possible to set the 4.0 sound profile with {{ic|pactl set-card-profile alsa_card.pci-0000_00_1f.3 output:analog-surround-40}}, not sure if all Carbon 7th Gen use the same identifier, but that's the idea. — [[User:goetzc|Götz]] ([[User talk:goetzc|wanna talk?]])<br />
<br />
I tested the volume control section today and I can confirm it's not working. Only the bottom facing speakers fire resulting in no bass or midrange. The microphone does work well. There is some discussion of this in the following <br />
[https://gist.github.com/hamidzr/dd81e429dc86f4327ded7a2030e7d7d9 Gist.] [[User:Hackerman|Hackerman]] ([[User talk:Hackerman|talk]]) 19:05, 10 February 2020 (UTC)<br />
: Oh, that Gist is a very big configuration change! I have all four mics and four speakers working nicely (but not the kbd lights!) following the steps added by [[user:VictorTrac]], check out the [https://wiki.archlinux.org/index.php?title=Lenovo_ThinkPad_X1_Carbon_(Gen_7)&oldid=596943#Audio current edition]. Use latest repo kernel and sof-firmware, also revert any other configuration change you may have done in the past. — [[User:goetzc|Götz]] ([[User talk:goetzc|wanna talk?]])<br />
<br />
== Screen Brightness Function Keys ==<br />
<br />
Is anyone having issues getting the screen brightness function keys working? I had to install [[acpid]] and setup ACPI events and actions to handle it, along with installing the {{Pkg|acpilight}} package. <br />
<br />
My events:<br />
<br />
/etc/acpi/events/FnF5-brightnessdown<br />
# video/brightnessdown BRTDN 00000087 00000000<br />
event=video/brightnessdown<br />
action=xbacklight -dec 3<br />
<br />
/etc/acpi/events/FnF6-brightnessup<br />
# video/brightnessup BRTUP 00000086 00000000<br />
event=video/brightnessup<br />
action=xbacklight -inc 3<br />
<br />
xev doesn't recognise the brightness function keys, so I can't handle the key presses with my window manager. At least that is what I believe, please correct me if I have this all wrong. <br />
[[User:Raybangs|Raybangs]] ([[User talk:Raybangs|talk]]) 10:16, 23 August 2019 (UTC)<br />
<br />
:I didn't have to go through that to get screen brightness going. Can you tell me more about your setup? I'm using Plasma and my brightness controls worked out of the box. [[User:Johncrist1988|Johncrist1988]] ([[User talk:Johncrist1988|talk]]) 14:16, 23 August 2019 (UTC)<br />
<br />
:It works for me also, using {{pkg|brightnessctl}} (as root) or {{pkg|light}} on [[Sway]] or Plasma. — [[User:goetzc|goetzc]] ([[User talk:goetzc|wanna talk?]]) 18:50, 25 August 2019 (UTC)<br />
<br />
:Interesting. I'm using a pretty simple base Arch install with AwesomeWM. I will try {{pkg|brightnessctl}} and see how that goes. {{Unsigned|21:25, 3 September 2019 (UTC)|Raybangs}}<br />
<br />
== UEFI BIOS Update ==<br />
<br />
Currently UEFI BIOS seems to be at [https://pcsupport.lenovo.com/hn/en/products/LAPTOPS-AND-NETBOOKS/THINKPAD-X-SERIES-LAPTOPS/THINKPAD-X1-CARBON-7TH-GEN-TYPE-20QD-20QE/downloads/DS540232 version 1.16]. I am unable to find the .cab file in the link provided, on the [https://fwupd.org/lvfs/devicelist LVFS Device List], nor have had luck with web searches.<br />
<br />
I also followed instructions for [https://wiki.archlinux.org/index.php/Fwupd#Setup_for_UEFI_BIOS_upgrade | UEFI BIOS upgrade from fwupd] on the wiki. Has anyone succeeded in upgrading the firmware to the latest version on Linux? Would using the bootable iso on a USB from the first link work? According the the [https://download.lenovo.com/pccbbs/mobiles/n2hur06w.txt README] it should work (but hesitant to put the iso on USB). [[User:In0ni|In0ni]] ([[User talk:In0ni|talk]]) 22:34, 1 September 2019 (UTC)<br />
: Using the bootable iso on a USB should work fine (vs. a CD/DVD). However, I'm hesitant to upgrade because the 1.05 update is supposedly required before updating to the lates version: <br />
UEFI: ---- / ECP: 1.05<br />
- (Fix) Fixed an issue where system may hang in UEFI BIOS updating process.<br />
(Note) This package must be applied prior to n2hur04w or later package version.`<br />
:The cab files are not available yet. The only way to apply the updates (except for one that's available via fwupdmgr) is through the bootable ISO. I don't see any reason to update personally but if someone else does, please let us know how it goes. [[User:Wrycode|wrycode]] ([[User talk:Wrycode|talk]]) 20:09, 10 September 2019 (UTC)<br />
:: Just BTW for anyone else reading this, I updated via the bootable ISO and it didn't brick my device. Also, the .cab files for Linux are hidden in that link (if you click on the sorting menu, it appears to show only Windows updates but if you click on the categories the Linux files are hidden in there somewhere). [[User:Wrycode|wrycode]] ([[User talk:Wrycode|talk]]) 22:48, 17 December 2019 (UTC)<br />
::: I did upgrade it using {{ic|fwupdmgr install <file_name.cab>}}, after some specific version and restarts, the automatic updates did work using {{ic|fwupdmgr update}}. — [[User:goetzc|Götz]] ([[User talk:goetzc|wanna talk?]]) 21:52, 19 December 2019 (UTC)<br />
<br />
== <s>Why enable S3 sleep? </s>==<br />
<br />
Could someone add a small bit about why S3 sleep should be enabled? I have been using the default S0 sleep for a few weeks and don't see any issues with it. ~ [[User:Akvadrako|Akvadrako]] ([[User talk:Akvadrako|talk]]) 09:55, 10 September 2019 (UTC)<br />
:I was under the impression that S3 sleep is 'normal' sleep (everything powered off except for a trickle to the ram), but I'm not sure what modern Windows does instead. The S0 sleep state means "on", that is, the computer is not asleep, according to https://superuser.com/questions/71835/what-is-the-difference-between-these-four-sleep-states [[User:Wrycode|wrycode]] ([[User talk:Wrycode|talk]]) 04:43, 24 September 2019 (UTC)<br />
<br />
: Windows only supports S0 sleep and it’s the default, so I think it’s debatable what’s normal. But does that really matter? I’m interested in the practical difference. Maybe I’ll benchmark S3 sometime but for now I can say S0 uses about 0.5W and wakes up in about 1s. ~ [[User:Akvadrako|Akvadrako]] ([[User talk:Akvadrako|talk]]) 07:51, 24 September 2019 (UTC)<br />
:: S0 sleep isn't the traditional Suspend-to-RAM "sleep" that Linux users are expecting, that's what I meant by "normal". You are right that S0 is the default for Windows now. https://www.kernel.org/doc/Documentation/power/states.txt] has some details about the sleep states in Linux, and https://docs.microsoft.com/en-us/windows/win32/power/system-power-states has the same for Windows. It's a software-only idle, so it must use slightly more power than S3, where all components are shut down except for the ram. The Windows page claims that S0 wakes up faster than s3 (which would make sense). Another implication: Windows can do stuff after you close the laptop lid like download updates. Windows separately performs a suspend-to-disk whenever you close the lid, so if you remove the battery or the battery runs out your work will still be saved. It's possible Linux can do this too with S0. I just switched to the "Windows" sleep state from the BIOS to try it out and the wake time isn't noticeably different, but my laptop doesn't wake when I open the lid or press the power button. The only way to wake it up is to press the "Fn" key, very odd (especially because I remapped "Fn" to "Ctrl" from the BIOS, so I'm really pressing "Ctrl"). You're not seeing anything like this? [[User:Wrycode|wrycode]] ([[User talk:Wrycode|talk]]) 01:04, 16 October 2019 (UTC)<br />
<br />
:: Normally I do press the Fn button to wake, unless I'm using my external keyboard with AC, though it doesn't bother me. So it seems that and possibly some power savings are the advantages of S3. ~ [[User:Akvadrako|Akvadrako]] ([[User talk:Akvadrako|talk]]) 10:26, 16 October 2019 (UTC)<br />
<br />
== Different lspci output ==<br />
<br />
Can anyone check what's their lspci output? I have realised I am running with a completely different setup of the components myself:<br />
<br />
<div class="toccolours mw-collapsible mw-collapsed" style="width:400px; overflow:auto;"><br />
<div style="font-weight:bold;line-height:1.6;">{{ic|lspci}}</div><br />
<div class="mw-collapsible-content"><br />
{{bc|<br />
00:00.0 Host bridge: Intel Corporation Coffee Lake HOST and DRAM Controller (rev 0c)<br />
00:02.0 VGA compatible controller: Intel Corporation UHD Graphics 620 (Whiskey Lake) (rev 02)<br />
00:04.0 Signal processing controller: Intel Corporation Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor Thermal Subsystem (rev 0c)<br />
00:08.0 System peripheral: Intel Corporation Xeon E3-1200 v5/v6 / E3-1500 v5 / 6th/7th Gen Core Processor Gaussian Mixture Model<br />
00:12.0 Signal processing controller: Intel Corporation Cannon Point-LP Thermal Controller (rev 11)<br />
00:14.0 USB controller: Intel Corporation Cannon Point-LP USB 3.1 xHCI Controller (rev 11)<br />
00:14.2 RAM memory: Intel Corporation Cannon Point-LP Shared SRAM (rev 11)<br />
00:14.3 Network controller: Intel Corporation Cannon Point-LP CNVi [Wireless-AC] (rev 11)<br />
00:15.0 Serial bus controller [0c80]: Intel Corporation Cannon Point-LP Serial IO I2C Controller #0 (rev 11)<br />
00:15.1 Serial bus controller [0c80]: Intel Corporation Cannon Point-LP Serial IO I2C Controller #1 (rev 11)<br />
00:16.0 Communication controller: Intel Corporation Cannon Point-LP MEI Controller #1 (rev 11)<br />
00:1c.0 PCI bridge: Intel Corporation Cannon Point-LP PCI Express Root Port #1 (rev f1)<br />
00:1d.0 PCI bridge: Intel Corporation Cannon Point-LP PCI Express Root Port #9 (rev f1)<br />
00:1d.4 PCI bridge: Intel Corporation Cannon Point-LP PCI Express Root Port #13 (rev f1)<br />
00:1f.0 ISA bridge: Intel Corporation Cannon Point-LP LPC Controller (rev 11)<br />
00:1f.3 Audio device: Intel Corporation Cannon Point-LP High Definition Audio Controller (rev 11)<br />
00:1f.4 SMBus: Intel Corporation Cannon Point-LP SMBus Controller (rev 11)<br />
00:1f.5 Serial bus controller [0c80]: Intel Corporation Cannon Point-LP SPI Controller (rev 11)<br />
00:1f.6 Ethernet controller: Intel Corporation Ethernet Connection (6) I219-V (rev 11)<br />
02:00.0 Wireless controller [0d40]: Intel Corporation XMM7360 LTE Advanced Modem (rev 01)<br />
03:00.0 Non-Volatile memory controller: Sandisk Corp WD Black 2018/PC SN720 NVMe SSD<br />
05:00.0 PCI bridge: Intel Corporation JHL6540 Thunderbolt 3 Bridge (C step) [Alpine Ridge 4C 2016] (rev 02)<br />
06:00.0 PCI bridge: Intel Corporation JHL6540 Thunderbolt 3 Bridge (C step) [Alpine Ridge 4C 2016] (rev 02)<br />
06:01.0 PCI bridge: Intel Corporation JHL6540 Thunderbolt 3 Bridge (C step) [Alpine Ridge 4C 2016] (rev 02)<br />
06:02.0 PCI bridge: Intel Corporation JHL6540 Thunderbolt 3 Bridge (C step) [Alpine Ridge 4C 2016] (rev 02)<br />
06:04.0 PCI bridge: Intel Corporation JHL6540 Thunderbolt 3 Bridge (C step) [Alpine Ridge 4C 2016] (rev 02)<br />
07:00.0 System peripheral: Intel Corporation JHL6540 Thunderbolt 3 NHI (C step) [Alpine Ridge 4C 2016] (rev 02)<br />
2d:00.0 USB controller: Intel Corporation JHL6540 Thunderbolt 3 USB Controller (C step) [Alpine Ridge 4C 2016] (rev 02)<br />
}}<br />
</div></div><br />
<br />
Just in case, on e of the most relevant differences is that I'm not using Fibocom modem but rather the Intel XMM7360 LTE<br />
: Is the Intel XMM7360 LTE a stock configuration option? Have you gotten it to work with Linux? [[User:Wrycode|wrycode]] ([[User talk:Wrycode|talk]]) 05:48, 14 October 2019 (UTC)<br />
I don't have the same lspci output either. I'm in favor of removing that section. It takes up too much space and it's irrelevant/misleading. If we must, the other 6 X1C pages have something like this: <br />
# dmidecode -t system | grep Version<br />
Version: ThinkPad X1 Carbon 7th<br />
[[User:Wrycode|wrycode]] ([[User talk:Wrycode|talk]]) 04:59, 10 January 2020 (UTC)<br />
<br />
== Fibocom LTE now available! ==<br />
<br />
I just saw this [https://forums.lenovo.com/t5/Other-Linux-Discussions/How-To-Configure-X1-Carbon-Gen-7-on-Debian-FingerPrint-4G-Modem/td-p/4550327 Lenovo forum thread] which links to [https://github.com/abrasive/xmm7360 this tool] to flip the Fibocom into USB mode (which has a Linux driver). [[User:Wrycode|wrycode]] ([[User talk:Wrycode|talk]]) 02:49, 13 December 2019 (UTC)<br />
<br />
I did some initial testing but I need to wait for a new sim card to look deeper into this. <br />
* just install acpi_call from the official repositories<br />
* the https://github.com/abrasive/xmm7360 script works exactly as described. NOTE: the modem command interface accessible at /dev/ttyACM0 will be all kinds of broken if you have ModemManager running, so make sure to wait until you've enabled full functionality and unlocked the modem before starting ModemManager.service.<br />
* AT+GTUSBMODE=7 and AT+CFUN=15 work fine to get the modem working but first you have to issue the [https://github.com/abrasive/xmm7360#fcc-lock FCC Lock] commands.<br />
* Now you should be able to run modem-manager-gui and send and receive SMS messages<br />
* to get 4G data, separately configure a new "mobile broadband" GSM connection in Network Manager (you can just use nm-connection editor). I accepted all of the default settings, (including the "number"), except for putting my network's APN in.<br />
* Now the connection should be available to you in one of Network Manager's user interfaces. If you get an error when you select the connection like "device not available", see if /var/lib/NetworkManager/NetworkManager.state has WWANEnabled set to false; to change it you might have to mess around with /etc/NetworkManager/NetworkManager.conf or the nm-applet GUI<br />
* despite what the README says, the modem stayed accessible for me between suspends (but you have to re-run the script after a reboot) <br />
<br />
There's [https://github.com/juhovh/xmm7360_usb this alternative repository] which provides a kernel module for the modem that supposedly stays persistent between reboots. I think the author uses Debian so the makefile would have to be modified for building kernel modules on Arch. [[User:Wrycode|wrycode]] ([[User talk:Wrycode|talk]]) 21:43, 13 December 2019 (UTC)<br />
<br />
== Missing RTC device ==<br />
<br />
{{ic|hwlock --verbose}} returns:<br />
{{bc|<br />
hwclock from util-linux 2.34<br />
System Time: 1577636985.183322<br />
Trying to open: /dev/rtc0<br />
Trying to open: /dev/rtc<br />
Trying to open: /dev/misc/rtc<br />
No usable clock interface found.<br />
hwclock: Cannot access the Hardware Clock via any known method.<br />
}}<br />
<br />
Related messages from dmesg:<br />
{{bc|<br />
[ 0.764314] PM: RTC time: 15:54:28, date: 2019-12-29<br />
[ 1.438054] hctosys: unable to open rtc device (rtc0)<br />
}}<br />
Kernel 5.4.6.arch3-1<br />
[[User:Kubuxu|Kubuxu]] ([[User talk:Kubuxu|talk]]) 16:33, 29 December 2019 (UTC)<br />
: Probably a newer kernel bug because hwclock used to work but now I don't have an rtc device available in /dev/ [[User:Wrycode|wrycode]] ([[User talk:Wrycode|talk]]) 03:15, 16 January 2020 (UTC)<br />
<br />
== Incorrect ethernet dongle information? ==<br />
<br />
I believe the information in the sidebar about the native ethernet dongle has been incorrectly copied and pasted from a previous model, like it was for the [[Lenovo ThinkPad X1 Yoga (Gen 4)|X1Y4]]. Can an X1C7 owner confirm this? [[User:Andersk|Andersk]] ([[User talk:Andersk|talk]]) 06:26, 4 January 2020 (UTC)<br />
<br />
I can confirm that it works out of the box with no problems [[User:GH0S1|GH0S1]] ([[User talk:GH0S1|talk]]) 19:11, 5 January 2020 (UTC)<br />
<br />
But do you have [https://www3.lenovo.com/us/en/accessories-and-monitors/cables-and-adapters/adapters/CABLE-BO-TP-OneLink%2B-to-RJ45-Adapter/p/4X90K06975 the dongle that’s linked], as opposed to say [https://www.lenovo.com/us/en/accessories-and-monitors/cables-and-adapters/adapters/CABLE-BO-Ethernet-Extension-Adapter-2/p/4X90Q84427 this one]? All the pictures I can find suggest that the former is copied-and-pasted from previous models and won’t fit in the X1C7. [[User:Andersk|Andersk]] ([[User talk:Andersk|talk]]) 00:41, 6 January 2020 (UTC)<br />
<br />
You are right. I have the newer dongle. It doesn't look like the older and wider dongle would fit. [[User:GH0S1|GH0S1]] ([[User talk:GH0S1|talk]])<br />
<br />
Cool. Edited the link; feel free to make further edits. [[User:Andersk|Andersk]] ([[User talk:Andersk|talk]]) 01:06, 7 January 2020 (UTC)</div>Goetzchttps://wiki.archlinux.org/index.php?title=Lenovo_ThinkPad_X1_Carbon_(Gen_7)&diff=596943Lenovo ThinkPad X1 Carbon (Gen 7)2020-02-07T18:35:39Z<p>Goetzc: /* Fingerprint sensor */ add info from top template</p>
<hr />
<div>[[Category:Lenovo]]<br />
[[ja:Lenovo ThinkPad X1 Carbon (Gen 7)]]<br />
{{Related articles start}}<br />
{{Related|Lenovo ThinkPad X1 Carbon}}<br />
{{Related|Lenovo ThinkPad X1 Carbon (Gen 2)}}<br />
{{Related|Lenovo ThinkPad X1 Carbon (Gen 3)}}<br />
{{Related|Lenovo ThinkPad X1 Carbon (Gen 4)}}<br />
{{Related|Lenovo ThinkPad X1 Carbon (Gen 5)}}<br />
{{Related|Lenovo ThinkPad X1 Carbon (Gen 6)}}<br />
{{Related|Lenovo ThinkPad X1 Yoga (Gen 3)}}<br />
{{Related|Lenovo ThinkPad X1 Yoga (Gen 4)}}<br />
{{Related articles end}}<br />
<br />
{{tip| A great resource for thinkpads is https://www.thinkwiki.org/wiki/ThinkWiki}}<br />
<br />
The Lenovo ThinkPad X1 Carbon, 7th generation is an ultrabook introduced in early 2019. It features a 14" screen, 8th-gen or 10th-gen Intel Core processors and integrated [[Intel graphics|Intel UHD 620 graphics]].<br />
<br />
To ensure you have this version, [[install]] the package {{Pkg|dmidecode}} and run:<br />
<br />
{{bc|# sudo dmidecode -s system-version<br />
ThinkPad X1 Carbon 7th<br />
}}<br />
<br />
{| class="wikitable" style="float: right; clear: right; margin: 0 0 0.5em 0.5em; max-width: 420px; width: 100%;"<br />
| '''Device''' || '''Working''' || '''Modules'''<br />
|-<br />
| [[Intel graphics]] || {{Yes}} || i915, (intel_agp)<br />
|-<br />
| [[Wireless network configuration#iwlwifi|Wireless network]] || {{Yes}} || iwlmvm<br />
|-<br />
| Native Ethernet with [https://www.lenovo.com/us/en/accessories-and-monitors/cables-and-adapters/adapters/CABLE-BO-Ethernet-Extension-Adapter-2/p/4X90Q84427 dongle] || {{Yes}} || ?<br />
|-<br />
| Mobile broadband Fibocom || {{Yes}}¹ || ?<br />
|-<br />
| Audio || {{Yes}} || snd_hda_intel<br />
|-<br />
| Microphone || {{Yes}}⁴ || snd_sof<br />
|-<br />
| [[Touchpad]] || {{Yes}} || psmouse, rmi_smbus, i2c_i801<br />
|-<br />
| [[TrackPoint]] || {{Yes}} || psmouse, rmi_smbus, i2c_i801<br />
|-<br />
| Camera || {{Yes}} || uvcvideo<br />
|-<br />
| [[fprint|Fingerprint reader]] || {{Y|Partial}}² || ?<br />
|-<br />
| [[Power management]] || {{Yes}}³ || ?<br />
|-<br />
| [[Bluetooth]] || {{Yes}} || btusb<br />
|-<br />
| Keyboard backlight || {{Yes}} || thinkpad_acpi<br />
|-<br />
| Function/Multimedia keys || {{Yes}} || ?<br />
|-<br />
| colspan=3 style="font-size: 70%; border: none;" | <ol><br />
<li>The Fibocom LTE module has Linux support once switched to USB mode; see [https://forums.lenovo.com/t5/Other-Linux-Discussions/How-To-Configure-X1-Carbon-Gen-7-on-Debian-FingerPrint-4G-Modem/td-p/4550327] and [https://github.com/abrasive/xmm7360]</li><br />
<li>An official driver and a reverse engineered driver are in the works [https://gitlab.freedesktop.org/libfprint/libfprint/issues/181] (''06cb:00bd'').</li><br />
<li>S3 suspend requires changes to BIOS settings, see section on [[#Sleep/Suspend]].</li><br />
<li>The internal microphone doesn't work on versions of the {{pkg|linux}} kernel before 5.3. On version 5.3 and newer the SOF firmware can be enabled, see [[{{TALKPAGENAME}}#Microphone|Talk#Microphone]].</li><br />
|}<br />
<br />
== Hardware ==<br />
<br />
Additional hardware information from {{ic|lsusb}} and {{ic|lspci}} can be found bellow when using the {{pkg|linux}} kernel 5.2.7:<br />
<br />
<div class="toccolours mw-collapsible mw-collapsed" style="width:400px; overflow:auto;"><br />
<div style="font-weight:bold;line-height:1.6;">{{ic|lsusb}}</div><br />
<div class="mw-collapsible-content"><br />
{{bc|<br />
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub<br />
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub<br />
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub<br />
Bus 001 Device 003: ID 06cb:00bd Synaptics, Inc. <br />
Bus 001 Device 002: ID 04f2:b67c Chicony Electronics Co., Ltd <br />
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub<br />
}}<br />
</div></div><br />
<br />
<div class="toccolours mw-collapsible mw-collapsed" style="width:400px; overflow:auto;"><br />
<div style="font-weight:bold;line-height:1.6;">{{ic|lspci}}</div><br />
<div class="mw-collapsible-content"><br />
{{bc|<br />
00:00.0 Host bridge: Intel Corporation Device 3e34 (rev 0c)<br />
00:02.0 VGA compatible controller: Intel Corporation UHD Graphics 620 (Whiskey Lake) (rev 02)<br />
00:04.0 Signal processing controller: Intel Corporation Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor Thermal Subsystem (rev 0c)<br />
00:08.0 System peripheral: Intel Corporation Xeon E3-1200 v5/v6 / E3-1500 v5 / 6th/7th Gen Core Processor Gaussian Mixture Model<br />
00:12.0 Signal processing controller: Intel Corporation Cannon Point-LP Thermal Controller (rev 11)<br />
00:14.0 USB controller: Intel Corporation Cannon Point-LP USB 3.1 xHCI Controller (rev 11)<br />
00:14.2 RAM memory: Intel Corporation Cannon Point-LP Shared SRAM (rev 11)<br />
00:14.3 Network controller: Intel Corporation Cannon Point-LP CNVi [Wireless-AC] (rev 11)<br />
00:15.0 Serial bus controller [0c80]: Intel Corporation Cannon Point-LP Serial IO I2C Controller #0 (rev 11)<br />
00:15.1 Serial bus controller [0c80]: Intel Corporation Cannon Point-LP Serial IO I2C Controller #1 (rev 11)<br />
00:16.0 Communication controller: Intel Corporation Cannon Point-LP MEI Controller #1 (rev 11)<br />
00:1d.0 PCI bridge: Intel Corporation Cannon Point-LP PCI Express Root Port #9 (rev f1)<br />
00:1d.4 PCI bridge: Intel Corporation Cannon Point-LP PCI Express Root Port #13 (rev f1)<br />
00:1f.0 ISA bridge: Intel Corporation Cannon Point-LP LPC Controller (rev 11)<br />
00:1f.3 Audio device: Intel Corporation Cannon Point-LP High Definition Audio Controller (rev 11)<br />
00:1f.4 SMBus: Intel Corporation Cannon Point-LP SMBus Controller (rev 11)<br />
00:1f.5 Serial bus controller [0c80]: Intel Corporation Cannon Point-LP SPI Controller (rev 11)<br />
00:1f.6 Ethernet controller: Intel Corporation Ethernet Connection (6) I219-V (rev 11)<br />
03:00.0 Non-Volatile memory controller: Sandisk Corp WD Black 2018/PC SN720 NVMe SSD<br />
05:00.0 PCI bridge: Intel Corporation JHL6540 Thunderbolt 3 Bridge (C step) [Alpine Ridge 4C 2016] (rev 02)<br />
06:00.0 PCI bridge: Intel Corporation JHL6540 Thunderbolt 3 Bridge (C step) [Alpine Ridge 4C 2016] (rev 02)<br />
06:01.0 PCI bridge: Intel Corporation JHL6540 Thunderbolt 3 Bridge (C step) [Alpine Ridge 4C 2016] (rev 02)<br />
06:02.0 PCI bridge: Intel Corporation JHL6540 Thunderbolt 3 Bridge (C step) [Alpine Ridge 4C 2016] (rev 02)<br />
06:04.0 PCI bridge: Intel Corporation JHL6540 Thunderbolt 3 Bridge (C step) [Alpine Ridge 4C 2016] (rev 02)<br />
07:00.0 System peripheral: Intel Corporation JHL6540 Thunderbolt 3 NHI (C step) [Alpine Ridge 4C 2016] (rev 02)<br />
2d:00.0 USB controller: Intel Corporation JHL6540 Thunderbolt 3 USB Controller (C step) [Alpine Ridge 4C 2016] (rev 02)<br />
}}<br />
</div></div><br />
<br />
== BIOS ==<br />
<br />
{{warning|1=Don't enrolling customized Secure Boot keys now. Because of the buggy firmware, various users have reported that doing so bricks their machines.}} <br />
<br />
The most convenient way to install Arch Linux is by disabling "Secure Boot" {{ic|Security -> Secure Boot - Set to "Disabled"}}. However it is possible to self-sign your kernel and boot with it enabled. For further information have a look at the [[Secure Boot]] article.<br />
<br />
In case your {{ic|efivars}} are not properly set it is most likely due to you not being booted into [[UEFI]]. Should the problem persist be sure to consult the [[UEFI#UEFI variables]] section.<br />
<br />
=== Updates ===<br />
<br />
==== Automatic (Linux Vendor Firmware Service) ====<br />
<br />
[https://blogs.gnome.org/hughsie/2018/08/06/please-welcome-lenovo-to-the-lvfs/ In August of 2018 Lenovo has joined] the [https://fwupd.org/ Linux Vendor Firmware Service (LVFS)] project, which enables firmware updates from within the OS.<br />
BIOS updates (and possibly other firmware such as the Thunderbolt controller) can be queried for and installed through [[fwupd]].<br />
<br />
==== Manual (fwupdmgr) ====<br />
<br />
Lenovo may in the future provide cabinet files that can be directly installed with fwupdmgr.<br />
Check for Linux {{ic|.cab}} files from the [https://pcsupport.lenovo.com/us/en/products/laptops-and-netbooks/thinkpad-x-series-laptops/thinkpad-x1-carbon-7th-gen-type-20qd-20qe/downloads Lenovo ThinkPad X1 Carbon (Gen 7) driver website].<br />
<br />
#Make sure the AC adapter is firmly connected to the target computer.<br />
#Launch Terminal.<br />
#Move to the directory where the cabinet file was placed.<br />
#Run {{ic|fwupdmgr install xxxxxxxx.cab}} to schedule firmware update.<br />
#Restart the system.<br />
#The computer will be restarted and the UEFI BIOS will be updated.<br />
<br />
=== Sleep/Suspend ===<br />
<br />
The BIOS has two "Sleep State" options, Windows and Linux, which you can find in at {{ic|Config -> Power -> Sleep State}}. The Linux option is the traditional S3 power state where all hardware components are turned off except for the RAM, and it should work normally. The Windows option is a newer software-based "modern standby" which works on Linux (despite the name). One possible benefit to the Windows sleep state is faster wake up time, and one possible drawback is increased power usage.<br />
<br />
=== S3 Suspend Bug with Bluetooth Devices ===<br />
<br />
Occasionally your Thinkpad will wake up immediately after suspending with certain [[bluetooth]] devices added. To prevent this, remove the devices or disable [[bluetooth]] before suspending.<br />
<br />
=== BIOS configurations ===<br />
<br />
* {{ic|Config -> Thunderbolt BIOS Assist Mode - Set to "Enabled"}}. When disabled, on Linux, power usage appears to be significantly higher because of a substantial number of CPU wakeups during s2idle.<br />
<br />
== Touchpad issues ==<br />
<br />
Due to a bug in a touchpad firmware, the touchpad might not work with following logs in dmesg:<br />
{{bc|<br />
[ 4.499490] i2c_designware i2c_designware.1: i2c_dw_handle_tx_abort: lost arbitration<br />
[...]<br />
[ 12.668795] i2c_hid i2c-SYNA8005:00: failed to set a report to device.<br />
[ 13.678765] i2c_designware i2c_designware.1: controller timed out<br />
}}<br />
The solution is to update touchpad firmware (version {{ic|1.3.3013412}} works correctly).<br />
<br />
== Power management/Throttling issues ==<br />
A [https://forums.lenovo.com/t5/Other-Linux-Discussions/X1C6-T480s-low-cTDP-and-trip-temperature-in-Linux/td-p/4028489/highlight/true bug] causes the CPU to consume less power than under Windows and throttle at 80°C instead of 97°. <br />
<br />
Lenovo has confirmed the issue, [https://forums.lenovo.com/t5/Other-Linux-Discussions/X1C6-T480s-low-cTDP-and-trip-temperature-in-Linux/m-p/4534535/highlight/true#M13642 explained the cause] and published [https://forums.lenovo.com/t5/Other-Linux-Discussions/X1C6-T480s-low-cTDP-and-trip-temperature-in-Linux/m-p/4535310/highlight/true#M13653 updates for the embedded controller and the BIOS] to LVFS (''see [[#Updates|#BIOS Updates]]'').<br />
<br />
=== throttled ===<br />
If you are stuck on an earlier version of the firmware and BIOS (or do not want to upgrade), you can install {{Pkg|throttled}}, then run <br />
<br />
sudo systemctl enable --now lenovo_fix.service<br />
<br />
== Audio ==<br />
The 4-channel audio and microphone works as of 5.5.1-arch1-1 using [https://github.com/thesofproject/sof SOF Firmware]. Steps to get it working:<br />
<br />
1. Install {{ic|sof-firmware}} (tested with 1.4.2-1)<br />
<br />
2. Blacklist incompatible {{ic|hda_intel}} and {{ic|soc_skl}} modules:<br />
<br />
{{hc|/etc/modprobe.d/blacklist.conf|<br />
blacklist snd_hda_intel<br />
blacklist snd_soc_skl<br />
}}<br />
<br />
3. Configure PulseAudio's to load Alsa modules with the correct {{ic|device}} and {{ic|channnel}} settings, by adding these two lines to {{ic|/etc/pulse/default.pa}}:<br />
<br />
load-module module-alsa-sink device=hw:0,0 channels=4<br />
load-module module-alsa-source device=hw:0,7 channels=4<br />
<br />
4. Reboot, then use {{ic|alsamixer}} to increase the "master" channel level.<br />
<br />
5. If the output sounds tinny, try muting the "speaker" item in alsamixer.<br />
<br />
== Fingerprint sensor ==<br />
<br />
An official driver and a reverse engineered driver are in the works.[https://gitlab.freedesktop.org/libfprint/libfprint/issues/181]<br />
<br />
== Disabling red LED in ThinkPad logo ==<br />
<br />
You can temporarily disable the red LED in the ThinkPad logo on the cover:<br />
<br />
1. Enable writing to the embedded controller registers by adding the kernel parameter {{ic|1=ec_sys.write_support=1}}. <br />
If you use UEFI boot, you can add this parameter in {{ic|/boot/efi/loader/entries/arch.conf}} under "options".<br />
<br />
2. Disable the LED with this command: <br />
<br />
# echo -n -e "\x0a" | sudo dd of="/sys/kernel/debug/ec/ec0/io" bs=1 seek=12 count=1 conv=notrunc 2> /dev/null<br />
<br />
This would need to be run after each suspend/reboot to be permanent.<br />
<br />
== Additional resources ==<br />
<br />
* [https://www.thinkwiki.org/wiki/Category:X1_Carbon_(7th_Gen) ThinkWiki X1 Carbon 7th Gen page]<br />
* [https://gist.github.com/greigdp/bb70fbc331a0aaf447c2d38eacb85b8f Dell XPS 13 9370 quirks]: Some pointers on getting Watt usage down to ~2W, Intel video powersaving features might be interesting, see also the [[Intel graphics]] page for interesting power-saving options.<br />
* [https://01.org/blogs/rzhang/2015/best-practice-debug-linux-suspend/hibernate-issues Intel Blog: Best practice to debug Linux* suspend/hibernate issues], including the [https://github.com/01org/pm-graph pm-graph] tool to analyze power usage during suspend<br />
* [https://forums.linuxmint.com/viewtopic.php?t=91453 How to fix volume control (ALSA problem)] This is where the volume fix came from originally.<br />
* [https://docs.microsoft.com/en-us/windows/win32/power/system-power-states Windows System Power States]<br />
* [https://www.kernel.org/doc/Documentation/power/states.txt System Power Management Sleep States at kernel.org]</div>Goetzchttps://wiki.archlinux.org/index.php?title=Lenovo_ThinkPad_X1_Carbon_(Gen_7)&diff=596938Lenovo ThinkPad X1 Carbon (Gen 7)2020-02-07T17:55:46Z<p>Goetzc: /* Audio */ format</p>
<hr />
<div>[[Category:Lenovo]]<br />
[[ja:Lenovo ThinkPad X1 Carbon (Gen 7)]]<br />
{{Related articles start}}<br />
{{Related|Lenovo ThinkPad X1 Carbon}}<br />
{{Related|Lenovo ThinkPad X1 Carbon (Gen 2)}}<br />
{{Related|Lenovo ThinkPad X1 Carbon (Gen 3)}}<br />
{{Related|Lenovo ThinkPad X1 Carbon (Gen 4)}}<br />
{{Related|Lenovo ThinkPad X1 Carbon (Gen 5)}}<br />
{{Related|Lenovo ThinkPad X1 Carbon (Gen 6)}}<br />
{{Related|Lenovo ThinkPad X1 Yoga (Gen 3)}}<br />
{{Related|Lenovo ThinkPad X1 Yoga (Gen 4)}}<br />
{{Related articles end}}<br />
<br />
{{tip| A great resource for thinkpads is https://www.thinkwiki.org/wiki/ThinkWiki}}<br />
<br />
The Lenovo ThinkPad X1 Carbon, 7th generation is an ultrabook introduced in early 2019. It features a 14" screen, 8th-gen or 10th-gen Intel Core processors and integrated [[Intel graphics|Intel UHD 620 graphics]].<br />
<br />
To ensure you have this version, [[install]] the package {{Pkg|dmidecode}} and run:<br />
<br />
{{bc|# sudo dmidecode -s system-version<br />
ThinkPad X1 Carbon 7th<br />
}}<br />
<br />
{| class="wikitable" style="float: right; clear: right; margin: 0 0 0.5em 0.5em; max-width: 420px; width: 100%;"<br />
| '''Device''' || '''Working''' || '''Modules'''<br />
|-<br />
| [[Intel graphics]] || {{Yes}} || i915, (intel_agp)<br />
|-<br />
| [[Wireless network configuration#iwlwifi|Wireless network]] || {{Yes}} || iwlmvm<br />
|-<br />
| Native Ethernet with [https://www.lenovo.com/us/en/accessories-and-monitors/cables-and-adapters/adapters/CABLE-BO-Ethernet-Extension-Adapter-2/p/4X90Q84427 dongle] || {{Yes}} || ?<br />
|-<br />
| Mobile broadband Fibocom || {{Yes}}¹ || ?<br />
|-<br />
| Audio || {{Yes}} || snd_hda_intel<br />
|-<br />
| Microphone || {{Yes}}⁴ || snd_sof<br />
|-<br />
| [[Touchpad]] || {{Yes}} || psmouse, rmi_smbus, i2c_i801<br />
|-<br />
| [[TrackPoint]] || {{Yes}} || psmouse, rmi_smbus, i2c_i801<br />
|-<br />
| Camera || {{Yes}} || uvcvideo<br />
|-<br />
| [[fprint|Fingerprint reader]] || {{Yes}}² || ?<br />
|-<br />
| [[Power management]] || {{Yes}}³ || ?<br />
|-<br />
| [[Bluetooth]] || {{Yes}} || btusb<br />
|-<br />
| Keyboard backlight || {{Yes}} || thinkpad_acpi<br />
|-<br />
| Function/Multimedia keys || {{Yes}} || ?<br />
|-<br />
| colspan=3 style="font-size: 70%; border: none;" | <ol><br />
<li>The Fibocom LTE module has Linux support once switched to USB mode; see [https://forums.lenovo.com/t5/Other-Linux-Discussions/How-To-Configure-X1-Carbon-Gen-7-on-Debian-FingerPrint-4G-Modem/td-p/4550327] and [https://github.com/abrasive/xmm7360]</li><br />
<li>An official driver and a reverse engineered driver are in the works [https://gitlab.freedesktop.org/libfprint/libfprint/issues/181] (''06cb:00bd'').</li><br />
<li>S3 suspend requires changes to BIOS settings, see section on [[#Sleep/Suspend]].</li><br />
<li>The internal microphone doesn't work on versions of the {{pkg|linux}} kernel before 5.3. On version 5.3 and newer the SOF firmware can be enabled, see [[{{TALKPAGENAME}}#Microphone|Talk#Microphone]].</li><br />
|}<br />
<br />
== Hardware ==<br />
<br />
Additional hardware information from {{ic|lsusb}} and {{ic|lspci}} can be found bellow when using the {{pkg|linux}} kernel 5.2.7:<br />
<br />
<div class="toccolours mw-collapsible mw-collapsed" style="width:400px; overflow:auto;"><br />
<div style="font-weight:bold;line-height:1.6;">{{ic|lsusb}}</div><br />
<div class="mw-collapsible-content"><br />
{{bc|<br />
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub<br />
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub<br />
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub<br />
Bus 001 Device 003: ID 06cb:00bd Synaptics, Inc. <br />
Bus 001 Device 002: ID 04f2:b67c Chicony Electronics Co., Ltd <br />
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub<br />
}}<br />
</div></div><br />
<br />
<div class="toccolours mw-collapsible mw-collapsed" style="width:400px; overflow:auto;"><br />
<div style="font-weight:bold;line-height:1.6;">{{ic|lspci}}</div><br />
<div class="mw-collapsible-content"><br />
{{bc|<br />
00:00.0 Host bridge: Intel Corporation Device 3e34 (rev 0c)<br />
00:02.0 VGA compatible controller: Intel Corporation UHD Graphics 620 (Whiskey Lake) (rev 02)<br />
00:04.0 Signal processing controller: Intel Corporation Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor Thermal Subsystem (rev 0c)<br />
00:08.0 System peripheral: Intel Corporation Xeon E3-1200 v5/v6 / E3-1500 v5 / 6th/7th Gen Core Processor Gaussian Mixture Model<br />
00:12.0 Signal processing controller: Intel Corporation Cannon Point-LP Thermal Controller (rev 11)<br />
00:14.0 USB controller: Intel Corporation Cannon Point-LP USB 3.1 xHCI Controller (rev 11)<br />
00:14.2 RAM memory: Intel Corporation Cannon Point-LP Shared SRAM (rev 11)<br />
00:14.3 Network controller: Intel Corporation Cannon Point-LP CNVi [Wireless-AC] (rev 11)<br />
00:15.0 Serial bus controller [0c80]: Intel Corporation Cannon Point-LP Serial IO I2C Controller #0 (rev 11)<br />
00:15.1 Serial bus controller [0c80]: Intel Corporation Cannon Point-LP Serial IO I2C Controller #1 (rev 11)<br />
00:16.0 Communication controller: Intel Corporation Cannon Point-LP MEI Controller #1 (rev 11)<br />
00:1d.0 PCI bridge: Intel Corporation Cannon Point-LP PCI Express Root Port #9 (rev f1)<br />
00:1d.4 PCI bridge: Intel Corporation Cannon Point-LP PCI Express Root Port #13 (rev f1)<br />
00:1f.0 ISA bridge: Intel Corporation Cannon Point-LP LPC Controller (rev 11)<br />
00:1f.3 Audio device: Intel Corporation Cannon Point-LP High Definition Audio Controller (rev 11)<br />
00:1f.4 SMBus: Intel Corporation Cannon Point-LP SMBus Controller (rev 11)<br />
00:1f.5 Serial bus controller [0c80]: Intel Corporation Cannon Point-LP SPI Controller (rev 11)<br />
00:1f.6 Ethernet controller: Intel Corporation Ethernet Connection (6) I219-V (rev 11)<br />
03:00.0 Non-Volatile memory controller: Sandisk Corp WD Black 2018/PC SN720 NVMe SSD<br />
05:00.0 PCI bridge: Intel Corporation JHL6540 Thunderbolt 3 Bridge (C step) [Alpine Ridge 4C 2016] (rev 02)<br />
06:00.0 PCI bridge: Intel Corporation JHL6540 Thunderbolt 3 Bridge (C step) [Alpine Ridge 4C 2016] (rev 02)<br />
06:01.0 PCI bridge: Intel Corporation JHL6540 Thunderbolt 3 Bridge (C step) [Alpine Ridge 4C 2016] (rev 02)<br />
06:02.0 PCI bridge: Intel Corporation JHL6540 Thunderbolt 3 Bridge (C step) [Alpine Ridge 4C 2016] (rev 02)<br />
06:04.0 PCI bridge: Intel Corporation JHL6540 Thunderbolt 3 Bridge (C step) [Alpine Ridge 4C 2016] (rev 02)<br />
07:00.0 System peripheral: Intel Corporation JHL6540 Thunderbolt 3 NHI (C step) [Alpine Ridge 4C 2016] (rev 02)<br />
2d:00.0 USB controller: Intel Corporation JHL6540 Thunderbolt 3 USB Controller (C step) [Alpine Ridge 4C 2016] (rev 02)<br />
}}<br />
</div></div><br />
<br />
== BIOS ==<br />
<br />
{{warning|1=Don't enrolling customized Secure Boot keys now. Because of the buggy firmware, various users have reported that doing so bricks their machines.}} <br />
<br />
The most convenient way to install Arch Linux is by disabling "Secure Boot" {{ic|Security -> Secure Boot - Set to "Disabled"}}. However it is possible to self-sign your kernel and boot with it enabled. For further information have a look at the [[Secure Boot]] article.<br />
<br />
In case your {{ic|efivars}} are not properly set it is most likely due to you not being booted into [[UEFI]]. Should the problem persist be sure to consult the [[UEFI#UEFI variables]] section.<br />
<br />
=== Updates ===<br />
<br />
==== Automatic (Linux Vendor Firmware Service) ====<br />
<br />
[https://blogs.gnome.org/hughsie/2018/08/06/please-welcome-lenovo-to-the-lvfs/ In August of 2018 Lenovo has joined] the [https://fwupd.org/ Linux Vendor Firmware Service (LVFS)] project, which enables firmware updates from within the OS.<br />
BIOS updates (and possibly other firmware such as the Thunderbolt controller) can be queried for and installed through [[fwupd]].<br />
<br />
==== Manual (fwupdmgr) ====<br />
<br />
Lenovo may in the future provide cabinet files that can be directly installed with fwupdmgr.<br />
Check for Linux {{ic|.cab}} files from the [https://pcsupport.lenovo.com/us/en/products/laptops-and-netbooks/thinkpad-x-series-laptops/thinkpad-x1-carbon-7th-gen-type-20qd-20qe/downloads Lenovo ThinkPad X1 Carbon (Gen 7) driver website].<br />
<br />
#Make sure the AC adapter is firmly connected to the target computer.<br />
#Launch Terminal.<br />
#Move to the directory where the cabinet file was placed.<br />
#Run {{ic|fwupdmgr install xxxxxxxx.cab}} to schedule firmware update.<br />
#Restart the system.<br />
#The computer will be restarted and the UEFI BIOS will be updated.<br />
<br />
=== Sleep/Suspend ===<br />
<br />
The BIOS has two "Sleep State" options, Windows and Linux, which you can find in at {{ic|Config -> Power -> Sleep State}}. The Linux option is the traditional S3 power state where all hardware components are turned off except for the RAM, and it should work normally. The Windows option is a newer software-based "modern standby" which works on Linux (despite the name). One possible benefit to the Windows sleep state is faster wake up time, and one possible drawback is increased power usage.<br />
<br />
=== S3 Suspend Bug with Bluetooth Devices ===<br />
<br />
Occasionally your Thinkpad will wake up immediately after suspending with certain [[bluetooth]] devices added. To prevent this, remove the devices or disable [[bluetooth]] before suspending.<br />
<br />
=== BIOS configurations ===<br />
<br />
* {{ic|Config -> Thunderbolt BIOS Assist Mode - Set to "Enabled"}}. When disabled, on Linux, power usage appears to be significantly higher because of a substantial number of CPU wakeups during s2idle.<br />
<br />
== Touchpad issues ==<br />
<br />
Due to a bug in a touchpad firmware, the touchpad might not work with following logs in dmesg:<br />
{{bc|<br />
[ 4.499490] i2c_designware i2c_designware.1: i2c_dw_handle_tx_abort: lost arbitration<br />
[...]<br />
[ 12.668795] i2c_hid i2c-SYNA8005:00: failed to set a report to device.<br />
[ 13.678765] i2c_designware i2c_designware.1: controller timed out<br />
}}<br />
The solution is to update touchpad firmware (version {{ic|1.3.3013412}} works correctly).<br />
<br />
== Power management/Throttling issues ==<br />
A [https://forums.lenovo.com/t5/Other-Linux-Discussions/X1C6-T480s-low-cTDP-and-trip-temperature-in-Linux/td-p/4028489/highlight/true bug] causes the CPU to consume less power than under Windows and throttle at 80°C instead of 97°. <br />
<br />
Lenovo has confirmed the issue, [https://forums.lenovo.com/t5/Other-Linux-Discussions/X1C6-T480s-low-cTDP-and-trip-temperature-in-Linux/m-p/4534535/highlight/true#M13642 explained the cause] and published [https://forums.lenovo.com/t5/Other-Linux-Discussions/X1C6-T480s-low-cTDP-and-trip-temperature-in-Linux/m-p/4535310/highlight/true#M13653 updates for the embedded controller and the BIOS] to LVFS (''see [[#Updates|#BIOS Updates]]'').<br />
<br />
=== throttled ===<br />
If you are stuck on an earlier version of the firmware and BIOS (or do not want to upgrade), you can install {{Pkg|throttled}}, then run <br />
<br />
sudo systemctl enable --now lenovo_fix.service<br />
<br />
== Audio ==<br />
The 4-channel audio and microphone works as of 5.5.1-arch1-1 using [https://github.com/thesofproject/sof SOF Firmware]. Steps to get it working:<br />
<br />
1. Install {{ic|sof-firmware}} (tested with 1.4.2-1)<br />
<br />
2. Blacklist incompatible {{ic|hda_intel}} and {{ic|soc_skl}} modules:<br />
<br />
{{hc|/etc/modprobe.d/blacklist.conf|<br />
blacklist snd_hda_intel<br />
blacklist snd_soc_skl<br />
}}<br />
<br />
3. Configure PulseAudio's to load Alsa modules with the correct {{ic|device}} and {{ic|channnel}} settings, by adding these two lines to {{ic|/etc/pulse/default.pa}}:<br />
<br />
load-module module-alsa-sink device=hw:0,0 channels=4<br />
load-module module-alsa-source device=hw:0,7 channels=4<br />
<br />
4. Reboot, then use {{ic|alsamixer}} to increase the "master" channel level.<br />
<br />
5. If the output sounds tinny, try muting the "speaker" item in alsamixer.<br />
<br />
== Disabling red LED in ThinkPad logo ==<br />
<br />
You can temporarily disable the red LED in the ThinkPad logo on the cover:<br />
<br />
1. Enable writing to the embedded controller registers by adding the kernel parameter {{ic|1=ec_sys.write_support=1}}. <br />
If you use UEFI boot, you can add this parameter in {{ic|/boot/efi/loader/entries/arch.conf}} under "options".<br />
<br />
2. Disable the LED with this command: <br />
<br />
# echo -n -e "\x0a" | sudo dd of="/sys/kernel/debug/ec/ec0/io" bs=1 seek=12 count=1 conv=notrunc 2> /dev/null<br />
<br />
This would need to be run after each suspend/reboot to be permanent.<br />
<br />
== Additional resources ==<br />
<br />
* [https://www.thinkwiki.org/wiki/Category:X1_Carbon_(7th_Gen) ThinkWiki X1 Carbon 7th Gen page]<br />
* [https://gist.github.com/greigdp/bb70fbc331a0aaf447c2d38eacb85b8f Dell XPS 13 9370 quirks]: Some pointers on getting Watt usage down to ~2W, Intel video powersaving features might be interesting, see also the [[Intel graphics]] page for interesting power-saving options.<br />
* [https://01.org/blogs/rzhang/2015/best-practice-debug-linux-suspend/hibernate-issues Intel Blog: Best practice to debug Linux* suspend/hibernate issues], including the [https://github.com/01org/pm-graph pm-graph] tool to analyze power usage during suspend<br />
* [https://forums.linuxmint.com/viewtopic.php?t=91453 How to fix volume control (ALSA problem)] This is where the volume fix came from originally.<br />
* [https://docs.microsoft.com/en-us/windows/win32/power/system-power-states Windows System Power States]<br />
* [https://www.kernel.org/doc/Documentation/power/states.txt System Power Management Sleep States at kernel.org]</div>Goetzchttps://wiki.archlinux.org/index.php?title=Talk:Lenovo_ThinkPad_X1_Carbon_(Gen_7)&diff=596565Talk:Lenovo ThinkPad X1 Carbon (Gen 7)2020-02-01T17:29:25Z<p>Goetzc: /* Volume Controls */ set 4.0 audio profile using pactl</p>
<hr />
<div>== <s>Touchpad with 5.4.x</s> ==<br />
With linux 5.4 touchpad stopped working on about 50% of bootups.<br />
With touchpad not working I'm getting following messages in dmesg.<br />
{{bc|1=<br />
[ 4.499490] i2c_designware i2c_designware.1: i2c_dw_handle_tx_abort: lost arbitration<br />
[ 5.518759] i2c_designware i2c_designware.1: controller timed out<br />
[ 5.519959] i2c_hid i2c-SYNA8005:00: failed to retrieve report from device.<br />
[ 5.521187] input: SYNA8005:00 06CB:CD8C Mouse as /devices/pci0000:00/0000:00:15.1/i2c_designware.1/i2c-9/i2c-SYNA8005:00/0018:06CB:CD8C.0001/input/input9<br />
[ 5.521337] input: SYNA8005:00 06CB:CD8C Touchpad as /devices/pci0000:00/0000:00:15.1/i2c_designware.1/i2c-9/i2c-SYNA8005:00/0018:06CB:CD8C.0001/input/input10<br />
[ 5.521442] hid-generic 0018:06CB:CD8C.0001: input,hidraw0: I2C HID v1.00 Mouse [SYNA8005:00 06CB:CD8C] on i2c-SYNA8005:00<br />
[ 6.585507] i2c_designware i2c_designware.1: controller timed out<br />
[ 6.585590] i2c_hid i2c-SYNA8005:00: failed to retrieve report from device.<br />
[ 6.585678] hid-multitouch 0018:06CB:CD8C.0001: failed to fetch feature 8<br />
[ 7.599201] i2c_designware i2c_designware.1: controller timed out<br />
[ 7.599319] i2c_hid i2c-SYNA8005:00: failed to retrieve report from device.<br />
[ 7.599385] hid-multitouch 0018:06CB:CD8C.0001: failed to fetch feature 8<br />
[ 8.612535] i2c_designware i2c_designware.1: controller timed out<br />
[ 8.612636] i2c_hid i2c-SYNA8005:00: failed to retrieve report from device.<br />
[ 8.612711] hid-multitouch 0018:06CB:CD8C.0001: failed to fetch feature 7<br />
[ 9.625537] i2c_designware i2c_designware.1: controller timed out<br />
[ 9.625642] i2c_hid i2c-SYNA8005:00: failed to retrieve report from device.<br />
[ 9.625873] input: SYNA8005:00 06CB:CD8C Mouse as /devices/pci0000:00/0000:00:15.1/i2c_designware.1/i2c-9/i2c-SYNA8005:00/0018:06CB:CD8C.0001/input/input19<br />
[ 9.626417] input: SYNA8005:00 06CB:CD8C Touchpad as /devices/pci0000:00/0000:00:15.1/i2c_designware.1/i2c-9/i2c-SYNA8005:00/0018:06CB:CD8C.0001/input/input20<br />
[ 9.627084] hid-multitouch 0018:06CB:CD8C.0001: input,hidraw0: I2C HID v1.00 Mouse [SYNA8005:00 06CB:CD8C] on i2c-SYNA8005:00<br />
[ 10.132275] kauditd_printk_skb: 15 callbacks suppressed'<br />
[ 10.639147] i2c_designware i2c_designware.1: controller timed out<br />
[ 10.639250] i2c_hid i2c-SYNA8005:00: failed to set a report to device.<br />
[ 11.652134] i2c_designware i2c_designware.1: controller timed out<br />
[ 11.652167] i2c_hid i2c-SYNA8005:00: failed to set a report to device.<br />
[ 12.668764] i2c_designware i2c_designware.1: controller timed out<br />
[ 12.668795] i2c_hid i2c-SYNA8005:00: failed to set a report to device.<br />
[ 13.678765] i2c_designware i2c_designware.1: controller timed out<br />
[ 14.692095] i2c_designware i2c_designware.1: controller timed out<br />
[ every second ...]<br />
[ 26.852160] i2c_designware i2c_designware.1: controller timed out<br />
}} [[User:Kubuxu|Kubuxu]] ([[User talk:Kubuxu|talk]]) 13:47, 16 December 2019 (UTC)<br />
: This might be totally unrelated, but I had both sleep and touchpad break the other day and temporarily fixed it with the snd_hda_intel.dmic_detect=0 kernel option (see [https://old.reddit.com/r/archlinux/comments/e5oe4p/systemctl_suspend_causes_freeze/?st=k49hi5rf&sh=0c42e7c9 this] [[User:Wrycode|wrycode]] ([[User talk:Wrycode|talk]]) 06:28, 17 December 2019 (UTC)<br />
: I have {{ic|snd_hda_intel}} blacklisted to make sure that SOF is used. So far I had one SOF related DSP crash but apart from that SOF seems fine. There is also touchpad firmware update I've applied, I will let you all now about the results. [[User:Kubuxu|Kubuxu]] ([[User talk:Kubuxu|talk]]) 12:11, 17 December 2019 (UTC)<br />
: After updating Touchpad firware (using {{ic|fwupdmgr}}) to 1.3.3013412 problem seems to be resolved. [[User:Kubuxu|Kubuxu]] ([[User talk:Kubuxu|talk]]) 12:43, 27 December 2019 (UTC)<br />
:: Confirmed here as well [[User:Wrycode|wrycode]] ([[User talk:Wrycode|talk]]) 02:42, 28 December 2019 (UTC)<br />
:: Did anyone experience issues with updating this firmware with {{ic|fwupdmgr}}? I continuously get {{ic|1=No upgrades for Touchpad: current version is 1.3.3013337: 1.3.3013337=same}}. I even tried to download the .cab file and use {{ic|fwupdmgr install}} and get {{ic|No supported devices found}} [[User:In0ni|In0ni]] ([[User talk:In0ni|talk]]) 00:20, 7 January 2020 (UTC)<br />
::: Seems like you have the latest update already. [[User:Wrycode|wrycode]] ([[User talk:Wrycode|talk]]) 18:18, 7 January 2020 (UTC)<br />
:::: Latest firmware should be 1.3.3013412 -- not 1.3.3013337. I'm having the issue this discussion is talking about which the latest version fixes. What version of the firmware did you update to? [[User:In0ni|In0ni]] ([[User talk:In0ni|talk]]) 04:19, 9 January 2020 (UTC)<br />
::::: Sorry, I assumed 1.3.3013412 and 1.3.3013337 were the same version or something (the version is listed as "PR3013337/PR3013412" in the Readme on Lenovo's site. I updated to 1.3.3013337 from 1.1.2949533 and my touchpad issues went away. But if you're still having issues with the touchpad then maybe it wasn't actually the firmware update that fixed it for me? I'm on kernel 5.4.8 and everything works except for the microphone. [[User:Wrycode|wrycode]] ([[User talk:Wrycode|talk]]) 04:38, 10 January 2020 (UTC)<br />
: Updated Wiki page with the info [[User:Kubuxu|Kubuxu]] ([[User talk:Kubuxu|talk]]) 17:38, 29 December 2019 (UTC)<br />
: Where are you getting the firmware? The only version I can find is an exe [[User:Mondoman712|Mondoman712]] ([[User talk:Mondoman712|talk]]) 14:07, 23 January 2020 (UTC)<br />
:: I'm using fwupdmgr [[User:Kubuxu|Kubuxu]] ([[User talk:Kubuxu|talk]]) 17:14, 23 January 2020 (UTC)<br />
::: The touchpad wasn't showing up for me there, but it wasn't working when I tried so I rebooted and then it appeared. [[User:Mondoman712|Mondoman712]] ([[User talk:Mondoman712|talk]]) 18:19, 23 January 2020 (UTC)<br />
<br />
== Microphone ==<br />
Did you get your microphone to work neither alsamixer or pavucontrol seem to detect a microphone. ? [[User:Nitrobay|Nitrobay]] ([[User talk:Nitrobay|talk]]) 11:38, 17 August 2019 (UTC)<br />
: I can confirm using [[Advanced_Linux_Sound_Architecture/Troubleshooting#Microphone|this test]], only externally connected microphones work. — [[User:goetzc|goetzc]] ([[User talk:goetzc|wanna talk?]]) 14:24, 17 August 2019 (UTC)<br />
: Looks like Linux kernel 5.3 will include the [https://thesofproject.github.io/latest/index.html SOF firmware update] with the fix for the microphone. — [[User:goetzc|goetzc]] ([[User talk:goetzc|wanna talk?]]) 14:25, 6 September 2019 (UTC)<br />
: After updating to Linux kernel 5.3.1 the microphone still does not work [[User:Moreka|Moreka]] ([[User talk:Moreka|talk]]) 17:30, 23 September 2019 (UTC) [[User:Moreka]] 17:30, 23 September 2019 (UTC)<br />
: I found a configuration that makes the microphones to work ;) but couldn't paste the instructions or a link to them. I created a forum post under Laptop Issues and titled [SOLVED] Fix for microphone on Lenovo X1 Gen 7 [[User:Alphazo|Alphazo]] ([[User talk:Alphazo|talk]]) 10:15, 13 October 2019 (UTC)<br />
: Like others, I wasn't able to get microphone working by following that guide. My results are identical to that of "Mocco" from that forum. Unless I'm misunderstanding the sidebar, I think we should flag microphone to "not working" for this page. [[User:Parth|Parth]] ([[User talk:Parth|talk]]) 23:54, 20 October 2019 (UTC)<br />
: I wasn't able to get microphone working by following that guide as well. I also think we should flag microphone to "not working" for this page. [[User:Moreka|Moreka]] 06:04, 22 October 2019 (UTC)<br />
: Managed to get it working following Alphazo's guide. There are a few typos however, I indicated the required fix in post #9. Hope it helps. [[User:Tbw|Tbw]] ([[User talk:Tbw|talk]]) 21:23, 22 October 2019 (UTC)<br />
: I'll give it another shot and report back [[User:Parth|Parth]] ([[User talk:Parth|talk]]) 17:17, 30 October 2019 (UTC)<br />
: I was able to make the microphone + sound playback work with following the Lenovo docx file and using the sof-hda-generic.tplg and sof-cnl.ri provided in the latest linux firmware package shipped with ubuntu (just download the package and copy the two files in the correct directories). Also the changes in /etc/pulse/default.pa are not necessary. [[User:moreka|moreka]] 17:08, 31 October 2019 (UTC)<br />
: With recent kernel the SOF was disabled [https://bugs.archlinux.org/task/63464]. Solution for me was to install linux-pf and disable CONFIG_SND_SOC_INTEL_SST, enable SOT. [[User:Kubuxu|Kubuxu]] ([[User talk:Kubuxu|talk]]) 14:12, 19 November 2019 (UTC)<br />
: Please test with [https://git.archlinux.org/svntogit/packages.git/log/trunk?h=packages/linux&id=d6bbb261bd2c8f83b9c93041dae9aa4175e20e6e linux 5.4.1-arch1] (in testing) and [https://www.archlinux.org/packages/extra/any/sof-firmware/ sof-firmware] (new). SOF is re-enabled except on Broadwell/Baytrail platforms. [[User:Dpward|Dpward]] ([[User talk:Dpward|talk]]) 17:42, 1 December 2019 (UTC)<br />
: I tested with the new kernel and sof-firmware package (from the Arch repositories). Doing the configs as in the docx file, the sound works well, but the microphone records sounds in a wrong way; it sounds as if it is slow-motion. [[User:moreka]] 15:16, 3 December 2019 (UTC)<br />
: I experienced the same issue like moreka after installing the current kernel (5.4.2.arch1-1) and sof-firmware (1.3.1-1) from the core repo. Also since sof is in use the speakers only provide stereo audio and not using the 4.0 channel profile. [[User:Bin101|Bin101]] ([[User talk:Bin101|talk]]) 19:09, 6 December 2019 (UTC)<br />
: When using {{pkg|sof-firmware}} version 1.4.1 (and latest kernel 5.4.2) the sound card doesn't get recognized at all. Reverting back to sof-firmware 1.3.1 makes the card work again, in the same way explained by users Moreka and Bin101. — [[User:goetzc|Götz]] ([[User talk:goetzc|wanna talk?]]) 13:33, 9 December 2019 (UTC)<br />
: Yeah a whole host of things broke for me in 5.4.2: hibernate, touchpad & sound all broke for me in 5.4.2. [[User:Parth|Parth]] ([[User talk:Parth|talk]]) 04:43, 10 December 2019 (UTC)<br />
: With 5.4.3 the Mic works with custom topology file {{ic|sof-hda-generic-4ch.tplg}}. The touchpad is broken on about 50% of bootups. I will start a new thread about it. [[User:Kubuxu|Kubuxu]] ([[User talk:Kubuxu|talk]]) 13:37, 16 December 2019 (UTC)<br />
: <s>I was (finally!) able to get the mic to work on a HP EliteBook x360 1030 G4, using kernel 5.4.1 and sof-firmware 1.3.1.</s> Spoke too soon. Not working after all. Details [https://bbs.archlinux.org/viewtopic.php?pid=1878341#p1878341 here]. [[User:Darose|Darose]] 21:18, 18 December 2019 (UTC)<br />
: Still problematic with kernel 5.5-rc6 (compiled myself). Just the two top speakers are firing (not the rear ones). Super annoying. The microphone works, though... Using sof-firmware 1.3 (from Arch repo) [[User:Moreka]] 14:18, 17 January 2020<br />
<br />
== <s>Disabling red LED in Thinkpad logo stops</s> ==<br />
<br />
This service doesn't work after a suspend. [[User:Wrycode|wrycode]] ([[User talk:Wrycode|talk]]) 15:36, 9 August 2019 (UTC)<br />
I removed the script and systemd service. They were copied verbatim from the Gen 6 page and don't work as described.[[User:Wrycode|wrycode]] ([[User talk:Wrycode|talk]]) 05:10, 10 January 2020 (UTC)<br />
<br />
== Volume Controls ==<br />
<br />
The section [[Lenovo_ThinkPad_X1_Carbon_(Gen_7)#Volume_Controls|Volume Controls]] fixes the quite/loud volume control, but seems <s>to disable</s> (they are already disabled) the two top-firing speakers, only the two bottom-firing sub-woofers are enabled. --[[User:Goetzc|Goetzc]] ([[User talk:Goetzc|talk]]) 17:12, 9 August 2019 (UTC)<br />
: So this seems to fix the volume control indeed, but the top-firing speakers were already and are still muted, might be a driver bug, but a workaround from another Dolby Atmos laptop might work here. --[[User:Goetzc|Goetzc]] ([[User talk:Goetzc|talk]]) 17:32, 9 August 2019 (UTC)<br />
:: Did you remember to run alsamixer from {{Pkg|alsa-utils}} after installation and turn on/equalize all of the speakers? Mine (top and bottom) are working fine. [[User:Wrycode|wrycode]] ([[User talk:Wrycode|talk]]) 03:54, 13 August 2019 (UTC)<br />
::: You are correct Wrycode, thanks! The "''Master''" volume was low, rising it to 100% makes the top speakers work as expected :) Will add this to the section. <br />
::: Do you happen to know how to make this change (setting the "''Element Master''") so that it's not done on the system {{ic|analog-output.conf.common}} file, and thus the change survives when PulseAudio package is updated? — [[User:goetzc|goetzc]] ([[User talk:goetzc|wanna talk?]])<br />
:::: I did some digging around and I can't find a way to do this. Pulseaudio might not have a user config option for the alsa paths in /usr/. Added the NoUpgrade workaround on the main page. [[User:Wrycode|wrycode]] ([[User talk:Wrycode|talk]]) 02:05, 20 August 2019 (UTC)<br />
<br />
:There is [https://askubuntu.com/a/988993/509340 this interesting] method, which uses 'hdajackretask' from the {{pkg|alsa-tools}} package to remap some pins. The comment is for a different laptop (Asus UX550 using Realtek ALC295), but it exhibits the same issue. We would need to determine the correct pins for this hardware (Realtek ALC285), don't know how, though. — [[User:goetzc|goetzc]] ([[User talk:goetzc|wanna talk?]]) 19:08, 25 August 2019 (UTC)<br />
<br />
I turned on all the speakers with alsamixer from {{Pkg|alsa-utils}} and tried "''Analog Stereo Output''" and "''Analog Surround 4.0 Output''" with {{Pkg|pavucontrol}} but none of these configurations gives a reasonable result. The former makes the front speakers much louder than the rear ones and the latter makes the front speakers silent, testing them with:<br />
<br />
# speaker-test -c4 -l1 -twav<br />
<br />
I was able to compare the sound quality on Windows and it is clear that the bass sound is clearly missing. Is it similar for you or am I missing something ? [[User:Thenitronos|Thenitronos]] ([[User talk:Thenitronos|talk]]) 00:07, 1 February 2020 (UTC)<br />
:This is a new issue, I'm experiencing it too. [[User:Wrycode|wrycode]] ([[User talk:Wrycode|talk]]) 01:29, 1 February 2020 (UTC)<br />
:: I had the same issue with Linux kernel 5.4, but with kernel 5.3 it works (you can get it from the [[Arch Linux Archive]]) when following the [[Lenovo ThinkPad X1 Carbon (Gen 7)#Volume controls|Volume controls]] section (editing the {{ic|analog-output.conf.common}} file). I hope that [https://kernelnewbies.org/LinuxChanges#Linux_5.5.Audio 5.5] fixes this, haven't tried yet. — [[User:goetzc|Götz]] ([[User talk:goetzc|wanna talk?]]) 17:15, 1 February 2020 (UTC)<br />
:: It is also possible to set the 4.0 sound profile with {{ic|pactl set-card-profile alsa_card.pci-0000_00_1f.3 output:analog-surround-40}}, not sure if all Carbon 7th Gen use the same identifier, but that's the idea. — [[User:goetzc|Götz]] ([[User talk:goetzc|wanna talk?]])<br />
<br />
== Screen Brightness Function Keys ==<br />
<br />
Is anyone having issues getting the screen brightness function keys working? I had to install [[acpid]] and setup ACPI events and actions to handle it, along with installing the {{Pkg|acpilight}} package. <br />
<br />
My events:<br />
<br />
/etc/acpi/events/FnF5-brightnessdown<br />
# video/brightnessdown BRTDN 00000087 00000000<br />
event=video/brightnessdown<br />
action=xbacklight -dec 3<br />
<br />
/etc/acpi/events/FnF6-brightnessup<br />
# video/brightnessup BRTUP 00000086 00000000<br />
event=video/brightnessup<br />
action=xbacklight -inc 3<br />
<br />
xev doesn't recognise the brightness function keys, so I can't handle the key presses with my window manager. At least that is what I believe, please correct me if I have this all wrong. <br />
[[User:Raybangs|Raybangs]] ([[User talk:Raybangs|talk]]) 10:16, 23 August 2019 (UTC)<br />
<br />
:I didn't have to go through that to get screen brightness going. Can you tell me more about your setup? I'm using Plasma and my brightness controls worked out of the box. [[User:Johncrist1988|Johncrist1988]] ([[User talk:Johncrist1988|talk]]) 14:16, 23 August 2019 (UTC)<br />
<br />
:It works for me also, using {{pkg|brightnessctl}} (as root) or {{pkg|light}} on [[Sway]] or Plasma. — [[User:goetzc|goetzc]] ([[User talk:goetzc|wanna talk?]]) 18:50, 25 August 2019 (UTC)<br />
<br />
:Interesting. I'm using a pretty simple base Arch install with AwesomeWM. I will try {{pkg|brightnessctl}} and see how that goes. {{Unsigned|21:25, 3 September 2019 (UTC)|Raybangs}}<br />
<br />
== UEFI BIOS Update ==<br />
<br />
Currently UEFI BIOS seems to be at [https://pcsupport.lenovo.com/hn/en/products/LAPTOPS-AND-NETBOOKS/THINKPAD-X-SERIES-LAPTOPS/THINKPAD-X1-CARBON-7TH-GEN-TYPE-20QD-20QE/downloads/DS540232 version 1.16]. I am unable to find the .cab file in the link provided, on the [https://fwupd.org/lvfs/devicelist LVFS Device List], nor have had luck with web searches.<br />
<br />
I also followed instructions for [https://wiki.archlinux.org/index.php/Fwupd#Setup_for_UEFI_BIOS_upgrade | UEFI BIOS upgrade from fwupd] on the wiki. Has anyone succeeded in upgrading the firmware to the latest version on Linux? Would using the bootable iso on a USB from the first link work? According the the [https://download.lenovo.com/pccbbs/mobiles/n2hur06w.txt README] it should work (but hesitant to put the iso on USB). [[User:In0ni|In0ni]] ([[User talk:In0ni|talk]]) 22:34, 1 September 2019 (UTC)<br />
: Using the bootable iso on a USB should work fine (vs. a CD/DVD). However, I'm hesitant to upgrade because the 1.05 update is supposedly required before updating to the lates version: <br />
UEFI: ---- / ECP: 1.05<br />
- (Fix) Fixed an issue where system may hang in UEFI BIOS updating process.<br />
(Note) This package must be applied prior to n2hur04w or later package version.`<br />
:The cab files are not available yet. The only way to apply the updates (except for one that's available via fwupdmgr) is through the bootable ISO. I don't see any reason to update personally but if someone else does, please let us know how it goes. [[User:Wrycode|wrycode]] ([[User talk:Wrycode|talk]]) 20:09, 10 September 2019 (UTC)<br />
:: Just BTW for anyone else reading this, I updated via the bootable ISO and it didn't brick my device. Also, the .cab files for Linux are hidden in that link (if you click on the sorting menu, it appears to show only Windows updates but if you click on the categories the Linux files are hidden in there somewhere). [[User:Wrycode|wrycode]] ([[User talk:Wrycode|talk]]) 22:48, 17 December 2019 (UTC)<br />
::: I did upgrade it using {{ic|fwupdmgr install <file_name.cab>}}, after some specific version and restarts, the automatic updates did work using {{ic|fwupdmgr update}}. — [[User:goetzc|Götz]] ([[User talk:goetzc|wanna talk?]]) 21:52, 19 December 2019 (UTC)<br />
<br />
== <s>Why enable S3 sleep? </s>==<br />
<br />
Could someone add a small bit about why S3 sleep should be enabled? I have been using the default S0 sleep for a few weeks and don't see any issues with it. ~ [[User:Akvadrako|Akvadrako]] ([[User talk:Akvadrako|talk]]) 09:55, 10 September 2019 (UTC)<br />
:I was under the impression that S3 sleep is 'normal' sleep (everything powered off except for a trickle to the ram), but I'm not sure what modern Windows does instead. The S0 sleep state means "on", that is, the computer is not asleep, according to https://superuser.com/questions/71835/what-is-the-difference-between-these-four-sleep-states [[User:Wrycode|wrycode]] ([[User talk:Wrycode|talk]]) 04:43, 24 September 2019 (UTC)<br />
<br />
: Windows only supports S0 sleep and it’s the default, so I think it’s debatable what’s normal. But does that really matter? I’m interested in the practical difference. Maybe I’ll benchmark S3 sometime but for now I can say S0 uses about 0.5W and wakes up in about 1s. ~ [[User:Akvadrako|Akvadrako]] ([[User talk:Akvadrako|talk]]) 07:51, 24 September 2019 (UTC)<br />
:: S0 sleep isn't the traditional Suspend-to-RAM "sleep" that Linux users are expecting, that's what I meant by "normal". You are right that S0 is the default for Windows now. https://www.kernel.org/doc/Documentation/power/states.txt] has some details about the sleep states in Linux, and https://docs.microsoft.com/en-us/windows/win32/power/system-power-states has the same for Windows. It's a software-only idle, so it must use slightly more power than S3, where all components are shut down except for the ram. The Windows page claims that S0 wakes up faster than s3 (which would make sense). Another implication: Windows can do stuff after you close the laptop lid like download updates. Windows separately performs a suspend-to-disk whenever you close the lid, so if you remove the battery or the battery runs out your work will still be saved. It's possible Linux can do this too with S0. I just switched to the "Windows" sleep state from the BIOS to try it out and the wake time isn't noticeably different, but my laptop doesn't wake when I open the lid or press the power button. The only way to wake it up is to press the "Fn" key, very odd (especially because I remapped "Fn" to "Ctrl" from the BIOS, so I'm really pressing "Ctrl"). You're not seeing anything like this? [[User:Wrycode|wrycode]] ([[User talk:Wrycode|talk]]) 01:04, 16 October 2019 (UTC)<br />
<br />
:: Normally I do press the Fn button to wake, unless I'm using my external keyboard with AC, though it doesn't bother me. So it seems that and possibly some power savings are the advantages of S3. ~ [[User:Akvadrako|Akvadrako]] ([[User talk:Akvadrako|talk]]) 10:26, 16 October 2019 (UTC)<br />
<br />
== Different lspci output ==<br />
<br />
Can anyone check what's their lspci output? I have realised I am running with a completely different setup of the components myself:<br />
<br />
<div class="toccolours mw-collapsible mw-collapsed" style="width:400px; overflow:auto;"><br />
<div style="font-weight:bold;line-height:1.6;">{{ic|lspci}}</div><br />
<div class="mw-collapsible-content"><br />
{{bc|<br />
00:00.0 Host bridge: Intel Corporation Coffee Lake HOST and DRAM Controller (rev 0c)<br />
00:02.0 VGA compatible controller: Intel Corporation UHD Graphics 620 (Whiskey Lake) (rev 02)<br />
00:04.0 Signal processing controller: Intel Corporation Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor Thermal Subsystem (rev 0c)<br />
00:08.0 System peripheral: Intel Corporation Xeon E3-1200 v5/v6 / E3-1500 v5 / 6th/7th Gen Core Processor Gaussian Mixture Model<br />
00:12.0 Signal processing controller: Intel Corporation Cannon Point-LP Thermal Controller (rev 11)<br />
00:14.0 USB controller: Intel Corporation Cannon Point-LP USB 3.1 xHCI Controller (rev 11)<br />
00:14.2 RAM memory: Intel Corporation Cannon Point-LP Shared SRAM (rev 11)<br />
00:14.3 Network controller: Intel Corporation Cannon Point-LP CNVi [Wireless-AC] (rev 11)<br />
00:15.0 Serial bus controller [0c80]: Intel Corporation Cannon Point-LP Serial IO I2C Controller #0 (rev 11)<br />
00:15.1 Serial bus controller [0c80]: Intel Corporation Cannon Point-LP Serial IO I2C Controller #1 (rev 11)<br />
00:16.0 Communication controller: Intel Corporation Cannon Point-LP MEI Controller #1 (rev 11)<br />
00:1c.0 PCI bridge: Intel Corporation Cannon Point-LP PCI Express Root Port #1 (rev f1)<br />
00:1d.0 PCI bridge: Intel Corporation Cannon Point-LP PCI Express Root Port #9 (rev f1)<br />
00:1d.4 PCI bridge: Intel Corporation Cannon Point-LP PCI Express Root Port #13 (rev f1)<br />
00:1f.0 ISA bridge: Intel Corporation Cannon Point-LP LPC Controller (rev 11)<br />
00:1f.3 Audio device: Intel Corporation Cannon Point-LP High Definition Audio Controller (rev 11)<br />
00:1f.4 SMBus: Intel Corporation Cannon Point-LP SMBus Controller (rev 11)<br />
00:1f.5 Serial bus controller [0c80]: Intel Corporation Cannon Point-LP SPI Controller (rev 11)<br />
00:1f.6 Ethernet controller: Intel Corporation Ethernet Connection (6) I219-V (rev 11)<br />
02:00.0 Wireless controller [0d40]: Intel Corporation XMM7360 LTE Advanced Modem (rev 01)<br />
03:00.0 Non-Volatile memory controller: Sandisk Corp WD Black 2018/PC SN720 NVMe SSD<br />
05:00.0 PCI bridge: Intel Corporation JHL6540 Thunderbolt 3 Bridge (C step) [Alpine Ridge 4C 2016] (rev 02)<br />
06:00.0 PCI bridge: Intel Corporation JHL6540 Thunderbolt 3 Bridge (C step) [Alpine Ridge 4C 2016] (rev 02)<br />
06:01.0 PCI bridge: Intel Corporation JHL6540 Thunderbolt 3 Bridge (C step) [Alpine Ridge 4C 2016] (rev 02)<br />
06:02.0 PCI bridge: Intel Corporation JHL6540 Thunderbolt 3 Bridge (C step) [Alpine Ridge 4C 2016] (rev 02)<br />
06:04.0 PCI bridge: Intel Corporation JHL6540 Thunderbolt 3 Bridge (C step) [Alpine Ridge 4C 2016] (rev 02)<br />
07:00.0 System peripheral: Intel Corporation JHL6540 Thunderbolt 3 NHI (C step) [Alpine Ridge 4C 2016] (rev 02)<br />
2d:00.0 USB controller: Intel Corporation JHL6540 Thunderbolt 3 USB Controller (C step) [Alpine Ridge 4C 2016] (rev 02)<br />
}}<br />
</div></div><br />
<br />
Just in case, on e of the most relevant differences is that I'm not using Fibocom modem but rather the Intel XMM7360 LTE<br />
: Is the Intel XMM7360 LTE a stock configuration option? Have you gotten it to work with Linux? [[User:Wrycode|wrycode]] ([[User talk:Wrycode|talk]]) 05:48, 14 October 2019 (UTC)<br />
I don't have the same lspci output either. I'm in favor of removing that section. It takes up too much space and it's irrelevant/misleading. If we must, the other 6 X1C pages have something like this: <br />
# dmidecode -t system | grep Version<br />
Version: ThinkPad X1 Carbon 7th<br />
[[User:Wrycode|wrycode]] ([[User talk:Wrycode|talk]]) 04:59, 10 January 2020 (UTC)<br />
<br />
== Fibocom LTE now available! ==<br />
<br />
I just saw this [https://forums.lenovo.com/t5/Other-Linux-Discussions/How-To-Configure-X1-Carbon-Gen-7-on-Debian-FingerPrint-4G-Modem/td-p/4550327 Lenovo forum thread] which links to [https://github.com/abrasive/xmm7360 this tool] to flip the Fibocom into USB mode (which has a Linux driver). [[User:Wrycode|wrycode]] ([[User talk:Wrycode|talk]]) 02:49, 13 December 2019 (UTC)<br />
<br />
I did some initial testing but I need to wait for a new sim card to look deeper into this. <br />
* just install acpi_call from the official repositories<br />
* the https://github.com/abrasive/xmm7360 script works exactly as described. NOTE: the modem command interface accessible at /dev/ttyACM0 will be all kinds of broken if you have ModemManager running, so make sure to wait until you've enabled full functionality and unlocked the modem before starting ModemManager.service.<br />
* AT+GTUSBMODE=7 and AT+CFUN=15 work fine to get the modem working but first you have to issue the [https://github.com/abrasive/xmm7360#fcc-lock FCC Lock] commands.<br />
* Now you should be able to run modem-manager-gui and send and receive SMS messages<br />
* to get 4G data, separately configure a new "mobile broadband" GSM connection in Network Manager (you can just use nm-connection editor). I accepted all of the default settings, (including the "number"), except for putting my network's APN in.<br />
* Now the connection should be available to you in one of Network Manager's user interfaces. If you get an error when you select the connection like "device not available", see if /var/lib/NetworkManager/NetworkManager.state has WWANEnabled set to false; to change it you might have to mess around with /etc/NetworkManager/NetworkManager.conf or the nm-applet GUI<br />
* despite what the README says, the modem stayed accessible for me between suspends (but you have to re-run the script after a reboot) <br />
<br />
There's [https://github.com/juhovh/xmm7360_usb this alternative repository] which provides a kernel module for the modem that supposedly stays persistent between reboots. I think the author uses Debian so the makefile would have to be modified for building kernel modules on Arch. [[User:Wrycode|wrycode]] ([[User talk:Wrycode|talk]]) 21:43, 13 December 2019 (UTC)<br />
<br />
== Missing RTC device ==<br />
<br />
{{ic|hwlock --verbose}} returns:<br />
{{bc|<br />
hwclock from util-linux 2.34<br />
System Time: 1577636985.183322<br />
Trying to open: /dev/rtc0<br />
Trying to open: /dev/rtc<br />
Trying to open: /dev/misc/rtc<br />
No usable clock interface found.<br />
hwclock: Cannot access the Hardware Clock via any known method.<br />
}}<br />
<br />
Related messages from dmesg:<br />
{{bc|<br />
[ 0.764314] PM: RTC time: 15:54:28, date: 2019-12-29<br />
[ 1.438054] hctosys: unable to open rtc device (rtc0)<br />
}}<br />
Kernel 5.4.6.arch3-1<br />
[[User:Kubuxu|Kubuxu]] ([[User talk:Kubuxu|talk]]) 16:33, 29 December 2019 (UTC)<br />
: Probably a newer kernel bug because hwclock used to work but now I don't have an rtc device available in /dev/ [[User:Wrycode|wrycode]] ([[User talk:Wrycode|talk]]) 03:15, 16 January 2020 (UTC)<br />
<br />
== Incorrect ethernet dongle information? ==<br />
<br />
I believe the information in the sidebar about the native ethernet dongle has been incorrectly copied and pasted from a previous model, like it was for the [[Lenovo ThinkPad X1 Yoga (Gen 4)|X1Y4]]. Can an X1C7 owner confirm this? [[User:Andersk|Andersk]] ([[User talk:Andersk|talk]]) 06:26, 4 January 2020 (UTC)<br />
<br />
I can confirm that it works out of the box with no problems [[User:GH0S1|GH0S1]] ([[User talk:GH0S1|talk]]) 19:11, 5 January 2020 (UTC)<br />
<br />
But do you have [https://www3.lenovo.com/us/en/accessories-and-monitors/cables-and-adapters/adapters/CABLE-BO-TP-OneLink%2B-to-RJ45-Adapter/p/4X90K06975 the dongle that’s linked], as opposed to say [https://www.lenovo.com/us/en/accessories-and-monitors/cables-and-adapters/adapters/CABLE-BO-Ethernet-Extension-Adapter-2/p/4X90Q84427 this one]? All the pictures I can find suggest that the former is copied-and-pasted from previous models and won’t fit in the X1C7. [[User:Andersk|Andersk]] ([[User talk:Andersk|talk]]) 00:41, 6 January 2020 (UTC)<br />
<br />
You are right. I have the newer dongle. It doesn't look like the older and wider dongle would fit. [[User:GH0S1|GH0S1]] ([[User talk:GH0S1|talk]])<br />
<br />
Cool. Edited the link; feel free to make further edits. [[User:Andersk|Andersk]] ([[User talk:Andersk|talk]]) 01:06, 7 January 2020 (UTC)</div>Goetzchttps://wiki.archlinux.org/index.php?title=Talk:Lenovo_ThinkPad_X1_Carbon_(Gen_7)&diff=596564Talk:Lenovo ThinkPad X1 Carbon (Gen 7)2020-02-01T17:15:58Z<p>Goetzc: /* Volume Controls */ kernel 5.3 works with workaround</p>
<hr />
<div>== <s>Touchpad with 5.4.x</s> ==<br />
With linux 5.4 touchpad stopped working on about 50% of bootups.<br />
With touchpad not working I'm getting following messages in dmesg.<br />
{{bc|1=<br />
[ 4.499490] i2c_designware i2c_designware.1: i2c_dw_handle_tx_abort: lost arbitration<br />
[ 5.518759] i2c_designware i2c_designware.1: controller timed out<br />
[ 5.519959] i2c_hid i2c-SYNA8005:00: failed to retrieve report from device.<br />
[ 5.521187] input: SYNA8005:00 06CB:CD8C Mouse as /devices/pci0000:00/0000:00:15.1/i2c_designware.1/i2c-9/i2c-SYNA8005:00/0018:06CB:CD8C.0001/input/input9<br />
[ 5.521337] input: SYNA8005:00 06CB:CD8C Touchpad as /devices/pci0000:00/0000:00:15.1/i2c_designware.1/i2c-9/i2c-SYNA8005:00/0018:06CB:CD8C.0001/input/input10<br />
[ 5.521442] hid-generic 0018:06CB:CD8C.0001: input,hidraw0: I2C HID v1.00 Mouse [SYNA8005:00 06CB:CD8C] on i2c-SYNA8005:00<br />
[ 6.585507] i2c_designware i2c_designware.1: controller timed out<br />
[ 6.585590] i2c_hid i2c-SYNA8005:00: failed to retrieve report from device.<br />
[ 6.585678] hid-multitouch 0018:06CB:CD8C.0001: failed to fetch feature 8<br />
[ 7.599201] i2c_designware i2c_designware.1: controller timed out<br />
[ 7.599319] i2c_hid i2c-SYNA8005:00: failed to retrieve report from device.<br />
[ 7.599385] hid-multitouch 0018:06CB:CD8C.0001: failed to fetch feature 8<br />
[ 8.612535] i2c_designware i2c_designware.1: controller timed out<br />
[ 8.612636] i2c_hid i2c-SYNA8005:00: failed to retrieve report from device.<br />
[ 8.612711] hid-multitouch 0018:06CB:CD8C.0001: failed to fetch feature 7<br />
[ 9.625537] i2c_designware i2c_designware.1: controller timed out<br />
[ 9.625642] i2c_hid i2c-SYNA8005:00: failed to retrieve report from device.<br />
[ 9.625873] input: SYNA8005:00 06CB:CD8C Mouse as /devices/pci0000:00/0000:00:15.1/i2c_designware.1/i2c-9/i2c-SYNA8005:00/0018:06CB:CD8C.0001/input/input19<br />
[ 9.626417] input: SYNA8005:00 06CB:CD8C Touchpad as /devices/pci0000:00/0000:00:15.1/i2c_designware.1/i2c-9/i2c-SYNA8005:00/0018:06CB:CD8C.0001/input/input20<br />
[ 9.627084] hid-multitouch 0018:06CB:CD8C.0001: input,hidraw0: I2C HID v1.00 Mouse [SYNA8005:00 06CB:CD8C] on i2c-SYNA8005:00<br />
[ 10.132275] kauditd_printk_skb: 15 callbacks suppressed'<br />
[ 10.639147] i2c_designware i2c_designware.1: controller timed out<br />
[ 10.639250] i2c_hid i2c-SYNA8005:00: failed to set a report to device.<br />
[ 11.652134] i2c_designware i2c_designware.1: controller timed out<br />
[ 11.652167] i2c_hid i2c-SYNA8005:00: failed to set a report to device.<br />
[ 12.668764] i2c_designware i2c_designware.1: controller timed out<br />
[ 12.668795] i2c_hid i2c-SYNA8005:00: failed to set a report to device.<br />
[ 13.678765] i2c_designware i2c_designware.1: controller timed out<br />
[ 14.692095] i2c_designware i2c_designware.1: controller timed out<br />
[ every second ...]<br />
[ 26.852160] i2c_designware i2c_designware.1: controller timed out<br />
}} [[User:Kubuxu|Kubuxu]] ([[User talk:Kubuxu|talk]]) 13:47, 16 December 2019 (UTC)<br />
: This might be totally unrelated, but I had both sleep and touchpad break the other day and temporarily fixed it with the snd_hda_intel.dmic_detect=0 kernel option (see [https://old.reddit.com/r/archlinux/comments/e5oe4p/systemctl_suspend_causes_freeze/?st=k49hi5rf&sh=0c42e7c9 this] [[User:Wrycode|wrycode]] ([[User talk:Wrycode|talk]]) 06:28, 17 December 2019 (UTC)<br />
: I have {{ic|snd_hda_intel}} blacklisted to make sure that SOF is used. So far I had one SOF related DSP crash but apart from that SOF seems fine. There is also touchpad firmware update I've applied, I will let you all now about the results. [[User:Kubuxu|Kubuxu]] ([[User talk:Kubuxu|talk]]) 12:11, 17 December 2019 (UTC)<br />
: After updating Touchpad firware (using {{ic|fwupdmgr}}) to 1.3.3013412 problem seems to be resolved. [[User:Kubuxu|Kubuxu]] ([[User talk:Kubuxu|talk]]) 12:43, 27 December 2019 (UTC)<br />
:: Confirmed here as well [[User:Wrycode|wrycode]] ([[User talk:Wrycode|talk]]) 02:42, 28 December 2019 (UTC)<br />
:: Did anyone experience issues with updating this firmware with {{ic|fwupdmgr}}? I continuously get {{ic|1=No upgrades for Touchpad: current version is 1.3.3013337: 1.3.3013337=same}}. I even tried to download the .cab file and use {{ic|fwupdmgr install}} and get {{ic|No supported devices found}} [[User:In0ni|In0ni]] ([[User talk:In0ni|talk]]) 00:20, 7 January 2020 (UTC)<br />
::: Seems like you have the latest update already. [[User:Wrycode|wrycode]] ([[User talk:Wrycode|talk]]) 18:18, 7 January 2020 (UTC)<br />
:::: Latest firmware should be 1.3.3013412 -- not 1.3.3013337. I'm having the issue this discussion is talking about which the latest version fixes. What version of the firmware did you update to? [[User:In0ni|In0ni]] ([[User talk:In0ni|talk]]) 04:19, 9 January 2020 (UTC)<br />
::::: Sorry, I assumed 1.3.3013412 and 1.3.3013337 were the same version or something (the version is listed as "PR3013337/PR3013412" in the Readme on Lenovo's site. I updated to 1.3.3013337 from 1.1.2949533 and my touchpad issues went away. But if you're still having issues with the touchpad then maybe it wasn't actually the firmware update that fixed it for me? I'm on kernel 5.4.8 and everything works except for the microphone. [[User:Wrycode|wrycode]] ([[User talk:Wrycode|talk]]) 04:38, 10 January 2020 (UTC)<br />
: Updated Wiki page with the info [[User:Kubuxu|Kubuxu]] ([[User talk:Kubuxu|talk]]) 17:38, 29 December 2019 (UTC)<br />
: Where are you getting the firmware? The only version I can find is an exe [[User:Mondoman712|Mondoman712]] ([[User talk:Mondoman712|talk]]) 14:07, 23 January 2020 (UTC)<br />
:: I'm using fwupdmgr [[User:Kubuxu|Kubuxu]] ([[User talk:Kubuxu|talk]]) 17:14, 23 January 2020 (UTC)<br />
::: The touchpad wasn't showing up for me there, but it wasn't working when I tried so I rebooted and then it appeared. [[User:Mondoman712|Mondoman712]] ([[User talk:Mondoman712|talk]]) 18:19, 23 January 2020 (UTC)<br />
<br />
== Microphone ==<br />
Did you get your microphone to work neither alsamixer or pavucontrol seem to detect a microphone. ? [[User:Nitrobay|Nitrobay]] ([[User talk:Nitrobay|talk]]) 11:38, 17 August 2019 (UTC)<br />
: I can confirm using [[Advanced_Linux_Sound_Architecture/Troubleshooting#Microphone|this test]], only externally connected microphones work. — [[User:goetzc|goetzc]] ([[User talk:goetzc|wanna talk?]]) 14:24, 17 August 2019 (UTC)<br />
: Looks like Linux kernel 5.3 will include the [https://thesofproject.github.io/latest/index.html SOF firmware update] with the fix for the microphone. — [[User:goetzc|goetzc]] ([[User talk:goetzc|wanna talk?]]) 14:25, 6 September 2019 (UTC)<br />
: After updating to Linux kernel 5.3.1 the microphone still does not work [[User:Moreka|Moreka]] ([[User talk:Moreka|talk]]) 17:30, 23 September 2019 (UTC) [[User:Moreka]] 17:30, 23 September 2019 (UTC)<br />
: I found a configuration that makes the microphones to work ;) but couldn't paste the instructions or a link to them. I created a forum post under Laptop Issues and titled [SOLVED] Fix for microphone on Lenovo X1 Gen 7 [[User:Alphazo|Alphazo]] ([[User talk:Alphazo|talk]]) 10:15, 13 October 2019 (UTC)<br />
: Like others, I wasn't able to get microphone working by following that guide. My results are identical to that of "Mocco" from that forum. Unless I'm misunderstanding the sidebar, I think we should flag microphone to "not working" for this page. [[User:Parth|Parth]] ([[User talk:Parth|talk]]) 23:54, 20 October 2019 (UTC)<br />
: I wasn't able to get microphone working by following that guide as well. I also think we should flag microphone to "not working" for this page. [[User:Moreka|Moreka]] 06:04, 22 October 2019 (UTC)<br />
: Managed to get it working following Alphazo's guide. There are a few typos however, I indicated the required fix in post #9. Hope it helps. [[User:Tbw|Tbw]] ([[User talk:Tbw|talk]]) 21:23, 22 October 2019 (UTC)<br />
: I'll give it another shot and report back [[User:Parth|Parth]] ([[User talk:Parth|talk]]) 17:17, 30 October 2019 (UTC)<br />
: I was able to make the microphone + sound playback work with following the Lenovo docx file and using the sof-hda-generic.tplg and sof-cnl.ri provided in the latest linux firmware package shipped with ubuntu (just download the package and copy the two files in the correct directories). Also the changes in /etc/pulse/default.pa are not necessary. [[User:moreka|moreka]] 17:08, 31 October 2019 (UTC)<br />
: With recent kernel the SOF was disabled [https://bugs.archlinux.org/task/63464]. Solution for me was to install linux-pf and disable CONFIG_SND_SOC_INTEL_SST, enable SOT. [[User:Kubuxu|Kubuxu]] ([[User talk:Kubuxu|talk]]) 14:12, 19 November 2019 (UTC)<br />
: Please test with [https://git.archlinux.org/svntogit/packages.git/log/trunk?h=packages/linux&id=d6bbb261bd2c8f83b9c93041dae9aa4175e20e6e linux 5.4.1-arch1] (in testing) and [https://www.archlinux.org/packages/extra/any/sof-firmware/ sof-firmware] (new). SOF is re-enabled except on Broadwell/Baytrail platforms. [[User:Dpward|Dpward]] ([[User talk:Dpward|talk]]) 17:42, 1 December 2019 (UTC)<br />
: I tested with the new kernel and sof-firmware package (from the Arch repositories). Doing the configs as in the docx file, the sound works well, but the microphone records sounds in a wrong way; it sounds as if it is slow-motion. [[User:moreka]] 15:16, 3 December 2019 (UTC)<br />
: I experienced the same issue like moreka after installing the current kernel (5.4.2.arch1-1) and sof-firmware (1.3.1-1) from the core repo. Also since sof is in use the speakers only provide stereo audio and not using the 4.0 channel profile. [[User:Bin101|Bin101]] ([[User talk:Bin101|talk]]) 19:09, 6 December 2019 (UTC)<br />
: When using {{pkg|sof-firmware}} version 1.4.1 (and latest kernel 5.4.2) the sound card doesn't get recognized at all. Reverting back to sof-firmware 1.3.1 makes the card work again, in the same way explained by users Moreka and Bin101. — [[User:goetzc|Götz]] ([[User talk:goetzc|wanna talk?]]) 13:33, 9 December 2019 (UTC)<br />
: Yeah a whole host of things broke for me in 5.4.2: hibernate, touchpad & sound all broke for me in 5.4.2. [[User:Parth|Parth]] ([[User talk:Parth|talk]]) 04:43, 10 December 2019 (UTC)<br />
: With 5.4.3 the Mic works with custom topology file {{ic|sof-hda-generic-4ch.tplg}}. The touchpad is broken on about 50% of bootups. I will start a new thread about it. [[User:Kubuxu|Kubuxu]] ([[User talk:Kubuxu|talk]]) 13:37, 16 December 2019 (UTC)<br />
: <s>I was (finally!) able to get the mic to work on a HP EliteBook x360 1030 G4, using kernel 5.4.1 and sof-firmware 1.3.1.</s> Spoke too soon. Not working after all. Details [https://bbs.archlinux.org/viewtopic.php?pid=1878341#p1878341 here]. [[User:Darose|Darose]] 21:18, 18 December 2019 (UTC)<br />
: Still problematic with kernel 5.5-rc6 (compiled myself). Just the two top speakers are firing (not the rear ones). Super annoying. The microphone works, though... Using sof-firmware 1.3 (from Arch repo) [[User:Moreka]] 14:18, 17 January 2020<br />
<br />
== <s>Disabling red LED in Thinkpad logo stops</s> ==<br />
<br />
This service doesn't work after a suspend. [[User:Wrycode|wrycode]] ([[User talk:Wrycode|talk]]) 15:36, 9 August 2019 (UTC)<br />
I removed the script and systemd service. They were copied verbatim from the Gen 6 page and don't work as described.[[User:Wrycode|wrycode]] ([[User talk:Wrycode|talk]]) 05:10, 10 January 2020 (UTC)<br />
<br />
== Volume Controls ==<br />
<br />
The section [[Lenovo_ThinkPad_X1_Carbon_(Gen_7)#Volume_Controls|Volume Controls]] fixes the quite/loud volume control, but seems <s>to disable</s> (they are already disabled) the two top-firing speakers, only the two bottom-firing sub-woofers are enabled. --[[User:Goetzc|Goetzc]] ([[User talk:Goetzc|talk]]) 17:12, 9 August 2019 (UTC)<br />
: So this seems to fix the volume control indeed, but the top-firing speakers were already and are still muted, might be a driver bug, but a workaround from another Dolby Atmos laptop might work here. --[[User:Goetzc|Goetzc]] ([[User talk:Goetzc|talk]]) 17:32, 9 August 2019 (UTC)<br />
:: Did you remember to run alsamixer from {{Pkg|alsa-utils}} after installation and turn on/equalize all of the speakers? Mine (top and bottom) are working fine. [[User:Wrycode|wrycode]] ([[User talk:Wrycode|talk]]) 03:54, 13 August 2019 (UTC)<br />
::: You are correct Wrycode, thanks! The "''Master''" volume was low, rising it to 100% makes the top speakers work as expected :) Will add this to the section. <br />
::: Do you happen to know how to make this change (setting the "''Element Master''") so that it's not done on the system {{ic|analog-output.conf.common}} file, and thus the change survives when PulseAudio package is updated? — [[User:goetzc|goetzc]] ([[User talk:goetzc|wanna talk?]])<br />
:::: I did some digging around and I can't find a way to do this. Pulseaudio might not have a user config option for the alsa paths in /usr/. Added the NoUpgrade workaround on the main page. [[User:Wrycode|wrycode]] ([[User talk:Wrycode|talk]]) 02:05, 20 August 2019 (UTC)<br />
<br />
:There is [https://askubuntu.com/a/988993/509340 this interesting] method, which uses 'hdajackretask' from the {{pkg|alsa-tools}} package to remap some pins. The comment is for a different laptop (Asus UX550 using Realtek ALC295), but it exhibits the same issue. We would need to determine the correct pins for this hardware (Realtek ALC285), don't know how, though. — [[User:goetzc|goetzc]] ([[User talk:goetzc|wanna talk?]]) 19:08, 25 August 2019 (UTC)<br />
<br />
I turned on all the speakers with alsamixer from {{Pkg|alsa-utils}} and tried "''Analog Stereo Output''" and "''Analog Surround 4.0 Output''" with {{Pkg|pavucontrol}} but none of these configurations gives a reasonable result. The former makes the front speakers much louder than the rear ones and the latter makes the front speakers silent, testing them with:<br />
<br />
# speaker-test -c4 -l1 -twav<br />
<br />
I was able to compare the sound quality on Windows and it is clear that the bass sound is clearly missing. Is it similar for you or am I missing something ? [[User:Thenitronos|Thenitronos]] ([[User talk:Thenitronos|talk]]) 00:07, 1 February 2020 (UTC)<br />
:This is a new issue, I'm experiencing it too. [[User:Wrycode|wrycode]] ([[User talk:Wrycode|talk]]) 01:29, 1 February 2020 (UTC)<br />
:: I had the same issue with Linux kernel 5.4, but with kernel 5.3 it works (you can get it from the [[Arch Linux Archive]]) when following the [[Lenovo ThinkPad X1 Carbon (Gen 7)#Volume controls|Volume controls]] section (editing the {{ic|analog-output.conf.common}} file). I hope that [https://kernelnewbies.org/LinuxChanges#Linux_5.5.Audio 5.5] fixes this, haven't tried yet. — [[User:goetzc|Götz]] ([[User talk:goetzc|wanna talk?]]) 17:15, 1 February 2020 (UTC)<br />
<br />
== Screen Brightness Function Keys ==<br />
<br />
Is anyone having issues getting the screen brightness function keys working? I had to install [[acpid]] and setup ACPI events and actions to handle it, along with installing the {{Pkg|acpilight}} package. <br />
<br />
My events:<br />
<br />
/etc/acpi/events/FnF5-brightnessdown<br />
# video/brightnessdown BRTDN 00000087 00000000<br />
event=video/brightnessdown<br />
action=xbacklight -dec 3<br />
<br />
/etc/acpi/events/FnF6-brightnessup<br />
# video/brightnessup BRTUP 00000086 00000000<br />
event=video/brightnessup<br />
action=xbacklight -inc 3<br />
<br />
xev doesn't recognise the brightness function keys, so I can't handle the key presses with my window manager. At least that is what I believe, please correct me if I have this all wrong. <br />
[[User:Raybangs|Raybangs]] ([[User talk:Raybangs|talk]]) 10:16, 23 August 2019 (UTC)<br />
<br />
:I didn't have to go through that to get screen brightness going. Can you tell me more about your setup? I'm using Plasma and my brightness controls worked out of the box. [[User:Johncrist1988|Johncrist1988]] ([[User talk:Johncrist1988|talk]]) 14:16, 23 August 2019 (UTC)<br />
<br />
:It works for me also, using {{pkg|brightnessctl}} (as root) or {{pkg|light}} on [[Sway]] or Plasma. — [[User:goetzc|goetzc]] ([[User talk:goetzc|wanna talk?]]) 18:50, 25 August 2019 (UTC)<br />
<br />
:Interesting. I'm using a pretty simple base Arch install with AwesomeWM. I will try {{pkg|brightnessctl}} and see how that goes. {{Unsigned|21:25, 3 September 2019 (UTC)|Raybangs}}<br />
<br />
== UEFI BIOS Update ==<br />
<br />
Currently UEFI BIOS seems to be at [https://pcsupport.lenovo.com/hn/en/products/LAPTOPS-AND-NETBOOKS/THINKPAD-X-SERIES-LAPTOPS/THINKPAD-X1-CARBON-7TH-GEN-TYPE-20QD-20QE/downloads/DS540232 version 1.16]. I am unable to find the .cab file in the link provided, on the [https://fwupd.org/lvfs/devicelist LVFS Device List], nor have had luck with web searches.<br />
<br />
I also followed instructions for [https://wiki.archlinux.org/index.php/Fwupd#Setup_for_UEFI_BIOS_upgrade | UEFI BIOS upgrade from fwupd] on the wiki. Has anyone succeeded in upgrading the firmware to the latest version on Linux? Would using the bootable iso on a USB from the first link work? According the the [https://download.lenovo.com/pccbbs/mobiles/n2hur06w.txt README] it should work (but hesitant to put the iso on USB). [[User:In0ni|In0ni]] ([[User talk:In0ni|talk]]) 22:34, 1 September 2019 (UTC)<br />
: Using the bootable iso on a USB should work fine (vs. a CD/DVD). However, I'm hesitant to upgrade because the 1.05 update is supposedly required before updating to the lates version: <br />
UEFI: ---- / ECP: 1.05<br />
- (Fix) Fixed an issue where system may hang in UEFI BIOS updating process.<br />
(Note) This package must be applied prior to n2hur04w or later package version.`<br />
:The cab files are not available yet. The only way to apply the updates (except for one that's available via fwupdmgr) is through the bootable ISO. I don't see any reason to update personally but if someone else does, please let us know how it goes. [[User:Wrycode|wrycode]] ([[User talk:Wrycode|talk]]) 20:09, 10 September 2019 (UTC)<br />
:: Just BTW for anyone else reading this, I updated via the bootable ISO and it didn't brick my device. Also, the .cab files for Linux are hidden in that link (if you click on the sorting menu, it appears to show only Windows updates but if you click on the categories the Linux files are hidden in there somewhere). [[User:Wrycode|wrycode]] ([[User talk:Wrycode|talk]]) 22:48, 17 December 2019 (UTC)<br />
::: I did upgrade it using {{ic|fwupdmgr install <file_name.cab>}}, after some specific version and restarts, the automatic updates did work using {{ic|fwupdmgr update}}. — [[User:goetzc|Götz]] ([[User talk:goetzc|wanna talk?]]) 21:52, 19 December 2019 (UTC)<br />
<br />
== <s>Why enable S3 sleep? </s>==<br />
<br />
Could someone add a small bit about why S3 sleep should be enabled? I have been using the default S0 sleep for a few weeks and don't see any issues with it. ~ [[User:Akvadrako|Akvadrako]] ([[User talk:Akvadrako|talk]]) 09:55, 10 September 2019 (UTC)<br />
:I was under the impression that S3 sleep is 'normal' sleep (everything powered off except for a trickle to the ram), but I'm not sure what modern Windows does instead. The S0 sleep state means "on", that is, the computer is not asleep, according to https://superuser.com/questions/71835/what-is-the-difference-between-these-four-sleep-states [[User:Wrycode|wrycode]] ([[User talk:Wrycode|talk]]) 04:43, 24 September 2019 (UTC)<br />
<br />
: Windows only supports S0 sleep and it’s the default, so I think it’s debatable what’s normal. But does that really matter? I’m interested in the practical difference. Maybe I’ll benchmark S3 sometime but for now I can say S0 uses about 0.5W and wakes up in about 1s. ~ [[User:Akvadrako|Akvadrako]] ([[User talk:Akvadrako|talk]]) 07:51, 24 September 2019 (UTC)<br />
:: S0 sleep isn't the traditional Suspend-to-RAM "sleep" that Linux users are expecting, that's what I meant by "normal". You are right that S0 is the default for Windows now. https://www.kernel.org/doc/Documentation/power/states.txt] has some details about the sleep states in Linux, and https://docs.microsoft.com/en-us/windows/win32/power/system-power-states has the same for Windows. It's a software-only idle, so it must use slightly more power than S3, where all components are shut down except for the ram. The Windows page claims that S0 wakes up faster than s3 (which would make sense). Another implication: Windows can do stuff after you close the laptop lid like download updates. Windows separately performs a suspend-to-disk whenever you close the lid, so if you remove the battery or the battery runs out your work will still be saved. It's possible Linux can do this too with S0. I just switched to the "Windows" sleep state from the BIOS to try it out and the wake time isn't noticeably different, but my laptop doesn't wake when I open the lid or press the power button. The only way to wake it up is to press the "Fn" key, very odd (especially because I remapped "Fn" to "Ctrl" from the BIOS, so I'm really pressing "Ctrl"). You're not seeing anything like this? [[User:Wrycode|wrycode]] ([[User talk:Wrycode|talk]]) 01:04, 16 October 2019 (UTC)<br />
<br />
:: Normally I do press the Fn button to wake, unless I'm using my external keyboard with AC, though it doesn't bother me. So it seems that and possibly some power savings are the advantages of S3. ~ [[User:Akvadrako|Akvadrako]] ([[User talk:Akvadrako|talk]]) 10:26, 16 October 2019 (UTC)<br />
<br />
== Different lspci output ==<br />
<br />
Can anyone check what's their lspci output? I have realised I am running with a completely different setup of the components myself:<br />
<br />
<div class="toccolours mw-collapsible mw-collapsed" style="width:400px; overflow:auto;"><br />
<div style="font-weight:bold;line-height:1.6;">{{ic|lspci}}</div><br />
<div class="mw-collapsible-content"><br />
{{bc|<br />
00:00.0 Host bridge: Intel Corporation Coffee Lake HOST and DRAM Controller (rev 0c)<br />
00:02.0 VGA compatible controller: Intel Corporation UHD Graphics 620 (Whiskey Lake) (rev 02)<br />
00:04.0 Signal processing controller: Intel Corporation Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor Thermal Subsystem (rev 0c)<br />
00:08.0 System peripheral: Intel Corporation Xeon E3-1200 v5/v6 / E3-1500 v5 / 6th/7th Gen Core Processor Gaussian Mixture Model<br />
00:12.0 Signal processing controller: Intel Corporation Cannon Point-LP Thermal Controller (rev 11)<br />
00:14.0 USB controller: Intel Corporation Cannon Point-LP USB 3.1 xHCI Controller (rev 11)<br />
00:14.2 RAM memory: Intel Corporation Cannon Point-LP Shared SRAM (rev 11)<br />
00:14.3 Network controller: Intel Corporation Cannon Point-LP CNVi [Wireless-AC] (rev 11)<br />
00:15.0 Serial bus controller [0c80]: Intel Corporation Cannon Point-LP Serial IO I2C Controller #0 (rev 11)<br />
00:15.1 Serial bus controller [0c80]: Intel Corporation Cannon Point-LP Serial IO I2C Controller #1 (rev 11)<br />
00:16.0 Communication controller: Intel Corporation Cannon Point-LP MEI Controller #1 (rev 11)<br />
00:1c.0 PCI bridge: Intel Corporation Cannon Point-LP PCI Express Root Port #1 (rev f1)<br />
00:1d.0 PCI bridge: Intel Corporation Cannon Point-LP PCI Express Root Port #9 (rev f1)<br />
00:1d.4 PCI bridge: Intel Corporation Cannon Point-LP PCI Express Root Port #13 (rev f1)<br />
00:1f.0 ISA bridge: Intel Corporation Cannon Point-LP LPC Controller (rev 11)<br />
00:1f.3 Audio device: Intel Corporation Cannon Point-LP High Definition Audio Controller (rev 11)<br />
00:1f.4 SMBus: Intel Corporation Cannon Point-LP SMBus Controller (rev 11)<br />
00:1f.5 Serial bus controller [0c80]: Intel Corporation Cannon Point-LP SPI Controller (rev 11)<br />
00:1f.6 Ethernet controller: Intel Corporation Ethernet Connection (6) I219-V (rev 11)<br />
02:00.0 Wireless controller [0d40]: Intel Corporation XMM7360 LTE Advanced Modem (rev 01)<br />
03:00.0 Non-Volatile memory controller: Sandisk Corp WD Black 2018/PC SN720 NVMe SSD<br />
05:00.0 PCI bridge: Intel Corporation JHL6540 Thunderbolt 3 Bridge (C step) [Alpine Ridge 4C 2016] (rev 02)<br />
06:00.0 PCI bridge: Intel Corporation JHL6540 Thunderbolt 3 Bridge (C step) [Alpine Ridge 4C 2016] (rev 02)<br />
06:01.0 PCI bridge: Intel Corporation JHL6540 Thunderbolt 3 Bridge (C step) [Alpine Ridge 4C 2016] (rev 02)<br />
06:02.0 PCI bridge: Intel Corporation JHL6540 Thunderbolt 3 Bridge (C step) [Alpine Ridge 4C 2016] (rev 02)<br />
06:04.0 PCI bridge: Intel Corporation JHL6540 Thunderbolt 3 Bridge (C step) [Alpine Ridge 4C 2016] (rev 02)<br />
07:00.0 System peripheral: Intel Corporation JHL6540 Thunderbolt 3 NHI (C step) [Alpine Ridge 4C 2016] (rev 02)<br />
2d:00.0 USB controller: Intel Corporation JHL6540 Thunderbolt 3 USB Controller (C step) [Alpine Ridge 4C 2016] (rev 02)<br />
}}<br />
</div></div><br />
<br />
Just in case, on e of the most relevant differences is that I'm not using Fibocom modem but rather the Intel XMM7360 LTE<br />
: Is the Intel XMM7360 LTE a stock configuration option? Have you gotten it to work with Linux? [[User:Wrycode|wrycode]] ([[User talk:Wrycode|talk]]) 05:48, 14 October 2019 (UTC)<br />
I don't have the same lspci output either. I'm in favor of removing that section. It takes up too much space and it's irrelevant/misleading. If we must, the other 6 X1C pages have something like this: <br />
# dmidecode -t system | grep Version<br />
Version: ThinkPad X1 Carbon 7th<br />
[[User:Wrycode|wrycode]] ([[User talk:Wrycode|talk]]) 04:59, 10 January 2020 (UTC)<br />
<br />
== Fibocom LTE now available! ==<br />
<br />
I just saw this [https://forums.lenovo.com/t5/Other-Linux-Discussions/How-To-Configure-X1-Carbon-Gen-7-on-Debian-FingerPrint-4G-Modem/td-p/4550327 Lenovo forum thread] which links to [https://github.com/abrasive/xmm7360 this tool] to flip the Fibocom into USB mode (which has a Linux driver). [[User:Wrycode|wrycode]] ([[User talk:Wrycode|talk]]) 02:49, 13 December 2019 (UTC)<br />
<br />
I did some initial testing but I need to wait for a new sim card to look deeper into this. <br />
* just install acpi_call from the official repositories<br />
* the https://github.com/abrasive/xmm7360 script works exactly as described. NOTE: the modem command interface accessible at /dev/ttyACM0 will be all kinds of broken if you have ModemManager running, so make sure to wait until you've enabled full functionality and unlocked the modem before starting ModemManager.service.<br />
* AT+GTUSBMODE=7 and AT+CFUN=15 work fine to get the modem working but first you have to issue the [https://github.com/abrasive/xmm7360#fcc-lock FCC Lock] commands.<br />
* Now you should be able to run modem-manager-gui and send and receive SMS messages<br />
* to get 4G data, separately configure a new "mobile broadband" GSM connection in Network Manager (you can just use nm-connection editor). I accepted all of the default settings, (including the "number"), except for putting my network's APN in.<br />
* Now the connection should be available to you in one of Network Manager's user interfaces. If you get an error when you select the connection like "device not available", see if /var/lib/NetworkManager/NetworkManager.state has WWANEnabled set to false; to change it you might have to mess around with /etc/NetworkManager/NetworkManager.conf or the nm-applet GUI<br />
* despite what the README says, the modem stayed accessible for me between suspends (but you have to re-run the script after a reboot) <br />
<br />
There's [https://github.com/juhovh/xmm7360_usb this alternative repository] which provides a kernel module for the modem that supposedly stays persistent between reboots. I think the author uses Debian so the makefile would have to be modified for building kernel modules on Arch. [[User:Wrycode|wrycode]] ([[User talk:Wrycode|talk]]) 21:43, 13 December 2019 (UTC)<br />
<br />
== Missing RTC device ==<br />
<br />
{{ic|hwlock --verbose}} returns:<br />
{{bc|<br />
hwclock from util-linux 2.34<br />
System Time: 1577636985.183322<br />
Trying to open: /dev/rtc0<br />
Trying to open: /dev/rtc<br />
Trying to open: /dev/misc/rtc<br />
No usable clock interface found.<br />
hwclock: Cannot access the Hardware Clock via any known method.<br />
}}<br />
<br />
Related messages from dmesg:<br />
{{bc|<br />
[ 0.764314] PM: RTC time: 15:54:28, date: 2019-12-29<br />
[ 1.438054] hctosys: unable to open rtc device (rtc0)<br />
}}<br />
Kernel 5.4.6.arch3-1<br />
[[User:Kubuxu|Kubuxu]] ([[User talk:Kubuxu|talk]]) 16:33, 29 December 2019 (UTC)<br />
: Probably a newer kernel bug because hwclock used to work but now I don't have an rtc device available in /dev/ [[User:Wrycode|wrycode]] ([[User talk:Wrycode|talk]]) 03:15, 16 January 2020 (UTC)<br />
<br />
== Incorrect ethernet dongle information? ==<br />
<br />
I believe the information in the sidebar about the native ethernet dongle has been incorrectly copied and pasted from a previous model, like it was for the [[Lenovo ThinkPad X1 Yoga (Gen 4)|X1Y4]]. Can an X1C7 owner confirm this? [[User:Andersk|Andersk]] ([[User talk:Andersk|talk]]) 06:26, 4 January 2020 (UTC)<br />
<br />
I can confirm that it works out of the box with no problems [[User:GH0S1|GH0S1]] ([[User talk:GH0S1|talk]]) 19:11, 5 January 2020 (UTC)<br />
<br />
But do you have [https://www3.lenovo.com/us/en/accessories-and-monitors/cables-and-adapters/adapters/CABLE-BO-TP-OneLink%2B-to-RJ45-Adapter/p/4X90K06975 the dongle that’s linked], as opposed to say [https://www.lenovo.com/us/en/accessories-and-monitors/cables-and-adapters/adapters/CABLE-BO-Ethernet-Extension-Adapter-2/p/4X90Q84427 this one]? All the pictures I can find suggest that the former is copied-and-pasted from previous models and won’t fit in the X1C7. [[User:Andersk|Andersk]] ([[User talk:Andersk|talk]]) 00:41, 6 January 2020 (UTC)<br />
<br />
You are right. I have the newer dongle. It doesn't look like the older and wider dongle would fit. [[User:GH0S1|GH0S1]] ([[User talk:GH0S1|talk]])<br />
<br />
Cool. Edited the link; feel free to make further edits. [[User:Andersk|Andersk]] ([[User talk:Andersk|talk]]) 01:06, 7 January 2020 (UTC)</div>Goetzchttps://wiki.archlinux.org/index.php?title=Talk:Lenovo_ThinkPad_X1_Carbon_(Gen_7)&diff=592231Talk:Lenovo ThinkPad X1 Carbon (Gen 7)2019-12-19T21:52:39Z<p>Goetzc: /* UEFI BIOS Update */ using "fwupdmgr install" to upgrade BIOS/firmware</p>
<hr />
<div>== Touchpad with 5.4.x ==<br />
With linux 5.4 touchpad stopped working on about 50% of bootups.<br />
With touchpad not working I'm getting following messages in dmesg.<br />
{{bc|1=<br />
[ 4.499490] i2c_designware i2c_designware.1: i2c_dw_handle_tx_abort: lost arbitration<br />
[ 5.518759] i2c_designware i2c_designware.1: controller timed out<br />
[ 5.519959] i2c_hid i2c-SYNA8005:00: failed to retrieve report from device.<br />
[ 5.521187] input: SYNA8005:00 06CB:CD8C Mouse as /devices/pci0000:00/0000:00:15.1/i2c_designware.1/i2c-9/i2c-SYNA8005:00/0018:06CB:CD8C.0001/input/input9<br />
[ 5.521337] input: SYNA8005:00 06CB:CD8C Touchpad as /devices/pci0000:00/0000:00:15.1/i2c_designware.1/i2c-9/i2c-SYNA8005:00/0018:06CB:CD8C.0001/input/input10<br />
[ 5.521442] hid-generic 0018:06CB:CD8C.0001: input,hidraw0: I2C HID v1.00 Mouse [SYNA8005:00 06CB:CD8C] on i2c-SYNA8005:00<br />
[ 6.585507] i2c_designware i2c_designware.1: controller timed out<br />
[ 6.585590] i2c_hid i2c-SYNA8005:00: failed to retrieve report from device.<br />
[ 6.585678] hid-multitouch 0018:06CB:CD8C.0001: failed to fetch feature 8<br />
[ 7.599201] i2c_designware i2c_designware.1: controller timed out<br />
[ 7.599319] i2c_hid i2c-SYNA8005:00: failed to retrieve report from device.<br />
[ 7.599385] hid-multitouch 0018:06CB:CD8C.0001: failed to fetch feature 8<br />
[ 8.612535] i2c_designware i2c_designware.1: controller timed out<br />
[ 8.612636] i2c_hid i2c-SYNA8005:00: failed to retrieve report from device.<br />
[ 8.612711] hid-multitouch 0018:06CB:CD8C.0001: failed to fetch feature 7<br />
[ 9.625537] i2c_designware i2c_designware.1: controller timed out<br />
[ 9.625642] i2c_hid i2c-SYNA8005:00: failed to retrieve report from device.<br />
[ 9.625873] input: SYNA8005:00 06CB:CD8C Mouse as /devices/pci0000:00/0000:00:15.1/i2c_designware.1/i2c-9/i2c-SYNA8005:00/0018:06CB:CD8C.0001/input/input19<br />
[ 9.626417] input: SYNA8005:00 06CB:CD8C Touchpad as /devices/pci0000:00/0000:00:15.1/i2c_designware.1/i2c-9/i2c-SYNA8005:00/0018:06CB:CD8C.0001/input/input20<br />
[ 9.627084] hid-multitouch 0018:06CB:CD8C.0001: input,hidraw0: I2C HID v1.00 Mouse [SYNA8005:00 06CB:CD8C] on i2c-SYNA8005:00<br />
[ 10.132275] kauditd_printk_skb: 15 callbacks suppressed'<br />
[ 10.639147] i2c_designware i2c_designware.1: controller timed out<br />
[ 10.639250] i2c_hid i2c-SYNA8005:00: failed to set a report to device.<br />
[ 11.652134] i2c_designware i2c_designware.1: controller timed out<br />
[ 11.652167] i2c_hid i2c-SYNA8005:00: failed to set a report to device.<br />
[ 12.668764] i2c_designware i2c_designware.1: controller timed out<br />
[ 12.668795] i2c_hid i2c-SYNA8005:00: failed to set a report to device.<br />
[ 13.678765] i2c_designware i2c_designware.1: controller timed out<br />
[ 14.692095] i2c_designware i2c_designware.1: controller timed out<br />
[ every second ...]<br />
[ 26.852160] i2c_designware i2c_designware.1: controller timed out<br />
}} [[User:Kubuxu|Kubuxu]] ([[User talk:Kubuxu|talk]]) 13:47, 16 December 2019 (UTC)<br />
: This might be totally unrelated, but I had both sleep and touchpad break the other day and temporarily fixed it with the snd_hda_intel.dmic_detect=0 kernel option (see [https://old.reddit.com/r/archlinux/comments/e5oe4p/systemctl_suspend_causes_freeze/?st=k49hi5rf&sh=0c42e7c9 this] [[User:Wrycode|wrycode]] ([[User talk:Wrycode|talk]]) 06:28, 17 December 2019 (UTC)<br />
: I have {{ic|snd_hda_intel}} blacklisted to make sure that SOF is used. So far I had one SOF related DSP crash but apart from that SOF seems fine. There is also touchpad firmware update I've applied, I will let you all now about the results. [[User:Kubuxu|Kubuxu]] ([[User talk:Kubuxu|talk]]) 12:11, 17 December 2019 (UTC)<br />
<br />
== Microphone ==<br />
Did you get your microphone to work neither alsamixer or pavucontrol seem to detect a microphone. ? [[User:Nitrobay|Nitrobay]] ([[User talk:Nitrobay|talk]]) 11:38, 17 August 2019 (UTC)<br />
: I can confirm using [[Advanced_Linux_Sound_Architecture/Troubleshooting#Microphone|this test]], only externally connected microphones work. — [[User:goetzc|goetzc]] ([[User talk:goetzc|wanna talk?]]) 14:24, 17 August 2019 (UTC)<br />
: Looks like Linux kernel 5.3 will include the [https://thesofproject.github.io/latest/index.html SOF firmware update] with the fix for the microphone. — [[User:goetzc|goetzc]] ([[User talk:goetzc|wanna talk?]]) 14:25, 6 September 2019 (UTC)<br />
: After updating to Linux kernel 5.3.1 the microphone still does not work [[User:Moreka|Moreka]] ([[User talk:Moreka|talk]]) 17:30, 23 September 2019 (UTC) [[User:Moreka]] 17:30, 23 September 2019 (UTC)<br />
: I found a configuration that makes the microphones to work ;) but couldn't paste the instructions or a link to them. I created a forum post under Laptop Issues and titled [SOLVED] Fix for microphone on Lenovo X1 Gen 7 [[User:Alphazo|Alphazo]] ([[User talk:Alphazo|talk]]) 10:15, 13 October 2019 (UTC)<br />
: Like others, I wasn't able to get microphone working by following that guide. My results are identical to that of "Mocco" from that forum. Unless I'm misunderstanding the sidebar, I think we should flag microphone to "not working" for this page. [[User:Parth|Parth]] ([[User talk:Parth|talk]]) 23:54, 20 October 2019 (UTC)<br />
: I wasn't able to get microphone working by following that guide as well. I also think we should flag microphone to "not working" for this page. [[User:Moreka|Moreka]] 06:04, 22 October 2019 (UTC)<br />
: Managed to get it working following Alphazo's guide. There are a few typos however, I indicated the required fix in post #9. Hope it helps. [[User:Tbw|Tbw]] ([[User talk:Tbw|talk]]) 21:23, 22 October 2019 (UTC)<br />
: I'll give it another shot and report back [[User:Parth|Parth]] ([[User talk:Parth|talk]]) 17:17, 30 October 2019 (UTC)<br />
: I was able to make the microphone + sound playback work with following the Lenovo docx file and using the sof-hda-generic.tplg and sof-cnl.ri provided in the latest linux firmware package shipped with ubuntu (just download the package and copy the two files in the correct directories). Also the changes in /etc/pulse/default.pa are not necessary. [[User:moreka|moreka]] 17:08, 31 October 2019 (UTC)<br />
: With recent kernel the SOF was disabled [https://bugs.archlinux.org/task/63464]. Solution for me was to install linux-pf and disable CONFIG_SND_SOC_INTEL_SST, enable SOT. [[User:Kubuxu|Kubuxu]] ([[User talk:Kubuxu|talk]]) 14:12, 19 November 2019 (UTC)<br />
: Please test with [https://git.archlinux.org/svntogit/packages.git/log/trunk?h=packages/linux&id=d6bbb261bd2c8f83b9c93041dae9aa4175e20e6e linux 5.4.1-arch1] (in testing) and [https://www.archlinux.org/packages/extra/any/sof-firmware/ sof-firmware] (new). SOF is re-enabled except on Broadwell/Baytrail platforms. [[User:Dpward|Dpward]] ([[User talk:Dpward|talk]]) 17:42, 1 December 2019 (UTC)<br />
: I tested with the new kernel and sof-firmware package (from the Arch repositories). Doing the configs as in the docx file, the sound works well, but the microphone records sounds in a wrong way; it sounds as if it is slow-motion. [[User:moreka]] 15:16, 3 December 2019 (UTC)<br />
: I experienced the same issue like moreka after installing the current kernel (5.4.2.arch1-1) and sof-firmware (1.3.1-1) from the core repo. Also since sof is in use the speakers only provide stereo audio and not using the 4.0 channel profile. [[User:Bin101|Bin101]] ([[User talk:Bin101|talk]]) 19:09, 6 December 2019 (UTC)<br />
: When using {{pkg|sof-firmware}} version 1.4.1 (and latest kernel 5.4.2) the sound card doesn't get recognized at all. Reverting back to sof-firmware 1.3.1 makes the card work again, in the same way explained by users Moreka and Bin101. — [[User:goetzc|Götz]] ([[User talk:goetzc|wanna talk?]]) 13:33, 9 December 2019 (UTC)<br />
: Yeah a whole host of things broke for me in 5.4.2: hibernate, touchpad & sound all broke for me in 5.4.2. [[User:Parth|Parth]] ([[User talk:Parth|talk]]) 04:43, 10 December 2019 (UTC)<br />
: With 5.4.3 the Mic works with custom topology file {{ic|sof-hda-generic-4ch.tplg}}. The touchpad is broken on about 50% of bootups. I will start a new thread about it. [[User:Kubuxu|Kubuxu]] ([[User talk:Kubuxu|talk]]) 13:37, 16 December 2019 (UTC)<br />
: <s>I was (finally!) able to get the mic to work on a HP EliteBook x360 1030 G4, using kernel 5.4.1 and sof-firmware 1.3.1.</s> Spoke too soon. Not working after all. Details [https://bbs.archlinux.org/viewtopic.php?pid=1878341#p1878341 here]. [[User:Darose|Darose]] 21:18, 18 December 2019 (UTC)<br />
<br />
== Disabling red LED in Thinkpad logo stops ==<br />
<br />
This service doesn't work after a suspend. [[User:Wrycode|wrycode]] ([[User talk:Wrycode|talk]]) 15:36, 9 August 2019 (UTC)<br />
<br />
== Volume Controls ==<br />
<br />
The section [[Lenovo_ThinkPad_X1_Carbon_(Gen_7)#Volume_Controls|Volume Controls]] fixes the quite/loud volume control, but seems <s>to disable</s> (they are already disabled) the two top-firing speakers, only the two bottom-firing sub-woofers are enabled. --[[User:Goetzc|Goetzc]] ([[User talk:Goetzc|talk]]) 17:12, 9 August 2019 (UTC)<br />
: So this seems to fix the volume control indeed, but the top-firing speakers were already and are still muted, might be a driver bug, but a workaround from another Dolby Atmos laptop might work here. --[[User:Goetzc|Goetzc]] ([[User talk:Goetzc|talk]]) 17:32, 9 August 2019 (UTC)<br />
:: Did you remember to run alsamixer from {{Pkg|alsa-utils}} after installation and turn on/equalize all of the speakers? Mine (top and bottom) are working fine. [[User:Wrycode|wrycode]] ([[User talk:Wrycode|talk]]) 03:54, 13 August 2019 (UTC)<br />
::: You are correct Wrycode, thanks! The "''Master''" volume was low, rising it to 100% makes the top speakers work as expected :) Will add this to the section. <br />
::: Do you happen to know how to make this change (setting the "''Element Master''") so that it's not done on the system {{ic|analog-output.conf.common}} file, and thus the change survives when PulseAudio package is updated? — [[User:goetzc|goetzc]] ([[User talk:goetzc|wanna talk?]])<br />
:::: I did some digging around and I can't find a way to do this. Pulseaudio might not have a user config option for the alsa paths in /usr/. Added the NoUpgrade workaround on the main page. [[User:Wrycode|wrycode]] ([[User talk:Wrycode|talk]]) 02:05, 20 August 2019 (UTC)<br />
<br />
:There is [https://askubuntu.com/a/988993/509340 this interesting] method, which uses 'hdajackretask' from the {{pkg|alsa-tools}} package to remap some pins. The comment is for a different laptop (Asus UX550 using Realtek ALC295), but it exhibits the same issue. We would need to determine the correct pins for this hardware (Realtek ALC285), don't know how, though. — [[User:goetzc|goetzc]] ([[User talk:goetzc|wanna talk?]]) 19:08, 25 August 2019 (UTC)<br />
<br />
== Screen Brightness Function Keys ==<br />
<br />
Is anyone having issues getting the screen brightness function keys working? I had to install [[acpid]] and setup ACPI events and actions to handle it, along with installing the {{Pkg|acpilight}} package. <br />
<br />
My events:<br />
<br />
/etc/acpi/events/FnF5-brightnessdown<br />
# video/brightnessdown BRTDN 00000087 00000000<br />
event=video/brightnessdown<br />
action=xbacklight -dec 3<br />
<br />
/etc/acpi/events/FnF6-brightnessup<br />
# video/brightnessup BRTUP 00000086 00000000<br />
event=video/brightnessup<br />
action=xbacklight -inc 3<br />
<br />
xev doesn't recognise the brightness function keys, so I can't handle the key presses with my window manager. At least that is what I believe, please correct me if I have this all wrong. <br />
[[User:Raybangs|Raybangs]] ([[User talk:Raybangs|talk]]) 10:16, 23 August 2019 (UTC)<br />
<br />
:I didn't have to go through that to get screen brightness going. Can you tell me more about your setup? I'm using Plasma and my brightness controls worked out of the box. [[User:Johncrist1988|Johncrist1988]] ([[User talk:Johncrist1988|talk]]) 14:16, 23 August 2019 (UTC)<br />
<br />
:It works for me also, using {{pkg|brightnessctl}} (as root) or {{pkg|light}} on [[Sway]] or Plasma. — [[User:goetzc|goetzc]] ([[User talk:goetzc|wanna talk?]]) 18:50, 25 August 2019 (UTC)<br />
<br />
:Interesting. I'm using a pretty simple base Arch install with AwesomeWM. I will try {{pkg|brightnessctl}} and see how that goes. {{Unsigned|21:25, 3 September 2019 (UTC)|Raybangs}}<br />
<br />
== UEFI BIOS Update ==<br />
<br />
Currently UEFI BIOS seems to be at [https://pcsupport.lenovo.com/hn/en/products/LAPTOPS-AND-NETBOOKS/THINKPAD-X-SERIES-LAPTOPS/THINKPAD-X1-CARBON-7TH-GEN-TYPE-20QD-20QE/downloads/DS540232 version 1.16]. I am unable to find the .cab file in the link provided, on the [https://fwupd.org/lvfs/devicelist LVFS Device List], nor have had luck with web searches.<br />
<br />
I also followed instructions for [https://wiki.archlinux.org/index.php/Fwupd#Setup_for_UEFI_BIOS_upgrade | UEFI BIOS upgrade from fwupd] on the wiki. Has anyone succeeded in upgrading the firmware to the latest version on Linux? Would using the bootable iso on a USB from the first link work? According the the [https://download.lenovo.com/pccbbs/mobiles/n2hur06w.txt README] it should work (but hesitant to put the iso on USB). [[User:In0ni|In0ni]] ([[User talk:In0ni|talk]]) 22:34, 1 September 2019 (UTC)<br />
: Using the bootable iso on a USB should work fine (vs. a CD/DVD). However, I'm hesitant to upgrade because the 1.05 update is supposedly required before updating to the lates version: <br />
UEFI: ---- / ECP: 1.05<br />
- (Fix) Fixed an issue where system may hang in UEFI BIOS updating process.<br />
(Note) This package must be applied prior to n2hur04w or later package version.`<br />
:The cab files are not available yet. The only way to apply the updates (except for one that's available via fwupdmgr) is through the bootable ISO. I don't see any reason to update personally but if someone else does, please let us know how it goes. [[User:Wrycode|wrycode]] ([[User talk:Wrycode|talk]]) 20:09, 10 September 2019 (UTC)<br />
:: Just BTW for anyone else reading this, I updated via the bootable ISO and it didn't brick my device. Also, the .cab files for Linux are hidden in that link (if you click on the sorting menu, it appears to show only Windows updates but if you click on the categories the Linux files are hidden in there somewhere). [[User:Wrycode|wrycode]] ([[User talk:Wrycode|talk]]) 22:48, 17 December 2019 (UTC)<br />
::: I did upgrade it using {{ic|fwupdmgr install <file_name.cab>}}, after some specific version and restarts, the automatic updates did work using {{ic|fwupdmgr update}}. — [[User:goetzc|Götz]] ([[User talk:goetzc|wanna talk?]]) 21:52, 19 December 2019 (UTC)<br />
<br />
== Why enable S3 sleep? ==<br />
<br />
Could someone add a small bit about why S3 sleep should be enabled? I have been using the default S0 sleep for a few weeks and don't see any issues with it. ~ [[User:Akvadrako|Akvadrako]] ([[User talk:Akvadrako|talk]]) 09:55, 10 September 2019 (UTC)<br />
:I was under the impression that S3 sleep is 'normal' sleep (everything powered off except for a trickle to the ram), but I'm not sure what modern Windows does instead. The S0 sleep state means "on", that is, the computer is not asleep, according to https://superuser.com/questions/71835/what-is-the-difference-between-these-four-sleep-states [[User:Wrycode|wrycode]] ([[User talk:Wrycode|talk]]) 04:43, 24 September 2019 (UTC)<br />
<br />
: Windows only supports S0 sleep and it’s the default, so I think it’s debatable what’s normal. But does that really matter? I’m interested in the practical difference. Maybe I’ll benchmark S3 sometime but for now I can say S0 uses about 0.5W and wakes up in about 1s. ~ [[User:Akvadrako|Akvadrako]] ([[User talk:Akvadrako|talk]]) 07:51, 24 September 2019 (UTC)<br />
:: S0 sleep isn't the traditional Suspend-to-RAM "sleep" that Linux users are expecting, that's what I meant by "normal". You are right that S0 is the default for Windows now. https://www.kernel.org/doc/Documentation/power/states.txt] has some details about the sleep states in Linux, and https://docs.microsoft.com/en-us/windows/win32/power/system-power-states has the same for Windows. It's a software-only idle, so it must use slightly more power than S3, where all components are shut down except for the ram. The Windows page claims that S0 wakes up faster than s3 (which would make sense). Another implication: Windows can do stuff after you close the laptop lid like download updates. Windows separately performs a suspend-to-disk whenever you close the lid, so if you remove the battery or the battery runs out your work will still be saved. It's possible Linux can do this too with S0. I just switched to the "Windows" sleep state from the BIOS to try it out and the wake time isn't noticeably different, but my laptop doesn't wake when I open the lid or press the power button. The only way to wake it up is to press the "Fn" key, very odd (especially because I remapped "Fn" to "Ctrl" from the BIOS, so I'm really pressing "Ctrl"). You're not seeing anything like this? [[User:Wrycode|wrycode]] ([[User talk:Wrycode|talk]]) 01:04, 16 October 2019 (UTC)<br />
<br />
:: Normally I do press the Fn button to wake, unless I'm using my external keyboard with AC, though it doesn't bother me. So it seems that and possibly some power savings are the advantages of S3. ~ [[User:Akvadrako|Akvadrako]] ([[User talk:Akvadrako|talk]]) 10:26, 16 October 2019 (UTC)<br />
<br />
== Different lspci output ==<br />
<br />
Can anyone check what's their lspci output? I have realised I am running with a completely different setup of the components myself:<br />
<br />
<div class="toccolours mw-collapsible mw-collapsed" style="width:400px; overflow:auto;"><br />
<div style="font-weight:bold;line-height:1.6;">{{ic|lspci}}</div><br />
<div class="mw-collapsible-content"><br />
{{bc|<br />
00:00.0 Host bridge: Intel Corporation Coffee Lake HOST and DRAM Controller (rev 0c)<br />
00:02.0 VGA compatible controller: Intel Corporation UHD Graphics 620 (Whiskey Lake) (rev 02)<br />
00:04.0 Signal processing controller: Intel Corporation Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor Thermal Subsystem (rev 0c)<br />
00:08.0 System peripheral: Intel Corporation Xeon E3-1200 v5/v6 / E3-1500 v5 / 6th/7th Gen Core Processor Gaussian Mixture Model<br />
00:12.0 Signal processing controller: Intel Corporation Cannon Point-LP Thermal Controller (rev 11)<br />
00:14.0 USB controller: Intel Corporation Cannon Point-LP USB 3.1 xHCI Controller (rev 11)<br />
00:14.2 RAM memory: Intel Corporation Cannon Point-LP Shared SRAM (rev 11)<br />
00:14.3 Network controller: Intel Corporation Cannon Point-LP CNVi [Wireless-AC] (rev 11)<br />
00:15.0 Serial bus controller [0c80]: Intel Corporation Cannon Point-LP Serial IO I2C Controller #0 (rev 11)<br />
00:15.1 Serial bus controller [0c80]: Intel Corporation Cannon Point-LP Serial IO I2C Controller #1 (rev 11)<br />
00:16.0 Communication controller: Intel Corporation Cannon Point-LP MEI Controller #1 (rev 11)<br />
00:1c.0 PCI bridge: Intel Corporation Cannon Point-LP PCI Express Root Port #1 (rev f1)<br />
00:1d.0 PCI bridge: Intel Corporation Cannon Point-LP PCI Express Root Port #9 (rev f1)<br />
00:1d.4 PCI bridge: Intel Corporation Cannon Point-LP PCI Express Root Port #13 (rev f1)<br />
00:1f.0 ISA bridge: Intel Corporation Cannon Point-LP LPC Controller (rev 11)<br />
00:1f.3 Audio device: Intel Corporation Cannon Point-LP High Definition Audio Controller (rev 11)<br />
00:1f.4 SMBus: Intel Corporation Cannon Point-LP SMBus Controller (rev 11)<br />
00:1f.5 Serial bus controller [0c80]: Intel Corporation Cannon Point-LP SPI Controller (rev 11)<br />
00:1f.6 Ethernet controller: Intel Corporation Ethernet Connection (6) I219-V (rev 11)<br />
02:00.0 Wireless controller [0d40]: Intel Corporation XMM7360 LTE Advanced Modem (rev 01)<br />
03:00.0 Non-Volatile memory controller: Sandisk Corp WD Black 2018/PC SN720 NVMe SSD<br />
05:00.0 PCI bridge: Intel Corporation JHL6540 Thunderbolt 3 Bridge (C step) [Alpine Ridge 4C 2016] (rev 02)<br />
06:00.0 PCI bridge: Intel Corporation JHL6540 Thunderbolt 3 Bridge (C step) [Alpine Ridge 4C 2016] (rev 02)<br />
06:01.0 PCI bridge: Intel Corporation JHL6540 Thunderbolt 3 Bridge (C step) [Alpine Ridge 4C 2016] (rev 02)<br />
06:02.0 PCI bridge: Intel Corporation JHL6540 Thunderbolt 3 Bridge (C step) [Alpine Ridge 4C 2016] (rev 02)<br />
06:04.0 PCI bridge: Intel Corporation JHL6540 Thunderbolt 3 Bridge (C step) [Alpine Ridge 4C 2016] (rev 02)<br />
07:00.0 System peripheral: Intel Corporation JHL6540 Thunderbolt 3 NHI (C step) [Alpine Ridge 4C 2016] (rev 02)<br />
2d:00.0 USB controller: Intel Corporation JHL6540 Thunderbolt 3 USB Controller (C step) [Alpine Ridge 4C 2016] (rev 02)<br />
}}<br />
</div></div><br />
<br />
Just in case, on e of the most relevant differences is that I'm not using Fibocom modem but rather the Intel XMM7360 LTE<br />
: Is the Intel XMM7360 LTE a stock configuration option? Have you gotten it to work with Linux? [[User:Wrycode|wrycode]] ([[User talk:Wrycode|talk]]) 05:48, 14 October 2019 (UTC)<br />
<br />
== Fibocom LTE now available! ==<br />
<br />
I just saw this [https://forums.lenovo.com/t5/Other-Linux-Discussions/How-To-Configure-X1-Carbon-Gen-7-on-Debian-FingerPrint-4G-Modem/td-p/4550327 Lenovo forum thread] which links to [https://github.com/abrasive/xmm7360 this tool] to flip the Fibocom into USB mode (which has a Linux driver). [[User:Wrycode|wrycode]] ([[User talk:Wrycode|talk]]) 02:49, 13 December 2019 (UTC)<br />
<br />
I did some initial testing but I need to wait for a new sim card to look deeper into this. <br />
* just install acpi_call from the official repositories<br />
* the https://github.com/abrasive/xmm7360 script works exactly as described. NOTE: the modem command interface accessible at /dev/ttyACM0 will be all kinds of broken if you have ModemManager running, so make sure to wait until you've enabled full functionality and unlocked the modem before starting ModemManager.service.<br />
* AT+GTUSBMODE=7 and AT+CFUN=15 work fine to get the modem working but first you have to issue the [https://github.com/abrasive/xmm7360#fcc-lock FCC Lock] commands.<br />
* Now you should be able to run modem-manager-gui and send and receive SMS messages<br />
* to get 4G data, separately configure a new "mobile broadband" GSM connection in Network Manager (you can just use nm-connection editor). I accepted all of the default settings, (including the "number"), except for putting my network's APN in.<br />
* Now the connection should be available to you in one of Network Manager's user interfaces. If you get an error when you select the connection like "device not available", see if /var/lib/NetworkManager/NetworkManager.state has WWANEnabled set to false; to change it you might have to mess around with /etc/NetworkManager/NetworkManager.conf or the nm-applet GUI<br />
* despite what the README says, the modem stayed accessible for me between suspends (but you have to re-run the script after a reboot) <br />
<br />
There's [https://github.com/juhovh/xmm7360_usb this alternative repository] which provides a kernel module for the modem that supposedly stays persistent between reboots. I think the author uses Debian so the makefile would have to be modified for building kernel modules on Arch. [[User:Wrycode|wrycode]] ([[User talk:Wrycode|talk]]) 21:43, 13 December 2019 (UTC)</div>Goetzchttps://wiki.archlinux.org/index.php?title=Talk:Lenovo_ThinkPad_X1_Carbon_(Gen_7)&diff=591442Talk:Lenovo ThinkPad X1 Carbon (Gen 7)2019-12-09T13:34:03Z<p>Goetzc: /* Microphone */ sof-firmware 1.4.1 experience</p>
<hr />
<div>== Microphone ==<br />
Did you get your microphone to work neither alsamixer or pavucontrol seem to detect a microphone. ? [[User:Nitrobay|Nitrobay]] ([[User talk:Nitrobay|talk]]) 11:38, 17 August 2019 (UTC)<br />
: I can confirm using [[Advanced_Linux_Sound_Architecture/Troubleshooting#Microphone|this test]], only externally connected microphones work. — [[User:goetzc|goetzc]] ([[User talk:goetzc|wanna talk?]]) 14:24, 17 August 2019 (UTC)<br />
: Looks like Linux kernel 5.3 will include the [https://thesofproject.github.io/latest/index.html SOF firmware update] with the fix for the microphone. — [[User:goetzc|goetzc]] ([[User talk:goetzc|wanna talk?]]) 14:25, 6 September 2019 (UTC)<br />
: After updating to Linux kernel 5.3.1 the microphone still does not work [[User:Moreka|Moreka]] ([[User talk:Moreka|talk]]) 17:30, 23 September 2019 (UTC) [[User:Moreka]] 17:30, 23 September 2019 (UTC)<br />
: I found a configuration that makes the microphones to work ;) but couldn't paste the instructions or a link to them. I created a forum post under Laptop Issues and titled [SOLVED] Fix for microphone on Lenovo X1 Gen 7 [[User:Alphazo|Alphazo]] ([[User talk:Alphazo|talk]]) 10:15, 13 October 2019 (UTC)<br />
: Like others, I wasn't able to get microphone working by following that guide. My results are identical to that of "Mocco" from that forum. Unless I'm misunderstanding the sidebar, I think we should flag microphone to "not working" for this page. [[User:Parth|Parth]] ([[User talk:Parth|talk]]) 23:54, 20 October 2019 (UTC)<br />
: I wasn't able to get microphone working by following that guide as well. I also think we should flag microphone to "not working" for this page. [[User:Moreka|Moreka]] 06:04, 22 October 2019 (UTC)<br />
: Managed to get it working following Alphazo's guide. There are a few typos however, I indicated the required fix in post #9. Hope it helps. [[User:Tbw|Tbw]] ([[User talk:Tbw|talk]]) 21:23, 22 October 2019 (UTC)<br />
: I'll give it another shot and report back [[User:Parth|Parth]] ([[User talk:Parth|talk]]) 17:17, 30 October 2019 (UTC)<br />
: I was able to make the microphone + sound playback work with following the Lenovo docx file and using the sof-hda-generic.tplg and sof-cnl.ri provided in the latest linux firmware package shipped with ubuntu (just download the package and copy the two files in the correct directories). Also the changes in /etc/pulse/default.pa are not necessary. [[User:moreka|moreka]] 17:08, 31 October 2019 (UTC)<br />
: With recent kernel the SOF was disabled [https://bugs.archlinux.org/task/63464]. Solution for me was to install linux-pf and disable CONFIG_SND_SOC_INTEL_SST, enable SOT. [[User:Kubuxu|Kubuxu]] ([[User talk:Kubuxu|talk]]) 14:12, 19 November 2019 (UTC)<br />
: Please test with [https://git.archlinux.org/svntogit/packages.git/log/trunk?h=packages/linux&id=d6bbb261bd2c8f83b9c93041dae9aa4175e20e6e linux 5.4.1-arch1] (in testing) and [https://www.archlinux.org/packages/extra/any/sof-firmware/ sof-firmware] (new). SOF is re-enabled except on Broadwell/Baytrail platforms. [[User:Dpward|Dpward]] ([[User talk:Dpward|talk]]) 17:42, 1 December 2019 (UTC)<br />
: I tested with the new kernel and sof-firmware package (from the Arch repositories). Doing the configs as in the docx file, the sound works well, but the microphone records sounds in a wrong way; it sounds as if it is slow-motion. [[User:moreka]] 15:16, 3 December 2019 (UTC)<br />
: I experienced the same issue like moreka after installing the current kernel (5.4.2.arch1-1) and sof-firmware (1.3.1-1) from the core repo. Also since sof is in use the speakers only provide stereo audio and not using the 4.0 channel profile. [[User:Bin101|Bin101]] ([[User talk:Bin101|talk]]) 19:09, 6 December 2019 (UTC)<br />
: When using {{pkg|sof-firmware}} version 1.4.1 (and latest kernel 5.4.2) the sound card doesn't get recognized at all. Reverting back to sof-firmware 1.3.1 makes the card work again, in the same way explained by users Moreka and Bin101. — [[User:goetzc|Götz]] ([[User talk:goetzc|wanna talk?]]) 13:33, 9 December 2019 (UTC)<br />
<br />
== Disabling red LED in Thinkpad logo stops ==<br />
<br />
This service doesn't work after a suspend. [[User:Wrycode|wrycode]] ([[User talk:Wrycode|talk]]) 15:36, 9 August 2019 (UTC)<br />
<br />
== Volume Controls ==<br />
<br />
The section [[Lenovo_ThinkPad_X1_Carbon_(Gen_7)#Volume_Controls|Volume Controls]] fixes the quite/loud volume control, but seems <s>to disable</s> (they are already disabled) the two top-firing speakers, only the two bottom-firing sub-woofers are enabled. --[[User:Goetzc|Goetzc]] ([[User talk:Goetzc|talk]]) 17:12, 9 August 2019 (UTC)<br />
: So this seems to fix the volume control indeed, but the top-firing speakers were already and are still muted, might be a driver bug, but a workaround from another Dolby Atmos laptop might work here. --[[User:Goetzc|Goetzc]] ([[User talk:Goetzc|talk]]) 17:32, 9 August 2019 (UTC)<br />
:: Did you remember to run alsamixer from {{Pkg|alsa-utils}} after installation and turn on/equalize all of the speakers? Mine (top and bottom) are working fine. [[User:Wrycode|wrycode]] ([[User talk:Wrycode|talk]]) 03:54, 13 August 2019 (UTC)<br />
::: You are correct Wrycode, thanks! The "''Master''" volume was low, rising it to 100% makes the top speakers work as expected :) Will add this to the section. <br />
::: Do you happen to know how to make this change (setting the "''Element Master''") so that it's not done on the system {{ic|analog-output.conf.common}} file, and thus the change survives when PulseAudio package is updated? — [[User:goetzc|goetzc]] ([[User talk:goetzc|wanna talk?]])<br />
:::: I did some digging around and I can't find a way to do this. Pulseaudio might not have a user config option for the alsa paths in /usr/. Added the NoUpgrade workaround on the main page. [[User:Wrycode|wrycode]] ([[User talk:Wrycode|talk]]) 02:05, 20 August 2019 (UTC)<br />
<br />
:There is [https://askubuntu.com/a/988993/509340 this interesting] method, which uses 'hdajackretask' from the {{pkg|alsa-tools}} package to remap some pins. The comment is for a different laptop (Asus UX550 using Realtek ALC295), but it exhibits the same issue. We would need to determine the correct pins for this hardware (Realtek ALC285), don't know how, though. — [[User:goetzc|goetzc]] ([[User talk:goetzc|wanna talk?]]) 19:08, 25 August 2019 (UTC)<br />
<br />
== Screen Brightness Function Keys ==<br />
<br />
Is anyone having issues getting the screen brightness function keys working? I had to install [[acpid]] and setup ACPI events and actions to handle it, along with installing the {{Pkg|acpilight}} package. <br />
<br />
My events:<br />
<br />
/etc/acpi/events/FnF5-brightnessdown<br />
# video/brightnessdown BRTDN 00000087 00000000<br />
event=video/brightnessdown<br />
action=xbacklight -dec 3<br />
<br />
/etc/acpi/events/FnF6-brightnessup<br />
# video/brightnessup BRTUP 00000086 00000000<br />
event=video/brightnessup<br />
action=xbacklight -inc 3<br />
<br />
xev doesn't recognise the brightness function keys, so I can't handle the key presses with my window manager. At least that is what I believe, please correct me if I have this all wrong. <br />
[[User:Raybangs|Raybangs]] ([[User talk:Raybangs|talk]]) 10:16, 23 August 2019 (UTC)<br />
<br />
:I didn't have to go through that to get screen brightness going. Can you tell me more about your setup? I'm using Plasma and my brightness controls worked out of the box. [[User:Johncrist1988|Johncrist1988]] ([[User talk:Johncrist1988|talk]]) 14:16, 23 August 2019 (UTC)<br />
<br />
:It works for me also, using {{pkg|brightnessctl}} (as root) or {{pkg|light}} on [[Sway]] or Plasma. — [[User:goetzc|goetzc]] ([[User talk:goetzc|wanna talk?]]) 18:50, 25 August 2019 (UTC)<br />
<br />
:Interesting. I'm using a pretty simple base Arch install with AwesomeWM. I will try {{pkg|brightnessctl}} and see how that goes. {{Unsigned|21:25, 3 September 2019 (UTC)|Raybangs}}<br />
<br />
== UEFI BIOS Update ==<br />
<br />
Currently UEFI BIOS seems to be at [https://pcsupport.lenovo.com/hn/en/products/LAPTOPS-AND-NETBOOKS/THINKPAD-X-SERIES-LAPTOPS/THINKPAD-X1-CARBON-7TH-GEN-TYPE-20QD-20QE/downloads/DS540232 version 1.16]. I am unable to find the .cab file in the link provided, on the [https://fwupd.org/lvfs/devicelist LVFS Device List], nor have had luck with web searches.<br />
<br />
I also followed instructions for [https://wiki.archlinux.org/index.php/Fwupd#Setup_for_UEFI_BIOS_upgrade | UEFI BIOS upgrade from fwupd] on the wiki. Has anyone succeeded in upgrading the firmware to the latest version on Linux? Would using the bootable iso on a USB from the first link work? According the the [https://download.lenovo.com/pccbbs/mobiles/n2hur06w.txt README] it should work (but hesitant to put the iso on USB). [[User:In0ni|In0ni]] ([[User talk:In0ni|talk]]) 22:34, 1 September 2019 (UTC)<br />
: Using the bootable iso on a USB should work fine (vs. a CD/DVD). However, I'm hesitant to upgrade because the 1.05 update is supposedly required before updating to the lates version: <br />
UEFI: ---- / ECP: 1.05<br />
- (Fix) Fixed an issue where system may hang in UEFI BIOS updating process.<br />
(Note) This package must be applied prior to n2hur04w or later package version.`<br />
:The cab files are not available yet. The only way to apply the updates (except for one that's available via fwupdmgr) is through the bootable ISO. I don't see any reason to update personally but if someone else does, please let us know how it goes. [[User:Wrycode|wrycode]] ([[User talk:Wrycode|talk]]) 20:09, 10 September 2019 (UTC)<br />
<br />
== Why enable S3 sleep? ==<br />
<br />
Could someone add a small bit about why S3 sleep should be enabled? I have been using the default S0 sleep for a few weeks and don't see any issues with it. ~ [[User:Akvadrako|Akvadrako]] ([[User talk:Akvadrako|talk]]) 09:55, 10 September 2019 (UTC)<br />
:I was under the impression that S3 sleep is 'normal' sleep (everything powered off except for a trickle to the ram), but I'm not sure what modern Windows does instead. The S0 sleep state means "on", that is, the computer is not asleep, according to https://superuser.com/questions/71835/what-is-the-difference-between-these-four-sleep-states [[User:Wrycode|wrycode]] ([[User talk:Wrycode|talk]]) 04:43, 24 September 2019 (UTC)<br />
<br />
: Windows only supports S0 sleep and it’s the default, so I think it’s debatable what’s normal. But does that really matter? I’m interested in the practical difference. Maybe I’ll benchmark S3 sometime but for now I can say S0 uses about 0.5W and wakes up in about 1s. ~ [[User:Akvadrako|Akvadrako]] ([[User talk:Akvadrako|talk]]) 07:51, 24 September 2019 (UTC)<br />
:: S0 sleep isn't the traditional Suspend-to-RAM "sleep" that Linux users are expecting, that's what I meant by "normal". You are right that S0 is the default for Windows now. https://www.kernel.org/doc/Documentation/power/states.txt] has some details about the sleep states in Linux, and https://docs.microsoft.com/en-us/windows/win32/power/system-power-states has the same for Windows. It's a software-only idle, so it must use slightly more power than S3, where all components are shut down except for the ram. The Windows page claims that S0 wakes up faster than s3 (which would make sense). Another implication: Windows can do stuff after you close the laptop lid like download updates. Windows separately performs a suspend-to-disk whenever you close the lid, so if you remove the battery or the battery runs out your work will still be saved. It's possible Linux can do this too with S0. I just switched to the "Windows" sleep state from the BIOS to try it out and the wake time isn't noticeably different, but my laptop doesn't wake when I open the lid or press the power button. The only way to wake it up is to press the "Fn" key, very odd (especially because I remapped "Fn" to "Ctrl" from the BIOS, so I'm really pressing "Ctrl"). You're not seeing anything like this? [[User:Wrycode|wrycode]] ([[User talk:Wrycode|talk]]) 01:04, 16 October 2019 (UTC)<br />
<br />
:: Normally I do press the Fn button to wake, unless I'm using my external keyboard with AC, though it doesn't bother me. So it seems that and possibly some power savings are the advantages of S3. ~ [[User:Akvadrako|Akvadrako]] ([[User talk:Akvadrako|talk]]) 10:26, 16 October 2019 (UTC)<br />
<br />
== Different lspci output ==<br />
<br />
Can anyone check what's their lspci output? I have realised I am running with a completely different setup of the components myself:<br />
<br />
<div class="toccolours mw-collapsible mw-collapsed" style="width:400px; overflow:auto;"><br />
<div style="font-weight:bold;line-height:1.6;">{{ic|lspci}}</div><br />
<div class="mw-collapsible-content"><br />
{{bc|<br />
00:00.0 Host bridge: Intel Corporation Coffee Lake HOST and DRAM Controller (rev 0c)<br />
00:02.0 VGA compatible controller: Intel Corporation UHD Graphics 620 (Whiskey Lake) (rev 02)<br />
00:04.0 Signal processing controller: Intel Corporation Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor Thermal Subsystem (rev 0c)<br />
00:08.0 System peripheral: Intel Corporation Xeon E3-1200 v5/v6 / E3-1500 v5 / 6th/7th Gen Core Processor Gaussian Mixture Model<br />
00:12.0 Signal processing controller: Intel Corporation Cannon Point-LP Thermal Controller (rev 11)<br />
00:14.0 USB controller: Intel Corporation Cannon Point-LP USB 3.1 xHCI Controller (rev 11)<br />
00:14.2 RAM memory: Intel Corporation Cannon Point-LP Shared SRAM (rev 11)<br />
00:14.3 Network controller: Intel Corporation Cannon Point-LP CNVi [Wireless-AC] (rev 11)<br />
00:15.0 Serial bus controller [0c80]: Intel Corporation Cannon Point-LP Serial IO I2C Controller #0 (rev 11)<br />
00:15.1 Serial bus controller [0c80]: Intel Corporation Cannon Point-LP Serial IO I2C Controller #1 (rev 11)<br />
00:16.0 Communication controller: Intel Corporation Cannon Point-LP MEI Controller #1 (rev 11)<br />
00:1c.0 PCI bridge: Intel Corporation Cannon Point-LP PCI Express Root Port #1 (rev f1)<br />
00:1d.0 PCI bridge: Intel Corporation Cannon Point-LP PCI Express Root Port #9 (rev f1)<br />
00:1d.4 PCI bridge: Intel Corporation Cannon Point-LP PCI Express Root Port #13 (rev f1)<br />
00:1f.0 ISA bridge: Intel Corporation Cannon Point-LP LPC Controller (rev 11)<br />
00:1f.3 Audio device: Intel Corporation Cannon Point-LP High Definition Audio Controller (rev 11)<br />
00:1f.4 SMBus: Intel Corporation Cannon Point-LP SMBus Controller (rev 11)<br />
00:1f.5 Serial bus controller [0c80]: Intel Corporation Cannon Point-LP SPI Controller (rev 11)<br />
00:1f.6 Ethernet controller: Intel Corporation Ethernet Connection (6) I219-V (rev 11)<br />
02:00.0 Wireless controller [0d40]: Intel Corporation XMM7360 LTE Advanced Modem (rev 01)<br />
03:00.0 Non-Volatile memory controller: Sandisk Corp WD Black 2018/PC SN720 NVMe SSD<br />
05:00.0 PCI bridge: Intel Corporation JHL6540 Thunderbolt 3 Bridge (C step) [Alpine Ridge 4C 2016] (rev 02)<br />
06:00.0 PCI bridge: Intel Corporation JHL6540 Thunderbolt 3 Bridge (C step) [Alpine Ridge 4C 2016] (rev 02)<br />
06:01.0 PCI bridge: Intel Corporation JHL6540 Thunderbolt 3 Bridge (C step) [Alpine Ridge 4C 2016] (rev 02)<br />
06:02.0 PCI bridge: Intel Corporation JHL6540 Thunderbolt 3 Bridge (C step) [Alpine Ridge 4C 2016] (rev 02)<br />
06:04.0 PCI bridge: Intel Corporation JHL6540 Thunderbolt 3 Bridge (C step) [Alpine Ridge 4C 2016] (rev 02)<br />
07:00.0 System peripheral: Intel Corporation JHL6540 Thunderbolt 3 NHI (C step) [Alpine Ridge 4C 2016] (rev 02)<br />
2d:00.0 USB controller: Intel Corporation JHL6540 Thunderbolt 3 USB Controller (C step) [Alpine Ridge 4C 2016] (rev 02)<br />
}}<br />
</div></div><br />
<br />
Just in case, on e of the most relevant differences is that I'm not using Fibocom modem but rather the Intel XMM7360 LTE<br />
: Is the Intel XMM7360 LTE a stock configuration option? Have you gotten it to work with Linux? [[User:Wrycode|wrycode]] ([[User talk:Wrycode|talk]]) 05:48, 14 October 2019 (UTC)<br />
<br />
== Sleep/Suspend section ==<br />
<br />
I updated and simplified the Sleep/Suspend section. I also deleted the section about verifying whether S3 sleep works; I think it was holdover from when the X1C6 came out and Lenovo had removed S3 from the BIOS (and that whole hullabaloo over at Hacker News). I think this is simpler and more correct. Let me know if you disagree or have feedback. [[User:Wrycode|wrycode]] ([[User talk:Wrycode|talk]]) 21:50, 16 October 2019 (UTC)</div>Goetzchttps://wiki.archlinux.org/index.php?title=Shairport_Sync&diff=587087Shairport Sync2019-10-23T23:04:18Z<p>Goetzc: /* System service */ audio backend</p>
<hr />
<div>[[Category:Audio]]<br />
[[Category:Streaming]]<br />
[[ja:Shairport Sync]]<br />
[https://github.com/mikebrady/shairport-sync Shairport Sync] is an [[w:AirPlay]] audio player — it plays audio streamed from iTunes, iOS devices and third-party AirPlay sources such as ForkedDaapd and others. Audio played by a Shairport Sync-powered device stays synchronised with the source and hence with similar devices playing the same source. In this way, synchronised multi-room audio is possible without difficulty.<br />
<br />
Shairport Sync does not support AirPlay video or photo streaming.<br />
<br />
Shairport Sync is a fork of the original Shairport which was based on reverse-engineering Apple's key used in its AirPort Express. Be advised that this functionality may be removed at Apple's discretion. <br />
<br />
==Installation==<br />
<br />
[[Install]] the {{Pkg|shairport-sync}} package.<br />
<br />
{{Note|Shairport Sync requires the avahi-daemon to be running. You can [[Start]]/[[enable]] {{ic|avahi-daemon.service}} using systemd. <br />
}}<br />
<br />
==Configuration==<br />
<br />
The configuration file can be found at {{ic|/etc/shairport-sync.conf}}. It contains useful comments and configuration hints. More documentation is available in the [https://github.com/mikebrady/shairport-sync/blob/master/README.md#configuring-shairport-sync README] file.<br />
<br />
=== Audio backend ===<br />
Shairport Sync works well with [[PulseAudio]], while the timing information is not as accurate as that of Alsa or sndio, it is often impractical to remove or disable PulseAudio. In that case, the ''pa'' backend can be used.[https://github.com/mikebrady/shairport-sync/blob/master/README.md#more-information]<br />
<br />
If you would like to change the backend, check the list of output devices, e.g. by using tools from {{Pkg|alsa-utils}}: {{ic|aplay -L}} and look at the raw audio device, like: <br />
<br />
sysdefault:CARD=PCH<br />
HDA Intel PCH, ALC269VC Analog<br />
Default Audio Device<br />
<br />
Edit {{ic|/etc/shairport-sync.conf}} and add the devise name:<br />
<br />
// These are parameters for the "alsa" audio back end.<br />
// For this section to be operative, Shairport Sync must be built with the following configuration flag:<br />
// --with-alsa<br />
alsa =<br />
{<br />
output_device = "sysdefault";<br />
...<br />
}<br />
<br />
==System service==<br />
<br />
===Starting===<br />
<br />
[[Start]]/[[enable]] {{ic|shairport-sync.service}} using systemd.<br />
<br />
===Daemon Setup===<br />
<br />
If you want to run shairport-sync as a daemon you will need to have a folder created in {{ic|/var/run}} which is a tempfs by default in Arch Linux. To have a folder created automatically on boot create a tempfiles configuration file, for example<br />
<br />
{{hc|/usr/lib/tempfiles.d/shairport-sync.conf|d /var/run/shairport-sync 0755 username group}}<br />
<br />
you can now use {{ic|shairport-sync -d}} to run shairport-sync as a daemon, and {{ic|shairport-sync -k}} to kill the daemon.<br />
<br />
==User service==<br />
<br />
According to the [https://github.com/mikebrady/shairport-sync/issues/471#issuecomment-394089069 author], the PulseAudio backend with the default PulseAudio configuration can only work as a user service.<br />
<br />
To run ''shairport-sync'' as user daemon, you can add it to the desktop environment autostart, or use a systemd service:<br />
<br />
sudo cp /usr/lib/systemd/system/shairport-sync.service /etc/systemd/user/<br />
<br />
Next, edit {{ic|/etc/systemd/user/shairport-sync.service}} and comment out the next lines:<br />
<br />
[Unit]<br />
...<br />
#Requires=avahi-daemon.service<br />
#After=avahi-daemon.service<br />
...<br />
[Service]<br />
...<br />
#Requires=avahi-daemon.service<br />
#After=avahi-daemon.service<br />
...<br />
<br />
Now, you are ready to start service as user:<br />
<br />
systemctl --user enable --now shairport-sync.service<br />
<br />
To obtain logs:<br />
<br />
journalctl --user -fu shairport-sync.service</div>Goetzchttps://wiki.archlinux.org/index.php?title=Lenovo_ThinkPad_X1_Carbon_(Gen_7)&diff=585829Lenovo ThinkPad X1 Carbon (Gen 7)2019-10-13T20:29:57Z<p>Goetzc: minor changes for microphone section</p>
<hr />
<div>[[Category:Lenovo]]<br />
[[ja:Lenovo ThinkPad X1 Carbon (Gen 7)]]<br />
{{Related articles start}}<br />
{{Related|Lenovo ThinkPad X1 Carbon}}<br />
{{Related|Lenovo ThinkPad X1 Carbon (Gen 2)}}<br />
{{Related|Lenovo ThinkPad X1 Carbon (Gen 3)}}<br />
{{Related|Lenovo ThinkPad X1 Carbon (Gen 4)}}<br />
{{Related|Lenovo ThinkPad X1 Carbon (Gen 5)}}<br />
{{Related|Lenovo ThinkPad X1 Carbon (Gen 6)}}<br />
{{Related|Lenovo ThinkPad X1 Yoga (Gen 3)}}<br />
{{Related articles end}}<br />
<br />
{{tip| A great resource for thinkpads is https://www.thinkwiki.org/wiki/ThinkWiki}}<br />
<br />
The Lenovo ThinkPad X1 Carbon, 7th generation is an ultrabook introduced in early 2019. It features a 14" screen, 8th-gen Intel Core processors and integrated [[Intel graphics|Intel UHD 620 graphics]].<br />
<br />
To ensure you have this version, [[install]] the package {{Pkg|dmidecode}} and run:<br />
<br />
{{bc|# sudo dmidecode -s system-version<br />
ThinkPad X1 Carbon 7th<br />
}}<br />
<br />
{| class="wikitable" style="float: right; clear: right; margin: 0 0 0.5em 0.5em; max-width: 420px; width: 100%;"<br />
| '''Device''' || '''Working''' || '''Modules'''<br />
|-<br />
| [[Intel graphics]] || {{Yes}} || i915, (intel_agp)<br />
|-<br />
| [[Wireless network configuration#iwlwifi|Wireless network]] || {{Yes}} || iwlmvm<br />
|-<br />
| Native Ethernet with [https://www3.lenovo.com/us/en/accessories-and-monitors/cables-and-adapters/adapters/CABLE-BO-TP-OneLink%2B-to-RJ45-Adapter/p/4X90K06975 included dongle] || {{Yes}} || ?<br />
|-<br />
| Mobile broadband Fibocom || {{No}}¹ || ?<br />
|-<br />
| Audio || {{Yes}} || snd_hda_intel<br />
|-<br />
| Microphone || {{Yes}}⁴ || snd_hda_intel<br />
|-<br />
| [[Touchpad]] || {{Yes}} || psmouse, rmi_smbus, i2c_i801<br />
|-<br />
| [[TrackPoint]] || {{Yes}} || psmouse, rmi_smbus, i2c_i801<br />
|-<br />
| Camera || {{Yes}} || uvcvideo<br />
|-<br />
| [[fprint|Fingerprint reader]] || {{No}}² || ?<br />
|-<br />
| [[Power management]] || {{Yes}}³ || ?<br />
|-<br />
| [[Bluetooth]] || {{Yes}} || btusb<br />
|-<br />
| Keyboard backlight || {{Yes}} || thinkpad_acpi<br />
|-<br />
| Function/Multimedia keys || {{Yes}} || ?<br />
|-<br />
| colspan=3 style="font-size: 70%; border: none;" | <ol><br />
<li>No working Linux driver for Fibocom L850-GL. See [https://forums.lenovo.com/t5/Linux-Discussion/X1C-gen-6-Fibocom-L850-GL-Ubuntu-18-04/m-p/4078413 this thread] and [https://forums.lenovo.com/t5/Linux-Discussion/Linux-support-for-WWAN-LTE-L850-GL-on-T580-T480/td-p/4067969 this thread] for more info.</li><br />
<li>An official driver and a reverse engineered driver are in the works [https://gitlab.freedesktop.org/libfprint/libfprint/issues/181] (''06cb:00bd'').</li><br />
<li>S3 suspend requires changes to BIOS settings, see section on [[#Enabling S3|enabling S3]].</li><br />
<li>The internal microphone doesn't work on versions of the {{pkg|linux}} kernel before 5.3. On version 5.3 and newer the SOF firmware can be enabled, see [[{{TALKPAGENAME}}#Microphone|Talk#Microphone]].</li><br />
|}<br />
<br />
== Hardware ==<br />
<br />
Additional hardware information from {{ic|lsusb}} and {{ic|lspci}} can be found bellow when using the {{pkg|linux}} kernel 5.2.7:<br />
<br />
<div class="toccolours mw-collapsible mw-collapsed" style="width:400px; overflow:auto;"><br />
<div style="font-weight:bold;line-height:1.6;">{{ic|lsusb}}</div><br />
<div class="mw-collapsible-content"><br />
{{bc|<br />
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub<br />
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub<br />
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub<br />
Bus 001 Device 003: ID 06cb:00bd Synaptics, Inc. <br />
Bus 001 Device 002: ID 04f2:b67c Chicony Electronics Co., Ltd <br />
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub<br />
}}<br />
</div></div><br />
<br />
<div class="toccolours mw-collapsible mw-collapsed" style="width:400px; overflow:auto;"><br />
<div style="font-weight:bold;line-height:1.6;">{{ic|lspci}}</div><br />
<div class="mw-collapsible-content"><br />
{{bc|<br />
00:00.0 Host bridge: Intel Corporation Device 3e34 (rev 0c)<br />
00:02.0 VGA compatible controller: Intel Corporation UHD Graphics 620 (Whiskey Lake) (rev 02)<br />
00:04.0 Signal processing controller: Intel Corporation Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor Thermal Subsystem (rev 0c)<br />
00:08.0 System peripheral: Intel Corporation Xeon E3-1200 v5/v6 / E3-1500 v5 / 6th/7th Gen Core Processor Gaussian Mixture Model<br />
00:12.0 Signal processing controller: Intel Corporation Cannon Point-LP Thermal Controller (rev 11)<br />
00:14.0 USB controller: Intel Corporation Cannon Point-LP USB 3.1 xHCI Controller (rev 11)<br />
00:14.2 RAM memory: Intel Corporation Cannon Point-LP Shared SRAM (rev 11)<br />
00:14.3 Network controller: Intel Corporation Cannon Point-LP CNVi [Wireless-AC] (rev 11)<br />
00:15.0 Serial bus controller [0c80]: Intel Corporation Cannon Point-LP Serial IO I2C Controller #0 (rev 11)<br />
00:15.1 Serial bus controller [0c80]: Intel Corporation Cannon Point-LP Serial IO I2C Controller #1 (rev 11)<br />
00:16.0 Communication controller: Intel Corporation Cannon Point-LP MEI Controller #1 (rev 11)<br />
00:1d.0 PCI bridge: Intel Corporation Cannon Point-LP PCI Express Root Port #9 (rev f1)<br />
00:1d.4 PCI bridge: Intel Corporation Cannon Point-LP PCI Express Root Port #13 (rev f1)<br />
00:1f.0 ISA bridge: Intel Corporation Cannon Point-LP LPC Controller (rev 11)<br />
00:1f.3 Audio device: Intel Corporation Cannon Point-LP High Definition Audio Controller (rev 11)<br />
00:1f.4 SMBus: Intel Corporation Cannon Point-LP SMBus Controller (rev 11)<br />
00:1f.5 Serial bus controller [0c80]: Intel Corporation Cannon Point-LP SPI Controller (rev 11)<br />
00:1f.6 Ethernet controller: Intel Corporation Ethernet Connection (6) I219-V (rev 11)<br />
03:00.0 Non-Volatile memory controller: Sandisk Corp WD Black 2018/PC SN720 NVMe SSD<br />
05:00.0 PCI bridge: Intel Corporation JHL6540 Thunderbolt 3 Bridge (C step) [Alpine Ridge 4C 2016] (rev 02)<br />
06:00.0 PCI bridge: Intel Corporation JHL6540 Thunderbolt 3 Bridge (C step) [Alpine Ridge 4C 2016] (rev 02)<br />
06:01.0 PCI bridge: Intel Corporation JHL6540 Thunderbolt 3 Bridge (C step) [Alpine Ridge 4C 2016] (rev 02)<br />
06:02.0 PCI bridge: Intel Corporation JHL6540 Thunderbolt 3 Bridge (C step) [Alpine Ridge 4C 2016] (rev 02)<br />
06:04.0 PCI bridge: Intel Corporation JHL6540 Thunderbolt 3 Bridge (C step) [Alpine Ridge 4C 2016] (rev 02)<br />
07:00.0 System peripheral: Intel Corporation JHL6540 Thunderbolt 3 NHI (C step) [Alpine Ridge 4C 2016] (rev 02)<br />
2d:00.0 USB controller: Intel Corporation JHL6540 Thunderbolt 3 USB Controller (C step) [Alpine Ridge 4C 2016] (rev 02)<br />
}}<br />
</div></div><br />
<br />
== BIOS ==<br />
The most convenient way to install Arch Linux is by disabling "Secure Boot" {{ic|Security -> Secure Boot - Set to "Disabled"}}. However it is possible to self-sign your kernel and boot with it enabled. For further information have a look at the [[Secure Boot]] article.<br />
<br />
In case your {{ic|efivars}} are not properly set it is most likely due to you not being booted into [[UEFI]]. Should the problem persist be sure to consult the [[UEFI#UEFI variables]] section.<br />
<br />
=== Updates ===<br />
<br />
==== Automatic (Linux Vendor Firmware Service) ====<br />
<br />
[https://blogs.gnome.org/hughsie/2018/08/06/please-welcome-lenovo-to-the-lvfs/ In August of 2018 Lenovo has joined] the [https://fwupd.org/ Linux Vendor Firmware Service (LVFS)] project, which enables firmware updates from within the OS.<br />
BIOS updates (and possibly other firmware such as the Thunderbolt controller) can be queried for and installed through [[fwupd]].<br />
<br />
==== Manual (fwupdmgr) ====<br />
<br />
Lenovo may in the future provide cabinet files that can be directly installed with fwupdmgr.<br />
Check for Linux {{ic|.cab}} files from the [https://pcsupport.lenovo.com/us/en/products/laptops-and-netbooks/thinkpad-x-series-laptops/thinkpad-x1-carbon-7th-gen-type-20qd-20qe/downloads Lenovo ThinkPad X1 Carbon (Gen 7) driver website].<br />
<br />
#Make sure the AC adapter is firmly connected to the target computer.<br />
#Launch Terminal.<br />
#Move to the directory where the cabinet file was placed.<br />
#Run {{ic|fwupdmgr install xxxxxxxx.cab}} to schedule firmware update.<br />
#Restart the system.<br />
#The computer will be restarted and the UEFI BIOS will be updated.<br />
<br />
=== Enabling S3 ===<br />
<br />
To enable S3 support, make sure you go into the BIOS configuration, and {{ic|Config -> Power -> Sleep State - Set to "Linux"}}. This should make S3 available. To verify, after making the changes in the BIOS configuration, boot into Linux, and run the {{ic|dmesg | grep -i "acpi: (supports"}} command again to make sure that S3 is now available.<br />
<br />
=== Verifying S3 ===<br />
<br />
To check whether S3 is recognized and usable by Linux, run:<br />
<br />
dmesg | grep -i "acpi: (supports"<br />
<br />
and check for {{ic|S3}} in the list.<br />
<br />
=== S3 Suspend Bug with Bluetooth Devices ===<br />
<br />
Occasionally your Thinkpad will wake up immediately after suspending with certain [[bluetooth]] devices added. To prevent this, remove the devices or disable [[bluetooth]] before suspending.<br />
<br />
=== BIOS configurations ===<br />
<br />
* {{ic|Config -> Thunderbolt BIOS Assist Mode - Set to "Enabled"}}. When disabled, on Linux, power usage appears to be significantly higher because of a substantial number of CPU wakeups during s2idle.<br />
<br />
== Power management/Throttling issues ==<br />
Due to wrong configured power management registers the CPU may consume a lot less power than under windows and the thermal throttling occurs at 80°C (97°C when using Windows, see [https://www.reddit.com/r/thinkpad/comments/870u0a/t480s_linux_throttling_bug/ T480s throttling bug]).<br />
<br />
Lenovo has confirmed the issue, [https://forums.lenovo.com/t5/Other-Linux-Discussions/X1C6-T480s-low-cTDP-and-trip-temperature-in-Linux/m-p/4534535/highlight/true#M13642 explained the cause] and has published [https://forums.lenovo.com/t5/Other-Linux-Discussions/X1C6-T480s-low-cTDP-and-trip-temperature-in-Linux/m-p/4535310/highlight/true#M13653 updates for the embedded controller and the BIOS] to LVFS (''how to install see [[#Updates|#BIOS Updates]]'').<br />
<br />
=== throttled ===<br />
{{Note|This fix has probably been superseded by the EC/BIOS updates}}<br />
<br />
{{Pkg|throttled}} replaces {{AUR|lenovo-throttling-fix-git}}{{Broken package link|package not found}} used previously. Install {{Pkg|throttled}}, then run <br />
<br />
sudo systemctl enable --now lenovo_fix.service<br />
<br />
=== Touchpad TLP fix ===<br />
The touchpad works fine out of the box, except that [[TLP]] does not detect that the Synaptics Touchpad is indeed an input device, so it does not exclude it from the USB_AUTOSUSPEND feature. You can tell that this is the issue if the touchpad works for just a moment after waking up from suspend, and then stops working again. <br />
<br />
The fix is to add the touchpad to the USB_BLACKLIST in TLP's config:<br />
<br />
USB_BLACKLIST="06cb:00bd" <=========== use lsusb to get the correct UUID<br />
<br />
== Audio ==<br />
As there are physically four loudspeakers, you need to configure to 4.0 audio output. When using PulseAudio there are various [[PulseAudio#Front-ends|configuration utilities]].<br />
<br />
=== Volume controls ===<br />
<br />
In order for volume controls to work correctly you must edit {{ic|/usr/share/pulseaudio/alsa-mixer/paths/analog-output.conf.common}} by adding the following above {{ic|[Element PCM]}}:<br />
<br />
[Element Master]<br />
switch = mute<br />
volume = ignore<br />
<br />
A PulseAudio restart is required for this change to take affect. Make sure to increase the "''Master''" channel volume to 100% for the top-firing speakers to work (using amixer or alsamixer, found in {{Pkg|alsa-utils}}).<br />
<br />
==== Persistent fix ====<br />
<br />
Upgrading or reinstalling {{Pkg|pulseaudio}} will overwrite this file, and [https://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/User/PulseAudioStoleMyVolumes/ PulseAudio doesn't appear to offer another way] to make this configuration change. To prevent pacman from overwriting the file, add the following line under {{ic|[options]}} in {{ic|/etc/pacman.conf}}:<br />
<br />
NoUpgrade = usr/share/pulseaudio/alsa-mixer/paths/analog-output.conf.common<br />
<br />
=== Microphone ===<br />
<br />
On kernel up to 5.2, the internal microphones are detected but [[Advanced_Linux_Sound_Architecture/Troubleshooting#Microphone|no audio is captured]]. Unfortunately even on the 5.3 kernels, the microphones still don't work out of the box.<br />
<br />
You might be able to get the microphones working by following the instructions in this [https://forums.lenovo.com/lnv/attachments/lnv/lx02_en/3061/1/sof-driver-guide.docx docx file] from the Lenovo Forums. Also check out [https://bbs.archlinux.org/viewtopic.php?id=249900 this post] from the Arch Forums.<br />
<br />
== Disabling red LED in ThinkPad logo ==<br />
<br />
To disable the red LED in the ThinkPad logo on the cover:<br />
<br />
1. Enable writing to the embedded controller registers by adding the kernel parameter {{ic|1=ec_sys.write_support=1}}. <br />
If you use UEFI boot, you can add this parameter in {{ic|/boot/efi/loader/entries/arch.conf}} under "options".<br />
<br />
2. Then, you can disable directly the LED with this command: <br />
<br />
# echo -n -e "\x0a" | sudo dd of="/sys/kernel/debug/ec/ec0/io" bs=1 seek=12 count=1 conv=notrunc 2> /dev/null<br />
<br />
'''To disable the LED at startup, you can create a systemd service:''' <br />
{{Accuracy|This command works one time, but the light turns back on after a suspend (even with the systemd service enabled).|section=Disabling red LED in Thinkpad logo stops}}<br />
<br />
<br />
1. Create a sh script (/root/disable_led.sh for instance) and put this : <br />
<br />
#!/bin/bash<br />
echo -n -e "\x0a" | dd of="/sys/kernel/debug/ec/ec0/io" bs=1 seek=12 count=1 conv=notrunc 2> /dev/null<br />
<br />
2. Create a new service unit file in {{ic|/etc/systemd/system} called "led.service", and insert the following: <br />
<br />
Description=Disable ThinkPad logo LED<br />
<br />
[Service]<br />
ExecStart=/root/disable_led.sh<br />
<br />
[Install]<br />
WantedBy=multi-user.target<br />
<br />
3. Start and enable this service:<br />
<br />
# systemctl start led.service<br />
# systemctl enable led.service<br />
<br />
== Additional resources ==<br />
<br />
* [https://www.thinkwiki.org/wiki/Category:X1_Carbon_(7th_Gen) ThinkWiki X1 Carbon 7th Gen page]<br />
* [https://gist.github.com/greigdp/bb70fbc331a0aaf447c2d38eacb85b8f Dell XPS 13 9370 quirks]: Some pointers on getting Watt usage down to ~2W, Intel video powersaving features might be interesting, see also the [[Intel graphics]] page for interesting power-saving options.<br />
* [https://01.org/blogs/rzhang/2015/best-practice-debug-linux-suspend/hibernate-issues Intel Blog: Best practice to debug Linux* suspend/hibernate issues], including the [https://github.com/01org/pm-graph pm-graph] tool to analyze power usage during suspend<br />
* [https://forums.linuxmint.com/viewtopic.php?t=91453 How to fix volume control (ALSA problem)] This is where the volume fix came from originally.</div>Goetzchttps://wiki.archlinux.org/index.php?title=Keyboard_backlight&diff=584275Keyboard backlight2019-10-02T00:53:20Z<p>Goetzc: /* D-Bus */ minor cleanup</p>
<hr />
<div>[[Category:Keyboards]]<br />
[[ja:キーボードバックライト]]<br />
[[pt:Keyboard backlight]]<br />
<br />
There a various methods to control the ''keyboard backlight'' brightness level.<br />
<br />
__TOC__<br />
<br />
== Any vendor ==<br />
<br />
There are a variety ways to manage the brightness level and different helpers tools to accomplish this, such as {{pkg|brightnessctl}} or {{pkg|light}}.<br />
<br />
The the {{ic|sys}} pseudo-file system exposes an interface to the keyboard backlight. The current brightness level can be get by reading {{ic|/sys/class/leds/tpacpi::kbd_backlight/brightness}}. For example to get the maximum brightness level:<br />
<br />
cat /sys/class/leds/tpacpi::kbd_backlight/max_brightness<br />
<br />
To set the brightness to 1:<br />
<br />
echo 1 | sudo tee /sys/class/leds/tpacpi::kbd_backlight/brightness<br />
<br />
When using {{ic|brightnessctl}} you can get a list of available brightness controls with {{ic|brightnessctl --list}}, then to show the kbd backlight information:<br />
<br />
brightnessctl --device='tpacpi::kbd_backlight' info<br />
<br />
This will show the absolute and relative current value and the maximum absolute value. To set a different value:<br />
<br />
brightnessctl --device='tpacpi::kbd_backlight' set 1 <br />
<br />
=== D-Bus ===<br />
<br />
You can control your computer keyboard backlight via the [[D-Bus]] interface. The benefits of using it are that no modification to device files is required and it is vendor agnostic.<br />
<br />
Here is an example implementation in [[Python]] 3.<br />
<br />
[[Install]] {{pkg|upower}} and {{pkg|python-dbus}} packages then place the following script in {{ic|/usr/local/bin/}} and make it executable. You can then map your keyboard shortcuts to run {{ic|/usr/local/bin/kb-light.py + x}} and {{ic|/usr/local/bin/kb-light.py - x}} to increase and decrease your keyboard backlight level by {{ic|x}}.<br />
<br />
{{Tip|1=You should try with an x = 1 to determine the limits of the keyboard backlight levels}}<br />
<br />
{{hc|/usr/local/bin/kb-light.py|<nowiki><br />
#!/usr/bin/env python3<br />
<br />
import dbus<br />
import sys<br />
<br />
def kb_light_set(delta):<br />
bus = dbus.SystemBus()<br />
kbd_backlight_proxy = bus.get_object('org.freedesktop.UPower', '/org/freedesktop/UPower/KbdBacklight')<br />
kbd_backlight = dbus.Interface(kbd_backlight_proxy, 'org.freedesktop.UPower.KbdBacklight')<br />
<br />
current = kbd_backlight.GetBrightness()<br />
maximum = kbd_backlight.GetMaxBrightness()<br />
new = max(0, min(current + delta, maximum))<br />
<br />
if 0 <= new <= maximum:<br />
current = new<br />
kbd_backlight.SetBrightness(current)<br />
<br />
# Return current backlight level percentage<br />
return 100 * current / maximum<br />
<br />
if __name__ == '__main__':<br />
if len(sys.argv) == 2 or len(sys.argv) == 3:<br />
if sys.argv[1] == "--up" or sys.argv[1] == "+":<br />
if len(sys.argv) == 3:<br />
print(kb_light_set(int(sys.argv[2])))<br />
else:<br />
print(kb_light_set(17))<br />
elif sys.argv[1] == "--down" or sys.argv[1] == "-":<br />
if len(sys.argv) == 3:<br />
print(kb_light_set(-int(sys.argv[2])))<br />
else:<br />
print(kb_light_set(-17))<br />
else:<br />
print("Unknown argument:", sys.argv[1])<br />
else:<br />
print("Script takes one or two argument.", len(sys.argv) - 1, "arguments provided.")<br />
<br />
</nowiki><br />
}}<br />
<br />
Alternatively the following bash one-liner will set the backlight to the value specified in the ''argument'':<br />
<br />
{{bc|<nowiki><br />
setKeyboardLight () {<br />
dbus-send --system --type=method_call --dest="org.freedesktop.UPower" "/org/freedesktop/UPower/KbdBacklight" "org.freedesktop.UPower.KbdBacklight.SetBrightness" int32:$1 <br />
}</nowiki><br />
}}<br />
<br />
== Asus ==<br />
<br />
{{Warning|The following way is not recommended. It provides world-writeable permissions to the keyboard backlight device file meaning that any and every user can control it.}}<br />
<br />
The keyboard backlight file is usually locked out from editing. To unlock this file at bootup, you will need to create a [[systemd]] service.<br />
<br />
{{hc|/usr/lib/systemd/system/asus-kbd-backlight.service|<nowiki><br />
[Unit]<br />
Description=Asus Keyboard Backlight<br />
Wants=systemd-backlight@leds:asus::kbd_backlight.service<br />
After=systemd-backlight@leds:asus::kbd_backlight.service<br />
<br />
[Service]<br />
Type=oneshot<br />
RemainAfterExit=yes<br />
ExecStart=/bin/chmod 666 /sys/class/leds/asus::kbd_backlight/brightness<br />
<br />
[Install]<br />
WantedBy=multi-user.target</nowiki><br />
}}<br />
<br />
You are now able to use a keyboard backlight changer script. For an example, see [[ASUS G55VW#keyboard backlight script]].<br />
<br />
For an example of how you might set up a tiny daemon (running as root) that edits these files, hook it up to [[dbus]], and map the keyboard brightness keys to [[dbus]] method calls, see [https://github.com/GambolingPangolin/KbdBacklight].</div>Goetzchttps://wiki.archlinux.org/index.php?title=Keyboard_backlight&diff=584274Keyboard backlight2019-10-02T00:36:00Z<p>Goetzc: introduction, general methods (/sys) section and helper tools</p>
<hr />
<div>[[Category:Keyboards]]<br />
[[ja:キーボードバックライト]]<br />
[[pt:Keyboard backlight]]<br />
<br />
There a various methods to control the ''keyboard backlight'' brightness level.<br />
<br />
__TOC__<br />
<br />
== Any vendor ==<br />
<br />
There are a variety ways to manage the brightness level and different helpers tools to accomplish this, such as {{pkg|brightnessctl}} or {{pkg|light}}.<br />
<br />
The the {{ic|sys}} pseudo-file system exposes an interface to the keyboard backlight. The current brightness level can be get by reading {{ic|/sys/class/leds/tpacpi::kbd_backlight/brightness}}. For example to get the maximum brightness level:<br />
<br />
cat /sys/class/leds/tpacpi::kbd_backlight/max_brightness<br />
<br />
To set the brightness to 1:<br />
<br />
echo 1 | sudo tee /sys/class/leds/tpacpi::kbd_backlight/brightness<br />
<br />
When using {{ic|brightnessctl}} you can get a list of available brightness controls with {{ic|brightnessctl --list}}, then to show the kbd backlight information:<br />
<br />
brightnessctl --device='tpacpi::kbd_backlight' info<br />
<br />
This will show the absolute and relative current value and the maximum absolute value. To set a different value:<br />
<br />
brightnessctl --device='tpacpi::kbd_backlight' set 1 <br />
<br />
=== D-Bus ===<br />
<br />
You can control your computer keyboard backlight via the [[D-Bus]] interface. The benefits of using it are that no modification to device files is required and it is vendor agnostic.<br />
<br />
Here is an example implementation in [[Python]] 3.<br />
<br />
[[Install]] {{pkg|upower}} and {{pkg|python-dbus}} packages then place the following script in {{ic|/usr/local/bin/}} and make it executable. You can then map your keyboard shortcuts to run {{ic|/usr/local/bin/kb-light.py + x}} and {{ic|/usr/local/bin/kb-light.py - x}} to increase and decrease your keyboard backlight level by {{ic|x}}.<br />
<br />
{{Tip|1=You should try with an x = 1 to determine the limits of the keyboard backlight levels}}<br />
<br />
{{hc|/usr/local/bin/kb-light.py|<nowiki><br />
#!/usr/bin/env python3<br />
<br />
import dbus<br />
import sys<br />
<br />
def kb_light_set(delta):<br />
bus = dbus.SystemBus()<br />
kbd_backlight_proxy = bus.get_object('org.freedesktop.UPower', '/org/freedesktop/UPower/KbdBacklight')<br />
kbd_backlight = dbus.Interface(kbd_backlight_proxy, 'org.freedesktop.UPower.KbdBacklight')<br />
<br />
current = kbd_backlight.GetBrightness()<br />
maximum = kbd_backlight.GetMaxBrightness()<br />
new = max(0, min(current + delta, maximum))<br />
<br />
if 0 <= new <= maximum:<br />
current = new<br />
kbd_backlight.SetBrightness(current)<br />
<br />
# Return current backlight level percentage<br />
return 100 * current / maximum<br />
<br />
if __name__ == '__main__':<br />
if len(sys.argv) == 2 or len(sys.argv) == 3:<br />
if sys.argv[1] == "--up" or sys.argv[1] == "+":<br />
if len(sys.argv) == 3:<br />
print(kb_light_set(int(sys.argv[2])))<br />
else:<br />
print(kb_light_set(17))<br />
elif sys.argv[1] == "--down" or sys.argv[1] == "-":<br />
if len(sys.argv) == 3:<br />
print(kb_light_set(-int(sys.argv[2])))<br />
else:<br />
print(kb_light_set(-17))<br />
else:<br />
print("Unknown argument:", sys.argv[1])<br />
else:<br />
print("Script takes one or two argument.", len(sys.argv) - 1, "arguments provided.")<br />
<br />
</nowiki><br />
}}<br />
<br />
Alternatively the following bash oneliner will set the backlight to the value specified in argument:<br />
<br />
{{hc||<nowiki><br />
setKeyboardLight () {<br />
dbus-send --system --type=method_call --dest="org.freedesktop.UPower" "/org/freedesktop/UPower/KbdBacklight" "org.freedesktop.UPower.KbdBacklight.SetBrightness" int32:$1 <br />
}<br />
</nowiki><br />
}}<br />
<br />
== Asus ==<br />
<br />
{{Warning|The following way is not recommended. It provides world-writeable permissions to the keyboard backlight device file meaning that any and every user can control it.}}<br />
<br />
The keyboard backlight file is usually locked out from editing. To unlock this file at bootup, you will need to create a [[systemd]] service.<br />
<br />
{{hc|/usr/lib/systemd/system/asus-kbd-backlight.service|<nowiki><br />
[Unit]<br />
Description=Asus Keyboard Backlight<br />
Wants=systemd-backlight@leds:asus::kbd_backlight.service<br />
After=systemd-backlight@leds:asus::kbd_backlight.service<br />
<br />
[Service]<br />
Type=oneshot<br />
RemainAfterExit=yes<br />
ExecStart=/bin/chmod 666 /sys/class/leds/asus::kbd_backlight/brightness<br />
<br />
[Install]<br />
WantedBy=multi-user.target</nowiki><br />
}}<br />
<br />
You are now able to use a keyboard backlight changer script. For an example, see [[ASUS G55VW#keyboard backlight script]].<br />
<br />
For an example of how you might set up a tiny daemon (running as root) that edits these files, hook it up to [[dbus]], and map the keyboard brightness keys to [[dbus]] method calls, see [https://github.com/GambolingPangolin/KbdBacklight].</div>Goetzchttps://wiki.archlinux.org/index.php?title=Lenovo_ThinkPad_X1_Carbon_(Gen_7)&diff=584201Lenovo ThinkPad X1 Carbon (Gen 7)2019-09-30T23:58:16Z<p>Goetzc: /* Automatic (Linux Vendor Firmware Service) */ we should not use the word "currently", it's also irrelevant how many updates there are.</p>
<hr />
<div>[[Category:Lenovo]]<br />
[[ja:Lenovo ThinkPad X1 Carbon (Gen 7)]]<br />
{{Related articles start}}<br />
{{Related|Lenovo ThinkPad X1 Carbon}}<br />
{{Related|Lenovo ThinkPad X1 Carbon (Gen 2)}}<br />
{{Related|Lenovo ThinkPad X1 Carbon (Gen 3)}}<br />
{{Related|Lenovo ThinkPad X1 Carbon (Gen 4)}}<br />
{{Related|Lenovo ThinkPad X1 Carbon (Gen 5)}}<br />
{{Related|Lenovo ThinkPad X1 Carbon (Gen 6)}}<br />
{{Related|Lenovo ThinkPad X1 Yoga (Gen 3)}}<br />
{{Related articles end}}<br />
<br />
{{tip| A great resource for thinkpads is https://www.thinkwiki.org/wiki/ThinkWiki}}<br />
<br />
The Lenovo ThinkPad X1 Carbon, 7th generation is an ultrabook introduced in early 2019. It features a 14" screen, 8th-gen Intel Core processors and integrated [[Intel graphics|Intel UHD 620 graphics]].<br />
<br />
To ensure you have this version, [[install]] the package {{Pkg|dmidecode}} and run:<br />
<br />
{{bc|# sudo dmidecode -s system-version<br />
ThinkPad X1 Carbon 7th<br />
}}<br />
<br />
{| class="wikitable" style="float: right; clear: right; margin: 0 0 0.5em 0.5em; max-width: 420px; width: 100%;"<br />
| '''Device''' || '''Working''' || '''Modules'''<br />
|-<br />
| [[Intel graphics]] || {{Yes}} || i915, (intel_agp)<br />
|-<br />
| [[Wireless network configuration#iwlwifi|Wireless network]] || {{Yes}} || iwlmvm<br />
|-<br />
| Native Ethernet with [https://www3.lenovo.com/us/en/accessories-and-monitors/cables-and-adapters/adapters/CABLE-BO-TP-OneLink%2B-to-RJ45-Adapter/p/4X90K06975 included dongle] || {{Yes}} || ?<br />
|-<br />
| Mobile broadband Fibocom || {{No}}¹ || ?<br />
|-<br />
| Audio || {{Yes}} || snd_hda_intel<br />
|-<br />
| Microphone || {{Y|Partial}}⁴ || snd_hda_intel<br />
|-<br />
| [[Touchpad]] || {{Yes}} || psmouse, rmi_smbus, i2c_i801<br />
|-<br />
| [[TrackPoint]] || {{Yes}} || psmouse, rmi_smbus, i2c_i801<br />
|-<br />
| Camera || {{Yes}} || uvcvideo<br />
|-<br />
| [[fprint|Fingerprint reader]] || {{No}}² || ?<br />
|-<br />
| [[Power management]] || {{Yes}}³ || ?<br />
|-<br />
| [[Bluetooth]] || {{Yes}} || btusb<br />
|-<br />
| Keyboard backlight || {{Yes}} || thinkpad_acpi<br />
|-<br />
| Function/Multimedia keys || {{Yes}} || ?<br />
|-<br />
| colspan=3 style="font-size: 70%; border: none;" | <ol><br />
<li>No working Linux driver for Fibocom L850-GL. See [https://forums.lenovo.com/t5/Linux-Discussion/X1C-gen-6-Fibocom-L850-GL-Ubuntu-18-04/m-p/4078413 this thread] and [https://forums.lenovo.com/t5/Linux-Discussion/Linux-support-for-WWAN-LTE-L850-GL-on-T580-T480/td-p/4067969 this thread] for more info.</li><br />
<li>An official driver and a reverse engineered driver are in the works [https://gitlab.freedesktop.org/libfprint/libfprint/issues/181] (''06cb:00bd'').</li><br />
<li>S3 suspend requires changes to BIOS settings, see section on [[#Enabling S3|enabling S3]].</li><br />
<li>The internal microphone doesn't seem to work, an external microphone connected on the 3.5mm jack does work, see [[{{TALKPAGENAME}}#Microphone|Talk#Microphone]].</li><br />
|}<br />
<br />
== Hardware ==<br />
<br />
Additional hardware information from {{ic|lsusb}} and {{ic|lspci}} can be found bellow when using the {{pkg|linux}} kernel 5.2.7:<br />
<br />
<div class="toccolours mw-collapsible mw-collapsed" style="width:400px; overflow:auto;"><br />
<div style="font-weight:bold;line-height:1.6;">{{ic|lsusb}}</div><br />
<div class="mw-collapsible-content"><br />
{{bc|<br />
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub<br />
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub<br />
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub<br />
Bus 001 Device 003: ID 06cb:00bd Synaptics, Inc. <br />
Bus 001 Device 002: ID 04f2:b67c Chicony Electronics Co., Ltd <br />
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub<br />
}}<br />
</div></div><br />
<br />
<div class="toccolours mw-collapsible mw-collapsed" style="width:400px; overflow:auto;"><br />
<div style="font-weight:bold;line-height:1.6;">{{ic|lspci}}</div><br />
<div class="mw-collapsible-content"><br />
{{bc|<br />
00:00.0 Host bridge: Intel Corporation Device 3e34 (rev 0c)<br />
00:02.0 VGA compatible controller: Intel Corporation UHD Graphics 620 (Whiskey Lake) (rev 02)<br />
00:04.0 Signal processing controller: Intel Corporation Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor Thermal Subsystem (rev 0c)<br />
00:08.0 System peripheral: Intel Corporation Xeon E3-1200 v5/v6 / E3-1500 v5 / 6th/7th Gen Core Processor Gaussian Mixture Model<br />
00:12.0 Signal processing controller: Intel Corporation Cannon Point-LP Thermal Controller (rev 11)<br />
00:14.0 USB controller: Intel Corporation Cannon Point-LP USB 3.1 xHCI Controller (rev 11)<br />
00:14.2 RAM memory: Intel Corporation Cannon Point-LP Shared SRAM (rev 11)<br />
00:14.3 Network controller: Intel Corporation Cannon Point-LP CNVi [Wireless-AC] (rev 11)<br />
00:15.0 Serial bus controller [0c80]: Intel Corporation Cannon Point-LP Serial IO I2C Controller #0 (rev 11)<br />
00:15.1 Serial bus controller [0c80]: Intel Corporation Cannon Point-LP Serial IO I2C Controller #1 (rev 11)<br />
00:16.0 Communication controller: Intel Corporation Cannon Point-LP MEI Controller #1 (rev 11)<br />
00:1d.0 PCI bridge: Intel Corporation Cannon Point-LP PCI Express Root Port #9 (rev f1)<br />
00:1d.4 PCI bridge: Intel Corporation Cannon Point-LP PCI Express Root Port #13 (rev f1)<br />
00:1f.0 ISA bridge: Intel Corporation Cannon Point-LP LPC Controller (rev 11)<br />
00:1f.3 Audio device: Intel Corporation Cannon Point-LP High Definition Audio Controller (rev 11)<br />
00:1f.4 SMBus: Intel Corporation Cannon Point-LP SMBus Controller (rev 11)<br />
00:1f.5 Serial bus controller [0c80]: Intel Corporation Cannon Point-LP SPI Controller (rev 11)<br />
00:1f.6 Ethernet controller: Intel Corporation Ethernet Connection (6) I219-V (rev 11)<br />
03:00.0 Non-Volatile memory controller: Sandisk Corp WD Black 2018/PC SN720 NVMe SSD<br />
05:00.0 PCI bridge: Intel Corporation JHL6540 Thunderbolt 3 Bridge (C step) [Alpine Ridge 4C 2016] (rev 02)<br />
06:00.0 PCI bridge: Intel Corporation JHL6540 Thunderbolt 3 Bridge (C step) [Alpine Ridge 4C 2016] (rev 02)<br />
06:01.0 PCI bridge: Intel Corporation JHL6540 Thunderbolt 3 Bridge (C step) [Alpine Ridge 4C 2016] (rev 02)<br />
06:02.0 PCI bridge: Intel Corporation JHL6540 Thunderbolt 3 Bridge (C step) [Alpine Ridge 4C 2016] (rev 02)<br />
06:04.0 PCI bridge: Intel Corporation JHL6540 Thunderbolt 3 Bridge (C step) [Alpine Ridge 4C 2016] (rev 02)<br />
07:00.0 System peripheral: Intel Corporation JHL6540 Thunderbolt 3 NHI (C step) [Alpine Ridge 4C 2016] (rev 02)<br />
2d:00.0 USB controller: Intel Corporation JHL6540 Thunderbolt 3 USB Controller (C step) [Alpine Ridge 4C 2016] (rev 02)<br />
}}<br />
</div></div><br />
<br />
== BIOS ==<br />
The most convenient way to install Arch Linux is by disabling "Secure Boot" {{ic|Security -> Secure Boot - Set to "Disabled"}}. However it is possible to self-sign your kernel and boot with it enabled. For further information have a look at the [[Secure Boot]] article.<br />
<br />
In case your {{ic|efivars}} are not properly set it is most likely due to you not being booted into [[UEFI]]. Should the problem persist be sure to consult the [[UEFI#UEFI variables]] section.<br />
<br />
=== Updates ===<br />
<br />
==== Automatic (Linux Vendor Firmware Service) ====<br />
<br />
[https://blogs.gnome.org/hughsie/2018/08/06/please-welcome-lenovo-to-the-lvfs/ In August of 2018 Lenovo has joined] the [https://fwupd.org/ Linux Vendor Firmware Service (LVFS)] project, which enables firmware updates from within the OS.<br />
BIOS updates (and possibly other firmware such as the Thunderbolt controller) can be queried for and installed through [[fwupd]].<br />
<br />
==== Manual (fwupdmgr) ====<br />
<br />
Lenovo may in the future provide cabinet files that can be directly installed with fwupdmgr.<br />
Check for Linux {{ic|.cab}} files from the [https://pcsupport.lenovo.com/us/en/products/laptops-and-netbooks/thinkpad-x-series-laptops/thinkpad-x1-carbon-7th-gen-type-20qd-20qe/downloads Lenovo ThinkPad X1 Carbon (Gen 7) driver website].<br />
<br />
#Make sure the AC adapter is firmly connected to the target computer.<br />
#Launch Terminal.<br />
#Move to the directory where the cabinet file was placed.<br />
#Run {{ic|fwupdmgr install xxxxxxxx.cab}} to schedule firmware update.<br />
#Restart the system.<br />
#The computer will be restarted and the UEFI BIOS will be updated.<br />
<br />
=== Enabling S3 ===<br />
<br />
To enable S3 support, make sure you go into the BIOS configuration, and {{ic|Config -> Power -> Sleep State - Set to "Linux"}}. This should make S3 available. To verify, after making the changes in the BIOS configuration, boot into Linux, and run the {{ic|dmesg | grep -i "acpi: (supports"}} command again to make sure that S3 is now available.<br />
<br />
=== Verifying S3 ===<br />
<br />
To check whether S3 is recognized and usable by Linux, run:<br />
<br />
dmesg | grep -i "acpi: (supports"<br />
<br />
and check for {{ic|S3}} in the list.<br />
<br />
=== S3 Suspend Bug with Bluetooth Devices ===<br />
<br />
Occasionally your Thinkpad will wake up immediately after suspending with certain [[bluetooth]] devices added. To prevent this, remove the devices or disable [[bluetooth]] before suspending.<br />
<br />
=== BIOS configurations ===<br />
<br />
* {{ic|Config -> Thunderbolt BIOS Assist Mode - Set to "Enabled"}}. When disabled, on Linux, power usage appears to be significantly higher because of a substantial number of CPU wakeups during s2idle.<br />
<br />
== Power management/Throttling issues ==<br />
Due to wrong configured power management registers the CPU may consume a lot less power than under windows and the thermal throttling occurs at 80°C (97°C when using Windows, see [https://www.reddit.com/r/thinkpad/comments/870u0a/t480s_linux_throttling_bug/ T480s throttling bug]).<br />
<br />
Lenovo has confirmed the issue, [https://forums.lenovo.com/t5/Other-Linux-Discussions/X1C6-T480s-low-cTDP-and-trip-temperature-in-Linux/m-p/4534535/highlight/true#M13642 explained the cause] and has published [https://forums.lenovo.com/t5/Other-Linux-Discussions/X1C6-T480s-low-cTDP-and-trip-temperature-in-Linux/m-p/4535310/highlight/true#M13653 updates for the embedded controller and the BIOS] to LVFS (''how to install see [[#Updates|#BIOS Updates]]'').<br />
<br />
=== throttled ===<br />
{{Note|This fix has probably been superseded by the EC/BIOS updates}}<br />
<br />
{{Pkg|throttled}} replaces {{AUR|lenovo-throttling-fix-git}}{{Broken package link|package not found}} used previously. Install {{Pkg|throttled}}, then run <br />
<br />
sudo systemctl enable --now lenovo_fix.service<br />
<br />
=== Touchpad TLP fix ===<br />
The touchpad works fine out of the box, except that [[TLP]] does not detect that the Synaptics Touchpad is indeed an input device, so it does not exclude it from the USB_AUTOSUSPEND feature. You can tell that this is the issue if the touchpad works for just a moment after waking up from suspend, and then stops working again. <br />
<br />
The fix is to add the touchpad to the USB_BLACKLIST in TLP's config:<br />
<br />
USB_BLACKLIST="06cb:00bd" <=========== use lsusb to get the correct UUID<br />
<br />
== Audio ==<br />
As there are physically four loudspeakers, you need to configure to 4.0 audio output. When using PulseAudio there are various [[PulseAudio#Front-ends|configuration utilities]].<br />
<br />
=== Volume controls ===<br />
<br />
In order for volume controls to work correctly you must edit {{ic|/usr/share/pulseaudio/alsa-mixer/paths/analog-output.conf.common}} by adding the following above {{ic|[Element PCM]}}:<br />
<br />
[Element Master]<br />
switch = mute<br />
volume = ignore<br />
<br />
A PulseAudio restart is required for this change to take affect. Make sure to increase the "''Master''" channel volume to 100% for the top-firing speakers to work (using amixer or alsamixer, found in {{Pkg|alsa-utils}}).<br />
<br />
==== Persistent fix ====<br />
<br />
Upgrading or reinstalling {{Pkg|pulseaudio}} will overwrite this file, and [https://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/User/PulseAudioStoleMyVolumes/ PulseAudio doesn't appear to offer another way] to make this configuration change. To prevent pacman from overwriting the file, add the following line under {{ic|[options]}} in {{ic|/etc/pacman.conf}}:<br />
<br />
NoUpgrade = usr/share/pulseaudio/alsa-mixer/paths/analog-output.conf.common<br />
<br />
=== Microphone ===<br />
<br />
On kernel 5.2, the internal microphone is detected but [[Advanced_Linux_Sound_Architecture/Troubleshooting#Microphone|no audio is captured]]. The fix should arrive with {{pkg|linux}} kernel 5.3 which includes the [https://github.com/thesofproject/sof SOF] audio firmware. Instruction are available on the Lenovo [https://forums.lenovo.com/t5/Ubuntu/Guide-X1-Carbon-7th-Generation-Ubuntu-compatability/m-p/4503771/highlight/true#M2849 forums].<br />
<br />
== Disabling red LED in ThinkPad logo ==<br />
<br />
To disable the red LED in the ThinkPad logo on the cover:<br />
<br />
1. Enable writing to the embedded controller registers by adding the kernel parameter {{ic|1=ec_sys.write_support=1}}. <br />
If you use UEFI boot, you can add this parameter in {{ic|/boot/efi/loader/entries/arch.conf}} under "options".<br />
<br />
2. Then, you can disable directly the LED with this command: <br />
<br />
# echo -n -e "\x0a" | sudo dd of="/sys/kernel/debug/ec/ec0/io" bs=1 seek=12 count=1 conv=notrunc 2> /dev/null<br />
<br />
'''To disable the LED at startup, you can create a systemd service:''' <br />
{{Accuracy|This command works one time, but the light turns back on after a suspend (even with the systemd service enabled).|section=Disabling red LED in Thinkpad logo stops}}<br />
<br />
<br />
1. Create a sh script (/root/disable_led.sh for instance) and put this : <br />
<br />
#!/bin/bash<br />
echo -n -e "\x0a" | dd of="/sys/kernel/debug/ec/ec0/io" bs=1 seek=12 count=1 conv=notrunc 2> /dev/null<br />
<br />
2. Create a new service unit file in {{ic|/etc/systemd/system} called "led.service", and insert the following: <br />
<br />
Description=Disable ThinkPad logo LED<br />
<br />
[Service]<br />
ExecStart=/root/disable_led.sh<br />
<br />
[Install]<br />
WantedBy=multi-user.target<br />
<br />
3. Start and enable this service:<br />
<br />
# systemctl start led.service<br />
# systemctl enable led.service<br />
<br />
== Additional resources ==<br />
<br />
* [https://www.thinkwiki.org/wiki/Category:X1_Carbon_(7th_Gen) ThinkWiki X1 Carbon 7th Gen page]<br />
* [https://gist.github.com/greigdp/bb70fbc331a0aaf447c2d38eacb85b8f Dell XPS 13 9370 quirks]: Some pointers on getting Watt usage down to ~2W, Intel video powersaving features might be interesting, see also the [[Intel graphics]] page for interesting power-saving options.<br />
* [https://01.org/blogs/rzhang/2015/best-practice-debug-linux-suspend/hibernate-issues Intel Blog: Best practice to debug Linux* suspend/hibernate issues], including the [https://github.com/01org/pm-graph pm-graph] tool to analyze power usage during suspend<br />
* [https://forums.linuxmint.com/viewtopic.php?t=91453 How to fix volume control (ALSA problem)] This is where the volume fix came from originally.</div>Goetzchttps://wiki.archlinux.org/index.php?title=Lenovo_ThinkPad_X1_Carbon_(Gen_7)&diff=583453Lenovo ThinkPad X1 Carbon (Gen 7)2019-09-20T19:16:54Z<p>Goetzc: /* Persistent fix */ m</p>
<hr />
<div>[[Category:Lenovo]]<br />
[[ja:Lenovo ThinkPad X1 Carbon (Gen 7)]]<br />
{{Related articles start}}<br />
{{Related|Lenovo ThinkPad X1 Carbon}}<br />
{{Related|Lenovo ThinkPad X1 Carbon (Gen 2)}}<br />
{{Related|Lenovo ThinkPad X1 Carbon (Gen 3)}}<br />
{{Related|Lenovo ThinkPad X1 Carbon (Gen 4)}}<br />
{{Related|Lenovo ThinkPad X1 Carbon (Gen 5)}}<br />
{{Related|Lenovo ThinkPad X1 Carbon (Gen 6)}}<br />
{{Related|Lenovo ThinkPad X1 Yoga (Gen 3)}}<br />
{{Related articles end}}<br />
<br />
{{tip| A great resource for thinkpads is https://www.thinkwiki.org/wiki/ThinkWiki}}<br />
<br />
The Lenovo ThinkPad X1 Carbon, 7th generation is an ultrabook introduced in early 2019. It features a 14" screen, 8th-gen Intel Core processors and integrated [[Intel graphics|Intel UHD 620 graphics]].<br />
<br />
To ensure you have this version, [[install]] the package {{Pkg|dmidecode}} and run:<br />
<br />
{{bc|# sudo dmidecode -s system-version<br />
ThinkPad X1 Carbon 7th<br />
}}<br />
<br />
{| class="wikitable" style="float: right; clear: right; margin: 0 0 0.5em 0.5em; max-width: 420px; width: 100%;"<br />
| '''Device''' || '''Working''' || '''Modules'''<br />
|-<br />
| [[Intel graphics]] || {{Yes}} || i915, (intel_agp)<br />
|-<br />
| [[Wireless network configuration#iwlwifi|Wireless network]] || {{Yes}} || iwlmvm<br />
|-<br />
| Native Ethernet with [https://www3.lenovo.com/us/en/accessories-and-monitors/cables-and-adapters/adapters/CABLE-BO-TP-OneLink%2B-to-RJ45-Adapter/p/4X90K06975 included dongle] || {{Yes}} || ?<br />
|-<br />
| Mobile broadband Fibocom || {{No}}¹ || ?<br />
|-<br />
| Audio || {{Yes}} || snd_hda_intel<br />
|-<br />
| Microphone || {{Y|Partial}}⁴ || snd_hda_intel<br />
|-<br />
| [[Touchpad]] || {{Yes}} || psmouse, rmi_smbus, i2c_i801<br />
|-<br />
| [[TrackPoint]] || {{Yes}} || psmouse, rmi_smbus, i2c_i801<br />
|-<br />
| Camera || {{Yes}} || uvcvideo<br />
|-<br />
| [[fprint|Fingerprint reader]] || {{No}}² || ?<br />
|-<br />
| [[Power management]] || {{Yes}}³ || ?<br />
|-<br />
| [[Bluetooth]] || {{Yes}} || btusb<br />
|-<br />
| Keyboard backlight || {{Yes}} || thinkpad_acpi<br />
|-<br />
| Function/Multimedia keys || {{Yes}} || ?<br />
|-<br />
| colspan=3 style="font-size: 70%; border: none;" | <ol><br />
<li>No working Linux driver for Fibocom L850-GL. See [https://forums.lenovo.com/t5/Linux-Discussion/X1C-gen-6-Fibocom-L850-GL-Ubuntu-18-04/m-p/4078413 this thread] and [https://forums.lenovo.com/t5/Linux-Discussion/Linux-support-for-WWAN-LTE-L850-GL-on-T580-T480/td-p/4067969 this thread] for more info.</li><br />
<li>An official driver and a reverse engineered driver are in the works [https://gitlab.freedesktop.org/libfprint/libfprint/issues/181] (''06cb:00bd'').</li><br />
<li>S3 suspend requires changes to BIOS settings, see section on [[#Enabling S3|enabling S3]].</li><br />
<li>The internal microphone doesn't seem to work, an external microphone connected on the 3.5mm jack does work, see [[{{TALKPAGENAME}}#Microphone|Talk#Microphone]].</li><br />
|}<br />
<br />
== Hardware ==<br />
<br />
Additional hardware information from {{ic|lsusb}} and {{ic|lspci}} can be found bellow when using the {{pkg|linux}} kernel 5.2.7:<br />
<br />
<div class="toccolours mw-collapsible mw-collapsed" style="width:400px; overflow:auto;"><br />
<div style="font-weight:bold;line-height:1.6;">{{ic|lsusb}}</div><br />
<div class="mw-collapsible-content"><br />
{{bc|<br />
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub<br />
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub<br />
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub<br />
Bus 001 Device 003: ID 06cb:00bd Synaptics, Inc. <br />
Bus 001 Device 002: ID 04f2:b67c Chicony Electronics Co., Ltd <br />
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub<br />
}}<br />
</div></div><br />
<br />
<div class="toccolours mw-collapsible mw-collapsed" style="width:400px; overflow:auto;"><br />
<div style="font-weight:bold;line-height:1.6;">{{ic|lspci}}</div><br />
<div class="mw-collapsible-content"><br />
{{bc|<br />
00:00.0 Host bridge: Intel Corporation Device 3e34 (rev 0c)<br />
00:02.0 VGA compatible controller: Intel Corporation UHD Graphics 620 (Whiskey Lake) (rev 02)<br />
00:04.0 Signal processing controller: Intel Corporation Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor Thermal Subsystem (rev 0c)<br />
00:08.0 System peripheral: Intel Corporation Xeon E3-1200 v5/v6 / E3-1500 v5 / 6th/7th Gen Core Processor Gaussian Mixture Model<br />
00:12.0 Signal processing controller: Intel Corporation Cannon Point-LP Thermal Controller (rev 11)<br />
00:14.0 USB controller: Intel Corporation Cannon Point-LP USB 3.1 xHCI Controller (rev 11)<br />
00:14.2 RAM memory: Intel Corporation Cannon Point-LP Shared SRAM (rev 11)<br />
00:14.3 Network controller: Intel Corporation Cannon Point-LP CNVi [Wireless-AC] (rev 11)<br />
00:15.0 Serial bus controller [0c80]: Intel Corporation Cannon Point-LP Serial IO I2C Controller #0 (rev 11)<br />
00:15.1 Serial bus controller [0c80]: Intel Corporation Cannon Point-LP Serial IO I2C Controller #1 (rev 11)<br />
00:16.0 Communication controller: Intel Corporation Cannon Point-LP MEI Controller #1 (rev 11)<br />
00:1d.0 PCI bridge: Intel Corporation Cannon Point-LP PCI Express Root Port #9 (rev f1)<br />
00:1d.4 PCI bridge: Intel Corporation Cannon Point-LP PCI Express Root Port #13 (rev f1)<br />
00:1f.0 ISA bridge: Intel Corporation Cannon Point-LP LPC Controller (rev 11)<br />
00:1f.3 Audio device: Intel Corporation Cannon Point-LP High Definition Audio Controller (rev 11)<br />
00:1f.4 SMBus: Intel Corporation Cannon Point-LP SMBus Controller (rev 11)<br />
00:1f.5 Serial bus controller [0c80]: Intel Corporation Cannon Point-LP SPI Controller (rev 11)<br />
00:1f.6 Ethernet controller: Intel Corporation Ethernet Connection (6) I219-V (rev 11)<br />
03:00.0 Non-Volatile memory controller: Sandisk Corp WD Black 2018/PC SN720 NVMe SSD<br />
05:00.0 PCI bridge: Intel Corporation JHL6540 Thunderbolt 3 Bridge (C step) [Alpine Ridge 4C 2016] (rev 02)<br />
06:00.0 PCI bridge: Intel Corporation JHL6540 Thunderbolt 3 Bridge (C step) [Alpine Ridge 4C 2016] (rev 02)<br />
06:01.0 PCI bridge: Intel Corporation JHL6540 Thunderbolt 3 Bridge (C step) [Alpine Ridge 4C 2016] (rev 02)<br />
06:02.0 PCI bridge: Intel Corporation JHL6540 Thunderbolt 3 Bridge (C step) [Alpine Ridge 4C 2016] (rev 02)<br />
06:04.0 PCI bridge: Intel Corporation JHL6540 Thunderbolt 3 Bridge (C step) [Alpine Ridge 4C 2016] (rev 02)<br />
07:00.0 System peripheral: Intel Corporation JHL6540 Thunderbolt 3 NHI (C step) [Alpine Ridge 4C 2016] (rev 02)<br />
2d:00.0 USB controller: Intel Corporation JHL6540 Thunderbolt 3 USB Controller (C step) [Alpine Ridge 4C 2016] (rev 02)<br />
}}<br />
</div></div><br />
<br />
== BIOS ==<br />
The most convenient way to install Arch Linux is by disabling "Secure Boot" {{ic|Security -> Secure Boot - Set to "Disabled"}}. However it is possible to self-sign your kernel and boot with it enabled. For further information have a look at the [[Secure Boot]] article.<br />
<br />
In case your {{ic|efivars}} are not properly set it is most likely due to you not being booted into [[UEFI]]. Should the problem persist be sure to consult the [[UEFI#UEFI variables]] section.<br />
<br />
=== Updates ===<br />
<br />
==== Automatic (Linux Vendor Firmware Service) ====<br />
<br />
[https://blogs.gnome.org/hughsie/2018/08/06/please-welcome-lenovo-to-the-lvfs/ In August of 2018 Lenovo has joined] the [https://fwupd.org/ Linux Vendor Firmware Service (LVFS)] project, which enables firmware updates from within the OS.<br />
BIOS updates (and possibly other firmware such as the Thunderbolt controller) can be queried for and installed through [[fwupd]]. Currently, there is one small BIOS update available through fwupd.<br />
<br />
==== Manual (fwupdmgr) ====<br />
<br />
Lenovo may in the future provide cabinet files that can be directly installed with fwupdmgr.<br />
Check for Linux {{ic|.cab}} files from the [https://pcsupport.lenovo.com/us/en/products/laptops-and-netbooks/thinkpad-x-series-laptops/thinkpad-x1-carbon-7th-gen-type-20qd-20qe/downloads Lenovo ThinkPad X1 Carbon (Gen 7) driver website].<br />
<br />
#Make sure the AC adapter is firmly connected to the target computer.<br />
#Launch Terminal.<br />
#Move to the directory where the cabinet file was placed.<br />
#Run {{ic|fwupdmgr install xxxxxxxx.cab}} to schedule firmware update.<br />
#Restart the system.<br />
#The computer will be restarted and the UEFI BIOS will be updated.<br />
<br />
=== Enabling S3 ===<br />
<br />
To enable S3 support, make sure you go into the BIOS configuration, and {{ic|Config -> Power -> Sleep State - Set to "Linux"}}. This should make S3 available. To verify, after making the changes in the BIOS configuration, boot into Linux, and run the {{ic|dmesg | grep -i "acpi: (supports"}} command again to make sure that S3 is now available.<br />
<br />
=== Verifying S3 ===<br />
<br />
To check whether S3 is recognized and usable by Linux, run:<br />
<br />
dmesg | grep -i "acpi: (supports"<br />
<br />
and check for {{ic|S3}} in the list.<br />
<br />
=== S3 Suspend Bug with Bluetooth Devices ===<br />
<br />
Occasionally your Thinkpad will wake up immediately after suspending with certain [[bluetooth]] devices added. To prevent this, remove the devices or disable [[bluetooth]] before suspending.<br />
<br />
=== BIOS configurations ===<br />
<br />
* {{ic|Config -> Thunderbolt BIOS Assist Mode - Set to "Enabled"}}. When disabled, on Linux, power usage appears to be significantly higher because of a substantial number of CPU wakeups during s2idle.<br />
<br />
== Power management/Throttling issues ==<br />
Due to wrong configured power management registers the CPU may consume a lot less power than under windows and the thermal throttling occurs at 80°C (97°C when using Windows, see [https://www.reddit.com/r/thinkpad/comments/870u0a/t480s_linux_throttling_bug/ T480s throttling bug]).<br />
<br />
There is a [https://forums.lenovo.com/t5/Linux-Discussion/T480s-low-cTDP-and-trip-temperature-in-Linux/td-p/4028489 post in the official Lenovo forum] to inform Lenovo about this issue.<br />
<br />
=== Throttling fix ===<br />
<br />
{{Pkg|throttled}} replaces {{AUR|lenovo-throttling-fix-git}}{{Broken package link|package not found}} used previously. Install {{Pkg|throttled}}, then run <br />
<br />
sudo systemctl enable --now lenovo_fix.service<br />
<br />
=== Touchpad TLP fix ===<br />
The touchpad works fine out of the box, except that [[TLP]] does not detect that the Synaptics Touchpad is indeed an input device, so it does not exclude it from the USB_AUTOSUSPEND feature. You can tell that this is the issue if the touchpad works for just a moment after waking up from suspend, and then stops working again. <br />
<br />
The fix is to add the touchpad to the USB_BLACKLIST in TLP's config:<br />
<br />
USB_BLACKLIST="06cb:00bd" <=========== use lsusb to get the correct UUID<br />
<br />
== Audio ==<br />
As there are physically four loudspeakers, you need to configure to 4.0 audio output. When using PulseAudio there are various [[PulseAudio#Front-ends|configuration utilities]].<br />
<br />
=== Volume controls ===<br />
<br />
In order for volume controls to work correctly you must edit {{ic|/usr/share/pulseaudio/alsa-mixer/paths/analog-output.conf.common}} by adding the following above {{ic|[Element PCM]}}:<br />
<br />
[Element Master]<br />
switch = mute<br />
volume = ignore<br />
<br />
A PulseAudio restart is required for this change to take affect. Make sure to increase the "''Master''" channel volume to 100% for the top-firing speakers to work (using amixer or alsamixer, found in {{Pkg|alsa-utils}}).<br />
<br />
==== Persistent fix ====<br />
<br />
Upgrading or reinstalling {{Pkg|pulseaudio}} will overwrite this file, and [https://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/User/PulseAudioStoleMyVolumes/ PulseAudio doesn't appear to offer another way] to make this configuration change. To prevent pacman from overwriting the file, add the following line under {{ic|[options]}} in {{ic|/etc/pacman.conf}}:<br />
<br />
NoUpgrade = usr/share/pulseaudio/alsa-mixer/paths/analog-output.conf.common<br />
<br />
=== Microphone ===<br />
<br />
On kernel 5.2, the internal microphone is detected but [[Advanced_Linux_Sound_Architecture/Troubleshooting#Microphone|no audio is captured]]. The fix should arrive with {{pkg|linux}} kernel 5.3 which includes the [https://github.com/thesofproject/sof SOF] audio firmware. Instruction are available on the Lenovo [https://forums.lenovo.com/t5/Ubuntu/Guide-X1-Carbon-7th-Generation-Ubuntu-compatability/m-p/4503771/highlight/true#M2849 forums].<br />
<br />
== Disabling red LED in ThinkPad logo ==<br />
<br />
To disable the red LED in the ThinkPad logo on the cover:<br />
<br />
1. Enable writing to the embedded controller registers by adding the kernel parameter {{ic|1=ec_sys.write_support=1}}. <br />
If you use UEFI boot, you can add this parameter in {{ic|/boot/efi/loader/entries/arch.conf}} under "options".<br />
<br />
2. Then, you can disable directly the LED with this command: <br />
<br />
# echo -n -e "\x0a" | sudo dd of="/sys/kernel/debug/ec/ec0/io" bs=1 seek=12 count=1 conv=notrunc 2> /dev/null<br />
<br />
'''To disable the LED at startup, you can create a systemd service:''' <br />
{{Accuracy|This command works one time, but the light turns back on after a suspend (even with the systemd service enabled).|section=Disabling red LED in Thinkpad logo stops}}<br />
<br />
<br />
1. Create a sh script (/root/disable_led.sh for instance) and put this : <br />
<br />
#!/bin/bash<br />
echo -n -e "\x0a" | dd of="/sys/kernel/debug/ec/ec0/io" bs=1 seek=12 count=1 conv=notrunc 2> /dev/null<br />
<br />
2. Create a new service unit file in {{ic|/etc/systemd/system} called "led.service", and insert the following: <br />
<br />
Description=Disable ThinkPad logo LED<br />
<br />
[Service]<br />
ExecStart=/root/disable_led.sh<br />
<br />
[Install]<br />
WantedBy=multi-user.target<br />
<br />
3. Start and enable this service:<br />
<br />
# systemctl start led.service<br />
# systemctl enable led.service<br />
<br />
== Additional resources ==<br />
<br />
* [https://www.thinkwiki.org/wiki/Category:X1_Carbon_(7th_Gen) ThinkWiki X1 Carbon 7th Gen page]<br />
* [https://gist.github.com/greigdp/bb70fbc331a0aaf447c2d38eacb85b8f Dell XPS 13 9370 quirks]: Some pointers on getting Watt usage down to ~2W, Intel video powersaving features might be interesting, see also the [[Intel graphics]] page for interesting power-saving options.<br />
* [https://01.org/blogs/rzhang/2015/best-practice-debug-linux-suspend/hibernate-issues Intel Blog: Best practice to debug Linux* suspend/hibernate issues], including the [https://github.com/01org/pm-graph pm-graph] tool to analyze power usage during suspend<br />
* [https://forums.linuxmint.com/viewtopic.php?t=91453 How to fix volume control (ALSA problem)] This is where the volume fix came from originally.</div>Goetzchttps://wiki.archlinux.org/index.php?title=SDDM&diff=582701SDDM2019-09-17T16:47:29Z<p>Goetzc: /* DPI settings */ ref and reword</p>
<hr />
<div>[[Category:KDE]]<br />
[[Category:Display managers]]<br />
[[fr:SDDM]]<br />
[[ja:SDDM]]<br />
[[ru:SDDM]]<br />
[[zh-hans:SDDM]]<br />
{{Related articles start}}<br />
{{Related|Display manager}}<br />
{{Related|KDE}}<br />
{{Related articles end}}<br />
The [https://github.com/sddm/sddm/ Simple Desktop Display Manager] (SDDM) is the preferred [[display manager]] for [[KDE]] Plasma desktop. <br />
<br />
From [[Wikipedia:Simple Desktop Display Manager]]:<br />
<br />
:Simple Desktop Display Manager (SDDM) is a display manager (a graphical login program) for X11 and Wayland windowing systems. SDDM was written from scratch in C++11 and supports theming via QML. KDE chose SDDM to be the successor of the KDE Display Manager for KDE Plasma 5.<br />
<br />
{{Note|The Wayland windowing system is not yet fully supported [https://github.com/sddm/sddm/issues/440]. Wayland sessions are listed, but SDDM runs on X11.}}<br />
<br />
== Installation ==<br />
<br />
[[Install]] the {{Pkg|sddm}} package. Optionally install {{Pkg|sddm-kcm}} for the [[KDE#KCM|KDE Config Module]].<br />
<br />
Follow [[Display manager#Loading the display manager]] to start SDDM at boot.<br />
<br />
== Configuration ==<br />
<br />
The default configuration file for SDDM can be found at {{ic|/usr/lib/sddm/sddm.conf.d/default.conf}}. For any changes, create configuration file(s) in {{ic|/etc/sddm.conf.d/}}. See {{man|5|sddm.conf}} for all options.<br />
<br />
The {{pkg|sddm-kcm}} package (included in the {{grp|plasma}} group) provides a GUI to configure SDDM in Plasma's system settings. There is also a [[Qt]]-based {{AUR|sddm-config-editor-git}} available in the [[AUR]].<br />
<br />
Everything should work out of the box, since Arch Linux uses [[systemd]] and SDDM defaults to using {{ic|systemd-logind}} for session management.<br />
<br />
=== Autologin ===<br />
<br />
SDDM supports automatic login through its configuration file, for example:<br />
<br />
{{hc|/etc/sddm.conf.d/autologin.conf|2=<br />
[Autologin]<br />
User=john<br />
Session=plasma.desktop<br />
}}<br />
<br />
This configuration causes a KDE Plasma session to be started for user {{ic|john}} when the system is booted. Available session types can be found in {{ic|/usr/share/xsessions/}} directory.<br />
<br />
An option to autologin into KDE Plasma while simultaneously locking the session is not available [https://github.com/sddm/sddm/issues/306]<br />
<br />
You can add a script that activates the screensaver of KDE to the autostart as a workaround:<br />
<br />
#!/bin/sh<br />
/usr/bin/dbus-send --session --type=method_call --dest=org.freedesktop.ScreenSaver /ScreenSaver org.freedesktop.ScreenSaver.Lock &<br />
<br />
=== Unlock KDE Wallet automatically on login ===<br />
<br />
See [[KDE Wallet#Unlock KDE Wallet automatically on login]].<br />
<br />
=== Theme settings ===<br />
<br />
Theme settings can be changed in the {{ic|[Theme]}} section. If you use Plasma's system settings, themes may show previews.<br />
<br />
Set to {{ic|breeze}} for the default Plasma theme.<br />
<br />
Some themes are available in the [[AUR]], for example {{AUR|archlinux-themes-sddm}}.<br />
<br />
==== Current theme ====<br />
<br />
Set the current theme through the {{ic|Current}} value, e.g. {{ic|1=Current=archlinux-simplyblack}}.<br />
<br />
==== Editing themes ====<br />
<br />
The default SDDM theme directory is {{ic|/usr/share/sddm/themes/}}. You can add your custom made themes to that directory under a separate subdirectory. Note that SDDM requires these subdirectory names to be the same as the theme names. Study the files installed to modify or create your own theme.<br />
<br />
==== Testing (Previewing) a Theme ====<br />
<br />
You can preview an SDDM theme if needed. This is especially helpful if you are not sure how the theme would look if selected or just edited a theme and want to see how it would look without logging out. You can run something like this:<br />
<br />
$ sddm-greeter --test-mode --theme /usr/share/sddm/themes/breeze<br />
<br />
This should open a new window for every monitor you have connected and show a preview of the theme.<br />
<br />
{{Note|This is just a preview. In this mode, some actions like shutdown, suspend or login will have no effect.}}<br />
<br />
==== Mouse cursor ====<br />
<br />
To set the mouse cursor theme, set {{ic|CursorTheme}} to your preferred cursor theme.<br />
<br />
Valid [[Plasma]] mouse cursor theme names are {{ic|breeze_cursors}}, {{ic|Breeze_Snow}} and {{ic|breeze-dark}}.<br />
<br />
==== User Icon (Avatar) ====<br />
<br />
SDDM reads the user icon (a.k.a. "avatar") as a PNG image from either {{ic|~/.face.icon}} for each user, or the common location for all users specified by {{ic|FacesDir}} in an SDDM configuration file. The configuration setting can be placed in either {{ic|/etc/sddm.conf}} directly, or, better, a file under {{ic|/etc/sddm.conf.d/}} such as {{ic|/etc/sddm.conf.d/avatar.conf}}.<br />
<br />
To use the {{ic|FacesDir}} location option, place a PNG image for each user named as {{ic|''username''.face.icon}} into location specified in for {{ic|FacesDir}} in the configuration file. The default location for {{ic|FacesDir}} is {{ic|/usr/share/sddm/faces/}}. You can change the default {{ic|FacesDir}} location to match your requirements. Here is an example:<br />
<br />
{{hc|/etc/sddm.conf.d/avatar.conf|2=<br />
[Theme]<br />
FacesDir=/var/lib/AccountsService/icons/<br />
}}<br />
<br />
The other option is to put a PNG image named {{ic|.face.icon}} at the root of your home directory. In this case, no changes to any SDDM configuration file is required. However, you need to make sure that {{ic|sddm}} user can read the PNG image file(s) for the user icon(s).<br />
<br />
{{Note|In many KDE versions, the user icon image file is {{ic|~/.face}} and {{ic|~/.face.icon}} is a symlink to that file. If the user icon images are symlinks, you need to set proper file permissions to the target files.}} <br />
<br />
To [[Access Control Lists#Set ACL|set proper permissions]] run:<br />
<br />
$ setfacl -m u:sddm:x ~/<br />
$ setfacl -m u:sddm:r ~/.face.icon<br />
<br />
You can [[Access Control Lists#Show ACL|check permissions]] with:<br />
<br />
$ getfacl ~/<br />
$ getfacl ~/.face.icon<br />
<br />
See [https://github.com/sddm/sddm#no-user-icon SDDM README: No User Icon].<br />
<br />
=== Numlock ===<br />
<br />
If you want to enforce Numlock to be enabled, set {{ic|1=Numlock=on}} in the {{ic|[General]}} section.<br />
<br />
=== Rotate display ===<br />
<br />
See [[Xrandr#Configuration]].<br />
<br />
=== DPI settings ===<br />
<br />
Sometimes it is useful to set up the correct monitor's PPI settings on a "Display Manager" level.[https://github.com/sddm/sddm/blob/master/README.md#custom-dpi] To do so you need to add to {{ic|ServerArguments}} the parameter {{ic|-dpi ''your_dpi''}} at the end of the string. For example:<br />
<br />
{{hc|head=/etc/sddm.conf.d/dpi.conf|output=<br />
[X11]<br />
ServerArguments=-nolisten tcp -dpi 94<br />
}}<br />
<br />
=== Enable HiDPI ===<br />
<br />
Create the following file:<br />
<br />
{{hc|/etc/sddm.conf.d/hidpi.conf|2=<br />
[Wayland]<br />
EnableHiDPI=true<br />
<br />
[X11]<br />
EnableHiDPI=true<br />
}}<br />
<br />
=== Using a fingerprint reader ===<br />
<br />
{{Note|Make sure that your fingerprint is registered before making these changes. Fingerprint support is not completely working properly yet, and it seems logging in with only a password no longer works using this method.}}<br />
<br />
SDDM works with a fingerprint reader when using [[fprint]]. After installing fprint and adding fingerprint signatures, add the line {{ic|auth sufficient pam_fprintd.so}} at the beginning of {{ic|/etc/pam.d/sddm}}.<br />
<br />
{{Tip|To make it work in KDE's lock screen, also add the same line at the beginning of {{ic|/etc/pam.d/kde}}.}}<br />
<br />
If you now press enter in the empty password field, the fingerprint reader should start working.<br />
<br />
== Troubleshooting ==<br />
<br />
=== Blank screen with cursor, but no greeter shows ===<br />
<br />
Check your disk space with {{ic|df -h}}. If no available space, greeter will crash.<br />
<br />
=== Long load time before SDDM shows the greeter ===<br />
<br />
A low entropy pool can cause long SDDM load time ([https://github.com/sddm/sddm/issues/1036 Bug report]). See [[Random number generation]] for suggestions to increase the entropy pool.<br />
<br />
=== Hangs after login ===<br />
<br />
Try removing {{ic|~/.Xauthority}} and logging in again without rebooting. Rebooting without logging in creates the file again and the problem will persist.<br />
<br />
=== SDDM starts on tty1 instead of tty7 ===<br />
<br />
SDDM follows the [http://0pointer.de/blog/projects/serial-console.html systemd convention] of starting the first graphical session on tty1. If you prefer the old convention where tty1 through tty6 are reserved for text consoles, change the default value of {{ic|MinimumVT}} variable, which comes under the {{ic|[X11]}} section:<br />
<br />
{{hc|/etc/sddm.conf.d/tty.conf|2=<br />
[X11]<br />
MinimumVT=7<br />
}}<br />
<br />
=== One or more users do not show up on the greeter ===<br />
<br />
{{Warning|Users set with a lower or higher {{ic|UID}} range should generally not be exposed to a [[Display manager]].}}<br />
<br />
SDDM only displays users with a UID in the range of 1000 to 65000 by default, if the UIDs of the desired users are below this value then you will have to modify this range. For example, for a UID of 501, say:<br />
<br />
{{hc|/etc/sddm.conf.d/uid.conf|2=<br />
[Users]<br />
HideShells=/sbin/nologin,/bin/false<br />
# Hidden users, this is if any system users fall within your range, see /etc/passwd on your system.<br />
HideUsers=git,sddm,systemd-journal-remote,systemd-journal-upload<br />
<br />
# Maximum user id for displayed users<br />
MaximumUid=65000<br />
<br />
# Minimum user id for displayed users<br />
MinimumUid=500 #My UID is 501<br />
}}<br />
<br />
=== SDDM loads only US keyboard layout ===<br />
<br />
SDDM loads the keyboard layout specified in {{ic|/etc/X11/xorg.conf.d/00-keyboard.conf}}. You can generate this configuration file by {{ic|localectl set-x11-keymap}} command. See [[Keyboard configuration in Xorg]] for more information.<br />
<br />
SDDM may also incorrectly display the layout as US but will immediately change to the correct layout after you start typing your password [https://github.com/sddm/sddm/issues/202#issuecomment-76001543]. This seems to not be a bug in SDDM but in {{Pkg|libxcb}} (version 1.13-1 as of 2018) [https://github.com/sddm/sddm/issues/202#issuecomment-133628462].<br />
<br />
=== Screen resolution is too low ===<br />
<br />
Issue may be caused by HiDPI usage for monitors with corrupted [[Wikipedia:Extended Display Identification Data|EDID]] [https://github.com/sddm/sddm/issues/692]. If you have [[#Enable HiDPI|enabled HiDPI]], try to disable it.<br />
<br />
If even the above fails, you can try setting your screen size in a Xorg configuration file:<br />
<br />
{{hc|/etc/X11/xorg.conf.d/90-monitor.conf|2=<br />
Section "Monitor"<br />
Identifier "<default monitor>"<br />
DisplaySize 345 194 # in millimeters<br />
EndSection<br />
}}<br />
<br />
=== Long load time on autofs home directory ===<br />
<br />
SDDM by default tries to display avatars of users by accessing {{ic|~/.face.icon}} file. If your home directory is an ''autofs'', for example if you use [[dm-crypt]], this will make it wait for 60 seconds, until autofs reports that the directory cannot be mounted.<br />
<br />
You can disable avatars by editing {{ic|/etc/sddm.conf}}:<br />
<br />
{{hc|/etc/sddm.conf|2=<br />
[Theme]<br />
EnableAvatars=false<br />
}}</div>Goetzchttps://wiki.archlinux.org/index.php?title=Tp_smapi&diff=582065Tp smapi2019-09-12T17:35:38Z<p>Goetzc: make it clear it's only for pre-Ivy Bridge processors</p>
<hr />
<div>{{DISPLAYTITLE:tp_smapi}}<br />
[[Category:Laptops]]<br />
[[Category:Kernel]]<br />
[[ja:tp_smapi]]<br />
''tp_smapi'' is a set of kernel modules that retrieves information from and conveys commands to the hardware of many ThinkPad laptops before [[#Supported laptops|Ivy Bridge processors]].<br />
<br />
This information is presented through the {{ic|/sys/devices/platform/smapi}} filesystem. Much like the {{ic|/proc}} filesystem,<br />
you can read and write information to these files to get information about and send commands to the hardware.<br />
tp_smapi is highly recommended if you're using a supported ThinkPad laptop.<br />
<br />
== Supported laptops ==<br />
<br />
First check whether your laptop is supported. Thinkwiki has a comprehensive [http://www.thinkwiki.org/wiki/Tp_smapi#Model-specific_status list of all supported Thinkpads.]<br />
In case your TP does not support stop_threshold but only start_threshold please go here [[#Workaround for partially supported laptops]] for a decent workaround.<br />
<br />
If you are installing on a recent Thinkpad that has an Ivy Bridge processor or later (any of the {{ic|*30}},<br />
{{ic|*40}} or {{ic|*50}} models), tp_smapi will not work. Use {{Pkg|tpacpi-bat}} or {{AUR|tpacpi-bat-git}}.<br />
<br />
== Installation ==<br />
<br />
[[Install]] the {{Pkg|tp_smapi}} package. For the custom [[linux-ck]] kernel there is {{AUR|tp_smapi-ck}} in the [[AUR]].<br />
<br />
It provides you 3 [[Kernel modules]]:<br />
<br />
{| class="wikitable"<br />
|tp_smapi<br />
|ThinkPad SMAPI Support<br />
|-<br />
|hdaps<br />
|IBM Hard Drive Active Protection System ([[HDAPS]]) driver<br />
|-<br />
|thinkpad_ec<br />
|ThinkPad embedded controller hardware access (tp_smapi and hdaps both depend on it)<br />
|}<br />
<br />
After a reboot, tp_smapi and its dependencies will get autoloaded and the sysfs-interface under {{ic|/sys/devices/platform/smapi}} should be fully functional.<br />
<br />
== Features ==<br />
<br />
Here are a couple of useful things you can do using tp_smapi.<br />
<br />
=== Control battery charging ===<br />
<br />
It's bad for most laptop batteries to hold a full charge for long periods of time. [http://www.thinkwiki.org/wiki/Maintenance#Battery_treatment]<br />
You should try to keep your battery in the 40-80% charged range, unless you need the battery life for extended periods of time.<br />
<br />
==== General way ====<br />
<br />
tp_smapi lets you control the start and stop charging threshold to do just that. Run these commands to set these to good values:<br />
<br />
echo 40 > /sys/devices/platform/smapi/BAT0/start_charge_thresh<br />
echo 80 > /sys/devices/platform/smapi/BAT0/stop_charge_thresh<br />
<br />
This will cause the battery to begin charging when it falls below 40% charge and stop charging once it exceeds 80% charge. This will extend the lifetime of your battery.<br />
<br />
Note that when you remove and re-insert the battery, these thresholds may be reset to their default values.<br />
To work around this, create a script to set these values, and make this script run both at startup and when a battery is inserted.<br />
More specific instructions follow.<br />
<br />
Create a script {{ic|/usr/sbin/set_battery_thresholds}}:<br />
<br />
#!/bin/sh<br />
# set the battery charging thresholds to extend battery lifespan<br />
echo ${2:-40} > /sys/devices/platform/smapi/BAT${1:-0}/start_charge_thresh<br />
echo ${3:-80} > /sys/devices/platform/smapi/BAT${1:-0}/stop_charge_thresh<br />
<br />
Make it [[executable]]. With this script to set a battery threshold is very simple,<br />
just type (if set_bat_thresh is the name of the script):<br />
<br />
set_battery_thresholds 0 96 100<br />
<br />
Or run it with no arguments to default to BAT0, and thresholds of 40% and 80%.<br />
<br />
Let [[systemd]] execute the script at startup (Using rc.local from initscripts is deprecated).<br />
Thus, create {{ic|/etc/systemd/system/tp_smapi_set_battery_thresholds.service}}:<br />
<br />
[Unit]<br />
Description=Set Battery Charge Thresholds by tp_smapi<br />
<br />
[Service]<br />
Type=oneshot<br />
ExecStart=/usr/sbin/set_battery_thresholds<br />
RemainAfterExit=yes<br />
<br />
[Install]<br />
WantedBy=multi-user.target<br />
<br />
Enable it in systemd:<br />
<br />
# systemctl enable tp_smapi_set_battery_thresholds.service<br />
<br />
You can also make it run when a battery is inserted. This requires that [[acpid]] is installed and running. Edit {{ic|/etc/acpi/handler.sh}}:<br />
<br />
#... other ACPI stuff<br />
battery)<br />
case "$2" in<br />
BAT0)<br />
case "$4" in<br />
00000000)<br />
;;<br />
00000001)<br />
'''/usr/sbin/set_battery_thresholds'''<br />
;;<br />
#... more ACPI stuff<br />
<br />
==== Check whether settings were accepted ====<br />
<br />
To check whether your settings were accepted check the output of the following:<br />
<br />
cat /sys/devices/platform/smapi/BAT0/start_charge_thresh<br />
cat /sys/devices/platform/smapi/BAT0/stop_charge_thresh<br />
<br />
=== Protect the hard disk from drops ===<br />
<br />
tp_smapi includes a driver to read the accelerometer in your laptop to detect drops and other events that<br />
could cause damage to your hard drive. See the [[HDAPS]] page for more information on this useful feature.<br />
<br />
== Workaround for partially supported laptops ==<br />
<br />
For partially supported laptops you can still gain control over your battery.<br />
First check what is actually supported:<br />
<br />
cat /sys/devices/platform/smapi/BAT0/start_charge_thresh<br />
cat /sys/devices/platform/smapi/BAT0/stop_charge_thresh<br />
<br />
If start-charge_thresh is supported but not stop_charge_thresh but you still<br />
want to have your computer stop charging your battery you might have other options.<br />
<br />
Note: None of the first two options works on T42p. The third one works on E540.<br />
<br />
=== 1st option, custom script ===<br />
<br />
* create the script {{ic|/usr/sbin/set_battery_thresholds}} as above <br />
* copy the original {{ic|/etc/acpi/handler.sh}} to {{ic|/etc/acpi/handler.sh.start}}<br />
* edit {{ic|/etc/acpi/handler.sh}} as above and copy it to {{ic|/etc/acpi/handler.sh.stop}}<br />
<br />
Now copy the following script, make it executable, adjust the values<br />
to your liking and run it every couple of minutes as a root cron.<br />
<br />
#!/bin/bash<br />
<br />
CURRENTCHARGE=$(acpitool -b | cut -d, -f2 | cut -d. -f1 | cut -b2-)<br />
<br />
if [ $CURRENTCHARGE -gt 80 ]; then<br />
cp /etc/acpi/handler.sh.stop /etc/acpi/handler.sh<br />
echo 99 > /sys/devices/platform/smapi/BAT0/start_charge_thresh<br />
exit 0<br />
fi<br />
if [ $CURRENTCHARGE -lt 60 ]; then<br />
cp /etc/acpi/handler.sh.start /etc/acpi/handler.sh <br />
echo 0 > /sys/devices/platform/smapi/BAT0/start_charge_thresh<br />
exit 0 <br />
fi<br />
<br />
exit 0<br />
<br />
=== 2nd option, tpacpi-bat ===<br />
<br />
To control the battery charging thresholds, install the Perl script {{Pkg|tpacpi-bat}} or {{AUR|tpacpi-bat-git}} from the AUR.<br />
<br />
Manually set the thresholds by calling<br />
<br />
tpacpi-bat -v -s startThreshold 0 40<br />
tpacpi-bat -v -s stopThreshold 0 80<br />
<br />
The example values 40 and 80 given here are in percent of the full battery capacity. Adjust them to your own needs.<br />
You may also want to add these lines to /etc/rc.local to set the at startup.<br />
<br />
The manual setting of thresholds via the command {{ic|tpacpi-bat}} is not permanent. To set the thresholds permanently,<br />
edit the start and end thresholds accordingly in {{ic|/etc/conf.d/tpacpi}}.<br />
<br />
{{Note|See tpacpi-bat help for the list of commands: {{ic|perl /usr/lib/perl5/vendor_perl/tpacpi-bat -h}}.}}<br />
<br />
=== 3rd option, in kernel ===<br />
<br />
Kernel 4.17 added the option to adjust battery charging thresholds for ThinkPads directly.<br />
<br />
echo 60 > /sys/class/power_supply/BAT0/charge_stop_threshold<br />
echo 40 > /sys/class/power_supply/BAT0/charge_start_threshold<br />
<br />
Note that if you try to display the values, you'll get only the last one set (start in the example), with 128 added<br />
to it. This is a known issue, but the true value is really set, as you can see from battery behaviour.<br />
Other interesting parameters can be found under {{ic|/sys/class/power_supply/BAT0/}}.<br />
<br />
== See also ==<br />
* [http://www.thinkwiki.org/wiki/Tp_smapi tp_smapi on ThinkWiki]</div>Goetzchttps://wiki.archlinux.org/index.php?title=Dmenu&diff=582060Dmenu2019-09-12T16:25:24Z<p>Goetzc: /* Displaying Custom Items */ improve description</p>
<hr />
<div>{{DISPLAYTITLE:dmenu}}<br />
[[Category:Application launchers]]<br />
[[Category:Suckless]]<br />
[[da:Dmenu]]<br />
[[es:Dmenu]]<br />
[[fr:Dmenu]]<br />
[[ja:Dmenu]]<br />
[[zh-hans:Dmenu]]<br />
{{Related articles start}}<br />
{{Related|List of applications/Other#Application launchers}}<br />
{{Related articles end}}<br />
<br />
[http://tools.suckless.org/dmenu dmenu] is a fast and lightweight dynamic menu for X. It reads arbitrary text from stdin, and creates a menu with one item for each line. The user can then select an item, through the arrow keys or typing a part of the name, and the line is printed to stdout. ''dmenu_run'' is a wrapper that ships with the dmenu distribution that allows its use as an application launcher.<br />
<br />
== Installation ==<br />
<br />
[[Install]] the {{Pkg|dmenu}} package, or {{AUR|dmenu-git}} for the development version.<br />
<br />
Various patched variants exist which extend dmenu's default functionality. Consider installing one of the following packages from the [[AUR]]:<br />
<br />
* {{AUR|dmenu2}}: dmenu fork with many useful patches applied and additional capabilities added including dimming, specifying a custom opacity, and underlining.<br />
<br />
You may run ''dmenu'' with:<br />
<br />
$ dmenu_run<br />
<br />
== Configuration ==<br />
<br />
Now, you will want to attach the {{Ic|dmenu_run}} command to a keystroke combination. This can be done either via your window manager or desktop environment configuration, or with a program like {{Pkg|xbindkeys}}. See the [[Hotkeys]] article for more information.<br />
<br />
=== Displaying Custom Items ===<br />
Custom items will be shown by separating them with a new line (''\n'') and piping them into ''dmenu''. For example:<br />
<br />
$ echo -e "first\nsecond\nthird" | dmenu<br />
<br />
=== Manually Adding Items ===<br />
''dmenu'' will look for executables in the directories defined in your {{ic|$PATH}}. For information on modifying your {{ic|$PATH}} see [[environment variables]].<br />
<br />
=== Fonts ===<br />
<br />
{{Out of date|Since dmenu 4.6 XFT font rendering is enabled by default: [http://lists.suckless.org/dev/1511/27503.html 4.6 Release Notes]. Specifying fonts via [[wikipedia:XLFD|X logical font description]] does not work anymore. Instead {{Pkg|fontconfig}}'s [http://www.freedesktop.org/software/fontconfig/fontconfig-user.html font.conf syntax] is used.}}<br />
<br />
''dmenu'' can display fonts using the [[wikipedia:XLFD|X logical font description]] as found using the tool ''xfontsel'', which is provided by {{Pkg|xorg-xfontsel}}. This example will run dmenu using the {{Pkg|terminus-font}}:<br />
<br />
$ dmenu_run -fn "-xos4-terminus-medium-r-*-*-14-*"<br />
<br />
The syntax is similar if using a ''dmenu'' variant patched with XFT support.<br />
<br />
$ dmenu_run -fn 'Droid Sans Mono-9'<br />
<br />
=== Support for shell aliases ===<br />
''dmenu'' does not support [[Bash#Aliases|shell aliases]]. To have ''dmenu'' recognize your aliases, [[install]] the {{AUR|dmenu-recent-aliases}}{{Broken package link|{{aur-mirror|dmenu-recent-aliases}}}} package from the [[AUR]] and run {{ic|dmenu_run_aliases}}. Your aliases must be in either {{ic|~/.bash_aliases}} or {{ic|~/.zsh_aliases}} to be recognized by ''dmenu_run_aliases''.<br />
<br />
== Troubleshooting ==<br />
<br />
=== No locale support ===<br />
<br />
Running ''dmenu_run'' results in the following error message:<br />
<br />
{{hc|$ dmenu_run|<br />
no locale support<br />
}}<br />
<br />
Make sure that the environment variable {{ic|LANG}} is correctly set. See the following for more information: [[Locale#Troubleshooting]]<br />
<br />
=== Missing menu entries ===<br />
<br />
If certain entries are missing from ''dmenu'', the cache may be malformed. Delete it and restart ''dmenu''.<br />
$ rm ~/.dmenu_cache<br />
$ rm ~/.cache/dmenu_run<br />
Note that there will most likely be only one cache file, depending on if {{ic|$XDG_CACHE_HOME}} is set. See the contents of {{ic|/usr/bin/dmenu_run}} for more information.<br />
<br />
=== Environment Variables ===<br />
<br />
Environment variables needed for applications should instead be added to {{ic|/etc/environment}}.<br />
<br />
=== Current window loses focus ===<br />
<br />
A [https://git.suckless.org/dmenu/commit/db6093f6ec1bb884f7540f2512935b5254750b30.html bug] in dmenu 4.9 causes the current window to lose focus when dmenu is opened and to not regain focus when it is closed. It can also happen that a newly launched program is does not gain focus. You can fix this by downgrading to dmenu 4.8. See [https://github.com/i3/i3/issues/3528 this] ticket for a discussion.<br />
<br />
== See also ==<br />
* [http://tools.suckless.org/dmenu dmenu] &ndash; The official dmenu website<br />
* [https://bbs.archlinux.org/viewtopic.php?id=80145 Dmenu Hacking thread ] &ndash; Dmenu hacking thread in arch linux forums. An overview of scripts is provided in the [https://github.com/orschiro/dmenu-scripts-collection dmenu_scripts collection].</div>Goetzchttps://wiki.archlinux.org/index.php?title=Sway&diff=581735Sway2019-09-07T16:36:36Z<p>Goetzc: /* From a display manager */ link another option (systemd user service) from the sway wiki.</p>
<hr />
<div>[[Category:Tiling WMs]]<br />
[[Category:Dynamic WMs]]<br />
[[ja:Sway]]<br />
''sway'' is a compositor for [[Wayland]] designed to be fully compatible with [[i3]]. According to [https://swaywm.org the official website]:<br />
:Sway is a tiling Wayland compositor and a drop-in replacement for the i3 window manager for X11. It works with your existing i3 configuration and supports most of i3's features, plus a few extras.<br />
<br />
== Installation ==<br />
<br />
''sway'' can be [[install]]ed with the {{Pkg|sway}} package. The development version can be installed using {{AUR|wlroots-git}} and {{AUR|sway-git}}. It's advisable to always update ''wlroots'' when you update ''sway'', due to tight dependencies.<br />
<br />
You may also install {{Pkg|swaylock}} and {{Pkg|swayidle}} to lock your screen and set up an idle manager.<br />
<br />
== Starting ==<br />
<br />
{{Tip|See [[Wayland#GUI libraries]] for appropriate environment variables to set for window decoration libraries.}}<br />
<br />
=== From a TTY ===<br />
<br />
To start Sway, simply type ''sway'' from a TTY.<br />
<br />
=== From a display manager ===<br />
<br />
{{Note|Sway does not support display managers officially.[https://github.com/swaywm/sway/pull/3634#issuecomment-462779163]}}<br />
<br />
The sway session is located at {{ic|/usr/share/wayland-sessions/sway.desktop}}. It is automatically recognized by modern display managers like [[GDM]] and [[SDDM]].<br />
<br />
It is also possible to start sway as a [https://github.com/swaywm/sway/wiki/Systemd-integration#running-sway-itself-as-a---user-service systemd user service] through the display manager.<br />
<br />
Also you can use text-based session manager, see [[Display manager#Console]].<br />
<br />
== Configuration ==<br />
<br />
If you already use i3, then copy your i3 configuration to {{ic|~/.config/sway/config}} and it should work out of the box. Otherwise, copy the sample configuration file to {{ic|~/.config/sway/config}}. It is located at {{ic|/etc/sway/config}}, unless the {{ic|DFALLBACK_CONFIG_DIR}} flag has been set. See {{man|5|sway}} for information on the configuration.<br />
<br />
=== Keymap ===<br />
<br />
By default, sway starts with the US QWERTY keymap. To configure per-input:<br />
<br />
{{hc|~/.config/sway/config|<nowiki><br />
input * xkb_layout "us,de,ru"<br />
input * xkb_variant "colemak,,typewriter"<br />
input * xkb_options "grp:win_space_toggle"<br />
input "MANUFACTURER1 Keyboard" xkb_model "pc101"<br />
input "MANUFACTURER2 Keyboard" xkb_model "jp106"<br />
</nowiki>}}<br />
<br />
More details are available in {{man|7|xkeyboard-config}} and {{man|5|sway-input}}.<br />
<br />
The keymap can also be configured using environment variables ({{ic|XKB_DEFAULT_LAYOUT}}, {{ic|XKB_DEFAULT_VARIANT}}, etc.) when starting sway.<br />
<br />
=== Statusbar ===<br />
<br />
Installing the program {{Pkg|i3status}} is an easy way to get a practical, default statusline. All one has to do is add following snippet at the end of your sway config:<br />
<br />
{{hc|~/.config/sway/config|<nowiki><br />
bar {<br />
status_command i3status<br />
}<br />
</nowiki>}}<br />
<br />
If you want to achieve colored output of i3status, you can adjust following part in the i3status configuration:<br />
<br />
{{hc|~/.config/i3status/config|<nowiki><br />
general {<br />
colors = true<br />
interval = 5<br />
}<br />
</nowiki>}}<br />
<br />
In both examples, the system-wide installed configuration files has been copied over to the user directory and then modified. <br />
<br />
{{Tip|{{Pkg|waybar}} is an alternative to the bar included with sway (swaybar).}}<br />
<br />
=== Wallpaper ===<br />
<br />
Since release 1.1.1 the wallpaper part of the SwayWM project was moved to {{Pkg|swaybg}}, which is needed in order to run the output command.<br />
<br />
This line, which can be appended at the end of your sway configuration, sets a background image on all displays (output matches all with name {{ic|"*"}}):<br />
<br />
{{hc|~/.config/sway/config|<nowiki><br />
output "*" bg /home/onny/pictures/fredwang_norway.jpg fill<br />
</nowiki>}}<br />
<br />
Of course you have to replace the file name and path according to your wallpaper.<br />
<br />
=== Input devices ===<br />
<br />
Its possible to tweak specific input device configurations. For example to enable tap-to-click and natural scolling for a touchpad, add an input block:<br />
<br />
{{hc|~/.config/sway/config|<nowiki><br />
input "2:14:ETPS/2_Elantech_Touchpad" {<br />
tap enabled<br />
natural_scroll enabled<br />
}<br />
</nowiki>}}<br />
<br />
Where as the device identifier can be queried with:<br />
<br />
$ swaymsg -t get_inputs<br />
<br />
The output from the command, sometimes has a "\" to escape symbols like "/" (ie {{ic|"2:14:ETPS\/2_Elantech_Touchpad"}}) and it needs to be removed.<br />
<br />
More documentation and options like acceleration profiles can be found in {{man|5|sway-input}}.<br />
<br />
=== HiDPI ===<br />
<br />
Set your displays scale factor with the {{ic|output}} command in your config file. The scale factor can be fractional, but it is usually 2 for HiDPI screens.<br />
<br />
output <name> scale <factor><br />
<br />
You can find your display name with the following command:<br />
<br />
$ swaymsg -t get_outputs<br />
<br />
=== Custom keybindings ===<br />
<br />
[[Extra keyboard keys|Special keys]] on your keyboard can be used to execute commands, for example to control your volume or your monitor brightness:<br />
<br />
{{hc|~/.config/sway/config|<nowiki><br />
bindsym XF86AudioRaiseVolume exec pactl set-sink-volume @DEFAULT_SINK@ +5%<br />
bindsym XF86AudioLowerVolume exec pactl set-sink-volume @DEFAULT_SINK@ -5%<br />
bindsym XF86AudioMute exec pactl set-sink-mute @DEFAULT_SINK@ toggle<br />
bindsym XF86AudioMicMute exec pactl set-source-mute @DEFAULT_SOURCE@ toggle<br />
bindsym XF86MonBrightnessDown exec brightnessctl set 5%-<br />
bindsym XF86MonBrightnessUp exec brightnessctl set +5%<br />
</nowiki>}}<br />
<br />
To control brightness you can use {{Pkg|brightnessctl}} or {{Pkg|light}}. For a list of utilities to control brightness and color correction see [[Backlight]].<br />
<br />
=== Xresources ===<br />
<br />
Copy {{ic|~/.Xresources}} to {{ic|~/.Xdefaults}} to use them in Sway.<br />
<br />
=== Run programs natively under Wayland (without Xwayland support) ===<br />
<br />
{{Accuracy|{{ic|xwayland disable}} is not necessary to run programs natively under Wayland, configuring the [[Wayland#GUI libraries|GUI libraries]] appropriately is enough. Keeping XWayland enabled is good for programs that don't work otherwise.}}<br />
<br />
First, be sure the toolkit or library of every program that is and will be installed [[Wayland#GUI_libraries|support Wayland]]. Then append the following line to your sway configuration file to disable Xwayland support:<br />
<br />
{{hc|~/.config/sway/config|<nowiki><br />
xwayland disable<br />
</nowiki>}}<br />
<br />
{{ Note| Some programs, like [[Firefox#Wayland|Firefox]], [[#Application launchers|bemenu]] or [[Wayland#Qt_5|Qt5]] based programs, also need specific environment variables set for them to run natively under Wayland. }}<br />
{{ Note| In a fresh Sway install, you need to change the default menu and terminal applications because they depend on Xwayland. }}<br />
<br />
== Tips and tricks ==<br />
<br />
=== Autostart on login ===<br />
<br />
To start sway from tty1 on login with default US keyboard, edit:<br />
<br />
{{hc|~/.bash_profile|<br />
<nowiki>if [[ -z $DISPLAY ]] && [[ $(tty) = /dev/tty1 ]]; then<br />
XKB_DEFAULT_LAYOUT=us exec sway<br />
fi</nowiki><br />
}}<br />
<br />
=== Backlight toggle ===<br />
<br />
To turn off (and on) your displays with a key (e.g. {{ic|Pause}}) bind the following in your Sway {{ic|config}}:<br />
<br />
#!/usr/bin/dash<br />
read lcd < /tmp/lcd<br />
if [ "$lcd" -eq "0" ]; then<br />
swaymsg "output * dpms on"<br />
echo 1 > /tmp/lcd<br />
else<br />
swaymsg "output * dpms off"<br />
echo 0 > /tmp/lcd<br />
fi<br />
<br />
=== Screen capture ===<br />
<br />
Capturing the screen can be done using {{Pkg|grim}} or {{AUR|swayshot}} for screenshots and {{AUR|wf-recorder-git}} for video. Optionally, {{Pkg|slurp}} can be used to select the part of the screen to capture.<br />
<br />
Take a screenshot of the whole screen:<br />
<br />
$ grim screenshot.png<br />
<br />
Take a screenshot of a part of the screen:<br />
<br />
$ grim -g "$(slurp)" screenshot.png<br />
<br />
Capture a video of the whole screen:<br />
<br />
$ wf-recorder -o recording.mp4<br />
<br />
Capture a video of a part of the screen:<br />
<br />
$ wf-recorder -g "$(slurp)"<br />
<br />
Example of usage with {{Pkg|grim}}, {{Pkg|slurp}} and {{Pkg|wl-clipboard}}, screenshot directly with Print button to clipboard. <br />
{{hc|~/.config/sway/config|<br />
<nowiki>bindsym --release Print exec grim -g \"$(slurp)" - | wl-copy</nowiki><br />
}}<br />
<br />
=== Control swaynag with the keyboard ===<br />
<br />
Swaynag, the default warning/prompt program shipped with sway, only supports user interaction with the mouse. A helper program such as {{AUR|swaynagmode}} may be used to enable interaction via keyboard shortcuts.<br />
<br />
Swaynagmode works by first launching swaynag, then listening for signals which trigger actions such as selecting the next button, dismissing the prompt, or accepting the selected button. These signals are sent by launching another instance of the swaynagmode script itself with a control argument, such as {{ic|swaynagmode --select right}} or {{ic|swaynagmode --confirm}}. <br />
<br />
Swaynagmode by default triggers the sway mode {{ic|nag}} upon initialization, followed by {{ic|default}} on exit. This makes it easy to define keybindings in your sway configuration:<br />
<br />
{{hc|~/.config/sway/config|<br />
set $nag exec swaynagmode<br />
mode "nag" {<br />
bindsym {<br />
Ctrl+d mode "Default"<br />
<br />
Ctrl+c $nag --exit<br />
q $nag --exit<br />
Escape $nag --exit<br />
<br />
Return $nag --confirm<br />
<br />
Tab $nag --select prev<br />
Shift+Tab $nag --select next<br />
<br />
Left $nag --select next<br />
Right $nag --select prev<br />
<br />
Up $nag --select next<br />
Down $nag --select prev<br />
}<br />
}<br />
}}<br />
<br />
You can configure sway to use swaynagmode with the configuration command {{ic|swaynag_command swaynagmode}}.<br />
<br />
== Troubleshooting ==<br />
<br />
=== Application launchers ===<br />
<br />
i3-dmenu-desktop, {{Pkg|dmenu}}, and {{Pkg|rofi}} all function relatively well in Sway, but all run under XWayland and suffer from the same issue where they can become unresponsive if the cursor is moved to a native Wayland window. The reason for this issue is that Wayland clients/windows do not have access to input devices unless they have focus of the screen. The XWayland server is itself a client to the Wayland compositor, so one of its XWayland clients must have focus for it to access user input. However, once one of its clients has focus, it can gather input and make it available to all XWayland clients through the X11 protocol. Hence, moving the cursor to an XWayland window and pressing Escape should fix the issue, and sometimes running {{ic|pkill}} does too.<br />
<br />
{{Pkg|bemenu}} is a native Wayland dmenu replacement which can optionally be combined with {{AUR|j4-dmenu-desktop}} to provide a Wayland-native combination for launching desktop files (as i3-dmenu-desktop does):<br />
<br />
j4-dmenu-desktop --dmenu='bemenu -i --nb "#3f3f3f" --nf "#dcdccc" --fn "pango:DejaVu Sans Mono 12"' --term='termite'<br />
<br />
You may need to set {{ic|BEMENU_BACKEND}} environment variable to "wayland" if you choose not to disable XWayland.<br />
<br />
You can also build your own with a floating terminal and fzf as discussed in a [https://github.com/swaywm/sway/issues/1367 GitHub issue].<br />
<br />
=== VirtualBox ===<br />
<br />
Sway doesn't work well (or at all) under [[VirtualBox]].<br />
<br />
=== Sway socket not detected ===<br />
<br />
Using a {{ic|swaymsg}} argument, such as {{ic|swaymsg -t get_outputs}}, will sometimes return the message:<br />
<br />
sway socket not detected.<br />
ERROR: Unable to connect to<br />
<br />
when run inside a terminal multiplexer (such as gnu screen or tmux). This means {{ic|swaymsg}} could not connect to the socket provided in your {{ic|SWAYSOCK}}.<br />
<br />
To view what the current value of {{ic|SWAYSOCK}} is, type:<br />
<br />
$ env | fgrep SWAYSOCK<br />
SWAYSOCK=/run/user/1000/sway-ipc.1000.4981.sock<br />
<br />
To work around this problem, you may try attaching to a socket based on the running sway process:<br />
<br />
$ export SWAYSOCK=/run/user/$(id -u)/sway-ipc.$(id -u).$(pgrep -x sway).sock<br />
<br />
To avoid this error, run the command outside of a multiplexer.<br />
<br />
=== Unable to retrieve socket path ===<br />
<br />
Requesting messages from {{ic|swaymsg -t}} on a tty may return the following message:<br />
<br />
Unable to retrieve socket path<br />
<br />
{{ic|SWAYSOCK}} environment variable is set after launching Sway, therefore a workaround to this error is to request {{ic|swaymsg -t [message]}} in a terminal inside Sway.<br />
<br />
=== Keybindings and keyboard layouts ===<br />
<br />
By default, if you are using more than one keyboard layout, e.g. {{ic|<nowiki>input * xkb_layout "us,ru"</nowiki>}}, bindings may become broken when you switch on some secondary layout.<br />
<br />
Thanks to https://github.com/swaywm/sway/pull/3058, all you need is to add {{ic|--to-code}} key to sensitive {{ic|bindsym}} lines like this:<br />
{{bc|<nowiki><br />
bindsym --to-code {<br />
$mod+$left focus left<br />
$mod+$down focus down<br />
$mod+$up focus up<br />
$mod+$right focus right<br />
}</nowiki><br />
}}<br />
<br />
=== Java applications ===<br />
<br />
Some Java-based applications will display blank screen when opened, for example any Intellij editor. To mitigate this, the application can be started with the {{ic|_JAVA_AWT_WM_NONREPARENTING}} environment variable set to 1.<br />
<br />
If you start the application from a launcher like {{Pkg|rofi}} or {{Pkg|dmenu}}, you might want to modify the application desktop entry as shown in [[Desktop_entries#Modify_environment_variables]].<br />
<br />
== See also ==<br />
<br />
* [https://github.com/swaywm/sway GitHub project]<br />
* [https://github.com/swaywm/sway/wiki Sway official wiki]<br />
* [https://git.sr.ht/~sircmpwn/sway sr.ht git page]<br />
* [https://swaywm.org Website]<br />
* [https://drewdevault.com/2019/03/11/Sway-1.0-released.html Announcing the release of sway 1.0]</div>Goetzchttps://wiki.archlinux.org/index.php?title=Talk:Lenovo_ThinkPad_X1_Carbon_(Gen_7)&diff=581674Talk:Lenovo ThinkPad X1 Carbon (Gen 7)2019-09-06T14:25:55Z<p>Goetzc: /* Microphone */ information about the future fix</p>
<hr />
<div>== <s>Thermald instructions</s> ==<br />
<br />
Thermald won't work correctly without also running <br />
dptfxtract<br />
as root. Also, it's unclear whether thermald fixed the throttling issue; I'm still getting output from dmesg riddled with temp errors on a normal boot like this:<br />
[ 12.013021] mce: CPU7: Core temperature above threshold, cpu clock throttled (total events = 1)<br />
[ 12.013022] mce: CPU0: Package temperature above threshold, cpu clock throttled (total events = 1)<br />
[ 12.013023] mce: CPU6: Package temperature above threshold, cpu clock throttled (total events = 1)<br />
[ 12.013024] mce: CPU3: Core temperature above threshold, cpu clock throttled (total events = 1)<br />
[ 12.013024] mce: CPU1: Package temperature above threshold, cpu clock throttled (total events = 1)<br />
[ 12.013025] mce: CPU5: Package temperature above threshold, cpu clock throttled (total events = 1)<br />
[ 12.013026] mce: CPU2: Package temperature above threshold, cpu clock throttled (total events = 1)<br />
[ 12.013026] mce: CPU4: Package temperature above threshold, cpu clock throttled (total events = 1)<br />
[ 12.013027] mce: CPU3: Package temperature above threshold, cpu clock throttled (total events = 1) <br />
[ 12.013028] mce: CPU7: Package temperature above threshold, cpu clock throttled (total events = 1)<br />
<br />
And while running some benchmarks my cpu temp stayed even lower than before (69°, vs 83°). There's probably additional config required for thermald. I will try to look into it soon. [[User:Wrycode|wrycode]] ([[User talk:Wrycode|talk]]) 04:04, 9 August 2019 (UTC)<br />
<br />
Same problem as the guy above dptfxtract gives 63 degrees actually because it is not yet compatible with current linux version (5.2) but will only be working at 5.3/5.4 (see the issue I opened on github about X1C7). As thermald would use wrong values of dptfxtract and intel-undervolt is not working either (that's for undervolt, I'm not sure you can increase max temperature with it) I've use throttled which is definitely working why someone said it was replaced by thermald is beyond me. Could he explain us why he said that ? [[User:Nitrobay|Nitrobay]] ([[User talk:Nitrobay|talk]]) 23:09, 16 August 2019 (UTC)<br />
<br />
This is indeed a typo on my part, as I meant [[throttled]] and typed {{aur|thermald}} in haste. My apologies. Initially I was using {{aur|lenovo-throttling-fix-git}} which informed me that the fix was rolled into [[throttled]], which was the reference I had intended to make. My apologies for the confusion. [[User:Johncrist1988|Johncrist1988]] ([[User talk:Johncrist1988|talk]]) 03:06, 20 August 2019 (UTC)<br />
:Great, and thanks for following up Johncrist1988. Marking this section for deletion. [[User:Wrycode|wrycode]] ([[User talk:Wrycode|talk]]) 18:45, 20 August 2019 (UTC)<br />
<br />
== Microphone ==<br />
Did you get your microphone to work neither alsamixer or pavucontrol seem to detect a microphone. ? [[User:Nitrobay|Nitrobay]] ([[User talk:Nitrobay|talk]]) 11:38, 17 August 2019 (UTC)<br />
: I can confirm using [[Advanced_Linux_Sound_Architecture/Troubleshooting#Microphone|this test]], only externally connected microphones work. — [[User:goetzc|goetzc]] ([[User talk:goetzc|wanna talk?]]) 14:24, 17 August 2019 (UTC)<br />
: Looks like Linux kernel 5.3 will include the [https://thesofproject.github.io/latest/index.html SOF firmware update] with the fix for the microphone. — [[User:goetzc|goetzc]] ([[User talk:goetzc|wanna talk?]]) 14:25, 6 September 2019 (UTC)<br />
<br />
== Disabling red LED in Thinkpad logo stops ==<br />
<br />
This service doesn't work after a suspend. [[User:Wrycode|wrycode]] ([[User talk:Wrycode|talk]]) 15:36, 9 August 2019 (UTC)<br />
<br />
== Volume Controls ==<br />
<br />
The section [[Lenovo_ThinkPad_X1_Carbon_(Gen_7)#Volume_Controls|Volume Controls]] fixes the quite/loud volume control, but seems <s>to disable</s> (they are already disabled) the two top-firing speakers, only the two bottom-firing sub-woofers are enabled. --[[User:Goetzc|Goetzc]] ([[User talk:Goetzc|talk]]) 17:12, 9 August 2019 (UTC)<br />
: So this seems to fix the volume control indeed, but the top-firing speakers were already and are still muted, might be a driver bug, but a workaround from another Dolby Atmos laptop might work here. --[[User:Goetzc|Goetzc]] ([[User talk:Goetzc|talk]]) 17:32, 9 August 2019 (UTC)<br />
:: Did you remember to run alsamixer from {{Pkg|alsa-utils}} after installation and turn on/equalize all of the speakers? Mine (top and bottom) are working fine. [[User:Wrycode|wrycode]] ([[User talk:Wrycode|talk]]) 03:54, 13 August 2019 (UTC)<br />
::: You are correct Wrycode, thanks! The "''Master''" volume was low, rising it to 100% makes the top speakers work as expected :) Will add this to the section. <br />
::: Do you happen to know how to make this change (setting the "''Element Master''") so that it's not done on the system {{ic|analog-output.conf.common}} file, and thus the change survives when PulseAudio package is updated? — [[User:goetzc|goetzc]] ([[User talk:goetzc|wanna talk?]])<br />
:::: I did some digging around and I can't find a way to do this. Pulseaudio might not have a user config option for the alsa paths in /usr/. Added the NoUpgrade workaround on the main page. [[User:Wrycode|wrycode]] ([[User talk:Wrycode|talk]]) 02:05, 20 August 2019 (UTC)<br />
<br />
:There is [https://askubuntu.com/a/988993/509340 this interesting] method, which uses 'hdajackretask' from the {{pkg|alsa-tools}} package to remap some pins. The comment is for a different laptop (Asus UX550 using Realtek ALC295), but it exhibits the same issue. We would need to determine the correct pins for this hardware (Realtek ALC285), don't know how, though. — [[User:goetzc|goetzc]] ([[User talk:goetzc|wanna talk?]]) 19:08, 25 August 2019 (UTC)<br />
<br />
== Screen Brightness Function Keys ==<br />
<br />
Is anyone having issues getting the screen brightness function keys working? I had to install [[acpid]] and setup ACPI events and actions to handle it, along with installing the {{Pkg|acpilight}} package. <br />
<br />
My events:<br />
<br />
/etc/acpi/events/FnF5-brightnessdown<br />
# video/brightnessdown BRTDN 00000087 00000000<br />
event=video/brightnessdown<br />
action=xbacklight -dec 3<br />
<br />
/etc/acpi/events/FnF6-brightnessup<br />
# video/brightnessup BRTUP 00000086 00000000<br />
event=video/brightnessup<br />
action=xbacklight -inc 3<br />
<br />
xev doesn't recognise the brightness function keys, so I can't handle the key presses with my window manager. At least that is what I believe, please correct me if I have this all wrong. <br />
[[User:Raybangs|Raybangs]] ([[User talk:Raybangs|talk]]) 10:16, 23 August 2019 (UTC)<br />
<br />
:I didn't have to go through that to get screen brightness going. Can you tell me more about your setup? I'm using Plasma and my brightness controls worked out of the box. [[User:Johncrist1988|Johncrist1988]] ([[User talk:Johncrist1988|talk]]) 14:16, 23 August 2019 (UTC)<br />
<br />
:It works for me also, using {{pkg|brightnessctl}} (as root) or {{pkg|light}} on [[Sway]] or Plasma. — [[User:goetzc|goetzc]] ([[User talk:goetzc|wanna talk?]]) 18:50, 25 August 2019 (UTC)<br />
<br />
:Interesting. I'm using a pretty simple base Arch install with AwesomeWM. I will try {{pkg|brightnessctl}} and see how that goes. {{Unsigned|21:25, 3 September 2019 (UTC)|Raybangs}}<br />
<br />
== UEFI BIOS Update ==<br />
<br />
Currently UEFI BIOS seems to be at [https://pcsupport.lenovo.com/hn/en/products/LAPTOPS-AND-NETBOOKS/THINKPAD-X-SERIES-LAPTOPS/THINKPAD-X1-CARBON-7TH-GEN-TYPE-20QD-20QE/downloads/DS540232 version 1.16]. I am unable to find the .cab file in the link provided, on the [https://fwupd.org/lvfs/devicelist LVFS Device List], nor have had luck with web searches.<br />
<br />
I also followed instructions for [https://wiki.archlinux.org/index.php/Fwupd#Setup_for_UEFI_BIOS_upgrade | UEFI BIOS upgrade from fwupd] on the wiki. Has anyone succeeded in upgrading the firmware to the latest version on Linux? Would using the bootable iso on a USB from the first link work? According the the [https://download.lenovo.com/pccbbs/mobiles/n2hur06w.txt README] it should work (but hesitant to put the iso on USB). [[User:In0ni|In0ni]] ([[User talk:In0ni|talk]]) 22:34, 1 September 2019 (UTC)</div>Goetzc