https://wiki.archlinux.org/api.php?action=feedcontributions&user=Beta990&feedformat=atomArchWiki - User contributions [en]2024-03-29T12:22:29ZUser contributionsMediaWiki 1.41.0https://wiki.archlinux.org/index.php?title=NZBGet&diff=413766NZBGet2015-12-29T12:13:11Z<p>Beta990: /* Running NZBGet under a different user */ chmod 664</p>
<hr />
<div>[[Category:Internet applications]]<br />
[http://www.nzbget.net/ NZBGet] is an Usenet-client written in C++ and designed with performance in mind to achieve maximum download speed by using very little system resources.<br />
<br />
== Installation ==<br />
Install the {{Pkg|nzbget}} package and the optional {{Aur|nzbget-systemd}} that provides a {{ic|nzbget}} [[systemd]] service.<br />
<br />
To install the latest [https://github.com/nzbget/nzbget NZBGet Git] version with a [[systemd]] service file, install {{Aur|nzbget-git}}.<br />
<br />
== Configuring NZBGet ==<br />
Copy the template configuration file to a custom directory:<br />
# cp /usr/share/nzbget/nzbget.conf /var/lib/nzbget/.nzbget<br />
Update the {{ic|/var/lib/nzbget/.nzbget}} config file.<br />
<br />
== Starting NZBGet ==<br />
{{Note|The official {{Pkg|nzbget}} package doesn't provide a systemd service file. You will have to start NZBGet manually instead.}}<br />
* Running as root in console-mode: {{bc|# nzbget -c /var/lib/nzbget/.nzbget -s}}<br />
<br />
* Running as root in daemon-mode: {{bc|# nzbget -c /var/lib/nzbget/.nzbget -D}}<br />
<br />
NZBGet should now be accessible on http://localhost:6789.<br />
<br />
== Running NZBGet under a different user ==<br />
{{Tip|The {{aur|nzbget-git}} and {{aur|nzbget-systemd}} provides already a {{ic|nzbget}} user and group, so there is no need of adding a system user.}}<br />
<br />
For better security it is better to run NZBGet under a [[Users_and_groups#Example_adding_a_system_user|system user]].<br />
<br />
After adding a system user, update the main configuration file using the webinterface or by editing the config file:<br />
{{hc|/var/lib/nzbget/.nzbget|2=<br />
..<br />
DaemonUsername=nzbget # system user<br />
MainDir=/home/user/Downloads/NZBGet<br />
UMask=0022 # 755 for dirs - 644 for files<br />
}}<br />
<br />
It may be necessary to update permissions of the {{ic|/var/lib/nzbget}} directory:<br />
# chown -R nzbget:nzbget /var/lib/nzbget<br />
# chmod 775 /var/lib/nzbget/<br />
# chmod 664 /var/lib/nzbget/.nzbget<br />
<br />
Create and set permissions for the desired directories:<br />
# mkdir /home/myuser/Downloads/NZBGet<br />
# chown -R nzbget:nzbget /home/user/Downloads/NZBGet<br />
# chmod 775 /home/user/Downloads/NZBGet<br />
<br />
The {{ic|/home/user/Downloads/NZBGet}} will be accessible for the user {{ic|nzbget}} and for the {{ic|nzbget}} group. Making the target directory world read/writable is highly discouraged (i.e. do not ''chmod'' the directory to ''777''). Instead, give individual users/groups appropriate permissions to the appropriate directories (e.g. by adding 'yourself' to the {{ic|nzbget}} group).<br />
<br />
Starting NZBGet as user {{ic|nzbget}} in daemon-mode, or start NZBGet by using the {{ic|nzbget.service}} if installed with the {{AUR|nzbget-systemd}} instead:<br />
$ sudo -u nzbget /usr/bin/nzbget -c /var/lib/nzbget/.nzbget -D<br />
<br />
== Troubleshooting ==<br />
<br />
=== Default NZBGet credentials ===<br />
<br />
The default credentials for NZBGet are {{ic|nzbget}} as user and {{ic|tegbzn6789}} as password. For security reasons it is recommended to change the default credentials.<br />
<br />
=== NZBGet crashes on start ===<br />
<br />
This may happen when the user edited the NZBGet configuration by the Web-interface (located at http://localhost:6789), corrupting the configuration-file. Clean-up the configuration-file and restart the server/daemon again.<br />
<br />
== See also ==<br />
*[http://nzbget.net/Documentation NZBGet Documentation]<br />
*[http://nzbget.net/Performance_tips Performance Tips]</div>Beta990https://wiki.archlinux.org/index.php?title=NZBGet&diff=413765NZBGet2015-12-29T12:10:24Z<p>Beta990: Update path to /var/lib.. as instructed by SAKUJ0 (AUR - nzbget-systemd)</p>
<hr />
<div>[[Category:Internet applications]]<br />
[http://www.nzbget.net/ NZBGet] is an Usenet-client written in C++ and designed with performance in mind to achieve maximum download speed by using very little system resources.<br />
<br />
== Installation ==<br />
Install the {{Pkg|nzbget}} package and the optional {{Aur|nzbget-systemd}} that provides a {{ic|nzbget}} [[systemd]] service.<br />
<br />
To install the latest [https://github.com/nzbget/nzbget NZBGet Git] version with a [[systemd]] service file, install {{Aur|nzbget-git}}.<br />
<br />
== Configuring NZBGet ==<br />
Copy the template configuration file to a custom directory:<br />
# cp /usr/share/nzbget/nzbget.conf /var/lib/nzbget/.nzbget<br />
Update the {{ic|/var/lib/nzbget/.nzbget}} config file.<br />
<br />
== Starting NZBGet ==<br />
{{Note|The official {{Pkg|nzbget}} package doesn't provide a systemd service file. You will have to start NZBGet manually instead.}}<br />
* Running as root in console-mode: {{bc|# nzbget -c /var/lib/nzbget/.nzbget -s}}<br />
<br />
* Running as root in daemon-mode: {{bc|# nzbget -c /var/lib/nzbget/.nzbget -D}}<br />
<br />
NZBGet should now be accessible on http://localhost:6789.<br />
<br />
== Running NZBGet under a different user ==<br />
{{Tip|The {{aur|nzbget-git}} and {{aur|nzbget-systemd}} provides already a {{ic|nzbget}} user and group, so there is no need of adding a system user.}}<br />
<br />
For better security it is better to run NZBGet under a [[Users_and_groups#Example_adding_a_system_user|system user]].<br />
<br />
After adding a system user, update the main configuration file using the webinterface or by editing the config file:<br />
{{hc|/var/lib/nzbget/.nzbget|2=<br />
..<br />
DaemonUsername=nzbget # system user<br />
MainDir=/home/user/Downloads/NZBGet<br />
UMask=0022 # 755 for dirs - 644 for files<br />
}}<br />
<br />
It may be necessary to update permissions of the {{ic|/var/lib/nzbget}} directory:<br />
# chown -R nzbget:nzbget /var/lib/nzbget<br />
# chmod -R 755 /var/lib/nzbget<br />
<br />
Create and set permissions for the desired directories:<br />
# mkdir /home/myuser/Downloads/NZBGet<br />
# chown -R nzbget:nzbget /home/user/Downloads/NZBGet<br />
# chmod 775 /home/user/Downloads/NZBGet<br />
<br />
The {{ic|/home/user/Downloads/NZBGet}} will be accessible for the user {{ic|nzbget}} and for the {{ic|nzbget}} group. Making the target directory world read/writable is highly discouraged (i.e. do not ''chmod'' the directory to ''777''). Instead, give individual users/groups appropriate permissions to the appropriate directories (e.g. by adding 'yourself' to the {{ic|nzbget}} group).<br />
<br />
Starting NZBGet as user {{ic|nzbget}} in daemon-mode, or start NZBGet by using the {{ic|nzbget.service}} if installed with the {{AUR|nzbget-systemd}} instead:<br />
$ sudo -u nzbget /usr/bin/nzbget -c /var/lib/nzbget/.nzbget -D<br />
<br />
== Troubleshooting ==<br />
<br />
=== Default NZBGet credentials ===<br />
<br />
The default credentials for NZBGet are {{ic|nzbget}} as user and {{ic|tegbzn6789}} as password. For security reasons it is recommended to change the default credentials.<br />
<br />
=== NZBGet crashes on start ===<br />
<br />
This may happen when the user edited the NZBGet configuration by the Web-interface (located at http://localhost:6789), corrupting the configuration-file. Clean-up the configuration-file and restart the server/daemon again.<br />
<br />
== See also ==<br />
*[http://nzbget.net/Documentation NZBGet Documentation]<br />
*[http://nzbget.net/Performance_tips Performance Tips]</div>Beta990https://wiki.archlinux.org/index.php?title=NZBGet&diff=413472NZBGet2015-12-26T14:47:44Z<p>Beta990: /* Running NZBGet under a different user */ / => and</p>
<hr />
<div>[[Category:Internet applications]]<br />
[http://www.nzbget.net/ NZBGet] is an Usenet-client written in C++ and designed with performance in mind to achieve maximum download speed by using very little system resources.<br />
<br />
== Installation ==<br />
Install the {{Pkg|nzbget}} package and the additional {{Aur|nzbget-systemd}} that provides a {{ic|nzbget}} [[systemd]] service.<br />
<br />
To have the latest [https://github.com/nzbget/nzbget NZBGet Git] version with a [[systemd]] service file, install {{Aur|nzbget-git}} from [[AUR]] instead.<br />
<br />
== Configuring NZBGet ==<br />
Copy the template configuration file to a custom directory:<br />
# cp /usr/share/nzbget/nzbget.conf /etc/nzbget.conf<br />
Update {{ic|/etc/nzbget.conf}} config file before starting {{ic|nzbget}}.<br />
<br />
== Starting NZBGet ==<br />
{{Note|The official {{Pkg|nzbget}} package doesn't provide a systemd service file. You will have to start it manually instead.}}<br />
* Running as root in console-mode: {{bc|# nzbget -c /etc/nzbget.conf -s}}<br />
<br />
* Running as root in daemon-mode: {{bc|# nzbget -c /etc/nzbget.conf -D}}<br />
<br />
NZBGet should now be accessible on http://localhost:6789.<br />
<br />
== Running NZBGet under a different user ==<br />
{{Tip|The {{aur|nzbget-git}} and {{aur|nzbget-systemd}} provides already a {{ic|nzbget}} user and group, so there is no need of adding a system user.}}<br />
<br />
For better security it is better to run NZBGet under a [[Users_and_groups#Example_adding_a_system_user|system user]].<br />
<br />
After adding a system user, update the main configuration file:<br />
{{hc|/etc/nzbget.conf|2=<br />
..<br />
DaemonUsername=nzbget # system user<br />
MainDir=/home/user/Downloads/NZBGet<br />
UMask=0007<br />
}}<br />
<br />
It may be necessary to update permissions of the {{ic|/usr/share/nzbget}} directory:<br />
# chown -R nzbget:nzbget /usr/share/nzbget<br />
# chmod -R 755 /usr/share/nzbget<br />
<br />
Create and set permissions for the desired directories:<br />
# mkdir /home/user/Downloads/NZBGet<br />
# chown -R nzbget:nzbget /home/user/Downloads/NZBGet<br />
# chmod -R 770 /home/user/Downloads/NZBGet<br />
<br />
The {{ic|/home/user/Downloads/NZBGet}} will be accessible for the user {{ic|nzbget}} and for the {{ic|nzbget}} group. Making the target directory world read/writable is highly discouraged (i.e. do not ''chmod'' the directory to ''777''). Instead, give individual users/groups appropriate permissions to the appropriate directories (e.g. by adding 'yourself' to the {{ic|nzbget}} group).<br />
<br />
Starting NZBGet as user {{ic|nzbget}} in daemon-mode:<br />
$ sudo -u nzbget /usr/bin/nzbget -c /etc/nzbget.conf -D<br />
<br />
== Troubleshooting ==<br />
<br />
=== Default NZBGet credentials ===<br />
<br />
The default credentials for NZBGet are {{ic|nzbget}} as user and {{ic|tegbzn6789}} as password. For security reasons it is recommended to change the default credentials.<br />
<br />
=== NZBGet crashes on start ===<br />
<br />
This may happen when the user edited the NZBGet configuration by the Web-interface (located at http://localhost:6789), corrupting the configuration-file. Clean-up the configuration-file and restart the server/daemon again.<br />
<br />
== See also ==<br />
*[http://nzbget.net/Documentation NZBGet Documentation]<br />
*[http://nzbget.net/Performance_tips Performance Tips]</div>Beta990https://wiki.archlinux.org/index.php?title=NZBGet&diff=413471NZBGet2015-12-26T14:47:27Z<p>Beta990: /* Running NZBGet under a different user */ Added nzbget-systemd to Tip</p>
<hr />
<div>[[Category:Internet applications]]<br />
[http://www.nzbget.net/ NZBGet] is an Usenet-client written in C++ and designed with performance in mind to achieve maximum download speed by using very little system resources.<br />
<br />
== Installation ==<br />
Install the {{Pkg|nzbget}} package and the additional {{Aur|nzbget-systemd}} that provides a {{ic|nzbget}} [[systemd]] service.<br />
<br />
To have the latest [https://github.com/nzbget/nzbget NZBGet Git] version with a [[systemd]] service file, install {{Aur|nzbget-git}} from [[AUR]] instead.<br />
<br />
== Configuring NZBGet ==<br />
Copy the template configuration file to a custom directory:<br />
# cp /usr/share/nzbget/nzbget.conf /etc/nzbget.conf<br />
Update {{ic|/etc/nzbget.conf}} config file before starting {{ic|nzbget}}.<br />
<br />
== Starting NZBGet ==<br />
{{Note|The official {{Pkg|nzbget}} package doesn't provide a systemd service file. You will have to start it manually instead.}}<br />
* Running as root in console-mode: {{bc|# nzbget -c /etc/nzbget.conf -s}}<br />
<br />
* Running as root in daemon-mode: {{bc|# nzbget -c /etc/nzbget.conf -D}}<br />
<br />
NZBGet should now be accessible on http://localhost:6789.<br />
<br />
== Running NZBGet under a different user ==<br />
{{Tip|The {{aur|nzbget-git}} and {{aur|nzbget-systemd}} provides already a {{ic|nzbget}} user/group, so there is no need of adding a system user.}}<br />
<br />
For better security it is better to run NZBGet under a [[Users_and_groups#Example_adding_a_system_user|system user]].<br />
<br />
After adding a system user, update the main configuration file:<br />
{{hc|/etc/nzbget.conf|2=<br />
..<br />
DaemonUsername=nzbget # system user<br />
MainDir=/home/user/Downloads/NZBGet<br />
UMask=0007<br />
}}<br />
<br />
It may be necessary to update permissions of the {{ic|/usr/share/nzbget}} directory:<br />
# chown -R nzbget:nzbget /usr/share/nzbget<br />
# chmod -R 755 /usr/share/nzbget<br />
<br />
Create and set permissions for the desired directories:<br />
# mkdir /home/user/Downloads/NZBGet<br />
# chown -R nzbget:nzbget /home/user/Downloads/NZBGet<br />
# chmod -R 770 /home/user/Downloads/NZBGet<br />
<br />
The {{ic|/home/user/Downloads/NZBGet}} will be accessible for the user {{ic|nzbget}} and for the {{ic|nzbget}} group. Making the target directory world read/writable is highly discouraged (i.e. do not ''chmod'' the directory to ''777''). Instead, give individual users/groups appropriate permissions to the appropriate directories (e.g. by adding 'yourself' to the {{ic|nzbget}} group).<br />
<br />
Starting NZBGet as user {{ic|nzbget}} in daemon-mode:<br />
$ sudo -u nzbget /usr/bin/nzbget -c /etc/nzbget.conf -D<br />
<br />
== Troubleshooting ==<br />
<br />
=== Default NZBGet credentials ===<br />
<br />
The default credentials for NZBGet are {{ic|nzbget}} as user and {{ic|tegbzn6789}} as password. For security reasons it is recommended to change the default credentials.<br />
<br />
=== NZBGet crashes on start ===<br />
<br />
This may happen when the user edited the NZBGet configuration by the Web-interface (located at http://localhost:6789), corrupting the configuration-file. Clean-up the configuration-file and restart the server/daemon again.<br />
<br />
== See also ==<br />
*[http://nzbget.net/Documentation NZBGet Documentation]<br />
*[http://nzbget.net/Performance_tips Performance Tips]</div>Beta990https://wiki.archlinux.org/index.php?title=NZBGet&diff=413470NZBGet2015-12-26T14:42:31Z<p>Beta990: /* Installation */ Added nzbget-systemd</p>
<hr />
<div>[[Category:Internet applications]]<br />
[http://www.nzbget.net/ NZBGet] is an Usenet-client written in C++ and designed with performance in mind to achieve maximum download speed by using very little system resources.<br />
<br />
== Installation ==<br />
Install the {{Pkg|nzbget}} package and the additional {{Aur|nzbget-systemd}} that provides a {{ic|nzbget}} [[systemd]] service.<br />
<br />
To have the latest [https://github.com/nzbget/nzbget NZBGet Git] version with a [[systemd]] service file, install {{Aur|nzbget-git}} from [[AUR]] instead.<br />
<br />
== Configuring NZBGet ==<br />
Copy the template configuration file to a custom directory:<br />
# cp /usr/share/nzbget/nzbget.conf /etc/nzbget.conf<br />
Update {{ic|/etc/nzbget.conf}} config file before starting {{ic|nzbget}}.<br />
<br />
== Starting NZBGet ==<br />
{{Note|The official {{Pkg|nzbget}} package doesn't provide a systemd service file. You will have to start it manually instead.}}<br />
* Running as root in console-mode: {{bc|# nzbget -c /etc/nzbget.conf -s}}<br />
<br />
* Running as root in daemon-mode: {{bc|# nzbget -c /etc/nzbget.conf -D}}<br />
<br />
NZBGet should now be accessible on http://localhost:6789.<br />
<br />
== Running NZBGet under a different user ==<br />
{{Tip|The {{aur|nzbget-git}} provides already a {{ic|nzbget}} user/group, so there is no need of adding a system user.}}<br />
<br />
For better security it is better to run NZBGet under a [[Users_and_groups#Example_adding_a_system_user|system user]].<br />
<br />
After adding a system user, update the main configuration file:<br />
{{hc|/etc/nzbget.conf|2=<br />
..<br />
DaemonUsername=nzbget # system user<br />
MainDir=/home/user/Downloads/NZBGet<br />
UMask=0007<br />
}}<br />
<br />
It may be necessary to update permissions of the {{ic|/usr/share/nzbget}} directory:<br />
# chown -R nzbget:nzbget /usr/share/nzbget<br />
# chmod -R 755 /usr/share/nzbget<br />
<br />
Create and set permissions for the desired directories:<br />
# mkdir /home/user/Downloads/NZBGet<br />
# chown -R nzbget:nzbget /home/user/Downloads/NZBGet<br />
# chmod -R 770 /home/user/Downloads/NZBGet<br />
<br />
The {{ic|/home/user/Downloads/NZBGet}} will be accessible for the user {{ic|nzbget}} and for the {{ic|nzbget}} group. Making the target directory world read/writable is highly discouraged (i.e. do not ''chmod'' the directory to ''777''). Instead, give individual users/groups appropriate permissions to the appropriate directories (e.g. by adding 'yourself' to the {{ic|nzbget}} group).<br />
<br />
Starting NZBGet as user {{ic|nzbget}} in daemon-mode:<br />
$ sudo -u nzbget /usr/bin/nzbget -c /etc/nzbget.conf -D<br />
<br />
== Troubleshooting ==<br />
<br />
=== Default NZBGet credentials ===<br />
<br />
The default credentials for NZBGet are {{ic|nzbget}} as user and {{ic|tegbzn6789}} as password. For security reasons it is recommended to change the default credentials.<br />
<br />
=== NZBGet crashes on start ===<br />
<br />
This may happen when the user edited the NZBGet configuration by the Web-interface (located at http://localhost:6789), corrupting the configuration-file. Clean-up the configuration-file and restart the server/daemon again.<br />
<br />
== See also ==<br />
*[http://nzbget.net/Documentation NZBGet Documentation]<br />
*[http://nzbget.net/Performance_tips Performance Tips]</div>Beta990https://wiki.archlinux.org/index.php?title=KDE&diff=413186KDE2015-12-23T22:21:02Z<p>Beta990: /* Freezing plasma shell, automount - systemd */ Seems only to effect NFS, no issues reported for SMB. @Arojas: sorry for the deletion!</p>
<hr />
<div>[[Category:KDE]]<br />
[[ar:KDE]]<br />
[[cs:KDE]]<br />
[[de:KDE]]<br />
[[es:KDE]]<br />
[[fr:KDE]]<br />
[[it:KDE]]<br />
[[ja:KDE]]<br />
[[pl:KDE]]<br />
[[ru:KDE]]<br />
[[tr:KDE Masaüstü Ortamı]]<br />
[[zh-CN:KDE]]<br />
[[zh-TW:KDE]]<br />
{{Related articles start}}<br />
{{Related|Desktop environment}}<br />
{{Related|Display manager}}<br />
{{Related|Dolphin}}<br />
{{Related|Window manager}}<br />
{{Related|Qt}}<br />
{{Related|KDM}}<br />
{{Related|KDevelop 4}}<br />
{{Related|Trinity}}<br />
{{Related|Uniform Look for Qt and GTK Applications}}<br />
{{Related articles end}}<br />
<br />
KDE is a software project currently comprising of a [[desktop environment]] known as Plasma (or Plasma Workspaces), a collection of libraries and frameworks (KDE Frameworks) and several applications (KDE Applications) as well. KDE upstream has a well maintained [http://userbase.kde.org/ UserBase wiki]. Detailed information about most KDE applications can be found there.<br />
<br />
== Installation ==<br />
<br />
=== Plasma Desktop ===<br />
<br />
{{Note|<br />
*Plasma 5 is not co-installable with Plasma 4.<br />
*The Plasma 4 desktop is unmaintained since August 2015.[https://www.kde.org/announcements/announce-applications-15.08.0.php] It is no longer in the official repositories since December 2015.[https://www.archlinux.org/news/dropping-plasma-4/]<br />
* [[KDM]] is no longer available for Plasma 5. KDE upstream [http://blog.davidedmundson.co.uk/blog/display_managers_finale recommends] using the [[SDDM]] display manager as it provides integration with the Plasma 5 theme.}}<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 [[KDE Packages]]. Alternatively, for a more minimal Plasma installation, install the {{Pkg|plasma-desktop}} package.<br />
<br />
=== Upgrading from Plasma 4 to 5 ===<br />
<br />
# Isolate {{ic|multi-user.target}}{{bc|# systemctl isolate multi-user.target}}<br />
# If you use KDM as display manager, disable it{{bc|# systemctl disable kdm}} <br />
# [[Pacman|Uninstall]] the kdebase-workspace package{{bc|# pacman -Rc kdebase-workspace}} <br />
# [[Install]] the {{pkg|plasma-meta}} package or the {{grp|plasma}} group.<br />
# Enable [[SDDM]]{{bc|# systemctl enable sddm}} or install and enable any other [[display manager]].<br />
# Reboot or simply run {{bc|# systemctl start sddm}}<br />
<br />
{{Note|The Plasma 4 configuration is not automatically migrated to Plasma 5, so you will have to configure your desktop from scratch.}}<br />
<br />
=== KDE applications and language packs ===<br />
<br />
To install the full set of KDE Applications, install the {{Grp|kde-applications}} group or the {{Pkg|kde-applications-meta}} meta-packages to install specific modules. Note that this will only install applications, it will not install any version of the Plasma Desktop.<br />
<br />
If you need language files, install {{ic|kde-l10n-'''yourlanguagehere'''}} (e.g. {{Pkg|kde-l10n-de}} for the German language). For a full list of available languages see [https://www.archlinux.org/packages/extra/any/kde-l10n/ this link].<br />
<br />
== Starting Plasma ==<br />
<br />
{{Tip|To better integrate SDDM with Plasma, it is recommended to edit {{ic|/etc/sddm.conf}} to use the breeze theme. Refer to [[SDDM#Theme settings]] for instructions.}}<br />
{{Note|The Plasma 4 configuration is not automatically migrated to Plasma 5, so you will have to configure your desktop from scratch.}}<br />
<br />
To launch a Plasma 5 session, choose ''Plasma'' in your [[display manager]] menu.<br />
<br />
Alternatively, to start Plasma with ''startx'', append {{ic|exec startkde}} to your {{ic|.xinitrc}} file. If you want to start Xorg at login, please see [[Start X at login]].<br />
<br />
== Configuration ==<br />
<br />
Most settings for KDE applications are stored in {{ic|~/.config}}, but some older applications may use {{ic|~/.kde4}}. However, configuring KDE is primarily done through the '''System Settings''' application. It can be started from a terminal by executing ''systemsettings5''.<br />
<br />
Frameworks 5 applications can use KDE 4 configuration however they expect the configuration files to be located in different places. To allow Frameworks 5 applications running in KDE 4 to share the same configurations they may be moved to the new locations and symlinked back to the old. Examples are:<br />
*Konsole profiles from {{ic|~/.kde4/share/apps/konsole}} to {{ic|~/.local/share/konsole/}}<br />
*Application appearance from {{ic|~/.kde4/share/config/kdeglobals}} to {{ic|~/.config/kdeglobals}} <br />
<br />
=== Personalization ===<br />
<br />
==== Plasma desktop ====<br />
<br />
===== Themes =====<br />
<br />
{{Note|1=If the Plasma cursor theme is incorrect in some instances, see the following [https://bbs.archlinux.org/viewtopic.php?pid=1533071#p1533071 forum post] for a workaround.}}<br />
[http://kde-look.org/index.php?xcontentmode=76 Plasma themes] define the look of panels and plasmoids. For easy system-wide installation, some such themes are available in both the official repositories and the [https://aur.archlinux.org/packages.php?O=0&K=plasmatheme&do_Search=Go AUR].<br />
<br />
The easiest way to install themes is by going through the Desktop Settings control panel:<br />
<br />
Workspace Theme > Desktop Theme > Get new Themes<br />
<br />
This will present a nice frontend for [http://www.kde-look.org/ kde-look.org] that allows you to install, uninstall, or update third-party plasmoid scripts with literally just one click.<br />
<br />
Splash and Lock screens are currently unavailable so to customize these screens you have to modify the original theme found in {{ic|/usr/share/plasma/look-and-feel/}}.<br />
See [https://www.kubuntuforums.net/showthread.php?67599-Plasma-5-background-images&s=59832dc20e5bfc2948dbb591d8453f61 this thread] on the Kubuntu forums.<br />
<br />
Note that the [[SDDM]] login screen is not part of this theme.<br />
<br />
====== Qt and GTK+ Applications Appearance ======<br />
<br />
{{Tip|For Qt and GTK theme consistency, see [[Uniform look for Qt and GTK applications]].}}<br />
<br />
;Qt4<br />
For Qt4 applications to have a consistent appearance, you need to install {{Pkg|breeze-kde4}} and then pick Breeze as GUI Style in {{ic|qtconfig-qt4}}.<br />
<br />
;GTK+<br />
The recommended theme for a pleasant appearance in GTK+ applications is {{Pkg|breeze-gtk}} or {{AUR|gnome-breeze-git}}, a GTK+ theme designed to mimic the appearance of Plasma 5 Breeze.<br />
Install {{Pkg|kde-gtk-config}} and select the installed GTK-theme for GTK2/GTK3-Theme in ''System Settings > Application Style > GNOME Application Style''.<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 />
Plasmoid binaries can be installed using PKGBUILDs from [https://aur.archlinux.org/packages.php?O=0&K=plasmoid&do_Search=Go&PP=25&SO=d&SB=v AUR], or you can write your own PKGBUILD.<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 Widgets''.<br />
<br />
This will present a nice frontend for [http://www.kde-look.org/ kde-look.org] that allows you to install, uninstall, or update third-party plasmoid scripts with literally just one click.<br />
<br />
Most plasmoids are not created officially by KDE developers. You can also try installing Mac OS X widgets, Microsoft Windows Vista/7 widgets, Google Widgets, and even SuperKaramba widgets.<br />
<br />
===== Sound applet in the system tray =====<br />
<br />
[[Install]] {{Pkg|plasma-pa}} or {{Pkg|kmix}} (start Kmix from the Application Launcher).<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|~/.kde4/share/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-desktop": ("Plasma" "Plasma")/!d; s/^ *\([^ ]*\) .*/\1/g'); do<br />
xprop -id $WID -remove _KDE_NET_WM_SHADOW<br />
done<br />
</nowiki>}}<br />
<br />
The script can be run on login with ''Add Script'' in ''Autostart'':<br />
<br />
$ kcmshell4 autostart<br />
<br />
==== Window decorations ====<br />
<br />
[http://kde-look.org/index.php?xcontentmode=75 Window decorations] can be changed in ''System Settings > Workspace Appearance > 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?O=0&K=kdestyle&do_Search=Go&PP=25&SO=d&SB=v AUR].<br />
<br />
==== Icon themes ====<br />
<br />
Icon-themes can be installed and changed on ''System Settings > Icons''.<br />
{{note|[[Gnome]] and KDE4 installed icon-themes may not be (fully) compatible with Plasma.<br />
It's recommended to install Plasma compatible icon-themes instead.}}<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''.<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 > Appearance > 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 '''96''' in ''System Settings > Application Appearance > Fonts''.<br />
<br />
If that does not work, try setting the DPI directly in your Xorg configuration as documented [[Xorg#Setting_DPI_manually|here]].<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]<br />
However, you can achieve something similar by editing the file {{ic|~/.config/kwinrc}} adding <br />
{{ic|1=BorderlessMaximizedWindows=true}} in the {{ic|[Windows]}} section.<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 > Printer Configuration''. To use this method, you must first install {{Pkg|print-manager}} and {{Pkg|cups}}.<br />
<br />
The {{ic|avahi-daemon.service}} and {{ic|org.cups.cupsd.service}} daemons must be started first; otherwise, you will get the following error:<br />
The service 'Printer Configuration' does not provide an interface 'KCModule'<br />
with keyword 'system-config- printer-kde/system-config-printer-kde.py'<br />
The factory does not support creating components of the specified type.<br />
<br />
If you are getting the following error, you need to give your user the right to manage printers.<br />
There was an error during CUPS operation: 'cups-authorization-canceled'<br />
<br />
For CUPS, this is set in {{ic|/etc/cups/cups-files.conf}}.<br />
<br />
Adding {{ic|lpadmin}} to {{ic|/etc/group}} and then to the {{ic|SystemGroup}} directive in {{ic|/etc/cups/cups-files.conf}} allows anyone in the {{ic|lpadmin}} group to configure printers. Do ''not'' add the {{ic|lp}} group to the {{ic|SystemGroup}} directive, or printing will fail.<br />
<br />
# groupadd -g107 lpadmin<br />
<br />
{{hc|/etc/cups/cups-files.conf|# Administrator user group...<br />
SystemGroup sys root lpadmin}}<br />
<br />
{{Tip|Read [[CUPS#Administration]] to get more details on how to configure CUPS.}}<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 usershares, which the stock smb.conf does not have enabled. Instructions to add them are in [[Samba#Creating usershare path]], after which sharing in Dolphin should work out of the box after restarting Samba.<br />
<br />
=== KDE Desktop activities ===<br />
<br />
KDE Desktop Activities are Plasma-based virtual-desktop-like sets of Plasma Widgets where you can independently configure widgets as if you have more than one screen or desktop.<br />
<br />
On your desktop, click the Cashew Plasmoid and, on the pop-up window, press "Activities".<br />
<br />
A plasma bar presenting you the current existing Plasma Desktop Activities will appear at the bottom of the screen. You can navigate between them by pressing the correspondent icons.<br />
<br />
=== Power saving ===<br />
<br />
Plasma has an integrated power saving service called "'''Powerdevil Power Management'''" that may adjust the power saving profile of the system and/or the brightness of the screen (if supported).<br />
<br />
=== Monitoring changes on local files and directories ===<br />
<br />
KDE now uses '''inotify''' directly from the kernel with '''kdirwatch''' (included in kdelibs), so Gamin or FAM are no longer needed. You may want to install this {{AUR|kdirwatch}}{{Broken package link|{{aur-mirror|kdirwatch}}}} from AUR which is a GUI frontend for kdirwatch.<br />
<br />
=== Autostarting applications ===<br />
<br />
{{Accuracy|See [[KDE Wallet#Using the KDE Wallet to store ssh keys]]. Merge general information here.}}<br />
<br />
Plasma can autostart applications and run scripts on startup and shutdown. To autostart an application, start {{ic|systemsettings}} and navigate to ''Startup and Shutdown'' -> ''Autostart'' and add the program or shell script of your choice. Note that programs can be autostarted on login only, whilst shell scripts can also be run on shutdown or even before Plasma itself starts. For applications, a {{ic|.desktop}} file will be created in the {{ic|~/.config/autostart}} directory. For shell scripts, a symlink will be created in one the following directories:<br />
* {{ic|~/.config/autostart-scripts}} - for starting at login.<br />
* {{ic|~/.config/plasma-workspace/shutdown}} - for starting on shutdown.<br />
* {{ic|~/.config/plasma-workspace/env}} - for starting prior to login.<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.<br />
<br />
'''Configuration for look and feel of GTK applications.'''<br />
* {{Pkg|kde-gtk-config}}<br />
* {{AUR|kcm-gtk}}{{Broken package link|{{aur-mirror|kcm-gtk}}}}<br />
* {{AUR|kcm-qt-graphicssystem}}<br />
<br />
'''Configuration for the GRUB bootloader.'''<br />
* {{AUR|grub2-editor}}{{Broken package link|{{aur-mirror|grub2-editor}}}}<br />
<br />
'''Configuration for the [[Uncomplicated Firewall]] (UFW)'''<br />
* {{AUR|kcm-ufw}}<br />
<br />
'''Configuration for [[PolicyKit]]'''<br />
* {{AUR|kcm-polkit-kde-git}}{{Broken package link|{{aur-mirror|kcm-polkit-kde-git}}}}<br />
<br />
'''Configuration for Wacom tablets'''<br />
* {{AUR|kcm-wacomtablet}}<br />
<br />
'''Configuration for systemd'''<br />
* {{Pkg|systemd-kcm}}<br />
<br />
More KCMs can be found at [http://kde-apps.org/index.php?xcontentmode=273 kde-apps.org].<br />
<br />
== Desktop search ==<br />
<br />
KDE implements desktop search with a software called Baloo, a file indexing and searching solution.<br />
<br />
=== Baloo ===<br />
<br />
==== Using and configuring Baloo ====<br />
<br />
In order to search using Baloo on the KDE Plasma Desktop, press {{ic|ALT+F2}} and type in your query. Within Dolphin press {{ic|CTRL+F}}.<br />
<br />
By default the Desktop Search KCM exposes only two options: A panel to blacklist folders and a way to disable it with one click.<br />
<br />
Alternatively you can edit your {{ic|~/.config/baloofilerc}} file ([https://community.kde.org/Baloo/Configuration info]). Additionally the {{ic|balooctl}} process can also be used. In order to disable Baloo run {{ic|balooctl disable}}.<br />
<br />
Once you added additional folders to the blacklist or disabled Baloo entirely, a process named {{ic|baloo_file_cleaner}} removes all unneeded index files automatically. They are stored under {{ic|~/.local/share/baloo/}}.<br />
<br />
More advanced configuration options are available through {{AUR|kcm_baloo_advanced}}{{Broken package link|{{aur-mirror|kcm_baloo_advanced}}}}.<br />
<br />
==== How do I index a removable device? ====<br />
<br />
By default every removable device is blacklisted. You just have to remove your device from the blacklist in the KCM panel.<br />
<br />
=== Web browsers ===<br />
==== Konqueror and Rekonq ====<br />
Konqueror supports two rendering engines – KHTML and QtWebKit (via the {{Pkg|kwebkitpart}} package) – Rekonq supports only QtWebKit. KHTML development was halted after Qt shipped WebKit but was kept for compatibility reasons. QtWebKit, in turn, has since been [https://www.mail-archive.com/development@qt-project.org/msg18866.html deprecated] by the Qt Project and replaced by [[Chromium]]-based Qt WebEngine which is currently not supported by either Konqueror or Rekonq.<br />
<br />
A successor named Fiber is currently in development, which will use Chromium's engine.<br />
<br />
==== Firefox ====<br />
Firefox can be configured to better integrate with Plasma. See [[Firefox#KDE_integration|Firefox KDE integration]] for details.<br />
<br />
==== Qupzilla ====<br />
Qupzilla ({{Pkg|qupzilla}}) is a Qt web browser with Plasma integration features. Qupzilla 2.0 will use Qt WebEngine intead of WebKit.<br />
<br />
== PIM ==<br />
<br />
KDE offers its own stack for personal information management. This includes emails, contacts, calendar, etc.<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.<br />
<br />
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 />
==== Disabling Akonadi ====<br />
<br />
See this [http://userbase.kde.org/Akonadi#Disabling_the_Akonadi_subsystem section in the KDE userbase].<br />
<br />
==== Database configuration ====<br />
<br />
Start {{ic|akonaditray}} from package {{Pkg|kdepim-runtime}}. Right click on it and select '''configure'''. In the Akonadi server configure tab, you can:<br />
* Configuring Akonadi to use MySQL/MariaDB Server<br />
** If your home directory is on a ZFS pool, you will need to create {{ic|~/.config/akonadi/mysql-local.conf}} with the following contents:<br />
<br />
[mysqld]<br />
innodb_use_native_aio = 0<br />
<br />
Otherwise you will get the [[MySQL#OS error 22 when running on ZFS|OS error 22]]<br />
* Configuring Akonadi to use PostgreSQL Server<br />
* Configuring Akonadi to use SQLite<br />
** Edit {{ic|~/.config/akonadi/akonadiserverrc}} to match the below<br />
<br />
[General]<br />
Driver=QSQLITE3<br />
<br />
[QSQLITE3]<br />
Name=/home/username/.local/akonadi/akonadi.db<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 />
You can choose between backends based on [[GStreamer]] and [[VLC]] – each available in versions for Qt4 applications and Qt5 applications ({{Pkg|phonon-qt4-gstreamer}}, {{Pkg|phonon-qt5-gstreamer}} – {{Pkg|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 [http://community.kde.org/Phonon/FeatureMatrix features set.]<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 at ''System Settings > Multimedia > Phonon > Backend''. For Plasma 5 this would be ''System Settings > Multimedia > Backend''.<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 />
<br />
== Useful applications ==<br />
<br />
The official set of KDE applications may be found [http://www.kde.org/applications/ here].<br />
<br />
=== Yakuake ===<br />
<br />
[[Yakuake]] provides a Quake-like terminal emulator whose visibility is toggled by the F12 key. It also has support for multiple tabs. Yakuake is available in the package {{Pkg|yakuake}}.<br />
<br />
=== KDE Telepathy ===<br />
<br />
[http://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 '+xx', e.g. '+49' for Germany). 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). Note that 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 />
== Tips and tricks ==<br />
<br />
=== Using an alternative window manager ===<br />
There may be reasons you want to use another window manager than KWin, for example to work around the DRI bug that causes [[PRIME#Black_screen_with_GL-based_compositors|black screen with PRIME]].<br />
<br />
To use an alternative [[window manager]] with Plasma open the ''System Settings'' panel, navigate to ''(Default) Applications > Window Manager > Use a different window manager'' and select the window manager you wish to use from the list.<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 {{ic|.xinitrc}} file:<br />
exec openbox-kde-session<br />
<br />
==== Compiz custom ====<br />
<br />
If you need to run Compiz with custom options and switches select ''Compiz custom'' and then create a script called {{ic|compiz-kde-launcher}} and add to it the commands you wish to use to start Compiz. See the example below:<br />
<br />
{{hc|/usr/local/bin/compiz-kde-launcher|<nowiki><br />
#!/bin/bash<br />
LIBGL_ALWAYS_INDIRECT=1<br />
compiz --replace &<br />
wait<br />
</nowiki>}}<br />
<br />
Then make it executable:<br />
$ chmod +x /usr/local/bin/compiz-kde-launcher<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 />
=== Integrate Android ===<br />
<br />
KDE Connect provides several features for you:<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 {{ic|KDE Connect}} from [https://play.google.com/store/apps/details?id=org.kde.kdeconnect_tp Google Play] or from [https://f-droid.org/repository/browse/?fdid=org.kde.kdeconnect_tp F-Droid].<br />
<br />
=== Configure KWin to use OpenGL ES ===<br />
Set environment variable {{ic|KWIN_COMPOSE}} to 'O2ES' to force the OpenGL ES backend. Please note that OpenGL ES is not supported by all drivers.<br />
<br />
=== Speed up application startup ===<br />
<br />
User Rob described a "[http://kdemonkey.blogspot.nl/2008/04/magic-trick.html magic trick]" on his blog to improve application start-up time by 50-150ms.<br />
To enable it, create this folder in your home:<br />
$ mkdir ~/.compose-cache/<br />
It can produce freezes under heavy io. To avoid this, also do:<br />
$ ln -sfv /run/user/$UID/ /home/$USER/.compose-cache<br />
<br />
{{Note|For those curious about what is going on here, this enables an optimization which Lubos (of general KDE speediness fame) came up with some time ago and was then rewritten and integrated into libx11. Ordinarily, on startup, applications read input method information from {{ic|/usr/share/X11/locale/''your locale''/Compose}}. This file is quite long (>5000 lines for the en_US.UTF-8 one) and takes some time to process. libX11 can create a cache of the parsed information which is much quicker to read subsequently, but it will only re-use an existing cache or create a new one in {{ic|~/.compose-cache}} if the directory already exists.}}<br />
<br />
=== Configuring monitor resolution / multiple monitors ===<br />
<br />
To enable display resolution management and multiple monitors in Plasma 5, install {{Pkg|kscreen}}. This adds the additional options to System Settings/Display and Monitor.<br />
<br />
=== Open application launcher with Super key (Windows key) ===<br />
<br />
Install and start {{Pkg|ksuperkey}}. Now assign Alt + F1 as hot key. The Super Key will now open the application launcher. You can add ksuperkey to the autostart if you don't want to start it manually.<br />
<br />
== Troubleshooting ==<br />
<br />
=== Graphics card related ===<br />
<br />
==== Intel ====<br />
<br />
If you use 3D-accelerated composition with Intel, you might find that the Plasma panel and other applications don't refresh properly (stay frozen). Some Intel drivers have [https://bugzilla.redhat.com/show_bug.cgi?id=1259475 problems with EGL]. Try to set Plasma 5's ''OpenGL interface'' setting to GLX instead (in System Settings under ''Display and Monitor'' -> ''Compositor''. If that does not work, see ''[[Intel_graphics#SNA_issues|Intel graphics SNA issues]]'' for alternative solutions.<br />
<br />
==== Plasma keeps crashing with legacy Nvidia ====<br />
<br />
There is a bug in Plasma with using the Nvidia-304xx driver described [https://bugs.kde.org/show_bug.cgi?id=348753 here.] Rather than disabling compositing, try creating a file kwin.sh in ~/.config/plasma-workspace/env/ with the following content<br />
<br />
#!/bin/sh<br />
export KWIN_EXPLICIT_SYNC=0<br />
Then go to the system-settings -> Startup and Shutdown -> Autostart and Check/Add the script as a pre-kde startup file<br />
<br />
=== Configuration related ===<br />
<br />
Many problems in KDE are related to 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 it 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 (bugs.kde.org) '''only if it is an official widget'''. If it is not, it is recommended you find the entry on kde-look.org 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}}:<br />
<br />
$ for j in plasma*; do mv -- "$j" "${j%}.bak"; done<br />
<br />
This command will '''rename all Plasma related configs''' 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 [[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 and several other problems such as ark being unable to unrar or unzip or amarok not recognizing any of your musics. This solution can also resolve problems with KDE and Qt programmes looking bad following upgrade.<br />
<br />
Rebuild your cache with the following commands:<br />
<br />
$ rm ~/.config/Trolltech.conf<br />
$ kbuildsycoca4 --noincremental<br />
<br />
Hopefully, your problems are now fixed.<br />
<br />
=== Clean akonadi configuration to fix KMail ===<br />
<br />
First, make sure that KMail is not running. Then backup configuration:<br />
$ mv ~/.local/share/akonadi ~/.local/share/akonadi-old<br />
$ mv ~/.config/akonadi ~/.config/akonadi-old<br />
<br />
Start ''SystemSettings > Personal'' and remove all the resources. Go back to Dolphin and remove the original {{ic|~/.local/share/akonadi}} and<br />
{{ic|~/.config/akonadi}} - the copies you made ensure that you can back-track if necessary.<br />
<br />
Now go back to the System Settings page and carefully add the necessary resources. You should see the resource reading in your mail folders. Then start Kontact/KMail to see if it work properly.<br />
<br />
=== Getting current state of KWin for support and debug purposes ===<br />
<br />
This command prints out a wonderful summary of the current state of KWin including used options, used compositing backend and relevant OpenGL driver capabilities. See more on [http://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 />
=== KDE and Qt programs look bad when in a different window manager ===<br />
<br />
If you are using KDE or Qt programs but not in a full Plasma session (specifically, you did not run {{ic|startkde}}), then as of Plasma 4.6.1 you will need to tell Qt how to find KDE's styles (Oxygen, QtCurve etc.)<br />
<br />
You just need to set the environment variable {{ic|QT_PLUGIN_PATH}}. E.g. put:<br />
<br />
export QT_PLUGIN_PATH=$HOME/.kde4/lib/kde4/plugins/:/usr/lib/kde4/plugins/<br />
<br />
into your {{ic|/etc/profile}} (or {{ic|~/.profile}} if you do not have root access). {{ic|qtconfig-qt4}} should then be able to find your KDE styles and everything should look nice again!<br />
<br />
Alternatively, you can symlink the Qt styles directory to the KDE styles one:<br />
# ln -s /usr/lib/kde4/plugins/styles/ /usr/lib/qt4/pluginlib32-libdbusmenu-glibs/styles<br />
<br />
Under Gnome you can try to install the package libgnomeui.<br />
<br />
=== KF5/Qt5 applications don't display icons in i3/fvwm/awesome ===<br />
<br />
See [[Qt#Configuration of Qt apps under environments other than KDE]].<br />
<br />
=== Graphical related problems ===<br />
<br />
==== Low 2D desktop performance (or) artifacts appear when on 2D ====<br />
<br />
===== GPU driver problem =====<br />
<br />
Make sure you have the proper driver for your card installed, so that your desktop is at least 2D accelerated. Follow these articles for more information: [[ATI]], [[NVIDIA]], [[Intel]] for more information, in order to make sure that everything is all right.<br />
The open-source ATI and Intel drivers and the proprietary (binary) Nvidia driver should theoretically provide the best 2D and 3D acceleration.<br />
<br />
===== The Raster engine workaround =====<br />
{{Deletion|xrender is not default in plasma 5. XRender should not be recommended anymore.}}<br />
If this does not solve your problems, your driver may not provide a good '''XRender''' acceleration which the current Qt painter engine relies on by default.<br />
<br />
You can change the painter engine to software based only by invoking the application with the {{ic|-graphicssystem raster}} command line. This rendering engine can be set as the default one by recompiling Qt with the same as configure option, {{ic|-graphicssystem raster}}.<br />
<br />
The raster paint engine enables the CPU to do the majority of the painting, as opposed to the GPU. You may get better performance, depending on your system. This is basically a work-around for the terrible Linux driver stack, since the CPU should obviously not be doing graphical computations since it is designed for fewer threads of greater complexity, as opposed to the GPU which is many threads but lesser computational strength. So, only use Raster engine if you are having problems or your GPU is much slower than you CPU, otherwise is better to use XRender.<br />
<br />
Since Qt 4.7+, recompiling Qt is not needed. Simply export {{ic|1=QT_GRAPHICSSYSTEM=raster}}, or {{ic|opengl}}, or {{ic|native}} (for the default). Raster depends on the CPU, OpenGL depends on the GPU and high driver support, and Native is just using the X11 rendering (mixture, usually).<br />
<br />
'''The best and automatic way to do that''' is to install {{AUR|kcm-qt-graphicssystem}} from AUR and configure this particular Qt setting through ''System Settings > Qt Graphics System''.<br />
<br />
For more information, consult this [http://apachelog.wordpress.com/2010/09/05/qt-graphics-system-kcm/ KDE Developer blog entry] and/or this [http://labs.trolltech.com/blogs/2009/12/18/qt-graphics-and-performance-the-raster-engine/ Qt Developer blog entry].<br />
<br />
==== Low 3D desktop performance====<br />
<br />
KDE begins with desktop effects enabled. Older cards may be insufficient for 3D desktop acceleration. You can disable desktop effects in ''System Settings > Desktop Effects'' and you can toggle desktop effects with {{ic|Alt+Shift+F12}}.<br />
<br />
{{Note| You may encounter such problems with 3D desktop performance even when using a more powerful graphics card, especially the catalyst proprietary driver ({{ic|fglrx}}). This driver is known for having problems with 3D acceleration. Visit [[ATI|the ATI Wiki page]] for more troubleshooting.}}<br />
<br />
==== Desktop compositing is disabled on my system with a modern Nvidia GPU ====<br />
<br />
Sometimes, KWin may have settings in its configuration file ({{ic|kwinrc}}) that ''may'' cause a problem on re-activating the 3D desktop {{ic|OpenGL}} compositing. That could be caused randomly (for example, due to a sudden Xorg crash or restart, and it gets corrupted), so, in case that happens, delete your {{ic|~/.kde4/share/config/kwinrc}} file and relogin. The KWin settings will turn to the KDE default ones and the problem should be probably gone.<br />
<br />
==== Flickering in fullscreen when compositing is enabled ====<br />
<br />
As of KDE SC 4.6.0, there is an option in ''Sytem Settings > Desktop Effect > Advanced > Suspend desktop effects for fullscreen windows''. Uncheck it would tell kwin to disable unredirect fullscren.<br />
<br />
==== Display settings lost on reboot (multiple monitors) ====<br />
There is a [https://bugs.kde.org/show_bug.cgi?id=346961 bug] in kscreen that makes it forget dual screen settings after reboot with certain displays.<br />
A possible workaround is to delete kscreen and make sure that your screen resolution is specified in a xorg.conf file:<br />
* For Nouveau you can use the template at [[Nouveau#Dual Head]], just edit it to suit your setup.<br />
* For the proprietary nvidia driver you can use the [[NVIDIA#Using_NVIDIA_Settings|nvidia-settings]] utility as root to write the config file.<br />
<br />
=== Sound problems under KDE ===<br />
<br />
==== ALSA related problems ====<br />
<br />
{{Note|First make sure you have {{Pkg|alsa-lib}} and {{Pkg|alsa-utils}} installed.}}<br />
<br />
===== "Falling back to default" messages when trying to listen to any sound in KDE =====<br />
<br />
When you encounter such messages:<br />
The audio playback device ''name_of_the_sound_device'' does not work.<br />
Falling back to default<br />
Go to ''System Settings > Multimedia > Phonon'' and set the device named {{ic|default}} above all the other devices in each box you see.<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 {{Pkg|phonon-qt4-vlc}} or {{Pkg|phonon-qt5-vlc}}.<br />
Then, make sure the backend is preferred via ''System Settings > Multimedia > Phonon > Backend (tab)''.<br />
<br />
=== Konsole does not save commands' history ===<br />
<br />
By default console command history is saved only when you type 'exit' in console. When you close Konsole with 'x' in the corner it does not happen.<br />
To enable autosaving after every command execution:<br />
<br />
{{hc|~/.bashrc|<nowiki><br />
shopt -s histappend<br />
[[ "${PROMPT_COMMAND}" ]] && PROMPT_COMMAND="$PROMPT_COMMAND;history -a" || PROMPT_COMMAND="history -a"<br />
</nowiki>}}<br />
<br />
=== Inotify folder watch limit ===<br />
<br />
If you get the following error:<br />
<br />
KDE Baloo Filewatch service reached the inotify folder watch limit. File changes may be ignored.<br />
<br />
Then you will need to increase the inotify folder watch limit:<br />
<br />
# echo 10000 > /proc/sys/fs/inotify/max_user_watches<br />
<br />
To make changes permanent, create {{ic|/etc/sysctl.d/90-inotify.conf}} with<br />
<br />
#increase inotify watch limit<br />
fs.inotify.max_user_watches = 10000<br />
<br />
=== Freezes when using Automount on a NFS volume ===<br />
<br />
Using [[Fstab#Automount_with_systemd]] on a [[NFS]] volume may cause freezes, see [https://bugs.kde.org/show_bug.cgi?id=354137 bug report upstream].<br />
<br />
== Unstable releases ==<br />
<br />
When KDE is reaching beta or RC milestone, KDE "unstable" packages are uploaded to the ''kde-unstable'' repository. They stay there until KDE is declared stable and passes to the ''extra'' repository.<br />
<br />
You can add ''kde-unstable'' with:<br />
<br />
{{hc|/etc/pacman.conf|2=<br />
[kde-unstable]<br />
Include = /etc/pacman.d/mirrorlist<br />
}}<br />
<br />
{{Warning|Make sure to add these lines '''before''' the ''extra'' repository. Adding the section after ''extra'' will cause [[pacman]] to prefer the older packages in the extra repository. {{ic|pacman -Syu}} will not install them, and will warn that they are "too new" if installed manually. Also, some of the libraries will stay at the older versions, which may cause file conflicts and/or instability!}}<br />
<br />
# ''kde-unstable'' is based upon ''testing''. Therefore, you need to enable the repositories in the following order: ''kde-unstable'', ''testing'', ''core'', ''extra'', ''community-testing'', ''community''.<br />
# To update from a previous KDE installation, run: {{ic|# pacman -Syu}} or {{ic|# pacman -S kde-unstable/kde}}<br />
# If you do not have KDE installed, you might have difficulties to install it by using groups (limitation of pacman)<br />
# '''Subscribe and read the [https://mailman.archlinux.org/pipermail/arch-dev-public/ arch-dev-public] mailing list'''<br />
# Make sure [[#Bugs|you make bug reports]] if you find any problems.<br />
<br />
== Bugs ==<br />
<br />
It is preferable that if you find a minor or serious bug, you should visit [https://bugs.archlinux.org the Arch Bug Tracker] or/and [http://bugs.kde.org KDE Bug Tracker] in order to report that. Make sure that you are clear about what you want to report.<br />
<br />
If you have any problem and you write about in on the Arch forums, first make sure that you have '''fully''' updated your system using a good sync mirror (check [https://www.archlinux.de/?page=MirrorStatus here]) or try [[Reflector]].<br />
<br />
== See also ==<br />
<br />
* [http://www.kde.org KDE homepage]<br />
* [https://bugs.kde.org KDE bug tracker]<br />
* [https://projects.kde.org KDE Projects]<br />
* [http://blog.martin-graesslin.com/blog/kategorien/kde/ Martin Graesslin's blog]</div>Beta990https://wiki.archlinux.org/index.php?title=SDDM&diff=413160SDDM2015-12-23T11:45:34Z<p>Beta990: /* Theme settings */ Added Plasma theme's</p>
<hr />
<div>[[Category:KDE]]<br />
[[Category:Display managers]]<br />
[[ja:SDDM]]<br />
[[ru:SDDM]]<br />
[[zh-CN:SDDM]]<br />
{{Related articles start}}<br />
{{Related|Display manager}}<br />
{{Related|KDE}}<br />
{{Related articles end}}<br />
The [[Wikipedia:Simple Desktop Display Manager|Simple Desktop Display Manager]] (SDDM) is the preferred [[display manager]] for [[KDE]] Plasma desktop. From Wikipedia:<br />
<br />
:''Simple Desktop Display Manager (SDDM) is a display manager (a graphical login program) for X11. SDDM was written from scratch in C++11 and supports theming via QML. It is the successor of the KDE Display Manager and is used in conjunction with KDE Frameworks 5, KDE Plasma 5 and KDE Applications 5.''<br />
<br />
== Installation ==<br />
<br />
[[Install]] the {{Pkg|sddm}} package.<br />
<br />
Then follow [[Display manager#Loading the display manager]] to start SDDM at boot.<br />
<br />
== Configuration ==<br />
<br />
The configuration file for SDDM can be found at {{ic|/etc/sddm.conf}}. See {{ic|man sddm.conf}} for all options.<br />
<br />
On systems controlled by [[systemd]], everything should work out of the box, since SDDM defaults to using {{ic|systemd-logind}} for session management. The configuration file will therefore not be created at package installation time. SDDM offers a command for generating a sample configuration file with the default settings if you really want one:<br />
<br />
# sddm --example-config > /etc/sddm.conf<br />
<br />
=== Autologin ===<br />
<br />
SDDM supports automatic login through its configuration file, for example:<br />
<br />
{{hc|<br />
1=/etc/sddm.conf|<br />
2=[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/bash <br />
/usr/bin/qdbus-qt4 org.kde.screensaver /ScreenSaver SetActive true &<br />
exit 0<br />
<br />
=== Theme settings ===<br />
<br />
Theme settings can be changed in the {{ic|[Theme]}} section.<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 />
==== Main theme ====<br />
<br />
Set the main 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 seperate subdirectory. Study the files installed to modify or create your own theme.<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 />
==== Changing your avatar ====<br />
<br />
You can simply put a png image named {{ic|username.face.icon}} into the default directory {{ic|/usr/share/sddm/faces/}}. Alternatively you can change the default directory to match your desires:<br />
{{hc|<br />
1=/etc/sddm.conf|<br />
2=[Theme]<br />
FacesDir=/var/lib/AccountsService/icons/<br />
}}<br />
<br />
{{Note|SDDM cannot read avatars which are symlinks.}}<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 />
=== Configuration GUI ===<br />
<br />
* KDE Frameworks' System Settings contains an SDDM configuration module. Install {{Pkg|sddm-kcm}} package to use it.<br />
* There is a Qt-based {{AUR|sddm-config-editor-git}} in the AUR.<br />
<br />
== Troubleshooting ==<br />
<br />
=== Hangs after login ===<br />
<br />
Try removing ''~/.Xauthority''.<br />
<br />
Alternatively, if your cursor turns to a black cross at the same time, and you are using zsh as your shell, you may be experiencing [https://github.com/sddm/sddm/issues/352 this bug]. Follow the instructions in the previous link to fix the issue. This bug is expected to be fixed in the SDDM version subsequent to 0.11.0.<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, add the following to your {{ic|sddm.conf}}:<br />
<br />
{{hc|<br />
1=/etc/sddm.conf|<br />
2=[XDisplay]<br />
MinimumVT=7}}<br />
<br />
=== One or more users do not show up on the greeter ===<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. Modify your {{ic|sddm.conf}} to (for a UID of 501, say):<br />
<br />
{{hc|<br />
1=/etc/sddm.conf|<br />
2=[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 />
=== 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.</div>Beta990https://wiki.archlinux.org/index.php?title=KDE&diff=413009KDE2015-12-21T11:48:14Z<p>Beta990: Undo revision 413004 by Chazza (talk) - It's not merged, and it also contains information about the diff. between -meta and -group packages</p>
<hr />
<div>[[Category:KDE]]<br />
[[ar:KDE]]<br />
[[cs:KDE]]<br />
[[de:KDE]]<br />
[[es:KDE]]<br />
[[fr:KDE]]<br />
[[it:KDE]]<br />
[[ja:KDE]]<br />
[[pl:KDE]]<br />
[[ru:KDE]]<br />
[[tr:KDE Masaüstü Ortamı]]<br />
[[zh-CN:KDE]]<br />
[[zh-TW:KDE]]<br />
{{Related articles start}}<br />
{{Related|Desktop environment}}<br />
{{Related|Display manager}}<br />
{{Related|Dolphin}}<br />
{{Related|Window manager}}<br />
{{Related|Qt}}<br />
{{Related|KDM}}<br />
{{Related|KDevelop 4}}<br />
{{Related|Trinity}}<br />
{{Related|Uniform Look for Qt and GTK Applications}}<br />
{{Related articles end}}<br />
<br />
KDE is a software project currently comprising of a [[desktop environment]] known as Plasma (or Plasma Workspaces), a collection of libraries and frameworks (KDE Frameworks) and several applications (KDE Applications) as well. KDE upstream has a well maintained [http://userbase.kde.org/ UserBase wiki]. Detailed information about most KDE applications can be found there.<br />
<br />
== Installation ==<br />
<br />
=== Plasma Desktop ===<br />
<br />
{{Note|<br />
*Plasma 5 is not co-installable with Plasma 4.<br />
*The Plasma 4 desktop is unmaintained since August 2015.[https://www.kde.org/announcements/announce-applications-15.08.0.php] It is no longer in the official repositories since December 2015.[https://www.archlinux.org/news/dropping-plasma-4/]<br />
* [[KDM]] is no longer available for Plasma 5. KDE upstream [http://blog.davidedmundson.co.uk/blog/display_managers_finale recommends] using the [[SDDM]] display manager as it provides integration with the Plasma 5 theme.}}<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 [[KDE Packages]]. Alternatively, for a more minimal Plasma installation, install the {{Pkg|plasma-desktop}} package.<br />
<br />
=== KDE applications and language packs ===<br />
<br />
To install the full set of KDE Applications, install the {{Grp|kde-applications}} group or the {{Pkg|kde-applications-meta}} meta-packages to install specific modules. Note that this will only install applications, it will not install any version of the Plasma Desktop.<br />
<br />
If you need language files, install {{ic|kde-l10n-'''yourlanguagehere'''}} (e.g. {{Pkg|kde-l10n-de}} for the German language). For a full list of available languages see [https://www.archlinux.org/packages/extra/any/kde-l10n/ this link].<br />
<br />
== Starting Plasma ==<br />
<br />
{{Tip|To better integrate SDDM with Plasma, it is recommended to edit {{ic|/etc/sddm.conf}} to use the breeze theme. Refer to [[SDDM#Theme settings]] for instructions.}}<br />
{{Note|The Plasma 4 configuration is not automatically migrated to Plasma 5, so you will have to configure your desktop from scratch.}}<br />
<br />
To launch a Plasma 5 session, choose ''Plasma'' in your [[display manager]] menu.<br />
<br />
Alternatively, to start Plasma with ''startx'', append {{ic|exec startkde}} to your {{ic|.xinitrc}} file. If you want to start Xorg at login, please see [[Start X at login]].<br />
<br />
== Configuration ==<br />
<br />
Most settings for KDE applications are stored in {{ic|~/.config}}, but some older applications may use {{ic|~/.kde4}}. However, configuring KDE is primarily done through the '''System Settings''' application. It can be started from a terminal by executing ''systemsettings5''.<br />
<br />
Frameworks 5 applications can use KDE 4 configuration however they expect the configuration files to be located in different places. To allow Frameworks 5 applications running in KDE 4 to share the same configurations they may be moved to the new locations and symlinked back to the old. Examples are:<br />
*Konsole profiles from {{ic|~/.kde4/share/apps/konsole}} to {{ic|~/.local/share/konsole/}}<br />
*Application appearance from {{ic|~/.kde4/share/config/kdeglobals}} to {{ic|~/.config/kdeglobals}} <br />
<br />
=== Personalization ===<br />
<br />
==== Plasma desktop ====<br />
<br />
===== Themes =====<br />
<br />
{{Note|1=If the Plasma cursor theme is incorrect in some instances, see the following [https://bbs.archlinux.org/viewtopic.php?pid=1533071#p1533071 forum post] for a workaround.}}<br />
[http://kde-look.org/index.php?xcontentmode=76 Plasma themes] define the look of panels and plasmoids. For easy system-wide installation, some such themes are available in both the official repositories and the [https://aur.archlinux.org/packages.php?O=0&K=plasmatheme&do_Search=Go AUR].<br />
<br />
The easiest way to install themes is by going through the Desktop Settings control panel:<br />
<br />
Workspace Theme > Desktop Theme > Get new Themes<br />
<br />
This will present a nice frontend for [http://www.kde-look.org/ kde-look.org] that allows you to install, uninstall, or update third-party plasmoid scripts with literally just one click.<br />
<br />
Splash and Lock screens are currently unavailable so to customize these screens you have to modify the original theme found in {{ic|/usr/share/plasma/look-and-feel/}}.<br />
See [https://www.kubuntuforums.net/showthread.php?67599-Plasma-5-background-images&s=59832dc20e5bfc2948dbb591d8453f61 this thread] on the Kubuntu forums.<br />
<br />
Note that the [[SDDM]] login screen is not part of this theme.<br />
<br />
====== Qt and GTK+ Applications Appearance ======<br />
<br />
{{Tip|For Qt and GTK theme consistency, see [[Uniform look for Qt and GTK applications]].}}<br />
<br />
;Qt4<br />
For Qt4 applications to have a consistent appearance, you need to install {{Pkg|breeze-kde4}} and then pick Breeze as GUI Style in {{ic|qtconfig-qt4}}.<br />
<br />
;GTK+<br />
The recommended theme for a pleasant appearance in GTK+ applications is {{Pkg|breeze-gtk}} or {{AUR|gnome-breeze-git}}, a GTK+ theme designed to mimic the appearance of Plasma 5 Breeze.<br />
Install {{Pkg|kde-gtk-config}} and select the installed GTK-theme for GTK2/GTK3-Theme in ''System Settings > Application Style > GNOME Application Style''.<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 />
Plasmoid binaries can be installed using PKGBUILDs from [https://aur.archlinux.org/packages.php?O=0&K=plasmoid&do_Search=Go&PP=25&SO=d&SB=v AUR], or you can write your own PKGBUILD.<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 Widgets''.<br />
<br />
This will present a nice frontend for [http://www.kde-look.org/ kde-look.org] that allows you to install, uninstall, or update third-party plasmoid scripts with literally just one click.<br />
<br />
Most plasmoids are not created officially by KDE developers. You can also try installing Mac OS X widgets, Microsoft Windows Vista/7 widgets, Google Widgets, and even SuperKaramba widgets.<br />
<br />
===== Sound applet in the system tray =====<br />
<br />
[[Install]] {{Pkg|plasma-pa}} or {{Pkg|kmix}} (start Kmix from the Application Launcher).<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|~/.kde4/share/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-desktop": ("Plasma" "Plasma")/!d; s/^ *\([^ ]*\) .*/\1/g'); do<br />
xprop -id $WID -remove _KDE_NET_WM_SHADOW<br />
done<br />
</nowiki>}}<br />
<br />
The script can be run on login with ''Add Script'' in ''Autostart'':<br />
<br />
$ kcmshell4 autostart<br />
<br />
==== Window decorations ====<br />
<br />
[http://kde-look.org/index.php?xcontentmode=75 Window decorations] can be changed in ''System Settings > Workspace Appearance > 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?O=0&K=kdestyle&do_Search=Go&PP=25&SO=d&SB=v AUR].<br />
<br />
==== Icon themes ====<br />
<br />
Icon-themes can be installed and changed on ''System Settings > Icons''.<br />
{{note|[[Gnome]] and KDE4 installed icon-themes may not be (fully) compatible with Plasma.<br />
It's recommended to install Plasma compatible icon-themes instead.}}<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''.<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 > Appearance > 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 '''96''' in ''System Settings > Application Appearance > Fonts''.<br />
<br />
If that does not work, try setting the DPI directly in your Xorg configuration as documented [[Xorg#Setting_DPI_manually|here]].<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]<br />
However, you can achieve something similar by editing the file {{ic|~/.config/kwinrc}} adding <br />
{{ic|1=BorderlessMaximizedWindows=true}} in the {{ic|[Windows]}} section.<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 > Printer Configuration''. To use this method, you must first install {{Pkg|print-manager}} and {{Pkg|cups}}.<br />
<br />
The {{ic|avahi-daemon.service}} and {{ic|org.cups.cupsd.service}} daemons must be started first; otherwise, you will get the following error:<br />
The service 'Printer Configuration' does not provide an interface 'KCModule'<br />
with keyword 'system-config- printer-kde/system-config-printer-kde.py'<br />
The factory does not support creating components of the specified type.<br />
<br />
If you are getting the following error, you need to give your user the right to manage printers.<br />
There was an error during CUPS operation: 'cups-authorization-canceled'<br />
<br />
For CUPS, this is set in {{ic|/etc/cups/cups-files.conf}}.<br />
<br />
Adding {{ic|lpadmin}} to {{ic|/etc/group}} and then to the {{ic|SystemGroup}} directive in {{ic|/etc/cups/cups-files.conf}} allows anyone in the {{ic|lpadmin}} group to configure printers. Do ''not'' add the {{ic|lp}} group to the {{ic|SystemGroup}} directive, or printing will fail.<br />
<br />
# groupadd -g107 lpadmin<br />
<br />
{{hc|/etc/cups/cups-files.conf|# Administrator user group...<br />
SystemGroup sys root lpadmin}}<br />
<br />
{{Tip|Read [[CUPS#Administration]] to get more details on how to configure CUPS.}}<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 usershares, which the stock smb.conf does not have enabled. Instructions to add them are in [[Samba#Creating usershare path]], after which sharing in Dolphin should work out of the box after restarting Samba.<br />
<br />
=== KDE Desktop activities ===<br />
<br />
KDE Desktop Activities are Plasma-based virtual-desktop-like sets of Plasma Widgets where you can independently configure widgets as if you have more than one screen or desktop.<br />
<br />
On your desktop, click the Cashew Plasmoid and, on the pop-up window, press "Activities".<br />
<br />
A plasma bar presenting you the current existing Plasma Desktop Activities will appear at the bottom of the screen. You can navigate between them by pressing the correspondent icons.<br />
<br />
=== Power saving ===<br />
<br />
Plasma has an integrated power saving service called "'''Powerdevil Power Management'''" that may adjust the power saving profile of the system and/or the brightness of the screen (if supported).<br />
<br />
=== Monitoring changes on local files and directories ===<br />
<br />
KDE now uses '''inotify''' directly from the kernel with '''kdirwatch''' (included in kdelibs), so Gamin or FAM are no longer needed. You may want to install this {{AUR|kdirwatch}}{{Broken package link|{{aur-mirror|kdirwatch}}}} from AUR which is a GUI frontend for kdirwatch.<br />
<br />
=== Autostarting applications ===<br />
<br />
{{Accuracy|See [[KDE Wallet#Using the KDE Wallet to store ssh keys]]. Merge general information here.}}<br />
<br />
Plasma can autostart applications and run scripts on startup and shutdown. To autostart an application, start {{ic|systemsettings}} and navigate to ''Startup and Shutdown'' -> ''Autostart'' and add the program or shell script of your choice. Note that programs can be autostarted on login only, whilst shell scripts can also be run on shutdown or even before Plasma itself starts. For applications, a {{ic|.desktop}} file will be created in the {{ic|~/.config/autostart}} directory. For shell scripts, a symlink will be created in one the following directories:<br />
* {{ic|~/.config/autostart-scripts}} - for starting at login.<br />
* {{ic|~/.config/plasma-workspace/shutdown}} - for starting on shutdown.<br />
* {{ic|~/.config/plasma-workspace/env}} - for starting prior to login.<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.<br />
<br />
'''Configuration for look and feel of GTK applications.'''<br />
* {{Pkg|kde-gtk-config}}<br />
* {{AUR|kcm-gtk}}{{Broken package link|{{aur-mirror|kcm-gtk}}}}<br />
* {{AUR|kcm-qt-graphicssystem}}<br />
<br />
'''Configuration for the GRUB bootloader.'''<br />
* {{AUR|grub2-editor}}{{Broken package link|{{aur-mirror|grub2-editor}}}}<br />
<br />
'''Configuration for the [[Uncomplicated Firewall]] (UFW)'''<br />
* {{AUR|kcm-ufw}}<br />
<br />
'''Configuration for [[PolicyKit]]'''<br />
* {{AUR|kcm-polkit-kde-git}}{{Broken package link|{{aur-mirror|kcm-polkit-kde-git}}}}<br />
<br />
'''Configuration for Wacom tablets'''<br />
* {{AUR|kcm-wacomtablet}}<br />
<br />
'''Configuration for systemd'''<br />
* {{Pkg|systemd-kcm}}<br />
<br />
More KCMs can be found at [http://kde-apps.org/index.php?xcontentmode=273 kde-apps.org].<br />
<br />
== Desktop search ==<br />
<br />
KDE implements desktop search with a software called Baloo, a file indexing and searching solution.<br />
<br />
=== Baloo ===<br />
<br />
==== Using and configuring Baloo ====<br />
<br />
In order to search using Baloo on the KDE Plasma Desktop, press {{ic|ALT+F2}} and type in your query. Within Dolphin press {{ic|CTRL+F}}.<br />
<br />
By default the Desktop Search KCM exposes only two options: A panel to blacklist folders and a way to disable it with one click.<br />
<br />
Alternatively you can edit your {{ic|~/.config/baloofilerc}} file ([https://community.kde.org/Baloo/Configuration info]). Additionally the {{ic|balooctl}} process can also be used. In order to disable Baloo run {{ic|balooctl disable}}.<br />
<br />
Once you added additional folders to the blacklist or disabled Baloo entirely, a process named {{ic|baloo_file_cleaner}} removes all unneeded index files automatically. They are stored under {{ic|~/.local/share/baloo/}}.<br />
<br />
More advanced configuration options are available through {{AUR|kcm_baloo_advanced}}{{Broken package link|{{aur-mirror|kcm_baloo_advanced}}}}.<br />
<br />
==== How do I index a removable device? ====<br />
<br />
By default every removable device is blacklisted. You just have to remove your device from the blacklist in the KCM panel.<br />
<br />
=== Web browsers ===<br />
==== Konqueror and Rekonq ====<br />
Konqueror supports two rendering engines – KHTML and QtWebKit (via the {{Pkg|kwebkitpart}} package) – Rekonq supports only QtWebKit. KHTML development was halted after Qt shipped WebKit but was kept for compatibility reasons. QtWebKit, in turn, has since been [https://www.mail-archive.com/development@qt-project.org/msg18866.html deprecated] by the Qt Project and replaced by [[Chromium]]-based Qt WebEngine which is currently not supported by either Konqueror or Rekonq.<br />
<br />
A successor named Fiber is currently in development, which will use Chromium's engine.<br />
<br />
==== Firefox ====<br />
Firefox can be configured to better integrate with Plasma. See [[Firefox#KDE_integration|Firefox KDE integration]] for details.<br />
<br />
==== Qupzilla ====<br />
Qupzilla ({{Pkg|qupzilla}}) is a Qt web browser with Plasma integration features. Qupzilla 2.0 will use Qt WebEngine intead of WebKit.<br />
<br />
== PIM ==<br />
<br />
KDE offers its own stack for personal information management. This includes emails, contacts, calendar, etc.<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.<br />
<br />
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 />
==== Disabling Akonadi ====<br />
<br />
See this [http://userbase.kde.org/Akonadi#Disabling_the_Akonadi_subsystem section in the KDE userbase].<br />
<br />
==== Database configuration ====<br />
<br />
Start {{ic|akonaditray}} from package {{Pkg|kdepim-runtime}}. Right click on it and select '''configure'''. In the Akonadi server configure tab, you can:<br />
* Configuring Akonadi to use MySQL/MariaDB Server<br />
** If your home directory is on a ZFS pool, you will need to create {{ic|~/.config/akonadi/mysql-local.conf}} with the following contents:<br />
<br />
[mysqld]<br />
innodb_use_native_aio = 0<br />
<br />
Otherwise you will get the [[MySQL#OS error 22 when running on ZFS|OS error 22]]<br />
* Configuring Akonadi to use PostgreSQL Server<br />
* Configuring Akonadi to use SQLite<br />
** Edit {{ic|~/.config/akonadi/akonadiserverrc}} to match the below<br />
<br />
[General]<br />
Driver=QSQLITE3<br />
<br />
[QSQLITE3]<br />
Name=/home/username/.local/akonadi/akonadi.db<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 />
You can choose between backends based on [[GStreamer]] and [[VLC]] – each available in versions for Qt4 applications and Qt5 applications ({{Pkg|phonon-qt4-gstreamer}}, {{Pkg|phonon-qt5-gstreamer}} – {{Pkg|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 [http://community.kde.org/Phonon/FeatureMatrix features set.]<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 at ''System Settings > Multimedia > Phonon > Backend''. For Plasma 5 this would be ''System Settings > Multimedia > Backend''.<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 />
<br />
== Useful applications ==<br />
<br />
The official set of KDE applications may be found [http://www.kde.org/applications/ here].<br />
<br />
=== Yakuake ===<br />
<br />
[[Yakuake]] provides a Quake-like terminal emulator whose visibility is toggled by the F12 key. It also has support for multiple tabs. Yakuake is available in the package {{Pkg|yakuake}}.<br />
<br />
=== KDE Telepathy ===<br />
<br />
[http://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 '+xx', e.g. '+49' for Germany). 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). Note that 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 />
== Tips and tricks ==<br />
<br />
=== Using an alternative window manager ===<br />
There may be reasons you want to use another window manager than KWin, for example to work around the DRI bug that causes [[PRIME#Black_screen_with_GL-based_compositors|black screen with PRIME]].<br />
<br />
To use an alternative [[window manager]] with Plasma open the ''System Settings'' panel, navigate to ''(Default) Applications > Window Manager > Use a different window manager'' and select the window manager you wish to use from the list.<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 {{ic|.xinitrc}} file:<br />
exec openbox-kde-session<br />
<br />
==== Compiz custom ====<br />
<br />
If you need to run Compiz with custom options and switches select ''Compiz custom'' and then create a script called {{ic|compiz-kde-launcher}} and add to it the commands you wish to use to start Compiz. See the example below:<br />
<br />
{{hc|/usr/local/bin/compiz-kde-launcher|<nowiki><br />
#!/bin/bash<br />
LIBGL_ALWAYS_INDIRECT=1<br />
compiz --replace &<br />
wait<br />
</nowiki>}}<br />
<br />
Then make it executable:<br />
$ chmod +x /usr/local/bin/compiz-kde-launcher<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 />
=== Integrate Android ===<br />
<br />
KDE Connect provides several features for you:<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 {{ic|KDE Connect}} from [https://play.google.com/store/apps/details?id=org.kde.kdeconnect_tp Google Play] or from [https://f-droid.org/repository/browse/?fdid=org.kde.kdeconnect_tp F-Droid].<br />
<br />
=== Configure KWin to use OpenGL ES ===<br />
Set environment variable {{ic|KWIN_COMPOSE}} to 'O2ES' to force the OpenGL ES backend. Please note that OpenGL ES is not supported by all drivers.<br />
<br />
=== Speed up application startup ===<br />
<br />
User Rob described a "[http://kdemonkey.blogspot.nl/2008/04/magic-trick.html magic trick]" on his blog to improve application start-up time by 50-150ms.<br />
To enable it, create this folder in your home:<br />
$ mkdir ~/.compose-cache/<br />
It can produce freezes under heavy io. To avoid this, also do:<br />
$ ln -sfv /run/user/$UID/ /home/$USER/.compose-cache<br />
<br />
{{Note|For those curious about what is going on here, this enables an optimization which Lubos (of general KDE speediness fame) came up with some time ago and was then rewritten and integrated into libx11. Ordinarily, on startup, applications read input method information from {{ic|/usr/share/X11/locale/''your locale''/Compose}}. This file is quite long (>5000 lines for the en_US.UTF-8 one) and takes some time to process. libX11 can create a cache of the parsed information which is much quicker to read subsequently, but it will only re-use an existing cache or create a new one in {{ic|~/.compose-cache}} if the directory already exists.}}<br />
<br />
=== Configuring monitor resolution / multiple monitors ===<br />
<br />
To enable display resolution management and multiple monitors in Plasma 5, install {{Pkg|kscreen}}. This adds the additional options to System Settings/Display and Monitor.<br />
<br />
=== Open application launcher with Super key (Windows key) ===<br />
<br />
Install and start {{Pkg|ksuperkey}}. Now assign Alt + F1 as hot key. The Super Key will now open the application launcher. You can add ksuperkey to the autostart if you don't want to start it manually.<br />
<br />
== Troubleshooting ==<br />
<br />
=== Graphics card related ===<br />
<br />
==== Intel ====<br />
<br />
If you use 3D-accelerated composition with Intel, you might find that the Plasma panel and other applications don't refresh properly (stay frozen). Some Intel drivers have [https://bugzilla.redhat.com/show_bug.cgi?id=1259475 problems with EGL]. Try to set Plasma 5's ''OpenGL interface'' setting to GLX instead (in System Settings under ''Display and Monitor'' -> ''Compositor''. If that does not work, see ''[[Intel_graphics#SNA_issues|Intel graphics SNA issues]]'' for alternative solutions.<br />
<br />
==== Plasma keeps crashing with legacy Nvidia ====<br />
<br />
There is a bug in Plasma with using the Nvidia-304xx driver described [https://bugs.kde.org/show_bug.cgi?id=348753 here.] Rather than disabling compositing, try creating a file kwin.sh in ~/.config/plasma-workspace/env/ with the following content<br />
<br />
#!/bin/sh<br />
export KWIN_EXPLICIT_SYNC=0<br />
Then go to the system-settings -> Startup and Shutdown -> Autostart and Check/Add the script as a pre-kde startup file<br />
<br />
=== Configuration related ===<br />
<br />
Many problems in KDE are related to 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 it 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 (bugs.kde.org) '''only if it is an official widget'''. If it is not, it is recommended you find the entry on kde-look.org 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}}:<br />
<br />
$ for j in plasma*; do mv -- "$j" "${j%}.bak"; done<br />
<br />
This command will '''rename all Plasma related configs''' 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 [[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 and several other problems such as ark being unable to unrar or unzip or amarok not recognizing any of your musics. This solution can also resolve problems with KDE and Qt programmes looking bad following upgrade.<br />
<br />
Rebuild your cache with the following commands:<br />
<br />
$ rm ~/.config/Trolltech.conf<br />
$ kbuildsycoca4 --noincremental<br />
<br />
Hopefully, your problems are now fixed.<br />
<br />
=== Clean akonadi configuration to fix KMail ===<br />
<br />
First, make sure that KMail is not running. Then backup configuration:<br />
$ mv ~/.local/share/akonadi ~/.local/share/akonadi-old<br />
$ mv ~/.config/akonadi ~/.config/akonadi-old<br />
<br />
Start ''SystemSettings > Personal'' and remove all the resources. Go back to Dolphin and remove the original {{ic|~/.local/share/akonadi}} and<br />
{{ic|~/.config/akonadi}} - the copies you made ensure that you can back-track if necessary.<br />
<br />
Now go back to the System Settings page and carefully add the necessary resources. You should see the resource reading in your mail folders. Then start Kontact/KMail to see if it work properly.<br />
<br />
=== Getting current state of KWin for support and debug purposes ===<br />
<br />
This command prints out a wonderful summary of the current state of KWin including used options, used compositing backend and relevant OpenGL driver capabilities. See more on [http://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 />
=== KDE and Qt programs look bad when in a different window manager ===<br />
<br />
If you are using KDE or Qt programs but not in a full Plasma session (specifically, you did not run {{ic|startkde}}), then as of Plasma 4.6.1 you will need to tell Qt how to find KDE's styles (Oxygen, QtCurve etc.)<br />
<br />
You just need to set the environment variable {{ic|QT_PLUGIN_PATH}}. E.g. put:<br />
<br />
export QT_PLUGIN_PATH=$HOME/.kde4/lib/kde4/plugins/:/usr/lib/kde4/plugins/<br />
<br />
into your {{ic|/etc/profile}} (or {{ic|~/.profile}} if you do not have root access). {{ic|qtconfig-qt4}} should then be able to find your KDE styles and everything should look nice again!<br />
<br />
Alternatively, you can symlink the Qt styles directory to the KDE styles one:<br />
# ln -s /usr/lib/kde4/plugins/styles/ /usr/lib/qt4/pluginlib32-libdbusmenu-glibs/styles<br />
<br />
Under Gnome you can try to install the package libgnomeui.<br />
<br />
=== KF5/Qt5 applications don't display icons in i3/fvwm/awesome ===<br />
<br />
See [[Qt#Configuration of Qt apps under environments other than KDE]].<br />
<br />
=== Graphical related problems ===<br />
<br />
==== Low 2D desktop performance (or) artifacts appear when on 2D ====<br />
<br />
===== GPU driver problem =====<br />
<br />
Make sure you have the proper driver for your card installed, so that your desktop is at least 2D accelerated. Follow these articles for more information: [[ATI]], [[NVIDIA]], [[Intel]] for more information, in order to make sure that everything is all right.<br />
The open-source ATI and Intel drivers and the proprietary (binary) Nvidia driver should theoretically provide the best 2D and 3D acceleration.<br />
<br />
===== The Raster engine workaround =====<br />
{{Deletion|xrender is not default in plasma 5. XRender should not be recommended anymore.}}<br />
If this does not solve your problems, your driver may not provide a good '''XRender''' acceleration which the current Qt painter engine relies on by default.<br />
<br />
You can change the painter engine to software based only by invoking the application with the {{ic|-graphicssystem raster}} command line. This rendering engine can be set as the default one by recompiling Qt with the same as configure option, {{ic|-graphicssystem raster}}.<br />
<br />
The raster paint engine enables the CPU to do the majority of the painting, as opposed to the GPU. You may get better performance, depending on your system. This is basically a work-around for the terrible Linux driver stack, since the CPU should obviously not be doing graphical computations since it is designed for fewer threads of greater complexity, as opposed to the GPU which is many threads but lesser computational strength. So, only use Raster engine if you are having problems or your GPU is much slower than you CPU, otherwise is better to use XRender.<br />
<br />
Since Qt 4.7+, recompiling Qt is not needed. Simply export {{ic|1=QT_GRAPHICSSYSTEM=raster}}, or {{ic|opengl}}, or {{ic|native}} (for the default). Raster depends on the CPU, OpenGL depends on the GPU and high driver support, and Native is just using the X11 rendering (mixture, usually).<br />
<br />
'''The best and automatic way to do that''' is to install {{AUR|kcm-qt-graphicssystem}} from AUR and configure this particular Qt setting through ''System Settings > Qt Graphics System''.<br />
<br />
For more information, consult this [http://apachelog.wordpress.com/2010/09/05/qt-graphics-system-kcm/ KDE Developer blog entry] and/or this [http://labs.trolltech.com/blogs/2009/12/18/qt-graphics-and-performance-the-raster-engine/ Qt Developer blog entry].<br />
<br />
==== Low 3D desktop performance====<br />
<br />
KDE begins with desktop effects enabled. Older cards may be insufficient for 3D desktop acceleration. You can disable desktop effects in ''System Settings > Desktop Effects'' and you can toggle desktop effects with {{ic|Alt+Shift+F12}}.<br />
<br />
{{Note| You may encounter such problems with 3D desktop performance even when using a more powerful graphics card, especially the catalyst proprietary driver ({{ic|fglrx}}). This driver is known for having problems with 3D acceleration. Visit [[ATI|the ATI Wiki page]] for more troubleshooting.}}<br />
<br />
==== Desktop compositing is disabled on my system with a modern Nvidia GPU ====<br />
<br />
Sometimes, KWin may have settings in its configuration file ({{ic|kwinrc}}) that ''may'' cause a problem on re-activating the 3D desktop {{ic|OpenGL}} compositing. That could be caused randomly (for example, due to a sudden Xorg crash or restart, and it gets corrupted), so, in case that happens, delete your {{ic|~/.kde4/share/config/kwinrc}} file and relogin. The KWin settings will turn to the KDE default ones and the problem should be probably gone.<br />
<br />
==== Flickering in fullscreen when compositing is enabled ====<br />
<br />
As of KDE SC 4.6.0, there is an option in ''Sytem Settings > Desktop Effect > Advanced > Suspend desktop effects for fullscreen windows''. Uncheck it would tell kwin to disable unredirect fullscren.<br />
<br />
==== Display settings lost on reboot (multiple monitors) ====<br />
There is a [https://bugs.kde.org/show_bug.cgi?id=346961 bug] in kscreen that makes it forget dual screen settings after reboot with certain displays.<br />
A possible workaround is to delete kscreen and make sure that your screen resolution is specified in a xorg.conf file:<br />
* For Nouveau you can use the template at [[Nouveau#Dual Head]], just edit it to suit your setup.<br />
* For the proprietary nvidia driver you can use the [[NVIDIA#Using_NVIDIA_Settings|nvidia-settings]] utility as root to write the config file.<br />
<br />
=== Sound problems under KDE ===<br />
<br />
==== ALSA related problems ====<br />
<br />
{{Note|First make sure you have {{Pkg|alsa-lib}} and {{Pkg|alsa-utils}} installed.}}<br />
<br />
===== "Falling back to default" messages when trying to listen to any sound in KDE =====<br />
<br />
When you encounter such messages:<br />
The audio playback device ''name_of_the_sound_device'' does not work.<br />
Falling back to default<br />
Go to ''System Settings > Multimedia > Phonon'' and set the device named {{ic|default}} above all the other devices in each box you see.<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 {{Pkg|phonon-qt4-vlc}} or {{Pkg|phonon-qt5-vlc}}.<br />
Then, make sure the backend is preferred via ''System Settings > Multimedia > Phonon > Backend (tab)''.<br />
<br />
=== Konsole does not save commands' history ===<br />
<br />
By default console command history is saved only when you type 'exit' in console. When you close Konsole with 'x' in the corner it does not happen.<br />
To enable autosaving after every command execution:<br />
<br />
{{hc|~/.bashrc|<nowiki><br />
shopt -s histappend<br />
[[ "${PROMPT_COMMAND}" ]] && PROMPT_COMMAND="$PROMPT_COMMAND;history -a" || PROMPT_COMMAND="history -a"<br />
</nowiki>}}<br />
<br />
=== Inotify folder watch limit ===<br />
<br />
If you get the following error:<br />
<br />
KDE Baloo Filewatch service reached the inotify folder watch limit. File changes may be ignored.<br />
<br />
Then you will need to increase the inotify folder watch limit:<br />
<br />
# echo 10000 > /proc/sys/fs/inotify/max_user_watches<br />
<br />
To make changes permanent, create {{ic|/etc/sysctl.d/90-inotify.conf}} with<br />
<br />
#increase inotify watch limit<br />
fs.inotify.max_user_watches = 10000<br />
<br />
== Unstable releases ==<br />
<br />
When KDE is reaching beta or RC milestone, KDE "unstable" packages are uploaded to the ''kde-unstable'' repository. They stay there until KDE is declared stable and passes to the ''extra'' repository.<br />
<br />
You can add ''kde-unstable'' with:<br />
<br />
{{hc|/etc/pacman.conf|2=<br />
[kde-unstable]<br />
Include = /etc/pacman.d/mirrorlist<br />
}}<br />
<br />
{{Warning|Make sure to add these lines '''before''' the ''extra'' repository. Adding the section after ''extra'' will cause [[pacman]] to prefer the older packages in the extra repository. {{ic|pacman -Syu}} will not install them, and will warn that they are "too new" if installed manually. Also, some of the libraries will stay at the older versions, which may cause file conflicts and/or instability!}}<br />
<br />
# ''kde-unstable'' is based upon ''testing''. Therefore, you need to enable the repositories in the following order: ''kde-unstable'', ''testing'', ''core'', ''extra'', ''community-testing'', ''community''.<br />
# To update from a previous KDE installation, run: {{ic|# pacman -Syu}} or {{ic|# pacman -S kde-unstable/kde}}<br />
# If you do not have KDE installed, you might have difficulties to install it by using groups (limitation of pacman)<br />
# '''Subscribe and read the [https://mailman.archlinux.org/pipermail/arch-dev-public/ arch-dev-public] mailing list'''<br />
# Make sure [[#Bugs|you make bug reports]] if you find any problems.<br />
<br />
== Bugs ==<br />
<br />
It is preferable that if you find a minor or serious bug, you should visit [https://bugs.archlinux.org the Arch Bug Tracker] or/and [http://bugs.kde.org KDE Bug Tracker] in order to report that. Make sure that you are clear about what you want to report.<br />
<br />
If you have any problem and you write about in on the Arch forums, first make sure that you have '''fully''' updated your system using a good sync mirror (check [https://www.archlinux.de/?page=MirrorStatus here]) or try [[Reflector]].<br />
<br />
== See also ==<br />
<br />
* [http://www.kde.org KDE homepage]<br />
* [https://bugs.kde.org KDE bug tracker]<br />
* [https://projects.kde.org KDE Projects]<br />
* [http://blog.martin-graesslin.com/blog/kategorien/kde/ Martin Graesslin's blog]</div>Beta990https://wiki.archlinux.org/index.php?title=GitLab&diff=413008GitLab2015-12-21T11:45:10Z<p>Beta990: Added Stub: going through the sections doesn't give any (good) working setup</p>
<hr />
<div>[[Category:Version Control System]]<br />
{{Related articles start}}<br />
{{Related|Gitolite}}<br />
{{Related|Ruby on Rails}}<br />
{{Related articles end}}<br />
<br />
{{Stub|Commands are incomplete/incorrect, reported upgrade issues}}<br />
<br />
From [https://about.gitlab.com/ GitLab's homepage:]<br />
<br />
:''GitLab offers git repository management, code reviews, issue tracking, activity feeds and wikis. Enterprises install GitLab on-premise and connect it with LDAP and Active Directory servers for secure authentication and authorization. A single GitLab server can handle more than 25,000 users but it is also possible to create a high availability setup with multiple active servers.''<br />
<br />
An example live version can be found at [https://gitlab.com/ GitLab.com].<br />
<br />
== Installation ==<br />
{{Note|If you want to use RVM refer to the article [[#Running GitLab with rvm]] before starting with the installation}}<br />
<br />
{{Note|This article covers installing and configuring GitLab without HTTPS at first. If needed, see [[#Advanced Configuration]] to set up SSL}}<br />
<br />
GitLab requires a database backend. If you plan to run it on the same machine, first install either [[MySQL]] or [[PostgreSQL]].<br />
<br />
[[Install]] the {{AUR|gitlab}} package.<br />
<br />
In order to receive mail notifications, a mail server must be installed and configured. See the following for more information: [[:Category:Mail server]]<br />
<br />
== Configuration ==<br />
<br />
=== Notes Before Configuring ===<br />
The {{AUR|gitlab}} package installs GitLab's files in a manner that more closely follows standard Linux conventions:<br />
<br />
{| class="wikitable"<br />
! Description <br />
! [https://github.com/gitlabhq/gitlabhq/blob/6-5-stable/doc/install/installation.md GitLab's Official] <br />
! {{AUR|gitlab}} <br />
|----------------------------------------------------------<br />
| Configuration File GitShell<br />
| {{ic|/home/git/gitlab-shell/config.yml}}<br />
| {{ic|/etc/webapps/gitlab-shell/config.yml}}<br />
|----------------------------------------------------------<br />
| Configuration File GitLab<br />
| {{ic|/home/git/gitlab/config/gitlab.yml}}<br />
| {{ic|/etc/webapps/gitlab/gitlab.yml}}<br />
|----------------------------------------------------------<br />
| User (Home Directory)<br />
| {{ic|git}} ({{ic|/home/git}})<br />
| {{ic|gitlab}} ({{ic|/var/lib/gitlab}})<br />
|}<br />
<br />
{{tip|If you are familiar with the [[Arch Build System]] you can edit the PKGBUILD and relevant files to change gitlab's home directory to a place of your liking.}}<br />
<br />
===Basic configuration===<br />
====GitLab Shell====<br />
{{Note|You can leave the {{ic|gitlab_url}} with default value if indent to host GitLab on the same host.}} <br />
<br />
Edit {{ic|/etc/webapps/gitlab-shell/config.yml}} and set {{ic|gitlab_url:}} to the prefer url and port:<br />
{{hc|/etc/webapps/gitlab-shell/config.yml|2=<br />
# GitLab user. git by default<br />
user: gitlab<br />
<br />
# Url to gitlab instance. Used for api calls. Should end with a slash.<br />
# Default: http://localhost:8080/<br />
# You only have to change the default if you have configured Unicorn<br />
# to listen on a custom port, or if you have configured Unicorn to<br />
# only listen on a Unix domain socket.<br />
gitlab_url: "http://localhost:8080/" # <<-- right here<br />
<br />
http_settings:<br />
# user: someone<br />
# password: somepass<br />
...<br />
}}<br />
<br />
Update the {{ic|/usr/share/webapps/gitlab/config/unicorn.rb}} configuration if the port and/or hostname is different from the default:<br />
{{hc|/etc/webapps/gitlab-shell/config.yml|2=<br />
listen "127.0.0.1:8080", :tcp_nopush => true # <<-- right here<br />
}}<br />
<br />
====GitLab====<br />
Edit {{ic|/etc/webapps/gitlab/gitlab.yml}} and setup at least the following parameters:<br />
<br />
{{Tip|The hostname and port are used for the {{ic|git clone http://hostname:port}} as example.}}<br />
<br />
'''Hostname:''' In the {{ic|gitlab:}} section set {{ic|host:}} - replacing {{ic|localhost}} to {{ic|yourdomain.com}} ('''note:''' no 'http://' or trailing slash) - into your fully qualified domain name.<br />
<br />
'''Port:''' {{ic|port:}} can be confusing. This is not the port that the gitlab server (unicorn) runs on; it's the port that users will initially access through in their browser. Basically, if you intend for users to visit 'yourdomain.com' in their browser, without appending a port number to the domain name, leave {{ic|port:}} as {{ic|80}}. If you intend your users to type something like 'yourdomain.com:3425' into their browsers, then you'd set {{ic|port:}} to {{ic|3425}}. You will also have to '''configure your webserver''' to listen on that port.<br />
<br />
'''Timezone (optional):''' The {{ic|time_zone:}} parameter is optional, but may be useful to force the zone of GitLab applications.<br />
<br />
Those are the minimal changes needed for a working GitLab install. The adventurous may read on in the comment and customize as needed.<br />
<br />
=== Further configuration ===<br />
<br />
==== Database backend ====<br />
A Database backend will be required before Gitlab can be run. Currently GitLab supports [[MariaDB]] and [[PostgreSQL]]. By default, GitLab assumes you will use MySQL. Extra work is needed if you plan to use PostgreSQL.<br />
<br />
==== MariaDB ====<br />
To set up MySQL (MariaDB) you need to create a database called {{ic|gitlabhq_production}} along with a user (default: {{ic|gitlab}}) who has full privileges to the database:<br />
<br />
{{hc|$ mysql -u root -p|2=<br />
mysql> CREATE DATABASE `gitlabhq_production`;<br />
mysql> CREATE USER 'gitlab'@'localhost' IDENTIFIED BY 'password';<br />
mysql> GRANT ALL ON `gitlabhq_production`.* TO 'gitlab'@'localhost';<br />
mysql> \q<br />
}}<br />
<br />
Try connecting to the new database with the new user:<br />
<br />
$ mysql -u '''gitlab''' -p -D gitlabhq_production<br />
<br />
Next you will need to open {{ic|/etc/webapps/gitlab/database.yml}} and set {{ic|username:}} and {{ic|password:}} for the {{ic|gitlabhq_production}}:<br />
<br />
{{hc|/etc/webapps/gitlab/database.yml|<br />
#<br />
# PRODUCTION<br />
#<br />
production:<br />
adapter: mysql2<br />
encoding: utf8<br />
reconnect: false<br />
database: gitlabhq_production<br />
pool: 10<br />
username: '''username'''<br />
password: '''"password"'''<br />
# host: localhost<br />
# socket: /run/mysqld/mysqld.sock # If running MariaDB as socket<br />
...<br />
}}<br />
<br />
It should not be set as world readable, e.g. only processes running under the {{ic|gitlab}} user should have read/write access:<br />
<br />
# chmod 600 /etc/webapps/gitlab/database.yml<br />
# chown gitlab:gitlab /etc/webapps/gitlab/database.yml<br />
<br />
For more info and other ways to create/manage MySQL databases, see the [https://mariadb.org/docs/ MariaDB documentation] and the [https://github.com/gitlabhq/gitlabhq/blob/6-5-stable/doc/install/installation.md GitLab official (generic) install guide].<br />
<br />
==== PostgreSQL ====<br />
Login to PostgreSQL and create the {{ic|gitlabhq_production}} database with along with it's user. Remember to change {{ic|your_username_here}} and {{ic|your_password_here}} to the real values:<br />
<br />
# psql -d template1<br />
<br />
{{bc|1=<br />
template1=# CREATE USER your_username_here WITH PASSWORD 'your_password_here';<br />
template1=# CREATE DATABASE gitlabhq_production OWNER your_username_here;<br />
template1=# \q<br />
}}<br />
<br />
Try connecting to the new database with the new user to verify it works:<br />
<br />
# psql -d gitlabhq_production<br />
<br />
Copy the PostgreSQL template file before configuring it (overwriting the default MySQL configuration file):<br />
<br />
# cp /usr/share/doc/gitlab/database.yml.postgresql /etc/webapps/gitlab/database.yml<br />
<br />
Open the new {{ic|/etc/webapps/gitlab/database.yml}} and set the values for {{ic|username:}} and {{ic|password:}}. For example:<br />
<br />
{{hc|/etc/webapps/gitlab/database.yml|<br />
#<br />
# PRODUCTION<br />
#<br />
production:<br />
adapter: postgresql<br />
encoding: unicode<br />
database: gitlabhq_production<br />
pool: 10<br />
username: your_username_here<br />
password: "your_password_here"<br />
# host: localhost<br />
# port: 5432<br />
# socket: /tmp/postgresql.sock<br />
...<br />
}}<br />
<br />
For our purposes (unless you know what you are doing), you do not need to worry about configuring the other databases listed in {{ic|/etc/webapps/gitlab/database.yml}}. We only need to set up the production database to get GitLab working.<br />
<br />
Finally, open {{ic|/usr/lib/systemd/system/gitlab.target}} and {{ic|/usr/lib/systemd/system/gitlab-unicorn.service}} change all instances of {{ic|mysql.service}} to {{ic|postgresql.service}}.<br />
<br />
==== Firewall ====<br />
<br />
If you want to give direct access to your Gitlab installation through an [[iptables]] firewall, you may need to adjust the port and the network address:<br />
<br />
# iptables -A tcp_inbound -p TCP -s '''192.168.1.0/24''' --destination-port '''80''' -j ACCEPT<br />
<br />
To enable API-access:<br />
<br />
# iptables -A tcp_inbound -p TCP -s '''192.168.1.0/24''' --destination-port '''8080''' -j ACCEPT<br />
<br />
If you are behind a router, do not forget to forward this port to the running GitLab server host, if you want to allow WAN-access.<br />
<br />
==== Satellites access ====<br />
<br />
The folder {{ic|satellites}} should have the following permissions set:<br />
<br />
# chmod 750 /var/lib/gitlab/satellites<br />
<br />
==== Initialize Gitlab database ====<br />
<br />
Start the Redis server before we create the database:<br />
<br />
# systemctl start redis<br />
# systemctl enable redis<br />
<br />
Now you have to install bundler and the required gems with:<br />
<br />
# export PATH=$PATH:/var/lib/gitlab/.gem/ruby/2.2.0/bin<br />
# sudo -u gitlab -H gem install bundler --no-document<br />
# cd /usr/share/webapps/gitlab<br />
# sudo -u gitlab -H bundle install<br />
<br />
Initialize the database and activate advanced features:<br />
# cd /usr/share/webapps/gitlab<br />
# su - gitlab -s /bin/sh -c "cd '/usr/share/webapps/gitlab'; bundle-2.1 exec rake gitlab:setup RAILS_ENV=production"<br />
<br />
{{bc|<nowiki><br />
Missing `db_key_base` for 'production' environment. The secrets will be generated and stored in `config/secrets.yml`<br />
This will create the necessary database tables and seed the database.<br />
You will lose any previous data stored in the database.<br />
Do you want to continue (yes/no)? yes<br />
<br />
gitlabhq_production already exists<br />
-- enable_extension("plpgsql")<br />
-> 0.0009s<br />
-- create_table("abuse_reports", {:force=>true})<br />
-> 0.0300s<br />
-- create_table("application_settings", {:force=>true})<br />
-> 0.0116s<br />
<br />
...<br />
<br />
Administrator account created:<br />
<br />
login.........root<br />
password......5iveL!fe<br />
</nowiki>}}<br />
<br />
Now compile the assets:<br />
<br />
# su - gitlab -s /bin/sh -c "cd '/usr/share/webapps/gitlab'; bundle-2.1 exec rake assets:precompile RAILS_ENV=production"<br />
<br />
Finally, check that {{ic|/etc/webapps/gitlab/secret}} contains a random hex string.<br />
<br />
==== Configure Git User ====<br />
{{Note|This must match the {{ic|user}} and {{ic|email_from}} defined in {{ic|/usr/share/webapps/gitlab/config/gitlab.yml}}.}}<br />
<br />
# cd /usr/share/webapps/gitlab<br />
# sudo -u gitlab -H git config --global user.name "GitLab"<br />
# sudo -u gitlab -H git config --global user.email "example@example.com"<br />
# sudo -u gitlab -H git config --global core.autocrlf "input"<br />
<br />
==== Adjust modifier bits ====<br />
(The gitlab check won't pass if the user and group ownership isn't configured properly)<br />
<br />
# chmod -R ug+rwX,o-rwx /var/lib/gitlab/repositories/<br />
# chmod -R ug-s /var/lib/gitlab/repositories<br />
# find /var/lib/gitlab/repositories/ -type d -print0 | xargs -0 chmod g+s<br />
<br />
==== Redis Over Unix Socket ====<br />
<br />
If Redis is set to listen on socket, you may want to adjust the default configuration:<br />
<br />
{{hc|/etc/redis.conf|2=<br />
...<br />
# Accept connections on the specified port, default is 6379.<br />
# If port 0 is specified Redis will not listen on a TCP socket.<br />
port 0<br />
...<br />
# By default Redis listens for connections from all the network interfaces<br />
# available on the server. It is possible to listen to just one or multiple<br />
# interfaces using the "bind" configuration directive, followed by one or<br />
# more IP addresses.<br />
#<br />
# Examples:<br />
#<br />
# bind 192.168.1.100 10.0.0.1<br />
bind 127.0.0.1<br />
<br />
# Specify the path for the Unix socket that will be used to listen for<br />
# incoming connections. There is no default, so Redis will not listen<br />
# on a unix socket when not specified.<br />
#<br />
unixsocket /var/run/redis/redis.sock<br />
unixsocketperm 770<br />
}}<br />
<br />
Create the directory {{ic|/var/run/redis}} and set the correct permissions:<br />
# mkdir /var/run/redis<br />
# chown redis:redis /var/run/redis<br />
# chmod 755 /var/run/redis<br />
<br />
Add the user {{ic|git}} and {{ic|gitlab}} to the {{ic|redis}} group:<br />
<br />
# usermod -a -G redis git<br />
# usermod -a -G redis gitlab<br />
<br />
Update {{ic|/etc/webapps/gitlab-shell/config.yml}} and {{ic|/etc/webapps/gitlab/resque.yml}} files:<br />
<br />
{{hc|/etc/webapps/gitlab/resque.yml|2=<br />
development: unix:/var/run/redis/redis.sock<br />
test: unix:/run/redis/redis.sock<br />
production: unix:/run/redis/redis.sock<br />
}}<br />
<br />
{{hc|/etc/webapps/gitlab-shell/config.yml|2=<br />
...<br />
# Redis settings used for pushing commit notices to gitlab<br />
redis:<br />
bin: /usr/bin/redis-cli<br />
host: 127.0.0.1<br />
port: 6379<br />
# pass: redispass # Allows you to specify the password for Redis<br />
database: 5 # Use different database, default up to 16<br />
socket: /var/run/redis/redis.sock # uncomment this line<br />
namespace: resque:gitlab<br />
...<br />
}}<br />
<br />
Finally restart the {{ic|redis}}, {{ic|gitlab-sidekiq}} and {{ic|gitlab-unicorn}} services.<br />
<br />
For more information, please see issue [https://github.com/gitlabhq/gitlabhq/issues/6100 #6100].<br />
<br />
== Start and test GitLab ==<br />
{{note|See [[#Troubleshooting]] and log files inside the {{ic|/usr/share/webapps/gitlab/log}} directory for troubleshooting.}}<br />
Make systemd see your new daemon unit files:<br />
<br />
# systemctl daemon-reload<br />
<br />
Make sure [[MySQL]] or [[PostgreSQL]] and Redis are running and setup correctly.<br />
<br />
If needed see [[#Redis Over Unix Socket]] example if GitLab cannot load {{ic|redis}} correctly.<br />
<br />
After starting the database backends, we can start GitLab with its webserver (Unicorn):<br />
<br />
# systemctl start gitlab-sidekiq gitlab-unicorn<br />
<br />
With the following commands we check if the steps we followed so far are configured properly:<br />
<br />
# cd /usr/share/webapps/gitlab<br />
# sudo -u gitlab bundle exec rake gitlab:env:info RAILS_ENV=production<br />
# sudo -u gitlab bundle exec rake gitlab:check RAILS_ENV=production<br />
<br />
{{note|These gitlab:env:info and gitlab:check commands will show a fatal error related to git. This is OK.}}<br />
<br />
{{hc|<nowiki>$ sudo -u gitlab bundle exec rake gitlab:env:info RAILS_ENV=production</nowiki>|<nowiki><br />
fatal: Not a git repository (or any of the parent directories): .git<br />
<br />
System information<br />
System: Arch rolling<br />
Current User: gitlab<br />
Using RVM: no<br />
Ruby Version: 2.2.3p173<br />
Gem Version: 2.4.5.1<br />
Bundler Version:1.10.6<br />
Rake Version: 10.4.2<br />
Sidekiq Version:3.3.0<br />
<br />
GitLab information<br />
Version: 7.14.0<br />
Revision: fatal: Not a git repository (or any of the parent directories): .git<br />
Directory: /usr/share/webapps/gitlab<br />
DB Adapter: mysql2<br />
URL: http://gitlab.arch<br />
HTTP Clone URL: http://gitlab.arch/some-project.git<br />
SSH Clone URL: git@gitlab.arch:some-project.git<br />
Using LDAP: no<br />
Using Omniauth: no<br />
<br />
GitLab Shell<br />
Version: 2.6.4<br />
Repositories: /var/lib/gitlab/repositories/<br />
Hooks: /usr/share/webapps/gitlab-shell/hooks/<br />
Git: /usr/bin/git<br />
</nowiki>}}<br />
<br />
{{Note| {{ic|gitlab:check}} will complain about missing initscripts. This is nothing to worry about, as [[systemd]] service files are used instead (which GitLab does not recognize).}}<br />
<br />
{{hc|<nowiki>$ sudo -u gitlab bundle exec rake gitlab:check RAILS_ENV=production</nowiki>|<nowiki><br />
fatal: Not a git repository (or any of the parent directories): .git<br />
Checking Environment ...<br />
<br />
Git configured for gitlab user? ... yes<br />
Has python2? ... yes<br />
python2 is supported version? ... yes<br />
<br />
Checking Environment ... Finished<br />
<br />
Checking GitLab Shell ...<br />
<br />
GitLab Shell version >= 1.7.9 ? ... OK (1.8.0)<br />
Repo base directory exists? ... yes<br />
Repo base directory is a symlink? ... no<br />
Repo base owned by gitlab:gitlab? ... yes<br />
Repo base access is drwxrws---? ... yes<br />
update hook up-to-date? ... yes<br />
update hooks in repos are links: ... can't check, you have no projects<br />
Running /srv/gitlab/gitlab-shell/bin/check<br />
Check GitLab API access: OK<br />
Check directories and files:<br />
/srv/gitlab/repositories: OK<br />
/srv/gitlab/.ssh/authorized_keys: OK<br />
Test redis-cli executable: redis-cli 2.8.4<br />
Send ping to redis server: PONG<br />
gitlab-shell self-check successful<br />
<br />
Checking GitLab Shell ... Finished<br />
<br />
Checking Sidekiq ...<br />
<br />
Running? ... yes<br />
Number of Sidekiq processes ... 1<br />
<br />
Checking Sidekiq ... Finished<br />
<br />
Checking LDAP ...<br />
<br />
LDAP is disabled in config/gitlab.yml<br />
<br />
Checking LDAP ... Finished<br />
<br />
Checking GitLab ...<br />
<br />
Database config exists? ... yes<br />
Database is SQLite ... no<br />
All migrations up? ... fatal: Not a git repository (or any of the parent directories): .git<br />
yes<br />
GitLab config exists? ... yes<br />
GitLab config outdated? ... no<br />
Log directory writable? ... yes<br />
Tmp directory writable? ... yes<br />
Init script exists? ... no<br />
Try fixing it:<br />
Install the init script<br />
For more information see:<br />
doc/install/installation.md in section "Install Init Script"<br />
Please fix the error above and rerun the checks.<br />
Init script up-to-date? ... can't check because of previous errors<br />
projects have namespace: ... can't check, you have no projects<br />
Projects have satellites? ... can't check, you have no projects<br />
Redis version >= 2.0.0? ... yes<br />
Your git bin path is "/usr/bin/git"<br />
Git version >= 1.7.10 ? ... yes (1.8.5)<br />
<br />
Checking GitLab ... Finished<br />
</nowiki>}}<br />
<br />
To automatically launch GitLab at startup, enable the {{ic|gitlab.target}}, {{ic|gitlab-sidekiq}} and {{ic|gitlab-unicorn}} services.<br />
<br />
Now test your GitLab instance by visiting http://localhost:8080 or http://yourdomain.com and login with the default credentials:<br />
<br />
{{bc|<br />
username: root<br />
password: 5iveL!fe<br />
}}<br />
<br />
{{note|1=If your browser runs not on the machine where gitlab is running, modify your unicorn.rb in order to be able to test your setup without the use of a proxy. The corresponding line looks like this:<br />
<pre>listen "127.0.0.1:8080, :tcp_nopush => true</pre><br />
you should replace that with:<br />
<pre>listen "example.yourhost.com:8080, :tcp_nopush => true</pre><br />
}}<br />
<br />
== Advanced Configuration ==<br />
<br />
=== Custom SSH Connection ===<br />
If you are running SSH on a non-standard port, you must change the GitLab user's SSH config:<br />
{{hc|/var/lib/gitlab/.ssh/config|2=<br />
host localhost # Give your setup a name (here: override localhost)<br />
user gitlab # Your remote git user<br />
port 2222 # Your port number<br />
hostname 127.0.0.1; # Your server name or IP<br />
}}<br />
<br />
You also need to change the corresponding options (e.g. ssh_user, ssh_host, admin_uri) in the {{ic|/etc/webapps/gitlab/gitlab.yml}} file.<br />
<br />
=== HTTPS/SSL ===<br />
<br />
==== Change GitLab configs ====<br />
Modify {{ic|/etc/webapps/gitlab/shell.yml}} so the url to your GitLab site starts with {{ic|https://}}.<br />
Modify {{ic|/etc/webapps/gitlab/gitlab.yml}} so that {{ic|https:}} setting is set to {{ic|true}}.<br />
<br />
===Web server configuration===<br />
If you want to integrate Gitlab into a running web server instead of using its build-in http server Unicorn, then follow these instructions.<br />
<br />
===== Node.js =====<br />
You can easily set up an http proxy on port 443 to proxy traffic to the GitLab application on port 8080 using http-master for Node.js. After you have creates your domain's OpenSSL keys and have gotten you CA certificate (or self signed it), then go to https://github.com/CodeCharmLtd/http-master to learn how easy it is to proxy requests to GitLab using HTTPS. http-master is built on top of [https://github.com/nodejitsu/node-http-proxy node-http-proxy].<br />
<br />
====Nginx and unicorn====<br />
<br />
=====AUR Installation=====<br />
Setup [[Nginx]], and create the following directories (if not exist already):<br />
<br />
# mkdir /etc/nginx/servers-available<br />
# mkdir /etc/nginx/servers-enabled<br />
<br />
{{Note|You may need to change {{ic|localhost:8080}} with the correct gitlab address and {{ic|example.com}} to your desired server name.}}<br />
{{Tip|See [[Nginx#TLS.2FSSL|Nginx#TLS/SSL]] before enabling SSL.}}<br />
Create a file {{ic|/etc/nginx/servers-available/gitlab}} with the following content:<br />
<br />
{{hc|/etc/nginx/servers-available/gitlab|2=<br />
# Created by: Sameer Naik<br />
# Contributor: francoism90<br />
# Source: https://gist.github.com/sameersbn/becd1c976c3dc4866ef8<br />
upstream gitlab {<br />
server localhost:8080 fail_timeout=0;<br />
}<br />
<br />
server {<br />
listen 80;<br />
#listen 443 ssl; # uncomment to enable ssl<br />
keepalive_timeout 70;<br />
server_name example.com<br />
server_tokens off;<br />
#ssl_certificate ssl/example.com.crt;<br />
#ssl_certificate_key ssl/example.com.key;<br />
charset utf-8;<br />
root /dev/null;<br />
<br />
# Increase this if you want to upload larger attachments<br />
client_max_body_size 20m;<br />
<br />
location / {<br />
proxy_read_timeout 300;<br />
proxy_connect_timeout 300;<br />
proxy_redirect off;<br />
<br />
proxy_set_header X-Forwarded-Proto $scheme;<br />
proxy_set_header Host $http_host;<br />
proxy_set_header X-Real-IP $remote_addr;<br />
proxy_set_header X-Forwarded-Ssl on;<br />
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;<br />
proxy_set_header X-Forwarded-Proto $scheme;<br />
proxy_set_header X-Frame-Options SAMEORIGIN;<br />
<br />
proxy_pass http://localhost:8080;<br />
} <br />
}<br />
}}<br />
<br />
Make sure the following line exists at the end of the {{ic|http}} block in {{ic|/etc/nginx/nginx.conf}}:<br />
<br />
include servers-enabled/*;<br />
<br />
Enable the {{ic|github}} configuration:<br />
<br />
# ln -s /etc/nginx/servers-available/gitlab /etc/nginx/servers-enabled/gitlab<br />
<br />
Verify the new configuration:<br />
<br />
# nginx -t<br />
<br />
Finally, (re)start the {{ic|gitlab.target}}, {{ic|resque.target}} and {{ic|nginx.service}}.<br />
<br />
=====Manual Installation=====<br />
If you did not use AUR, you need to copy {{ic|/usr/lib/support/nginx/gitlab}} to {{ic|/etc/nginx/sites-available/}}.<br />
<br />
Run these commands to setup nginx:<br />
<br />
# ln -s /etc/nginx/sites-available/gitlab /etc/nginx/sites-enabled/gitlab<br />
<br />
Edit {{ic|/etc/nginx/sites-enabled/gitlab}} and change YOUR_SERVER_IP and YOUR_SERVER_FQDN to the IP address and fully-qualified domain name of the host serving Gitlab.<br />
<br />
Make sure the following line exists at the end of the {{ic|http}} block in {{ic|/etc/nginx/nginx.conf}}:<br />
<br />
include sites-enabled/*;<br />
<br />
Enable the {{ic|github}} configuration:<br />
<br />
# ln -s /etc/nginx/sites-available/gitlab /etc/nginx/sites-enabled/gitlab<br />
<br />
Verify the new configuration:<br />
<br />
# nginx -t<br />
<br />
Finally, (re)start the {{ic|gitlab.target}}, {{ic|resque.target}} and {{ic|nginx.service}}.<br />
<br />
====Apache and unicorn====<br />
<br />
[[Install]] {{Pkg|apache}} from the [[official repositories]].<br />
<br />
=====Configure Unicorn=====<br />
<br />
As the official installation guide instructs, copy the unicorn configuration file:<br />
# sudo -u git -H cp /usr/share/webapps/gitlab/config/unicorn.rb.example /usr/share/webapps/gitlab/config/unicorn.rb<br />
<br />
Now edit {{ic|config/unicorn.rb}} and add a listening port by uncommenting the following line:<br />
listen "127.0.0.1:8080"<br />
<br />
{{Tip| You can set a custom port if you want. Just remember to also include it in Apache's virtual host. See below.}}<br />
<br />
=====Create a virtual host for Gitlab=====<br />
<br />
Create a configuration file for Gitlab’s virtual host and insert the lines below adjusted accordingly. For the ssl section see [[LAMP#SSL]]. If you do not need it, remove it. Notice that the SSL virtual host needs a specific IP instead of generic. Also if you set a custom port for Unicorn, do not forget to set it at the BalanceMember line.<br />
<br />
You can use these [https://gitlab.com/gitlab-org/gitlab-recipes/blob/079f70dd2c091434a8dd04ed5b1a0d0e937cd361/web-server/apache/gitlab-ssl-apache2.4.conf examples] to get you started.<br />
<br />
=====Enable host and start unicorn=====<br />
<br />
Enable your Gitlab virtual host and reload [[Apache]]:<br />
{{hc|/etc/httpd/conf/httpd.conf| Include /etc/httpd/conf/extra/gitlab.conf}}<br />
<br />
Copy the Apache gitlab.conf file<br />
<br />
# sudo cp /etc/webapps/gitlab/apache.conf.example /etc/httpd/conf/extra/gitlab.conf<br />
<br />
Finally start unicorn:<br />
<br />
# systemctl start gitlab-unicorn<br />
<br />
=== Redis ===<br />
Using a Redis setup different from default (e.g. different address, port, unix socket) requires the environment variable ''REDIS_URL'' to be set accordingly for unicorn. This can be achieved by extending the systemd service file. Create a file ''/etc/systemd/system/gitlab-unicorn.service.d/redis.conf'' that injects the ''REDIS_URL'' environment variable:<br />
[Service]<br />
Environment=REDIS_URL=unix:///run/gitlab/redis.sock<br />
<br />
==Useful Tips==<br />
<br />
===Fix Rake Warning===<br />
When running rake tasks for the gitlab project, this error will occur: {{ic|fatal: Not a git repository (or any of the parent directories): .git}}. This is a bug in bundler, and it can be safely ignored. However, if you want to git rid of the error, the following method can be used:<br />
<br />
{{bc|1=<br />
# cd /usr/share/webapps/gitlab<br />
# sudo -u gitlab git init<br />
# sudo -u gitlab git commit -m "initial commit" --allow-empty<br />
}}<br />
<br />
===Hook into /var===<br />
{{bc|1=<br />
# mkdir -m700 /var/log/gitlab /var/tmp/gitlab<br />
# chown gitlab:gitlab /var/log/gitlab /var/tmp/gitlab<br />
# sudo -u gitlab -i<br />
# cd ~/gitlab<br />
# d=log; mv $d/* /var/$d/gitlab; rm -f $d/.gitkeep; rm -r $d && ln -s /var/$d/gitlab $d<br />
# d=tmp; mv $d/* /var/$d/gitlab; rm -f $d/.gitkeep; rm -r $d && ln -s /var/$d/gitlab $d<br />
}}<br />
<br />
===Hidden options===<br />
Go to Gitlab's home directory:<br />
# cd /usr/share/webapps/gitlab<br />
<br />
and run:<br />
{{hc|<nowiki># rake -T | grep gitlab</nowiki>|<nowiki><br />
rake gitlab:app:check # GITLAB | Check the configuration of the GitLab Rails app<br />
rake gitlab:backup:create # GITLAB | Create a backup of the GitLab system<br />
rake gitlab:backup:restore # GITLAB | Restore a previously created backup<br />
rake gitlab:check # GITLAB | Check the configuration of GitLab and its environment<br />
rake gitlab:cleanup:block_removed_ldap_users # GITLAB | Cleanup | Block users that have been removed in LDAP<br />
rake gitlab:cleanup:dirs # GITLAB | Cleanup | Clean namespaces<br />
rake gitlab:cleanup:repos # GITLAB | Cleanup | Clean repositories<br />
rake gitlab:env:check # GITLAB | Check the configuration of the environment<br />
rake gitlab:env:info # GITLAB | Show information about GitLab and its environment<br />
rake gitlab:generate_docs # GITLAB | Generate sdocs for project<br />
rake gitlab:gitlab_shell:check # GITLAB | Check the configuration of GitLab Shell<br />
rake gitlab:import:all_users_to_all_groups # GITLAB | Add all users to all groups (admin users are added as owners)<br />
rake gitlab:import:all_users_to_all_projects # GITLAB | Add all users to all projects (admin users are added as masters)<br />
rake gitlab:import:repos # GITLAB | Import bare repositories from gitlab_shell -> repos_path into GitLab project instance<br />
rake gitlab:import:user_to_groups[email] # GITLAB | Add a specific user to all groups (as a developer)<br />
rake gitlab:import:user_to_projects[email] # GITLAB | Add a specific user to all projects (as a developer)<br />
rake gitlab:satellites:create # GITLAB | Create satellite repos<br />
rake gitlab:setup # GITLAB | Setup production application<br />
rake gitlab:shell:build_missing_projects # GITLAB | Build missing projects<br />
rake gitlab:shell:install[tag,repo] # GITLAB | Install or upgrade gitlab-shell<br />
rake gitlab:shell:setup # GITLAB | Setup gitlab-shell<br />
rake gitlab:sidekiq:check # GITLAB | Check the configuration of Sidekiq<br />
rake gitlab:test # GITLAB | Run all tests<br />
rake gitlab:web_hook:add # GITLAB | Adds a web hook to the projects<br />
rake gitlab:web_hook:list # GITLAB | List web hooks<br />
rake gitlab:web_hook:rm # GITLAB | Remove a web hook from the projects<br />
rake setup # GITLAB | Setup gitlab db<br />
</nowiki>}}<br />
<br />
===Backup and restore===<br />
<br />
Create a backup of the gitlab system:<br />
# sudo -u gitlab -H rake RAILS_ENV=production gitlab:backup:create<br />
<br />
Restore the previously created backup file {{ic|/home/gitlab/gitlab/tmp/backups/20130125_11h35_1359131740_gitlab_backup.tar}}:<br />
# sudo -u gitlab -H rake RAILS_ENV=production gitlab:backup:restore BACKUP=/home/gitlab/gitlab/tmp/backups/20130125_11h35_1359131740<br />
<br />
{{Note| Backup folder is set in {{ic|config/gitlab.yml}}. GitLab backup and restore is documented [https://github.com/gitlabhq/gitlabhq/blob/master/doc/raketasks/backup_restore.md here].}}<br />
<br />
===Migrate from sqlite to mysql===<br />
<br />
Get latest code as described in [[#Update Gitlab]].<br />
Save data.<br />
# cd /home/gitlab/gitlab<br />
# sudo -u gitlab bundle exec rake db:data:dump RAILS_ENV=production<br />
<br />
Follow [[#Mysql]] instructions and then setup the database.<br />
# sudo -u gitlab bundle exec rake db:setup RAILS_ENV=production<br />
<br />
Finally restore old data.<br />
# sudo -u gitlab bundle exec rake db:data:load RAILS_ENV=production<br />
<br />
===Running GitLab with rvm===<br />
<br />
To run gitlab with rvm first you have to set up an rvm:<br />
<br />
curl -L https://get.rvm.io | bash -s stable --ruby=1.9.3<br />
<br />
{{Note|Version 1.9.3 is currently recommended to avoid some compatibility issues.}}<br />
<br />
For the complete installation you will want to be the final user (e.g. {{ic|git}}) so make sure to switch to this user and activate your rvm:<br />
<br />
su - git<br />
source "$HOME/.rvm/scripts/rvm"<br />
<br />
Then continue with the installation instructions from above. However, the systemd scripts will not work this way, because the environment for the rvm is not activated. The recommendation here is to create to separate shell scripts for {{ic|unicorn}} and {{ic|sidekiq}} to activate the environment and then start the service:<br />
<br />
{{hc|gitlab.sh|<nowiki><br />
#!/bin/sh<br />
source `/home/git/.rvm/bin/rvm 1.9.3 do rvm env --path`<br />
bundle exec "unicorn_rails -c /usr/share/webapps/gitlab/config/unicorn.rb -E production"</nowiki><br />
}}<br />
<br />
{{hc|sidekiq.sh|<nowiki><br />
#!/bin/sh<br />
source `/home/git/.rvm/bin/rvm 1.9.3 do rvm env --path`<br />
case $1 in<br />
start)<br />
bundle exec rake sidekiq:start RAILS_ENV=production<br />
;;<br />
stop)<br />
bundle exec rake sidekiq:stop RAILS_ENV=production<br />
;;<br />
*)<br />
echo "Usage $0 {start|stop}"<br />
esac<br />
</nowiki>}}<br />
<br />
Then modify the above systemd files so they use these scripts. Modify the given lines:<br />
<br />
{{hc|gitlab.service|<nowiki><br />
ExecStart=/home/git/bin/gitlab.sh<br />
</nowiki>}}<br />
{{hc|sidekiq.service|<nowiki><br />
ExecStart=/home/git/bin/sidekiq.sh start<br />
ExecStop=/home/git/bin/sidekiq.sh stop<br />
</nowiki>}}<br />
<br />
===Sending mails from Gitlab via SMTP===<br />
<br />
You might want to use a gmail (or other mail service) to send mails from your gitlab server. This avoids the need to install a mail daemon on the gitlab server.<br />
<br />
Adjust {{ic|smtp_settings.rb}} according to your mail server settings:<br />
<br />
{{hc|/usr/share/webapps/gitlab/config/initializers/smtp_settings.rb|<nowiki><br />
if Rails.env.production?<br />
Gitlab::Application.config.action_mailer.delivery_method = :smtp<br />
<br />
Gitlab::Application.config.action_mailer.smtp_settings = {<br />
address: 'smtp.gmail.com',<br />
port: 587,<br />
domain: 'gmail.com',<br />
user_name: 'username@gmail.com',<br />
password: 'application password',<br />
authentication: 'plain',<br />
enable_starttls_auto: true<br />
}<br />
end</nowiki>}}<br />
<br />
Gmail will reject mails received this way (and send you a mail that it did). You will need to disable secure authentication (follow the link in the rejection mail) to work around this. The more secure approach is to enable two-factor authentication for username@gmail.com and to set up an application password for this configuration file.<br />
<br />
==Troubleshooting==<br />
<br />
Sometimes things may not work as expected. Be sure to visit the [https://github.com/gitlabhq/gitlab-public-wiki/wiki/Trouble-Shooting-Guide Trouble Shooting Guide].<br />
<br />
=== HTTPS is not green (gravatar not using https) ===<br />
Redis caches gravatar images, so if you have visited your GitLab with http, then enabled https, gravatar will load up the non-secure images. You can clear the cache by doing<br />
<br />
cd /usr/share/webapps/gitlab<br />
RAILS_ENV=production bundle exec rake cache:clear<br />
<br />
as the gitlab user.<br />
<br />
=== Error at push bad line length character: API ===<br />
If you get the following error while trying to push<br />
fatal: protocol error: bad line length character: API<br />
<br />
Check that your {{ic|/etc/webapps/gitlab-shell/secret}} matches {{ic|/usr/share/webapps/gitlab/.gitlab_shell_secret}}<br />
<br />
If it is not the same, recreate the file with the following command<br />
ln -s /etc/webapps/gitlab-shell/secret /usr/share/webapps/gitlab/.gitlab_shell_secret<br />
<br />
==See also==<br />
*[https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/install/installation.md Official Documentation]<br />
*[https://gitlab.com/gitlab-org/gitlab-recipes Gitlab recipes with further documentation on running it with several webservers]<br />
*[https://github.com/gitlabhq/gitlabhq GitLab source code]</div>Beta990https://wiki.archlinux.org/index.php?title=Talk:GitLab&diff=413007Talk:GitLab2015-12-21T11:42:46Z<p>Beta990: /* Using Sudo instead of su - */ Added reply</p>
<hr />
<div>== Missing Section? ==<br />
It might just be me, but it seems like a section is missing. In start and test it says visit your domain, however unless I am missing something pretty major that shouldn't work since neither apache nor nginx are ever setup / pointed to the webapp.--[[User:Theflyingfool|Theflyingfool]] ([[User talk:Theflyingfool|talk]]) 08:15, 8 April 2014 (UTC)<br />
<br />
I don't have neither of them on my server, Gitlab uses own one, Unicorn, to deal with webapp.<br />
[[User:Kosciak9|Kosciak9]] ([[User talk:Kosciak9|talk]]) 12:17, 6 December 2015 (UTC)<br />
<br />
== Resolving dependencies and testing gitlab on remote server ==<br />
This is a reply to the question above, as well some things that was missed during the installation I made.<br />
<br />
I'm not sure if it should be added, so I'm putting it here for discussion:<br />
<br />
You should install the following packages, ''before'' installing the GitLab from AUR:<br />
* https://aur.archlinux.org/packages/ruby-bundler/<br />
* https://aur.archlinux.org/packages/gitlab-shell/<br />
<br />
Also, after finally starting the gitlab with unicorn, if you have installed gitlab on a remote server and not locally, you won't be able to access it using domain:8080. It is even mentioned in /etc/webapps/gitlab/unicorn.rb. In order to be able to access it, I have changed 127.0.0.1 to the servers IP, and made sure that shell.yml reflect the change as well (including the port).<br />
<br />
After restarting the daemons, I was able to access giltab using domain:8080.<br />
<br />
[[User:Tahvok|Tahvok]] ([[User talk:Tahvok|talk]]) 09:18, 15 May 2014 (UTC)<br />
<br />
== nginx ==<br />
After completing the steps above I continued to nginx installation, however, being not familiar with nginx it took me some time, so I'll put it here for discussion as well. This is the full guide, I know that some things are already mentioned in the page, just not very organized.<br />
<br />
After installing nginx, it is mentioned that you should make the following command:<br />
<br />
# ln -s /etc/nginx/sites-available/gitlab /etc/nginx/sites-enabled/gitlab<br />
<br />
However, it will not work, since there is no site-available or sites-enabled directories, with include section in nginx.conf. It is true however in debian installations, but since we're in arch everything comes with no changes from the distro side.<br />
<br />
Since there was no site-available file to copy the vhosts from, I read the official gitlab guide, and found that the file is located in /usr/share/webapps/gitlab/lib/support/nginx/ after installing the gitlab package.<br />
<br />
I just put everything inside the file to nginx.conf inside the ''http'' section, just before the last {{ic|<nowiki>}</nowiki>}}, and changed the following:<br />
* {{ic|server_name}} to reflect my server's domain.<br />
* Set {{ic|proxy_pass}} config to reflect unicorn listening address. I just put {{ic|localhost:8080}} in nginx.conf and set back unicorn.rb to point to 127.0.0.1 as it was before (including the port 8080).<br />
* Inside {{ic|upstream gitlab}} set {{ic|server}} to point to {{ic|unix:/usr/share/webapps/gitlab/tmp/sockets/gitlab.socket;}} - I'm NOT sure about this. I also had a permissions problem, so I changed group permission to http for the sockets folder.<br />
* Point the config {{ic|root}} to {{ic|/usr/share/webapps/gitlab/public}};<br />
* Comment out the ''gzip'' section - it was not working for me, and made the site with no assets, so I didn't bother with it.<br />
<br />
Edit shell.yml as follows:<br />
<br />
{{ic|gitlab_url: "http://domain/"}} - domain is the same as server_name in nginx.conf.<br />
<br />
Also make sure that in gitlab.yml the host is set to your domain and the port is the same as in nginx.conf.<br />
<br />
Restart the daemons:<br />
$ systemctl restart gitlab-sidekiq gitlab-unicorn nginx<br />
<br />
Should be working now.<br />
<br />
As I said, this is my rough way of installing it, so before I put it on the page, would like to know if that's the right steps.<br />
<br />
[[User:Tahvok|Tahvok]] ([[User talk:Tahvok|talk]]) 09:18, 15 May 2014 (UTC)<br />
<br />
== Ruby Version == <br />
<br />
Since gitlab does not support ruby 2.2 yet (see https://github.com/gitlabhq/gitlabhq/issues/8567 : I do get 500 errors on most operations), <br />
it seems it would be nice to amend this tutorial to state this fact and to explain how to install from 2.1. {{Unsigned|2015-03-17|Pascal.vanier}}<br />
<br />
== Satelites are removed ==<br />
<br />
The satalites are no longer used in a gitlab instance since 24-09-'15. IMO the section could be removed.<br />
<br />
== Ruby 2.1 or 2.2 ? ==<br />
<br />
Well, the AUR package needs the ruby2.1 package. BUT the wiki is about ruby2.2. That would be better to agree on this :p<br />
<br />
== Using Sudo instead of su - ==<br />
<br />
I don't have any root password on my pi, only my user password (for sudo). As the rest of the documentation uses sudo, it would be better to use sudo <br />
here too :<br />
https://wiki.archlinux.org/index.php?title=Gitlab&section=13<br />
<br />
For some reason all sudo - commands fail for me, not sure why. [[User:ElectricPrism|ElectricPrism]] ([[User talk:ElectricPrism|talk]]) 08:10, 21 December 2015 (UTC)<br />
:I'm also having issues without being root, unfortunately there are more issues, and I couldn't install (the latest version) at all.<br />
:Going to add Stub template, because more commands listed doesn't seem to work (correctly).<br />
:[[User:Beta990|Beta990]] ([[User talk:Beta990|talk]]) 11:42, 21 December 2015 (UTC)</div>Beta990https://wiki.archlinux.org/index.php?title=Nginx&diff=412848Nginx2015-12-19T23:27:48Z<p>Beta990: /* See also */ Removed dead/double links</p>
<hr />
<div>{{Lowercase title}}<br />
[[Category:Web server]]<br />
[[de:Nginx]]<br />
[[ja:Nginx]]<br />
[[ru:Nginx]]<br />
[[zh-CN:Nginx]]<br />
[[Wikipedia:nginx|nginx]] (pronounced "engine X"), is a free, open-source, high-performance HTTP server and reverse proxy, as well as an IMAP/POP3 proxy server, written by Igor Sysoev in 2005. According to Netcraft's [http://news.netcraft.com/archives/2015/04/20/april-2015-web-server-survey.html April 2015 Web Server Survey], nginx now hosts 14.48% of all domains worldwide, while [[Apache]] hosts about 38.39%. nginx is now well known for its stability, rich feature set, simple configuration, and low resource consumption.<br />
<br />
== Installation ==<br />
<br />
[[Install]] the package {{Pkg|nginx}}.<br />
<br />
For a Ruby on Rails setup with nginx, see [[Ruby on Rails#The Perfect Rails Setup]].<br />
<br />
For a chroot-based installation for additional security, see [[#Installation in a chroot]].<br />
<br />
== Running ==<br />
<br />
Start/enable {{ic|nginx.service}} [[systemd#Using units|using systemd]].<br />
<br />
The default served page at http://127.0.0.1 is {{ic|/usr/share/nginx/html/index.html}}.<br />
<br />
== Configuration ==<br />
<br />
First steps with nginx are described in the [http://nginx.org/en/docs/beginners_guide.html Beginner’s Guide]. You can modify the configuration by editing the files in {{ic|/etc/nginx/}} The main configuration file is located at {{ic|/etc/nginx/nginx.conf}}.<br />
<br />
More details and examples can be found in http://wiki.nginx.org/Configuration and the [http://nginx.org/en/docs/ official documentation].<br />
<br />
The examples below cover the most common use cases. It is assumed that you use the default location for documents ({{ic|/usr/share/nginx/html}}). If that is not the case, substitute your path instead.<br />
<br />
=== Configuration Example ===<br />
{{hc|/etc/nginx/nginx.conf|<nowiki><br />
user http;<br />
worker_processes auto;<br />
pcre_jit on;<br />
<br />
events {<br />
worker_connections 2048;<br />
}<br />
<br />
<br />
http {<br />
include mime.types;<br />
default_type application/octet-stream;<br />
# include servers-enabled/*; # See Server blocks<br />
}<br />
</nowiki>}}<br />
<br />
=== General configuration ===<br />
<br />
==== Processes and connections ====<br />
<br />
You should choose a fitting value for {{ic|worker_processes}}. This settings ultimately defines how many connection nginx will accept and how many processors it will be able to make use of. Generally, making it the number of hardware threads in your system is a good start. Alternatively, {{ic|worker_processes}} accepts the {{ic|auto}} value since versions 1.3.8 and 1.2.5, which will try to autodetect the optimal value ([http://nginx.org/en/docs/ngx_core_module.html#worker_processes source]).<br />
<br />
The maximum connections nginx will accept is given by {{ic|1=max_clients = worker_processes * worker_connections}}.<br />
<br />
==== Running under different user ====<br />
<br />
By default nginx runs as user {{ic|nobody}}. To run it as another user, change the {{ic|user}} line in {{ic|nginx.conf}}:<br />
<br />
{{hc|/etc/nginx/nginx.conf|<br />
user ''myuser'' ''mygroup''; # e.g. http<br />
}}<br />
<br />
Nginx should now run as user {{ic|myuser}} and under group {{ic|mygroup}}. If the group is omitted, a group whose name equals that of user is used.<br />
<br />
==== Server blocks ====<br />
<br />
It is possible to serve multiple domains using {{ic|server}} blocks. It may be referred as "VirtualHosts", however this is an [[Apache]] term. The usage of {{ic|server}} blocks also differs to [http://wiki.nginx.org/ServerBlockExample Apache].<br />
<br />
In the example below the server listens for incoming connections for two domains: {{ic|domainname1.dom}} and {{ic|domainname2.dom}}:<br />
<br />
{{hc|/etc/nginx/nginx.conf|<nowiki><br />
...<br />
server {<br />
listen 80;<br />
server_name domainname1.dom;<br />
root /usr/share/nginx/domainname1.dom/html;<br />
location / {<br />
index index.php index.html index.htm;<br />
}<br />
}<br />
<br />
server {<br />
listen 80;<br />
server_name domainname2.dom;<br />
root /usr/share/nginx/domainname2.dom/html;<br />
...<br />
}<br />
...<br />
</nowiki>}}<br />
<br />
[[Restart]] the {{ic|nginx}} service to apply any changes.<br />
<br />
You should configure a DNS-server like [[BIND]] or [[dnsmasq]] so that these domain names could be resolved for connecting clients.<br />
<br />
For now you can just add them manually in {{ic|/etc/hosts}} replacing {{ic|192.168.0.101}} with the actual IP address of server:<br />
<br />
192.168.0.101 domainname1.dom<br />
192.168.0.101 domainname2.dom<br />
<br />
=====Managing server entries=====<br />
<br />
It may be easier to use an [[Apache]] like [[Apache#Managing_many_virtual_hosts|Virtual hosts]] system.<br />
<br />
Create the following directories:<br />
<br />
# mkdir /etc/nginx/servers-available<br />
# mkdir /etc/nginx/servers-enabled<br />
<br />
Create a file inside the {{ic|servers-available}} directory that contains one or more server blocks:<br />
<br />
{{hc|/etc/nginx/servers-available/example|<nowiki><br />
server {<br />
..<br />
}<br />
</nowiki>}}<br />
<br />
Append the following line at the end of the {{ic|http}} block in /etc/nginx/nginx.conf: <br />
<br />
include servers-enabled/*;<br />
<br />
To enable a {{ic|server}}, simple create a symlink:<br />
<br />
# ln -s /etc/nginx/servers-available/example /etc/nginx/servers-enabled/example<br />
<br />
To remove a {{ic|server}}, delete the symlink:<br />
<br />
# rm -rf /etc/nginx/servers-enabled/example<br />
<br />
Reload or restart {{ic|nginx}} service to enable the new configuration.<br />
<br />
==== TLS/SSL ====<br />
<br />
{{pkg|openssl}} provides TLS/SSL support and is installed by default on Arch installations.<br />
<br />
{{Tip|You may want to read the [http://nginx.org/en/docs/http/ngx_http_ssl_module.html#ssl_certificate ngx_http_ssl_module] docs first before configuring SSL}}<br />
<br />
Create a private key and self-signed certificate. This is adequate for most installations that do not require a [[wikipedia:Certificate_signing_request|CSR]]:<br />
<br />
# mkdir /etc/nginx/ssl<br />
# cd /etc/nginx/ssl<br />
# openssl req -new -x509 -nodes -newkey rsa:4096 -keyout server.key -out server.crt -days 1095<br />
# chmod 400 server.key<br />
# chmod 444 server.crt<br />
<br />
{{Note | The -days switch is optional and RSA keysize can be as low as 2048 (default).}}<br />
<br />
If you need to create a [[wikipedia:Certificate_signing_request|CSR]], follow these keygen instructions instead of the above:<br />
<br />
# mkdir /etc/nginx/ssl<br />
# cd /etc/nginx/ssl<br />
# openssl genpkey -algorithm RSA -pkeyopt rsa_keygen_bits:4096 -out server.key<br />
# chmod 400 server.key<br />
# openssl req -new -sha256 -key server.key -out server.csr<br />
# openssl x509 -req -days 1095 -in server.csr -signkey server.key -out server.crt<br />
<br />
{{Note |For more openssl options, read the [https://www.openssl.org/docs/apps/openssl.html man page] or peruse openssl's [https://www.openssl.org/docs/ extensive documentation].}}<br />
<br />
{{Warning|If you plan on implementing SSL/TLS, know that some variations and implementations are [https://weakdh.org/#affected still] [[wikipedia:Transport_Layer_Security#Attacks_against_TLS.2FSSL|vulnerable to attack]]. For details on these current vulnerabilities within SSL/TLS and how to apply appropriate changes to nginx, visit http://disablessl3.com/ and https://weakdh.org/sysadmin.html}}<br />
<br />
Example of a {{ic|nginx.conf}} using SSL:<br />
<br />
{{hc|/etc/nginx/nginx.conf|<nowiki><br />
http {<br />
ssl_ciphers "EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH";<br />
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;<br />
ssl_prefer_server_ciphers on;<br />
ssl_session_cache shared:SSL:10m;<br />
add_header Strict-Transport-Security "max-age=63072000; includeSubdomains; preload";<br />
add_header X-Frame-Options DENY;<br />
add_header X-Content-Type-Options nosniff;<br />
ssl_session_tickets off;<br />
ssl_stapling on;<br />
ssl_stapling_verify on;<br />
resolver 8.8.8.8 8.8.4.4 valid=300s; # Google DNS Servers<br />
resolver_timeout 5s;<br />
}<br />
<br />
server {<br />
#listen 80; # Uncomment to also listen for HTTP requests<br />
listen 443 ssl;<br />
server_name localhost;<br />
<br />
ssl_certificate ssl/server.crt;<br />
ssl_certificate_key ssl/server.key;<br />
<br />
root /usr/share/nginx/html;<br />
location / {<br />
index index.html index.htm;<br />
}<br />
}<br />
</nowiki>}}<br />
<br />
{{Tip|<br />
* Mozilla has a useful [https://wiki.mozilla.org/Security/Server_Side_TLS SSL/TLS article] which includes [https://wiki.mozilla.org/Security/Server_Side_TLS#Nginx nginx specific] configuration guidelines as well as an [https://mozilla.github.io/server-side-tls/ssl-config-generator/ automated tool] to help create a more secure configuration.<br />
* [https://cipherli.st Cipherli.st] provides strong SSL implementation examples and tutorial for most modern webservers.<br />
}}<br />
<br />
[[Restart]] the {{ic|nginx}} service to apply any changes.<br />
<br />
=== FastCGI ===<br />
<br />
FastCGI, also FCGI, is a protocol for interfacing interactive programs with a web server. FastCGI is a variation on the earlier CGI (Common Gateway Interface); FastCGI's main aim is to reduce the overhead associated with interfacing the web server and CGI programs, allowing a server to handle more web page requests at once.<br />
<br />
FastCGI technology is introduced into nginx to work with many external tools, i.e.: Perl, [[PHP]] and [[Python]].<br />
<br />
==== PHP implementation ====<br />
<br />
[http://php-fpm.org/ PHP-FPM] is the recommended solution to run as FastCGI server for PHP.<br />
<br />
===== PHP configuration =====<br />
<br />
[[Install]] the {{Pkg|php}} and {{Pkg|php-fpm}} packages.<br />
<br />
The {{ic|open_basedir}} in {{ic|/etc/php/php.ini}} has to list base directories which contain PHP files, like {{ic|/usr/share/nginx/}} and {{ic|/usr/share/webapps/}}:<br />
<br />
open_basedir = /tmp/:/usr/share/nginx/:/usr/share/pear/:/usr/share/webapps/<br />
<br />
After that let us configure modules you need. For example to use sqlite3 you should install {{Pkg|php-sqlite}}. Then enable it in {{ic|/etc/php/php.ini}} by uncommenting following line:<br />
<br />
extension=sqlite3.so<br />
<br />
The main configuration file of PHP-FPM is {{ic|/etc/php/php-fpm.conf}}. [[Enable]] and [[start]] the {{ic|php-fpm}} service.<br />
<br />
{{Note|If you run nginx in chrooted environment (chroot is {{ic|/srv/nginx-jail}}, web pages are served at {{ic|/srv/nginx-jail/www}}), you must modify the file {{ic|/etc/php/php-fpm.conf}} to include the {{ic|chroot /srv/nginx-jail}} and {{ic|1=listen = /srv/nginx-jail/run/php-fpm/php-fpm.sock}} directives within the pool section (a default one is {{ic|[www]}}). Create the directory for the socket file, if missing.}}<br />
<br />
====== MariaDB ======<br />
<br />
Configure MySQL/MariaDB as described in [[MariaDB]].<br />
<br />
Uncomment [http://www.php.net/manual/en/mysqlinfo.api.choosing.php at least one] of the following lines in {{ic|/etc/php/php.ini}}:<br />
<br />
extension=pdo_mysql.so<br />
extension=mysqli.so<br />
<br />
{{Warning|As of PHP 5.5, {{ic|mysql.so}} is [http://www.php.net/manual/de/migration55.deprecated.php deprecated] and will fill up your log files. It is no longer available in PHP 7.0.}}<br />
<br />
You can add minor privileged MySQL users for your web scripts. You might also want to edit {{ic|/etc/mysql/my.cnf}} and uncomment the {{ic|skip-networking}} line so the MySQL server is only accessible by the localhost. You have to restart MySQL for changes to take effect.<br />
<br />
{{Tip|You may want to install a tool like [[phpMyAdmin]], [[Adminer]] or {{Pkg|mysql-workbench}} to work with your databases.}}<br />
<br />
===== nginx configuration =====<br />
<br />
====== Adding to main configuration ======<br />
<br />
Inside each {{ic|server}} block serving a PHP web application should appear a {{ic|location}} block similar to:<br />
<br />
location ~ \.php$ {<br />
fastcgi_pass unix:/run/php-fpm/php-fpm.sock;<br />
fastcgi_index index.php;<br />
include fastcgi.conf;<br />
}<br />
<br />
If it is needed to process other extensions with PHP (e.g. ''.html'' and ''.htm''):<br />
<br />
location ~ \.(php'''|html|htm''')$ {<br />
fastcgi_pass unix:/run/php-fpm/php-fpm.sock;<br />
fastcgi_index index.php;<br />
include fastcgi.conf;<br />
}<br />
<br />
Non ''.php'' extension processing in php-fpm should be explicitly added in {{ic|/etc/php/php-fpm.conf}}:<br />
<br />
security.limit_extensions = .php .html .htm<br />
<br />
{{Note|Pay attention to the {{ic|fastcgi_pass}} argument, as it must be the TCP or Unix socket defined by the chosen FastCGI server in its config file. The '''default''' (Unix) socket for {{ic|php-fpm}} is:<br />
<br />
fastcgi_pass unix:/run/php-fpm/php-fpm.sock;<br />
<br />
You might use the common TCP socket, '''not default''',<br />
<br />
fastcgi_pass 127.0.0.1:9000;<br />
<br />
Unix domain sockets should however be faster.}}<br />
<br />
The example shown below is a copy of a working configuration. Notice that in this example the {{ic|root}} path in specified directly under {{ic|server}}, and not inside {{ic|location}} (as it is in the default config).<br />
<br />
server {<br />
listen 80;<br />
server_name localhost;<br />
root /usr/share/nginx/html;<br />
location / {<br />
index index.html index.htm index.php;<br />
}<br />
<br />
location ~ \.php$ {<br />
#fastcgi_pass 127.0.0.1:9000; (depending on your php-fpm socket configuration)<br />
fastcgi_pass unix:/run/php-fpm/php-fpm.sock;<br />
fastcgi_index index.php;<br />
include fastcgi.conf;<br />
}<br />
}<br />
<br />
======PHP configuration file======<br />
If using multiple {{ic|server}} blocks with enabled PHP support, it might be easier to create a PHP config file instead:<br />
{{hc|/etc/nginx/conf/php.conf|<nowiki><br />
location ~ \.php$ {<br />
fastcgi_pass unix:/run/php-fpm/php-fpm.sock;<br />
fastcgi_index index.php;<br />
include fastcgi.conf;<br />
}<br />
</nowiki>}}<br />
<br />
To enable PHP support for a particular server, simple include {{ic|php.conf}}:<br />
{{hc|/etc/nginx/nginx.conf|<nowiki><br />
server = {<br />
server_name example.com;<br />
...<br />
include php.conf;<br />
}<br />
</nowiki>}}<br />
<br />
===== Test configuration =====<br />
<br />
You need to [[restart]] the {{ic|php-fpm}} and {{ic|nginx}} daemons if the configuration has been changed in order to apply changes.<br />
<br />
To test the FastCGI implementation, create a new PHP file inside the {{ic|root}} folder containing:<br />
<br />
<?php<br />
phpinfo();<br />
?><br />
<br />
Navigate this file inside a browser and you will see the informational page with the current PHP configuration.<br />
<br />
See [[#Troubleshooting]] section if you are experiencing problems with your configuration.<br />
<br />
==== CGI implementation ====<br />
<br />
This implementation is needed for CGI applications.<br />
<br />
===== fcgiwrap =====<br />
<br />
[[Install]] the {{Pkg|fcgiwrap}}. The configuration file is {{ic|/usr/lib/systemd/system/fcgiwrap.socket}}. [[Enable]] and [[start]] the {{ic|fcgiwrap.socket}}.<br />
<br />
====== Multiple worker threads ======<br />
<br />
If you want to spawn multiple worker threads, it is recommended that you use {{AUR|multiwatch}}{{Broken package link|{{aur-mirror|multiwatch}}}}, which will take care of restarting crashed children. You will need to use {{ic|spawn-fcgi}} to create the unix socket, as multiwatch seems unable to handle the systemd-created socket, even though fcgiwrap itself does not have any trouble if invoked directly in the unit file.<br />
<br />
Copy the unit file from {{ic|/usr/lib/systemd/system/fcgiwrap.service}} to {{ic|/etc/systemd/system/fcgiwrap.service}} (and the {{ic|fcgiwrap.socket}} unit, if present), and modify the {{ic|ExecStart}} line to suit your needs. Here is a unit file that uses {{AUR|multiwatch}}{{Broken package link|{{aur-mirror|multiwatch}}}}. Make sure {{ic|fcgiwrap.socket}} is not started or enabled, because it will conflict with this unit:<br />
<br />
{{hc|/etc/systemd/system/fcgiwrap.service|2=<br />
[Unit]<br />
Description=Simple CGI Server<br />
After=nss-user-lookup.target<br />
<br />
[Service]<br />
ExecStartPre=/bin/rm -f /run/fcgiwrap.socket<br />
ExecStart=/usr/bin/spawn-fcgi -u http -g http -s /run/fcgiwrap.sock -n -- /usr/bin/multiwatch -f 10 -- /usr/sbin/fcgiwrap<br />
ExecStartPost=/usr/bin/chmod 660 /run/fcgiwrap.sock<br />
PrivateTmp=true<br />
Restart=on-failure<br />
<br />
[Install]<br />
WantedBy=multi-user.target<br />
}}<br />
<br />
Tweak {{ic|-f 10}} to change the number of children that are spawned.<br />
<br />
{{Warning|The {{ic|ExecStartPost}} line is required because of strange behaviour I'm seeing when I use the {{ic|-M 660}} option for {{ic|spawn-fcgi}}. The wrong mode is set. This may be a bug?}}<br />
<br />
===== nginx configuration =====<br />
<br />
Inside each {{ic|server}} block serving a CGI web application should appear a {{ic|location}} block similar to:<br />
<br />
location ~ \.cgi$ {<br />
root /path/to/server/cgi-bin;<br />
fastcgi_pass unix:/run/fcgiwrap.sock;<br />
include fastcgi.conf;<br />
}<br />
<br />
The default socket file for {{ic|fcgiwrap}} is {{ic|/run/fcgiwrap.sock}}.<br />
<br />
If you keep getting a {{ic|502 - bad Gateway}} error, you should check if your CGI-application first announces the mime-type of the following content. For html this needs to be {{ic|Content-type: text/html}}.<br />
<br />
== Installation in a chroot ==<br />
<br />
Installing nginx in a [[chroot]] adds an additional layer of security. For maximum security the chroot should include only the files needed to run the nginx server and all files should have the most restrictive permissions possible, e.g., as much as possible should be owned by root, directories such as {{ic|/usr/bin}} should be unreadable and unwriteable, etc.<br />
<br />
Arch comes with an {{ic|http}} user and group by default which will run the server. The chroot will be in {{ic|/srv/http}}.<br />
<br />
A perl script to create this jail is available at [https://gist.github.com/4365696 jail.pl gist]. You can either use that or follow the instructions in this article. It expects to be run as root. You will need to uncomment a line before it makes any changes.<br />
<br />
=== Create necessary devices ===<br />
<br />
nginx needs {{ic|/dev/null}}, {{ic|/dev/random}}, and {{ic|/dev/urandom}}. To install these in the chroot create the {{ic|/dev/}} directory and add the devices with ''mknod''. Avoid mounting all of {{ic|/dev/}} to ensure that, even if the chroot is compromised, an attacker must break out of the chroot to access important devices like {{ic|/dev/sda1}}.<br />
<br />
{{Tip|Be sure that {{ic|/srv/http}} is mounted without no-dev option}}<br />
{{Tip|See {{ic|man mknod}} and {{ic|<nowiki>ls -l /dev/{null,random,urandom}</nowiki>}} to better understand the ''mknod'' options.}}<br />
<br />
# export JAIL=/srv/http<br />
# mkdir $JAIL/dev<br />
# mknod -m 0666 $JAIL/dev/null c 1 3<br />
# mknod -m 0666 $JAIL/dev/random c 1 8<br />
# mknod -m 0444 $JAIL/dev/urandom c 1 9<br />
<br />
=== Create necessary directories ===<br />
<br />
nginx requires a bunch of files to run properly. Before copying them over, create the folders to store them. This assumes your nginx document root will be {{ic|/srv/http/www}}.<br />
<br />
# mkdir -p $JAIL/etc/nginx/logs<br />
# mkdir -p $JAIL/usr/{lib,bin}<br />
# mkdir -p $JAIL/usr/share/nginx<br />
# mkdir -p $JAIL/var/{log,lib}/nginx<br />
# mkdir -p $JAIL/www/cgi-bin<br />
# mkdir -p $JAIL/{run,tmp}<br />
# cd $JAIL; ln -s usr/lib lib<br />
<br />
{{Note|If using a 64 bit kernel you will need to create symbolic links {{ic|lib64}} and {{ic|usr/lib64}} to {{ic|usr/lib}}: {{ic|cd $JAIL; ln -s usr/lib lib64}} and {{ic|cd $JAIL/usr; ln -s lib lib64}}.}}<br />
<br />
Then mount {{ic|$JAIL/tmp}} and {{ic|$JAIL/run}} as tmpfs's. The size should be limited to ensure an attacker cannot eat all the RAM.<br />
<br />
# mount -t tmpfs none $JAIL/run -o 'noexec,size=1M'<br />
# mount -t tmpfs none $JAIL/tmp -o 'noexec,size=100M'<br />
<br />
In order to preserve the mounts across reboots, the following entries should be added to {{ic|/etc/fstab}}:<br />
<br />
{{hc|/etc/fstab|<nowiki><br />
tmpfs /srv/http/run tmpfs rw,noexec,relatime,size=1024k 0 0<br />
tmpfs /srv/http/tmp tmpfs rw,noexec,relatime,size=102400k 0 0<br />
</nowiki>}}<br />
<br />
=== Populate the chroot ===<br />
<br />
First copy over the easy files.<br />
<br />
# cp -r /usr/share/nginx/* $JAIL/usr/share/nginx<br />
# cp -r /usr/share/nginx/html/* $JAIL/www<br />
# cp /usr/bin/nginx $JAIL/usr/bin/<br />
# cp -r /var/lib/nginx $JAIL/var/lib/nginx<br />
<br />
Now copy over required libraries. Use ''ldd'' to list them and then copy them all to the correct location. Copying is preferred over hardlinks to ensure that even if an attacker gains write access to the files they cannot destroy or alter the true system files.<br />
<br />
{{hc|$ ldd /usr/bin/nginx|<nowiki><br />
linux-vdso.so.1 (0x00007fffc41fe000)<br />
libpthread.so.0 => /usr/lib/libpthread.so.0 (0x00007f57ec3e8000)<br />
libcrypt.so.1 => /usr/lib/libcrypt.so.1 (0x00007f57ec1b1000)<br />
libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x00007f57ebead000)<br />
libm.so.6 => /usr/lib/libm.so.6 (0x00007f57ebbaf000)<br />
libpcre.so.1 => /usr/lib/libpcre.so.1 (0x00007f57eb94c000)<br />
libssl.so.1.0.0 => /usr/lib/libssl.so.1.0.0 (0x00007f57eb6e0000)<br />
libcrypto.so.1.0.0 => /usr/lib/libcrypto.so.1.0.0 (0x00007f57eb2d6000)<br />
libdl.so.2 => /usr/lib/libdl.so.2 (0x00007f57eb0d2000)<br />
libz.so.1 => /usr/lib/libz.so.1 (0x00007f57eaebc000)<br />
libGeoIP.so.1 => /usr/lib/libGeoIP.so.1 (0x00007f57eac8d000)<br />
libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0x00007f57eaa77000)<br />
libc.so.6 => /usr/lib/libc.so.6 (0x00007f57ea6ca000)<br />
/lib64/ld-linux-x86-64.so.2 (0x00007f57ec604000)</nowiki>}}<br />
<br />
# cp /lib64/ld-linux-x86-64.so.2 $JAIL/lib<br />
<br />
For files residing in {{ic|/usr/lib}} you may try the following one-liner:<br />
<br />
# cp $(ldd /usr/bin/nginx | grep /usr/lib | sed -sre 's/(.+)(\/usr\/lib\/\S+).+/\2/g') $JAIL/usr/lib<br />
<br />
{{Note|Do not try to copy {{ic|linux-vdso.so}}: it is not a real library and does not exist in {{ic|/usr/lib}}. Also {{ic|ld-linux-x86-64.so}} will likely be listed in {{ic|/lib64}} for a 64 bit system.}}<br />
<br />
Copy over some miscellaneous but necessary libraries and system files.<br />
<br />
# cp /usr/lib/libnss_* $JAIL/usr/lib<br />
# cp -rfvL /etc/{services,localtime,nsswitch.conf,nscd.conf,protocols,hosts,ld.so.cache,ld.so.conf,resolv.conf,host.conf,nginx} $JAIL/etc<br />
<br />
Create restricted user/group files for the chroot. This way only the users needed for the chroot to function exist as far as the chroot knows, and none of the system users/groups are leaked to attackers should they gain access to the chroot.<br />
<br />
{{hc|$JAIL/etc/group|<br />
http:x:33:<br />
nobody:x:99:<br />
}}<br />
<br />
{{hc|$JAIL/etc/passwd|<br />
http:x:33:33:http:/:/bin/false<br />
nobody:x:99:99:nobody:/:/bin/false<br />
}}<br />
<br />
{{hc|$JAIL/etc/shadow|<br />
http:x:14871::::::<br />
nobody:x:14871::::::<br />
}}<br />
<br />
{{hc|$JAIL/etc/gshadow|<br />
http:::<br />
nobody:::<br />
}}<br />
<br />
# touch $JAIL/etc/shells<br />
# touch $JAIL/run/nginx.pid<br />
<br />
Finally make set very restrictive permissions. As much as possible should be owned by root and set unwritable.<br />
<br />
# chown -R root:root $JAIL/<br />
<br />
# chown -R http:http $JAIL/www<br />
# chown -R http:http $JAIL/etc/nginx<br />
# chown -R http:http $JAIL/var/{log,lib}/nginx<br />
# chown http:http $JAIL/run/nginx.pid<br />
<br />
# find $JAIL/ -gid 0 -uid 0 -type d -print | xargs sudo chmod -rw<br />
# find $JAIL/ -gid 0 -uid 0 -type d -print | xargs sudo chmod +x<br />
# find $JAIL/etc -gid 0 -uid 0 -type f -print | xargs sudo chmod -x<br />
# find $JAIL/usr/bin -type f -print | xargs sudo chmod ug+rx<br />
# find $JAIL/ -group http -user http -print | xargs sudo chmod o-rwx<br />
# chmod +rw $JAIL/tmp<br />
# chmod +rw $JAIL/run<br />
<br />
If your server will bind port 80 (or any other port in range [1-1023]), give the chrooted executable permission to bind these ports without root.<br />
<br />
# setcap 'cap_net_bind_service=+ep' $JAIL/usr/bin/nginx<br />
<br />
=== Modify nginx.service to start chroot ===<br />
<br />
Before modifying the {{ic|nginx.service}} unit file, it may be a good idea to copy it to {{ic|/etc/systemd/system/}} since the unit files there take priority over those in {{ic|/usr/lib/systemd/system/}}. This means upgrading nginx would not modify your custom ''.service'' file.<br />
<br />
# cp /usr/lib/systemd/system/nginx.service /etc/systemd/system/nginx.service<br />
<br />
The systemd unit must be changed to start up nginx in the chroot, as the http user, and store the pid file in the chroot.<br />
<br />
{{Note|I'm not sure if the pid file needs to be stored in the chroot jail.}}<br />
<br />
{{hc|/etc/systemd/system/nginx.service|<nowiki><br />
[Unit]<br />
Description=A high performance web server and a reverse proxy server<br />
After=syslog.target network.target<br />
<br />
[Service]<br />
Type=forking<br />
PIDFile=/srv/http/run/nginx.pid<br />
ExecStartPre=/usr/bin/chroot --userspec=http:http /srv/http /usr/bin/nginx -t -q -g 'pid /run/nginx.pid; daemon on; master_process on;'<br />
ExecStart=/usr/bin/chroot --userspec=http:http /srv/http /usr/bin/nginx -g 'pid /run/nginx.pid; daemon on; master_process on;'<br />
ExecReload=/usr/bin/chroot --userspec=http:http /srv/http /usr/bin/nginx -g 'pid /run/nginx.pid; daemon on; master_process on;' -s reload<br />
ExecStop=/usr/bin/chroot --userspec=http:http /srv/http /usr/bin/nginx -g 'pid /run/nginx.pid;' -s quit<br />
<br />
[Install]<br />
WantedBy=multi-user.target</nowiki>}}<br />
<br />
{{Note|Upgrading nginx with pacman will not upgrade the chrooted nginx installation. You have to take care of the updates manually by repeating some of the steps above. Do not forget to also update the libraries it links against.}}<br />
<br />
You can now safely get rid of the non-chrooted nginx installation.<br />
<br />
# pacman -Rsc nginx<br />
<br />
If you do not remove the non-chrooted nginx installation, you may want to make sure that the running nginx process is in fact the chrooted one. You can do so by checking where {{ic|/proc/''PID''/root}} symmlinks to. If should link to {{ic|/srv/http}} instead of {{ic|/}}.<br />
<br />
# ps -C nginx | awk '{print $1}' | sed 1d | while read -r PID; do ls -l /proc/$PID/root; done<br />
<br />
== Troubleshooting ==<br />
<br />
=== Configuration validation ===<br />
<br />
# nginx -t<br />
<br />
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok<br />
nginx: configuration file /etc/nginx/nginx.conf test is successful<br />
<br />
=== Accessing local IP redirects to localhost ===<br />
<br />
Solution from the Arch Linux [https://bbs.archlinux.org/viewtopic.php?pid=780561#p780561 forum].<br />
<br />
In {{ic|/etc/nginx/nginx.conf}} locate the {{ic|server_name localhost}} line without a {{ic|#}} in front of it, and add below:<br />
<br />
server_name_in_redirect off;<br />
<br />
Default behavior is that nginx redirects any requests to the value given as {{ic|server_name}} in the config.<br />
<br />
=== Permissions ===<br />
<br />
{{Accuracy|It's better to remedy the cause rather than the symptom. The ownership of the newly created files will be inherited if the [[wikipedia:Setuid#setuid_and_setgid_on_directories|setgid]] bit is set on the directory, permissions for new files can be set by configuring [[umask]] accordingly.}}<br />
<br />
It may be necessary to give the correct permissions to {{ic|/usr/share/nginx*}} (e.g. allow users to {{ic|read}}, {{ic|write}} & {{ic|modified}} files and/or directories).<br />
<br />
The following script may be useful to restore and/or set permissions:<br />
#!/bin/sh<br />
chown -R http:http /usr/share/nginx # set owner/group files/directories to 'http'<br />
find /usr/share/nginx -type d -exec chmod 775 {} \; # allow users part of 'http' group to modify directories<br />
find /usr/share/nginx -type f -exec chmod 664 {} \; # allow users part of 'http' group to modify files<br />
<br />
You may want to run the script as a [[cron|cronjob]], preventing permissions issues.<br />
<br />
=== Error: The page you are looking for is temporarily unavailable. Please try again later. (502 Bad Gateway) ===<br />
<br />
This is because the FastCGI server has not been started, or the socket used has wrong permissions.<br />
<br />
Try [https://stackoverflow.com/questions/4252368/nginx-502-bad-gateway/16497957#16497957 out this answer] to fix the 502 error.<br />
<br />
In Archlinux, the configure file mentioned in above link is {{ic|/etc/php/php-fpm.conf}}.<br />
<br />
On some condition, {{ic|fcgiwrap.socket}} may not start properly and create a useless unix domain socket {{ic|/run/fcgiwrap.sock}}.<br />
<br />
Try [[stop]] the {{ic|fcgiwrap.socket}} service, and remove the default unix domain socket file:<br />
{{ic|# rm /run/fcgiwrap.sock}}<br />
Then [[start]] {{ic|fcgiwrap.service}} instead.<br />
Check the status of {{ic|fcgiwrap.service}} and the new unix domain socket {{ic|/run/fcgiwrap.sock}}:<br />
{{bc|$ systemctl status fcgiwrap.service<br />
$ ls /run/fcgiwrap.sock}}<br />
If it work, [[disable]] {{ic|fcgiwrap.socket}} and [[enable]] {{ic|fcgiwrap.service}}.<br />
<br />
=== Error: No input file specified ===<br />
<br />
1. Verify that variable {{ic|open_basedir}} in {{ic|/etc/php/php.ini}} contains the correct path specified as {{ic|root}} argument in {{ic|nginx.conf}} (usually {{ic|/usr/share/nginx/}}). When using [http://php-fpm.org/ PHP-FPM] as FastCGI server for PHP, you may add {{ic|<nowiki>fastcgi_param PHP_ADMIN_VALUE "open_basedir=$document_root/:/tmp/:/proc/"</nowiki>;}} in the {{ic|location}} block which aims for processing php file in {{ic|nginx.conf}}.<br />
<br />
2. Another occasion is that, wrong {{ic|root}} argument in the {{ic|location ~ \.php$}} section in {{ic|nginx.conf}}. Make sure the {{ic|root}} points to the same directory as it in {{ic|location /}} in the same server. Or you may just set root as global, do not define it in any location section.<br />
<br />
3. Check permissions: e.g. {{ic|http}} for user/group, {{ic|755}} for directories and {{ic|644}} for files. Remember the entire path to the {{ic|html}} directory should have the correct permissions.<br />
<br />
4. You do not have the {{ic|SCRIPT_FILENAME}} containing the full path to your scripts. If the configuration of nginx ({{ic|fastcgi_param SCRIPT_FILENAME}}) is correct, this kind of error means php failed to load the requested script. Usually it is simply a permissions issue, you can just run php-cgi as root:<br />
<br />
# spawn-fcgi -a 127.0.0.1 -p 9000 -f /usr/bin/php-cgi<br />
<br />
or you should create a group and user to start the php-cgi:<br />
<br />
# groupadd www<br />
# useradd -g www www<br />
# chmod +w /srv/www/nginx/html<br />
# chown -R www:www /srv/www/nginx/html<br />
# spawn-fcgi -a 127.0.0.1 -p 9000 -u www -g www -f /usr/bin/php-cgi<br />
<br />
=== Error: "File not found" in browser or "Primary script unknown" in log file ===<br />
<br />
Ensure you have specified a {{ic|root}} and {{ic|index}} in your {{ic|server}} or {{ic|location}} directive:<br />
<br />
location ~ \.php$ {<br />
root /srv/http/root_dir;<br />
index index.php;<br />
fastcgi_pass unix:/run/php-fpm/php-fpm.sock;<br />
include fastcgi.conf;<br />
}<br />
<br />
=== Error: chroot: '/usr/sbin/nginx' No such file or directory ===<br />
<br />
If you encounter this error when running the ''nginx'' daemon using chroot, this is likely due to missing 64 bit libraries in the jailed environment.<br />
<br />
If you are running chroot in {{ic|/srv/http}} you need to add the required 64-bit libraries.<br />
<br />
First, set up the directories:<br />
<br />
# mkdir /srv/http/usr/lib64<br />
# cd /srv/http; ln -s usr/lib64 lib64<br />
<br />
Then copy the required 64 bit libraries listed with {{ic|ldd /usr/sbin/nginx}} to {{ic|/srv/http/usr/lib64}}.<br />
<br />
If run as root, permissions for the libraries should be read and executable for all users, so no modification is required.<br />
<br />
=== Alternative script for systemd ===<br />
<br />
On pure systemd you can get advantages of chroot + systemd. [http://0pointer.de/blog/projects/changing-roots.html] Based on set [http://wiki.nginx.org/CoreModule#user user group] an pid on:<br />
<br />
{{hc|/etc/nginx/nginx.conf|2=<br />
user http;<br />
pid /run/nginx.pid;<br />
}}<br />
<br />
the absolute path of file is {{ic|/srv/http/etc/nginx/nginx.conf}}.<br />
<br />
{{hc|/etc/systemd/system/nginx.service|2=<br />
[Unit]<br />
Description=nginx (Chroot)<br />
After=syslog.target network.target<br />
<br />
[Service]<br />
Type=forking<br />
PIDFile=/srv/http/run/nginx.pid<br />
RootDirectory=/srv/http<br />
ExecStartPre=/usr/sbin/nginx -t -c /etc/nginx/nginx.conf<br />
ExecStart=/usr/sbin/nginx -c /etc/nginx/nginx.conf<br />
ExecReload=/usr/sbin/nginx -c /etc/nginx/nginx.conf -s reload<br />
ExecStop=/usr/sbin/nginx -c /etc/nginx/nginx.conf -s stop<br />
<br />
[Install]<br />
WantedBy=multi-user.target<br />
}}<br />
<br />
It is not necesary to set the default location, nginx loads at default {{ic| -c /etc/nginx/nginx.conf}}, but it is a good idea though.<br />
<br />
Alternatively you can run '''only''' {{ic|ExecStart}} as chroot with parameter {{ic|RootDirectoryStartOnly}} set as {{ic|yes}} [[http://www.freedesktop.org/software/systemd/man/systemd.service.html man systemd service]] or start it before mount point as effective or a [http://www.freedesktop.org/software/systemd/man/systemd.path.html systemd path] is available.<br />
<br />
{{hc|/etc/systemd/system/nginx.path|2=<br />
[Unit]<br />
Description=nginx (Chroot) path<br />
[Path]<br />
PathExists=/srv/http/site/Public_html<br />
[Install]<br />
WantedBy=default.target<br />
}}<br />
<br />
[[Enable]] the created {{ic|nginx.path}} and change the {{ic|1=WantedBy=default.target}} to {{ic|1=WantedBy=nginx.path}} in {{ic|/etc/systemd/system/nginx.service}}.<br />
<br />
The {{ic|PIDFile}} in unit file allows systemd to monitor process (absolute path required). If it is undesired, you can change to default one-shoot type, and delete the reference from the unit file.<br />
<br />
== See also ==<br />
<br />
* [https://calomel.org/nginx.html Very good in-depth 2014 look at nginx security and Reverse Proxying]<br />
* [http://www.tecmint.com/install-nginx-php-mysql-with-mariadb-engine-and-phpmyadmin-in-arch-linux/ Installing LEMP (nginx, PHP, MySQL with MariaDB engine and PhpMyAdmin) in Arch Linux]</div>Beta990https://wiki.archlinux.org/index.php?title=Dnsmasq&diff=412847Dnsmasq2015-12-19T23:26:17Z<p>Beta990: /* Tips and tricks */ Added section, and a good article</p>
<hr />
<div>{{Lowercase_title}}<br />
[[Category:Domain Name System]]<br />
[[es:Dnsmasq]]<br />
[[it:Dnsmasq]]<br />
[[ja:Dnsmasq]]<br />
[[pt:Dnsmasq]]<br />
[[ru:Dnsmasq]]<br />
[[zh-CN:Dnsmasq]]<br />
<br />
'''dnsmasq''' provides services as a DNS cacher and a DHCP server. As a Domain Name Server (DNS) it can cache DNS queries to improve connection speeds to previously visited sites, and as a DHCP server {{Pkg|dnsmasq}} can be used to provide internal IP addresses and routes to computers on a LAN. Either or both of these services can be implemented. dnsmasq is considered to be lightweight and easy to configure; it is designed for personal computer use or for use on a network with less than 50 computers. It also comes with a [[PXE]] server.<br />
<br />
== Installation ==<br />
<br />
[[Install]] {{Pkg|dnsmasq}}.<br />
<br />
== DNS Cache Setup ==<br />
<br />
To set up dnsmasq as a DNS caching daemon on a single computer edit {{ic|/etc/dnsmasq.conf}} and uncomment the {{ic|listen-address}} directive, adding in the localhost IP address:<br />
<br />
listen-address=127.0.0.1<br />
<br />
To use this computer to listen on it's LAN IP address for other computers on the network:<br />
<br />
listen-address=192.168.1.1 # Example IP<br />
<br />
It is recommended that you use a static LAN ip in this case.<br />
<br />
Multiple ip address settings:<br />
<br />
listen-address=127.0.0.1,192.168.1.1 <br />
<br />
=== DNS Addresses File ===<br />
<br />
{{Merge|resolv.conf|Same topic. Also note that most of this can be done also natively in {{ic|/etc/resolvconf.conf}} using the {{ic|name_servers}} and {{ic|name_servers_append}} options.}}<br />
<br />
After configuring dnsmasq the DHCP client will need to prepend the localhost address to the known DNS addresses in {{ic|/etc/resolv.conf}}. This causes all queries to be sent to dnsmasq before trying to resolve them with an external DNS. After the DHCP client is configured the network will need to be restarted for changes to take effect.<br />
<br />
==== resolv.conf ====<br />
<br />
One option is a pure {{ic|resolv.conf}} configuration. To do this, just make the first nameserver in {{ic|/etc/resolv.conf}} point to localhost:<br />
<br />
{{hc|/etc/resolv.conf|<br />
nameserver 127.0.0.1<br />
# External nameservers<br />
...<br />
}}<br />
<br />
Now DNS queries will be resolved first with dnsmasq, only checking external servers if dnsmasq cannot resolve the query. {{Pkg|dhcpcd}}, unfortunately, tends to overwrite {{ic|/etc/resolv.conf}} by default, so if you use DHCP it is a good idea to protect {{ic|/etc/resolv.conf}}. To do this, append {{ic|nohook resolv.conf}} to the dhcpcd config file:<br />
<br />
{{hc|/etc/dhcpcd.conf|<br />
...<br />
nohook resolv.conf}}<br />
<br />
It is also possible to write protect your resolv.conf:<br />
<br />
# chattr +i /etc/resolv.conf<br />
<br />
===== More than three nameservers =====<br />
<br />
A limitation in the way Linux handles DNS queries is that there can only be a maximum of three nameservers used in {{ic|resolv.conf}}. As a workaround, you can make localhost the only nameserver in {{ic|resolv.conf}}, and then create a separate {{ic|resolv-file}} for your external nameservers. First, create a new resolv file for dnsmasq:<br />
<br />
{{hc|/etc/resolv.dnsmasq.conf|<br />
# Google's nameservers, for example<br />
nameserver 8.8.8.8<br />
nameserver 8.8.4.4<br />
}}<br />
<br />
And then edit {{ic|/etc/dnsmasq.conf}} to use your new resolv file:<br />
<br />
{{hc|/etc/dnsmasq.conf|<br />
...<br />
resolv-file&#61;/etc/resolv.dnsmasq.conf<br />
...<br />
}}<br />
<br />
==== dhcpcd ====<br />
<br />
[[dhcpcd]] has the ability to prepend or append nameservers to {{ic|/etc/resolv.conf}} by creating (or editing) the {{ic|/etc/resolv.conf.head}} and {{ic|/etc/resolv.conf.tail}} files respectively:<br />
<br />
echo "nameserver 127.0.0.1" > /etc/resolv.conf.head<br />
<br />
==== dhclient ====<br />
<br />
For {{Pkg|dhclient}}, uncomment in {{ic|/etc/dhclient.conf}}:<br />
<br />
prepend domain-name-servers 127.0.0.1;<br />
<br />
=== NetworkManager ===<br />
DNS requests can be sped up by caching previous requests locally for subsequent lookup. [[NetworkManager]] has a plugin to enable DNS caching using dnsmasq, but it is not enabled in the default configuration. <br />
<br />
Make sure {{Pkg|dnsmasq}} has been installed, but has been disabled. Then, edit {{ic|/etc/NetworkManager/NetworkManager.conf}} and change the {{ic|dns}} in the {{ic|[main]}} section:<br />
{{hc|/etc/NetworkManager/NetworkManager.conf|<nowiki><br />
[main]<br />
plugins=keyfile<br />
dhcp=dhclient<br />
dns=dnsmasq<br />
</nowiki>}}<br />
<br />
Now restart NetworkManager or reboot. NetworkManager will automatically start dnsmasq and add 127.0.0.1 to {{ic|/etc/resolv.conf}}. The actual DNS servers can be found in {{ic|/var/run/NetworkManager/dnsmasq.conf}}. You can verify dnsmasq is being used by doing the same DNS lookup twice with {{ic|$ dig example.com}} that can be installed with {{Pkg|bind-tools}} and verifying the server and query times.<br />
<br />
==== Custom Configuration ====<br />
Custom configurations can be created for ''dnsmasq'' by creating configuration files in {{ic|/etc/NetworkManager/dnsmasq.d/}}. For example, to change the size of the DNS cache (which is stored in RAM):<br />
<br />
{{hc|/etc/NetworkManager/dnsmasq.d/cache|2=<br />
cache-size=1000<br />
}}<br />
<br />
==== IPv6 ====<br />
<br />
Enabling {{ic|dnsmasq}} in NetworkManager may break IPv6-only DNS lookups (i.e. {{ic|dig -6 [hostname]}}) which would otherwise work. In order to resolve this, creating the following file will configure ''dnsmasq'' to also listen to the IPv6 loopback:<br />
<br />
{{hc|/etc/NetworkManager/dnsmasq.d/ipv6_listen.conf|2=<br />
listen-address=::1<br />
}}<br />
In addition, {{ic|dnsmasq}} also does not prioritize upstream IPv6 DNS. Unfortunately NetworkManager does not do this ([https://bugs.launchpad.net/ubuntu/+source/network-manager/+bug/936712 Ubuntu Bug]). A workaround would be to disable IPv4 DNS in the NetworkManager config, assuming one exists<br />
<br />
==== Other methods ====<br />
<br />
Another option is in NetworkManagers' settings (usually by right-clicking the applet) and entering settings manually. Setting up will depending on the type of front-end used; the process usually involves right-clicking on the applet, editing (or creating) a profile, and then choosing DHCP type as 'Automatic (specify addresses).' The DNS addresses will need to be entered and are usually in this form: {{ic|127.0.0.1, DNS-server-one, ...}}.<br />
<br />
== DHCP server setup ==<br />
<br />
By default dnsmasq has the DHCP functionality turned off, if you want to use it you must turn it on in ({{ic|/etc/dnsmasq.conf}}). Here are the important settings:<br />
<br />
{{bc|<nowiki><br />
# Only listen to routers' LAN NIC. Doing so opens up tcp/udp port 53 to<br />
# localhost and udp port 67 to world:<br />
interface=<LAN-NIC><br />
<br />
# dnsmasq will open tcp/udp port 53 and udp port 67 to world to help with<br />
# dynamic interfaces (assigning dynamic ips). Dnsmasq will discard world<br />
# requests to them, but the paranoid might like to close them and let the <br />
# kernel handle them:<br />
bind-interfaces<br />
<br />
# Dynamic range of IPs to make available to LAN pc<br />
dhcp-range=192.168.111.50,192.168.111.100,12h<br />
<br />
# If you’d like to have dnsmasq assign static IPs, bind the LAN computer's<br />
# NIC MAC address:<br />
dhcp-host=aa:bb:cc:dd:ee:ff,192.168.111.50<br />
</nowiki>}}<br />
<br />
== Start the daemon ==<br />
To have dnsmasq load upon startup:<br />
<br />
{{bc|# systemctl enable dnsmasq}}<br />
<br />
To start dnsmasq immediately:<br />
<br />
{{bc|# systemctl start dnsmasq}}<br />
<br />
To see if dnsmasq started properly, check the system's journal:<br />
<br />
{{bc|$ journalctl -u dnsmasq}}<br />
<br />
The network will also need to be restarted so the DHCP client can create a new {{ic|/etc/resolv.conf}}.<br />
<br />
== Test ==<br />
=== DNS Caching ===<br />
<br />
To do a lookup speed test choose a website that has not been visited since dnsmasq has been started (''dig'' is part of the {{Pkg|bind-tools}} package):<br />
<br />
$ dig archlinux.org | grep "Query time"<br />
<br />
Running the command again will use the cached DNS IP and result in a faster lookup time if dnsmasq is setup correctly:<br />
<br />
{{hc|<nowiki>$ dig archlinux.org | grep "Query time"</nowiki>|<br />
;; Query time: 18 msec<br />
}}<br />
<br />
{{hc|<nowiki>$ dig archlinux.org | grep "Query time"</nowiki>|<br />
;; Query time: 2 msec<br />
}}<br />
<br />
=== DHCP Server ===<br />
<br />
From a computer that is connected to the one with dnsmasq on it, configure it to use DHCP for automatic IP address assignment, then attempt to log into the network normally.<br />
<br />
== Tips and tricks ==<br />
<br />
=== Prevent OpenDNS Redirecting Google Queries ===<br />
<br />
To prevent OpenDNS from redirecting all Google queries to their own search server, add to {{ic|/etc/dnsmasq.conf}}:<br />
{{bc|1=server=/www.google.com/<ISP DNS IP>}}<br />
<br />
=== View leases ===<br />
{{bc|$ cat /var/lib/misc/dnsmasq.leases}}<br />
<br />
=== Adding a custom domain ===<br />
It is possible to add a custom domain to hosts in your (local) network:<br />
local=/home.lan/<br />
domain=home.lan<br />
<br />
In this example it is possible to ping a host/device (e.g. defined in your hosts file) as {{ic|hostname.home.lan}}.<br />
<br />
Uncomment {{ic|expand-hosts}} to add the custom domain to hosts entries:<br />
expand-hosts<br />
Without this setting, you'll have to add the domain to entries of /etc/hosts.<br />
<br />
=== Override addresses ===<br />
<br />
In some cases, such as when operating a captive portal, it can be useful to resolve specific domains names to a hard-coded set of addresses. This is done with the {{ic|address}} config:<br />
<br />
address=/example.com/1.2.3.4<br />
<br />
Furthermore, it's possible to return a specific address for all domain names that are not answered from {{ic|/etc/hosts}} or DHCP by using a special wildcard:<br />
<br />
address=/#/1.2.3.4<br />
<br />
== See also ==<br />
<br />
* [http://www.g-loaded.eu/2010/09/18/caching-nameserver-using-dnsmasq/ Caching Nameserver using dnsmasq, and a few other tips and tricks.]</div>Beta990https://wiki.archlinux.org/index.php?title=Dnsmasq&diff=412846Dnsmasq2015-12-19T23:16:17Z<p>Beta990: /* NetworkManager */ Should be disabled</p>
<hr />
<div>{{Lowercase_title}}<br />
[[Category:Domain Name System]]<br />
[[es:Dnsmasq]]<br />
[[it:Dnsmasq]]<br />
[[ja:Dnsmasq]]<br />
[[pt:Dnsmasq]]<br />
[[ru:Dnsmasq]]<br />
[[zh-CN:Dnsmasq]]<br />
<br />
'''dnsmasq''' provides services as a DNS cacher and a DHCP server. As a Domain Name Server (DNS) it can cache DNS queries to improve connection speeds to previously visited sites, and as a DHCP server {{Pkg|dnsmasq}} can be used to provide internal IP addresses and routes to computers on a LAN. Either or both of these services can be implemented. dnsmasq is considered to be lightweight and easy to configure; it is designed for personal computer use or for use on a network with less than 50 computers. It also comes with a [[PXE]] server.<br />
<br />
== Installation ==<br />
<br />
[[Install]] {{Pkg|dnsmasq}}.<br />
<br />
== DNS Cache Setup ==<br />
<br />
To set up dnsmasq as a DNS caching daemon on a single computer edit {{ic|/etc/dnsmasq.conf}} and uncomment the {{ic|listen-address}} directive, adding in the localhost IP address:<br />
<br />
listen-address=127.0.0.1<br />
<br />
To use this computer to listen on it's LAN IP address for other computers on the network:<br />
<br />
listen-address=192.168.1.1 # Example IP<br />
<br />
It is recommended that you use a static LAN ip in this case.<br />
<br />
Multiple ip address settings:<br />
<br />
listen-address=127.0.0.1,192.168.1.1 <br />
<br />
=== DNS Addresses File ===<br />
<br />
{{Merge|resolv.conf|Same topic. Also note that most of this can be done also natively in {{ic|/etc/resolvconf.conf}} using the {{ic|name_servers}} and {{ic|name_servers_append}} options.}}<br />
<br />
After configuring dnsmasq the DHCP client will need to prepend the localhost address to the known DNS addresses in {{ic|/etc/resolv.conf}}. This causes all queries to be sent to dnsmasq before trying to resolve them with an external DNS. After the DHCP client is configured the network will need to be restarted for changes to take effect.<br />
<br />
==== resolv.conf ====<br />
<br />
One option is a pure {{ic|resolv.conf}} configuration. To do this, just make the first nameserver in {{ic|/etc/resolv.conf}} point to localhost:<br />
<br />
{{hc|/etc/resolv.conf|<br />
nameserver 127.0.0.1<br />
# External nameservers<br />
...<br />
}}<br />
<br />
Now DNS queries will be resolved first with dnsmasq, only checking external servers if dnsmasq cannot resolve the query. {{Pkg|dhcpcd}}, unfortunately, tends to overwrite {{ic|/etc/resolv.conf}} by default, so if you use DHCP it is a good idea to protect {{ic|/etc/resolv.conf}}. To do this, append {{ic|nohook resolv.conf}} to the dhcpcd config file:<br />
<br />
{{hc|/etc/dhcpcd.conf|<br />
...<br />
nohook resolv.conf}}<br />
<br />
It is also possible to write protect your resolv.conf:<br />
<br />
# chattr +i /etc/resolv.conf<br />
<br />
===== More than three nameservers =====<br />
<br />
A limitation in the way Linux handles DNS queries is that there can only be a maximum of three nameservers used in {{ic|resolv.conf}}. As a workaround, you can make localhost the only nameserver in {{ic|resolv.conf}}, and then create a separate {{ic|resolv-file}} for your external nameservers. First, create a new resolv file for dnsmasq:<br />
<br />
{{hc|/etc/resolv.dnsmasq.conf|<br />
# Google's nameservers, for example<br />
nameserver 8.8.8.8<br />
nameserver 8.8.4.4<br />
}}<br />
<br />
And then edit {{ic|/etc/dnsmasq.conf}} to use your new resolv file:<br />
<br />
{{hc|/etc/dnsmasq.conf|<br />
...<br />
resolv-file&#61;/etc/resolv.dnsmasq.conf<br />
...<br />
}}<br />
<br />
==== dhcpcd ====<br />
<br />
[[dhcpcd]] has the ability to prepend or append nameservers to {{ic|/etc/resolv.conf}} by creating (or editing) the {{ic|/etc/resolv.conf.head}} and {{ic|/etc/resolv.conf.tail}} files respectively:<br />
<br />
echo "nameserver 127.0.0.1" > /etc/resolv.conf.head<br />
<br />
==== dhclient ====<br />
<br />
For {{Pkg|dhclient}}, uncomment in {{ic|/etc/dhclient.conf}}:<br />
<br />
prepend domain-name-servers 127.0.0.1;<br />
<br />
=== NetworkManager ===<br />
DNS requests can be sped up by caching previous requests locally for subsequent lookup. [[NetworkManager]] has a plugin to enable DNS caching using dnsmasq, but it is not enabled in the default configuration. <br />
<br />
Make sure {{Pkg|dnsmasq}} has been installed, but has been disabled. Then, edit {{ic|/etc/NetworkManager/NetworkManager.conf}} and change the {{ic|dns}} in the {{ic|[main]}} section:<br />
{{hc|/etc/NetworkManager/NetworkManager.conf|<nowiki><br />
[main]<br />
plugins=keyfile<br />
dhcp=dhclient<br />
dns=dnsmasq<br />
</nowiki>}}<br />
<br />
Now restart NetworkManager or reboot. NetworkManager will automatically start dnsmasq and add 127.0.0.1 to {{ic|/etc/resolv.conf}}. The actual DNS servers can be found in {{ic|/var/run/NetworkManager/dnsmasq.conf}}. You can verify dnsmasq is being used by doing the same DNS lookup twice with {{ic|$ dig example.com}} that can be installed with {{Pkg|bind-tools}} and verifying the server and query times.<br />
<br />
==== Custom Configuration ====<br />
Custom configurations can be created for ''dnsmasq'' by creating configuration files in {{ic|/etc/NetworkManager/dnsmasq.d/}}. For example, to change the size of the DNS cache (which is stored in RAM):<br />
<br />
{{hc|/etc/NetworkManager/dnsmasq.d/cache|2=<br />
cache-size=1000<br />
}}<br />
<br />
==== IPv6 ====<br />
<br />
Enabling {{ic|dnsmasq}} in NetworkManager may break IPv6-only DNS lookups (i.e. {{ic|dig -6 [hostname]}}) which would otherwise work. In order to resolve this, creating the following file will configure ''dnsmasq'' to also listen to the IPv6 loopback:<br />
<br />
{{hc|/etc/NetworkManager/dnsmasq.d/ipv6_listen.conf|2=<br />
listen-address=::1<br />
}}<br />
In addition, {{ic|dnsmasq}} also does not prioritize upstream IPv6 DNS. Unfortunately NetworkManager does not do this ([https://bugs.launchpad.net/ubuntu/+source/network-manager/+bug/936712 Ubuntu Bug]). A workaround would be to disable IPv4 DNS in the NetworkManager config, assuming one exists<br />
<br />
==== Other methods ====<br />
<br />
Another option is in NetworkManagers' settings (usually by right-clicking the applet) and entering settings manually. Setting up will depending on the type of front-end used; the process usually involves right-clicking on the applet, editing (or creating) a profile, and then choosing DHCP type as 'Automatic (specify addresses).' The DNS addresses will need to be entered and are usually in this form: {{ic|127.0.0.1, DNS-server-one, ...}}.<br />
<br />
== DHCP server setup ==<br />
<br />
By default dnsmasq has the DHCP functionality turned off, if you want to use it you must turn it on in ({{ic|/etc/dnsmasq.conf}}). Here are the important settings:<br />
<br />
{{bc|<nowiki><br />
# Only listen to routers' LAN NIC. Doing so opens up tcp/udp port 53 to<br />
# localhost and udp port 67 to world:<br />
interface=<LAN-NIC><br />
<br />
# dnsmasq will open tcp/udp port 53 and udp port 67 to world to help with<br />
# dynamic interfaces (assigning dynamic ips). Dnsmasq will discard world<br />
# requests to them, but the paranoid might like to close them and let the <br />
# kernel handle them:<br />
bind-interfaces<br />
<br />
# Dynamic range of IPs to make available to LAN pc<br />
dhcp-range=192.168.111.50,192.168.111.100,12h<br />
<br />
# If you’d like to have dnsmasq assign static IPs, bind the LAN computer's<br />
# NIC MAC address:<br />
dhcp-host=aa:bb:cc:dd:ee:ff,192.168.111.50<br />
</nowiki>}}<br />
<br />
== Start the daemon ==<br />
To have dnsmasq load upon startup:<br />
<br />
{{bc|# systemctl enable dnsmasq}}<br />
<br />
To start dnsmasq immediately:<br />
<br />
{{bc|# systemctl start dnsmasq}}<br />
<br />
To see if dnsmasq started properly, check the system's journal:<br />
<br />
{{bc|$ journalctl -u dnsmasq}}<br />
<br />
The network will also need to be restarted so the DHCP client can create a new {{ic|/etc/resolv.conf}}.<br />
<br />
== Test ==<br />
=== DNS Caching ===<br />
<br />
To do a lookup speed test choose a website that has not been visited since dnsmasq has been started (''dig'' is part of the {{Pkg|bind-tools}} package):<br />
<br />
$ dig archlinux.org | grep "Query time"<br />
<br />
Running the command again will use the cached DNS IP and result in a faster lookup time if dnsmasq is setup correctly:<br />
<br />
{{hc|<nowiki>$ dig archlinux.org | grep "Query time"</nowiki>|<br />
;; Query time: 18 msec<br />
}}<br />
<br />
{{hc|<nowiki>$ dig archlinux.org | grep "Query time"</nowiki>|<br />
;; Query time: 2 msec<br />
}}<br />
<br />
=== DHCP Server ===<br />
<br />
From a computer that is connected to the one with dnsmasq on it, configure it to use DHCP for automatic IP address assignment, then attempt to log into the network normally.<br />
<br />
== Tips and tricks ==<br />
<br />
=== Prevent OpenDNS Redirecting Google Queries ===<br />
<br />
To prevent OpenDNS from redirecting all Google queries to their own search server, add to {{ic|/etc/dnsmasq.conf}}:<br />
{{bc|1=server=/www.google.com/<ISP DNS IP>}}<br />
<br />
=== View leases ===<br />
{{bc|$ cat /var/lib/misc/dnsmasq.leases}}<br />
<br />
=== Adding a custom domain ===<br />
It is possible to add a custom domain to hosts in your (local) network:<br />
local=/home.lan/<br />
domain=home.lan<br />
<br />
In this example it is possible to ping a host/device (e.g. defined in your hosts file) as {{ic|hostname.home.lan}}.<br />
<br />
Uncomment {{ic|expand-hosts}} to add the custom domain to hosts entries:<br />
expand-hosts<br />
Without this setting, you'll have to add the domain to entries of /etc/hosts.<br />
<br />
=== Override addresses ===<br />
<br />
In some cases, such as when operating a captive portal, it can be useful to resolve specific domains names to a hard-coded set of addresses. This is done with the {{ic|address}} config:<br />
<br />
address=/example.com/1.2.3.4<br />
<br />
Furthermore, it's possible to return a specific address for all domain names that are not answered from {{ic|/etc/hosts}} or DHCP by using a special wildcard:<br />
<br />
address=/#/1.2.3.4</div>Beta990https://wiki.archlinux.org/index.php?title=NetworkManager&diff=412845NetworkManager2015-12-19T23:13:20Z<p>Beta990: /* KDE */ KDE4 insn't in the repo's anymore</p>
<hr />
<div>[[Category:Network configuration]]<br />
[[cs:NetworkManager]]<br />
[[de:Networkmanager]]<br />
[[es:NetworkManager]]<br />
[[fr:NetworkManager]]<br />
[[it:NetworkManager]]<br />
[[ja:NetworkManager]]<br />
[[pt:NetworkManager]]<br />
[[ru:NetworkManager]]<br />
[[tr:NetworkManager]]<br />
[[zh-CN:NetworkManager]]<br />
{{Related articles start}}<br />
{{Related|Network configuration}}<br />
{{Related|Wireless network configuration}}<br />
{{Related|:Category:Network managers}}<br />
{{Related articles end}}<br />
[http://projects.gnome.org/NetworkManager/ NetworkManager] is a program for providing detection and configuration for systems to automatically connect to network. NetworkManager's functionality can be useful for both wireless and wired networks. For wireless networks, NetworkManager prefers known wireless networks and has the ability to switch to the most reliable network. NetworkManager-aware applications can switch from online and offline mode. NetworkManager also prefers wired connections over wireless ones, has support for modem connections and certain types of VPN. NetworkManager was originally developed by Red Hat and now is hosted by the [[GNOME]] project.<br />
<br />
{{Warning|By default, Wi-Fi passwords are stored in clear text. See section [[#Encrypted Wi-Fi passwords]]}}<br />
<br />
== Installation ==<br />
<br />
NetworkManager can be [[install]]ed with the package {{Pkg|networkmanager}}. The package does not include the tray applet ''nm-applet'' which is part of the [https://www.archlinux.org/packages/extra/i686/network-manager-applet/ network-manager-applet]. Since version 1.0 it gained internal functionality for basic DHCP support. For full featured DHCP and if you require IPv6 support, {{Pkg|dhclient}} integrates it. <br />
<br />
{{Note|You must ensure that no other service that wants to configure the network is running; in fact, multiple networking services will conflict. You can find a list of the currently running services with {{ic|1=systemctl --type=service}} and then [[stop]] them. See [[#Configuration]] to enable the NetworkManager service.}}<br />
<br />
=== VPN support ===<br />
<br />
NetworkManager VPN support is based on a plug-in system. If you need VPN support via NetworkManager, you have to install one of the following packages:<br />
<br />
* {{Pkg|networkmanager-openconnect}}<br />
* {{Pkg|networkmanager-openvpn}}<br />
* {{Pkg|networkmanager-pptp}}<br />
* {{Pkg|networkmanager-vpnc}}<br />
* {{AUR|networkmanager-l2tp}}<br />
<br />
=== PPPoE / DSL support ===<br />
<br />
[[Install]] {{pkg|rp-pppoe}} for PPPoE / DSL connection support.<br />
<br />
== Graphical front-ends ==<br />
<br />
To configure and have easy access to NetworkManager, most users will want to install an applet. This GUI front-end usually resides in the system tray (or notification area) and allows network selection and configuration of NetworkManager. Various applets exist for different types of desktops.<br />
<br />
=== GNOME ===<br />
<br />
[[GNOME]]'s {{Pkg|network-manager-applet}} works in all environments.<br />
<br />
To store authentication details for connections (Wireless/DSL) install and configure [[GNOME Keyring]].<br />
<br />
Be aware that after enabling the tick-box option {{ic|Make available to other users}} for a connection, NetworkManager stores the password in plain-text, though the respective file is accessible only to root (or other users via {{ic|nm-applet}}). See [[#Encrypted Wi-Fi passwords]].<br />
<br />
=== KDE Plasma ===<br />
<br />
[[Install]] the {{Pkg|plasma-nm}} applet.<br />
<br />
=== Xfce ===<br />
<br />
While {{Pkg|network-manager-applet}} works in [[Xfce]], but in order to see notifications, including error messages, {{ic|nm-applet}} needs an implementation of the Freedesktop desktop notifications specification (see the [http://www.galago-project.org/specs/notification/0.9/index.html Galapago Project]) to display them. To enable notifications install {{Pkg|xfce4-notifyd}}, a package that provides an implementation for the specification.<br />
<br />
Without such a notification daemon, {{ic|nm-applet}} outputs the following errors to stdout/stderr:<br />
<br />
(nm-applet:24209): libnotify-WARNING **: Failed to connect to proxy<br />
** (nm-applet:24209): WARNING **: get_all_cb: couldn't retrieve<br />
system settings properties: (25) Launch helper exited with unknown<br />
return code 1.<br />
** (nm-applet:24209): WARNING **: fetch_connections_done: error<br />
fetching connections: (25) Launch helper exited with unknown return<br />
code 1.<br />
** (nm-applet:24209): WARNING **: Failed to register as an agent:<br />
(25) Launch helper exited with unknown return code 1<br />
<br />
{{ic|nm-applet}} will still work fine, though, but without notifications.<br />
<br />
If {{ic|nm-applet}} is not prompting for a password when connecting to new wifi networks, and is just disconnecting immediately, you may need to install {{Pkg|gnome-keyring}}. <br />
<br />
Should the applet not appear, install the {{AUR|xfce4-indicator-plugin}} package. [http://askubuntu.com/questions/449658/networkmanager-tray-nm-applet-is-gone-after-upgrade-to-14-04-trusty]<br />
<br />
=== Openbox ===<br />
<br />
To work properly in [[Openbox]], the GNOME applet requires the {{Pkg|xfce4-notifyd}} notification daemon for the same reason as in XFCE and the {{Pkg|gnome-icon-theme}} package to be able to display the applet in the systray.<br />
<br />
If you want to store authentication details (Wireless/DSL) install and configure [[gnome-keyring]].<br />
<br />
{{ic|nm-applet}} installs the autostart file at {{ic|/etc/xdg/autostart/nm-applet.desktop}}. If you have issues with it (e.g. {{ic|nm-applet}} is started twice or is not started at all), see [[Openbox#autostart]] or [https://bbs.archlinux.org/viewtopic.php?pid=993738] for solution.<br />
<br />
=== Other desktops and window managers ===<br />
<br />
In all other scenarios it is recommended to use the GNOME applet. You will also need to be sure that the {{Pkg|gnome-icon-theme}} package is installed to be able to display the applet.<br />
<br />
To store connection secrets install and configure [[GNOME Keyring]].<br />
<br />
In order to run {{ic|nm-applet}} without a systray, you can use {{Pkg|trayer}} or {{Pkg|stalonetray}}. For example, you can add a script like this one in your path:<br />
<br />
{{hc|nmgui|<nowiki><br />
#!/bin/sh<br />
nm-applet 2>&1 /dev/null &<br />
stalonetray 2>&1 /dev/null<br />
killall nm-applet<br />
</nowiki>}}<br />
<br />
When you close the ''stalonetray'' window, it closes {{ic|nm-applet}} too, so no extra memory is used once you are done with network settings.<br />
<br />
=== Command line ===<br />
<br />
{{Style|Why is this a subsection of [[#Graphical front-ends]]?}}<br />
<br />
The following applications can be useful for configuring and managing networks without X.<br />
<br />
==== nmcli ====<br />
<br />
A command line frontend, ''nmcli'', is included with {{Pkg|networkmanager}}.<br />
<br />
For usage information, see {{ic|man nmcli}}. Examples:<br />
<br />
* To connect to a wifi network: {{bc|nmcli dev wifi connect <name> password <password>}}<br />
* To connect to a wifi on the {{ic|wlan1}} wifi interface: {{bc|nmcli dev wifi connect <name> password <password> iface wlan1 [profile name]}}<br />
* To disconnect an interface: {{bc|nmcli dev disconnect iface eth0}}<br />
* To reconnect an interface marked as disconnected: {{bc|nmcli con up uuid <uuid>}}<br />
* To get a list of UUIDs: {{bc|nmcli con show}}<br />
* To see a list of network devices and their state: {{bc|nmcli dev}}<br />
* To turn off wifi: {{bc|nmcli r wifi off}}<br />
<br />
==== nmtui ====<br />
<br />
A curses based graphical frontend, ''nmtui'', is included with {{Pkg|networkmanager}}.<br />
<br />
For usage information, see {{ic|man nmtui}}.<br />
<br />
==== nmcli-dmenu ====<br />
<br />
Alternatively there is {{AUR|networkmanager-dmenu-git}} which is a small script to manage NetworkManager connections with ''dmenu'' instead of {{ic|nm-applet}}. It provides all essential features such as connect to existing NetworkManager wifi or wired connections, connect to new wifi connections, requests passphrase if required, connect to existing VPN connections, enable/disable networking, launch ''nm-connection-editor'' GUI.<br />
<br />
== Configuration ==<br />
<br />
NetworkManager will require some additional steps to be able run properly. Make sure you have configured {{ic|/etc/hosts}} as described in [[Network configuration#Set the hostname]] section.<br />
<br />
=== Enable NetworkManager ===<br />
<br />
NetworkManager is [[systemd#Using units|controlled]] via {{ic|NetworkManager.service}}. Once the NetworkManager daemon is started, it will automatically connect to any available "system connections" that have already been configured. Any "user connections" or unconfigured connections will need ''nmcli'' or an applet to configure and connect.<br />
<br />
NetworkManager has a global configuration file at {{ic|/etc/NetworkManager/NetworkManager.conf}}. Usually no configuration needs to be done to the global defaults. <br />
<br />
{{Note|1=NetworkManager will print meaningless warnings ({{Bug|34971}}) to your system log, when [[#Network services with NetworkManager dispatcher|NetworkManager-dispatcher.service]] and [https://www.archlinux.org/packages/?name=modemmanager ModemManager.service] are not enabled. You may enable both to suppress the messages.}}<br />
<br />
=== Enable NetworkManager Wait Online ===<br />
<br />
If you have services which fail if they are started before the network is up, you may use {{ic|NetworkManager-wait-online.service}} in addition to {{ic|NetworkManager.service}}. This is, however, rarely necessary because most networked daemons start up okay, even if the network has not been configured yet.<br />
<br />
In some cases, the service will still fail to start successfully on boot due to the timeout setting in {{ic|/usr/lib/systemd/system/NetworkManager-wait-online.service}} being too short. Change the default timeout from 30 to a higher value.<br />
<br />
=== Set up PolicyKit permissions ===<br />
<br />
See [[General troubleshooting#Session permissions]] for setting up a working session.<br />
<br />
With a working session, you have several options for granting the necessary privileges to NetworkManager:<br />
<br />
* ''Option 1.'' Run a [[Polkit]] authentication agent when you log in, such as {{ic|/usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1}} (part of {{Pkg|polkit-gnome}}). You will be prompted for your password whenever you add or remove a network connection.<br />
* ''Option 2.'' [[Users and groups#Group management|Add]] yourself to the {{ic|wheel}} group. You will not have to enter your password, but your user account may be granted other permissions as well, such as the ability to use [[sudo]] without entering the root password.<br />
* ''Option 3.'' [[Users and groups#Group management|Add]] yourself to the {{ic|network}} group and create the following file:<br />
<br />
{{hc|/etc/polkit-1/rules.d/50-org.freedesktop.NetworkManager.rules|<nowiki><br />
polkit.addRule(function(action, subject) {<br />
if (action.id.indexOf("org.freedesktop.NetworkManager.") == 0 && subject.isInGroup("network")) {<br />
return polkit.Result.YES;<br />
}<br />
});<br />
</nowiki>}}<br />
<br />
: All users in the {{ic|network}} group will be able to add and remove networks without a password. This will not work under [[systemd]] if you do not have an active session with ''systemd-logind''.<br />
<br />
=== Network services with NetworkManager dispatcher ===<br />
<br />
There are quite a few network services that you will not want running until NetworkManager brings up an interface. Good examples are [[NTPd]] and network filesystem mounts of various types (e.g. '''netfs'''). NetworkManager has the ability to start these services when you connect to a network and stop them when you disconnect. To activate the feature you need to [[start]] the {{ic|NetworkManager-dispatcher.service}}.<br />
<br />
Once the feature is active, scripts can be added to the {{ic|/etc/NetworkManager/dispatcher.d}} directory. These scripts must be '''owned by root''', otherwise the dispatcher will not execute them. For added security, set group ownership to root as well:<br />
<br />
# chown root:root ''scriptname''<br />
<br />
Also, the script must have '''write permission for owner only''', otherwise the dispatcher will not execute them:<br />
<br />
# chmod 755 ''scriptname''<br />
<br />
The scripts will be run in alphabetical order at connection time, and in reverse alphabetical order at disconnect time. They receive two arguments: the name of the interface (e.g. {{ic|eth0}}) and the status (''up'' or ''down'' for interfaces and ''vpn-up'' or ''vpn-down'' for vpn connections). To ensure what order they come up in, it is common to use numerical characters prior to the name of the script (e.g. {{ic|10_portmap}} or {{ic|30_netfs}} (which ensures that the ''portmapper'' is up before NFS mounts are attempted).<br />
<br />
{{Warning|If you connect to foreign or public networks, be aware of what services you are starting and what servers you expect to be available for them to connect to. You could make a security hole by starting the wrong services while connected to a public network}}<br />
<br />
==== Avoiding the dispatcher timeout ====<br />
<br />
If the above is working, then this section is not relevant. However, there is a general problem related to running dispatcher scripts which take longer to be executed. Initially an internal timeout of three seconds only was used. If the called script did not complete in time, it was killed. Later the timeout was extended to about 20 seconds (see the [https://bugzilla.redhat.com/show_bug.cgi?id=982734 Bugtracker] for more information). If the timeout still creates the problem, a work around may be to modify the dispatcher service file {{ic|/usr/lib/systemd/system/NetworkManager-dispatcher.service}} to remain active after exit: <br />
<br />
{{hc|/etc/systemd/system/NetworkManager-dispatcher.service|2=<br />
.include /usr/lib/systemd/system/NetworkManager-dispatcher.service<br />
[Service]<br />
RemainAfterExit=yes}}<br />
<br />
Now start and enable the modified {{ic|NetworkManager-dispatcher}} service.<br />
<br />
{{Warning|Adding the {{ic|RemainAfterExit}} line to it will prevent the dispatcher from closing. Unfortunately, the dispatcher '''has''' to close before it can run your scripts again. With it the dispatcher will not time out but it also will not close, which means that the scripts will only run once per boot. Therefore, do not add the line unless the timeout is definitely causing a problem.}}<br />
<br />
==== Start OpenNTPD ====<br />
<br />
Install the {{Pkg|networkmanager-dispatcher-openntpd}} package.<br />
<br />
==== Mount remote folder with sshfs ====<br />
<br />
As the script is run in a very restrictive environment, you have to export {{ic|SSH_AUTH_SOCK}} in order to connect to your SSH agent. There are different ways to accomplish this, see [https://bbs.archlinux.org/viewtopic.php?pid=1042030#p1042030 this message] for more information. The example below works with [[GNOME Keyring]], and will ask you for the password if not unlocked already. In case NetworkManager connects automatically on login, it is likely ''gnome-keyring'' has not yet started and the export will fail (hence the sleep). The {{ic|UUID}} to match can be found with the command {{ic|nmcli con status}} or {{ic|nmcli con list}}. <br />
<br />
{{bc|<nowiki><br />
#!/bin/sh<br />
USER='username'<br />
REMOTE='user@host:/remote/path'<br />
LOCAL='/local/path'<br />
<br />
interface=$1 status=$2<br />
if [ "$CONNECTION_UUID" = "</nowiki>''uuid''<nowiki>" ]; then<br />
case $status in<br />
up)<br />
export SSH_AUTH_SOCK=$(find /tmp -maxdepth 1 -type s -user "$USER" -name 'ssh')<br />
su "$USER" -c "sshfs $REMOTE $LOCAL"<br />
;;<br />
down)<br />
fusermount -u "$LOCAL"<br />
;;<br />
esac<br />
fi<br />
</nowiki>}}<br />
<br />
==== Use dispatcher to connect to a VPN after a network connection is established ====<br />
<br />
In this example we want to connect automatically to a previously defined VPN connection after connecting to a specific Wi-Fi network. First thing to do is to create the dispatcher script that defines what to do after we are connected to the network.<br />
<br />
:1. Create the dispatcher script:<br />
<br />
{{hc|/etc/NetworkManager/dispatcher.d/vpn-up|<nowiki><br />
#!/bin/sh<br />
VPN_NAME="name of VPN connection defined in NetworkManager"<br />
ESSID="Wi-Fi network ESSID (not connection name)"<br />
<br />
interface=$1 status=$2<br />
case $status in<br />
up|vpn-down)<br />
if iwgetid | grep -qs ":\"$ESSID\""; then<br />
nmcli con up id "$VPN_NAME"<br />
fi<br />
;;<br />
down)<br />
if iwgetid | grep -qs ":\"$ESSID\""; then<br />
if nmcli con show --active | grep "$VPN_NAME"; then<br />
nmcli con down id "$VPN_NAME"<br />
fi<br />
fi<br />
;;<br />
esac<br />
</nowiki>}}<br />
<br />
If you would like to attempt to automatically connect to VPN for all Wi-Fi networks, you can use the following definition of the ESSID: {{ic|1=ESSID=$(iwgetid -r)}}. Remember to set the script's permissions [[#Network services with NetworkManager dispatcher|accordingly]]. <br />
<br />
If you require and tick the {{ic|nm-applet}} option to ''Make the VPN connection available to all users'', trying to connect may still fail and NetworkManager will complain about 'no valid VPN secrets', because of [http://developer.gnome.org/NetworkManager/0.9/secrets-flags.html the way VPN secrets are stored], which brings us to step 2:<br />
<br />
:2. Either edit the VPN connection configuration file to make NetworkManager store the secrets by itself rather than inside a keyring [https://bugzilla.redhat.com/show_bug.cgi?id=710552 that will be inaccessible for root]: open up {{ic|/etc/NetworkManager/system-connections/''name of your VPN connection''}} and change the {{ic|password-flags}} and {{ic|secret-flags}} from {{ic|1}} to {{ic|0}}.<br />
<br />
Alternatively put the password directly in the configuration file adding the section {{ic|vpn-secrets}}:<br />
<br />
[vpn]<br />
....<br />
password-flags=0<br />
<br />
[vpn-secrets]<br />
password=''your_password''<br />
<br />
{{Note|It may now be necessary to re-open the NetworkManager connection editor and save the VPN passwords/secrets again.}}<br />
<br />
==== Use dispatcher to handle mounting of CIFS shares ====<br />
<br />
Some CIFS shares are only available on certain networks or locations (e.g. at home). You can use the dispatcher to only mount CIFS shares that are present at your current location.<br />
<br />
The following script will check if we connected to a specific network and mount shares accordingly:<br />
{{hc|/etc/NetworkManager/dispatcher.d/mount_cifs|<nowiki><br />
#!/bin/bash<br />
if [ "$2" = "up" ]<br />
if [ "$CONNECTION_UUID" = "uuid" ]<br />
mount /your/mount/point & <br />
# add more shares as needed<br />
fi<br />
fi<br />
</nowiki>}}<br />
{{Note|You can get a list of uuids using [[#nmcli|nmcli]].}}<br />
<br />
The following script will unmount all CIFS before a disconnect from a specific network:<br />
{{hc|/etc/NetworkManager/dispatcher.d/pre-down.d/mount_cifs|<nowiki><br />
#!/bin/bash<br />
umount -a -l -t cifs<br />
</nowiki>}}<br />
{{Note|Make sure this script is located in the pre-down.d subdirectory as shown above, otherwise it will unmount all shares on any connection state change.}}<br />
{{Note|Ever since NetworkManager 0.9.8, the 'pre-down' and 'down' actions are not executed on shutdown or restart, so the above script will only work if you manually disconnect from the network. See [https://bugzilla.gnome.org/show_bug.cgi?id&#61;701242 this bug report] for more info.}}<br />
<br />
As before, do not forget to set the script permissions [[#Network services with NetworkManager dispatcher|accordingly]].<br />
<br />
See also [[NFS#NetworkManager dispatcher]] for another example script that parses {{ic|/etc/fstab}} mounts during dispatcher actions.<br />
<br />
=== Proxy settings ===<br />
<br />
NetworkManager does not directly handle proxy settings, but if you are using GNOME or KDE, you could use [http://marin.jb.free.fr/proxydriver/ proxydriver] wich handles proxy settings using NetworkManager's informations. proxydriver is found in the package {{AUR|proxydriver}}.<br />
<br />
In order for ''proxydriver'' to be able to change the proxy settings, you would need to execute this command, as part of the GNOME startup process (System -> Preferences -> Startup Applications):<br />
<br />
xhost +si:localuser:''your_username''<br />
<br />
See: [[Proxy settings]].<br />
<br />
=== Disable NetworkManager ===<br />
<br />
It might not be obvious, but the service automatically starts through ''dbus''. To completely disable it you can [[mask]] the services {{ic|NetworkManager}} and {{ic|NetworkManager-dispatcher}}.<br />
<br />
== Testing ==<br />
<br />
NetworkManager applets are designed to load upon login so no further configuration should be necessary for most users. If you have already disabled your previous network settings and disconnected from your network, you can now test if NetworkManager will work. The first step is to [[start]] {{ic|NetworkManager.service}}.<br />
<br />
Some applets will provide you with a {{ic|.desktop}} file so that the NetworkManager applet can be loaded through the application menu. If it does not, you are going to either have to discover the command to use or logout and login again to start the applet. Once the applet is started, it will likely begin polling network connections with for auto-configuration with a DHCP server.<br />
<br />
To start the GNOME applet in non-xdg-compliant window managers like [[awesome]]:<br />
<br />
nm-applet --sm-disable &<br />
<br />
For static IP addresses, you will have to configure NetworkManager to understand them. The process usually involves right-clicking the applet and selecting something like 'Edit Connections'.<br />
<br />
== Troubleshooting ==<br />
<br />
Some fixes to common problems.<br />
<br />
=== No prompt for password of secured Wi-Fi networks ===<br />
<br />
When trying to connect to a secured Wi-Fi network, no prompt for a password is shown and no connection is established. This happens when no keyring package is installed. An easy solution is to install {{Pkg|gnome-keyring}}. If you want the passwords to be stored in encrypted form, follow [[GNOME Keyring]] to set up the ''gnome-keyring-daemon''.<br />
<br />
=== No traffic via PPTP tunnel ===<br />
<br />
PPTP connection logins successfully; you see a ppp0 interface with the correct VPN IP address, but you cannot even ping the remote IP address. It is due to lack of MPPE (Microsoft Point-to-Point Encryption) support in stock Arch pppd. It is recommended to first try with the stock Arch {{Pkg|ppp}} as it may work as intended.<br />
<br />
To solve the problem it should be sufficient to install the {{AUR|ppp-mppe}}{{Broken package link|{{aur-mirror|ppp-mppe}}}} package.<br />
<br />
See also [[WPA2 Enterprise#MS-CHAPv2]].<br />
<br />
=== Network management disabled ===<br />
<br />
When NetworkManager shuts down but the pid (state) file is not removed, you will see a {{ic|Network management disabled}} message. If this happens, remove the file manually:<br />
<br />
# rm /var/lib/NetworkManager/NetworkManager.state<br />
<br />
=== Customizing resolv.conf ===<br />
<br />
See the main page: [[resolv.conf]]. If you use {{Pkg|dhclient}}, you may try the {{AUR|networkmanager-dispatch-resolv}}{{Broken package link|{{aur-mirror|networkmanager-dispatch-resolv}}}} package.<br />
<br />
=== DHCP problems with dhclient ===<br />
<br />
If you have problems with getting an IP address via DHCP, try to add the following to your {{ic|/etc/dhclient.conf}}:<br />
<br />
interface "eth0" {<br />
send dhcp-client-identifier 01:aa:bb:cc:dd:ee:ff;<br />
}<br />
<br />
Where {{ic|aa:bb:cc:dd:ee:ff}} is the MAC address of this NIC. The MAC address can be found using the {{ic|ip link show ''interface''}} command from the {{Pkg|iproute2}} package.<br />
<br />
=== Hostname problems ===<br />
<br />
It depends on the NetworkManager plugins used, whether the hostname is forwarded to a router on connect. The generic "keyfile" plugin does not forward the hostname in default configuration. To make it forward the hostname, add the following to {{ic|/etc/NetworkManager/NetworkManager.conf}}:<br />
<br />
[keyfile]<br />
hostname=''your_hostname''<br />
<br />
The options under {{ic|[keyfile]}} will be applied to network connections in the default {{ic|/etc/NetworkManager/system-connections}} path. <br />
<br />
Another option is to configure the DHCP client, which NetworkManager starts automatically, to forward it. NetworkManager utilizes {{Pkg|dhclient}} in default and falls back to its internal DHCP funtionality, if the former is not installed. To make ''dhclient'' forward the hostname requires to set a non-default option, ''dhcpcd'' forwards the hostname by default. <br />
<br />
First, check which DHCP client is used (''dhclient'' in this example):<br />
<br />
{{hc|<nowiki># journalctl -b | egrep "dhc"</nowiki>|<br />
...<br />
Nov 17 21:03:20 zenbook dhclient[2949]: Nov 17 21:03:20 zenbook dhclient[2949]: Bound to *:546<br />
Nov 17 21:03:20 zenbook dhclient[2949]: Listening on Socket/wlan0<br />
Nov 17 21:03:20 zenbook dhclient[2949]: Sending on Socket/wlan0<br />
Nov 17 21:03:20 zenbook dhclient[2949]: XMT: Info-Request on wlan0, interval 1020ms.<br />
Nov 17 21:03:20 zenbook dhclient[2949]: RCV: Reply message on wlan0 from fe80::126f:3fff:fe0c:2dc.<br />
}}<br />
<br />
==== Configure dhclient to push the hostname to the DHCP server ====<br />
<br />
Copy the example configuration file:<br />
<br />
# cp /usr/share/dhclient/dhclient.conf.example /etc/dhclient.conf<br />
<br />
Take a look at the file - there will only really be one line we want to keep and ''dhclient'' will use it's defaults (as it has been using if you did not have this file) for the other options. This is the important line:<br />
<br />
{{hc|/etc/dhclient.conf|2=send host-name = pick-first-value(gethostname(), "ISC-dhclient");}}<br />
<br />
Force an IP address renewal by your favorite means, and you should now see your hostname on your DHCP server.<br />
<br />
IPv6 push host name:<br />
<br />
# cp /usr/share/dhclient/dhclient.conf.example /etc/dhclient6.conf<br />
<br />
{{hc|/etc/dhclient6.conf|2=send fqdn.fqdn = pick-first-value(gethostname(), "ISC-dhclient");}}<br />
<br />
==== Configure NetworkManager to use a specific DHCP client ====<br />
<br />
If you want to explicitly set the DHCP client used by NetworkManager, it can be set in the global configuration: <br />
<br />
{{hc|1=/etc/NetworkManager/NetworkManager.conf|2=dhcp=internal}}<br />
<br />
The alternative {{ic|1=dhcp=dhclient}} is used per default, if this option is not set. <br />
<br />
Then [[restart]] {{ic|NetworkManager.service}}.<br />
<br />
{{Note|1=Support for {{Pkg|dhcpcd}} has been [https://projects.archlinux.org/svntogit/packages.git/commit/trunk?h=packages/networkmanager&id=a1df79cbcebaec0c043789eb31965e57d17b6cdb disabled] in {{Pkg|networkmanager}}-1.0.0-2 (2015-02-14).}}<br />
<br />
=== Missing default route ===<br />
<br />
On at least one KDE4 system, no default route was created when establishing wireless connections with NetworkManager. Changing the route settings of the wireless connection to remove the default selection "Use only for resources on this connection" solved the issue.<br />
<br />
=== 3G modem not detected ===<br />
<br />
See [[USB 3G Modem#Network Manager]].<br />
<br />
=== Switching off WLAN on laptops ===<br />
<br />
Sometimes NetworkManager will not work when you disable your Wi-Fi adapter with a switch on your laptop and try to enable it again afterwards. This is often a problem with ''rfkill''. [[Install]] the {{Pkg|rfkill}} package and use:<br />
<br />
$ watch -n1 rfkill list all<br />
<br />
to check if the driver notifies ''rfkill'' about the wireless adapter's status. If one identifier stays blocked after you switch on the adapter you could try to manually unblock it with (where X is the number of the identifier provided by the above output):<br />
<br />
# rfkill event unblock X<br />
<br />
=== Static IP address settings revert to DHCP ===<br />
<br />
Due to an unresolved bug, when changing default connections to a static IP address, {{ic|nm-applet}} may not properly store the configuration change, and will revert to automatic DHCP.<br />
<br />
To work around this issue you have to edit the default connection (e.g. "Auto eth0") in {{ic|nm-applet}}, change the connection name (e.g. "my eth0"), uncheck the "Available to all users" checkbox, change your static IP address settings as desired, and click '''Apply'''. This will save a new connection with the given name.<br />
<br />
Next, you will want to make the default connection not connect automatically. To do so, run {{ic|nm-connection-editor}} ('''not''' as root). In the connection editor, edit the default connection (e.g. "Auto eth0") and uncheck "Connect automatically". Click '''Apply''' and close the connection editor.<br />
<br />
=== Cannot edit connections as normal user ===<br />
<br />
See [[#Set up PolicyKit permissions]].<br />
<br />
=== Forget hidden wireless network ===<br />
<br />
Since hidden networks are not displayed in the selection list of the Wireless view, they cannot be forgotten (removed) with the GUI. You can delete one with the following command:<br />
<br />
# rm /etc/NetworkManager/system-connections/''SSID''<br />
<br />
This works for any other connection.<br />
<br />
=== VPN not working in GNOME ===<br />
<br />
When setting up OpenConnect or vpnc connections in NetworkManager while using GNOME, you will sometimes never see the dialog box pop up and the following error appears in {{ic|/var/log/errors.log}}:<br />
<br />
localhost NetworkManager[399]: <error> [1361719690.10506] [nm-vpn-connection.c:1405] get_secrets_cb(): Failed to request VPN secrets #3: (6) No agents were available for this request.<br />
<br />
This is caused by the GNOME NM Applet expecting dialog scripts to be at {{ic|/usr/lib/gnome-shell}}, when NetworkManager's packages put them in {{ic|/usr/lib/networkmanager}}.<br />
As a "temporary" fix (this bug has been around for a while now), make the following symlink(s):<br />
<br />
* For OpenConnect: {{ic|ln -s /usr/lib/networkmanager/nm-openconnect-auth-dialog /usr/lib/gnome-shell/}}<br />
* For VPNC (i.e. Cisco VPN): {{ic|ln -s /usr/lib/networkmanager/nm-vpnc-auth-dialog /usr/lib/gnome-shell/}}<br />
<br />
This may need to be done for any other NM VPN plugins as well, but these are the two most common.<br />
<br />
=== Unable to connect to visible European wireless networks ===<br />
<br />
WLAN chips are shipped with a default [[Wireless network configuration#Respecting the regulatory domain|regulatory domain]]. If your access point does not operate within these limitations, you will not be able to connect to the network. Fixing this is easy:<br />
<br />
# [[Install]] {{Pkg|crda}}<br />
# Uncomment the correct Country Code in {{ic|/etc/conf.d/wireless-regdom}}<br />
# Reboot the system, because the setting is only read on boot<br />
<br />
=== Automatic connect to VPN on boot is not working ===<br />
<br />
The problem occurs when the system (i.e. NetworkManager running as the root user) tries to establish a VPN connection, but the password is not accessible because it is stored in the Gnome keyring of a particular user. <br />
<br />
A solution is to keep the password to your VPN in plaintext, as described in step (2.) of [[#Use dispatcher to connect to a VPN after a network connection is established]]. <br />
<br />
You do not need to use the dispatcher described in step (1.) to auto-connect anymore, if you use the new "auto-connect VPN" option from the {{ic|nm-applet}} GUI.<br />
<br />
=== Systemd Bottleneck ===<br />
<br />
Over time the log files ({{ic|/var/log/journal}}) can become very large. This can have a big impact on boot performance when using NetworkManager, see: [[Systemd#Boot time increasing over time]].<br />
<br />
=== Regular network disconnects (WiFi) ===<br />
<br />
Some WiFi drivers have issues when scanning for base stations whilst connected/associated. Symptoms include VPN disconnects/reconnects and lost packets, web pages failing to load and then refresh fine.<br />
<br />
Running {{ic|journalctl -f}} will indicate that this is taking place, messages like the following will be contained in the logs at regular intervals.<br />
<br />
NetworkManager[410]: <info> (wlp3s0): roamed from BSSID 00:14:48:11:20:CF (my-wifi-name) to (none) ((none))<br />
<br />
There is a patched version of NetworkManager which should prevent this type of scanning: {{AUR|networkmanager-noscan}}.<br />
<br />
== Tips and tricks ==<br />
<br />
=== Encrypted Wi-Fi passwords ===<br />
<br />
By default, NetworkManager stores passwords in clear text in the connection files at {{ic|/etc/NetworkManager/system-connections/}}. To print the stored passwords, use the following command:<br />
<br />
# grep -H '^psk=' /etc/NetworkManager/system-connections/*<br />
<br />
The passwords are accessible to the root user in the filesystem and to users with access to settings via the GUI (e.g. {{ic|nm-applet}}). <br />
<br />
If it is preferable to save the passwords in encrypted form instead of clear text, this can be achieved by storing them in a keyring which NetworkManager then queries for the passwords. A suggested keyring daemon is [[GNOME Keyring]] or (for KDE specifically) [[KDE Wallet]]. The keyring daemon has to be started and the keyring needs to be unlocked for the following to work.<br />
<br />
Furthermore, NetworkManager needs to be configured not to store the password for all users. Using GNOME {{ic|nm-applet}}, run {{ic|nm-connection-editor}} from a terminal, select a network connection, click {{ic|Edit}}, select the {{ic|Wifi-Security}} tab and click on the right icon of password and check {{ic|Store the password for this user}}. Using KDE's {{Pkg|kdeplasma-applets-plasma-nm}}{{Broken package link|{{aur-mirror|kdeplasma-applets-plasma-nm}}}}, click the applet, click on the top right {{ic|Settings}} icon, double click on a network connection, in the {{ic|General settings}} tab, untick {{ic|all users may connect to this network}}. If the option is ticked, the passwords will still be stored in clear text, even if a keyring daemon is running.<br />
<br />
If the option was selected previously and you un-tick it, you may have to use the {{ic|reset}} option first to make the password disappear from the file. Alternatively, delete the connection first and set it up again. <br />
<br />
The downside of using the keyring is that the connections have to be set up for each user.<br />
<br />
=== Sharing internet connection over Wi-Fi ===<br />
<br />
You can share your internet connection (e.g.: 3G or wired) with a few clicks using nm. You will need a supported Wi-Fi card (Cards based on Atheros AR9xx or at least AR5xx are probably best choice).<br />
<br />
==== Ad-hoc ====<br />
<br />
* [[Install]] the {{Pkg|dnsmasq}} package to be able to actually share the connection.<br />
* Custom {{ic|dnsmasq.conf}} may interfere with NetworkManager (not sure about this, but i think so).<br />
* Click on applet and choose "Create new wireless network".<br />
* Follow wizard (if using WEP, be sure to use 5 or 13 character long password, different lengths will fail).<br />
* Settings will remain stored for the next time you need it.<br />
<br />
==== Real AP ====<br />
<br />
Support of infrastructure mode (which is needed by Android phones as they intentionally do not support ad-hoc) is added by NetworkManager as of late 2012.<br />
<br />
See [https://fedoraproject.org/wiki/Features/RealHotspot Fedora's wiki].<br />
<br />
=== Sharing internet connection over Ethernet ===<br />
<br />
Scenario: your device has internet connection over wi-fi and you want to share the internet connection to other devices over ethernet.<br />
<br />
Requirements:<br />
* [[Install]] the {{Pkg|dnsmasq}} package to be able to actually share the connection.<br />
* You internet connected device and the other devices are connected over a suitable ethernet cable (this usually means a cross over cable or a switch in between).<br />
<br />
Steps:<br />
* Run {{ic|nm-connection-editor}} from terminal.<br />
* Add a new ethernet connection.<br />
* Give it some sensible name. For example "Shared Internet"<br />
* Go to "IPv4 Settings".<br />
* For "Method:" select "Shared to other computers".<br />
* Save<br />
<br />
Now you should have a new option "Shared Internet" under the Wired connections in NetworkManager.<br />
<br />
=== Checking if networking is up inside a cron job or script ===<br />
<br />
Some ''cron'' jobs require networking to be up to succeed. You may wish to avoid running these jobs when the network is down. To accomplish this, add an '''if''' test for networking that queries NetworkManager's ''nm-tool'' and checks the state of networking. The test shown here succeeds if any interface is up, and fails if they are all down. This is convenient for laptops that might be hardwired, might be on wireless, or might be off the network.<br />
<br />
{{bc|<nowiki><br />
if [ $(nm-tool|grep State|cut -f2 -d' ') == "connected" ]; then<br />
#Whatever you want to do if the network is online<br />
else<br />
#Whatever you want to do if the network is offline - note, this and the else above are optional<br />
fi<br />
</nowiki>}}<br />
<br />
This useful for a {{ic|cron.hourly}} script that runs ''fpupdate'' for the F-Prot virus scanner signature update, as an example. Another way it might be useful, with a little modification, is to differentiate between networks using various parts of the output from ''nm-tool''; for example, since the active wireless network is denoted with an asterisk, you could grep for the network name and then grep for a literal asterisk.<br />
<br />
=== Automatically unlock keyring after login ===<br />
<br />
==== GNOME ====<br />
<br />
# Right click on the {{ic|nm-applet}} icon in your panel and select Edit Connections and open the Wireless tab<br />
# Select the connection you want to work with and click the Edit button<br />
# Check the boxes “Connect Automatically” and “Available to all users”<br />
Log out and log back in to complete.<br />
<br />
{{Note|The following method is dated and known not to work on at least one machine!}}<br />
* In {{ic|/etc/pam.d/gdm}} (or your corresponding daemon in {{ic|/etc/pam.d}}), add these lines at the end of the "auth" and "session" blocks if they do not exist already: <br />
auth optional pam_gnome_keyring.so<br />
session optional pam_gnome_keyring.so auto_start<br />
<br />
* In {{ic|/etc/pam.d/passwd}}, use this line for the 'password' block:<br />
password optional pam_gnome_keyring.so<br />
<br />
:Next time you log in, you should be asked if you want the password to be unlocked automatically on login.<br />
<br />
==== SLiM login manager ====<br />
<br />
See [[SLiM#SLiM and Gnome Keyring]].<br />
<br />
=== KDE and OpenConnect VPN with password authentication ===<br />
<br />
{{Pkg|kdeplasma-applets-plasma-nm}}{{Broken package link|{{aur-mirror|kdeplasma-applets-plasma-nm}}}} now supports configuring username and password for OpenConnect VPN connections. Open your VPN connection, accept the certificate, and connection fields will appear. If not, see the instructions below. Now enter the correct username and password.<br />
<br />
==== Troubleshooting ====<br />
<br />
While you may type both values at connection time, {{Pkg|kdeplasma-applets-plasma-nm}}{{Broken package link|{{aur-mirror|kdeplasma-applets-plasma-nm}}}} 0.9.3.2-1 and above are capable of retrieving OpenConnect username and password directly from KWallet.<br />
<br />
Open "KDE Wallet Manager" and look up your OpenConnect VPN connection under "Network Management|Maps". Click "Show values" and <br />
enter your credentials in key "VpnSecrets" in this form (replace ''username'' and ''password'' accordingly):<br />
<br />
form:main:username%SEP%''username''%SEP%form:main:password%SEP%''password''<br />
<br />
Next time you connect, username and password should appear in the "VPN secrets" dialog box.<br />
<br />
=== Ignore specific devices ===<br />
<br />
Sometimes it may be desired that NetworkManager ignores specific devices and does not try to configure addresses and routes for them.You can quickly and easily ignore devices by MAC or interface-name by using the following in {{ic|/etc/NetworkManager/NetworkManager.conf}}:<br />
[keyfile]<br />
unmanaged-devices=mac:00:22:68:1c:59:b1;mac:00:1E:65:30:D1:C4;interface-name:eth0<br />
After you have put this in, [[Daemon|restart]] NetworkManager, and you should be able to configure interfaces without NetworkManager altering what you have set.<br />
<br />
=== Enable DNS Caching ===<br />
<br />
See [[dnsmasq#NetworkManager]] to enable the plugin that allows DNS caching using [[dnsmasq]].<br />
<br />
=== Enable IPv6 Privacy Extensions ===<br />
<br />
See [[IPv6#NetworkManager]]<br />
<br />
== See also ==<br />
<br />
* [http://blogs.gnome.org/dcbw/2015/02/16/networkmanager-for-administrators-part-1/ NetworkManager for Administrators Part 1]</div>Beta990https://wiki.archlinux.org/index.php?title=NetworkManager&diff=412844NetworkManager2015-12-19T23:12:13Z<p>Beta990: /* Enable DNS Caching */ Moved info to dnsmasq</p>
<hr />
<div>[[Category:Network configuration]]<br />
[[cs:NetworkManager]]<br />
[[de:Networkmanager]]<br />
[[es:NetworkManager]]<br />
[[fr:NetworkManager]]<br />
[[it:NetworkManager]]<br />
[[ja:NetworkManager]]<br />
[[pt:NetworkManager]]<br />
[[ru:NetworkManager]]<br />
[[tr:NetworkManager]]<br />
[[zh-CN:NetworkManager]]<br />
{{Related articles start}}<br />
{{Related|Network configuration}}<br />
{{Related|Wireless network configuration}}<br />
{{Related|:Category:Network managers}}<br />
{{Related articles end}}<br />
[http://projects.gnome.org/NetworkManager/ NetworkManager] is a program for providing detection and configuration for systems to automatically connect to network. NetworkManager's functionality can be useful for both wireless and wired networks. For wireless networks, NetworkManager prefers known wireless networks and has the ability to switch to the most reliable network. NetworkManager-aware applications can switch from online and offline mode. NetworkManager also prefers wired connections over wireless ones, has support for modem connections and certain types of VPN. NetworkManager was originally developed by Red Hat and now is hosted by the [[GNOME]] project.<br />
<br />
{{Warning|By default, Wi-Fi passwords are stored in clear text. See section [[#Encrypted Wi-Fi passwords]]}}<br />
<br />
== Installation ==<br />
<br />
NetworkManager can be [[install]]ed with the package {{Pkg|networkmanager}}. The package does not include the tray applet ''nm-applet'' which is part of the [https://www.archlinux.org/packages/extra/i686/network-manager-applet/ network-manager-applet]. Since version 1.0 it gained internal functionality for basic DHCP support. For full featured DHCP and if you require IPv6 support, {{Pkg|dhclient}} integrates it. <br />
<br />
{{Note|You must ensure that no other service that wants to configure the network is running; in fact, multiple networking services will conflict. You can find a list of the currently running services with {{ic|1=systemctl --type=service}} and then [[stop]] them. See [[#Configuration]] to enable the NetworkManager service.}}<br />
<br />
=== VPN support ===<br />
<br />
NetworkManager VPN support is based on a plug-in system. If you need VPN support via NetworkManager, you have to install one of the following packages:<br />
<br />
* {{Pkg|networkmanager-openconnect}}<br />
* {{Pkg|networkmanager-openvpn}}<br />
* {{Pkg|networkmanager-pptp}}<br />
* {{Pkg|networkmanager-vpnc}}<br />
* {{AUR|networkmanager-l2tp}}<br />
<br />
=== PPPoE / DSL support ===<br />
<br />
[[Install]] {{pkg|rp-pppoe}} for PPPoE / DSL connection support.<br />
<br />
== Graphical front-ends ==<br />
<br />
To configure and have easy access to NetworkManager, most users will want to install an applet. This GUI front-end usually resides in the system tray (or notification area) and allows network selection and configuration of NetworkManager. Various applets exist for different types of desktops.<br />
<br />
=== GNOME ===<br />
<br />
[[GNOME]]'s {{Pkg|network-manager-applet}} works in all environments.<br />
<br />
To store authentication details for connections (Wireless/DSL) install and configure [[GNOME Keyring]].<br />
<br />
Be aware that after enabling the tick-box option {{ic|Make available to other users}} for a connection, NetworkManager stores the password in plain-text, though the respective file is accessible only to root (or other users via {{ic|nm-applet}}). See [[#Encrypted Wi-Fi passwords]].<br />
<br />
=== KDE Plasma ===<br />
<br />
[[Install]] the {{Pkg|plasma-nm}} applet.<br />
<br />
=== Xfce ===<br />
<br />
While {{Pkg|network-manager-applet}} works in [[Xfce]], but in order to see notifications, including error messages, {{ic|nm-applet}} needs an implementation of the Freedesktop desktop notifications specification (see the [http://www.galago-project.org/specs/notification/0.9/index.html Galapago Project]) to display them. To enable notifications install {{Pkg|xfce4-notifyd}}, a package that provides an implementation for the specification.<br />
<br />
Without such a notification daemon, {{ic|nm-applet}} outputs the following errors to stdout/stderr:<br />
<br />
(nm-applet:24209): libnotify-WARNING **: Failed to connect to proxy<br />
** (nm-applet:24209): WARNING **: get_all_cb: couldn't retrieve<br />
system settings properties: (25) Launch helper exited with unknown<br />
return code 1.<br />
** (nm-applet:24209): WARNING **: fetch_connections_done: error<br />
fetching connections: (25) Launch helper exited with unknown return<br />
code 1.<br />
** (nm-applet:24209): WARNING **: Failed to register as an agent:<br />
(25) Launch helper exited with unknown return code 1<br />
<br />
{{ic|nm-applet}} will still work fine, though, but without notifications.<br />
<br />
If {{ic|nm-applet}} is not prompting for a password when connecting to new wifi networks, and is just disconnecting immediately, you may need to install {{Pkg|gnome-keyring}}. <br />
<br />
Should the applet not appear, install the {{AUR|xfce4-indicator-plugin}} package. [http://askubuntu.com/questions/449658/networkmanager-tray-nm-applet-is-gone-after-upgrade-to-14-04-trusty]<br />
<br />
=== Openbox ===<br />
<br />
To work properly in [[Openbox]], the GNOME applet requires the {{Pkg|xfce4-notifyd}} notification daemon for the same reason as in XFCE and the {{Pkg|gnome-icon-theme}} package to be able to display the applet in the systray.<br />
<br />
If you want to store authentication details (Wireless/DSL) install and configure [[gnome-keyring]].<br />
<br />
{{ic|nm-applet}} installs the autostart file at {{ic|/etc/xdg/autostart/nm-applet.desktop}}. If you have issues with it (e.g. {{ic|nm-applet}} is started twice or is not started at all), see [[Openbox#autostart]] or [https://bbs.archlinux.org/viewtopic.php?pid=993738] for solution.<br />
<br />
=== Other desktops and window managers ===<br />
<br />
In all other scenarios it is recommended to use the GNOME applet. You will also need to be sure that the {{Pkg|gnome-icon-theme}} package is installed to be able to display the applet.<br />
<br />
To store connection secrets install and configure [[GNOME Keyring]].<br />
<br />
In order to run {{ic|nm-applet}} without a systray, you can use {{Pkg|trayer}} or {{Pkg|stalonetray}}. For example, you can add a script like this one in your path:<br />
<br />
{{hc|nmgui|<nowiki><br />
#!/bin/sh<br />
nm-applet 2>&1 /dev/null &<br />
stalonetray 2>&1 /dev/null<br />
killall nm-applet<br />
</nowiki>}}<br />
<br />
When you close the ''stalonetray'' window, it closes {{ic|nm-applet}} too, so no extra memory is used once you are done with network settings.<br />
<br />
=== Command line ===<br />
<br />
{{Style|Why is this a subsection of [[#Graphical front-ends]]?}}<br />
<br />
The following applications can be useful for configuring and managing networks without X.<br />
<br />
==== nmcli ====<br />
<br />
A command line frontend, ''nmcli'', is included with {{Pkg|networkmanager}}.<br />
<br />
For usage information, see {{ic|man nmcli}}. Examples:<br />
<br />
* To connect to a wifi network: {{bc|nmcli dev wifi connect <name> password <password>}}<br />
* To connect to a wifi on the {{ic|wlan1}} wifi interface: {{bc|nmcli dev wifi connect <name> password <password> iface wlan1 [profile name]}}<br />
* To disconnect an interface: {{bc|nmcli dev disconnect iface eth0}}<br />
* To reconnect an interface marked as disconnected: {{bc|nmcli con up uuid <uuid>}}<br />
* To get a list of UUIDs: {{bc|nmcli con show}}<br />
* To see a list of network devices and their state: {{bc|nmcli dev}}<br />
* To turn off wifi: {{bc|nmcli r wifi off}}<br />
<br />
==== nmtui ====<br />
<br />
A curses based graphical frontend, ''nmtui'', is included with {{Pkg|networkmanager}}.<br />
<br />
For usage information, see {{ic|man nmtui}}.<br />
<br />
==== nmcli-dmenu ====<br />
<br />
Alternatively there is {{AUR|networkmanager-dmenu-git}} which is a small script to manage NetworkManager connections with ''dmenu'' instead of {{ic|nm-applet}}. It provides all essential features such as connect to existing NetworkManager wifi or wired connections, connect to new wifi connections, requests passphrase if required, connect to existing VPN connections, enable/disable networking, launch ''nm-connection-editor'' GUI.<br />
<br />
== Configuration ==<br />
<br />
NetworkManager will require some additional steps to be able run properly. Make sure you have configured {{ic|/etc/hosts}} as described in [[Network configuration#Set the hostname]] section.<br />
<br />
=== Enable NetworkManager ===<br />
<br />
NetworkManager is [[systemd#Using units|controlled]] via {{ic|NetworkManager.service}}. Once the NetworkManager daemon is started, it will automatically connect to any available "system connections" that have already been configured. Any "user connections" or unconfigured connections will need ''nmcli'' or an applet to configure and connect.<br />
<br />
NetworkManager has a global configuration file at {{ic|/etc/NetworkManager/NetworkManager.conf}}. Usually no configuration needs to be done to the global defaults. <br />
<br />
{{Note|1=NetworkManager will print meaningless warnings ({{Bug|34971}}) to your system log, when [[#Network services with NetworkManager dispatcher|NetworkManager-dispatcher.service]] and [https://www.archlinux.org/packages/?name=modemmanager ModemManager.service] are not enabled. You may enable both to suppress the messages.}}<br />
<br />
=== Enable NetworkManager Wait Online ===<br />
<br />
If you have services which fail if they are started before the network is up, you may use {{ic|NetworkManager-wait-online.service}} in addition to {{ic|NetworkManager.service}}. This is, however, rarely necessary because most networked daemons start up okay, even if the network has not been configured yet.<br />
<br />
In some cases, the service will still fail to start successfully on boot due to the timeout setting in {{ic|/usr/lib/systemd/system/NetworkManager-wait-online.service}} being too short. Change the default timeout from 30 to a higher value.<br />
<br />
=== Set up PolicyKit permissions ===<br />
<br />
See [[General troubleshooting#Session permissions]] for setting up a working session.<br />
<br />
With a working session, you have several options for granting the necessary privileges to NetworkManager:<br />
<br />
* ''Option 1.'' Run a [[Polkit]] authentication agent when you log in, such as {{ic|/usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1}} (part of {{Pkg|polkit-gnome}}). You will be prompted for your password whenever you add or remove a network connection.<br />
* ''Option 2.'' [[Users and groups#Group management|Add]] yourself to the {{ic|wheel}} group. You will not have to enter your password, but your user account may be granted other permissions as well, such as the ability to use [[sudo]] without entering the root password.<br />
* ''Option 3.'' [[Users and groups#Group management|Add]] yourself to the {{ic|network}} group and create the following file:<br />
<br />
{{hc|/etc/polkit-1/rules.d/50-org.freedesktop.NetworkManager.rules|<nowiki><br />
polkit.addRule(function(action, subject) {<br />
if (action.id.indexOf("org.freedesktop.NetworkManager.") == 0 && subject.isInGroup("network")) {<br />
return polkit.Result.YES;<br />
}<br />
});<br />
</nowiki>}}<br />
<br />
: All users in the {{ic|network}} group will be able to add and remove networks without a password. This will not work under [[systemd]] if you do not have an active session with ''systemd-logind''.<br />
<br />
=== Network services with NetworkManager dispatcher ===<br />
<br />
There are quite a few network services that you will not want running until NetworkManager brings up an interface. Good examples are [[NTPd]] and network filesystem mounts of various types (e.g. '''netfs'''). NetworkManager has the ability to start these services when you connect to a network and stop them when you disconnect. To activate the feature you need to [[start]] the {{ic|NetworkManager-dispatcher.service}}.<br />
<br />
Once the feature is active, scripts can be added to the {{ic|/etc/NetworkManager/dispatcher.d}} directory. These scripts must be '''owned by root''', otherwise the dispatcher will not execute them. For added security, set group ownership to root as well:<br />
<br />
# chown root:root ''scriptname''<br />
<br />
Also, the script must have '''write permission for owner only''', otherwise the dispatcher will not execute them:<br />
<br />
# chmod 755 ''scriptname''<br />
<br />
The scripts will be run in alphabetical order at connection time, and in reverse alphabetical order at disconnect time. They receive two arguments: the name of the interface (e.g. {{ic|eth0}}) and the status (''up'' or ''down'' for interfaces and ''vpn-up'' or ''vpn-down'' for vpn connections). To ensure what order they come up in, it is common to use numerical characters prior to the name of the script (e.g. {{ic|10_portmap}} or {{ic|30_netfs}} (which ensures that the ''portmapper'' is up before NFS mounts are attempted).<br />
<br />
{{Warning|If you connect to foreign or public networks, be aware of what services you are starting and what servers you expect to be available for them to connect to. You could make a security hole by starting the wrong services while connected to a public network}}<br />
<br />
==== Avoiding the dispatcher timeout ====<br />
<br />
If the above is working, then this section is not relevant. However, there is a general problem related to running dispatcher scripts which take longer to be executed. Initially an internal timeout of three seconds only was used. If the called script did not complete in time, it was killed. Later the timeout was extended to about 20 seconds (see the [https://bugzilla.redhat.com/show_bug.cgi?id=982734 Bugtracker] for more information). If the timeout still creates the problem, a work around may be to modify the dispatcher service file {{ic|/usr/lib/systemd/system/NetworkManager-dispatcher.service}} to remain active after exit: <br />
<br />
{{hc|/etc/systemd/system/NetworkManager-dispatcher.service|2=<br />
.include /usr/lib/systemd/system/NetworkManager-dispatcher.service<br />
[Service]<br />
RemainAfterExit=yes}}<br />
<br />
Now start and enable the modified {{ic|NetworkManager-dispatcher}} service.<br />
<br />
{{Warning|Adding the {{ic|RemainAfterExit}} line to it will prevent the dispatcher from closing. Unfortunately, the dispatcher '''has''' to close before it can run your scripts again. With it the dispatcher will not time out but it also will not close, which means that the scripts will only run once per boot. Therefore, do not add the line unless the timeout is definitely causing a problem.}}<br />
<br />
==== Start OpenNTPD ====<br />
<br />
Install the {{Pkg|networkmanager-dispatcher-openntpd}} package.<br />
<br />
==== Mount remote folder with sshfs ====<br />
<br />
As the script is run in a very restrictive environment, you have to export {{ic|SSH_AUTH_SOCK}} in order to connect to your SSH agent. There are different ways to accomplish this, see [https://bbs.archlinux.org/viewtopic.php?pid=1042030#p1042030 this message] for more information. The example below works with [[GNOME Keyring]], and will ask you for the password if not unlocked already. In case NetworkManager connects automatically on login, it is likely ''gnome-keyring'' has not yet started and the export will fail (hence the sleep). The {{ic|UUID}} to match can be found with the command {{ic|nmcli con status}} or {{ic|nmcli con list}}. <br />
<br />
{{bc|<nowiki><br />
#!/bin/sh<br />
USER='username'<br />
REMOTE='user@host:/remote/path'<br />
LOCAL='/local/path'<br />
<br />
interface=$1 status=$2<br />
if [ "$CONNECTION_UUID" = "</nowiki>''uuid''<nowiki>" ]; then<br />
case $status in<br />
up)<br />
export SSH_AUTH_SOCK=$(find /tmp -maxdepth 1 -type s -user "$USER" -name 'ssh')<br />
su "$USER" -c "sshfs $REMOTE $LOCAL"<br />
;;<br />
down)<br />
fusermount -u "$LOCAL"<br />
;;<br />
esac<br />
fi<br />
</nowiki>}}<br />
<br />
==== Use dispatcher to connect to a VPN after a network connection is established ====<br />
<br />
In this example we want to connect automatically to a previously defined VPN connection after connecting to a specific Wi-Fi network. First thing to do is to create the dispatcher script that defines what to do after we are connected to the network.<br />
<br />
:1. Create the dispatcher script:<br />
<br />
{{hc|/etc/NetworkManager/dispatcher.d/vpn-up|<nowiki><br />
#!/bin/sh<br />
VPN_NAME="name of VPN connection defined in NetworkManager"<br />
ESSID="Wi-Fi network ESSID (not connection name)"<br />
<br />
interface=$1 status=$2<br />
case $status in<br />
up|vpn-down)<br />
if iwgetid | grep -qs ":\"$ESSID\""; then<br />
nmcli con up id "$VPN_NAME"<br />
fi<br />
;;<br />
down)<br />
if iwgetid | grep -qs ":\"$ESSID\""; then<br />
if nmcli con show --active | grep "$VPN_NAME"; then<br />
nmcli con down id "$VPN_NAME"<br />
fi<br />
fi<br />
;;<br />
esac<br />
</nowiki>}}<br />
<br />
If you would like to attempt to automatically connect to VPN for all Wi-Fi networks, you can use the following definition of the ESSID: {{ic|1=ESSID=$(iwgetid -r)}}. Remember to set the script's permissions [[#Network services with NetworkManager dispatcher|accordingly]]. <br />
<br />
If you require and tick the {{ic|nm-applet}} option to ''Make the VPN connection available to all users'', trying to connect may still fail and NetworkManager will complain about 'no valid VPN secrets', because of [http://developer.gnome.org/NetworkManager/0.9/secrets-flags.html the way VPN secrets are stored], which brings us to step 2:<br />
<br />
:2. Either edit the VPN connection configuration file to make NetworkManager store the secrets by itself rather than inside a keyring [https://bugzilla.redhat.com/show_bug.cgi?id=710552 that will be inaccessible for root]: open up {{ic|/etc/NetworkManager/system-connections/''name of your VPN connection''}} and change the {{ic|password-flags}} and {{ic|secret-flags}} from {{ic|1}} to {{ic|0}}.<br />
<br />
Alternatively put the password directly in the configuration file adding the section {{ic|vpn-secrets}}:<br />
<br />
[vpn]<br />
....<br />
password-flags=0<br />
<br />
[vpn-secrets]<br />
password=''your_password''<br />
<br />
{{Note|It may now be necessary to re-open the NetworkManager connection editor and save the VPN passwords/secrets again.}}<br />
<br />
==== Use dispatcher to handle mounting of CIFS shares ====<br />
<br />
Some CIFS shares are only available on certain networks or locations (e.g. at home). You can use the dispatcher to only mount CIFS shares that are present at your current location.<br />
<br />
The following script will check if we connected to a specific network and mount shares accordingly:<br />
{{hc|/etc/NetworkManager/dispatcher.d/mount_cifs|<nowiki><br />
#!/bin/bash<br />
if [ "$2" = "up" ]<br />
if [ "$CONNECTION_UUID" = "uuid" ]<br />
mount /your/mount/point & <br />
# add more shares as needed<br />
fi<br />
fi<br />
</nowiki>}}<br />
{{Note|You can get a list of uuids using [[#nmcli|nmcli]].}}<br />
<br />
The following script will unmount all CIFS before a disconnect from a specific network:<br />
{{hc|/etc/NetworkManager/dispatcher.d/pre-down.d/mount_cifs|<nowiki><br />
#!/bin/bash<br />
umount -a -l -t cifs<br />
</nowiki>}}<br />
{{Note|Make sure this script is located in the pre-down.d subdirectory as shown above, otherwise it will unmount all shares on any connection state change.}}<br />
{{Note|Ever since NetworkManager 0.9.8, the 'pre-down' and 'down' actions are not executed on shutdown or restart, so the above script will only work if you manually disconnect from the network. See [https://bugzilla.gnome.org/show_bug.cgi?id&#61;701242 this bug report] for more info.}}<br />
<br />
As before, do not forget to set the script permissions [[#Network services with NetworkManager dispatcher|accordingly]].<br />
<br />
See also [[NFS#NetworkManager dispatcher]] for another example script that parses {{ic|/etc/fstab}} mounts during dispatcher actions.<br />
<br />
=== Proxy settings ===<br />
<br />
NetworkManager does not directly handle proxy settings, but if you are using GNOME or KDE, you could use [http://marin.jb.free.fr/proxydriver/ proxydriver] wich handles proxy settings using NetworkManager's informations. proxydriver is found in the package {{AUR|proxydriver}}.<br />
<br />
In order for ''proxydriver'' to be able to change the proxy settings, you would need to execute this command, as part of the GNOME startup process (System -> Preferences -> Startup Applications):<br />
<br />
xhost +si:localuser:''your_username''<br />
<br />
See: [[Proxy settings]].<br />
<br />
=== Disable NetworkManager ===<br />
<br />
It might not be obvious, but the service automatically starts through ''dbus''. To completely disable it you can [[mask]] the services {{ic|NetworkManager}} and {{ic|NetworkManager-dispatcher}}.<br />
<br />
== Testing ==<br />
<br />
NetworkManager applets are designed to load upon login so no further configuration should be necessary for most users. If you have already disabled your previous network settings and disconnected from your network, you can now test if NetworkManager will work. The first step is to [[start]] {{ic|NetworkManager.service}}.<br />
<br />
Some applets will provide you with a {{ic|.desktop}} file so that the NetworkManager applet can be loaded through the application menu. If it does not, you are going to either have to discover the command to use or logout and login again to start the applet. Once the applet is started, it will likely begin polling network connections with for auto-configuration with a DHCP server.<br />
<br />
To start the GNOME applet in non-xdg-compliant window managers like [[awesome]]:<br />
<br />
nm-applet --sm-disable &<br />
<br />
For static IP addresses, you will have to configure NetworkManager to understand them. The process usually involves right-clicking the applet and selecting something like 'Edit Connections'.<br />
<br />
== Troubleshooting ==<br />
<br />
Some fixes to common problems.<br />
<br />
=== No prompt for password of secured Wi-Fi networks ===<br />
<br />
When trying to connect to a secured Wi-Fi network, no prompt for a password is shown and no connection is established. This happens when no keyring package is installed. An easy solution is to install {{Pkg|gnome-keyring}}. If you want the passwords to be stored in encrypted form, follow [[GNOME Keyring]] to set up the ''gnome-keyring-daemon''.<br />
<br />
=== No traffic via PPTP tunnel ===<br />
<br />
PPTP connection logins successfully; you see a ppp0 interface with the correct VPN IP address, but you cannot even ping the remote IP address. It is due to lack of MPPE (Microsoft Point-to-Point Encryption) support in stock Arch pppd. It is recommended to first try with the stock Arch {{Pkg|ppp}} as it may work as intended.<br />
<br />
To solve the problem it should be sufficient to install the {{AUR|ppp-mppe}}{{Broken package link|{{aur-mirror|ppp-mppe}}}} package.<br />
<br />
See also [[WPA2 Enterprise#MS-CHAPv2]].<br />
<br />
=== Network management disabled ===<br />
<br />
When NetworkManager shuts down but the pid (state) file is not removed, you will see a {{ic|Network management disabled}} message. If this happens, remove the file manually:<br />
<br />
# rm /var/lib/NetworkManager/NetworkManager.state<br />
<br />
=== Customizing resolv.conf ===<br />
<br />
See the main page: [[resolv.conf]]. If you use {{Pkg|dhclient}}, you may try the {{AUR|networkmanager-dispatch-resolv}}{{Broken package link|{{aur-mirror|networkmanager-dispatch-resolv}}}} package.<br />
<br />
=== DHCP problems with dhclient ===<br />
<br />
If you have problems with getting an IP address via DHCP, try to add the following to your {{ic|/etc/dhclient.conf}}:<br />
<br />
interface "eth0" {<br />
send dhcp-client-identifier 01:aa:bb:cc:dd:ee:ff;<br />
}<br />
<br />
Where {{ic|aa:bb:cc:dd:ee:ff}} is the MAC address of this NIC. The MAC address can be found using the {{ic|ip link show ''interface''}} command from the {{Pkg|iproute2}} package.<br />
<br />
=== Hostname problems ===<br />
<br />
It depends on the NetworkManager plugins used, whether the hostname is forwarded to a router on connect. The generic "keyfile" plugin does not forward the hostname in default configuration. To make it forward the hostname, add the following to {{ic|/etc/NetworkManager/NetworkManager.conf}}:<br />
<br />
[keyfile]<br />
hostname=''your_hostname''<br />
<br />
The options under {{ic|[keyfile]}} will be applied to network connections in the default {{ic|/etc/NetworkManager/system-connections}} path. <br />
<br />
Another option is to configure the DHCP client, which NetworkManager starts automatically, to forward it. NetworkManager utilizes {{Pkg|dhclient}} in default and falls back to its internal DHCP funtionality, if the former is not installed. To make ''dhclient'' forward the hostname requires to set a non-default option, ''dhcpcd'' forwards the hostname by default. <br />
<br />
First, check which DHCP client is used (''dhclient'' in this example):<br />
<br />
{{hc|<nowiki># journalctl -b | egrep "dhc"</nowiki>|<br />
...<br />
Nov 17 21:03:20 zenbook dhclient[2949]: Nov 17 21:03:20 zenbook dhclient[2949]: Bound to *:546<br />
Nov 17 21:03:20 zenbook dhclient[2949]: Listening on Socket/wlan0<br />
Nov 17 21:03:20 zenbook dhclient[2949]: Sending on Socket/wlan0<br />
Nov 17 21:03:20 zenbook dhclient[2949]: XMT: Info-Request on wlan0, interval 1020ms.<br />
Nov 17 21:03:20 zenbook dhclient[2949]: RCV: Reply message on wlan0 from fe80::126f:3fff:fe0c:2dc.<br />
}}<br />
<br />
==== Configure dhclient to push the hostname to the DHCP server ====<br />
<br />
Copy the example configuration file:<br />
<br />
# cp /usr/share/dhclient/dhclient.conf.example /etc/dhclient.conf<br />
<br />
Take a look at the file - there will only really be one line we want to keep and ''dhclient'' will use it's defaults (as it has been using if you did not have this file) for the other options. This is the important line:<br />
<br />
{{hc|/etc/dhclient.conf|2=send host-name = pick-first-value(gethostname(), "ISC-dhclient");}}<br />
<br />
Force an IP address renewal by your favorite means, and you should now see your hostname on your DHCP server.<br />
<br />
IPv6 push host name:<br />
<br />
# cp /usr/share/dhclient/dhclient.conf.example /etc/dhclient6.conf<br />
<br />
{{hc|/etc/dhclient6.conf|2=send fqdn.fqdn = pick-first-value(gethostname(), "ISC-dhclient");}}<br />
<br />
==== Configure NetworkManager to use a specific DHCP client ====<br />
<br />
If you want to explicitly set the DHCP client used by NetworkManager, it can be set in the global configuration: <br />
<br />
{{hc|1=/etc/NetworkManager/NetworkManager.conf|2=dhcp=internal}}<br />
<br />
The alternative {{ic|1=dhcp=dhclient}} is used per default, if this option is not set. <br />
<br />
Then [[restart]] {{ic|NetworkManager.service}}.<br />
<br />
{{Note|1=Support for {{Pkg|dhcpcd}} has been [https://projects.archlinux.org/svntogit/packages.git/commit/trunk?h=packages/networkmanager&id=a1df79cbcebaec0c043789eb31965e57d17b6cdb disabled] in {{Pkg|networkmanager}}-1.0.0-2 (2015-02-14).}}<br />
<br />
=== Missing default route ===<br />
<br />
On at least one KDE4 system, no default route was created when establishing wireless connections with NetworkManager. Changing the route settings of the wireless connection to remove the default selection "Use only for resources on this connection" solved the issue.<br />
<br />
=== 3G modem not detected ===<br />
<br />
See [[USB 3G Modem#Network Manager]].<br />
<br />
=== Switching off WLAN on laptops ===<br />
<br />
Sometimes NetworkManager will not work when you disable your Wi-Fi adapter with a switch on your laptop and try to enable it again afterwards. This is often a problem with ''rfkill''. [[Install]] the {{Pkg|rfkill}} package and use:<br />
<br />
$ watch -n1 rfkill list all<br />
<br />
to check if the driver notifies ''rfkill'' about the wireless adapter's status. If one identifier stays blocked after you switch on the adapter you could try to manually unblock it with (where X is the number of the identifier provided by the above output):<br />
<br />
# rfkill event unblock X<br />
<br />
=== Static IP address settings revert to DHCP ===<br />
<br />
Due to an unresolved bug, when changing default connections to a static IP address, {{ic|nm-applet}} may not properly store the configuration change, and will revert to automatic DHCP.<br />
<br />
To work around this issue you have to edit the default connection (e.g. "Auto eth0") in {{ic|nm-applet}}, change the connection name (e.g. "my eth0"), uncheck the "Available to all users" checkbox, change your static IP address settings as desired, and click '''Apply'''. This will save a new connection with the given name.<br />
<br />
Next, you will want to make the default connection not connect automatically. To do so, run {{ic|nm-connection-editor}} ('''not''' as root). In the connection editor, edit the default connection (e.g. "Auto eth0") and uncheck "Connect automatically". Click '''Apply''' and close the connection editor.<br />
<br />
=== Cannot edit connections as normal user ===<br />
<br />
See [[#Set up PolicyKit permissions]].<br />
<br />
=== Forget hidden wireless network ===<br />
<br />
Since hidden networks are not displayed in the selection list of the Wireless view, they cannot be forgotten (removed) with the GUI. You can delete one with the following command:<br />
<br />
# rm /etc/NetworkManager/system-connections/''SSID''<br />
<br />
This works for any other connection.<br />
<br />
=== VPN not working in GNOME ===<br />
<br />
When setting up OpenConnect or vpnc connections in NetworkManager while using GNOME, you will sometimes never see the dialog box pop up and the following error appears in {{ic|/var/log/errors.log}}:<br />
<br />
localhost NetworkManager[399]: <error> [1361719690.10506] [nm-vpn-connection.c:1405] get_secrets_cb(): Failed to request VPN secrets #3: (6) No agents were available for this request.<br />
<br />
This is caused by the GNOME NM Applet expecting dialog scripts to be at {{ic|/usr/lib/gnome-shell}}, when NetworkManager's packages put them in {{ic|/usr/lib/networkmanager}}.<br />
As a "temporary" fix (this bug has been around for a while now), make the following symlink(s):<br />
<br />
* For OpenConnect: {{ic|ln -s /usr/lib/networkmanager/nm-openconnect-auth-dialog /usr/lib/gnome-shell/}}<br />
* For VPNC (i.e. Cisco VPN): {{ic|ln -s /usr/lib/networkmanager/nm-vpnc-auth-dialog /usr/lib/gnome-shell/}}<br />
<br />
This may need to be done for any other NM VPN plugins as well, but these are the two most common.<br />
<br />
=== Unable to connect to visible European wireless networks ===<br />
<br />
WLAN chips are shipped with a default [[Wireless network configuration#Respecting the regulatory domain|regulatory domain]]. If your access point does not operate within these limitations, you will not be able to connect to the network. Fixing this is easy:<br />
<br />
# [[Install]] {{Pkg|crda}}<br />
# Uncomment the correct Country Code in {{ic|/etc/conf.d/wireless-regdom}}<br />
# Reboot the system, because the setting is only read on boot<br />
<br />
=== Automatic connect to VPN on boot is not working ===<br />
<br />
The problem occurs when the system (i.e. NetworkManager running as the root user) tries to establish a VPN connection, but the password is not accessible because it is stored in the Gnome keyring of a particular user. <br />
<br />
A solution is to keep the password to your VPN in plaintext, as described in step (2.) of [[#Use dispatcher to connect to a VPN after a network connection is established]]. <br />
<br />
You do not need to use the dispatcher described in step (1.) to auto-connect anymore, if you use the new "auto-connect VPN" option from the {{ic|nm-applet}} GUI.<br />
<br />
=== Systemd Bottleneck ===<br />
<br />
Over time the log files ({{ic|/var/log/journal}}) can become very large. This can have a big impact on boot performance when using NetworkManager, see: [[Systemd#Boot time increasing over time]].<br />
<br />
=== Regular network disconnects (WiFi) ===<br />
<br />
Some WiFi drivers have issues when scanning for base stations whilst connected/associated. Symptoms include VPN disconnects/reconnects and lost packets, web pages failing to load and then refresh fine.<br />
<br />
Running {{ic|journalctl -f}} will indicate that this is taking place, messages like the following will be contained in the logs at regular intervals.<br />
<br />
NetworkManager[410]: <info> (wlp3s0): roamed from BSSID 00:14:48:11:20:CF (my-wifi-name) to (none) ((none))<br />
<br />
There is a patched version of NetworkManager which should prevent this type of scanning: {{AUR|networkmanager-noscan}}.<br />
<br />
== Tips and tricks ==<br />
<br />
=== Encrypted Wi-Fi passwords ===<br />
<br />
By default, NetworkManager stores passwords in clear text in the connection files at {{ic|/etc/NetworkManager/system-connections/}}. To print the stored passwords, use the following command:<br />
<br />
# grep -H '^psk=' /etc/NetworkManager/system-connections/*<br />
<br />
The passwords are accessible to the root user in the filesystem and to users with access to settings via the GUI (e.g. {{ic|nm-applet}}). <br />
<br />
If it is preferable to save the passwords in encrypted form instead of clear text, this can be achieved by storing them in a keyring which NetworkManager then queries for the passwords. A suggested keyring daemon is [[GNOME Keyring]] or (for KDE specifically) [[KDE Wallet]]. The keyring daemon has to be started and the keyring needs to be unlocked for the following to work.<br />
<br />
Furthermore, NetworkManager needs to be configured not to store the password for all users. Using GNOME {{ic|nm-applet}}, run {{ic|nm-connection-editor}} from a terminal, select a network connection, click {{ic|Edit}}, select the {{ic|Wifi-Security}} tab and click on the right icon of password and check {{ic|Store the password for this user}}. Using KDE's {{Pkg|kdeplasma-applets-plasma-nm}}{{Broken package link|{{aur-mirror|kdeplasma-applets-plasma-nm}}}}, click the applet, click on the top right {{ic|Settings}} icon, double click on a network connection, in the {{ic|General settings}} tab, untick {{ic|all users may connect to this network}}. If the option is ticked, the passwords will still be stored in clear text, even if a keyring daemon is running.<br />
<br />
If the option was selected previously and you un-tick it, you may have to use the {{ic|reset}} option first to make the password disappear from the file. Alternatively, delete the connection first and set it up again. <br />
<br />
The downside of using the keyring is that the connections have to be set up for each user.<br />
<br />
=== Sharing internet connection over Wi-Fi ===<br />
<br />
You can share your internet connection (e.g.: 3G or wired) with a few clicks using nm. You will need a supported Wi-Fi card (Cards based on Atheros AR9xx or at least AR5xx are probably best choice).<br />
<br />
==== Ad-hoc ====<br />
<br />
* [[Install]] the {{Pkg|dnsmasq}} package to be able to actually share the connection.<br />
* Custom {{ic|dnsmasq.conf}} may interfere with NetworkManager (not sure about this, but i think so).<br />
* Click on applet and choose "Create new wireless network".<br />
* Follow wizard (if using WEP, be sure to use 5 or 13 character long password, different lengths will fail).<br />
* Settings will remain stored for the next time you need it.<br />
<br />
==== Real AP ====<br />
<br />
Support of infrastructure mode (which is needed by Android phones as they intentionally do not support ad-hoc) is added by NetworkManager as of late 2012.<br />
<br />
See [https://fedoraproject.org/wiki/Features/RealHotspot Fedora's wiki].<br />
<br />
=== Sharing internet connection over Ethernet ===<br />
<br />
Scenario: your device has internet connection over wi-fi and you want to share the internet connection to other devices over ethernet.<br />
<br />
Requirements:<br />
* [[Install]] the {{Pkg|dnsmasq}} package to be able to actually share the connection.<br />
* You internet connected device and the other devices are connected over a suitable ethernet cable (this usually means a cross over cable or a switch in between).<br />
<br />
Steps:<br />
* Run {{ic|nm-connection-editor}} from terminal.<br />
* Add a new ethernet connection.<br />
* Give it some sensible name. For example "Shared Internet"<br />
* Go to "IPv4 Settings".<br />
* For "Method:" select "Shared to other computers".<br />
* Save<br />
<br />
Now you should have a new option "Shared Internet" under the Wired connections in NetworkManager.<br />
<br />
=== Checking if networking is up inside a cron job or script ===<br />
<br />
Some ''cron'' jobs require networking to be up to succeed. You may wish to avoid running these jobs when the network is down. To accomplish this, add an '''if''' test for networking that queries NetworkManager's ''nm-tool'' and checks the state of networking. The test shown here succeeds if any interface is up, and fails if they are all down. This is convenient for laptops that might be hardwired, might be on wireless, or might be off the network.<br />
<br />
{{bc|<nowiki><br />
if [ $(nm-tool|grep State|cut -f2 -d' ') == "connected" ]; then<br />
#Whatever you want to do if the network is online<br />
else<br />
#Whatever you want to do if the network is offline - note, this and the else above are optional<br />
fi<br />
</nowiki>}}<br />
<br />
This useful for a {{ic|cron.hourly}} script that runs ''fpupdate'' for the F-Prot virus scanner signature update, as an example. Another way it might be useful, with a little modification, is to differentiate between networks using various parts of the output from ''nm-tool''; for example, since the active wireless network is denoted with an asterisk, you could grep for the network name and then grep for a literal asterisk.<br />
<br />
=== Automatically unlock keyring after login ===<br />
<br />
==== GNOME ====<br />
<br />
# Right click on the {{ic|nm-applet}} icon in your panel and select Edit Connections and open the Wireless tab<br />
# Select the connection you want to work with and click the Edit button<br />
# Check the boxes “Connect Automatically” and “Available to all users”<br />
Log out and log back in to complete.<br />
<br />
{{Note|The following method is dated and known not to work on at least one machine!}}<br />
* In {{ic|/etc/pam.d/gdm}} (or your corresponding daemon in {{ic|/etc/pam.d}}), add these lines at the end of the "auth" and "session" blocks if they do not exist already: <br />
auth optional pam_gnome_keyring.so<br />
session optional pam_gnome_keyring.so auto_start<br />
<br />
* In {{ic|/etc/pam.d/passwd}}, use this line for the 'password' block:<br />
password optional pam_gnome_keyring.so<br />
<br />
:Next time you log in, you should be asked if you want the password to be unlocked automatically on login.<br />
<br />
==== KDE ====<br />
<br />
{{Out of date|The described approach seems to be very old. pam_keyring is unmaintained and {{Aur|pam-keyring-tool}}{{Broken package link|{{aur-mirror|pam-keyring-tool}}}} has been flaged out of date since the end of 2012. See if the approach described on the [[KDE Wallet]] page helps you.}}<br />
<br />
{{Note|See https://wiki.gnome.org/Projects/GnomeKeyring/Pam/Manual for reference, and if you are using [[KDE]] with KDM, you can use {{AUR|pam-keyring-tool}}{{Broken package link|{{aur-mirror|pam-keyring-tool}}}}.}}<br />
<br />
Put a script like the following in {{ic|~/.kde4/Autostart}}:<br />
#!/bin/sh<br />
echo PASSWORD | /usr/bin/pam-keyring-tool --unlock --keyring=default -s<br />
Similar should work with Openbox, LXDE, etc.<br />
<br />
==== SLiM login manager ====<br />
<br />
See [[SLiM#SLiM and Gnome Keyring]].<br />
<br />
=== KDE and OpenConnect VPN with password authentication ===<br />
<br />
{{Pkg|kdeplasma-applets-plasma-nm}}{{Broken package link|{{aur-mirror|kdeplasma-applets-plasma-nm}}}} now supports configuring username and password for OpenConnect VPN connections. Open your VPN connection, accept the certificate, and connection fields will appear. If not, see the instructions below. Now enter the correct username and password.<br />
<br />
==== Troubleshooting ====<br />
<br />
While you may type both values at connection time, {{Pkg|kdeplasma-applets-plasma-nm}}{{Broken package link|{{aur-mirror|kdeplasma-applets-plasma-nm}}}} 0.9.3.2-1 and above are capable of retrieving OpenConnect username and password directly from KWallet.<br />
<br />
Open "KDE Wallet Manager" and look up your OpenConnect VPN connection under "Network Management|Maps". Click "Show values" and <br />
enter your credentials in key "VpnSecrets" in this form (replace ''username'' and ''password'' accordingly):<br />
<br />
form:main:username%SEP%''username''%SEP%form:main:password%SEP%''password''<br />
<br />
Next time you connect, username and password should appear in the "VPN secrets" dialog box.<br />
<br />
=== Ignore specific devices ===<br />
<br />
Sometimes it may be desired that NetworkManager ignores specific devices and does not try to configure addresses and routes for them.You can quickly and easily ignore devices by MAC or interface-name by using the following in {{ic|/etc/NetworkManager/NetworkManager.conf}}:<br />
[keyfile]<br />
unmanaged-devices=mac:00:22:68:1c:59:b1;mac:00:1E:65:30:D1:C4;interface-name:eth0<br />
After you have put this in, [[Daemon|restart]] NetworkManager, and you should be able to configure interfaces without NetworkManager altering what you have set.<br />
<br />
=== Enable DNS Caching ===<br />
<br />
See [[dnsmasq#NetworkManager]] to enable the plugin that allows DNS caching using [[dnsmasq]].<br />
<br />
=== Enable IPv6 Privacy Extensions ===<br />
<br />
See [[IPv6#NetworkManager]]<br />
<br />
== See also ==<br />
<br />
* [http://blogs.gnome.org/dcbw/2015/02/16/networkmanager-for-administrators-part-1/ NetworkManager for Administrators Part 1]</div>Beta990https://wiki.archlinux.org/index.php?title=Dnsmasq&diff=412843Dnsmasq2015-12-19T23:11:10Z<p>Beta990: /* NetworkManager */ Merge from NetworkManager</p>
<hr />
<div>{{Lowercase_title}}<br />
[[Category:Domain Name System]]<br />
[[es:Dnsmasq]]<br />
[[it:Dnsmasq]]<br />
[[ja:Dnsmasq]]<br />
[[pt:Dnsmasq]]<br />
[[ru:Dnsmasq]]<br />
[[zh-CN:Dnsmasq]]<br />
<br />
'''dnsmasq''' provides services as a DNS cacher and a DHCP server. As a Domain Name Server (DNS) it can cache DNS queries to improve connection speeds to previously visited sites, and as a DHCP server {{Pkg|dnsmasq}} can be used to provide internal IP addresses and routes to computers on a LAN. Either or both of these services can be implemented. dnsmasq is considered to be lightweight and easy to configure; it is designed for personal computer use or for use on a network with less than 50 computers. It also comes with a [[PXE]] server.<br />
<br />
== Installation ==<br />
<br />
[[Install]] {{Pkg|dnsmasq}}.<br />
<br />
== DNS Cache Setup ==<br />
<br />
To set up dnsmasq as a DNS caching daemon on a single computer edit {{ic|/etc/dnsmasq.conf}} and uncomment the {{ic|listen-address}} directive, adding in the localhost IP address:<br />
<br />
listen-address=127.0.0.1<br />
<br />
To use this computer to listen on it's LAN IP address for other computers on the network:<br />
<br />
listen-address=192.168.1.1 # Example IP<br />
<br />
It is recommended that you use a static LAN ip in this case.<br />
<br />
Multiple ip address settings:<br />
<br />
listen-address=127.0.0.1,192.168.1.1 <br />
<br />
=== DNS Addresses File ===<br />
<br />
{{Merge|resolv.conf|Same topic. Also note that most of this can be done also natively in {{ic|/etc/resolvconf.conf}} using the {{ic|name_servers}} and {{ic|name_servers_append}} options.}}<br />
<br />
After configuring dnsmasq the DHCP client will need to prepend the localhost address to the known DNS addresses in {{ic|/etc/resolv.conf}}. This causes all queries to be sent to dnsmasq before trying to resolve them with an external DNS. After the DHCP client is configured the network will need to be restarted for changes to take effect.<br />
<br />
==== resolv.conf ====<br />
<br />
One option is a pure {{ic|resolv.conf}} configuration. To do this, just make the first nameserver in {{ic|/etc/resolv.conf}} point to localhost:<br />
<br />
{{hc|/etc/resolv.conf|<br />
nameserver 127.0.0.1<br />
# External nameservers<br />
...<br />
}}<br />
<br />
Now DNS queries will be resolved first with dnsmasq, only checking external servers if dnsmasq cannot resolve the query. {{Pkg|dhcpcd}}, unfortunately, tends to overwrite {{ic|/etc/resolv.conf}} by default, so if you use DHCP it is a good idea to protect {{ic|/etc/resolv.conf}}. To do this, append {{ic|nohook resolv.conf}} to the dhcpcd config file:<br />
<br />
{{hc|/etc/dhcpcd.conf|<br />
...<br />
nohook resolv.conf}}<br />
<br />
It is also possible to write protect your resolv.conf:<br />
<br />
# chattr +i /etc/resolv.conf<br />
<br />
===== More than three nameservers =====<br />
<br />
A limitation in the way Linux handles DNS queries is that there can only be a maximum of three nameservers used in {{ic|resolv.conf}}. As a workaround, you can make localhost the only nameserver in {{ic|resolv.conf}}, and then create a separate {{ic|resolv-file}} for your external nameservers. First, create a new resolv file for dnsmasq:<br />
<br />
{{hc|/etc/resolv.dnsmasq.conf|<br />
# Google's nameservers, for example<br />
nameserver 8.8.8.8<br />
nameserver 8.8.4.4<br />
}}<br />
<br />
And then edit {{ic|/etc/dnsmasq.conf}} to use your new resolv file:<br />
<br />
{{hc|/etc/dnsmasq.conf|<br />
...<br />
resolv-file&#61;/etc/resolv.dnsmasq.conf<br />
...<br />
}}<br />
<br />
==== dhcpcd ====<br />
<br />
[[dhcpcd]] has the ability to prepend or append nameservers to {{ic|/etc/resolv.conf}} by creating (or editing) the {{ic|/etc/resolv.conf.head}} and {{ic|/etc/resolv.conf.tail}} files respectively:<br />
<br />
echo "nameserver 127.0.0.1" > /etc/resolv.conf.head<br />
<br />
==== dhclient ====<br />
<br />
For {{Pkg|dhclient}}, uncomment in {{ic|/etc/dhclient.conf}}:<br />
<br />
prepend domain-name-servers 127.0.0.1;<br />
<br />
=== NetworkManager ===<br />
DNS requests can be sped up by caching previous requests locally for subsequent lookup. [[NetworkManager]] has a plugin to enable DNS caching using dnsmasq, but it is not enabled in the default configuration. <br />
<br />
Make sure {{Pkg|dnsmasq}} has been installed. Then, edit {{ic|/etc/NetworkManager/NetworkManager.conf}} and change the {{ic|dns}} in the {{ic|[main]}} section:<br />
{{hc|/etc/NetworkManager/NetworkManager.conf|<nowiki><br />
[main]<br />
plugins=keyfile<br />
dhcp=dhclient<br />
dns=dnsmasq<br />
</nowiki>}}<br />
<br />
Now restart NetworkManager or reboot. NetworkManager will automatically start dnsmasq and add 127.0.0.1 to {{ic|/etc/resolv.conf}}. The actual DNS servers can be found in {{ic|/var/run/NetworkManager/dnsmasq.conf}}. You can verify dnsmasq is being used by doing the same DNS lookup twice with {{ic|$ dig example.com}} that can be installed with {{Pkg|bind-tools}} and verifying the server and query times.<br />
<br />
==== Custom Configuration ====<br />
Custom configurations can be created for ''dnsmasq'' by creating configuration files in {{ic|/etc/NetworkManager/dnsmasq.d/}}. For example, to change the size of the DNS cache (which is stored in RAM):<br />
<br />
{{hc|/etc/NetworkManager/dnsmasq.d/cache|2=<br />
cache-size=1000<br />
}}<br />
<br />
==== IPv6 ====<br />
<br />
Enabling {{ic|dnsmasq}} in NetworkManager may break IPv6-only DNS lookups (i.e. {{ic|dig -6 [hostname]}}) which would otherwise work. In order to resolve this, creating the following file will configure ''dnsmasq'' to also listen to the IPv6 loopback:<br />
<br />
{{hc|/etc/NetworkManager/dnsmasq.d/ipv6_listen.conf|2=<br />
listen-address=::1<br />
}}<br />
In addition, {{ic|dnsmasq}} also does not prioritize upstream IPv6 DNS. Unfortunately NetworkManager does not do this ([https://bugs.launchpad.net/ubuntu/+source/network-manager/+bug/936712 Ubuntu Bug]). A workaround would be to disable IPv4 DNS in the NetworkManager config, assuming one exists<br />
<br />
==== Other methods ====<br />
<br />
Another option is in NetworkManagers' settings (usually by right-clicking the applet) and entering settings manually. Setting up will depending on the type of front-end used; the process usually involves right-clicking on the applet, editing (or creating) a profile, and then choosing DHCP type as 'Automatic (specify addresses).' The DNS addresses will need to be entered and are usually in this form: {{ic|127.0.0.1, DNS-server-one, ...}}.<br />
<br />
== DHCP server setup ==<br />
<br />
By default dnsmasq has the DHCP functionality turned off, if you want to use it you must turn it on in ({{ic|/etc/dnsmasq.conf}}). Here are the important settings:<br />
<br />
{{bc|<nowiki><br />
# Only listen to routers' LAN NIC. Doing so opens up tcp/udp port 53 to<br />
# localhost and udp port 67 to world:<br />
interface=<LAN-NIC><br />
<br />
# dnsmasq will open tcp/udp port 53 and udp port 67 to world to help with<br />
# dynamic interfaces (assigning dynamic ips). Dnsmasq will discard world<br />
# requests to them, but the paranoid might like to close them and let the <br />
# kernel handle them:<br />
bind-interfaces<br />
<br />
# Dynamic range of IPs to make available to LAN pc<br />
dhcp-range=192.168.111.50,192.168.111.100,12h<br />
<br />
# If you’d like to have dnsmasq assign static IPs, bind the LAN computer's<br />
# NIC MAC address:<br />
dhcp-host=aa:bb:cc:dd:ee:ff,192.168.111.50<br />
</nowiki>}}<br />
<br />
== Start the daemon ==<br />
To have dnsmasq load upon startup:<br />
<br />
{{bc|# systemctl enable dnsmasq}}<br />
<br />
To start dnsmasq immediately:<br />
<br />
{{bc|# systemctl start dnsmasq}}<br />
<br />
To see if dnsmasq started properly, check the system's journal:<br />
<br />
{{bc|$ journalctl -u dnsmasq}}<br />
<br />
The network will also need to be restarted so the DHCP client can create a new {{ic|/etc/resolv.conf}}.<br />
<br />
== Test ==<br />
=== DNS Caching ===<br />
<br />
To do a lookup speed test choose a website that has not been visited since dnsmasq has been started (''dig'' is part of the {{Pkg|bind-tools}} package):<br />
<br />
$ dig archlinux.org | grep "Query time"<br />
<br />
Running the command again will use the cached DNS IP and result in a faster lookup time if dnsmasq is setup correctly:<br />
<br />
{{hc|<nowiki>$ dig archlinux.org | grep "Query time"</nowiki>|<br />
;; Query time: 18 msec<br />
}}<br />
<br />
{{hc|<nowiki>$ dig archlinux.org | grep "Query time"</nowiki>|<br />
;; Query time: 2 msec<br />
}}<br />
<br />
=== DHCP Server ===<br />
<br />
From a computer that is connected to the one with dnsmasq on it, configure it to use DHCP for automatic IP address assignment, then attempt to log into the network normally.<br />
<br />
== Tips and tricks ==<br />
<br />
=== Prevent OpenDNS Redirecting Google Queries ===<br />
<br />
To prevent OpenDNS from redirecting all Google queries to their own search server, add to {{ic|/etc/dnsmasq.conf}}:<br />
{{bc|1=server=/www.google.com/<ISP DNS IP>}}<br />
<br />
=== View leases ===<br />
{{bc|$ cat /var/lib/misc/dnsmasq.leases}}<br />
<br />
=== Adding a custom domain ===<br />
It is possible to add a custom domain to hosts in your (local) network:<br />
local=/home.lan/<br />
domain=home.lan<br />
<br />
In this example it is possible to ping a host/device (e.g. defined in your hosts file) as {{ic|hostname.home.lan}}.<br />
<br />
Uncomment {{ic|expand-hosts}} to add the custom domain to hosts entries:<br />
expand-hosts<br />
Without this setting, you'll have to add the domain to entries of /etc/hosts.<br />
<br />
=== Override addresses ===<br />
<br />
In some cases, such as when operating a captive portal, it can be useful to resolve specific domains names to a hard-coded set of addresses. This is done with the {{ic|address}} config:<br />
<br />
address=/example.com/1.2.3.4<br />
<br />
Furthermore, it's possible to return a specific address for all domain names that are not answered from {{ic|/etc/hosts}} or DHCP by using a special wildcard:<br />
<br />
address=/#/1.2.3.4</div>Beta990https://wiki.archlinux.org/index.php?title=SDDM&diff=412776SDDM2015-12-19T10:48:01Z<p>Beta990: /* One or more users do not show up on the greeter */ Warning about changing UID, not recommended</p>
<hr />
<div>[[Category:KDE]]<br />
[[Category:Display managers]]<br />
[[ja:SDDM]]<br />
[[ru:SDDM]]<br />
[[zh-CN:SDDM]]<br />
{{Related articles start}}<br />
{{Related|Display manager}}<br />
{{Related|KDE}}<br />
{{Related articles end}}<br />
The [[Wikipedia:Simple Desktop Display Manager|Simple Desktop Display Manager]] (SDDM) is the preferred [[display manager]] for [[KDE]] Plasma desktop. From Wikipedia:<br />
<br />
:''Simple Desktop Display Manager (SDDM) is a display manager (a graphical login program) for X11. SDDM was written from scratch in C++11 and supports theming via QML. It is the successor of the KDE Display Manager and is used in conjunction with KDE Frameworks 5, KDE Plasma 5 and KDE Applications 5.''<br />
<br />
== Installation ==<br />
<br />
[[Install]] the {{Pkg|sddm}} package.<br />
<br />
Then follow [[Display manager#Loading the display manager]] to start SDDM at boot.<br />
<br />
== Configuration ==<br />
<br />
The configuration file for SDDM can be found at {{ic|/etc/sddm.conf}}. See {{ic|man sddm.conf}} for all options.<br />
<br />
On systems controlled by [[systemd]], everything should work out of the box, since SDDM defaults to using {{ic|systemd-logind}} for session management. The configuration file will therefore not be created at package installation time. SDDM offers a command for generating a sample configuration file with the default settings if you really want one:<br />
<br />
# sddm --example-config > /etc/sddm.conf<br />
<br />
=== Autologin ===<br />
<br />
SDDM supports automatic login through its configuration file, for example:<br />
<br />
{{hc|<br />
1=/etc/sddm.conf|<br />
2=[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/bash <br />
/usr/bin/qdbus-qt4 org.kde.screensaver /ScreenSaver SetActive true &<br />
exit 0<br />
<br />
=== Theme settings ===<br />
<br />
Theme settings can be changed in the {{ic|[Theme]}} section.<br />
<br />
Some themes are available in the [[AUR]], for example {{AUR|archlinux-themes-sddm}}.<br />
<br />
==== Main theme ====<br />
<br />
Set the main 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 seperate subdirectory. Study the files installed to modify or create your own theme.<br />
<br />
==== Mouse cursor ====<br />
<br />
To set the mouse cursor theme, set {{ic|CursorTheme}} to your preferred cursor theme.<br />
<br />
==== Changing your avatar ====<br />
<br />
You can simply put a png image named {{ic|username.face.icon}} into the default directory {{ic|/usr/share/sddm/faces/}}. Alternatively you can change the default directory to match your desires:<br />
{{hc|<br />
1=/etc/sddm.conf|<br />
2=[Theme]<br />
FacesDir=/var/lib/AccountsService/icons/<br />
}}<br />
<br />
{{Note|SDDM cannot read avatars which are symlinks.}}<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 />
=== Configuration GUI ===<br />
<br />
* KDE Frameworks' System Settings contains an SDDM configuration module. Install {{Pkg|sddm-kcm}} package to use it.<br />
* There is a Qt-based {{AUR|sddm-config-editor-git}} in the AUR.<br />
<br />
== Troubleshooting ==<br />
<br />
=== Hangs after login ===<br />
<br />
Try removing ''~/.Xauthority''.<br />
<br />
Alternatively, if your cursor turns to a black cross at the same time, and you are using zsh as your shell, you may be experiencing [https://github.com/sddm/sddm/issues/352 this bug]. Follow the instructions in the previous link to fix the issue. This bug is expected to be fixed in the SDDM version subsequent to 0.11.0.<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, add the following to your {{ic|sddm.conf}}:<br />
<br />
{{hc|<br />
1=/etc/sddm.conf|<br />
2=[XDisplay]<br />
MinimumVT=7}}<br />
<br />
=== One or more users do not show up on the greeter ===<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. Modify your {{ic|sddm.conf}} to (for a UID of 501, say):<br />
<br />
{{hc|<br />
1=/etc/sddm.conf|<br />
2=[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 />
=== 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.</div>Beta990https://wiki.archlinux.org/index.php?title=SDDM&diff=412775SDDM2015-12-19T10:42:29Z<p>Beta990: /* No desktop effects in KDE Plasma */ This is not relevant, user error</p>
<hr />
<div>[[Category:KDE]]<br />
[[Category:Display managers]]<br />
[[ja:SDDM]]<br />
[[ru:SDDM]]<br />
[[zh-CN:SDDM]]<br />
{{Related articles start}}<br />
{{Related|Display manager}}<br />
{{Related|KDE}}<br />
{{Related articles end}}<br />
The [[Wikipedia:Simple Desktop Display Manager|Simple Desktop Display Manager]] (SDDM) is the preferred [[display manager]] for [[KDE]] Plasma desktop. From Wikipedia:<br />
<br />
:''Simple Desktop Display Manager (SDDM) is a display manager (a graphical login program) for X11. SDDM was written from scratch in C++11 and supports theming via QML. It is the successor of the KDE Display Manager and is used in conjunction with KDE Frameworks 5, KDE Plasma 5 and KDE Applications 5.''<br />
<br />
== Installation ==<br />
<br />
[[Install]] the {{Pkg|sddm}} package.<br />
<br />
Then follow [[Display manager#Loading the display manager]] to start SDDM at boot.<br />
<br />
== Configuration ==<br />
<br />
The configuration file for SDDM can be found at {{ic|/etc/sddm.conf}}. See {{ic|man sddm.conf}} for all options.<br />
<br />
On systems controlled by [[systemd]], everything should work out of the box, since SDDM defaults to using {{ic|systemd-logind}} for session management. The configuration file will therefore not be created at package installation time. SDDM offers a command for generating a sample configuration file with the default settings if you really want one:<br />
<br />
# sddm --example-config > /etc/sddm.conf<br />
<br />
=== Autologin ===<br />
<br />
SDDM supports automatic login through its configuration file, for example:<br />
<br />
{{hc|<br />
1=/etc/sddm.conf|<br />
2=[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/bash <br />
/usr/bin/qdbus-qt4 org.kde.screensaver /ScreenSaver SetActive true &<br />
exit 0<br />
<br />
=== Theme settings ===<br />
<br />
Theme settings can be changed in the {{ic|[Theme]}} section.<br />
<br />
Some themes are available in the [[AUR]], for example {{AUR|archlinux-themes-sddm}}.<br />
<br />
==== Main theme ====<br />
<br />
Set the main 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 seperate subdirectory. Study the files installed to modify or create your own theme.<br />
<br />
==== Mouse cursor ====<br />
<br />
To set the mouse cursor theme, set {{ic|CursorTheme}} to your preferred cursor theme.<br />
<br />
==== Changing your avatar ====<br />
<br />
You can simply put a png image named {{ic|username.face.icon}} into the default directory {{ic|/usr/share/sddm/faces/}}. Alternatively you can change the default directory to match your desires:<br />
{{hc|<br />
1=/etc/sddm.conf|<br />
2=[Theme]<br />
FacesDir=/var/lib/AccountsService/icons/<br />
}}<br />
<br />
{{Note|SDDM cannot read avatars which are symlinks.}}<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 />
=== Configuration GUI ===<br />
<br />
* KDE Frameworks' System Settings contains an SDDM configuration module. Install {{Pkg|sddm-kcm}} package to use it.<br />
* There is a Qt-based {{AUR|sddm-config-editor-git}} in the AUR.<br />
<br />
== Troubleshooting ==<br />
<br />
=== Hangs after login ===<br />
<br />
Try removing ''~/.Xauthority''.<br />
<br />
Alternatively, if your cursor turns to a black cross at the same time, and you are using zsh as your shell, you may be experiencing [https://github.com/sddm/sddm/issues/352 this bug]. Follow the instructions in the previous link to fix the issue. This bug is expected to be fixed in the SDDM version subsequent to 0.11.0.<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, add the following to your {{ic|sddm.conf}}:<br />
<br />
{{hc|<br />
1=/etc/sddm.conf|<br />
2=[XDisplay]<br />
MinimumVT=7}}<br />
<br />
=== One or more users do not show up on the greeter ===<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. Modify your {{ic|sddm.conf}} to (for a UID of 501, say):<br />
<br />
{{hc|<br />
1=/etc/sddm.conf|<br />
2=[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 />
=== 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.</div>Beta990https://wiki.archlinux.org/index.php?title=Display_manager&diff=412774Display manager2015-12-19T10:39:36Z<p>Beta990: /* Loading the display manager */ Replaced KDM with SDDM</p>
<hr />
<div>[[Category:Display managers]]<br />
[[ar:Display manager]]<br />
[[cs:Display manager]]<br />
[[de:Login-Manager]]<br />
[[es:Display manager]]<br />
[[fa:Display manager]]<br />
[[fr:Gestionnaire de connexions]]<br />
[[he:Display manager]]<br />
[[it:Display manager]]<br />
[[ja:ディスプレイマネージャ]]<br />
[[pt:Display manager]]<br />
[[ru:Display manager]]<br />
[[tr:Görüntü yöneticisi]]<br />
[[uk:Display manager]]<br />
[[zh-cn:Display manager]]<br />
[[zh-tw:Display manager]]<br />
{{Related articles start}}<br />
{{Related|Desktop environment}}<br />
{{Related|Window manager}}<br />
{{Related|Start X at login}}<br />
{{Related articles end}}<br />
<br />
A [[Wikipedia:X display manager (program type)|display manager]], or login manager, is typically a graphical user interface that is displayed at the end of the boot process in place of the default shell. There are various implementations of display managers, just as there are various types of [[window managers]] and [[desktop environments]]. There is usually a certain amount of customization and themeability available with each one.<br />
<br />
== List of display managers ==<br />
<br />
=== Console ===<br />
<br />
* {{App|[[CDM]]|Ultra-minimalistic, yet full-featured login manager written in Bash.|https://github.com/ghost1227/cdm|{{AUR|cdm-git}}}}<br />
* {{App|[[Console TDM]]|Extension for ''xinit'' written in pure Bash.|http://code.google.com/p/t-display-manager/|{{AUR|console-tdm-git}}}}<br />
* {{App|[[nodm]]|Minimalistic display manager for automatic logins.|http://enricozini.org/sw/nodm/|{{Pkg|nodm}}}}<br />
<br />
=== Graphical ===<br />
<br />
* {{App|[[Enlightenment|Entrance]]|An EFL based display manager, highly experimental.|http://enlightenment.org/|{{AUR|entrance-git}}}}<br />
* {{App|[[GDM]]|[[GNOME]] display manager.|https://wiki.gnome.org/Projects/GDM|{{Pkg|gdm}}}}<br />
* {{App|[[KDM]]|[[KDE]] display manager.|http://www.kde.org/|{{Pkg|kdebase-workspace}}}}<br />
* {{App|[[LightDM]]|Cross-desktop display manager, can use various front-ends written in any toolkit.|http://www.freedesktop.org/wiki/Software/LightDM|{{Pkg|lightdm}}}}<br />
* {{App|[[LXDM]]|[[LXDE]] display manager. Can be used independent of the LXDE desktop environment.|http://sourceforge.net/projects/lxdm/|{{Pkg|lxdm}}}}<br />
* {{App|MDM|MDM display manager, used in Linux Mint, a fork of GDM 2.|https://github.com/linuxmint/mdm|{{AUR|mdm-display-manager}}}}<br />
* {{App|[[Qingy]]|Ultralight and very configurable graphical login independent on X Windows (uses DirectFB).|http://qingy.sourceforge.net/|{{AUR|qingy}}{{Broken package link|{{aur-mirror|qingy}}}}}}<br />
* {{App|[[SDDM]]|QML-based display manager and successor to KDE4's kdm; useful with Plasma.|https://github.com/sddm/sddm|{{Pkg|sddm}}}}<br />
* {{App|[[SLiM]]|Lightweight and elegant graphical login solution.|http://sourceforge.net/projects/slim.berlios/|{{Pkg|slim}}}}<br />
* {{App|[[XDM]]|X display manager with support for XDMCP, host chooser.|http://www.x.org/archive/X11R7.5/doc/man/man1/xdm.1.html|{{Pkg|xorg-xdm}}}}<br />
<br />
== Loading the display manager ==<br />
<br />
To enable graphical login, [[enable]] the appropriate systemd service. For example, for [[SDDM]], enable {{ic|sddm.service}}.<br />
<br />
This should work out of the box. If not, you might have to reset a custom {{ic|default.target}} symlink to point to the default {{ic|graphical.target}}.<br />
<br />
After enabling [[SDDM]] a symlink {{ic|display-manager.service}} should be set in {{ic|/etc/systemd/system/}}. You may need to use {{ic|--force}} to override old symlinks.<br />
<br />
{{hc|$ ls -l /etc/systemd/system/display-manager.service|<br />
[...] /etc/systemd/system/display-manager.service -> /usr/lib/systemd/system/sddm.service}}<br />
<br />
=== Using systemd-logind ===<br />
<br />
In order to check the status of your user session, you can use ''loginctl''. All [[polkit]] actions like suspending the system or mounting external drives will work out of the box.<br />
<br />
$ loginctl show-session $XDG_SESSION_ID<br />
<br />
== Tips and tricks ==<br />
<br />
===Run ~/.xinitrc as a session===<br />
Installing {{AUR|xinit-xsession}} will provide an option to run your .xinitrc as a session<br />
<br />
=== Session list ===<br />
<br />
<br />
Many display managers read available sessions from {{ic|/usr/share/xsessions/}} directory. It contains standard [http://standards.freedesktop.org/desktop-entry-spec/latest/ desktop entry files] for each DM/WM.<br />
<br />
To add/remove entries to your display manager's session list; create/remove the ''.desktop'' files in {{ic|/usr/share/xsessions/}} as desired. A typical ''.desktop'' file will look something like:<br />
<br />
[Desktop Entry]<br />
Encoding=UTF-8<br />
Name=Openbox<br />
Comment=Log in using the Openbox window manager (without a session manager)<br />
Exec=/usr/bin/openbox-session<br />
TryExec=/usr/bin/openbox-session<br />
Icon=openbox.png<br />
Type=XSession<br />
<br />
=== Starting applications without a window manager ===<br />
<br />
You can also launch an application without any decoration, desktop, or window management. For example to launch {{AUR|google-chrome}} create a {{ic|web-browser.desktop}} file in {{ic|/usr/share/xsessions/}} like this:<br />
<br />
[Desktop Entry]<br />
Encoding=UTF-8<br />
Name=Web Browser<br />
Comment=Use a web browser as your session<br />
Exec=/usr/bin/google-chrome --auto-launch-at-startup<br />
TryExec=/usr/bin/google-chrome --auto-launch-at-startup<br />
Icon=google-chrome<br />
<br />
In this case, once you login, the application set with {{ic|Exec}} will be launched immediately. When you close the application, you will be taken back to the login manager (same as logging out of a normal DE/WM).<br />
<br />
It is important to remember that most graphical applications are not intended to be launched this way and you might have manual tweaking to do or limitations to live with (there is no window manager, so do not expect to be able to move or resize ''any'' windows, including dialogs; nonetheless, you might be able to set the window geometry in the application's configuration files).<br />
<br />
See also [[xinitrc#Starting applications without a window manager]].<br />
<br />
=== Autostarting ===<br />
<br />
Most of display managers sources {{ic|/etc/xprofile}}, {{ic|~/.xprofile}} and {{ic|/etc/X11/xinit/xinitrc.d/}}. For more details, see [[xprofile]].<br />
<br />
=== Set the language ===<br />
<br />
{{Accuracy|This seems to change the locale of the user session but not of the DM itself. Probably better to link to [[Locale#Setting the locale]].}}<br />
<br />
For display managers that use [http://freedesktop.org/wiki/Software/AccountsService/ AccountsService] the display manager [[locale]] can be set by editing {{ic|/var/lib/AccountsService/users/$USER}}:<br />
<br />
[User]<br />
Language=''your_locale''<br />
<br />
where ''your_locale'' is a value such as {{ic|en_GB.UTF-8}}.<br />
<br />
Restart your display manager for the changes to take effect.<br />
<br />
== Known issues ==<br />
<br />
=== Incompatibility with systemd ===<br />
<br />
''Affected DMs: Entrance, MDM<br />
<br />
Some display managers are not fully compatible with systemd, because they reuse the PAM session process. It causes various problems on second login, e.g.:<br />
* NetworkManager applet does not work,<br />
* PulseAudio volume cannot be adjusted,<br />
* login failed into GNOME with another user.</div>Beta990https://wiki.archlinux.org/index.php?title=KDE&diff=412773KDE2015-12-19T10:37:16Z<p>Beta990: /* Plasma Desktop */ Added KDM is replaced to Note</p>
<hr />
<div>[[Category:KDE]]<br />
[[ar:KDE]]<br />
[[cs:KDE]]<br />
[[de:KDE]]<br />
[[es:KDE]]<br />
[[fr:KDE]]<br />
[[it:KDE]]<br />
[[ja:KDE]]<br />
[[pl:KDE]]<br />
[[ru:KDE]]<br />
[[tr:KDE Masaüstü Ortamı]]<br />
[[zh-CN:KDE]]<br />
[[zh-TW:KDE]]<br />
{{Related articles start}}<br />
{{Related|Desktop environment}}<br />
{{Related|Display manager}}<br />
{{Related|Dolphin}}<br />
{{Related|Window manager}}<br />
{{Related|Qt}}<br />
{{Related|KDM}}<br />
{{Related|KDevelop 4}}<br />
{{Related|Trinity}}<br />
{{Related|Uniform Look for Qt and GTK Applications}}<br />
{{Related articles end}}<br />
<br />
KDE is a software project currently comprising of a [[desktop environment]] known as Plasma (or Plasma Workspaces), a collection of libraries and frameworks (KDE Frameworks) and several applications (KDE Applications) as well. KDE upstream has a well maintained [http://userbase.kde.org/ UserBase wiki]. Detailed information about most KDE applications can be found there.<br />
<br />
== Installation ==<br />
<br />
=== Plasma Desktop ===<br />
<br />
{{Note|<br />
*Plasma 5 is not co-installable with Plasma 4.<br />
*The Plasma 4 desktop is unmaintained since August 2015.[https://www.kde.org/announcements/announce-applications-15.08.0.php] It is no longer in the official repositories since December 2015.[https://www.archlinux.org/news/dropping-plasma-4/]<br />
*KDM is no longer available for Plasma 5 and has been replaced with [[SDDM]].}}<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 [[KDE Packages]]. Alternatively, for a more minimal Plasma installation, install the {{Pkg|plasma-desktop}} package.<br />
<br />
=== KDE applications and language packs ===<br />
<br />
To install the full set of KDE Applications, install the {{Grp|kde-applications}} group or the {{Pkg|kde-applications-meta}} meta-packages to install specific modules. Note that this will only install applications, it will not install any version of the Plasma Desktop.<br />
<br />
If you need language files, install {{ic|kde-l10n-'''yourlanguagehere'''}} (e.g. {{Pkg|kde-l10n-de}} for the German language). For a full list of available languages see [https://www.archlinux.org/packages/extra/any/kde-l10n/ this link].<br />
<br />
== Starting Plasma ==<br />
<br />
{{Tip|<br />
*[[KDM]] is not available in Plasma 5. KDE upstream [http://blog.davidedmundson.co.uk/blog/display_managers_finale recommends] using the [[SDDM]] display manager as it provides integration with the Plasma 5 theme.<br />
*To better integrate SDDM with Plasma, it is recommended to edit {{ic|/etc/sddm.conf}} to use the breeze theme. Refer to [[SDDM#Theme settings]] for instructions.}}<br />
{{Note|The Plasma 4 configuration is not automatically migrated to Plasma 5, so you will have to configure your desktop from scratch.}}<br />
<br />
To launch a Plasma 5 session, choose ''Plasma'' in your [[display manager]] menu.<br />
<br />
Alternatively, to start Plasma with ''startx'', append {{ic|exec startkde}} to your {{ic|.xinitrc}} file. If you want to start Xorg at login, please see [[Start X at login]].<br />
<br />
== Configuration ==<br />
<br />
Most settings for KDE applications are stored in {{ic|~/.config}}, but some older applications may use {{ic|~/.kde4}}. However, configuring KDE is primarily done through the '''System Settings''' application. It can be started from a terminal by executing ''systemsettings5''.<br />
<br />
Frameworks 5 applications can use KDE 4 configuration however they expect the configuration files to be located in different places. To allow Frameworks 5 applications running in KDE 4 to share the same configurations they may be moved to the new locations and symlinked back to the old. Examples are:<br />
*Konsole profiles from {{ic|~/.kde4/share/apps/konsole}} to {{ic|~/.local/share/konsole/}}<br />
*Application appearance from {{ic|~/.kde4/share/config/kdeglobals}} to {{ic|~/.config/kdeglobals}} <br />
<br />
=== Personalization ===<br />
<br />
==== Plasma desktop ====<br />
<br />
===== Themes =====<br />
<br />
{{Note|1=If the Plasma cursor theme is incorrect in some instances, see the following [https://bbs.archlinux.org/viewtopic.php?pid=1533071#p1533071 forum post] for a workaround.}}<br />
[http://kde-look.org/index.php?xcontentmode=76 Plasma themes] define the look of panels and plasmoids. For easy system-wide installation, some such themes are available in both the official repositories and the [https://aur.archlinux.org/packages.php?O=0&K=plasmatheme&do_Search=Go AUR].<br />
<br />
The easiest way to install themes is by going through the Desktop Settings control panel:<br />
<br />
Workspace Theme > Desktop Theme > Get new Themes<br />
<br />
This will present a nice frontend for [http://www.kde-look.org/ kde-look.org] that allows you to install, uninstall, or update third-party plasmoid scripts with literally just one click.<br />
<br />
Splash and Lock screens are currently unavailable so to customize these screens you have to modify the original theme found in {{ic|/usr/share/plasma/look-and-feel/}}.<br />
See [https://www.kubuntuforums.net/showthread.php?67599-Plasma-5-background-images&s=59832dc20e5bfc2948dbb591d8453f61 this thread] on the Kubuntu forums.<br />
<br />
Note that the [[SDDM]] login screen is not part of this theme.<br />
<br />
====== Qt and GTK+ Applications Appearance ======<br />
<br />
{{Tip|For Qt and GTK theme consistency, see [[Uniform look for Qt and GTK applications]].}}<br />
<br />
;Qt4<br />
For Qt4 applications to have a consistent appearance, you need to install {{Pkg|breeze-kde4}} and then pick Breeze as GUI Style in {{ic|qtconfig-qt4}}.<br />
<br />
;GTK+<br />
The recommended theme for a pleasant appearance in GTK+ applications is {{Pkg|breeze-gtk}} or {{AUR|gnome-breeze-git}}, a GTK+ theme designed to mimic the appearance of Plasma 5 Breeze.<br />
Install {{Pkg|kde-gtk-config}} and select the installed GTK-theme for GTK2/GTK3-Theme in ''System Settings > Application Style > GNOME Application Style''.<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 />
Plasmoid binaries can be installed using PKGBUILDs from [https://aur.archlinux.org/packages.php?O=0&K=plasmoid&do_Search=Go&PP=25&SO=d&SB=v AUR], or you can write your own PKGBUILD.<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 Widgets''.<br />
<br />
This will present a nice frontend for [http://www.kde-look.org/ kde-look.org] that allows you to install, uninstall, or update third-party plasmoid scripts with literally just one click.<br />
<br />
Most plasmoids are not created officially by KDE developers. You can also try installing Mac OS X widgets, Microsoft Windows Vista/7 widgets, Google Widgets, and even SuperKaramba widgets.<br />
<br />
===== Sound applet in the system tray =====<br />
<br />
[[Install]] {{Pkg|plasma-pa}} or {{Pkg|kmix}} (start Kmix from the Application Launcher).<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|~/.kde4/share/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-desktop": ("Plasma" "Plasma")/!d; s/^ *\([^ ]*\) .*/\1/g'); do<br />
xprop -id $WID -remove _KDE_NET_WM_SHADOW<br />
done<br />
</nowiki>}}<br />
<br />
The script can be run on login with ''Add Script'' in ''Autostart'':<br />
<br />
$ kcmshell4 autostart<br />
<br />
==== Window decorations ====<br />
<br />
[http://kde-look.org/index.php?xcontentmode=75 Window decorations] can be changed in ''System Settings > Workspace Appearance > 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?O=0&K=kdestyle&do_Search=Go&PP=25&SO=d&SB=v AUR].<br />
<br />
==== Icon themes ====<br />
<br />
Icon-themes can be installed and changed on ''System Settings > Icons''.<br />
{{note|[[Gnome]] and KDE4 installed icon-themes may not be (fully) compatible with Plasma.<br />
It's recommended to install Plasma compatible icon-themes instead.}}<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''.<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 > Appearance > 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 '''96''' in ''System Settings > Application Appearance > Fonts''.<br />
<br />
If that does not work, try setting the DPI directly in your Xorg configuration as documented [[Xorg#Setting_DPI_manually|here]].<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]<br />
However, you can achieve something similar by editing the file {{ic|~/.config/kwinrc}} adding <br />
{{ic|1=BorderlessMaximizedWindows=true}} in the {{ic|[Windows]}} section.<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 > Printer Configuration''. To use this method, you must first install {{Pkg|print-manager}} and {{Pkg|cups}}.<br />
<br />
The {{ic|avahi-daemon.service}} and {{ic|org.cups.cupsd.service}} daemons must be started first; otherwise, you will get the following error:<br />
The service 'Printer Configuration' does not provide an interface 'KCModule'<br />
with keyword 'system-config- printer-kde/system-config-printer-kde.py'<br />
The factory does not support creating components of the specified type.<br />
<br />
If you are getting the following error, you need to give your user the right to manage printers.<br />
There was an error during CUPS operation: 'cups-authorization-canceled'<br />
<br />
For CUPS, this is set in {{ic|/etc/cups/cups-files.conf}}.<br />
<br />
Adding {{ic|lpadmin}} to {{ic|/etc/group}} and then to the {{ic|SystemGroup}} directive in {{ic|/etc/cups/cups-files.conf}} allows anyone in the {{ic|lpadmin}} group to configure printers. Do ''not'' add the {{ic|lp}} group to the {{ic|SystemGroup}} directive, or printing will fail.<br />
<br />
# groupadd -g107 lpadmin<br />
<br />
{{hc|/etc/cups/cups-files.conf|# Administrator user group...<br />
SystemGroup sys root lpadmin}}<br />
<br />
{{Tip|Read [[CUPS#Administration]] to get more details on how to configure CUPS.}}<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 usershares, which the stock smb.conf does not have enabled. Instructions to add them are in [[Samba#Creating usershare path]], after which sharing in Dolphin should work out of the box after restarting Samba.<br />
<br />
=== KDE Desktop activities ===<br />
<br />
KDE Desktop Activities are Plasma-based virtual-desktop-like sets of Plasma Widgets where you can independently configure widgets as if you have more than one screen or desktop.<br />
<br />
On your desktop, click the Cashew Plasmoid and, on the pop-up window, press "Activities".<br />
<br />
A plasma bar presenting you the current existing Plasma Desktop Activities will appear at the bottom of the screen. You can navigate between them by pressing the correspondent icons.<br />
<br />
=== Power saving ===<br />
<br />
Plasma has an integrated power saving service called "'''Powerdevil Power Management'''" that may adjust the power saving profile of the system and/or the brightness of the screen (if supported).<br />
<br />
=== Monitoring changes on local files and directories ===<br />
<br />
KDE now uses '''inotify''' directly from the kernel with '''kdirwatch''' (included in kdelibs), so Gamin or FAM are no longer needed. You may want to install this {{AUR|kdirwatch}}{{Broken package link|{{aur-mirror|kdirwatch}}}} from AUR which is a GUI frontend for kdirwatch.<br />
<br />
=== Autostarting applications ===<br />
<br />
{{Accuracy|See [[KDE Wallet#Using the KDE Wallet to store ssh keys]]. Merge general information here.}}<br />
<br />
Plasma can autostart applications and run scripts on startup and shutdown. To autostart an application, start {{ic|systemsettings}} and navigate to ''Startup and Shutdown'' -> ''Autostart'' and add the program or shell script of your choice. Note that programs can be autostarted on login only, whilst shell scripts can also be run on shutdown or even before Plasma itself starts. For applications, a {{ic|.desktop}} file will be created in the {{ic|~/.config/autostart}} directory. For shell scripts, a symlink will be created in one the following directories:<br />
* {{ic|~/.config/autostart-scripts}} - for starting at login.<br />
* {{ic|~/.config/plasma-workspace/shutdown}} - for starting on shutdown.<br />
* {{ic|~/.config/plasma-workspace/env}} - for starting prior to login.<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.<br />
<br />
'''Configuration for look and feel of GTK applications.'''<br />
* {{Pkg|kde-gtk-config}}<br />
* {{AUR|kcm-gtk}}{{Broken package link|{{aur-mirror|kcm-gtk}}}}<br />
* {{AUR|kcm-qt-graphicssystem}}<br />
<br />
'''Configuration for the GRUB bootloader.'''<br />
* {{AUR|grub2-editor}}{{Broken package link|{{aur-mirror|grub2-editor}}}}<br />
<br />
'''Configuration for the [[Uncomplicated Firewall]] (UFW)'''<br />
* {{AUR|kcm-ufw}}<br />
<br />
'''Configuration for [[PolicyKit]]'''<br />
* {{AUR|kcm-polkit-kde-git}}{{Broken package link|{{aur-mirror|kcm-polkit-kde-git}}}}<br />
<br />
'''Configuration for Wacom tablets'''<br />
* {{AUR|kcm-wacomtablet}}<br />
<br />
'''Configuration for systemd'''<br />
* {{Pkg|systemd-kcm}}<br />
<br />
More KCMs can be found at [http://kde-apps.org/index.php?xcontentmode=273 kde-apps.org].<br />
<br />
== Desktop search ==<br />
<br />
KDE implements desktop search with a software called Baloo, a file indexing and searching solution.<br />
<br />
=== Baloo ===<br />
<br />
==== Using and configuring Baloo ====<br />
<br />
In order to search using Baloo on the KDE Plasma Desktop, press {{ic|ALT+F2}} and type in your query. Within Dolphin press {{ic|CTRL+F}}.<br />
<br />
By default the Desktop Search KCM exposes only two options: A panel to blacklist folders and a way to disable it with one click.<br />
<br />
Alternatively you can edit your {{ic|~/.config/baloofilerc}} file ([https://community.kde.org/Baloo/Configuration info]). Additionally the {{ic|balooctl}} process can also be used. In order to disable Baloo run {{ic|balooctl disable}}.<br />
<br />
Once you added additional folders to the blacklist or disabled Baloo entirely, a process named {{ic|baloo_file_cleaner}} removes all unneeded index files automatically. They are stored under {{ic|~/.local/share/baloo/}}.<br />
<br />
More advanced configuration options are available through {{AUR|kcm_baloo_advanced}}.<br />
<br />
==== How do I index a removable device? ====<br />
<br />
By default every removable device is blacklisted. You just have to remove your device from the blacklist in the KCM panel.<br />
<br />
=== Web browsers ===<br />
==== Konqueror and Rekonq ====<br />
Konqueror supports two rendering engines – KHTML and QtWebKit (via the {{Pkg|kwebkitpart}} package) – Rekonq supports only QtWebKit. KHTML development was halted after Qt shipped WebKit but was kept for compatibility reasons. QtWebKit, in turn, has since been [https://www.mail-archive.com/development@qt-project.org/msg18866.html deprecated] by the Qt Project and replaced by [[Chromium]]-based Qt WebEngine which is currently not supported by either Konqueror or Rekonq.<br />
<br />
A successor named Fiber is currently in development, which will use Chromium's engine.<br />
<br />
==== Firefox ====<br />
Firefox can be configured to better integrate with Plasma. See [[Firefox#KDE_integration|Firefox KDE integration]] for details.<br />
<br />
==== Qupzilla ====<br />
Qupzilla ({{Pkg|qupzilla}}) is a Qt web browser with Plasma integration features. Qupzilla 2.0 will use Qt WebEngine intead of WebKit.<br />
<br />
== PIM ==<br />
<br />
KDE offers its own stack for personal information management. This includes emails, contacts, calendar, etc.<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.<br />
<br />
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 />
==== Disabling Akonadi ====<br />
<br />
See this [http://userbase.kde.org/Akonadi#Disabling_the_Akonadi_subsystem section in the KDE userbase].<br />
<br />
==== Database configuration ====<br />
<br />
Start {{ic|akonaditray}} from package {{Pkg|kdepim-runtime}}. Right click on it and select '''configure'''. In the Akonadi server configure tab, you can:<br />
* Configuring Akonadi to use MySQL/MariaDB Server<br />
** If your home directory is on a ZFS pool, you will need to create {{ic|~/.config/akonadi/mysql-local.conf}} with the following contents:<br />
<br />
[mysqld]<br />
innodb_use_native_aio = 0<br />
<br />
Otherwise you will get the [[MySQL#OS error 22 when running on ZFS|OS error 22]]<br />
* Configuring Akonadi to use PostgreSQL Server<br />
* Configuring Akonadi to use SQLite<br />
** Edit {{ic|~/.config/akonadi/akonadiserverrc}} to match the below<br />
<br />
[General]<br />
Driver=QSQLITE3<br />
<br />
[QSQLITE3]<br />
Name=/home/username/.local/akonadi/akonadi.db<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 />
You can choose between backends based on [[GStreamer]] and [[VLC]] – each available in versions for Qt4 applications and Qt5 applications ({{Pkg|phonon-qt4-gstreamer}}, {{Pkg|phonon-qt5-gstreamer}} – {{Pkg|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 [http://community.kde.org/Phonon/FeatureMatrix features set.]<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 at ''System Settings > Multimedia > Phonon > Backend''. For Plasma 5 this would be ''System Settings > Multimedia > Backend''.<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 />
<br />
== Useful applications ==<br />
<br />
The official set of KDE applications may be found [http://www.kde.org/applications/ here].<br />
<br />
=== Yakuake ===<br />
<br />
[[Yakuake]] provides a Quake-like terminal emulator whose visibility is toggled by the F12 key. It also has support for multiple tabs. Yakuake is available in the package {{Pkg|yakuake}}.<br />
<br />
=== KDE Telepathy ===<br />
<br />
[http://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 '+xx', e.g. '+49' for Germany). 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). Note that 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 />
== Tips and tricks ==<br />
<br />
=== Using an alternative window manager ===<br />
There may be reasons you want to use another window manager than KWin, for example to work around the DRI bug that causes [[PRIME#Black_screen_with_GL-based_compositors|black screen with PRIME]].<br />
<br />
To use an alternative [[window manager]] with Plasma open the ''System Settings'' panel, navigate to ''(Default) Applications > Window Manager > Use a different window manager'' and select the window manager you wish to use from the list.<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 {{ic|.xinitrc}} file:<br />
exec openbox-kde-session<br />
<br />
==== Compiz custom ====<br />
<br />
If you need to run Compiz with custom options and switches select ''Compiz custom'' and then create a script called {{ic|compiz-kde-launcher}} and add to it the commands you wish to use to start Compiz. See the example below:<br />
<br />
{{hc|/usr/local/bin/compiz-kde-launcher|<nowiki><br />
#!/bin/bash<br />
LIBGL_ALWAYS_INDIRECT=1<br />
compiz --replace &<br />
wait<br />
</nowiki>}}<br />
<br />
Then make it executable:<br />
$ chmod +x /usr/local/bin/compiz-kde-launcher<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 />
=== Integrate Android ===<br />
<br />
KDE Connect provides several features for you:<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 {{ic|KDE Connect}} from [https://play.google.com/store/apps/details?id=org.kde.kdeconnect_tp Google Play] or from [https://f-droid.org/repository/browse/?fdid=org.kde.kdeconnect_tp F-Droid].<br />
<br />
=== Configure KWin to use OpenGL ES ===<br />
Set environment variable {{ic|KWIN_COMPOSE}} to 'O2ES' to force the OpenGL ES backend. Please note that OpenGL ES is not supported by all drivers.<br />
<br />
=== Speed up application startup ===<br />
<br />
User Rob described a "[http://kdemonkey.blogspot.nl/2008/04/magic-trick.html magic trick]" on his blog to improve application start-up time by 50-150ms.<br />
To enable it, create this folder in your home:<br />
$ mkdir ~/.compose-cache/<br />
It can produce freezes under heavy io. To avoid this, also do:<br />
$ ln -sfv /run/user/$UID/ /home/$USER/.compose-cache<br />
<br />
{{Note|For those curious about what is going on here, this enables an optimization which Lubos (of general KDE speediness fame) came up with some time ago and was then rewritten and integrated into libx11. Ordinarily, on startup, applications read input method information from {{ic|/usr/share/X11/locale/''your locale''/Compose}}. This file is quite long (>5000 lines for the en_US.UTF-8 one) and takes some time to process. libX11 can create a cache of the parsed information which is much quicker to read subsequently, but it will only re-use an existing cache or create a new one in {{ic|~/.compose-cache}} if the directory already exists.}}<br />
<br />
=== Configuring monitor resolution / multiple monitors ===<br />
<br />
To enable display resolution management and multiple monitors in Plasma 5, install {{Pkg|kscreen}}. This adds the additional options to System Settings/Display and Monitor.<br />
<br />
=== Open application launcher with Super key (Windows key) ===<br />
<br />
Install and start {{Pkg|ksuperkey}}. Now assign Alt + F1 as hot key. The Super Key will now open the application launcher. You can add ksuperkey to the autostart if you don't want to start it manually.<br />
<br />
== Troubleshooting ==<br />
<br />
=== Graphics card related ===<br />
<br />
==== Intel ====<br />
<br />
If you use 3D-accelerated composition with Intel, you might find that the Plasma panel and other applications don't refresh properly (stay frozen). Some Intel drivers have [https://bugzilla.redhat.com/show_bug.cgi?id=1259475 problems with EGL]. Try to set Plasma 5's ''OpenGL interface'' setting to GLX instead (in System Settings under ''Display and Monitor'' -> ''Compositor''. If that does not work, see ''[[Intel_graphics#SNA_issues|Intel graphics SNA issues]]'' for alternative solutions.<br />
<br />
==== Plasma keeps crashing with legacy Nvidia ====<br />
<br />
There is a bug in Plasma with using the Nvidia-304xx driver described [https://bugs.kde.org/show_bug.cgi?id=348753 here.] Rather than disabling compositing, try creating a file kwin.sh in ~/.config/plasma-workspace/env/ with the following content<br />
<br />
#!/bin/sh<br />
export KWIN_EXPLICIT_SYNC=0<br />
Then go to the system-settings -> Startup and Shutdown -> Autostart and Check/Add the script as a pre-kde startup file<br />
<br />
=== Configuration related ===<br />
<br />
Many problems in KDE are related to configuration.<br />
<br />
==== Reset all kdelib4 apps configuration ====<br />
<br />
To test whether your config is the problem try quitting all kdelib4 apps and run:<br />
<br />
$ cp -r ~/.kde4 ~/.kde4.safekeeping<br />
$ rm .kde4/{cache,socket,tmp}-$(hostname)<br />
<br />
The ''rm'' command just removes symbolic links which will be recreated automatically.<br />
<br />
If the problem does not manifest itself, gradually move parts from the saved configuration back, and restart the application(s) regularly to test and identify problematic parts.<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 it 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 (bugs.kde.org) '''only if it is an official widget'''. If it is not, it is recommended you find the entry on kde-look.org 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}}:<br />
<br />
$ for j in plasma*; do mv -- "$j" "${j%}.bak"; done<br />
<br />
This command will '''rename all Plasma related configs''' 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 [[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 and several other problems such as ark being unable to unrar or unzip or amarok not recognizing any of your musics. This solution can also resolve problems with KDE and Qt programmes looking bad following upgrade.<br />
<br />
Rebuild your cache with the following commands:<br />
<br />
$ rm ~/.config/Trolltech.conf<br />
$ kbuildsycoca4 --noincremental<br />
<br />
Hopefully, your problems are now fixed.<br />
<br />
=== Clean akonadi configuration to fix KMail ===<br />
<br />
First, make sure that KMail is not running. Then backup configuration:<br />
$ mv ~/.local/share/akonadi ~/.local/share/akonadi-old<br />
$ mv ~/.config/akonadi ~/.config/akonadi-old<br />
<br />
Start ''SystemSettings > Personal'' and remove all the resources. Go back to Dolphin and remove the original {{ic|~/.local/share/akonadi}} and<br />
{{ic|~/.config/akonadi}} - the copies you made ensure that you can back-track if necessary.<br />
<br />
Now go back to the System Settings page and carefully add the necessary resources. You should see the resource reading in your mail folders. Then start Kontact/KMail to see if it work properly.<br />
<br />
=== Getting current state of KWin for support and debug purposes ===<br />
<br />
This command prints out a wonderful summary of the current state of KWin including used options, used compositing backend and relevant OpenGL driver capabilities. See more on [http://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 />
=== KDE and Qt programs look bad when in a different window manager ===<br />
<br />
If you are using KDE or Qt programs but not in a full Plasma session (specifically, you did not run {{ic|startkde}}), then as of Plasma 4.6.1 you will need to tell Qt how to find KDE's styles (Oxygen, QtCurve etc.)<br />
<br />
You just need to set the environment variable {{ic|QT_PLUGIN_PATH}}. E.g. put:<br />
<br />
export QT_PLUGIN_PATH=$HOME/.kde4/lib/kde4/plugins/:/usr/lib/kde4/plugins/<br />
<br />
into your {{ic|/etc/profile}} (or {{ic|~/.profile}} if you do not have root access). {{ic|qtconfig-qt4}} should then be able to find your KDE styles and everything should look nice again!<br />
<br />
Alternatively, you can symlink the Qt styles directory to the KDE styles one:<br />
# ln -s /usr/lib/kde4/plugins/styles/ /usr/lib/qt4/pluginlib32-libdbusmenu-glibs/styles<br />
<br />
Under Gnome you can try to install the package libgnomeui.<br />
<br />
=== KF5/Qt5 applications don't display icons in i3/fvwm/awesome ===<br />
<br />
See [[Qt#Configuration of Qt apps under environments other than KDE]].<br />
<br />
=== Graphical related problems ===<br />
<br />
==== Low 2D desktop performance (or) artifacts appear when on 2D ====<br />
<br />
===== GPU driver problem =====<br />
<br />
Make sure you have the proper driver for your card installed, so that your desktop is at least 2D accelerated. Follow these articles for more information: [[ATI]], [[NVIDIA]], [[Intel]] for more information, in order to make sure that everything is all right.<br />
The open-source ATI and Intel drivers and the proprietary (binary) Nvidia driver should theoretically provide the best 2D and 3D acceleration.<br />
<br />
===== The Raster engine workaround =====<br />
<br />
If this does not solve your problems, your driver may not provide a good '''XRender''' acceleration which the current Qt painter engine relies on by default.<br />
<br />
You can change the painter engine to software based only by invoking the application with the {{ic|-graphicssystem raster}} command line. This rendering engine can be set as the default one by recompiling Qt with the same as configure option, {{ic|-graphicssystem raster}}.<br />
<br />
The raster paint engine enables the CPU to do the majority of the painting, as opposed to the GPU. You may get better performance, depending on your system. This is basically a work-around for the terrible Linux driver stack, since the CPU should obviously not be doing graphical computations since it is designed for fewer threads of greater complexity, as opposed to the GPU which is many threads but lesser computational strength. So, only use Raster engine if you are having problems or your GPU is much slower than you CPU, otherwise is better to use XRender.<br />
<br />
Since Qt 4.7+, recompiling Qt is not needed. Simply export {{ic|1=QT_GRAPHICSSYSTEM=raster}}, or {{ic|opengl}}, or {{ic|native}} (for the default). Raster depends on the CPU, OpenGL depends on the GPU and high driver support, and Native is just using the X11 rendering (mixture, usually).<br />
<br />
'''The best and automatic way to do that''' is to install {{AUR|kcm-qt-graphicssystem}} from AUR and configure this particular Qt setting through ''System Settings > Qt Graphics System''.<br />
<br />
For more information, consult this [http://apachelog.wordpress.com/2010/09/05/qt-graphics-system-kcm/ KDE Developer blog entry] and/or this [http://labs.trolltech.com/blogs/2009/12/18/qt-graphics-and-performance-the-raster-engine/ Qt Developer blog entry].<br />
<br />
==== Low 3D desktop performance====<br />
<br />
KDE begins with desktop effects enabled. Older cards may be insufficient for 3D desktop acceleration. You can disable desktop effects in ''System Settings > Desktop Effects'' and you can toggle desktop effects with {{ic|Alt+Shift+F12}}.<br />
<br />
{{Note| You may encounter such problems with 3D desktop performance even when using a more powerful graphics card, especially the catalyst proprietary driver ({{ic|fglrx}}). This driver is known for having problems with 3D acceleration. Visit [[ATI|the ATI Wiki page]] for more troubleshooting.}}<br />
<br />
==== Desktop compositing is disabled on my system with a modern Nvidia GPU ====<br />
<br />
Sometimes, KWin may have settings in its configuration file ({{ic|kwinrc}}) that ''may'' cause a problem on re-activating the 3D desktop {{ic|OpenGL}} compositing. That could be caused randomly (for example, due to a sudden Xorg crash or restart, and it gets corrupted), so, in case that happens, delete your {{ic|~/.kde4/share/config/kwinrc}} file and relogin. The KWin settings will turn to the KDE default ones and the problem should be probably gone.<br />
<br />
==== Flickering in fullscreen when compositing is enabled ====<br />
<br />
As of KDE SC 4.6.0, there is an option in ''Sytem Settings > Desktop Effect > Advanced > Suspend desktop effects for fullscreen windows''. Uncheck it would tell kwin to disable unredirect fullscren.<br />
<br />
==== Display settings lost on reboot (multiple monitors) ====<br />
There is a [https://bugs.kde.org/show_bug.cgi?id=346961 bug] in kscreen that makes it forget dual screen settings after reboot with certain displays.<br />
A possible workaround is to delete kscreen and make sure that your screen resolution is specified in a xorg.conf file:<br />
* For Nouveau you can use the template at [[Nouveau#Dual Head]], just edit it to suit your setup.<br />
* For the proprietary nvidia driver you can use the [[NVIDIA#Using_NVIDIA_Settings|nvidia-settings]] utility as root to write the config file.<br />
<br />
=== Sound problems under KDE ===<br />
<br />
==== ALSA related problems ====<br />
<br />
{{Note|First make sure you have {{Pkg|alsa-lib}} and {{Pkg|alsa-utils}} installed.}}<br />
<br />
===== "Falling back to default" messages when trying to listen to any sound in KDE =====<br />
<br />
When you encounter such messages:<br />
The audio playback device ''name_of_the_sound_device'' does not work.<br />
Falling back to default<br />
Go to ''System Settings > Multimedia > Phonon'' and set the device named {{ic|default}} above all the other devices in each box you see.<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 {{Pkg|phonon-qt4-vlc}} or {{Pkg|phonon-qt5-vlc}}.<br />
Then, make sure the backend is preferred via ''System Settings > Multimedia > Phonon > Backend (tab)''.<br />
<br />
=== Konsole does not save commands' history ===<br />
<br />
By default console command history is saved only when you type 'exit' in console. When you close Konsole with 'x' in the corner it does not happen.<br />
To enable autosaving after every command execution:<br />
<br />
{{hc|~/.bashrc|<nowiki><br />
shopt -s histappend<br />
[[ "${PROMPT_COMMAND}" ]] && PROMPT_COMMAND="$PROMPT_COMMAND;history -a" || PROMPT_COMMAND="history -a"<br />
</nowiki>}}<br />
<br />
=== Inotify folder watch limit ===<br />
<br />
If you get the following error:<br />
<br />
KDE Baloo Filewatch service reached the inotify folder watch limit. File changes may be ignored.<br />
<br />
Then you will need to increase the inotify folder watch limit:<br />
<br />
# echo 10000 > /proc/sys/fs/inotify/max_user_watches<br />
<br />
To make changes permanent, create {{ic|/etc/sysctl.d/90-inotify.conf}} with<br />
<br />
#increase inotify watch limit<br />
fs.inotify.max_user_watches = 10000<br />
<br />
== Unstable releases ==<br />
<br />
When KDE is reaching beta or RC milestone, KDE "unstable" packages are uploaded to the ''kde-unstable'' repository. They stay there until KDE is declared stable and passes to the ''extra'' repository.<br />
<br />
You can add ''kde-unstable'' with:<br />
<br />
{{hc|/etc/pacman.conf|2=<br />
[kde-unstable]<br />
Include = /etc/pacman.d/mirrorlist<br />
}}<br />
<br />
{{Warning|Make sure to add these lines '''before''' the ''extra'' repository. Adding the section after ''extra'' will cause [[pacman]] to prefer the older packages in the extra repository. {{ic|pacman -Syu}} will not install them, and will warn that they are "too new" if installed manually. Also, some of the libraries will stay at the older versions, which may cause file conflicts and/or instability!}}<br />
<br />
# ''kde-unstable'' is based upon ''testing''. Therefore, you need to enable the repositories in the following order: ''kde-unstable'', ''testing'', ''core'', ''extra'', ''community-testing'', ''community''.<br />
# To update from a previous KDE installation, run: {{ic|# pacman -Syu}} or {{ic|# pacman -S kde-unstable/kde}}<br />
# If you do not have KDE installed, you might have difficulties to install it by using groups (limitation of pacman)<br />
# '''Subscribe and read the [https://mailman.archlinux.org/pipermail/arch-dev-public/ arch-dev-public] mailing list'''<br />
# Make sure [[#Bugs|you make bug reports]] if you find any problems.<br />
<br />
== Bugs ==<br />
<br />
It is preferable that if you find a minor or serious bug, you should visit [https://bugs.archlinux.org the Arch Bug Tracker] or/and [http://bugs.kde.org KDE Bug Tracker] in order to report that. Make sure that you are clear about what you want to report.<br />
<br />
If you have any problem and you write about in on the Arch forums, first make sure that you have '''fully''' updated your system using a good sync mirror (check [https://www.archlinux.de/?page=MirrorStatus here]) or try [[Reflector]].<br />
<br />
== See also ==<br />
<br />
* [http://www.kde.org KDE homepage]<br />
* [https://bugs.kde.org KDE bug tracker]<br />
* [https://projects.kde.org KDE Projects]<br />
* [http://blog.martin-graesslin.com/blog/kategorien/kde/ Martin Graesslin's blog]</div>Beta990https://wiki.archlinux.org/index.php?title=KDE&diff=412772KDE2015-12-19T10:35:22Z<p>Beta990: /* Upgrading from Plasma 4 to 5 */ This section is not needed, since pacman auto solves conflicts. Also the instructions are incorrect, SDDM can be (force) enabled with the --force flag, see Tips</p>
<hr />
<div>[[Category:KDE]]<br />
[[ar:KDE]]<br />
[[cs:KDE]]<br />
[[de:KDE]]<br />
[[es:KDE]]<br />
[[fr:KDE]]<br />
[[it:KDE]]<br />
[[ja:KDE]]<br />
[[pl:KDE]]<br />
[[ru:KDE]]<br />
[[tr:KDE Masaüstü Ortamı]]<br />
[[zh-CN:KDE]]<br />
[[zh-TW:KDE]]<br />
{{Related articles start}}<br />
{{Related|Desktop environment}}<br />
{{Related|Display manager}}<br />
{{Related|Dolphin}}<br />
{{Related|Window manager}}<br />
{{Related|Qt}}<br />
{{Related|KDM}}<br />
{{Related|KDevelop 4}}<br />
{{Related|Trinity}}<br />
{{Related|Uniform Look for Qt and GTK Applications}}<br />
{{Related articles end}}<br />
<br />
KDE is a software project currently comprising of a [[desktop environment]] known as Plasma (or Plasma Workspaces), a collection of libraries and frameworks (KDE Frameworks) and several applications (KDE Applications) as well. KDE upstream has a well maintained [http://userbase.kde.org/ UserBase wiki]. Detailed information about most KDE applications can be found there.<br />
<br />
== Installation ==<br />
<br />
=== Plasma Desktop ===<br />
<br />
{{Note|<br />
*Plasma 5 is not co-installable with Plasma 4.<br />
*The Plasma 4 desktop is unmaintained since August 2015.[https://www.kde.org/announcements/announce-applications-15.08.0.php] It is no longer in the official repositories since December 2015.[https://www.archlinux.org/news/dropping-plasma-4/]}}<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 [[KDE Packages]]. Alternatively, for a more minimal Plasma installation, install the {{Pkg|plasma-desktop}} package.<br />
<br />
=== KDE applications and language packs ===<br />
<br />
To install the full set of KDE Applications, install the {{Grp|kde-applications}} group or the {{Pkg|kde-applications-meta}} meta-packages to install specific modules. Note that this will only install applications, it will not install any version of the Plasma Desktop.<br />
<br />
If you need language files, install {{ic|kde-l10n-'''yourlanguagehere'''}} (e.g. {{Pkg|kde-l10n-de}} for the German language). For a full list of available languages see [https://www.archlinux.org/packages/extra/any/kde-l10n/ this link].<br />
<br />
== Starting Plasma ==<br />
<br />
{{Tip|<br />
*[[KDM]] is not available in Plasma 5. KDE upstream [http://blog.davidedmundson.co.uk/blog/display_managers_finale recommends] using the [[SDDM]] display manager as it provides integration with the Plasma 5 theme.<br />
*To better integrate SDDM with Plasma, it is recommended to edit {{ic|/etc/sddm.conf}} to use the breeze theme. Refer to [[SDDM#Theme settings]] for instructions.}}<br />
{{Note|The Plasma 4 configuration is not automatically migrated to Plasma 5, so you will have to configure your desktop from scratch.}}<br />
<br />
To launch a Plasma 5 session, choose ''Plasma'' in your [[display manager]] menu.<br />
<br />
Alternatively, to start Plasma with ''startx'', append {{ic|exec startkde}} to your {{ic|.xinitrc}} file. If you want to start Xorg at login, please see [[Start X at login]].<br />
<br />
== Configuration ==<br />
<br />
Most settings for KDE applications are stored in {{ic|~/.config}}, but some older applications may use {{ic|~/.kde4}}. However, configuring KDE is primarily done through the '''System Settings''' application. It can be started from a terminal by executing ''systemsettings5''.<br />
<br />
Frameworks 5 applications can use KDE 4 configuration however they expect the configuration files to be located in different places. To allow Frameworks 5 applications running in KDE 4 to share the same configurations they may be moved to the new locations and symlinked back to the old. Examples are:<br />
*Konsole profiles from {{ic|~/.kde4/share/apps/konsole}} to {{ic|~/.local/share/konsole/}}<br />
*Application appearance from {{ic|~/.kde4/share/config/kdeglobals}} to {{ic|~/.config/kdeglobals}} <br />
<br />
=== Personalization ===<br />
<br />
==== Plasma desktop ====<br />
<br />
===== Themes =====<br />
<br />
{{Note|1=If the Plasma cursor theme is incorrect in some instances, see the following [https://bbs.archlinux.org/viewtopic.php?pid=1533071#p1533071 forum post] for a workaround.}}<br />
[http://kde-look.org/index.php?xcontentmode=76 Plasma themes] define the look of panels and plasmoids. For easy system-wide installation, some such themes are available in both the official repositories and the [https://aur.archlinux.org/packages.php?O=0&K=plasmatheme&do_Search=Go AUR].<br />
<br />
The easiest way to install themes is by going through the Desktop Settings control panel:<br />
<br />
Workspace Theme > Desktop Theme > Get new Themes<br />
<br />
This will present a nice frontend for [http://www.kde-look.org/ kde-look.org] that allows you to install, uninstall, or update third-party plasmoid scripts with literally just one click.<br />
<br />
Splash and Lock screens are currently unavailable so to customize these screens you have to modify the original theme found in {{ic|/usr/share/plasma/look-and-feel/}}.<br />
See [https://www.kubuntuforums.net/showthread.php?67599-Plasma-5-background-images&s=59832dc20e5bfc2948dbb591d8453f61 this thread] on the Kubuntu forums.<br />
<br />
Note that the [[SDDM]] login screen is not part of this theme.<br />
<br />
====== Qt and GTK+ Applications Appearance ======<br />
<br />
{{Tip|For Qt and GTK theme consistency, see [[Uniform look for Qt and GTK applications]].}}<br />
<br />
;Qt4<br />
For Qt4 applications to have a consistent appearance, you need to install {{Pkg|breeze-kde4}} and then pick Breeze as GUI Style in {{ic|qtconfig-qt4}}.<br />
<br />
;GTK+<br />
The recommended theme for a pleasant appearance in GTK+ applications is {{Pkg|breeze-gtk}} or {{AUR|gnome-breeze-git}}, a GTK+ theme designed to mimic the appearance of Plasma 5 Breeze.<br />
Install {{Pkg|kde-gtk-config}} and select the installed GTK-theme for GTK2/GTK3-Theme in ''System Settings > Application Style > GNOME Application Style''.<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 />
Plasmoid binaries can be installed using PKGBUILDs from [https://aur.archlinux.org/packages.php?O=0&K=plasmoid&do_Search=Go&PP=25&SO=d&SB=v AUR], or you can write your own PKGBUILD.<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 Widgets''.<br />
<br />
This will present a nice frontend for [http://www.kde-look.org/ kde-look.org] that allows you to install, uninstall, or update third-party plasmoid scripts with literally just one click.<br />
<br />
Most plasmoids are not created officially by KDE developers. You can also try installing Mac OS X widgets, Microsoft Windows Vista/7 widgets, Google Widgets, and even SuperKaramba widgets.<br />
<br />
===== Sound applet in the system tray =====<br />
<br />
[[Install]] {{Pkg|plasma-pa}} or {{Pkg|kmix}} (start Kmix from the Application Launcher).<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|~/.kde4/share/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-desktop": ("Plasma" "Plasma")/!d; s/^ *\([^ ]*\) .*/\1/g'); do<br />
xprop -id $WID -remove _KDE_NET_WM_SHADOW<br />
done<br />
</nowiki>}}<br />
<br />
The script can be run on login with ''Add Script'' in ''Autostart'':<br />
<br />
$ kcmshell4 autostart<br />
<br />
==== Window decorations ====<br />
<br />
[http://kde-look.org/index.php?xcontentmode=75 Window decorations] can be changed in ''System Settings > Workspace Appearance > 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?O=0&K=kdestyle&do_Search=Go&PP=25&SO=d&SB=v AUR].<br />
<br />
==== Icon themes ====<br />
<br />
Icon-themes can be installed and changed on ''System Settings > Icons''.<br />
{{note|[[Gnome]] and KDE4 installed icon-themes may not be (fully) compatible with Plasma.<br />
It's recommended to install Plasma compatible icon-themes instead.}}<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''.<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 > Appearance > 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 '''96''' in ''System Settings > Application Appearance > Fonts''.<br />
<br />
If that does not work, try setting the DPI directly in your Xorg configuration as documented [[Xorg#Setting_DPI_manually|here]].<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]<br />
However, you can achieve something similar by editing the file {{ic|~/.config/kwinrc}} adding <br />
{{ic|1=BorderlessMaximizedWindows=true}} in the {{ic|[Windows]}} section.<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 > Printer Configuration''. To use this method, you must first install {{Pkg|print-manager}} and {{Pkg|cups}}.<br />
<br />
The {{ic|avahi-daemon.service}} and {{ic|org.cups.cupsd.service}} daemons must be started first; otherwise, you will get the following error:<br />
The service 'Printer Configuration' does not provide an interface 'KCModule'<br />
with keyword 'system-config- printer-kde/system-config-printer-kde.py'<br />
The factory does not support creating components of the specified type.<br />
<br />
If you are getting the following error, you need to give your user the right to manage printers.<br />
There was an error during CUPS operation: 'cups-authorization-canceled'<br />
<br />
For CUPS, this is set in {{ic|/etc/cups/cups-files.conf}}.<br />
<br />
Adding {{ic|lpadmin}} to {{ic|/etc/group}} and then to the {{ic|SystemGroup}} directive in {{ic|/etc/cups/cups-files.conf}} allows anyone in the {{ic|lpadmin}} group to configure printers. Do ''not'' add the {{ic|lp}} group to the {{ic|SystemGroup}} directive, or printing will fail.<br />
<br />
# groupadd -g107 lpadmin<br />
<br />
{{hc|/etc/cups/cups-files.conf|# Administrator user group...<br />
SystemGroup sys root lpadmin}}<br />
<br />
{{Tip|Read [[CUPS#Administration]] to get more details on how to configure CUPS.}}<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 usershares, which the stock smb.conf does not have enabled. Instructions to add them are in [[Samba#Creating usershare path]], after which sharing in Dolphin should work out of the box after restarting Samba.<br />
<br />
=== KDE Desktop activities ===<br />
<br />
KDE Desktop Activities are Plasma-based virtual-desktop-like sets of Plasma Widgets where you can independently configure widgets as if you have more than one screen or desktop.<br />
<br />
On your desktop, click the Cashew Plasmoid and, on the pop-up window, press "Activities".<br />
<br />
A plasma bar presenting you the current existing Plasma Desktop Activities will appear at the bottom of the screen. You can navigate between them by pressing the correspondent icons.<br />
<br />
=== Power saving ===<br />
<br />
Plasma has an integrated power saving service called "'''Powerdevil Power Management'''" that may adjust the power saving profile of the system and/or the brightness of the screen (if supported).<br />
<br />
=== Monitoring changes on local files and directories ===<br />
<br />
KDE now uses '''inotify''' directly from the kernel with '''kdirwatch''' (included in kdelibs), so Gamin or FAM are no longer needed. You may want to install this {{AUR|kdirwatch}}{{Broken package link|{{aur-mirror|kdirwatch}}}} from AUR which is a GUI frontend for kdirwatch.<br />
<br />
=== Autostarting applications ===<br />
<br />
{{Accuracy|See [[KDE Wallet#Using the KDE Wallet to store ssh keys]]. Merge general information here.}}<br />
<br />
Plasma can autostart applications and run scripts on startup and shutdown. To autostart an application, start {{ic|systemsettings}} and navigate to ''Startup and Shutdown'' -> ''Autostart'' and add the program or shell script of your choice. Note that programs can be autostarted on login only, whilst shell scripts can also be run on shutdown or even before Plasma itself starts. For applications, a {{ic|.desktop}} file will be created in the {{ic|~/.config/autostart}} directory. For shell scripts, a symlink will be created in one the following directories:<br />
* {{ic|~/.config/autostart-scripts}} - for starting at login.<br />
* {{ic|~/.config/plasma-workspace/shutdown}} - for starting on shutdown.<br />
* {{ic|~/.config/plasma-workspace/env}} - for starting prior to login.<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.<br />
<br />
'''Configuration for look and feel of GTK applications.'''<br />
* {{Pkg|kde-gtk-config}}<br />
* {{AUR|kcm-gtk}}{{Broken package link|{{aur-mirror|kcm-gtk}}}}<br />
* {{AUR|kcm-qt-graphicssystem}}<br />
<br />
'''Configuration for the GRUB bootloader.'''<br />
* {{AUR|grub2-editor}}{{Broken package link|{{aur-mirror|grub2-editor}}}}<br />
<br />
'''Configuration for the [[Uncomplicated Firewall]] (UFW)'''<br />
* {{AUR|kcm-ufw}}<br />
<br />
'''Configuration for [[PolicyKit]]'''<br />
* {{AUR|kcm-polkit-kde-git}}{{Broken package link|{{aur-mirror|kcm-polkit-kde-git}}}}<br />
<br />
'''Configuration for Wacom tablets'''<br />
* {{AUR|kcm-wacomtablet}}<br />
<br />
'''Configuration for systemd'''<br />
* {{Pkg|systemd-kcm}}<br />
<br />
More KCMs can be found at [http://kde-apps.org/index.php?xcontentmode=273 kde-apps.org].<br />
<br />
== Desktop search ==<br />
<br />
KDE implements desktop search with a software called Baloo, a file indexing and searching solution.<br />
<br />
=== Baloo ===<br />
<br />
==== Using and configuring Baloo ====<br />
<br />
In order to search using Baloo on the KDE Plasma Desktop, press {{ic|ALT+F2}} and type in your query. Within Dolphin press {{ic|CTRL+F}}.<br />
<br />
By default the Desktop Search KCM exposes only two options: A panel to blacklist folders and a way to disable it with one click.<br />
<br />
Alternatively you can edit your {{ic|~/.config/baloofilerc}} file ([https://community.kde.org/Baloo/Configuration info]). Additionally the {{ic|balooctl}} process can also be used. In order to disable Baloo run {{ic|balooctl disable}}.<br />
<br />
Once you added additional folders to the blacklist or disabled Baloo entirely, a process named {{ic|baloo_file_cleaner}} removes all unneeded index files automatically. They are stored under {{ic|~/.local/share/baloo/}}.<br />
<br />
More advanced configuration options are available through {{AUR|kcm_baloo_advanced}}.<br />
<br />
==== How do I index a removable device? ====<br />
<br />
By default every removable device is blacklisted. You just have to remove your device from the blacklist in the KCM panel.<br />
<br />
=== Web browsers ===<br />
==== Konqueror and Rekonq ====<br />
Konqueror supports two rendering engines – KHTML and QtWebKit (via the {{Pkg|kwebkitpart}} package) – Rekonq supports only QtWebKit. KHTML development was halted after Qt shipped WebKit but was kept for compatibility reasons. QtWebKit, in turn, has since been [https://www.mail-archive.com/development@qt-project.org/msg18866.html deprecated] by the Qt Project and replaced by [[Chromium]]-based Qt WebEngine which is currently not supported by either Konqueror or Rekonq.<br />
<br />
A successor named Fiber is currently in development, which will use Chromium's engine.<br />
<br />
==== Firefox ====<br />
Firefox can be configured to better integrate with Plasma. See [[Firefox#KDE_integration|Firefox KDE integration]] for details.<br />
<br />
==== Qupzilla ====<br />
Qupzilla ({{Pkg|qupzilla}}) is a Qt web browser with Plasma integration features. Qupzilla 2.0 will use Qt WebEngine intead of WebKit.<br />
<br />
== PIM ==<br />
<br />
KDE offers its own stack for personal information management. This includes emails, contacts, calendar, etc.<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.<br />
<br />
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 />
==== Disabling Akonadi ====<br />
<br />
See this [http://userbase.kde.org/Akonadi#Disabling_the_Akonadi_subsystem section in the KDE userbase].<br />
<br />
==== Database configuration ====<br />
<br />
Start {{ic|akonaditray}} from package {{Pkg|kdepim-runtime}}. Right click on it and select '''configure'''. In the Akonadi server configure tab, you can:<br />
* Configuring Akonadi to use MySQL/MariaDB Server<br />
** If your home directory is on a ZFS pool, you will need to create {{ic|~/.config/akonadi/mysql-local.conf}} with the following contents:<br />
<br />
[mysqld]<br />
innodb_use_native_aio = 0<br />
<br />
Otherwise you will get the [[MySQL#OS error 22 when running on ZFS|OS error 22]]<br />
* Configuring Akonadi to use PostgreSQL Server<br />
* Configuring Akonadi to use SQLite<br />
** Edit {{ic|~/.config/akonadi/akonadiserverrc}} to match the below<br />
<br />
[General]<br />
Driver=QSQLITE3<br />
<br />
[QSQLITE3]<br />
Name=/home/username/.local/akonadi/akonadi.db<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 />
You can choose between backends based on [[GStreamer]] and [[VLC]] – each available in versions for Qt4 applications and Qt5 applications ({{Pkg|phonon-qt4-gstreamer}}, {{Pkg|phonon-qt5-gstreamer}} – {{Pkg|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 [http://community.kde.org/Phonon/FeatureMatrix features set.]<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 at ''System Settings > Multimedia > Phonon > Backend''. For Plasma 5 this would be ''System Settings > Multimedia > Backend''.<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 />
<br />
== Useful applications ==<br />
<br />
The official set of KDE applications may be found [http://www.kde.org/applications/ here].<br />
<br />
=== Yakuake ===<br />
<br />
[[Yakuake]] provides a Quake-like terminal emulator whose visibility is toggled by the F12 key. It also has support for multiple tabs. Yakuake is available in the package {{Pkg|yakuake}}.<br />
<br />
=== KDE Telepathy ===<br />
<br />
[http://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 '+xx', e.g. '+49' for Germany). 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). Note that 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 />
== Tips and tricks ==<br />
<br />
=== Using an alternative window manager ===<br />
There may be reasons you want to use another window manager than KWin, for example to work around the DRI bug that causes [[PRIME#Black_screen_with_GL-based_compositors|black screen with PRIME]].<br />
<br />
To use an alternative [[window manager]] with Plasma open the ''System Settings'' panel, navigate to ''(Default) Applications > Window Manager > Use a different window manager'' and select the window manager you wish to use from the list.<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 {{ic|.xinitrc}} file:<br />
exec openbox-kde-session<br />
<br />
==== Compiz custom ====<br />
<br />
If you need to run Compiz with custom options and switches select ''Compiz custom'' and then create a script called {{ic|compiz-kde-launcher}} and add to it the commands you wish to use to start Compiz. See the example below:<br />
<br />
{{hc|/usr/local/bin/compiz-kde-launcher|<nowiki><br />
#!/bin/bash<br />
LIBGL_ALWAYS_INDIRECT=1<br />
compiz --replace &<br />
wait<br />
</nowiki>}}<br />
<br />
Then make it executable:<br />
$ chmod +x /usr/local/bin/compiz-kde-launcher<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 />
=== Integrate Android ===<br />
<br />
KDE Connect provides several features for you:<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 {{ic|KDE Connect}} from [https://play.google.com/store/apps/details?id=org.kde.kdeconnect_tp Google Play] or from [https://f-droid.org/repository/browse/?fdid=org.kde.kdeconnect_tp F-Droid].<br />
<br />
=== Configure KWin to use OpenGL ES ===<br />
Set environment variable {{ic|KWIN_COMPOSE}} to 'O2ES' to force the OpenGL ES backend. Please note that OpenGL ES is not supported by all drivers.<br />
<br />
=== Speed up application startup ===<br />
<br />
User Rob described a "[http://kdemonkey.blogspot.nl/2008/04/magic-trick.html magic trick]" on his blog to improve application start-up time by 50-150ms.<br />
To enable it, create this folder in your home:<br />
$ mkdir ~/.compose-cache/<br />
It can produce freezes under heavy io. To avoid this, also do:<br />
$ ln -sfv /run/user/$UID/ /home/$USER/.compose-cache<br />
<br />
{{Note|For those curious about what is going on here, this enables an optimization which Lubos (of general KDE speediness fame) came up with some time ago and was then rewritten and integrated into libx11. Ordinarily, on startup, applications read input method information from {{ic|/usr/share/X11/locale/''your locale''/Compose}}. This file is quite long (>5000 lines for the en_US.UTF-8 one) and takes some time to process. libX11 can create a cache of the parsed information which is much quicker to read subsequently, but it will only re-use an existing cache or create a new one in {{ic|~/.compose-cache}} if the directory already exists.}}<br />
<br />
=== Configuring monitor resolution / multiple monitors ===<br />
<br />
To enable display resolution management and multiple monitors in Plasma 5, install {{Pkg|kscreen}}. This adds the additional options to System Settings/Display and Monitor.<br />
<br />
=== Open application launcher with Super key (Windows key) ===<br />
<br />
Install and start {{Pkg|ksuperkey}}. Now assign Alt + F1 as hot key. The Super Key will now open the application launcher. You can add ksuperkey to the autostart if you don't want to start it manually.<br />
<br />
== Troubleshooting ==<br />
<br />
=== Graphics card related ===<br />
<br />
==== Intel ====<br />
<br />
If you use 3D-accelerated composition with Intel, you might find that the Plasma panel and other applications don't refresh properly (stay frozen). Some Intel drivers have [https://bugzilla.redhat.com/show_bug.cgi?id=1259475 problems with EGL]. Try to set Plasma 5's ''OpenGL interface'' setting to GLX instead (in System Settings under ''Display and Monitor'' -> ''Compositor''. If that does not work, see ''[[Intel_graphics#SNA_issues|Intel graphics SNA issues]]'' for alternative solutions.<br />
<br />
==== Plasma keeps crashing with legacy Nvidia ====<br />
<br />
There is a bug in Plasma with using the Nvidia-304xx driver described [https://bugs.kde.org/show_bug.cgi?id=348753 here.] Rather than disabling compositing, try creating a file kwin.sh in ~/.config/plasma-workspace/env/ with the following content<br />
<br />
#!/bin/sh<br />
export KWIN_EXPLICIT_SYNC=0<br />
Then go to the system-settings -> Startup and Shutdown -> Autostart and Check/Add the script as a pre-kde startup file<br />
<br />
=== Configuration related ===<br />
<br />
Many problems in KDE are related to configuration.<br />
<br />
==== Reset all kdelib4 apps configuration ====<br />
<br />
To test whether your config is the problem try quitting all kdelib4 apps and run:<br />
<br />
$ cp -r ~/.kde4 ~/.kde4.safekeeping<br />
$ rm .kde4/{cache,socket,tmp}-$(hostname)<br />
<br />
The ''rm'' command just removes symbolic links which will be recreated automatically.<br />
<br />
If the problem does not manifest itself, gradually move parts from the saved configuration back, and restart the application(s) regularly to test and identify problematic parts.<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 it 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 (bugs.kde.org) '''only if it is an official widget'''. If it is not, it is recommended you find the entry on kde-look.org 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}}:<br />
<br />
$ for j in plasma*; do mv -- "$j" "${j%}.bak"; done<br />
<br />
This command will '''rename all Plasma related configs''' 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 [[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 and several other problems such as ark being unable to unrar or unzip or amarok not recognizing any of your musics. This solution can also resolve problems with KDE and Qt programmes looking bad following upgrade.<br />
<br />
Rebuild your cache with the following commands:<br />
<br />
$ rm ~/.config/Trolltech.conf<br />
$ kbuildsycoca4 --noincremental<br />
<br />
Hopefully, your problems are now fixed.<br />
<br />
=== Clean akonadi configuration to fix KMail ===<br />
<br />
First, make sure that KMail is not running. Then backup configuration:<br />
$ mv ~/.local/share/akonadi ~/.local/share/akonadi-old<br />
$ mv ~/.config/akonadi ~/.config/akonadi-old<br />
<br />
Start ''SystemSettings > Personal'' and remove all the resources. Go back to Dolphin and remove the original {{ic|~/.local/share/akonadi}} and<br />
{{ic|~/.config/akonadi}} - the copies you made ensure that you can back-track if necessary.<br />
<br />
Now go back to the System Settings page and carefully add the necessary resources. You should see the resource reading in your mail folders. Then start Kontact/KMail to see if it work properly.<br />
<br />
=== Getting current state of KWin for support and debug purposes ===<br />
<br />
This command prints out a wonderful summary of the current state of KWin including used options, used compositing backend and relevant OpenGL driver capabilities. See more on [http://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 />
=== KDE and Qt programs look bad when in a different window manager ===<br />
<br />
If you are using KDE or Qt programs but not in a full Plasma session (specifically, you did not run {{ic|startkde}}), then as of Plasma 4.6.1 you will need to tell Qt how to find KDE's styles (Oxygen, QtCurve etc.)<br />
<br />
You just need to set the environment variable {{ic|QT_PLUGIN_PATH}}. E.g. put:<br />
<br />
export QT_PLUGIN_PATH=$HOME/.kde4/lib/kde4/plugins/:/usr/lib/kde4/plugins/<br />
<br />
into your {{ic|/etc/profile}} (or {{ic|~/.profile}} if you do not have root access). {{ic|qtconfig-qt4}} should then be able to find your KDE styles and everything should look nice again!<br />
<br />
Alternatively, you can symlink the Qt styles directory to the KDE styles one:<br />
# ln -s /usr/lib/kde4/plugins/styles/ /usr/lib/qt4/pluginlib32-libdbusmenu-glibs/styles<br />
<br />
Under Gnome you can try to install the package libgnomeui.<br />
<br />
=== KF5/Qt5 applications don't display icons in i3/fvwm/awesome ===<br />
<br />
See [[Qt#Configuration of Qt apps under environments other than KDE]].<br />
<br />
=== Graphical related problems ===<br />
<br />
==== Low 2D desktop performance (or) artifacts appear when on 2D ====<br />
<br />
===== GPU driver problem =====<br />
<br />
Make sure you have the proper driver for your card installed, so that your desktop is at least 2D accelerated. Follow these articles for more information: [[ATI]], [[NVIDIA]], [[Intel]] for more information, in order to make sure that everything is all right.<br />
The open-source ATI and Intel drivers and the proprietary (binary) Nvidia driver should theoretically provide the best 2D and 3D acceleration.<br />
<br />
===== The Raster engine workaround =====<br />
<br />
If this does not solve your problems, your driver may not provide a good '''XRender''' acceleration which the current Qt painter engine relies on by default.<br />
<br />
You can change the painter engine to software based only by invoking the application with the {{ic|-graphicssystem raster}} command line. This rendering engine can be set as the default one by recompiling Qt with the same as configure option, {{ic|-graphicssystem raster}}.<br />
<br />
The raster paint engine enables the CPU to do the majority of the painting, as opposed to the GPU. You may get better performance, depending on your system. This is basically a work-around for the terrible Linux driver stack, since the CPU should obviously not be doing graphical computations since it is designed for fewer threads of greater complexity, as opposed to the GPU which is many threads but lesser computational strength. So, only use Raster engine if you are having problems or your GPU is much slower than you CPU, otherwise is better to use XRender.<br />
<br />
Since Qt 4.7+, recompiling Qt is not needed. Simply export {{ic|1=QT_GRAPHICSSYSTEM=raster}}, or {{ic|opengl}}, or {{ic|native}} (for the default). Raster depends on the CPU, OpenGL depends on the GPU and high driver support, and Native is just using the X11 rendering (mixture, usually).<br />
<br />
'''The best and automatic way to do that''' is to install {{AUR|kcm-qt-graphicssystem}} from AUR and configure this particular Qt setting through ''System Settings > Qt Graphics System''.<br />
<br />
For more information, consult this [http://apachelog.wordpress.com/2010/09/05/qt-graphics-system-kcm/ KDE Developer blog entry] and/or this [http://labs.trolltech.com/blogs/2009/12/18/qt-graphics-and-performance-the-raster-engine/ Qt Developer blog entry].<br />
<br />
==== Low 3D desktop performance====<br />
<br />
KDE begins with desktop effects enabled. Older cards may be insufficient for 3D desktop acceleration. You can disable desktop effects in ''System Settings > Desktop Effects'' and you can toggle desktop effects with {{ic|Alt+Shift+F12}}.<br />
<br />
{{Note| You may encounter such problems with 3D desktop performance even when using a more powerful graphics card, especially the catalyst proprietary driver ({{ic|fglrx}}). This driver is known for having problems with 3D acceleration. Visit [[ATI|the ATI Wiki page]] for more troubleshooting.}}<br />
<br />
==== Desktop compositing is disabled on my system with a modern Nvidia GPU ====<br />
<br />
Sometimes, KWin may have settings in its configuration file ({{ic|kwinrc}}) that ''may'' cause a problem on re-activating the 3D desktop {{ic|OpenGL}} compositing. That could be caused randomly (for example, due to a sudden Xorg crash or restart, and it gets corrupted), so, in case that happens, delete your {{ic|~/.kde4/share/config/kwinrc}} file and relogin. The KWin settings will turn to the KDE default ones and the problem should be probably gone.<br />
<br />
==== Flickering in fullscreen when compositing is enabled ====<br />
<br />
As of KDE SC 4.6.0, there is an option in ''Sytem Settings > Desktop Effect > Advanced > Suspend desktop effects for fullscreen windows''. Uncheck it would tell kwin to disable unredirect fullscren.<br />
<br />
==== Display settings lost on reboot (multiple monitors) ====<br />
There is a [https://bugs.kde.org/show_bug.cgi?id=346961 bug] in kscreen that makes it forget dual screen settings after reboot with certain displays.<br />
A possible workaround is to delete kscreen and make sure that your screen resolution is specified in a xorg.conf file:<br />
* For Nouveau you can use the template at [[Nouveau#Dual Head]], just edit it to suit your setup.<br />
* For the proprietary nvidia driver you can use the [[NVIDIA#Using_NVIDIA_Settings|nvidia-settings]] utility as root to write the config file.<br />
<br />
=== Sound problems under KDE ===<br />
<br />
==== ALSA related problems ====<br />
<br />
{{Note|First make sure you have {{Pkg|alsa-lib}} and {{Pkg|alsa-utils}} installed.}}<br />
<br />
===== "Falling back to default" messages when trying to listen to any sound in KDE =====<br />
<br />
When you encounter such messages:<br />
The audio playback device ''name_of_the_sound_device'' does not work.<br />
Falling back to default<br />
Go to ''System Settings > Multimedia > Phonon'' and set the device named {{ic|default}} above all the other devices in each box you see.<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 {{Pkg|phonon-qt4-vlc}} or {{Pkg|phonon-qt5-vlc}}.<br />
Then, make sure the backend is preferred via ''System Settings > Multimedia > Phonon > Backend (tab)''.<br />
<br />
=== Konsole does not save commands' history ===<br />
<br />
By default console command history is saved only when you type 'exit' in console. When you close Konsole with 'x' in the corner it does not happen.<br />
To enable autosaving after every command execution:<br />
<br />
{{hc|~/.bashrc|<nowiki><br />
shopt -s histappend<br />
[[ "${PROMPT_COMMAND}" ]] && PROMPT_COMMAND="$PROMPT_COMMAND;history -a" || PROMPT_COMMAND="history -a"<br />
</nowiki>}}<br />
<br />
=== Inotify folder watch limit ===<br />
<br />
If you get the following error:<br />
<br />
KDE Baloo Filewatch service reached the inotify folder watch limit. File changes may be ignored.<br />
<br />
Then you will need to increase the inotify folder watch limit:<br />
<br />
# echo 10000 > /proc/sys/fs/inotify/max_user_watches<br />
<br />
To make changes permanent, create {{ic|/etc/sysctl.d/90-inotify.conf}} with<br />
<br />
#increase inotify watch limit<br />
fs.inotify.max_user_watches = 10000<br />
<br />
== Unstable releases ==<br />
<br />
When KDE is reaching beta or RC milestone, KDE "unstable" packages are uploaded to the ''kde-unstable'' repository. They stay there until KDE is declared stable and passes to the ''extra'' repository.<br />
<br />
You can add ''kde-unstable'' with:<br />
<br />
{{hc|/etc/pacman.conf|2=<br />
[kde-unstable]<br />
Include = /etc/pacman.d/mirrorlist<br />
}}<br />
<br />
{{Warning|Make sure to add these lines '''before''' the ''extra'' repository. Adding the section after ''extra'' will cause [[pacman]] to prefer the older packages in the extra repository. {{ic|pacman -Syu}} will not install them, and will warn that they are "too new" if installed manually. Also, some of the libraries will stay at the older versions, which may cause file conflicts and/or instability!}}<br />
<br />
# ''kde-unstable'' is based upon ''testing''. Therefore, you need to enable the repositories in the following order: ''kde-unstable'', ''testing'', ''core'', ''extra'', ''community-testing'', ''community''.<br />
# To update from a previous KDE installation, run: {{ic|# pacman -Syu}} or {{ic|# pacman -S kde-unstable/kde}}<br />
# If you do not have KDE installed, you might have difficulties to install it by using groups (limitation of pacman)<br />
# '''Subscribe and read the [https://mailman.archlinux.org/pipermail/arch-dev-public/ arch-dev-public] mailing list'''<br />
# Make sure [[#Bugs|you make bug reports]] if you find any problems.<br />
<br />
== Bugs ==<br />
<br />
It is preferable that if you find a minor or serious bug, you should visit [https://bugs.archlinux.org the Arch Bug Tracker] or/and [http://bugs.kde.org KDE Bug Tracker] in order to report that. Make sure that you are clear about what you want to report.<br />
<br />
If you have any problem and you write about in on the Arch forums, first make sure that you have '''fully''' updated your system using a good sync mirror (check [https://www.archlinux.de/?page=MirrorStatus here]) or try [[Reflector]].<br />
<br />
== See also ==<br />
<br />
* [http://www.kde.org KDE homepage]<br />
* [https://bugs.kde.org KDE bug tracker]<br />
* [https://projects.kde.org KDE Projects]<br />
* [http://blog.martin-graesslin.com/blog/kategorien/kde/ Martin Graesslin's blog]</div>Beta990https://wiki.archlinux.org/index.php?title=KDE&diff=412771KDE2015-12-19T10:33:52Z<p>Beta990: /* Starting Plasma */ Moved note from upgrade</p>
<hr />
<div>[[Category:KDE]]<br />
[[ar:KDE]]<br />
[[cs:KDE]]<br />
[[de:KDE]]<br />
[[es:KDE]]<br />
[[fr:KDE]]<br />
[[it:KDE]]<br />
[[ja:KDE]]<br />
[[pl:KDE]]<br />
[[ru:KDE]]<br />
[[tr:KDE Masaüstü Ortamı]]<br />
[[zh-CN:KDE]]<br />
[[zh-TW:KDE]]<br />
{{Related articles start}}<br />
{{Related|Desktop environment}}<br />
{{Related|Display manager}}<br />
{{Related|Dolphin}}<br />
{{Related|Window manager}}<br />
{{Related|Qt}}<br />
{{Related|KDM}}<br />
{{Related|KDevelop 4}}<br />
{{Related|Trinity}}<br />
{{Related|Uniform Look for Qt and GTK Applications}}<br />
{{Related articles end}}<br />
<br />
KDE is a software project currently comprising of a [[desktop environment]] known as Plasma (or Plasma Workspaces), a collection of libraries and frameworks (KDE Frameworks) and several applications (KDE Applications) as well. KDE upstream has a well maintained [http://userbase.kde.org/ UserBase wiki]. Detailed information about most KDE applications can be found there.<br />
<br />
== Installation ==<br />
<br />
=== Plasma Desktop ===<br />
<br />
{{Note|<br />
*Plasma 5 is not co-installable with Plasma 4.<br />
*The Plasma 4 desktop is unmaintained since August 2015.[https://www.kde.org/announcements/announce-applications-15.08.0.php] It is no longer in the official repositories since December 2015.[https://www.archlinux.org/news/dropping-plasma-4/]}}<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 [[KDE Packages]]. Alternatively, for a more minimal Plasma installation, install the {{Pkg|plasma-desktop}} package.<br />
<br />
=== Upgrading from Plasma 4 to 5 ===<br />
<br />
# Isolate {{ic|multi-user.target}}{{bc|# systemctl isolate multi-user.target}} <br />
# If you use KDM as display manager, disable it{{bc|# systemctl disable kdm}}<br />
# [[Pacman|Uninstall]] the kdebase-workspace package{{bc|# pacman -Rc kdebase-workspace}} <br />
# [[Install]] the {{pkg|plasma-meta}} package or the {{grp|plasma}} group.<br />
# Enable [[SDDM]]{{bc|# systemctl enable sddm}} or install and enable any other [[display manager]].<br />
# If {{ic|# systemctl disable kdm}} is not run first, you will receive {{bc|# systemctl enable sddm}}{{bc|Failed to execute operation: File exists}}If file {{ic|/usr/lib/systemd/system/kdm.service}}, or similar, no longer exists, manually run {{bc|# rm /etc/systemd/system/display-manager.service}} and then re-run {{bc|# systemctl enable sddm}}<br />
# Reboot or simply run {{bc|# systemctl start sddm}}<br />
<br />
{{Note|The Plasma 4 configuration is not automatically migrated to Plasma 5, so you will have to configure your desktop from scratch.}}<br />
<br />
=== KDE applications and language packs ===<br />
<br />
To install the full set of KDE Applications, install the {{Grp|kde-applications}} group or the {{Pkg|kde-applications-meta}} meta-packages to install specific modules. Note that this will only install applications, it will not install any version of the Plasma Desktop.<br />
<br />
If you need language files, install {{ic|kde-l10n-'''yourlanguagehere'''}} (e.g. {{Pkg|kde-l10n-de}} for the German language). For a full list of available languages see [https://www.archlinux.org/packages/extra/any/kde-l10n/ this link].<br />
<br />
== Starting Plasma ==<br />
<br />
{{Tip|<br />
*[[KDM]] is not available in Plasma 5. KDE upstream [http://blog.davidedmundson.co.uk/blog/display_managers_finale recommends] using the [[SDDM]] display manager as it provides integration with the Plasma 5 theme.<br />
*To better integrate SDDM with Plasma, it is recommended to edit {{ic|/etc/sddm.conf}} to use the breeze theme. Refer to [[SDDM#Theme settings]] for instructions.}}<br />
{{Note|The Plasma 4 configuration is not automatically migrated to Plasma 5, so you will have to configure your desktop from scratch.}}<br />
<br />
To launch a Plasma 5 session, choose ''Plasma'' in your [[display manager]] menu.<br />
<br />
Alternatively, to start Plasma with ''startx'', append {{ic|exec startkde}} to your {{ic|.xinitrc}} file. If you want to start Xorg at login, please see [[Start X at login]].<br />
<br />
== Configuration ==<br />
<br />
Most settings for KDE applications are stored in {{ic|~/.config}}, but some older applications may use {{ic|~/.kde4}}. However, configuring KDE is primarily done through the '''System Settings''' application. It can be started from a terminal by executing ''systemsettings5''.<br />
<br />
Frameworks 5 applications can use KDE 4 configuration however they expect the configuration files to be located in different places. To allow Frameworks 5 applications running in KDE 4 to share the same configurations they may be moved to the new locations and symlinked back to the old. Examples are:<br />
*Konsole profiles from {{ic|~/.kde4/share/apps/konsole}} to {{ic|~/.local/share/konsole/}}<br />
*Application appearance from {{ic|~/.kde4/share/config/kdeglobals}} to {{ic|~/.config/kdeglobals}} <br />
<br />
=== Personalization ===<br />
<br />
==== Plasma desktop ====<br />
<br />
===== Themes =====<br />
<br />
{{Note|1=If the Plasma cursor theme is incorrect in some instances, see the following [https://bbs.archlinux.org/viewtopic.php?pid=1533071#p1533071 forum post] for a workaround.}}<br />
[http://kde-look.org/index.php?xcontentmode=76 Plasma themes] define the look of panels and plasmoids. For easy system-wide installation, some such themes are available in both the official repositories and the [https://aur.archlinux.org/packages.php?O=0&K=plasmatheme&do_Search=Go AUR].<br />
<br />
The easiest way to install themes is by going through the Desktop Settings control panel:<br />
<br />
Workspace Theme > Desktop Theme > Get new Themes<br />
<br />
This will present a nice frontend for [http://www.kde-look.org/ kde-look.org] that allows you to install, uninstall, or update third-party plasmoid scripts with literally just one click.<br />
<br />
Splash and Lock screens are currently unavailable so to customize these screens you have to modify the original theme found in {{ic|/usr/share/plasma/look-and-feel/}}.<br />
See [https://www.kubuntuforums.net/showthread.php?67599-Plasma-5-background-images&s=59832dc20e5bfc2948dbb591d8453f61 this thread] on the Kubuntu forums.<br />
<br />
Note that the [[SDDM]] login screen is not part of this theme.<br />
<br />
====== Qt and GTK+ Applications Appearance ======<br />
<br />
{{Tip|For Qt and GTK theme consistency, see [[Uniform look for Qt and GTK applications]].}}<br />
<br />
;Qt4<br />
For Qt4 applications to have a consistent appearance, you need to install {{Pkg|breeze-kde4}} and then pick Breeze as GUI Style in {{ic|qtconfig-qt4}}.<br />
<br />
;GTK+<br />
The recommended theme for a pleasant appearance in GTK+ applications is {{Pkg|breeze-gtk}} or {{AUR|gnome-breeze-git}}, a GTK+ theme designed to mimic the appearance of Plasma 5 Breeze.<br />
Install {{Pkg|kde-gtk-config}} and select the installed GTK-theme for GTK2/GTK3-Theme in ''System Settings > Application Style > GNOME Application Style''.<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 />
Plasmoid binaries can be installed using PKGBUILDs from [https://aur.archlinux.org/packages.php?O=0&K=plasmoid&do_Search=Go&PP=25&SO=d&SB=v AUR], or you can write your own PKGBUILD.<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 Widgets''.<br />
<br />
This will present a nice frontend for [http://www.kde-look.org/ kde-look.org] that allows you to install, uninstall, or update third-party plasmoid scripts with literally just one click.<br />
<br />
Most plasmoids are not created officially by KDE developers. You can also try installing Mac OS X widgets, Microsoft Windows Vista/7 widgets, Google Widgets, and even SuperKaramba widgets.<br />
<br />
===== Sound applet in the system tray =====<br />
<br />
[[Install]] {{Pkg|plasma-pa}} or {{Pkg|kmix}} (start Kmix from the Application Launcher).<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|~/.kde4/share/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-desktop": ("Plasma" "Plasma")/!d; s/^ *\([^ ]*\) .*/\1/g'); do<br />
xprop -id $WID -remove _KDE_NET_WM_SHADOW<br />
done<br />
</nowiki>}}<br />
<br />
The script can be run on login with ''Add Script'' in ''Autostart'':<br />
<br />
$ kcmshell4 autostart<br />
<br />
==== Window decorations ====<br />
<br />
[http://kde-look.org/index.php?xcontentmode=75 Window decorations] can be changed in ''System Settings > Workspace Appearance > 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?O=0&K=kdestyle&do_Search=Go&PP=25&SO=d&SB=v AUR].<br />
<br />
==== Icon themes ====<br />
<br />
Icon-themes can be installed and changed on ''System Settings > Icons''.<br />
{{note|[[Gnome]] and KDE4 installed icon-themes may not be (fully) compatible with Plasma.<br />
It's recommended to install Plasma compatible icon-themes instead.}}<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''.<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 > Appearance > 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 '''96''' in ''System Settings > Application Appearance > Fonts''.<br />
<br />
If that does not work, try setting the DPI directly in your Xorg configuration as documented [[Xorg#Setting_DPI_manually|here]].<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]<br />
However, you can achieve something similar by editing the file {{ic|~/.config/kwinrc}} adding <br />
{{ic|1=BorderlessMaximizedWindows=true}} in the {{ic|[Windows]}} section.<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 > Printer Configuration''. To use this method, you must first install {{Pkg|print-manager}} and {{Pkg|cups}}.<br />
<br />
The {{ic|avahi-daemon.service}} and {{ic|org.cups.cupsd.service}} daemons must be started first; otherwise, you will get the following error:<br />
The service 'Printer Configuration' does not provide an interface 'KCModule'<br />
with keyword 'system-config- printer-kde/system-config-printer-kde.py'<br />
The factory does not support creating components of the specified type.<br />
<br />
If you are getting the following error, you need to give your user the right to manage printers.<br />
There was an error during CUPS operation: 'cups-authorization-canceled'<br />
<br />
For CUPS, this is set in {{ic|/etc/cups/cups-files.conf}}.<br />
<br />
Adding {{ic|lpadmin}} to {{ic|/etc/group}} and then to the {{ic|SystemGroup}} directive in {{ic|/etc/cups/cups-files.conf}} allows anyone in the {{ic|lpadmin}} group to configure printers. Do ''not'' add the {{ic|lp}} group to the {{ic|SystemGroup}} directive, or printing will fail.<br />
<br />
# groupadd -g107 lpadmin<br />
<br />
{{hc|/etc/cups/cups-files.conf|# Administrator user group...<br />
SystemGroup sys root lpadmin}}<br />
<br />
{{Tip|Read [[CUPS#Administration]] to get more details on how to configure CUPS.}}<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 usershares, which the stock smb.conf does not have enabled. Instructions to add them are in [[Samba#Creating usershare path]], after which sharing in Dolphin should work out of the box after restarting Samba.<br />
<br />
=== KDE Desktop activities ===<br />
<br />
KDE Desktop Activities are Plasma-based virtual-desktop-like sets of Plasma Widgets where you can independently configure widgets as if you have more than one screen or desktop.<br />
<br />
On your desktop, click the Cashew Plasmoid and, on the pop-up window, press "Activities".<br />
<br />
A plasma bar presenting you the current existing Plasma Desktop Activities will appear at the bottom of the screen. You can navigate between them by pressing the correspondent icons.<br />
<br />
=== Power saving ===<br />
<br />
Plasma has an integrated power saving service called "'''Powerdevil Power Management'''" that may adjust the power saving profile of the system and/or the brightness of the screen (if supported).<br />
<br />
=== Monitoring changes on local files and directories ===<br />
<br />
KDE now uses '''inotify''' directly from the kernel with '''kdirwatch''' (included in kdelibs), so Gamin or FAM are no longer needed. You may want to install this {{AUR|kdirwatch}}{{Broken package link|{{aur-mirror|kdirwatch}}}} from AUR which is a GUI frontend for kdirwatch.<br />
<br />
=== Autostarting applications ===<br />
<br />
{{Accuracy|See [[KDE Wallet#Using the KDE Wallet to store ssh keys]]. Merge general information here.}}<br />
<br />
Plasma can autostart applications and run scripts on startup and shutdown. To autostart an application, start {{ic|systemsettings}} and navigate to ''Startup and Shutdown'' -> ''Autostart'' and add the program or shell script of your choice. Note that programs can be autostarted on login only, whilst shell scripts can also be run on shutdown or even before Plasma itself starts. For applications, a {{ic|.desktop}} file will be created in the {{ic|~/.config/autostart}} directory. For shell scripts, a symlink will be created in one the following directories:<br />
* {{ic|~/.config/autostart-scripts}} - for starting at login.<br />
* {{ic|~/.config/plasma-workspace/shutdown}} - for starting on shutdown.<br />
* {{ic|~/.config/plasma-workspace/env}} - for starting prior to login.<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.<br />
<br />
'''Configuration for look and feel of GTK applications.'''<br />
* {{Pkg|kde-gtk-config}}<br />
* {{AUR|kcm-gtk}}{{Broken package link|{{aur-mirror|kcm-gtk}}}}<br />
* {{AUR|kcm-qt-graphicssystem}}<br />
<br />
'''Configuration for the GRUB bootloader.'''<br />
* {{AUR|grub2-editor}}{{Broken package link|{{aur-mirror|grub2-editor}}}}<br />
<br />
'''Configuration for the [[Uncomplicated Firewall]] (UFW)'''<br />
* {{AUR|kcm-ufw}}<br />
<br />
'''Configuration for [[PolicyKit]]'''<br />
* {{AUR|kcm-polkit-kde-git}}{{Broken package link|{{aur-mirror|kcm-polkit-kde-git}}}}<br />
<br />
'''Configuration for Wacom tablets'''<br />
* {{AUR|kcm-wacomtablet}}<br />
<br />
'''Configuration for systemd'''<br />
* {{Pkg|systemd-kcm}}<br />
<br />
More KCMs can be found at [http://kde-apps.org/index.php?xcontentmode=273 kde-apps.org].<br />
<br />
== Desktop search ==<br />
<br />
KDE implements desktop search with a software called Baloo, a file indexing and searching solution.<br />
<br />
=== Baloo ===<br />
<br />
==== Using and configuring Baloo ====<br />
<br />
In order to search using Baloo on the KDE Plasma Desktop, press {{ic|ALT+F2}} and type in your query. Within Dolphin press {{ic|CTRL+F}}.<br />
<br />
By default the Desktop Search KCM exposes only two options: A panel to blacklist folders and a way to disable it with one click.<br />
<br />
Alternatively you can edit your {{ic|~/.config/baloofilerc}} file ([https://community.kde.org/Baloo/Configuration info]). Additionally the {{ic|balooctl}} process can also be used. In order to disable Baloo run {{ic|balooctl disable}}.<br />
<br />
Once you added additional folders to the blacklist or disabled Baloo entirely, a process named {{ic|baloo_file_cleaner}} removes all unneeded index files automatically. They are stored under {{ic|~/.local/share/baloo/}}.<br />
<br />
More advanced configuration options are available through {{AUR|kcm_baloo_advanced}}.<br />
<br />
==== How do I index a removable device? ====<br />
<br />
By default every removable device is blacklisted. You just have to remove your device from the blacklist in the KCM panel.<br />
<br />
=== Web browsers ===<br />
==== Konqueror and Rekonq ====<br />
Konqueror supports two rendering engines – KHTML and QtWebKit (via the {{Pkg|kwebkitpart}} package) – Rekonq supports only QtWebKit. KHTML development was halted after Qt shipped WebKit but was kept for compatibility reasons. QtWebKit, in turn, has since been [https://www.mail-archive.com/development@qt-project.org/msg18866.html deprecated] by the Qt Project and replaced by [[Chromium]]-based Qt WebEngine which is currently not supported by either Konqueror or Rekonq.<br />
<br />
A successor named Fiber is currently in development, which will use Chromium's engine.<br />
<br />
==== Firefox ====<br />
Firefox can be configured to better integrate with Plasma. See [[Firefox#KDE_integration|Firefox KDE integration]] for details.<br />
<br />
==== Qupzilla ====<br />
Qupzilla ({{Pkg|qupzilla}}) is a Qt web browser with Plasma integration features. Qupzilla 2.0 will use Qt WebEngine intead of WebKit.<br />
<br />
== PIM ==<br />
<br />
KDE offers its own stack for personal information management. This includes emails, contacts, calendar, etc.<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.<br />
<br />
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 />
==== Disabling Akonadi ====<br />
<br />
See this [http://userbase.kde.org/Akonadi#Disabling_the_Akonadi_subsystem section in the KDE userbase].<br />
<br />
==== Database configuration ====<br />
<br />
Start {{ic|akonaditray}} from package {{Pkg|kdepim-runtime}}. Right click on it and select '''configure'''. In the Akonadi server configure tab, you can:<br />
* Configuring Akonadi to use MySQL/MariaDB Server<br />
** If your home directory is on a ZFS pool, you will need to create {{ic|~/.config/akonadi/mysql-local.conf}} with the following contents:<br />
<br />
[mysqld]<br />
innodb_use_native_aio = 0<br />
<br />
Otherwise you will get the [[MySQL#OS error 22 when running on ZFS|OS error 22]]<br />
* Configuring Akonadi to use PostgreSQL Server<br />
* Configuring Akonadi to use SQLite<br />
** Edit {{ic|~/.config/akonadi/akonadiserverrc}} to match the below<br />
<br />
[General]<br />
Driver=QSQLITE3<br />
<br />
[QSQLITE3]<br />
Name=/home/username/.local/akonadi/akonadi.db<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 />
You can choose between backends based on [[GStreamer]] and [[VLC]] – each available in versions for Qt4 applications and Qt5 applications ({{Pkg|phonon-qt4-gstreamer}}, {{Pkg|phonon-qt5-gstreamer}} – {{Pkg|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 [http://community.kde.org/Phonon/FeatureMatrix features set.]<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 at ''System Settings > Multimedia > Phonon > Backend''. For Plasma 5 this would be ''System Settings > Multimedia > Backend''.<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 />
<br />
== Useful applications ==<br />
<br />
The official set of KDE applications may be found [http://www.kde.org/applications/ here].<br />
<br />
=== Yakuake ===<br />
<br />
[[Yakuake]] provides a Quake-like terminal emulator whose visibility is toggled by the F12 key. It also has support for multiple tabs. Yakuake is available in the package {{Pkg|yakuake}}.<br />
<br />
=== KDE Telepathy ===<br />
<br />
[http://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 '+xx', e.g. '+49' for Germany). 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). Note that 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 />
== Tips and tricks ==<br />
<br />
=== Using an alternative window manager ===<br />
There may be reasons you want to use another window manager than KWin, for example to work around the DRI bug that causes [[PRIME#Black_screen_with_GL-based_compositors|black screen with PRIME]].<br />
<br />
To use an alternative [[window manager]] with Plasma open the ''System Settings'' panel, navigate to ''(Default) Applications > Window Manager > Use a different window manager'' and select the window manager you wish to use from the list.<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 {{ic|.xinitrc}} file:<br />
exec openbox-kde-session<br />
<br />
==== Compiz custom ====<br />
<br />
If you need to run Compiz with custom options and switches select ''Compiz custom'' and then create a script called {{ic|compiz-kde-launcher}} and add to it the commands you wish to use to start Compiz. See the example below:<br />
<br />
{{hc|/usr/local/bin/compiz-kde-launcher|<nowiki><br />
#!/bin/bash<br />
LIBGL_ALWAYS_INDIRECT=1<br />
compiz --replace &<br />
wait<br />
</nowiki>}}<br />
<br />
Then make it executable:<br />
$ chmod +x /usr/local/bin/compiz-kde-launcher<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 />
=== Integrate Android ===<br />
<br />
KDE Connect provides several features for you:<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 {{ic|KDE Connect}} from [https://play.google.com/store/apps/details?id=org.kde.kdeconnect_tp Google Play] or from [https://f-droid.org/repository/browse/?fdid=org.kde.kdeconnect_tp F-Droid].<br />
<br />
=== Configure KWin to use OpenGL ES ===<br />
Set environment variable {{ic|KWIN_COMPOSE}} to 'O2ES' to force the OpenGL ES backend. Please note that OpenGL ES is not supported by all drivers.<br />
<br />
=== Speed up application startup ===<br />
<br />
User Rob described a "[http://kdemonkey.blogspot.nl/2008/04/magic-trick.html magic trick]" on his blog to improve application start-up time by 50-150ms.<br />
To enable it, create this folder in your home:<br />
$ mkdir ~/.compose-cache/<br />
It can produce freezes under heavy io. To avoid this, also do:<br />
$ ln -sfv /run/user/$UID/ /home/$USER/.compose-cache<br />
<br />
{{Note|For those curious about what is going on here, this enables an optimization which Lubos (of general KDE speediness fame) came up with some time ago and was then rewritten and integrated into libx11. Ordinarily, on startup, applications read input method information from {{ic|/usr/share/X11/locale/''your locale''/Compose}}. This file is quite long (>5000 lines for the en_US.UTF-8 one) and takes some time to process. libX11 can create a cache of the parsed information which is much quicker to read subsequently, but it will only re-use an existing cache or create a new one in {{ic|~/.compose-cache}} if the directory already exists.}}<br />
<br />
=== Configuring monitor resolution / multiple monitors ===<br />
<br />
To enable display resolution management and multiple monitors in Plasma 5, install {{Pkg|kscreen}}. This adds the additional options to System Settings/Display and Monitor.<br />
<br />
=== Open application launcher with Super key (Windows key) ===<br />
<br />
Install and start {{Pkg|ksuperkey}}. Now assign Alt + F1 as hot key. The Super Key will now open the application launcher. You can add ksuperkey to the autostart if you don't want to start it manually.<br />
<br />
== Troubleshooting ==<br />
<br />
=== Graphics card related ===<br />
<br />
==== Intel ====<br />
<br />
If you use 3D-accelerated composition with Intel, you might find that the Plasma panel and other applications don't refresh properly (stay frozen). Some Intel drivers have [https://bugzilla.redhat.com/show_bug.cgi?id=1259475 problems with EGL]. Try to set Plasma 5's ''OpenGL interface'' setting to GLX instead (in System Settings under ''Display and Monitor'' -> ''Compositor''. If that does not work, see ''[[Intel_graphics#SNA_issues|Intel graphics SNA issues]]'' for alternative solutions.<br />
<br />
==== Plasma keeps crashing with legacy Nvidia ====<br />
<br />
There is a bug in Plasma with using the Nvidia-304xx driver described [https://bugs.kde.org/show_bug.cgi?id=348753 here.] Rather than disabling compositing, try creating a file kwin.sh in ~/.config/plasma-workspace/env/ with the following content<br />
<br />
#!/bin/sh<br />
export KWIN_EXPLICIT_SYNC=0<br />
Then go to the system-settings -> Startup and Shutdown -> Autostart and Check/Add the script as a pre-kde startup file<br />
<br />
=== Configuration related ===<br />
<br />
Many problems in KDE are related to configuration.<br />
<br />
==== Reset all kdelib4 apps configuration ====<br />
<br />
To test whether your config is the problem try quitting all kdelib4 apps and run:<br />
<br />
$ cp -r ~/.kde4 ~/.kde4.safekeeping<br />
$ rm .kde4/{cache,socket,tmp}-$(hostname)<br />
<br />
The ''rm'' command just removes symbolic links which will be recreated automatically.<br />
<br />
If the problem does not manifest itself, gradually move parts from the saved configuration back, and restart the application(s) regularly to test and identify problematic parts.<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 it 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 (bugs.kde.org) '''only if it is an official widget'''. If it is not, it is recommended you find the entry on kde-look.org 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}}:<br />
<br />
$ for j in plasma*; do mv -- "$j" "${j%}.bak"; done<br />
<br />
This command will '''rename all Plasma related configs''' 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 [[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 and several other problems such as ark being unable to unrar or unzip or amarok not recognizing any of your musics. This solution can also resolve problems with KDE and Qt programmes looking bad following upgrade.<br />
<br />
Rebuild your cache with the following commands:<br />
<br />
$ rm ~/.config/Trolltech.conf<br />
$ kbuildsycoca4 --noincremental<br />
<br />
Hopefully, your problems are now fixed.<br />
<br />
=== Clean akonadi configuration to fix KMail ===<br />
<br />
First, make sure that KMail is not running. Then backup configuration:<br />
$ mv ~/.local/share/akonadi ~/.local/share/akonadi-old<br />
$ mv ~/.config/akonadi ~/.config/akonadi-old<br />
<br />
Start ''SystemSettings > Personal'' and remove all the resources. Go back to Dolphin and remove the original {{ic|~/.local/share/akonadi}} and<br />
{{ic|~/.config/akonadi}} - the copies you made ensure that you can back-track if necessary.<br />
<br />
Now go back to the System Settings page and carefully add the necessary resources. You should see the resource reading in your mail folders. Then start Kontact/KMail to see if it work properly.<br />
<br />
=== Getting current state of KWin for support and debug purposes ===<br />
<br />
This command prints out a wonderful summary of the current state of KWin including used options, used compositing backend and relevant OpenGL driver capabilities. See more on [http://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 />
=== KDE and Qt programs look bad when in a different window manager ===<br />
<br />
If you are using KDE or Qt programs but not in a full Plasma session (specifically, you did not run {{ic|startkde}}), then as of Plasma 4.6.1 you will need to tell Qt how to find KDE's styles (Oxygen, QtCurve etc.)<br />
<br />
You just need to set the environment variable {{ic|QT_PLUGIN_PATH}}. E.g. put:<br />
<br />
export QT_PLUGIN_PATH=$HOME/.kde4/lib/kde4/plugins/:/usr/lib/kde4/plugins/<br />
<br />
into your {{ic|/etc/profile}} (or {{ic|~/.profile}} if you do not have root access). {{ic|qtconfig-qt4}} should then be able to find your KDE styles and everything should look nice again!<br />
<br />
Alternatively, you can symlink the Qt styles directory to the KDE styles one:<br />
# ln -s /usr/lib/kde4/plugins/styles/ /usr/lib/qt4/pluginlib32-libdbusmenu-glibs/styles<br />
<br />
Under Gnome you can try to install the package libgnomeui.<br />
<br />
=== KF5/Qt5 applications don't display icons in i3/fvwm/awesome ===<br />
<br />
See [[Qt#Configuration of Qt apps under environments other than KDE]].<br />
<br />
=== Graphical related problems ===<br />
<br />
==== Low 2D desktop performance (or) artifacts appear when on 2D ====<br />
<br />
===== GPU driver problem =====<br />
<br />
Make sure you have the proper driver for your card installed, so that your desktop is at least 2D accelerated. Follow these articles for more information: [[ATI]], [[NVIDIA]], [[Intel]] for more information, in order to make sure that everything is all right.<br />
The open-source ATI and Intel drivers and the proprietary (binary) Nvidia driver should theoretically provide the best 2D and 3D acceleration.<br />
<br />
===== The Raster engine workaround =====<br />
<br />
If this does not solve your problems, your driver may not provide a good '''XRender''' acceleration which the current Qt painter engine relies on by default.<br />
<br />
You can change the painter engine to software based only by invoking the application with the {{ic|-graphicssystem raster}} command line. This rendering engine can be set as the default one by recompiling Qt with the same as configure option, {{ic|-graphicssystem raster}}.<br />
<br />
The raster paint engine enables the CPU to do the majority of the painting, as opposed to the GPU. You may get better performance, depending on your system. This is basically a work-around for the terrible Linux driver stack, since the CPU should obviously not be doing graphical computations since it is designed for fewer threads of greater complexity, as opposed to the GPU which is many threads but lesser computational strength. So, only use Raster engine if you are having problems or your GPU is much slower than you CPU, otherwise is better to use XRender.<br />
<br />
Since Qt 4.7+, recompiling Qt is not needed. Simply export {{ic|1=QT_GRAPHICSSYSTEM=raster}}, or {{ic|opengl}}, or {{ic|native}} (for the default). Raster depends on the CPU, OpenGL depends on the GPU and high driver support, and Native is just using the X11 rendering (mixture, usually).<br />
<br />
'''The best and automatic way to do that''' is to install {{AUR|kcm-qt-graphicssystem}} from AUR and configure this particular Qt setting through ''System Settings > Qt Graphics System''.<br />
<br />
For more information, consult this [http://apachelog.wordpress.com/2010/09/05/qt-graphics-system-kcm/ KDE Developer blog entry] and/or this [http://labs.trolltech.com/blogs/2009/12/18/qt-graphics-and-performance-the-raster-engine/ Qt Developer blog entry].<br />
<br />
==== Low 3D desktop performance====<br />
<br />
KDE begins with desktop effects enabled. Older cards may be insufficient for 3D desktop acceleration. You can disable desktop effects in ''System Settings > Desktop Effects'' and you can toggle desktop effects with {{ic|Alt+Shift+F12}}.<br />
<br />
{{Note| You may encounter such problems with 3D desktop performance even when using a more powerful graphics card, especially the catalyst proprietary driver ({{ic|fglrx}}). This driver is known for having problems with 3D acceleration. Visit [[ATI|the ATI Wiki page]] for more troubleshooting.}}<br />
<br />
==== Desktop compositing is disabled on my system with a modern Nvidia GPU ====<br />
<br />
Sometimes, KWin may have settings in its configuration file ({{ic|kwinrc}}) that ''may'' cause a problem on re-activating the 3D desktop {{ic|OpenGL}} compositing. That could be caused randomly (for example, due to a sudden Xorg crash or restart, and it gets corrupted), so, in case that happens, delete your {{ic|~/.kde4/share/config/kwinrc}} file and relogin. The KWin settings will turn to the KDE default ones and the problem should be probably gone.<br />
<br />
==== Flickering in fullscreen when compositing is enabled ====<br />
<br />
As of KDE SC 4.6.0, there is an option in ''Sytem Settings > Desktop Effect > Advanced > Suspend desktop effects for fullscreen windows''. Uncheck it would tell kwin to disable unredirect fullscren.<br />
<br />
==== Display settings lost on reboot (multiple monitors) ====<br />
There is a [https://bugs.kde.org/show_bug.cgi?id=346961 bug] in kscreen that makes it forget dual screen settings after reboot with certain displays.<br />
A possible workaround is to delete kscreen and make sure that your screen resolution is specified in a xorg.conf file:<br />
* For Nouveau you can use the template at [[Nouveau#Dual Head]], just edit it to suit your setup.<br />
* For the proprietary nvidia driver you can use the [[NVIDIA#Using_NVIDIA_Settings|nvidia-settings]] utility as root to write the config file.<br />
<br />
=== Sound problems under KDE ===<br />
<br />
==== ALSA related problems ====<br />
<br />
{{Note|First make sure you have {{Pkg|alsa-lib}} and {{Pkg|alsa-utils}} installed.}}<br />
<br />
===== "Falling back to default" messages when trying to listen to any sound in KDE =====<br />
<br />
When you encounter such messages:<br />
The audio playback device ''name_of_the_sound_device'' does not work.<br />
Falling back to default<br />
Go to ''System Settings > Multimedia > Phonon'' and set the device named {{ic|default}} above all the other devices in each box you see.<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 {{Pkg|phonon-qt4-vlc}} or {{Pkg|phonon-qt5-vlc}}.<br />
Then, make sure the backend is preferred via ''System Settings > Multimedia > Phonon > Backend (tab)''.<br />
<br />
=== Konsole does not save commands' history ===<br />
<br />
By default console command history is saved only when you type 'exit' in console. When you close Konsole with 'x' in the corner it does not happen.<br />
To enable autosaving after every command execution:<br />
<br />
{{hc|~/.bashrc|<nowiki><br />
shopt -s histappend<br />
[[ "${PROMPT_COMMAND}" ]] && PROMPT_COMMAND="$PROMPT_COMMAND;history -a" || PROMPT_COMMAND="history -a"<br />
</nowiki>}}<br />
<br />
=== Inotify folder watch limit ===<br />
<br />
If you get the following error:<br />
<br />
KDE Baloo Filewatch service reached the inotify folder watch limit. File changes may be ignored.<br />
<br />
Then you will need to increase the inotify folder watch limit:<br />
<br />
# echo 10000 > /proc/sys/fs/inotify/max_user_watches<br />
<br />
To make changes permanent, create {{ic|/etc/sysctl.d/90-inotify.conf}} with<br />
<br />
#increase inotify watch limit<br />
fs.inotify.max_user_watches = 10000<br />
<br />
== Unstable releases ==<br />
<br />
When KDE is reaching beta or RC milestone, KDE "unstable" packages are uploaded to the ''kde-unstable'' repository. They stay there until KDE is declared stable and passes to the ''extra'' repository.<br />
<br />
You can add ''kde-unstable'' with:<br />
<br />
{{hc|/etc/pacman.conf|2=<br />
[kde-unstable]<br />
Include = /etc/pacman.d/mirrorlist<br />
}}<br />
<br />
{{Warning|Make sure to add these lines '''before''' the ''extra'' repository. Adding the section after ''extra'' will cause [[pacman]] to prefer the older packages in the extra repository. {{ic|pacman -Syu}} will not install them, and will warn that they are "too new" if installed manually. Also, some of the libraries will stay at the older versions, which may cause file conflicts and/or instability!}}<br />
<br />
# ''kde-unstable'' is based upon ''testing''. Therefore, you need to enable the repositories in the following order: ''kde-unstable'', ''testing'', ''core'', ''extra'', ''community-testing'', ''community''.<br />
# To update from a previous KDE installation, run: {{ic|# pacman -Syu}} or {{ic|# pacman -S kde-unstable/kde}}<br />
# If you do not have KDE installed, you might have difficulties to install it by using groups (limitation of pacman)<br />
# '''Subscribe and read the [https://mailman.archlinux.org/pipermail/arch-dev-public/ arch-dev-public] mailing list'''<br />
# Make sure [[#Bugs|you make bug reports]] if you find any problems.<br />
<br />
== Bugs ==<br />
<br />
It is preferable that if you find a minor or serious bug, you should visit [https://bugs.archlinux.org the Arch Bug Tracker] or/and [http://bugs.kde.org KDE Bug Tracker] in order to report that. Make sure that you are clear about what you want to report.<br />
<br />
If you have any problem and you write about in on the Arch forums, first make sure that you have '''fully''' updated your system using a good sync mirror (check [https://www.archlinux.de/?page=MirrorStatus here]) or try [[Reflector]].<br />
<br />
== See also ==<br />
<br />
* [http://www.kde.org KDE homepage]<br />
* [https://bugs.kde.org KDE bug tracker]<br />
* [https://projects.kde.org KDE Projects]<br />
* [http://blog.martin-graesslin.com/blog/kategorien/kde/ Martin Graesslin's blog]</div>Beta990https://wiki.archlinux.org/index.php?title=NVIDIA&diff=412393NVIDIA2015-12-15T16:11:14Z<p>Beta990: /* Pure Video HD (VDPAU/VAAPI) */ As last item</p>
<hr />
<div>[[Category:Graphics]]<br />
[[Category:X server]]<br />
[[cs:NVIDIA]]<br />
[[de:Nvidia]]<br />
[[es:NVIDIA]]<br />
[[fa:اِنویدیا]]<br />
[[fr:Nvidia]]<br />
[[it:NVIDIA]]<br />
[[ja:NVIDIA]]<br />
[[nl:NVIDIA]]<br />
[[ru:NVIDIA]]<br />
[[tr:Nvidia]]<br />
[[zh-CN:NVIDIA]]<br />
{{Related articles start}}<br />
{{Related|Nouveau}}<br />
{{Related|Bumblebee}}<br />
{{Related|NVIDIA Optimus}}<br />
{{Related|Xorg}}<br />
{{Related articles end}}<br />
<br />
This article covers installing and configuring [http://www.nvidia.com NVIDIA]'s ''proprietary'' graphic card driver. For information about the open-source drivers, see [[Nouveau]]. If you have a laptop with hybrid Intel/NVIDIA graphics, see [[NVIDIA Optimus]] instead.<br />
<br />
== Installing ==<br />
<br />
{{Warning|Avoid installing the NVIDIA driver through the package provided from the NVIDIA website. Installation through [[pacman]] allows upgrading the driver together with the rest of the system.}}<br />
<br />
These instructions are for those using the stock {{Pkg|linux}} or {{Pkg|linux-lts}} packages. For custom kernel setup, skip to the [[#Alternate install: custom kernel|next]] subsection.<br />
<br />
1. If you do not know what graphics card you have, find out by issuing:<br />
:{{bc|<nowiki>$ lspci -k | grep -A 2 -E "(VGA|3D)"</nowiki>}}<br />
<br />
2. Determine the necessary driver version for your card by:<br />
:* finding the code name (e.g. NV50, NVC0, etc.) on [http://nouveau.freedesktop.org/wiki/CodeNames nouveau wiki's code names page]<br />
:* looking up the name in NVIDIA's [http://www.nvidia.com/object/IO_32667.html legacy card list]: if your card is not there you can use the latest driver<br />
:* visiting NVIDIA's [http://www.nvidia.com/Download/index.aspx driver download site]<br />
<br />
3. Install the appropriate driver for your card:<br />
:* For GeForce 400 series cards and newer [NVCx and newer], [[install]] the {{Pkg|nvidia}} or {{Pkg|nvidia-lts}} package along with {{Pkg|nvidia-libgl}}.<br />
:* For GeForce 8000/9000 and 100-300 series cards [NV5x, NV8x, NV9x and NVAx] from around 2006-2010, [[install]] the {{Pkg|nvidia-340xx}} or {{Pkg|nvidia-340xx-lts}} package along with {{Pkg|nvidia-340xx-libgl}}.<br />
:* For GeForce 6000/7000 series cards [NV4x and NV6x] from around 2004-2006, [[install]] the {{Pkg|nvidia-304xx}} or {{Pkg|nvidia-304xx-lts}} package along with {{Pkg|nvidia-304xx-libgl}}.<br />
<br />
:* For even older cards, have a look at [[#Unsupported drivers]].<br />
:* For the very latest GPU models, it may be required to [[install]] the {{AUR|nvidia-beta}} package, since the stable drivers may not support the newly introduced features.<br />
<br />
4. If you are on 64-bit and also need 32-bit OpenGL support, you must also install the equivalent ''lib32'' package from the [[multilib]] repository (e.g. {{Pkg|lib32-nvidia-libgl}}, {{Pkg|lib32-nvidia-340xx-libgl}} or {{Pkg|lib32-nvidia-304xx-libgl}}).<br />
<br />
5. Reboot. The {{Pkg|nvidia}} package contains a file which blacklists the ''nouveau'' module, so rebooting is necessary.<br />
<br />
Once the driver has been installed, continue to [[#Configuring]].<br />
<br />
=== Unsupported drivers ===<br />
<br />
If you have a GeForce 5 FX series card or older, Nvidia no longer supports drivers for your card. This means that these drivers [http://nvidia.custhelp.com/app/answers/detail/a_id/3142/ do not support the current Xorg version]. It thus might be easier if you use the [[nouveau]] driver, which supports the old cards with the current Xorg.<br />
<br />
However, Nvidia's legacy drivers are still available and might provide better 3D performance/stability if you are willing to downgrade Xorg:<br />
<br />
* For GeForce 5 FX series cards [NV30-NV36], install the {{AUR|nvidia-173xx-dkms}} package. Last supported Xorg version is 1.15.<br />
* For GeForce 2/3/4 MX/Ti series cards [NV11, NV17-NV28], install the {{AUR|nvidia-96xx-dkms}} package. Last supported Xorg version is 1.12.<br />
<br />
{{Tip|The legacy nvidia-96xx-dkms and nvidia-173xx-dkms drivers can also be installed from the unofficial [http://pkgbuild.com/~bgyorgy/city.html <nowiki>[city] repository</nowiki>]. (It is strongly advised that you do not skip any dependencies restriction when installing from here)}}<br />
<br />
=== Alternate install: custom kernel ===<br />
<br />
First of all, it is good to know how the ABS works by reading some of the other articles about it:<br />
<br />
* Main article for [[ABS]]<br />
* Article on [[makepkg]]<br />
* Article on [[Creating packages]]<br />
<br />
The following is a short tutorial for making a custom NVIDIA driver package using [[ABS]]:<br />
<br />
[[Install]] the {{Pkg|abs}} package and generate the tree with:<br />
# abs<br />
As a standard user, make a temporary directory for creating the new package:<br />
$ mkdir -p ~/abs<br />
Make a copy of the {{ic|nvidia}} package directory:<br />
$ cp -r /var/abs/extra/nvidia/ ~/abs/<br />
Go into the temporary {{ic|nvidia}} build directory:<br />
$ cd ~/abs/nvidia<br />
It is required to edit the files {{ic|nvidia.install}} and {{ic|PKGBUILD}} so that they contain the right kernel version variables.<br />
<br />
While running the custom kernel, get the appropriate kernel and local version names:<br />
$ uname -r<br />
# In nvidia.install, replace the {{ic|EXTRAMODULES<nowiki>=</nowiki>'extramodules-3.4-ARCH'}} variable with the custom kernel version, such as {{ic|EXTRAMODULES<nowiki>=</nowiki>'extramodules-3.4.4'}} or {{ic|EXTRAMODULES<nowiki>=</nowiki>'extramodules-3.4.4-custom'}} depending on what the kernel's version is and the local version's text/numbers. Do this for all instances of the version number within this file.<br />
# In PKGBUILD, change the {{ic|_extramodules<nowiki>=</nowiki>extramodules-3.4-ARCH}} variable to match the appropriate version, as above.<br />
# If there are multiple kernels installed in parallel (such as a custom kernel alongside the default -ARCH kernel), change the {{ic|pkgname<nowiki>=</nowiki>nvidia}} variable in the PKGBUILD to a unique identifier, such as nvidia-344 or nvidia-custom. This will allow both kernels to use the nvidia module, since the custom nvidia module has a different package name and will not overwrite the original. You will also need to comment the line in {{ic|package()}} that blacklists the nouveau module in {{ic|/usr/lib/modprobe.d/nvidia.conf}} (no need to do it again).<br />
<br />
Then do:<br />
$ makepkg -ci<br />
The {{ic|-c}} operand tells makepkg to clean left over files after building the package, whereas {{ic|-i}} specifies that makepkg should automatically run pacman to install the resulting package.<br />
<br />
==== Automatic re-compilation of the NVIDIA module with kernel update ====<br />
<br />
This is possible with the {{AUR|nvidia-hook}} package. You will need to install the module sources: {{Pkg|nvidia-dkms}}. In ''nvidia-hook'', the 'automatic re-compilation' functionality is done by a {{ic|nvidia}} hook on [[mkinitcpio]] after forcing to update the {{Pkg|linux-headers}} package. You will need to add {{ic|nvidia}} to the HOOKS array in {{ic|/etc/mkinitcpio.conf}}.<br />
<br />
The hook will call the ''dkms'' command to update the NVIDIA module for the version of your new kernel.<br />
<br />
{{Note|<br />
* If you are using this functionality it is '''important''' to look at the installation process of the {{Pkg|linux}} (or any other kernel) package. nvidia hook will tell you if anything goes wrong.<br />
* If you would like to do this manually please see [[Dynamic Kernel Module Support#Usage]].<br />
}}<br />
<br />
=== Pure Video HD (VDPAU/VAAPI) ===<br />
<br />
At least a video card with second generation [[wikipedia:Nvidia PureVideo#Table of GPUs containing a PureVideo SIP block|PureVideo HD]] is required to use [[VDPAU]] and [[VA-API]].<br />
<br />
== Configuring ==<br />
<br />
It is possible that after installing the driver it may not be needed to create an Xorg server configuration file. You can run [[Xorg#Running|a test]] to see if the Xorg server will function correctly without a configuration file. However, it may be required to create a configuration file (prefer {{ic|/etc/X11/xorg.conf.d/20-nvidia.conf}} over {{ic|/etc/X11/xorg.conf}}) in order to adjust various settings. This configuration can be generated by the NVIDIA Xorg configuration tool, or it can be created manually. If created manually, it can be a minimal configuration (in the sense that it will only pass the basic options to the [[Xorg]] server), or it can include a number of settings that can bypass Xorg's auto-discovered or pre-configured options.<br />
{{Note|Since 1.8.x Xorg uses separate configuration files in {{ic|/etc/X11/xorg.conf.d/}} - check out [[#Advanced: 20-nvidia.conf|advanced configuration]] section.}}<br />
<br />
=== Minimal configuration ===<br />
<br />
A basic configuration block in {{ic|20-nvidia.conf}} (or deprecated in {{ic|xorg.conf}}) would look like this:<br />
<br />
{{hc|/etc/X11/xorg.conf.d/20-nvidia.conf|<br />
Section "Device"<br />
Identifier "Nvidia Card"<br />
Driver "nvidia"<br />
VendorName "NVIDIA Corporation"<br />
Option "NoLogo" "true"<br />
#Option "UseEDID" "false"<br />
#Option "ConnectedMonitor" "DFP"<br />
# ...<br />
EndSection<br />
}}<br />
<br />
{{Tip|If upgrading from nouveau make sure to remove "{{ic|nouveau}}" from {{ic|/etc/mkinitcpio.conf}}. See [[#Switching between NVIDIA and nouveau drivers|Switching between NVIDIA and nouveau drivers]], if switching between the open and proprietary drivers often.}}<br />
<br />
=== Automatic configuration ===<br />
<br />
The NVIDIA package includes an automatic configuration tool to create an Xorg server configuration file ({{ic|xorg.conf}}) and can be run by:<br />
# nvidia-xconfig<br />
<br />
This command will auto-detect and create (or edit, if already present) the {{ic|/etc/X11/xorg.conf}} configuration according to present hardware.<br />
<br />
If there are instances of DRI, ensure they are commented out:<br />
# Load "dri"<br />
Double check your {{ic|/etc/X11/xorg.conf}} to make sure your default depth, horizontal sync, vertical refresh, and resolutions are acceptable.<br />
<br />
{{Warning|That may still not work properly with Xorg-server 1.8 }}<br />
<br />
=== Multiple monitors ===<br />
<br />
:''See [[Multihead]] for more general information''<br />
<br />
==== Using NVIDIA Settings ====<br />
<br />
You can use the {{ic|nvidia-settings}} tool provided by {{Pkg|nvidia-utils}} to configure your multi-monitor setup. With this method, you will use the proprietary software NVIDIA provides with their drivers. Simply run {{ic|nvidia-settings}} as root, then configure as you wish, and then save the configuration to {{ic|/etc/X11/xorg.conf.d/10-monitor.conf}}.<br />
<br />
==== ConnectedMonitor ====<br />
<br />
If the driver does not properly detect a second monitor, you can force it to do so with ConnectedMonitor. <br />
<br />
{{hc|/etc/X11/xorg.conf|<br />
<br />
Section "Monitor"<br />
Identifier "Monitor1"<br />
VendorName "Panasonic"<br />
ModelName "Panasonic MICRON 2100Ex"<br />
HorizSync 30.0 - 121.0 # this monitor has incorrect EDID, hence Option "UseEDIDFreqs" "false"<br />
VertRefresh 50.0 - 160.0<br />
Option "DPMS"<br />
EndSection<br />
<br />
Section "Monitor"<br />
Identifier "Monitor2"<br />
VendorName "Gateway"<br />
ModelName "GatewayVX1120"<br />
HorizSync 30.0 - 121.0<br />
VertRefresh 50.0 - 160.0<br />
Option "DPMS"<br />
EndSection<br />
<br />
Section "Device"<br />
Identifier "Device1"<br />
Driver "nvidia"<br />
Option "NoLogo"<br />
Option "UseEDIDFreqs" "false"<br />
Option "ConnectedMonitor" "CRT,CRT"<br />
VendorName "NVIDIA Corporation"<br />
BoardName "GeForce 6200 LE"<br />
BusID "PCI:3:0:0"<br />
Screen 0<br />
EndSection<br />
<br />
Section "Device"<br />
Identifier "Device2"<br />
Driver "nvidia"<br />
Option "NoLogo"<br />
Option "UseEDIDFreqs" "false"<br />
Option "ConnectedMonitor" "CRT,CRT"<br />
VendorName "NVIDIA Corporation"<br />
BoardName "GeForce 6200 LE"<br />
BusID "PCI:3:0:0"<br />
Screen 1<br />
EndSection<br />
<br />
}}<br />
<br />
The duplicated device with {{ic|Screen}} is how you get X to use two monitors on one card without {{ic|TwinView}}. Note that {{ic|nvidia-settings}} will strip out any {{ic|ConnectedMonitor}} options you have added.<br />
<br />
==== TwinView ====<br />
<br />
You want only one big screen instead of two. Set the {{ic|TwinView}} argument to {{ic|1}}. This option should be used if you desire compositing. TwinView only works on a per card basis, when all participating monitors are connected to the same card.<br />
Option "TwinView" "1"<br />
<br />
Example configuration:<br />
{{hc|/etc/X11/xorg.conf.d/10-monitor.conf|<br />
Section "ServerLayout"<br />
Identifier "TwinLayout"<br />
Screen 0 "metaScreen" 0 0<br />
EndSection<br />
<br />
Section "Monitor"<br />
Identifier "Monitor0"<br />
Option "Enable" "true"<br />
EndSection<br />
<br />
Section "Monitor"<br />
Identifier "Monitor1"<br />
Option "Enable" "true"<br />
EndSection<br />
<br />
Section "Device"<br />
Identifier "Card0"<br />
Driver "nvidia"<br />
VendorName "NVIDIA Corporation"<br />
<br />
#refer to the link below for more information on each of the following options.<br />
Option "HorizSync" "DFP-0: 28-33; DFP-1 28-33"<br />
Option "VertRefresh" "DFP-0: 43-73; DFP-1 43-73"<br />
Option "MetaModes" "1920x1080, 1920x1080"<br />
Option "ConnectedMonitor" "DFP-0, DFP-1"<br />
Option "MetaModeOrientation" "DFP-1 LeftOf DFP-0"<br />
EndSection<br />
<br />
Section "Screen"<br />
Identifier "metaScreen"<br />
Device "Card0"<br />
Monitor "Monitor0"<br />
DefaultDepth 24<br />
Option "TwinView" "True"<br />
SubSection "Display"<br />
Modes "1920x1080"<br />
EndSubSection<br />
EndSection<br />
}}<br />
<br />
[ftp://download.nvidia.com/XFree86/Linux-x86/355.11/README/configtwinview.html Device option information].<br />
<br />
If you have multiple cards that are SLI capable, it is possible to run more than one monitor attached to separate cards (for example: two cards in SLI with one monitor attached to each). The "MetaModes" option in conjunction with SLI Mosaic mode enables this. Below is a configuration which works for the aforementioned example and runs [[GNOME]] flawlessly.<br />
{{hc|/etc/X11/xorg.conf.d/10-monitor.conf|<br />
Section "Device"<br />
Identifier "Card A"<br />
Driver "nvidia"<br />
BusID "PCI:1:00:0"<br />
EndSection<br />
<br />
Section "Device"<br />
Identifier "Card B"<br />
Driver "nvidia"<br />
BusID "PCI:2:00:0"<br />
EndSection<br />
<br />
Section "Monitor"<br />
Identifier "Right Monitor"<br />
EndSection<br />
<br />
Section "Monitor"<br />
Identifier "Left Monitor"<br />
EndSection<br />
<br />
Section "Screen"<br />
Identifier "Right Screen"<br />
Device "Card A"<br />
Monitor "Right Monitor"<br />
DefaultDepth 24<br />
Option "SLI" "Mosaic"<br />
Option "Stereo" "0"<br />
Option "BaseMosaic" "True"<br />
Option "MetaModes" "GPU-0.DFP-0: 1920x1200+4480+0, GPU-1.DFP-0:1920x1200+0+0"<br />
SubSection "Display"<br />
Depth 24<br />
EndSubSection<br />
EndSection<br />
<br />
Section "Screen"<br />
Identifier "Left Screen"<br />
Device "Card B"<br />
Monitor "Left Monitor"<br />
DefaultDepth 24<br />
Option "SLI" "Mosaic"<br />
Option "Stereo" "0"<br />
Option "BaseMosaic" "True"<br />
Option "MetaModes" "GPU-0.DFP-0: 1920x1200+4480+0, GPU-1.DFP-0:1920x1200+0+0"<br />
SubSection "Display"<br />
Depth 24<br />
EndSubSection<br />
EndSection<br />
<br />
Section "ServerLayout"<br />
Identifier "Default"<br />
Screen 0 "Right Screen" 0 0<br />
Option "Xinerama" "0"<br />
EndSection}}<br />
<br />
===== Manual CLI configuration with xrandr =====<br />
{{Accuracy|Do these commands set up the monitors in ''TwinView'' mode?}}<br />
<br />
If the latest solutions do not work for you, you can use your window manager's ''autostart'' implementation with {{Pkg|xorg-xrandr}}.<br />
<br />
Some {{ic|xrandr}} examples could be:<br />
<br />
xrandr --output DVI-I-0 --auto --primary --left-of DVI-I-1<br />
<br />
or:<br />
<br />
xrandr --output DVI-I-1 --pos 1440x0 --mode 1440x900 --rate 75.0<br />
<br />
When:<br />
<br />
* {{ic|--output}} is used to indicate the "monitor" to which the options are set.<br />
* {{ic|DVI-I-1}} is the name of the second monitor.<br />
* {{ic|--pos}} is the position of the second monitor relative to the first.<br />
* {{ic|--mode}} is the resolution of the second monitor.<br />
* {{ic|--rate}} is the refresh rate (in Hz).<br />
<br />
==== Mosaic mode ====<br />
<br />
Mosaic mode is the only way to use more than 2 monitors across multiple graphics cards with compositing. Your window manager may or may not recognize the distinction between each monitor.<br />
<br />
===== Base Mosaic =====<br />
<br />
Base Mosaic mode works on any set of Geforce 8000 series or higher GPUs. It cannot be enabled from within the nvidia-setting GUI. You must either use the {{ic|nvidia-xconfig}} command line program or edit {{ic|xorg.conf}} by hand. Metamodes must be specified. The following is an example for four DFPs in a 2x2 configuration, each running at 1920x1024, with two DFPs connected to two cards:<br />
$ nvidia-xconfig --base-mosaic --metamodes="GPU-0.DFP-0: 1920x1024+0+0, GPU-0.DFP-1: 1920x1024+1920+0, GPU-1.DFP-0: 1920x1024+0+1024, GPU-1.DFP-1: 1920x1024+1920+1024"<br />
<br />
{{Note|While the documentation lists a 2x2 configuration of monitors, Nvidia has reduced that ability to just 3 monitors in Base Mosaic mode as of driver version 304. More monitors are available with a Quadro card, but with standard consumer cards, it is limited to three. The explanation given for this reduction is "Feature parity with the Windows driver". As of September 2014, Windows has no restriction on the number of monitors, even on the same driver version. This is not a bug, this is entirely by design.}}<br />
<br />
===== SLI Mosaic =====<br />
<br />
If you have an SLI configuration and each GPU is a Quadro FX 5800, Quadro Fermi or newer then you can use SLI Mosaic mode. It can be enabled from within the nvidia-settings GUI or from the command line with:<br />
$ nvidia-xconfig --sli=Mosaic --metamodes="GPU-0.DFP-0: 1920x1024+0+0, GPU-0.DFP-1: 1920x1024+1920+0, GPU-1.DFP-0: 1920x1024+0+1024, GPU-1.DFP-1: 1920x1024+1920+1024"<br />
<br />
=== Driver Persistence ===<br />
<br />
Since version 319, Nvidia has changed the way driver persistence works, it now has a daemon that is to be run at boot. See the [http://docs.nvidia.com/deploy/driver-persistence/index.html Driver Persistence] section of the Nvidia documentation for more details.<br />
<br />
To start the persistence daemon at boot, [[enable]] the {{ic|nvidia-persistenced.service}}. For manual usage see the [http://docs.nvidia.com/deploy/driver-persistence/index.html#usage upstream documentation].<br />
<br />
== Tweaking ==<br />
<br />
=== GUI: nvidia-settings ===<br />
<br />
The NVIDIA package includes the {{ic|nvidia-settings}} program that allows adjustment of several additional settings.<br />
<br />
For the settings to be loaded on login, run this command from the terminal:<br />
$ nvidia-settings --load-config-only<br />
<br />
The desktop environment's auto-startup method 'may' not work for loading nvidia-settings properly (KDE). To be sure that settings are really loaded put the command in ~/.xinitrc file (create if not present).<br />
<br />
{{Tip|On rare occasions the {{ic|~/.nvidia-settings-rc}} may become corrupt. If this happens, the Xorg server may crash and the file will have to be deleted to fix the problem.}}<br />
<br />
=== Advanced: 20-nvidia.conf ===<br />
<br />
Edit {{ic|/etc/X11/xorg.conf.d/20-nvidia.conf}}, and add the option to the correct section. The Xorg server will need to be restarted before any changes are applied.<br />
<br />
See [ftp://download.nvidia.com/XFree86/Linux-x86/355.11/README/README.txt NVIDIA Accelerated Linux Graphics Driver README and Installation Guide] for additional details and options.<br />
<br />
==== Disabling the logo on startup ====<br />
<br />
Add the {{ic|"NoLogo"}} option under section {{ic|Device}}:<br />
Option "NoLogo" "1"<br />
<br />
==== Overriding monitor detection ====<br />
<br />
The {{ic|"ConnectedMonitor"}} option under section {{ic|Device}} allows to override monitor detection when X server starts, which may save a significant amount of time at start up. The available options are: {{ic|"CRT"}} for analog connections, {{ic|"DFP"}} for digital monitors and {{ic|"TV"}} for televisions.<br />
<br />
The following statement forces the NVIDIA driver to bypass startup checks and recognize the monitor as DFP:<br />
Option "ConnectedMonitor" "DFP"<br />
{{Note| Use "CRT" for all analog 15 pin VGA connections, even if the display is a flat panel. "DFP" is intended for DVI, HDMI, or DisplayPort digital connections only.}}<br />
<br />
==== Enabling brightness control ====<br />
<br />
Add under section {{ic|Device}}:<br />
Option "RegistryDwords" "EnableBrightnessControl=1"<br />
<br />
If brightness control still does not work with this option, try installing {{AUR|nvidia-bl}} or {{AUR|nvidiabl}}.<br />
<br />
==== Enabling SLI ====<br />
<br />
{{Warning|As of May 7, 2011, you may experience sluggish video performance in GNOME 3 after enabling SLI.}}<br />
<br />
Taken from the NVIDIA driver's [ftp://download.nvidia.com/XFree86/Linux-x86/355.11/README/xconfigoptions.html README] Appendix B: ''This option controls the configuration of SLI rendering in supported configurations.'' A "supported configuration" is a computer equipped with an SLI-Certified Motherboard and 2 or 3 SLI-Certified GeForce GPUs. See NVIDIA's [http://www.slizone.com/page/home.html SLI Zone] for more information.<br />
<br />
Find the first GPU's PCI Bus ID using {{ic|lspci}}:<br />
{{hc|<nowiki>$ lspci | grep VGA</nowiki>|<br />
03:00.0 VGA compatible controller: nVidia Corporation G92 [GeForce 8800 GTS 512] (rev a2)<br />
05:00.0 VGA compatible controller: nVidia Corporation G92 [GeForce 8800 GTS 512] (rev a2)<br />
}}<br />
<br />
Add the BusID (3 in the previous example) under section {{ic|Device}}:<br />
BusID "PCI:3:0:0"<br />
<br />
{{Note|The format is important. The BusID value must be specified as {{ic|"PCI:<BusID>:0:0"}}}}<br />
<br />
Add the desired SLI rendering mode value under section {{ic|Screen}}:<br />
Option "SLI" "AA"<br />
<br />
The following table presents the available rendering modes.<br />
<br />
{| class="wikitable"<br />
! Value !! Behavior<br />
|-<br />
| 0, no, off, false, Single || Use only a single GPU when rendering.<br />
|-<br />
| 1, yes, on, true, Auto || Enable SLI and allow the driver to automatically select the appropriate rendering mode.<br />
|-<br />
| AFR || Enable SLI and use the alternate frame rendering mode.<br />
|-<br />
| SFR || Enable SLI and use the split frame rendering mode.<br />
|-<br />
| AA || Enable SLI and use SLI antialiasing. Use this in conjunction with full scene antialiasing to improve visual quality.<br />
|}<br />
<br />
Alternatively, you can use the {{ic|nvidia-xconfig}} utility to insert these changes into {{ic|xorg.conf}} with a single command:<br />
# nvidia-xconfig --busid=PCI:3:0:0 --sli=AA<br />
<br />
To verify that SLI mode is enabled from a shell:<br />
{{hc|<nowiki>$ nvidia-settings -q all | grep SLIMode</nowiki>|<br />
Attribute 'SLIMode' (arch:0.0): AA <br />
'SLIMode' is a string attribute.<br />
'SLIMode' is a read-only attribute.<br />
'SLIMode' can use the following target types: X Screen.<br />
}}<br />
<br />
{{Warning| After enabling SLI, your system may become frozen/non-responsive upon starting xorg. It is advisable that you disable your display manager before restarting.}}<br />
<br />
==== Enabling overclocking ====<br />
<br />
{{Warning|Please note that overclocking may damage hardware and that no responsibility may be placed on the authors of this page due to any damage to any information technology equipment from operating products out of specifications set by the manufacturer.}}<br />
<br />
Overclocking is controlled via ''Coolbits'' option in the {{ic|Device}} section, which enables various unsupported features:<br />
Option "Coolbits" "''value''"<br />
<br />
{{Tip|The ''Coolbits'' option can be easily controlled with the ''nvidia-xconfig'', which manipulates the Xorg configuration files: {{bc|1=# nvidia-xconfig --cool-bits=''value''}}}}<br />
<br />
The ''Coolbits'' value is the sum of its component bits in the binary numeral system. The component bits are:<br />
<br />
* {{ic|1}} (bit 0) - Enables overclocking of older (pre-Fermi) cores on the ''Clock Frequencies'' page in ''nvidia-settings''.<br />
* {{ic|2}} (bit 1) - When this bit is set, the driver will "attempt to initialize SLI when using GPUs with different amounts of video memory".<br />
* {{ic|4}} (bit 2) - Enables manual configuration of GPU fan speed on the ''Thermal Monitor'' page in ''nvidia-settings''.<br />
* {{ic|8}} (bit 3) - Enables overclocking on the ''PowerMizer'' page in ''nvidia-settings''. Available since version 337.12 for the Fermi architecture and newer.[http://www.phoronix.com/scan.php?px=MTY1OTM&page=news_item]<br />
* {{ic|16}} (bit 4) - Enables overvoltage using ''nvidia-settings'' CLI options. Available since version 346.16 for the Fermi architecture and newer.[http://www.phoronix.com/scan.php?page=news_item&px=MTg0MDI]<br />
<br />
To enable multiple features, add the ''Coolbits'' values together. For example, to enable overclocking and overvoltage of Fermi cores, set {{ic|Option "Coolbits" "24"}}.<br />
<br />
The documentation of ''Coolbits'' can be found in {{ic|/usr/share/doc/nvidia/html/xconfigoptions.html}}. Driver version 346.16 documentation on ''Coolbits'' can be found online [ftp://download.nvidia.com/XFree86/Linux-x86/355.11/README/xconfigoptions.html here].<br />
<br />
{{Note|An alternative is to edit and reflash the GPU BIOS either under DOS (preferred), or within a Win32 environment by way of [http://www.mvktech.net/component/option,com_remository/Itemid,26/func,select/id,127/orderby,2/page,1/ nvflash]{{Dead link|2013|05|25}} and [http://www.mvktech.net/component/option,com_remository/Itemid,26/func,select/id,135/orderby,2/page,1/ NiBiTor 6.0]{{Dead link|2013|05|25}}. The advantage of BIOS flashing is that not only can voltage limits be raised, but stability is generally improved over software overclocking methods such as Coolbits. [http://ivanvojtko.blogspot.sk/2014/03/how-to-overclock-geforce-460gtx-fermi.html Fermi BIOS modification tutorial]}}<br />
<br />
===== Setting static 2D/3D clocks =====<br />
<br />
Set the following string in the {{ic|Device}} section to enable PowerMizer at its maximum performance level (VSync will not work without this line):<br />
Option "RegistryDwords" "PerfLevelSrc=0x2222"<br />
<br />
== Tips and tricks ==<br />
<br />
=== Fixing terminal resolution ===<br />
Transitioning from nouveau may cause your startup terminal to display at a lower resolution. For GRUB, see [[GRUB/Tips and tricks#Setting the framebuffer resolution]] for details.<br />
<br />
=== Avoid screen tearing in KDE (KWin) ===<br />
<br />
{{hc|/etc/profile.d/kwin.sh|<nowiki><br />
export __GL_YIELD="USLEEP"<br />
</nowiki>}}<br />
<br />
Also if the above does not help, then try this:<br />
{{hc|/etc/profile.d/kwin.sh|<nowiki><br />
export KWIN_TRIPLE_BUFFER=1<br />
</nowiki>}}<br />
<br />
Do not have both of the above enabled at the same time.<br />
Also if you enable triple buffering make sure to enable TripleBuffering for the driver itself.<br />
Source: https://bugs.kde.org/show_bug.cgi?id=322060<br />
<br />
=== Hardware accelerated video decoding with XvMC ===<br />
<br />
Accelerated decoding of MPEG-1 and MPEG-2 videos via [[XvMC]] are supported on GeForce4, GeForce 5 FX, GeForce 6 and GeForce 7 series cards. To use it, create a new file {{ic|/etc/X11/XvMCConfig}} with the following content:<br />
libXvMCNVIDIA_dynamic.so.1<br />
<br />
See how to configure [[XvMC#Supported software|supported software]].<br />
<br />
=== Using TV-out ===<br />
<br />
A good article on the subject can be found [http://en.wikibooks.org/wiki/NVidia/TV-OUT here].<br />
<br />
=== X with a TV (DFP) as the only display ===<br />
<br />
The X server falls back to CRT-0 if no monitor is automatically detected. This can be a problem when using a DVI connected TV as the main display, and X is started while the TV is turned off or otherwise disconnected.<br />
<br />
To force NVIDIA to use DFP, store a copy of the EDID somewhere in the filesystem so that X can parse the file instead of reading EDID from the TV/DFP.<br />
<br />
To acquire the EDID, start nvidia-settings. It will show some information in tree format, ignore the rest of the settings for now and select the GPU (the corresponding entry should be titled "GPU-0" or similar), click the {{ic|DFP}} section (again, {{ic|DFP-0}} or similar), click on the {{ic|Acquire Edid}} Button and store it somewhere, for example, {{ic|/etc/X11/dfp0.edid}}.<br />
<br />
If in the front-end mouse and keyboard are not attached, the EDID can be acquired using only the command line. Run an X server with enough verbosity to print out the EDID block:<br />
$ startx -- -logverbose 6<br />
After the X Server has finished initializing, close it and your log file will probably be in {{ic|/var/log/Xorg.0.log}}. Extract the EDID block using nvidia-xconfig:<br />
$ nvidia-xconfig --extract-edids-from-file=/var/log/Xorg.0.log --extract-edids-output-file=/etc/X11/dfp0.bin<br />
<br />
Edit {{ic|xorg.conf}} by adding to the {{ic|Device}} section:<br />
Option "ConnectedMonitor" "DFP"<br />
Option "CustomEDID" "DFP-0:/etc/X11/dfp0.edid"<br />
The {{ic|ConnectedMonitor}} option forces the driver to recognize the DFP as if it were connected. The {{ic|CustomEDID}} provides EDID data for the device, meaning that it will start up just as if the TV/DFP was connected during X the process.<br />
<br />
This way, one can automatically start a display manager at boot time and still have a working and properly configured X screen by the time the TV gets powered on.<br />
<br />
If the above changes did not work, in the {{ic|xorg.conf}} under {{ic|Device}} section you can try to remove the {{ic|Option "ConnectedMonitor" "DFP"}} and add the following lines:<br />
Option "ModeValidation" "NoDFPNativeResolutionCheck"<br />
Option "ConnectedMonitor" "DFP-0"<br />
<br />
The {{ic|NoDFPNativeResolutionCheck}} prevents NVIDIA driver from disabling all the modes that do not fit in the native resolution.<br />
<br />
=== Check the power source ===<br />
<br />
The NVIDIA X.org driver can also be used to detect the GPU's current source of power. To see the current power source, check the 'GPUPowerSource' read-only parameter (0 - AC, 1 - battery):<br />
<br />
{{hc|$ nvidia-settings -q GPUPowerSource -t|1}}<br />
<br />
=== Listening to ACPI events ===<br />
<br />
NVIDIA drivers automatically try to connect to the [[acpid]] daemon and listen to ACPI events such as battery power, docking, some hotkeys, etc. If connection fails, X.org will output the following warning:<br />
<br />
{{hc|~/.local/share/xorg/Xorg.0.log|<br />
NVIDIA(0): ACPI: failed to connect to the ACPI event daemon; the daemon<br />
NVIDIA(0): may not be running or the "AcpidSocketPath" X<br />
NVIDIA(0): configuration option may not be set correctly. When the<br />
NVIDIA(0): ACPI event daemon is available, the NVIDIA X driver will<br />
NVIDIA(0): try to use it to receive ACPI event notifications. For<br />
NVIDIA(0): details, please see the "ConnectToAcpid" and<br />
NVIDIA(0): "AcpidSocketPath" X configuration options in Appendix B: X<br />
NVIDIA(0): Config Options in the README.<br />
}}<br />
<br />
While completely harmless, you may get rid of this message by disabling the {{ic|ConnectToAcpid}} option in your {{ic|/etc/X11/xorg.conf.d/20-nvidia.conf}}:<br />
<br />
Section "Device"<br />
...<br />
Driver "nvidia"<br />
Option "ConnectToAcpid" "0"<br />
...<br />
EndSection<br />
<br />
If you are on laptop, it might be a good idea to install and enable the [[acpid]] daemon instead.<br />
<br />
=== Displaying GPU temperature in the shell ===<br />
<br />
==== Method 1 - nvidia-settings ====<br />
<br />
{{Note|This method requires that you are using X. Use Method 2 or Method 3 if you are not. Also note that Method 3 currently does not not work with newer NVIDIA cards such as GeForce 200 series cards as well as embedded GPUs such as the Zotac IONITX's 8800GS.}}<br />
<br />
To display the GPU temp in the shell, use {{ic|nvidia-settings}} as follows:<br />
$ nvidia-settings -q gpucoretemp<br />
<br />
This will output something similar to the following:<br />
Attribute 'GPUCoreTemp' (hostname:0.0): 41.<br />
'GPUCoreTemp' is an integer attribute.<br />
'GPUCoreTemp' is a read-only attribute.<br />
'GPUCoreTemp' can use the following target types: X Screen, GPU.<br />
<br />
The GPU temps of this board is 41 C.<br />
<br />
In order to get just the temperature for use in utils such as {{ic|rrdtool}} or {{ic|conky}}, among others:<br />
{{hc|$ nvidia-settings -q gpucoretemp -t|41}}<br />
<br />
==== Method 2 - nvidia-smi ====<br />
<br />
Use nvidia-smi which can read temps directly from the GPU without the need to use X at all. This is important for a small group of users who do not have X running on their boxes, perhaps because the box is headless running server apps. <br />
To display the GPU temperature in the shell, use nvidia-smi as follows:<br />
<br />
$ nvidia-smi<br />
<br />
This should output something similar to the following:<br />
{{hc|$ nvidia-smi|<nowiki><br />
Fri Jan 6 18:53:54 2012 <br />
+------------------------------------------------------+ <br />
| NVIDIA-SMI 2.290.10 Driver Version: 290.10 | <br />
|-------------------------------+----------------------+----------------------+<br />
| Nb. Name | Bus Id Disp. | Volatile ECC SB / DB |<br />
| Fan Temp Power Usage /Cap | Memory Usage | GPU Util. Compute M. |<br />
|===============================+======================+======================|<br />
| 0. GeForce 8500 GT | 0000:01:00.0 N/A | N/A N/A |<br />
| 30% 62 C N/A N/A / N/A | 17% 42MB / 255MB | N/A Default |<br />
|-------------------------------+----------------------+----------------------|<br />
| Compute processes: GPU Memory |<br />
| GPU PID Process name Usage |<br />
|=============================================================================|<br />
| 0. ERROR: Not Supported |<br />
+-----------------------------------------------------------------------------+<br />
</nowiki>}}<br />
<br />
Only for temperature:<br />
{{hc|$ nvidia-smi -q -d TEMPERATURE|<nowiki><br />
<br />
==============NVSMI LOG==============<br />
<br />
Timestamp : Sun Apr 12 08:49:10 2015<br />
Driver Version : 346.59<br />
<br />
Attached GPUs : 1<br />
GPU 0000:01:00.0<br />
Temperature<br />
GPU Current Temp : 52 C<br />
GPU Shutdown Temp : N/A<br />
GPU Slowdown Temp : N/A<br />
<br />
</nowiki>}}<br />
<br />
In order to get just the temperature for use in utils such as rrdtool or conky, among others:<br />
<br />
{{hc|<nowiki>$ nvidia-smi --query-gpu=temperature.gpu --format=csv,noheader,nounits</nowiki>|52}}<br />
<br />
Reference: http://www.question-defense.com/2010/03/22/gpu-linux-shell-temp-get-nvidia-gpu-temperatures-via-linux-cli.<br />
<br />
==== Method 3 - nvclock ====<br />
<br />
Use {{AUR|nvclock}} which is available from the [[AUR]].<br />
{{Note|{{ic|nvclock}} cannot access thermal sensors on newer NVIDIA cards such as Geforce 200 series cards.}}<br />
<br />
There can be significant differences between the temperatures reported by nvclock and nvidia-settings/nv-control. According to [http://sourceforge.net/projects/nvclock/forums/forum/67426/topic/1906899 this post] by the author (thunderbird) of nvclock, the nvclock values should be more accurate.<br />
<br />
=== Set fan speed at login ===<br />
<br />
{{Poor writing|Refer to [[#Enabling overclocking]] for description of ''Coolbits''.}}<br />
<br />
You can adjust the fan speed on your graphics card with ''nvidia-settings''' console interface. First ensure that your Xorg configuration sets the Coolbits option to {{ic|4}}, {{ic|5}} or {{ic|12}} for fermi and above in your {{ic|Device}} section to enable fan control.<br />
<br />
Option "Coolbits" "4"<br />
<br />
{{Note|GeForce 400/500 series cards cannot currently set fan speeds at login using this method. This method only allows for the setting of fan speeds within the current X session by way of nvidia-settings.}}<br />
<br />
Place the following line in your [[xinitrc]] file to adjust the fan when you launch Xorg. Replace {{ic|''n''}} with the fan speed percentage you want to set.<br />
<br />
nvidia-settings -a "[gpu:0]/GPUFanControlState=1" -a "[fan:0]/GPUCurrentFanSpeed=''n''"<br />
<br />
You can also configure a second GPU by incrementing the GPU and fan number.<br />
<br />
nvidia-settings -a "[gpu:0]/GPUFanControlState=1" -a "[fan:0]/GPUCurrentFanSpeed=''n''" \<br />
-a "[gpu:1]/GPUFanControlState=1" -a [fan:1]/GPUCurrentFanSpeed=''n''" &<br />
<br />
If you use a login manager such as GDM or KDM, you can create a desktop entry file to process this setting. Create {{ic|~/.config/autostart/nvidia-fan-speed.desktop}} and place this text inside it. Again, change {{ic|''n''}} to the speed percentage you want.<br />
<br />
[Desktop Entry]<br />
Type=Application<br />
Exec=nvidia-settings -a "[gpu:0]/GPUFanControlState=1" -a "[fan:0]/GPUCurrentFanSpeed=''n''"<br />
X-GNOME-Autostart-enabled=true<br />
Name=nvidia-fan-speed<br />
<br />
{{Note|Since the drivers version 349.16, {{ic|GPUCurrentFanSpeed}} has to be replaced with {{ic|GPUTargetFanSpeed}}.[https://devtalk.nvidia.com/default/topic/821563/linux/can-t-control-fan-speed-with-beta-driver-349-12/post/4526208/#4526208]}}<br />
<br />
=== Order of install/deinstall for changing drivers ===<br />
<br />
{{Expansion|Not clear what this does}}<br />
<br />
Where the old driver is nvidiaO and the new driver is nvidiaN.<br />
<br />
*remove nvidiaO<br />
*install nvidia-libglN<br />
*install nvidiaN<br />
*install lib32-nvidia-libgl-N (if required)<br />
<br />
=== Switching between NVIDIA and nouveau drivers ===<br />
<br />
If you need to switch between drivers, you may use the following script, run as root (say yes to all confirmations):<br />
<br />
{{bc|1=<nowiki><br />
#!/bin/bash<br />
BRANCH= # Enter a branch if needed, i.e. -340xx or -304xx<br />
NVIDIA=nvidia${BRANCH} # If no branch entered above this would be "nvidia"<br />
NOUVEAU=xf86-video-nouveau<br />
<br />
# Replace -R with -Rs to if you want to remove the unneeded dependencies<br />
if [ $(pacman -Qqs ^mesa-libgl$) ]; then<br />
pacman -S $NVIDIA ${NVIDIA}-libgl # Add lib32-${NVIDIA}-libgl and ${NVIDIA}-lts if needed<br />
# pacman -R $NOUVEAU<br />
elif [ $(pacman -Qqs ^${NVIDIA}$) ]; then<br />
pacman -S --needed $NOUVEAU mesa-libgl # Add lib32-mesa-libgl if needed<br />
pacman -R $NVIDIA # Add ${NVIDIA}-lts if needed<br />
fi<br />
</nowiki>}}<br />
<br />
=== Avoid tearing with GeForce 500/600/700/900 series cards ===<br />
<br />
Tearing can be avoided by forcing a full composition pipeline, regardless of the compositor you are using. To test whether this option will work, type<br />
nvidia-settings --assign CurrentMetaMode="nvidia-auto-select +0+0 { ForceFullCompositionPipeline = On }"<br />
It has been reported to reduce the performance of some OpenGL applications, though.<br />
<br />
In order to make the change permanent, you need to add the following line to the {{ic|"Screen"}} section of your Xorg configuration file, for example {{ic|/etc/X11/xorg.conf.d/20-nvidia.conf}}:<br />
Option "metamodes" "nvidia-auto-select +0+0 { ForceFullCompositionPipeline = On }"<br />
<br />
If you do not have an Xorg configuration file, you can create one for your present hardware using {{ic|nvidia-xconfig}} (see [[#Automatic configuration]]) and move it from {{ic|/etc/X11/xorg.conf}} to the preferred location {{ic|/etc/X11/xorg.conf.d/20-nvidia.conf}}.<br />
<br />
== Troubleshooting ==<br />
<br />
=== Gaming using TwinView ===<br />
<br />
In case you want to play fullscreen games when using TwinView, you will notice that games recognize the two screens as being one big screen. While this is technically correct (the virtual X screen really is the size of your screens combined), you probably do not want to play on both screens at the same time. <br />
<br />
To correct this behavior for SDL, try:<br />
export SDL_VIDEO_FULLSCREEN_HEAD=1<br />
<br />
For OpenGL, add the appropriate Metamodes to your xorg.conf in section {{ic|Device}} and restart X:<br />
Option "Metamodes" "1680x1050,1680x1050; 1280x1024,1280x1024; 1680x1050,NULL; 1280x1024,NULL;"<br />
<br />
Another method that may either work alone or in conjunction with those mentioned above is [[Gaming#Starting_games_in_a_separate_X_server|starting games in a separate X server]].<br />
<br />
=== Vertical sync using TwinView ===<br />
<br />
If you are using TwinView and vertical sync (the "Sync to VBlank" option in '''nvidia-settings'''), you will notice that only one screen is being properly synced, unless you have two identical monitors. Although '''nvidia-settings''' does offer an option to change which screen is being synced (the "Sync to this display device" option), this does not always work. A solution is to add the following environment variables at startup, for example append in {{ic|/etc/profile}}:<br />
<br />
export __GL_SYNC_TO_VBLANK=1<br />
export __GL_SYNC_DISPLAY_DEVICE=DFP-0<br />
export __VDPAU_NVIDIA_SYNC_DISPLAY_DEVICE=DFP-0<br />
<br />
You can change {{ic|DFP-0}} with your preferred screen ({{ic|DFP-0}} is the DVI port and {{ic|CRT-0}} is the VGA port). You can find the identifier for your display from '''nvidia-settings''' in the "X Server XVideoSettings" section.<br />
<br />
=== Wayland (gdm) crashes after nvidia-libgl installation ===<br />
<br />
On some Intel CPUs outdated microcode causes instability with Wayland when nvidia are installed, causing gdm to crash.<br />
<br />
[[Microcode#Enabling Intel microcode updates|Updating the microcode]] should solve this problem.<br />
<br />
=== Corrupted screen: "Six screens" Problem ===<br />
<br />
For some users, using GeForce GT 100M's, the screen gets corrupted after X starts, divided into 6 sections with a resolution limited to 640x480.<br />
The same problem has been recently reported with Quadro 2000 and hi-res displays.<br />
<br />
To solve this problem, enable the Validation Mode {{ic|NoTotalSizeCheck}} in section {{ic|Device}}:<br />
Section "Device"<br />
...<br />
Option "ModeValidation" "NoTotalSizeCheck"<br />
...<br />
EndSection<br />
<br />
=== '/dev/nvidia0' input/output error ===<br />
<br />
{{Accuracy|Verify that the BIOS related suggestions work and are not coincidentally set while troubleshooting.|section='/dev/nvidia0' Input/Output error... suggested fixes}}<br />
This error can occur for several different reasons, and the most common solution given for this error is to check for group/file permissions, which in almost every case is ''not'' the problem. The NVIDIA documentation does not talk in detail on what you should<br />
do to correct this problem but there are a few things that have worked for some people. The problem can be a IRQ conflict with another device or bad routing by either the kernel or your BIOS.<br />
<br />
First thing to try is to remove other video devices such as video capture cards and see if the problem goes away. If there are too many video processors on the same system it can lead into the kernel being unable to start them because of memory allocation problems with the video controller. In particular on systems with low video memory this can occur even if there is only one video processor. In such case you should find out the amount of your system's video memory (e.g. with {{ic|lspci -v}}) and pass allocation parameters to the kernel, e.g. for a 32-bit kernel:<br />
vmalloc=384M<br />
<br />
If running a 64bit kernel, a driver defect can cause the NVIDIA module to fail initializing when IOMMU is on. Turning it off in the BIOS has been confirmed to work for some users. [http://www.nvnews.net/vbulletin/showthread.php?s=68bb2fabadcb53b10b286aa42d13c5bc&t=159335][[User:Clickthem#nvidia module]]<br />
<br />
Another thing to try is to change your BIOS IRQ routing from {{ic|Operating system controlled}} to {{ic|BIOS controlled}} or the other way around. The first one can be passed as a kernel parameter:<br />
PCI=biosirq<br />
<br />
The {{ic|noacpi}} kernel parameter has also been suggested as a solution but since it disables ACPI completely it should be used with caution. Some hardware are easily damaged by overheating.<br />
<br />
{{Note|The kernel parameters can be passed either through the kernel command line or the bootloader configuration file. See your bootloader Wiki page for more information.}}<br />
<br />
=== '/dev/nvidiactl' errors ===<br />
<br />
Trying to start an OpenGL application might result in errors such as:<br />
Error: Could not open /dev/nvidiactl because the permissions are too<br />
restrictive. Please see the {{ic|FREQUENTLY ASKED QUESTIONS}} <br />
section of {{ic|/usr/share/doc/NVIDIA_GLX-1.0/README}} <br />
for steps to correct.<br />
<br />
Solve by adding the appropriate user to the {{ic|video}} group and log in again:<br />
# gpasswd -a username video<br />
<br />
=== 32-bit applications do not start ===<br />
<br />
Under 64-bit systems, installing {{ic|lib32-nvidia-libgl}} that corresponds to the same version installed for the 64-bit driver fixes the problem.<br />
<br />
=== Errors after updating the kernel ===<br />
<br />
If a custom build of NVIDIA's module is used instead of the package from the ''extra'' repository, a recompile is required every time the kernel is updated. Rebooting is generally recommended after updating kernel and graphic drivers.<br />
<br />
=== Crashing in general ===<br />
<br />
* Try disabling {{ic|RenderAccel}} in xorg.conf.<br />
* If Xorg outputs an error about "conflicting memory type" or "failed to allocate primary buffer: out of memory", add {{ic|nopat}} at the end of the {{ic|kernel}} line in {{ic|/boot/grub/menu.lst}}.<br />
* If the NVIDIA compiler complains about different versions of GCC between the current one and the one used for compiling the kernel, add in {{ic|/etc/profile}}:<br />
export IGNORE_CC_MISMATCH=1<br />
* If Xorg is crashing with a "Signal 11" while using nvidia-96xx drivers, try disabling PAT. Pass the argument {{ic|nopat}} to [[kernel parameters]].<br />
More information about troubleshooting the driver can be found in the [https://forums.geforce.com/ NVIDIA forums.]<br />
<br />
=== Bad performance after installing a new driver version ===<br />
<br />
If FPS have dropped in comparison with older drivers, first check if direct rendering is turned on (glxinfo is included in {{Pkg|mesa-demos}}):<br />
$ glxinfo | grep direct<br />
If the command prints:<br />
direct rendering: No<br />
then that could be an indication for the sudden FPS drop.<br />
<br />
A possible solution could be to regress to the previously installed driver version and rebooting afterwards.<br />
<br />
=== CPU spikes with 400 series cards ===<br />
<br />
If you are experiencing intermittent CPU spikes with a 400 series card, it may be caused by PowerMizer constantly changing the GPU's clock frequency. Switching PowerMizer's setting from Adaptive to Performance, add the following to the {{ic|Device}} section of your Xorg configuration:<br />
<br />
Option "RegistryDwords" "PowerMizerEnable=0x1; PerfLevelSrc=0x3322; PowerMizerDefaultAC=0x1"<br />
<br />
=== Laptops: X hangs on login/out, worked around with Ctrl+Alt+Backspace ===<br />
<br />
If, while using the legacy NVIDIA drivers, Xorg hangs on login and logout (particularly with an odd screen split into two black and white/gray pieces), but logging in is still possible via {{ic|Ctrl+Alt+Backspace}} (or whatever the new "kill X" key binding is), try adding this in {{ic|/etc/modprobe.d/modprobe.conf}}:<br />
options nvidia NVreg_Mobile=1<br />
<br />
One user had luck with this instead, but it makes performance drop significantly for others:<br />
options nvidia NVreg_DeviceFileUID=0 NVreg_DeviceFileGID=33 NVreg_DeviceFileMode=0660 NVreg_SoftEDIDs=0 NVreg_Mobile=1<br />
<br />
Note that {{ic|NVreg_Mobile}} needs to be changed according to the laptop:<br />
* 1 for Dell laptops.<br />
* 2 for non-Compal Toshiba laptops.<br />
* 3 for other laptops.<br />
* 4 for Compal Toshiba laptops.<br />
* 5 for Gateway laptops.<br />
<br />
See [ftp://download.nvidia.com/XFree86/Linux-x86/355.11/README/README.txt NVIDIA Driver's README: Appendix K] for more information.<br />
<br />
=== No screens found on a laptop/NVIDIA Optimus ===<br />
<br />
On a laptop, if the NVIDIA driver cannot find any screens, you may have an NVIDIA Optimus setup : an Intel chipset connected to the screen and the video outputs, and a NVIDIA card that does all the hard work and writes to the chipset's video memory.<br />
<br />
Check if {{ic|<nowiki>$ lspci | grep VGA</nowiki>}}<br />
outputs something similar to:<br />
00:02.0 VGA compatible controller: Intel Corporation Core Processor Integrated Graphics Controller (rev 02)<br />
01:00.0 VGA compatible controller: nVidia Corporation Device 0df4 (rev a1)<br />
<br />
NVIDIA drivers now offer Optimus support since 319.12 Beta [[http://www.nvidia.com/object/linux-display-amd64-319.12-driver.html]] with kernels above and including 3.9.<br />
<br />
Another solution is to install the [[Intel]] driver to handle the screens, then if you want 3D software you should run them through [[Bumblebee]] to tell them to use the NVIDIA card.<br />
<br />
==== Possible Workaround ====<br />
<br />
Enter the BIOS and changed the default graphics setting from 'Optimus' to 'Discrete' and the install NVIDIA drivers (295.20-1 at time of writing) recognized the screens.<br />
<br />
Steps:<br />
# Enter BIOS.<br />
# Find Graphics Settings (should be in tab ''Config > Display'').<br />
# Change 'Graphics Device' to 'Discrete Graphics' (Disables Intel integrated graphics).<br />
# Change OS Detection for Nvidia Optimus to "Disabled".<br />
# Save and exit.<br />
<br />
Tested on a Lenovo W520 with a Quadro 1000M and Nvidia Optimus<br />
<br />
=== Screen(s) found, but none have a usable configuration ===<br />
<br />
Sometimes NVIDIA and X have trouble finding the active screen. If your graphics card has multiple outputs try plugging your monitor into the other ones. On a laptop it may be because your graphics card has vga/tv outs. Xorg.0.log will provide more info.<br />
<br />
Another thing to try is adding invalid {{ic|"ConnectedMonitor" Option}} to {{ic|Section "Device"}}<br />
to force Xorg throws error and shows you how correct it.<br />
[ftp://download.nvidia.com/XFree86/Linux-x86/355.11/README/xconfigoptions.html Here]<br />
more about ConnectedMonitor setting.<br />
<br />
After re-run X see Xorg.0.log to get valid CRT-x,DFP-x,TV-x values.<br />
<br />
{{ic|nvidia-xconfig --query-gpu-info}} could be helpful.<br />
<br />
=== Blackscreen at X startup with new driver ===<br />
<br />
If you have installed an update of Nvidia and you screen stay black after launching Xorg. You have to use the {{ic|<nowiki>rcutree.rcu_idle_gp_delay=1</nowiki>}} [[kernel parameter]].<br />
<br />
You can also try to add the {{ic|nvidia}} module directly to your [[mkinitcpio]] config file.<br />
<br />
If the screen still stays black with '''both''' the {{ic|<nowiki>rcutree.rcu_idle_gp_delay=1</nowiki>}} [[kernel parameter]] and the {{ic|nvidia}} module directly in the [[mkinitcpio]] config file, try re-installing {{Pkg|nvidia}} and {{Pkg|nvidia-libgl}} in that order, and finally reload the driver:<br />
<br />
# modprobe nvidia<br />
<br />
=== Backlight is not turning off in some occasions ===<br />
<br />
By default, DPMS should turn off backlight with the timeouts set or by running xset. However, probably due to a bug in the proprietary Nvidia drivers the result is a blank screen with no powersaving whatsoever. To workaround it, until the bug has been fixed you can use the {{ic|vbetool}} as root.<br />
<br />
Install the {{Pkg|vbetool}} package.<br />
<br />
Turn off your screen on demand and then by pressing a random key backlight turns on again:<br />
<br />
vbetool dpms off && read -n1; vbetool dpms on<br />
<br />
Alternatively, xrandr is able to disable and re-enable monitor outputs without requiring root.<br />
<br />
xrandr --output DP-1 --off; read -n1; xrandr --output DP-1 --auto<br />
<br />
=== Blue tint on videos with Flash ===<br />
<br />
A problem with {{Pkg|flashplugin}} versions 11.2.202.228-1 and 11.2.202.233-1 causes it to send the U/V panes in the incorrect order resulting in a blue tint on certain videos. There are a few potential fixes for this bug:<br />
<br />
# Install the latest {{Pkg|libvdpau}}.<br />
# Patch {{ic|vdpau_trace.so}} with [https://bbs.archlinux.org/viewtopic.php?pid=1078368#p1078368 this makepkg].<br />
# Right click on a video, select "Settings..." and uncheck "Enable hardware acceleration". Reload the page for it to take affect. Note that this disables GPU acceleration.<br />
# [[Downgrade]] the {{Pkg|flashplugin}} package to version 11.1.102.63-1 at most.<br />
# Use {{AUR|google-chrome}} with the new Pepper API {{AUR|chromium-pepper-flash}}.<br />
# Try one of the few Flash alternatives.<br />
<br />
The merits of each are discussed in [https://bbs.archlinux.org/viewtopic.php?id=137877 this thread].<br />
<br />
=== Bleeding overlay with Flash ===<br />
<br />
This bug is due to the incorrect colour key being used by the {{Pkg|flashplugin}} version 11.2.202.228-1 and causes the flash content to "leak" into other pages or solid black backgrounds. To avoid this problem simply install the latest {{Pkg|libvdpau}} or export {{ic|1=VDPAU_NVIDIA_NO_OVERLAY=1}} within either your shell profile (E.g. {{ic|~/.bash_profile}} or {{ic|~/.zprofile}}) or {{ic|~/.xinitrc}}<br />
<br />
=== Full system freeze using Flash ===<br />
<br />
If you experience occasional full system freezes (only the mouse is moving) using flashplugin<br />
and get:<br />
<br />
{{hc|/var/log/errors.log|<br />
NVRM: Xid (0000:01:00): 31, Ch 00000007, engmask 00000120, intr 10000000<br />
}}<br />
<br />
A possible workaround is to switch off Hardware Acceleration in Flash, setting<br />
<br />
{{hc|/etc/adobe/mms.cfg|2=<br />
EnableLinuxHWVideoDecode=0<br />
}}<br />
<br />
Or, if you want to keep Hardware acceleration enabled, you may try to::<br />
export VDPAU_NVIDIA_NO_OVERLAY=1<br />
<br />
...before starting the browser.<br />
Note that this may introduce tearing.<br />
<br />
=== Xorg fails to load or Red Screen of Death ===<br />
<br />
If you get a red screen and use GRUB disable the GRUB framebuffer by editing {{ic|/etc/default/grub}} and uncomment GRUB_TERMINAL_OUTPUT. For more information see [[GRUB/Tips and tricks#Disable framebuffer]].<br />
<br />
=== Black screen on systems with Intel integrated GPU ===<br />
<br />
If you have an Intel CPU with an integrated GPU (e.g. Intel HD 4000) and have installed the {{Pkg|nvidia}} package, you may experience a black screen on boot, when changing virtual terminal, or when exiting an X session. This may be caused by a conflict between the graphics modules. This is solved by blacklisting the Intel GPU modules. Create the file {{ic|/etc/modprobe.d/blacklist.conf}} and prevent the ''i915'' and ''intel_agp'' modules from loading on boot:<br />
<br />
{{hc|/etc/modprobe.d/blacklist.conf|<br />
install i915 /usr/bin/false<br />
install intel_agp /usr/bin/false<br />
}}<br />
<br />
=== Black screen on systems with VIA integrated GPU ===<br />
<br />
As above, blacklisting the ''viafb'' module may resolve conflicts with NVIDIA drivers:<br />
<br />
{{hc|/etc/modprobe.d/blacklist.conf|<br />
install viafb /usr/bin/false<br />
}}<br />
<br />
=== X fails with "no screens found" with Intel iGPU ===<br />
<br />
Like above, if you have an Intel CPU with an integrated GPU and X fails to start with <br />
<br />
[ 76.633] (EE) No devices detected.<br />
[ 76.633] Fatal server error:<br />
[ 76.633] no screens found<br />
<br />
then you need to add your discrete card's BusID to your X configuration. Find it:<br />
<br />
{{hc|<nowiki># lspci | grep VGA</nowiki>|<br />
00:02.0 VGA compatible controller: Intel Corporation Xeon E3-1200 v2/3rd Gen Core processor Graphics Controller (rev 09)<br />
01:00.0 VGA compatible controller: NVIDIA Corporation GK107 [GeForce GTX 650] (rev a1)<br />
}}<br />
<br />
then you fix it by adding it to the card's Device section in your X configuration. In my case:<br />
<br />
{{hc|/etc/X11/xorg.conf.d/10-nvidia.conf|<br />
Section "Device"<br />
Identifier "Device0"<br />
Driver "nvidia"<br />
VendorName "NVIDIA Corporation"<br />
BusID "PCI:1:0:0"<br />
EndSection<br />
}}<br />
<br />
Note how {{ic|01:00.0}} is written as {{ic|1:0:0}}.<br />
<br />
=== Xorg fails during boot, but otherwise starts fine ===<br />
<br />
On very fast booting systems, systemd may attempt to start the display manager before the NVIDIA driver has fully initialized. You will see a message like the following in your logs only when Xorg runs during boot.<br />
{{hc|/var/log/Xorg.0.log|output=<br />
[ 1.807] (EE) NVIDIA(0): Failed to initialize the NVIDIA kernel module. Please see the<br />
[ 1.807] (EE) NVIDIA(0): system's kernel log for additional error messages and<br />
[ 1.808] (EE) NVIDIA(0): consult the NVIDIA README for details.<br />
[ 1.808] (EE) NVIDIA(0): *** Aborting ***<br />
}}<br />
In this case you will need to establish an ordering dependency from the display manager to the DRI device. First create device units for DRI devices by creating a new udev rules file.<br />
{{hc|/etc/udev/rules.d/99-systemd-dri-devices.rules|output=<br />
ACTION=="add", KERNEL=="card*", SUBSYSTEM=="drm", TAG+="systemd"<br />
}}<br />
Then create dependencies from the display manager to the device(s).<br />
{{hc|/etc/systemd/system/display-manager.service.d/10-wait-for-dri-devices.conf|output=<br />
[Unit]<br />
Wants=dev-dri-card0.device<br />
After=dev-dri-card0.device<br />
}}<br />
If you have additional cards needed for the desktop then list them in Wants and After seperated by spaces.<br />
<br />
=== Flash video players crashes ===<br />
<br />
If you are getting frequent crashes of Flash video players, try to switch off Hardware Acceleration:<br />
<br />
{{hc|/etc/adobe/mms.cfg|2=<br />
EnableLinuxHWVideoDecode=0<br />
}}<br />
<br />
(This problem appeared after installing the proprietary nvidia driver, and was fixed by changing this setting.)<br />
<br />
=== Override EDID ===<br />
<br />
If your monitor is providing wrong EDID information, the nvidia-driver will pick a very small solution.<br />
Nvidia's driver options change, this guide refers to nvidia 346.47-11.<br />
<br />
Aside from manually setting modelines in the xorg config, you have to allow non-edid modes and disable edid in the device section:<br />
<br />
{{hc|/etc/X11/xorg.conf.d/10-monitor.conf|2=<br />
Section "Monitor"<br />
Identifier "Monitor0"<br />
VendorName "Unknown"<br />
ModelName "Unknown"<br />
HorizSync 30-94<br />
VertRefresh 56-76<br />
DisplaySize 518.4 324.0<br />
Option "DPMS"<br />
# 1920x1200 59.95 Hz (CVT 2.30MA-R) hsync: 74.04 kHz; pclk: 154.00 MHz<br />
Modeline "1920x1200R" 154.00 1920 1968 2000 2080 1200 1203 1209 1235 +hsync -vsync<br />
EndSection<br />
<br />
Section "Device"<br />
Identifier "Device0"<br />
Driver "nvidia"<br />
VendorName "NVIDIA Corporation"<br />
Option "UseEdidFreqs" "FALSE"<br />
Option "UseEDID" "FALSE"<br />
Option "ModeValidation" "AllowNonEdidModes"<br />
EndSection<br />
<br />
Section "Screen"<br />
Identifier "Screen0"<br />
Device "Device0"<br />
Monitor "Monitor0"<br />
DefaultDepth 24<br />
SubSection "Display"<br />
Depth 24<br />
Modes "1920x1200R"<br />
EndSubSection<br />
EndSection<br />
}}<br />
<br />
=== Fix rendering lag (firefox, gedit, vim, tmux …) ===<br />
nvidia-settings -a InitialPixmapPlacement=0<br />
<br />
https://bugzilla.gnome.org/show_bug.cgi?id=728464<br />
<br />
=== Screen Tearing with Multiple Monitor Orientations ===<br />
<br />
When running multiple monitors in different orientations (through [[Xrandr]] settings) such as portrait and landscape simultaneously, you may notice screen tearing in one of the orientations/monitors. Unfortunately, this issue is fixed by setting all monitors to the same orientation via [[Xrandr]] settings<br />
<br />
== See also ==<br />
<br />
* [https://forums.geforce.com/ NVIDIA User forums]<br />
* [ftp://download.nvidia.com/XFree86/Linux-x86/355.11/README/README.txt Official README for NVIDIA drivers, all on one text page. Most Recent Driver Version as of September 7, 2015: 355.11.]<br />
* [ftp://download.nvidia.com/XFree86/Linux-x86/355.11/README/xconfigoptions.html README Appendix B. X Config Options, 355.11 (direct link)]</div>Beta990https://wiki.archlinux.org/index.php?title=NVIDIA&diff=412392NVIDIA2015-12-15T16:10:47Z<p>Beta990: /* Pure Video HD (VDPAU/VAAPI) */ Move to below driver installation</p>
<hr />
<div>[[Category:Graphics]]<br />
[[Category:X server]]<br />
[[cs:NVIDIA]]<br />
[[de:Nvidia]]<br />
[[es:NVIDIA]]<br />
[[fa:اِنویدیا]]<br />
[[fr:Nvidia]]<br />
[[it:NVIDIA]]<br />
[[ja:NVIDIA]]<br />
[[nl:NVIDIA]]<br />
[[ru:NVIDIA]]<br />
[[tr:Nvidia]]<br />
[[zh-CN:NVIDIA]]<br />
{{Related articles start}}<br />
{{Related|Nouveau}}<br />
{{Related|Bumblebee}}<br />
{{Related|NVIDIA Optimus}}<br />
{{Related|Xorg}}<br />
{{Related articles end}}<br />
<br />
This article covers installing and configuring [http://www.nvidia.com NVIDIA]'s ''proprietary'' graphic card driver. For information about the open-source drivers, see [[Nouveau]]. If you have a laptop with hybrid Intel/NVIDIA graphics, see [[NVIDIA Optimus]] instead.<br />
<br />
== Installing ==<br />
<br />
{{Warning|Avoid installing the NVIDIA driver through the package provided from the NVIDIA website. Installation through [[pacman]] allows upgrading the driver together with the rest of the system.}}<br />
<br />
These instructions are for those using the stock {{Pkg|linux}} or {{Pkg|linux-lts}} packages. For custom kernel setup, skip to the [[#Alternate install: custom kernel|next]] subsection.<br />
<br />
1. If you do not know what graphics card you have, find out by issuing:<br />
:{{bc|<nowiki>$ lspci -k | grep -A 2 -E "(VGA|3D)"</nowiki>}}<br />
<br />
2. Determine the necessary driver version for your card by:<br />
:* finding the code name (e.g. NV50, NVC0, etc.) on [http://nouveau.freedesktop.org/wiki/CodeNames nouveau wiki's code names page]<br />
:* looking up the name in NVIDIA's [http://www.nvidia.com/object/IO_32667.html legacy card list]: if your card is not there you can use the latest driver<br />
:* visiting NVIDIA's [http://www.nvidia.com/Download/index.aspx driver download site]<br />
<br />
3. Install the appropriate driver for your card:<br />
:* For GeForce 400 series cards and newer [NVCx and newer], [[install]] the {{Pkg|nvidia}} or {{Pkg|nvidia-lts}} package along with {{Pkg|nvidia-libgl}}.<br />
:* For GeForce 8000/9000 and 100-300 series cards [NV5x, NV8x, NV9x and NVAx] from around 2006-2010, [[install]] the {{Pkg|nvidia-340xx}} or {{Pkg|nvidia-340xx-lts}} package along with {{Pkg|nvidia-340xx-libgl}}.<br />
:* For GeForce 6000/7000 series cards [NV4x and NV6x] from around 2004-2006, [[install]] the {{Pkg|nvidia-304xx}} or {{Pkg|nvidia-304xx-lts}} package along with {{Pkg|nvidia-304xx-libgl}}.<br />
<br />
:* For even older cards, have a look at [[#Unsupported drivers]].<br />
:* For the very latest GPU models, it may be required to [[install]] the {{AUR|nvidia-beta}} package, since the stable drivers may not support the newly introduced features.<br />
<br />
4. If you are on 64-bit and also need 32-bit OpenGL support, you must also install the equivalent ''lib32'' package from the [[multilib]] repository (e.g. {{Pkg|lib32-nvidia-libgl}}, {{Pkg|lib32-nvidia-340xx-libgl}} or {{Pkg|lib32-nvidia-304xx-libgl}}).<br />
<br />
5. Reboot. The {{Pkg|nvidia}} package contains a file which blacklists the ''nouveau'' module, so rebooting is necessary.<br />
<br />
Once the driver has been installed, continue to [[#Configuring]].<br />
<br />
=== Unsupported drivers ===<br />
<br />
If you have a GeForce 5 FX series card or older, Nvidia no longer supports drivers for your card. This means that these drivers [http://nvidia.custhelp.com/app/answers/detail/a_id/3142/ do not support the current Xorg version]. It thus might be easier if you use the [[nouveau]] driver, which supports the old cards with the current Xorg.<br />
<br />
However, Nvidia's legacy drivers are still available and might provide better 3D performance/stability if you are willing to downgrade Xorg:<br />
<br />
* For GeForce 5 FX series cards [NV30-NV36], install the {{AUR|nvidia-173xx-dkms}} package. Last supported Xorg version is 1.15.<br />
* For GeForce 2/3/4 MX/Ti series cards [NV11, NV17-NV28], install the {{AUR|nvidia-96xx-dkms}} package. Last supported Xorg version is 1.12.<br />
<br />
{{Tip|The legacy nvidia-96xx-dkms and nvidia-173xx-dkms drivers can also be installed from the unofficial [http://pkgbuild.com/~bgyorgy/city.html <nowiki>[city] repository</nowiki>]. (It is strongly advised that you do not skip any dependencies restriction when installing from here)}}<br />
<br />
=== Alternate install: custom kernel ===<br />
<br />
First of all, it is good to know how the ABS works by reading some of the other articles about it:<br />
<br />
* Main article for [[ABS]]<br />
* Article on [[makepkg]]<br />
* Article on [[Creating packages]]<br />
<br />
The following is a short tutorial for making a custom NVIDIA driver package using [[ABS]]:<br />
<br />
[[Install]] the {{Pkg|abs}} package and generate the tree with:<br />
# abs<br />
As a standard user, make a temporary directory for creating the new package:<br />
$ mkdir -p ~/abs<br />
Make a copy of the {{ic|nvidia}} package directory:<br />
$ cp -r /var/abs/extra/nvidia/ ~/abs/<br />
Go into the temporary {{ic|nvidia}} build directory:<br />
$ cd ~/abs/nvidia<br />
It is required to edit the files {{ic|nvidia.install}} and {{ic|PKGBUILD}} so that they contain the right kernel version variables.<br />
<br />
While running the custom kernel, get the appropriate kernel and local version names:<br />
$ uname -r<br />
# In nvidia.install, replace the {{ic|EXTRAMODULES<nowiki>=</nowiki>'extramodules-3.4-ARCH'}} variable with the custom kernel version, such as {{ic|EXTRAMODULES<nowiki>=</nowiki>'extramodules-3.4.4'}} or {{ic|EXTRAMODULES<nowiki>=</nowiki>'extramodules-3.4.4-custom'}} depending on what the kernel's version is and the local version's text/numbers. Do this for all instances of the version number within this file.<br />
# In PKGBUILD, change the {{ic|_extramodules<nowiki>=</nowiki>extramodules-3.4-ARCH}} variable to match the appropriate version, as above.<br />
# If there are multiple kernels installed in parallel (such as a custom kernel alongside the default -ARCH kernel), change the {{ic|pkgname<nowiki>=</nowiki>nvidia}} variable in the PKGBUILD to a unique identifier, such as nvidia-344 or nvidia-custom. This will allow both kernels to use the nvidia module, since the custom nvidia module has a different package name and will not overwrite the original. You will also need to comment the line in {{ic|package()}} that blacklists the nouveau module in {{ic|/usr/lib/modprobe.d/nvidia.conf}} (no need to do it again).<br />
<br />
Then do:<br />
$ makepkg -ci<br />
The {{ic|-c}} operand tells makepkg to clean left over files after building the package, whereas {{ic|-i}} specifies that makepkg should automatically run pacman to install the resulting package.<br />
<br />
==== Automatic re-compilation of the NVIDIA module with kernel update ====<br />
<br />
This is possible with the {{AUR|nvidia-hook}} package. You will need to install the module sources: {{Pkg|nvidia-dkms}}. In ''nvidia-hook'', the 'automatic re-compilation' functionality is done by a {{ic|nvidia}} hook on [[mkinitcpio]] after forcing to update the {{Pkg|linux-headers}} package. You will need to add {{ic|nvidia}} to the HOOKS array in {{ic|/etc/mkinitcpio.conf}}.<br />
<br />
The hook will call the ''dkms'' command to update the NVIDIA module for the version of your new kernel.<br />
<br />
{{Note|<br />
* If you are using this functionality it is '''important''' to look at the installation process of the {{Pkg|linux}} (or any other kernel) package. nvidia hook will tell you if anything goes wrong.<br />
* If you would like to do this manually please see [[Dynamic Kernel Module Support#Usage]].<br />
}}<br />
<br />
== Configuring ==<br />
<br />
It is possible that after installing the driver it may not be needed to create an Xorg server configuration file. You can run [[Xorg#Running|a test]] to see if the Xorg server will function correctly without a configuration file. However, it may be required to create a configuration file (prefer {{ic|/etc/X11/xorg.conf.d/20-nvidia.conf}} over {{ic|/etc/X11/xorg.conf}}) in order to adjust various settings. This configuration can be generated by the NVIDIA Xorg configuration tool, or it can be created manually. If created manually, it can be a minimal configuration (in the sense that it will only pass the basic options to the [[Xorg]] server), or it can include a number of settings that can bypass Xorg's auto-discovered or pre-configured options.<br />
{{Note|Since 1.8.x Xorg uses separate configuration files in {{ic|/etc/X11/xorg.conf.d/}} - check out [[#Advanced: 20-nvidia.conf|advanced configuration]] section.}}<br />
<br />
=== Minimal configuration ===<br />
<br />
A basic configuration block in {{ic|20-nvidia.conf}} (or deprecated in {{ic|xorg.conf}}) would look like this:<br />
<br />
{{hc|/etc/X11/xorg.conf.d/20-nvidia.conf|<br />
Section "Device"<br />
Identifier "Nvidia Card"<br />
Driver "nvidia"<br />
VendorName "NVIDIA Corporation"<br />
Option "NoLogo" "true"<br />
#Option "UseEDID" "false"<br />
#Option "ConnectedMonitor" "DFP"<br />
# ...<br />
EndSection<br />
}}<br />
<br />
{{Tip|If upgrading from nouveau make sure to remove "{{ic|nouveau}}" from {{ic|/etc/mkinitcpio.conf}}. See [[#Switching between NVIDIA and nouveau drivers|Switching between NVIDIA and nouveau drivers]], if switching between the open and proprietary drivers often.}}<br />
<br />
=== Automatic configuration ===<br />
<br />
The NVIDIA package includes an automatic configuration tool to create an Xorg server configuration file ({{ic|xorg.conf}}) and can be run by:<br />
# nvidia-xconfig<br />
<br />
This command will auto-detect and create (or edit, if already present) the {{ic|/etc/X11/xorg.conf}} configuration according to present hardware.<br />
<br />
If there are instances of DRI, ensure they are commented out:<br />
# Load "dri"<br />
Double check your {{ic|/etc/X11/xorg.conf}} to make sure your default depth, horizontal sync, vertical refresh, and resolutions are acceptable.<br />
<br />
{{Warning|That may still not work properly with Xorg-server 1.8 }}<br />
<br />
=== Multiple monitors ===<br />
<br />
:''See [[Multihead]] for more general information''<br />
<br />
==== Using NVIDIA Settings ====<br />
<br />
You can use the {{ic|nvidia-settings}} tool provided by {{Pkg|nvidia-utils}} to configure your multi-monitor setup. With this method, you will use the proprietary software NVIDIA provides with their drivers. Simply run {{ic|nvidia-settings}} as root, then configure as you wish, and then save the configuration to {{ic|/etc/X11/xorg.conf.d/10-monitor.conf}}.<br />
<br />
==== ConnectedMonitor ====<br />
<br />
If the driver does not properly detect a second monitor, you can force it to do so with ConnectedMonitor. <br />
<br />
{{hc|/etc/X11/xorg.conf|<br />
<br />
Section "Monitor"<br />
Identifier "Monitor1"<br />
VendorName "Panasonic"<br />
ModelName "Panasonic MICRON 2100Ex"<br />
HorizSync 30.0 - 121.0 # this monitor has incorrect EDID, hence Option "UseEDIDFreqs" "false"<br />
VertRefresh 50.0 - 160.0<br />
Option "DPMS"<br />
EndSection<br />
<br />
Section "Monitor"<br />
Identifier "Monitor2"<br />
VendorName "Gateway"<br />
ModelName "GatewayVX1120"<br />
HorizSync 30.0 - 121.0<br />
VertRefresh 50.0 - 160.0<br />
Option "DPMS"<br />
EndSection<br />
<br />
Section "Device"<br />
Identifier "Device1"<br />
Driver "nvidia"<br />
Option "NoLogo"<br />
Option "UseEDIDFreqs" "false"<br />
Option "ConnectedMonitor" "CRT,CRT"<br />
VendorName "NVIDIA Corporation"<br />
BoardName "GeForce 6200 LE"<br />
BusID "PCI:3:0:0"<br />
Screen 0<br />
EndSection<br />
<br />
Section "Device"<br />
Identifier "Device2"<br />
Driver "nvidia"<br />
Option "NoLogo"<br />
Option "UseEDIDFreqs" "false"<br />
Option "ConnectedMonitor" "CRT,CRT"<br />
VendorName "NVIDIA Corporation"<br />
BoardName "GeForce 6200 LE"<br />
BusID "PCI:3:0:0"<br />
Screen 1<br />
EndSection<br />
<br />
}}<br />
<br />
The duplicated device with {{ic|Screen}} is how you get X to use two monitors on one card without {{ic|TwinView}}. Note that {{ic|nvidia-settings}} will strip out any {{ic|ConnectedMonitor}} options you have added.<br />
<br />
==== TwinView ====<br />
<br />
You want only one big screen instead of two. Set the {{ic|TwinView}} argument to {{ic|1}}. This option should be used if you desire compositing. TwinView only works on a per card basis, when all participating monitors are connected to the same card.<br />
Option "TwinView" "1"<br />
<br />
Example configuration:<br />
{{hc|/etc/X11/xorg.conf.d/10-monitor.conf|<br />
Section "ServerLayout"<br />
Identifier "TwinLayout"<br />
Screen 0 "metaScreen" 0 0<br />
EndSection<br />
<br />
Section "Monitor"<br />
Identifier "Monitor0"<br />
Option "Enable" "true"<br />
EndSection<br />
<br />
Section "Monitor"<br />
Identifier "Monitor1"<br />
Option "Enable" "true"<br />
EndSection<br />
<br />
Section "Device"<br />
Identifier "Card0"<br />
Driver "nvidia"<br />
VendorName "NVIDIA Corporation"<br />
<br />
#refer to the link below for more information on each of the following options.<br />
Option "HorizSync" "DFP-0: 28-33; DFP-1 28-33"<br />
Option "VertRefresh" "DFP-0: 43-73; DFP-1 43-73"<br />
Option "MetaModes" "1920x1080, 1920x1080"<br />
Option "ConnectedMonitor" "DFP-0, DFP-1"<br />
Option "MetaModeOrientation" "DFP-1 LeftOf DFP-0"<br />
EndSection<br />
<br />
Section "Screen"<br />
Identifier "metaScreen"<br />
Device "Card0"<br />
Monitor "Monitor0"<br />
DefaultDepth 24<br />
Option "TwinView" "True"<br />
SubSection "Display"<br />
Modes "1920x1080"<br />
EndSubSection<br />
EndSection<br />
}}<br />
<br />
[ftp://download.nvidia.com/XFree86/Linux-x86/355.11/README/configtwinview.html Device option information].<br />
<br />
If you have multiple cards that are SLI capable, it is possible to run more than one monitor attached to separate cards (for example: two cards in SLI with one monitor attached to each). The "MetaModes" option in conjunction with SLI Mosaic mode enables this. Below is a configuration which works for the aforementioned example and runs [[GNOME]] flawlessly.<br />
{{hc|/etc/X11/xorg.conf.d/10-monitor.conf|<br />
Section "Device"<br />
Identifier "Card A"<br />
Driver "nvidia"<br />
BusID "PCI:1:00:0"<br />
EndSection<br />
<br />
Section "Device"<br />
Identifier "Card B"<br />
Driver "nvidia"<br />
BusID "PCI:2:00:0"<br />
EndSection<br />
<br />
Section "Monitor"<br />
Identifier "Right Monitor"<br />
EndSection<br />
<br />
Section "Monitor"<br />
Identifier "Left Monitor"<br />
EndSection<br />
<br />
Section "Screen"<br />
Identifier "Right Screen"<br />
Device "Card A"<br />
Monitor "Right Monitor"<br />
DefaultDepth 24<br />
Option "SLI" "Mosaic"<br />
Option "Stereo" "0"<br />
Option "BaseMosaic" "True"<br />
Option "MetaModes" "GPU-0.DFP-0: 1920x1200+4480+0, GPU-1.DFP-0:1920x1200+0+0"<br />
SubSection "Display"<br />
Depth 24<br />
EndSubSection<br />
EndSection<br />
<br />
Section "Screen"<br />
Identifier "Left Screen"<br />
Device "Card B"<br />
Monitor "Left Monitor"<br />
DefaultDepth 24<br />
Option "SLI" "Mosaic"<br />
Option "Stereo" "0"<br />
Option "BaseMosaic" "True"<br />
Option "MetaModes" "GPU-0.DFP-0: 1920x1200+4480+0, GPU-1.DFP-0:1920x1200+0+0"<br />
SubSection "Display"<br />
Depth 24<br />
EndSubSection<br />
EndSection<br />
<br />
Section "ServerLayout"<br />
Identifier "Default"<br />
Screen 0 "Right Screen" 0 0<br />
Option "Xinerama" "0"<br />
EndSection}}<br />
<br />
===== Manual CLI configuration with xrandr =====<br />
{{Accuracy|Do these commands set up the monitors in ''TwinView'' mode?}}<br />
<br />
If the latest solutions do not work for you, you can use your window manager's ''autostart'' implementation with {{Pkg|xorg-xrandr}}.<br />
<br />
Some {{ic|xrandr}} examples could be:<br />
<br />
xrandr --output DVI-I-0 --auto --primary --left-of DVI-I-1<br />
<br />
or:<br />
<br />
xrandr --output DVI-I-1 --pos 1440x0 --mode 1440x900 --rate 75.0<br />
<br />
When:<br />
<br />
* {{ic|--output}} is used to indicate the "monitor" to which the options are set.<br />
* {{ic|DVI-I-1}} is the name of the second monitor.<br />
* {{ic|--pos}} is the position of the second monitor relative to the first.<br />
* {{ic|--mode}} is the resolution of the second monitor.<br />
* {{ic|--rate}} is the refresh rate (in Hz).<br />
<br />
==== Mosaic mode ====<br />
<br />
Mosaic mode is the only way to use more than 2 monitors across multiple graphics cards with compositing. Your window manager may or may not recognize the distinction between each monitor.<br />
<br />
===== Base Mosaic =====<br />
<br />
Base Mosaic mode works on any set of Geforce 8000 series or higher GPUs. It cannot be enabled from within the nvidia-setting GUI. You must either use the {{ic|nvidia-xconfig}} command line program or edit {{ic|xorg.conf}} by hand. Metamodes must be specified. The following is an example for four DFPs in a 2x2 configuration, each running at 1920x1024, with two DFPs connected to two cards:<br />
$ nvidia-xconfig --base-mosaic --metamodes="GPU-0.DFP-0: 1920x1024+0+0, GPU-0.DFP-1: 1920x1024+1920+0, GPU-1.DFP-0: 1920x1024+0+1024, GPU-1.DFP-1: 1920x1024+1920+1024"<br />
<br />
{{Note|While the documentation lists a 2x2 configuration of monitors, Nvidia has reduced that ability to just 3 monitors in Base Mosaic mode as of driver version 304. More monitors are available with a Quadro card, but with standard consumer cards, it is limited to three. The explanation given for this reduction is "Feature parity with the Windows driver". As of September 2014, Windows has no restriction on the number of monitors, even on the same driver version. This is not a bug, this is entirely by design.}}<br />
<br />
===== SLI Mosaic =====<br />
<br />
If you have an SLI configuration and each GPU is a Quadro FX 5800, Quadro Fermi or newer then you can use SLI Mosaic mode. It can be enabled from within the nvidia-settings GUI or from the command line with:<br />
$ nvidia-xconfig --sli=Mosaic --metamodes="GPU-0.DFP-0: 1920x1024+0+0, GPU-0.DFP-1: 1920x1024+1920+0, GPU-1.DFP-0: 1920x1024+0+1024, GPU-1.DFP-1: 1920x1024+1920+1024"<br />
<br />
=== Driver Persistence ===<br />
<br />
Since version 319, Nvidia has changed the way driver persistence works, it now has a daemon that is to be run at boot. See the [http://docs.nvidia.com/deploy/driver-persistence/index.html Driver Persistence] section of the Nvidia documentation for more details.<br />
<br />
To start the persistence daemon at boot, [[enable]] the {{ic|nvidia-persistenced.service}}. For manual usage see the [http://docs.nvidia.com/deploy/driver-persistence/index.html#usage upstream documentation].<br />
<br />
== Tweaking ==<br />
<br />
=== GUI: nvidia-settings ===<br />
<br />
The NVIDIA package includes the {{ic|nvidia-settings}} program that allows adjustment of several additional settings.<br />
<br />
For the settings to be loaded on login, run this command from the terminal:<br />
$ nvidia-settings --load-config-only<br />
<br />
The desktop environment's auto-startup method 'may' not work for loading nvidia-settings properly (KDE). To be sure that settings are really loaded put the command in ~/.xinitrc file (create if not present).<br />
<br />
{{Tip|On rare occasions the {{ic|~/.nvidia-settings-rc}} may become corrupt. If this happens, the Xorg server may crash and the file will have to be deleted to fix the problem.}}<br />
<br />
=== Advanced: 20-nvidia.conf ===<br />
<br />
Edit {{ic|/etc/X11/xorg.conf.d/20-nvidia.conf}}, and add the option to the correct section. The Xorg server will need to be restarted before any changes are applied.<br />
<br />
See [ftp://download.nvidia.com/XFree86/Linux-x86/355.11/README/README.txt NVIDIA Accelerated Linux Graphics Driver README and Installation Guide] for additional details and options.<br />
<br />
==== Disabling the logo on startup ====<br />
<br />
Add the {{ic|"NoLogo"}} option under section {{ic|Device}}:<br />
Option "NoLogo" "1"<br />
<br />
==== Overriding monitor detection ====<br />
<br />
The {{ic|"ConnectedMonitor"}} option under section {{ic|Device}} allows to override monitor detection when X server starts, which may save a significant amount of time at start up. The available options are: {{ic|"CRT"}} for analog connections, {{ic|"DFP"}} for digital monitors and {{ic|"TV"}} for televisions.<br />
<br />
The following statement forces the NVIDIA driver to bypass startup checks and recognize the monitor as DFP:<br />
Option "ConnectedMonitor" "DFP"<br />
{{Note| Use "CRT" for all analog 15 pin VGA connections, even if the display is a flat panel. "DFP" is intended for DVI, HDMI, or DisplayPort digital connections only.}}<br />
<br />
==== Enabling brightness control ====<br />
<br />
Add under section {{ic|Device}}:<br />
Option "RegistryDwords" "EnableBrightnessControl=1"<br />
<br />
If brightness control still does not work with this option, try installing {{AUR|nvidia-bl}} or {{AUR|nvidiabl}}.<br />
<br />
==== Enabling SLI ====<br />
<br />
{{Warning|As of May 7, 2011, you may experience sluggish video performance in GNOME 3 after enabling SLI.}}<br />
<br />
Taken from the NVIDIA driver's [ftp://download.nvidia.com/XFree86/Linux-x86/355.11/README/xconfigoptions.html README] Appendix B: ''This option controls the configuration of SLI rendering in supported configurations.'' A "supported configuration" is a computer equipped with an SLI-Certified Motherboard and 2 or 3 SLI-Certified GeForce GPUs. See NVIDIA's [http://www.slizone.com/page/home.html SLI Zone] for more information.<br />
<br />
Find the first GPU's PCI Bus ID using {{ic|lspci}}:<br />
{{hc|<nowiki>$ lspci | grep VGA</nowiki>|<br />
03:00.0 VGA compatible controller: nVidia Corporation G92 [GeForce 8800 GTS 512] (rev a2)<br />
05:00.0 VGA compatible controller: nVidia Corporation G92 [GeForce 8800 GTS 512] (rev a2)<br />
}}<br />
<br />
Add the BusID (3 in the previous example) under section {{ic|Device}}:<br />
BusID "PCI:3:0:0"<br />
<br />
{{Note|The format is important. The BusID value must be specified as {{ic|"PCI:<BusID>:0:0"}}}}<br />
<br />
Add the desired SLI rendering mode value under section {{ic|Screen}}:<br />
Option "SLI" "AA"<br />
<br />
The following table presents the available rendering modes.<br />
<br />
{| class="wikitable"<br />
! Value !! Behavior<br />
|-<br />
| 0, no, off, false, Single || Use only a single GPU when rendering.<br />
|-<br />
| 1, yes, on, true, Auto || Enable SLI and allow the driver to automatically select the appropriate rendering mode.<br />
|-<br />
| AFR || Enable SLI and use the alternate frame rendering mode.<br />
|-<br />
| SFR || Enable SLI and use the split frame rendering mode.<br />
|-<br />
| AA || Enable SLI and use SLI antialiasing. Use this in conjunction with full scene antialiasing to improve visual quality.<br />
|}<br />
<br />
Alternatively, you can use the {{ic|nvidia-xconfig}} utility to insert these changes into {{ic|xorg.conf}} with a single command:<br />
# nvidia-xconfig --busid=PCI:3:0:0 --sli=AA<br />
<br />
To verify that SLI mode is enabled from a shell:<br />
{{hc|<nowiki>$ nvidia-settings -q all | grep SLIMode</nowiki>|<br />
Attribute 'SLIMode' (arch:0.0): AA <br />
'SLIMode' is a string attribute.<br />
'SLIMode' is a read-only attribute.<br />
'SLIMode' can use the following target types: X Screen.<br />
}}<br />
<br />
{{Warning| After enabling SLI, your system may become frozen/non-responsive upon starting xorg. It is advisable that you disable your display manager before restarting.}}<br />
<br />
==== Enabling overclocking ====<br />
<br />
{{Warning|Please note that overclocking may damage hardware and that no responsibility may be placed on the authors of this page due to any damage to any information technology equipment from operating products out of specifications set by the manufacturer.}}<br />
<br />
Overclocking is controlled via ''Coolbits'' option in the {{ic|Device}} section, which enables various unsupported features:<br />
Option "Coolbits" "''value''"<br />
<br />
{{Tip|The ''Coolbits'' option can be easily controlled with the ''nvidia-xconfig'', which manipulates the Xorg configuration files: {{bc|1=# nvidia-xconfig --cool-bits=''value''}}}}<br />
<br />
The ''Coolbits'' value is the sum of its component bits in the binary numeral system. The component bits are:<br />
<br />
* {{ic|1}} (bit 0) - Enables overclocking of older (pre-Fermi) cores on the ''Clock Frequencies'' page in ''nvidia-settings''.<br />
* {{ic|2}} (bit 1) - When this bit is set, the driver will "attempt to initialize SLI when using GPUs with different amounts of video memory".<br />
* {{ic|4}} (bit 2) - Enables manual configuration of GPU fan speed on the ''Thermal Monitor'' page in ''nvidia-settings''.<br />
* {{ic|8}} (bit 3) - Enables overclocking on the ''PowerMizer'' page in ''nvidia-settings''. Available since version 337.12 for the Fermi architecture and newer.[http://www.phoronix.com/scan.php?px=MTY1OTM&page=news_item]<br />
* {{ic|16}} (bit 4) - Enables overvoltage using ''nvidia-settings'' CLI options. Available since version 346.16 for the Fermi architecture and newer.[http://www.phoronix.com/scan.php?page=news_item&px=MTg0MDI]<br />
<br />
To enable multiple features, add the ''Coolbits'' values together. For example, to enable overclocking and overvoltage of Fermi cores, set {{ic|Option "Coolbits" "24"}}.<br />
<br />
The documentation of ''Coolbits'' can be found in {{ic|/usr/share/doc/nvidia/html/xconfigoptions.html}}. Driver version 346.16 documentation on ''Coolbits'' can be found online [ftp://download.nvidia.com/XFree86/Linux-x86/355.11/README/xconfigoptions.html here].<br />
<br />
{{Note|An alternative is to edit and reflash the GPU BIOS either under DOS (preferred), or within a Win32 environment by way of [http://www.mvktech.net/component/option,com_remository/Itemid,26/func,select/id,127/orderby,2/page,1/ nvflash]{{Dead link|2013|05|25}} and [http://www.mvktech.net/component/option,com_remository/Itemid,26/func,select/id,135/orderby,2/page,1/ NiBiTor 6.0]{{Dead link|2013|05|25}}. The advantage of BIOS flashing is that not only can voltage limits be raised, but stability is generally improved over software overclocking methods such as Coolbits. [http://ivanvojtko.blogspot.sk/2014/03/how-to-overclock-geforce-460gtx-fermi.html Fermi BIOS modification tutorial]}}<br />
<br />
===== Setting static 2D/3D clocks =====<br />
<br />
Set the following string in the {{ic|Device}} section to enable PowerMizer at its maximum performance level (VSync will not work without this line):<br />
Option "RegistryDwords" "PerfLevelSrc=0x2222"<br />
<br />
== Tips and tricks ==<br />
<br />
=== Fixing terminal resolution ===<br />
Transitioning from nouveau may cause your startup terminal to display at a lower resolution. For GRUB, see [[GRUB/Tips and tricks#Setting the framebuffer resolution]] for details.<br />
<br />
=== Avoid screen tearing in KDE (KWin) ===<br />
<br />
{{hc|/etc/profile.d/kwin.sh|<nowiki><br />
export __GL_YIELD="USLEEP"<br />
</nowiki>}}<br />
<br />
Also if the above does not help, then try this:<br />
{{hc|/etc/profile.d/kwin.sh|<nowiki><br />
export KWIN_TRIPLE_BUFFER=1<br />
</nowiki>}}<br />
<br />
Do not have both of the above enabled at the same time.<br />
Also if you enable triple buffering make sure to enable TripleBuffering for the driver itself.<br />
Source: https://bugs.kde.org/show_bug.cgi?id=322060<br />
<br />
=== Hardware accelerated video decoding with XvMC ===<br />
<br />
Accelerated decoding of MPEG-1 and MPEG-2 videos via [[XvMC]] are supported on GeForce4, GeForce 5 FX, GeForce 6 and GeForce 7 series cards. To use it, create a new file {{ic|/etc/X11/XvMCConfig}} with the following content:<br />
libXvMCNVIDIA_dynamic.so.1<br />
<br />
See how to configure [[XvMC#Supported software|supported software]].<br />
<br />
=== Using TV-out ===<br />
<br />
A good article on the subject can be found [http://en.wikibooks.org/wiki/NVidia/TV-OUT here].<br />
<br />
=== X with a TV (DFP) as the only display ===<br />
<br />
The X server falls back to CRT-0 if no monitor is automatically detected. This can be a problem when using a DVI connected TV as the main display, and X is started while the TV is turned off or otherwise disconnected.<br />
<br />
To force NVIDIA to use DFP, store a copy of the EDID somewhere in the filesystem so that X can parse the file instead of reading EDID from the TV/DFP.<br />
<br />
To acquire the EDID, start nvidia-settings. It will show some information in tree format, ignore the rest of the settings for now and select the GPU (the corresponding entry should be titled "GPU-0" or similar), click the {{ic|DFP}} section (again, {{ic|DFP-0}} or similar), click on the {{ic|Acquire Edid}} Button and store it somewhere, for example, {{ic|/etc/X11/dfp0.edid}}.<br />
<br />
If in the front-end mouse and keyboard are not attached, the EDID can be acquired using only the command line. Run an X server with enough verbosity to print out the EDID block:<br />
$ startx -- -logverbose 6<br />
After the X Server has finished initializing, close it and your log file will probably be in {{ic|/var/log/Xorg.0.log}}. Extract the EDID block using nvidia-xconfig:<br />
$ nvidia-xconfig --extract-edids-from-file=/var/log/Xorg.0.log --extract-edids-output-file=/etc/X11/dfp0.bin<br />
<br />
Edit {{ic|xorg.conf}} by adding to the {{ic|Device}} section:<br />
Option "ConnectedMonitor" "DFP"<br />
Option "CustomEDID" "DFP-0:/etc/X11/dfp0.edid"<br />
The {{ic|ConnectedMonitor}} option forces the driver to recognize the DFP as if it were connected. The {{ic|CustomEDID}} provides EDID data for the device, meaning that it will start up just as if the TV/DFP was connected during X the process.<br />
<br />
This way, one can automatically start a display manager at boot time and still have a working and properly configured X screen by the time the TV gets powered on.<br />
<br />
If the above changes did not work, in the {{ic|xorg.conf}} under {{ic|Device}} section you can try to remove the {{ic|Option "ConnectedMonitor" "DFP"}} and add the following lines:<br />
Option "ModeValidation" "NoDFPNativeResolutionCheck"<br />
Option "ConnectedMonitor" "DFP-0"<br />
<br />
The {{ic|NoDFPNativeResolutionCheck}} prevents NVIDIA driver from disabling all the modes that do not fit in the native resolution.<br />
<br />
=== Check the power source ===<br />
<br />
The NVIDIA X.org driver can also be used to detect the GPU's current source of power. To see the current power source, check the 'GPUPowerSource' read-only parameter (0 - AC, 1 - battery):<br />
<br />
{{hc|$ nvidia-settings -q GPUPowerSource -t|1}}<br />
<br />
=== Listening to ACPI events ===<br />
<br />
NVIDIA drivers automatically try to connect to the [[acpid]] daemon and listen to ACPI events such as battery power, docking, some hotkeys, etc. If connection fails, X.org will output the following warning:<br />
<br />
{{hc|~/.local/share/xorg/Xorg.0.log|<br />
NVIDIA(0): ACPI: failed to connect to the ACPI event daemon; the daemon<br />
NVIDIA(0): may not be running or the "AcpidSocketPath" X<br />
NVIDIA(0): configuration option may not be set correctly. When the<br />
NVIDIA(0): ACPI event daemon is available, the NVIDIA X driver will<br />
NVIDIA(0): try to use it to receive ACPI event notifications. For<br />
NVIDIA(0): details, please see the "ConnectToAcpid" and<br />
NVIDIA(0): "AcpidSocketPath" X configuration options in Appendix B: X<br />
NVIDIA(0): Config Options in the README.<br />
}}<br />
<br />
While completely harmless, you may get rid of this message by disabling the {{ic|ConnectToAcpid}} option in your {{ic|/etc/X11/xorg.conf.d/20-nvidia.conf}}:<br />
<br />
Section "Device"<br />
...<br />
Driver "nvidia"<br />
Option "ConnectToAcpid" "0"<br />
...<br />
EndSection<br />
<br />
If you are on laptop, it might be a good idea to install and enable the [[acpid]] daemon instead.<br />
<br />
=== Displaying GPU temperature in the shell ===<br />
<br />
==== Method 1 - nvidia-settings ====<br />
<br />
{{Note|This method requires that you are using X. Use Method 2 or Method 3 if you are not. Also note that Method 3 currently does not not work with newer NVIDIA cards such as GeForce 200 series cards as well as embedded GPUs such as the Zotac IONITX's 8800GS.}}<br />
<br />
To display the GPU temp in the shell, use {{ic|nvidia-settings}} as follows:<br />
$ nvidia-settings -q gpucoretemp<br />
<br />
This will output something similar to the following:<br />
Attribute 'GPUCoreTemp' (hostname:0.0): 41.<br />
'GPUCoreTemp' is an integer attribute.<br />
'GPUCoreTemp' is a read-only attribute.<br />
'GPUCoreTemp' can use the following target types: X Screen, GPU.<br />
<br />
The GPU temps of this board is 41 C.<br />
<br />
In order to get just the temperature for use in utils such as {{ic|rrdtool}} or {{ic|conky}}, among others:<br />
{{hc|$ nvidia-settings -q gpucoretemp -t|41}}<br />
<br />
==== Method 2 - nvidia-smi ====<br />
<br />
Use nvidia-smi which can read temps directly from the GPU without the need to use X at all. This is important for a small group of users who do not have X running on their boxes, perhaps because the box is headless running server apps. <br />
To display the GPU temperature in the shell, use nvidia-smi as follows:<br />
<br />
$ nvidia-smi<br />
<br />
This should output something similar to the following:<br />
{{hc|$ nvidia-smi|<nowiki><br />
Fri Jan 6 18:53:54 2012 <br />
+------------------------------------------------------+ <br />
| NVIDIA-SMI 2.290.10 Driver Version: 290.10 | <br />
|-------------------------------+----------------------+----------------------+<br />
| Nb. Name | Bus Id Disp. | Volatile ECC SB / DB |<br />
| Fan Temp Power Usage /Cap | Memory Usage | GPU Util. Compute M. |<br />
|===============================+======================+======================|<br />
| 0. GeForce 8500 GT | 0000:01:00.0 N/A | N/A N/A |<br />
| 30% 62 C N/A N/A / N/A | 17% 42MB / 255MB | N/A Default |<br />
|-------------------------------+----------------------+----------------------|<br />
| Compute processes: GPU Memory |<br />
| GPU PID Process name Usage |<br />
|=============================================================================|<br />
| 0. ERROR: Not Supported |<br />
+-----------------------------------------------------------------------------+<br />
</nowiki>}}<br />
<br />
Only for temperature:<br />
{{hc|$ nvidia-smi -q -d TEMPERATURE|<nowiki><br />
<br />
==============NVSMI LOG==============<br />
<br />
Timestamp : Sun Apr 12 08:49:10 2015<br />
Driver Version : 346.59<br />
<br />
Attached GPUs : 1<br />
GPU 0000:01:00.0<br />
Temperature<br />
GPU Current Temp : 52 C<br />
GPU Shutdown Temp : N/A<br />
GPU Slowdown Temp : N/A<br />
<br />
</nowiki>}}<br />
<br />
In order to get just the temperature for use in utils such as rrdtool or conky, among others:<br />
<br />
{{hc|<nowiki>$ nvidia-smi --query-gpu=temperature.gpu --format=csv,noheader,nounits</nowiki>|52}}<br />
<br />
Reference: http://www.question-defense.com/2010/03/22/gpu-linux-shell-temp-get-nvidia-gpu-temperatures-via-linux-cli.<br />
<br />
==== Method 3 - nvclock ====<br />
<br />
Use {{AUR|nvclock}} which is available from the [[AUR]].<br />
{{Note|{{ic|nvclock}} cannot access thermal sensors on newer NVIDIA cards such as Geforce 200 series cards.}}<br />
<br />
There can be significant differences between the temperatures reported by nvclock and nvidia-settings/nv-control. According to [http://sourceforge.net/projects/nvclock/forums/forum/67426/topic/1906899 this post] by the author (thunderbird) of nvclock, the nvclock values should be more accurate.<br />
<br />
=== Set fan speed at login ===<br />
<br />
{{Poor writing|Refer to [[#Enabling overclocking]] for description of ''Coolbits''.}}<br />
<br />
You can adjust the fan speed on your graphics card with ''nvidia-settings''' console interface. First ensure that your Xorg configuration sets the Coolbits option to {{ic|4}}, {{ic|5}} or {{ic|12}} for fermi and above in your {{ic|Device}} section to enable fan control.<br />
<br />
Option "Coolbits" "4"<br />
<br />
{{Note|GeForce 400/500 series cards cannot currently set fan speeds at login using this method. This method only allows for the setting of fan speeds within the current X session by way of nvidia-settings.}}<br />
<br />
Place the following line in your [[xinitrc]] file to adjust the fan when you launch Xorg. Replace {{ic|''n''}} with the fan speed percentage you want to set.<br />
<br />
nvidia-settings -a "[gpu:0]/GPUFanControlState=1" -a "[fan:0]/GPUCurrentFanSpeed=''n''"<br />
<br />
You can also configure a second GPU by incrementing the GPU and fan number.<br />
<br />
nvidia-settings -a "[gpu:0]/GPUFanControlState=1" -a "[fan:0]/GPUCurrentFanSpeed=''n''" \<br />
-a "[gpu:1]/GPUFanControlState=1" -a [fan:1]/GPUCurrentFanSpeed=''n''" &<br />
<br />
If you use a login manager such as GDM or KDM, you can create a desktop entry file to process this setting. Create {{ic|~/.config/autostart/nvidia-fan-speed.desktop}} and place this text inside it. Again, change {{ic|''n''}} to the speed percentage you want.<br />
<br />
[Desktop Entry]<br />
Type=Application<br />
Exec=nvidia-settings -a "[gpu:0]/GPUFanControlState=1" -a "[fan:0]/GPUCurrentFanSpeed=''n''"<br />
X-GNOME-Autostart-enabled=true<br />
Name=nvidia-fan-speed<br />
<br />
{{Note|Since the drivers version 349.16, {{ic|GPUCurrentFanSpeed}} has to be replaced with {{ic|GPUTargetFanSpeed}}.[https://devtalk.nvidia.com/default/topic/821563/linux/can-t-control-fan-speed-with-beta-driver-349-12/post/4526208/#4526208]}}<br />
<br />
=== Order of install/deinstall for changing drivers ===<br />
<br />
{{Expansion|Not clear what this does}}<br />
<br />
Where the old driver is nvidiaO and the new driver is nvidiaN.<br />
<br />
*remove nvidiaO<br />
*install nvidia-libglN<br />
*install nvidiaN<br />
*install lib32-nvidia-libgl-N (if required)<br />
<br />
=== Switching between NVIDIA and nouveau drivers ===<br />
<br />
If you need to switch between drivers, you may use the following script, run as root (say yes to all confirmations):<br />
<br />
{{bc|1=<nowiki><br />
#!/bin/bash<br />
BRANCH= # Enter a branch if needed, i.e. -340xx or -304xx<br />
NVIDIA=nvidia${BRANCH} # If no branch entered above this would be "nvidia"<br />
NOUVEAU=xf86-video-nouveau<br />
<br />
# Replace -R with -Rs to if you want to remove the unneeded dependencies<br />
if [ $(pacman -Qqs ^mesa-libgl$) ]; then<br />
pacman -S $NVIDIA ${NVIDIA}-libgl # Add lib32-${NVIDIA}-libgl and ${NVIDIA}-lts if needed<br />
# pacman -R $NOUVEAU<br />
elif [ $(pacman -Qqs ^${NVIDIA}$) ]; then<br />
pacman -S --needed $NOUVEAU mesa-libgl # Add lib32-mesa-libgl if needed<br />
pacman -R $NVIDIA # Add ${NVIDIA}-lts if needed<br />
fi<br />
</nowiki>}}<br />
<br />
=== Avoid tearing with GeForce 500/600/700/900 series cards ===<br />
<br />
Tearing can be avoided by forcing a full composition pipeline, regardless of the compositor you are using. To test whether this option will work, type<br />
nvidia-settings --assign CurrentMetaMode="nvidia-auto-select +0+0 { ForceFullCompositionPipeline = On }"<br />
It has been reported to reduce the performance of some OpenGL applications, though.<br />
<br />
In order to make the change permanent, you need to add the following line to the {{ic|"Screen"}} section of your Xorg configuration file, for example {{ic|/etc/X11/xorg.conf.d/20-nvidia.conf}}:<br />
Option "metamodes" "nvidia-auto-select +0+0 { ForceFullCompositionPipeline = On }"<br />
<br />
If you do not have an Xorg configuration file, you can create one for your present hardware using {{ic|nvidia-xconfig}} (see [[#Automatic configuration]]) and move it from {{ic|/etc/X11/xorg.conf}} to the preferred location {{ic|/etc/X11/xorg.conf.d/20-nvidia.conf}}.<br />
<br />
== Troubleshooting ==<br />
<br />
=== Gaming using TwinView ===<br />
<br />
In case you want to play fullscreen games when using TwinView, you will notice that games recognize the two screens as being one big screen. While this is technically correct (the virtual X screen really is the size of your screens combined), you probably do not want to play on both screens at the same time. <br />
<br />
To correct this behavior for SDL, try:<br />
export SDL_VIDEO_FULLSCREEN_HEAD=1<br />
<br />
For OpenGL, add the appropriate Metamodes to your xorg.conf in section {{ic|Device}} and restart X:<br />
Option "Metamodes" "1680x1050,1680x1050; 1280x1024,1280x1024; 1680x1050,NULL; 1280x1024,NULL;"<br />
<br />
Another method that may either work alone or in conjunction with those mentioned above is [[Gaming#Starting_games_in_a_separate_X_server|starting games in a separate X server]].<br />
<br />
=== Vertical sync using TwinView ===<br />
<br />
If you are using TwinView and vertical sync (the "Sync to VBlank" option in '''nvidia-settings'''), you will notice that only one screen is being properly synced, unless you have two identical monitors. Although '''nvidia-settings''' does offer an option to change which screen is being synced (the "Sync to this display device" option), this does not always work. A solution is to add the following environment variables at startup, for example append in {{ic|/etc/profile}}:<br />
<br />
export __GL_SYNC_TO_VBLANK=1<br />
export __GL_SYNC_DISPLAY_DEVICE=DFP-0<br />
export __VDPAU_NVIDIA_SYNC_DISPLAY_DEVICE=DFP-0<br />
<br />
You can change {{ic|DFP-0}} with your preferred screen ({{ic|DFP-0}} is the DVI port and {{ic|CRT-0}} is the VGA port). You can find the identifier for your display from '''nvidia-settings''' in the "X Server XVideoSettings" section.<br />
<br />
=== Wayland (gdm) crashes after nvidia-libgl installation ===<br />
<br />
On some Intel CPUs outdated microcode causes instability with Wayland when nvidia are installed, causing gdm to crash.<br />
<br />
[[Microcode#Enabling Intel microcode updates|Updating the microcode]] should solve this problem.<br />
<br />
=== Corrupted screen: "Six screens" Problem ===<br />
<br />
For some users, using GeForce GT 100M's, the screen gets corrupted after X starts, divided into 6 sections with a resolution limited to 640x480.<br />
The same problem has been recently reported with Quadro 2000 and hi-res displays.<br />
<br />
To solve this problem, enable the Validation Mode {{ic|NoTotalSizeCheck}} in section {{ic|Device}}:<br />
Section "Device"<br />
...<br />
Option "ModeValidation" "NoTotalSizeCheck"<br />
...<br />
EndSection<br />
<br />
=== '/dev/nvidia0' input/output error ===<br />
<br />
{{Accuracy|Verify that the BIOS related suggestions work and are not coincidentally set while troubleshooting.|section='/dev/nvidia0' Input/Output error... suggested fixes}}<br />
This error can occur for several different reasons, and the most common solution given for this error is to check for group/file permissions, which in almost every case is ''not'' the problem. The NVIDIA documentation does not talk in detail on what you should<br />
do to correct this problem but there are a few things that have worked for some people. The problem can be a IRQ conflict with another device or bad routing by either the kernel or your BIOS.<br />
<br />
First thing to try is to remove other video devices such as video capture cards and see if the problem goes away. If there are too many video processors on the same system it can lead into the kernel being unable to start them because of memory allocation problems with the video controller. In particular on systems with low video memory this can occur even if there is only one video processor. In such case you should find out the amount of your system's video memory (e.g. with {{ic|lspci -v}}) and pass allocation parameters to the kernel, e.g. for a 32-bit kernel:<br />
vmalloc=384M<br />
<br />
If running a 64bit kernel, a driver defect can cause the NVIDIA module to fail initializing when IOMMU is on. Turning it off in the BIOS has been confirmed to work for some users. [http://www.nvnews.net/vbulletin/showthread.php?s=68bb2fabadcb53b10b286aa42d13c5bc&t=159335][[User:Clickthem#nvidia module]]<br />
<br />
Another thing to try is to change your BIOS IRQ routing from {{ic|Operating system controlled}} to {{ic|BIOS controlled}} or the other way around. The first one can be passed as a kernel parameter:<br />
PCI=biosirq<br />
<br />
The {{ic|noacpi}} kernel parameter has also been suggested as a solution but since it disables ACPI completely it should be used with caution. Some hardware are easily damaged by overheating.<br />
<br />
{{Note|The kernel parameters can be passed either through the kernel command line or the bootloader configuration file. See your bootloader Wiki page for more information.}}<br />
<br />
=== '/dev/nvidiactl' errors ===<br />
<br />
Trying to start an OpenGL application might result in errors such as:<br />
Error: Could not open /dev/nvidiactl because the permissions are too<br />
restrictive. Please see the {{ic|FREQUENTLY ASKED QUESTIONS}} <br />
section of {{ic|/usr/share/doc/NVIDIA_GLX-1.0/README}} <br />
for steps to correct.<br />
<br />
Solve by adding the appropriate user to the {{ic|video}} group and log in again:<br />
# gpasswd -a username video<br />
<br />
=== 32-bit applications do not start ===<br />
<br />
Under 64-bit systems, installing {{ic|lib32-nvidia-libgl}} that corresponds to the same version installed for the 64-bit driver fixes the problem.<br />
<br />
=== Errors after updating the kernel ===<br />
<br />
If a custom build of NVIDIA's module is used instead of the package from the ''extra'' repository, a recompile is required every time the kernel is updated. Rebooting is generally recommended after updating kernel and graphic drivers.<br />
<br />
=== Crashing in general ===<br />
<br />
* Try disabling {{ic|RenderAccel}} in xorg.conf.<br />
* If Xorg outputs an error about "conflicting memory type" or "failed to allocate primary buffer: out of memory", add {{ic|nopat}} at the end of the {{ic|kernel}} line in {{ic|/boot/grub/menu.lst}}.<br />
* If the NVIDIA compiler complains about different versions of GCC between the current one and the one used for compiling the kernel, add in {{ic|/etc/profile}}:<br />
export IGNORE_CC_MISMATCH=1<br />
* If Xorg is crashing with a "Signal 11" while using nvidia-96xx drivers, try disabling PAT. Pass the argument {{ic|nopat}} to [[kernel parameters]].<br />
More information about troubleshooting the driver can be found in the [https://forums.geforce.com/ NVIDIA forums.]<br />
<br />
=== Bad performance after installing a new driver version ===<br />
<br />
If FPS have dropped in comparison with older drivers, first check if direct rendering is turned on (glxinfo is included in {{Pkg|mesa-demos}}):<br />
$ glxinfo | grep direct<br />
If the command prints:<br />
direct rendering: No<br />
then that could be an indication for the sudden FPS drop.<br />
<br />
A possible solution could be to regress to the previously installed driver version and rebooting afterwards.<br />
<br />
=== CPU spikes with 400 series cards ===<br />
<br />
If you are experiencing intermittent CPU spikes with a 400 series card, it may be caused by PowerMizer constantly changing the GPU's clock frequency. Switching PowerMizer's setting from Adaptive to Performance, add the following to the {{ic|Device}} section of your Xorg configuration:<br />
<br />
Option "RegistryDwords" "PowerMizerEnable=0x1; PerfLevelSrc=0x3322; PowerMizerDefaultAC=0x1"<br />
<br />
=== Laptops: X hangs on login/out, worked around with Ctrl+Alt+Backspace ===<br />
<br />
If, while using the legacy NVIDIA drivers, Xorg hangs on login and logout (particularly with an odd screen split into two black and white/gray pieces), but logging in is still possible via {{ic|Ctrl+Alt+Backspace}} (or whatever the new "kill X" key binding is), try adding this in {{ic|/etc/modprobe.d/modprobe.conf}}:<br />
options nvidia NVreg_Mobile=1<br />
<br />
One user had luck with this instead, but it makes performance drop significantly for others:<br />
options nvidia NVreg_DeviceFileUID=0 NVreg_DeviceFileGID=33 NVreg_DeviceFileMode=0660 NVreg_SoftEDIDs=0 NVreg_Mobile=1<br />
<br />
Note that {{ic|NVreg_Mobile}} needs to be changed according to the laptop:<br />
* 1 for Dell laptops.<br />
* 2 for non-Compal Toshiba laptops.<br />
* 3 for other laptops.<br />
* 4 for Compal Toshiba laptops.<br />
* 5 for Gateway laptops.<br />
<br />
See [ftp://download.nvidia.com/XFree86/Linux-x86/355.11/README/README.txt NVIDIA Driver's README: Appendix K] for more information.<br />
<br />
=== No screens found on a laptop/NVIDIA Optimus ===<br />
<br />
On a laptop, if the NVIDIA driver cannot find any screens, you may have an NVIDIA Optimus setup : an Intel chipset connected to the screen and the video outputs, and a NVIDIA card that does all the hard work and writes to the chipset's video memory.<br />
<br />
Check if {{ic|<nowiki>$ lspci | grep VGA</nowiki>}}<br />
outputs something similar to:<br />
00:02.0 VGA compatible controller: Intel Corporation Core Processor Integrated Graphics Controller (rev 02)<br />
01:00.0 VGA compatible controller: nVidia Corporation Device 0df4 (rev a1)<br />
<br />
NVIDIA drivers now offer Optimus support since 319.12 Beta [[http://www.nvidia.com/object/linux-display-amd64-319.12-driver.html]] with kernels above and including 3.9.<br />
<br />
Another solution is to install the [[Intel]] driver to handle the screens, then if you want 3D software you should run them through [[Bumblebee]] to tell them to use the NVIDIA card.<br />
<br />
==== Possible Workaround ====<br />
<br />
Enter the BIOS and changed the default graphics setting from 'Optimus' to 'Discrete' and the install NVIDIA drivers (295.20-1 at time of writing) recognized the screens.<br />
<br />
Steps:<br />
# Enter BIOS.<br />
# Find Graphics Settings (should be in tab ''Config > Display'').<br />
# Change 'Graphics Device' to 'Discrete Graphics' (Disables Intel integrated graphics).<br />
# Change OS Detection for Nvidia Optimus to "Disabled".<br />
# Save and exit.<br />
<br />
Tested on a Lenovo W520 with a Quadro 1000M and Nvidia Optimus<br />
<br />
=== Screen(s) found, but none have a usable configuration ===<br />
<br />
Sometimes NVIDIA and X have trouble finding the active screen. If your graphics card has multiple outputs try plugging your monitor into the other ones. On a laptop it may be because your graphics card has vga/tv outs. Xorg.0.log will provide more info.<br />
<br />
Another thing to try is adding invalid {{ic|"ConnectedMonitor" Option}} to {{ic|Section "Device"}}<br />
to force Xorg throws error and shows you how correct it.<br />
[ftp://download.nvidia.com/XFree86/Linux-x86/355.11/README/xconfigoptions.html Here]<br />
more about ConnectedMonitor setting.<br />
<br />
After re-run X see Xorg.0.log to get valid CRT-x,DFP-x,TV-x values.<br />
<br />
{{ic|nvidia-xconfig --query-gpu-info}} could be helpful.<br />
<br />
=== Blackscreen at X startup with new driver ===<br />
<br />
If you have installed an update of Nvidia and you screen stay black after launching Xorg. You have to use the {{ic|<nowiki>rcutree.rcu_idle_gp_delay=1</nowiki>}} [[kernel parameter]].<br />
<br />
You can also try to add the {{ic|nvidia}} module directly to your [[mkinitcpio]] config file.<br />
<br />
If the screen still stays black with '''both''' the {{ic|<nowiki>rcutree.rcu_idle_gp_delay=1</nowiki>}} [[kernel parameter]] and the {{ic|nvidia}} module directly in the [[mkinitcpio]] config file, try re-installing {{Pkg|nvidia}} and {{Pkg|nvidia-libgl}} in that order, and finally reload the driver:<br />
<br />
# modprobe nvidia<br />
<br />
=== Backlight is not turning off in some occasions ===<br />
<br />
By default, DPMS should turn off backlight with the timeouts set or by running xset. However, probably due to a bug in the proprietary Nvidia drivers the result is a blank screen with no powersaving whatsoever. To workaround it, until the bug has been fixed you can use the {{ic|vbetool}} as root.<br />
<br />
Install the {{Pkg|vbetool}} package.<br />
<br />
Turn off your screen on demand and then by pressing a random key backlight turns on again:<br />
<br />
vbetool dpms off && read -n1; vbetool dpms on<br />
<br />
Alternatively, xrandr is able to disable and re-enable monitor outputs without requiring root.<br />
<br />
xrandr --output DP-1 --off; read -n1; xrandr --output DP-1 --auto<br />
<br />
=== Blue tint on videos with Flash ===<br />
<br />
A problem with {{Pkg|flashplugin}} versions 11.2.202.228-1 and 11.2.202.233-1 causes it to send the U/V panes in the incorrect order resulting in a blue tint on certain videos. There are a few potential fixes for this bug:<br />
<br />
# Install the latest {{Pkg|libvdpau}}.<br />
# Patch {{ic|vdpau_trace.so}} with [https://bbs.archlinux.org/viewtopic.php?pid=1078368#p1078368 this makepkg].<br />
# Right click on a video, select "Settings..." and uncheck "Enable hardware acceleration". Reload the page for it to take affect. Note that this disables GPU acceleration.<br />
# [[Downgrade]] the {{Pkg|flashplugin}} package to version 11.1.102.63-1 at most.<br />
# Use {{AUR|google-chrome}} with the new Pepper API {{AUR|chromium-pepper-flash}}.<br />
# Try one of the few Flash alternatives.<br />
<br />
The merits of each are discussed in [https://bbs.archlinux.org/viewtopic.php?id=137877 this thread].<br />
<br />
=== Bleeding overlay with Flash ===<br />
<br />
This bug is due to the incorrect colour key being used by the {{Pkg|flashplugin}} version 11.2.202.228-1 and causes the flash content to "leak" into other pages or solid black backgrounds. To avoid this problem simply install the latest {{Pkg|libvdpau}} or export {{ic|1=VDPAU_NVIDIA_NO_OVERLAY=1}} within either your shell profile (E.g. {{ic|~/.bash_profile}} or {{ic|~/.zprofile}}) or {{ic|~/.xinitrc}}<br />
<br />
=== Full system freeze using Flash ===<br />
<br />
If you experience occasional full system freezes (only the mouse is moving) using flashplugin<br />
and get:<br />
<br />
{{hc|/var/log/errors.log|<br />
NVRM: Xid (0000:01:00): 31, Ch 00000007, engmask 00000120, intr 10000000<br />
}}<br />
<br />
A possible workaround is to switch off Hardware Acceleration in Flash, setting<br />
<br />
{{hc|/etc/adobe/mms.cfg|2=<br />
EnableLinuxHWVideoDecode=0<br />
}}<br />
<br />
Or, if you want to keep Hardware acceleration enabled, you may try to::<br />
export VDPAU_NVIDIA_NO_OVERLAY=1<br />
<br />
...before starting the browser.<br />
Note that this may introduce tearing.<br />
<br />
=== Xorg fails to load or Red Screen of Death ===<br />
<br />
If you get a red screen and use GRUB disable the GRUB framebuffer by editing {{ic|/etc/default/grub}} and uncomment GRUB_TERMINAL_OUTPUT. For more information see [[GRUB/Tips and tricks#Disable framebuffer]].<br />
<br />
=== Black screen on systems with Intel integrated GPU ===<br />
<br />
If you have an Intel CPU with an integrated GPU (e.g. Intel HD 4000) and have installed the {{Pkg|nvidia}} package, you may experience a black screen on boot, when changing virtual terminal, or when exiting an X session. This may be caused by a conflict between the graphics modules. This is solved by blacklisting the Intel GPU modules. Create the file {{ic|/etc/modprobe.d/blacklist.conf}} and prevent the ''i915'' and ''intel_agp'' modules from loading on boot:<br />
<br />
{{hc|/etc/modprobe.d/blacklist.conf|<br />
install i915 /usr/bin/false<br />
install intel_agp /usr/bin/false<br />
}}<br />
<br />
=== Black screen on systems with VIA integrated GPU ===<br />
<br />
As above, blacklisting the ''viafb'' module may resolve conflicts with NVIDIA drivers:<br />
<br />
{{hc|/etc/modprobe.d/blacklist.conf|<br />
install viafb /usr/bin/false<br />
}}<br />
<br />
=== X fails with "no screens found" with Intel iGPU ===<br />
<br />
Like above, if you have an Intel CPU with an integrated GPU and X fails to start with <br />
<br />
[ 76.633] (EE) No devices detected.<br />
[ 76.633] Fatal server error:<br />
[ 76.633] no screens found<br />
<br />
then you need to add your discrete card's BusID to your X configuration. Find it:<br />
<br />
{{hc|<nowiki># lspci | grep VGA</nowiki>|<br />
00:02.0 VGA compatible controller: Intel Corporation Xeon E3-1200 v2/3rd Gen Core processor Graphics Controller (rev 09)<br />
01:00.0 VGA compatible controller: NVIDIA Corporation GK107 [GeForce GTX 650] (rev a1)<br />
}}<br />
<br />
then you fix it by adding it to the card's Device section in your X configuration. In my case:<br />
<br />
{{hc|/etc/X11/xorg.conf.d/10-nvidia.conf|<br />
Section "Device"<br />
Identifier "Device0"<br />
Driver "nvidia"<br />
VendorName "NVIDIA Corporation"<br />
BusID "PCI:1:0:0"<br />
EndSection<br />
}}<br />
<br />
Note how {{ic|01:00.0}} is written as {{ic|1:0:0}}.<br />
<br />
=== Xorg fails during boot, but otherwise starts fine ===<br />
<br />
On very fast booting systems, systemd may attempt to start the display manager before the NVIDIA driver has fully initialized. You will see a message like the following in your logs only when Xorg runs during boot.<br />
{{hc|/var/log/Xorg.0.log|output=<br />
[ 1.807] (EE) NVIDIA(0): Failed to initialize the NVIDIA kernel module. Please see the<br />
[ 1.807] (EE) NVIDIA(0): system's kernel log for additional error messages and<br />
[ 1.808] (EE) NVIDIA(0): consult the NVIDIA README for details.<br />
[ 1.808] (EE) NVIDIA(0): *** Aborting ***<br />
}}<br />
In this case you will need to establish an ordering dependency from the display manager to the DRI device. First create device units for DRI devices by creating a new udev rules file.<br />
{{hc|/etc/udev/rules.d/99-systemd-dri-devices.rules|output=<br />
ACTION=="add", KERNEL=="card*", SUBSYSTEM=="drm", TAG+="systemd"<br />
}}<br />
Then create dependencies from the display manager to the device(s).<br />
{{hc|/etc/systemd/system/display-manager.service.d/10-wait-for-dri-devices.conf|output=<br />
[Unit]<br />
Wants=dev-dri-card0.device<br />
After=dev-dri-card0.device<br />
}}<br />
If you have additional cards needed for the desktop then list them in Wants and After seperated by spaces.<br />
<br />
=== Flash video players crashes ===<br />
<br />
If you are getting frequent crashes of Flash video players, try to switch off Hardware Acceleration:<br />
<br />
{{hc|/etc/adobe/mms.cfg|2=<br />
EnableLinuxHWVideoDecode=0<br />
}}<br />
<br />
(This problem appeared after installing the proprietary nvidia driver, and was fixed by changing this setting.)<br />
<br />
=== Override EDID ===<br />
<br />
If your monitor is providing wrong EDID information, the nvidia-driver will pick a very small solution.<br />
Nvidia's driver options change, this guide refers to nvidia 346.47-11.<br />
<br />
Aside from manually setting modelines in the xorg config, you have to allow non-edid modes and disable edid in the device section:<br />
<br />
{{hc|/etc/X11/xorg.conf.d/10-monitor.conf|2=<br />
Section "Monitor"<br />
Identifier "Monitor0"<br />
VendorName "Unknown"<br />
ModelName "Unknown"<br />
HorizSync 30-94<br />
VertRefresh 56-76<br />
DisplaySize 518.4 324.0<br />
Option "DPMS"<br />
# 1920x1200 59.95 Hz (CVT 2.30MA-R) hsync: 74.04 kHz; pclk: 154.00 MHz<br />
Modeline "1920x1200R" 154.00 1920 1968 2000 2080 1200 1203 1209 1235 +hsync -vsync<br />
EndSection<br />
<br />
Section "Device"<br />
Identifier "Device0"<br />
Driver "nvidia"<br />
VendorName "NVIDIA Corporation"<br />
Option "UseEdidFreqs" "FALSE"<br />
Option "UseEDID" "FALSE"<br />
Option "ModeValidation" "AllowNonEdidModes"<br />
EndSection<br />
<br />
Section "Screen"<br />
Identifier "Screen0"<br />
Device "Device0"<br />
Monitor "Monitor0"<br />
DefaultDepth 24<br />
SubSection "Display"<br />
Depth 24<br />
Modes "1920x1200R"<br />
EndSubSection<br />
EndSection<br />
}}<br />
<br />
=== Fix rendering lag (firefox, gedit, vim, tmux …) ===<br />
nvidia-settings -a InitialPixmapPlacement=0<br />
<br />
https://bugzilla.gnome.org/show_bug.cgi?id=728464<br />
<br />
=== Screen Tearing with Multiple Monitor Orientations ===<br />
<br />
When running multiple monitors in different orientations (through [[Xrandr]] settings) such as portrait and landscape simultaneously, you may notice screen tearing in one of the orientations/monitors. Unfortunately, this issue is fixed by setting all monitors to the same orientation via [[Xrandr]] settings<br />
<br />
== See also ==<br />
<br />
* [https://forums.geforce.com/ NVIDIA User forums]<br />
* [ftp://download.nvidia.com/XFree86/Linux-x86/355.11/README/README.txt Official README for NVIDIA drivers, all on one text page. Most Recent Driver Version as of September 7, 2015: 355.11.]<br />
* [ftp://download.nvidia.com/XFree86/Linux-x86/355.11/README/xconfigoptions.html README Appendix B. X Config Options, 355.11 (direct link)]</div>Beta990https://wiki.archlinux.org/index.php?title=Systemd&diff=412377Systemd2015-12-15T13:19:21Z<p>Beta990: /* Basic systemctl usage */ Added systemd-kcm to Tip for Plasma frontended</p>
<hr />
<div>{{Lowercase title}}<br />
[[Category:Daemons and system services]]<br />
[[Category:Boot process]]<br />
[[ar:Systemd]]<br />
[[de:Systemd]]<br />
[[el:Systemd]]<br />
[[es:Systemd]]<br />
[[fa:Systemd]]<br />
[[fr:Systemd]]<br />
[[it:Systemd]]<br />
[[ja:Systemd]]<br />
[[pt:Systemd]]<br />
[[ru:Systemd]]<br />
[[zh-CN:Systemd]]<br />
[[zh-TW:Systemd]]<br />
{{Related articles start}}<br />
{{Related|systemd/User}}<br />
{{Related|systemd/Timers}}<br />
{{Related|systemd FAQ}}<br />
{{Related|init}}<br />
{{Related|init Rosetta}}<br />
{{Related|Daemons#List of daemons}}<br />
{{Related|udev}}<br />
{{Related|Improve boot performance}}<br />
{{Related|Allow users to shutdown}}<br />
{{Related articles end}}<br />
<br />
From the [http://freedesktop.org/wiki/Software/systemd project web page]:<br />
<br />
:''systemd'' is a system and service manager for Linux, compatible with SysV and LSB init scripts. systemd provides aggressive parallelization capabilities, uses socket and [[D-Bus]] activation for starting services, offers on-demand starting of daemons, keeps track of processes using Linux [[control groups]], supports snapshotting and restoring of the system state, maintains mount and automount points and implements an elaborate transactional dependency-based service control logic.<br />
<br />
{{Note|1=For a detailed explanation as to why Arch has moved to ''systemd'', see [https://bbs.archlinux.org/viewtopic.php?pid=1149530#p1149530 this forum post].}}<br />
<br />
== Basic systemctl usage ==<br />
<br />
The main command used to introspect and control ''systemd'' is ''systemctl''. Some of its uses are examining the system state and managing the system and services. See {{ic|man systemctl}} for more details.<br />
<br />
{{Tip|<br />
* You can use all of the following ''systemctl'' commands with the {{ic|-H ''user''@''host''}} switch to control a ''systemd'' instance on a remote machine. This will use [[SSH]] to connect to the remote ''systemd'' instance.<br />
* ''systemadm'' is the official graphical frontend for ''systemctl''. It is provided by {{Pkg|systemd-ui}} from the [[official repositories]] or by {{AUR|systemd-ui-git}}{{Broken package link|{{aur-mirror|systemd-ui-git}}}} from the [[AUR]] for the development version.<br />
* [[Plasma]] users can install {{Pkg|systemd-kcm}} as a graphical fronted for ''systemctl''. After installing the module will be added under ''System administration''.}}<br />
<br />
=== Analyzing the system state ===<br />
<br />
'''List running''' units:<br />
<br />
$ systemctl<br />
<br />
or:<br />
<br />
$ systemctl list-units<br />
<br />
'''List failed''' units:<br />
<br />
$ systemctl --failed<br />
<br />
The available unit files can be seen in {{ic|/usr/lib/systemd/system/}} and {{ic|/etc/systemd/system/}} (the latter takes precedence). '''List installed''' unit files with:<br />
<br />
$ systemctl list-unit-files<br />
<br />
=== Using units ===<br />
<br />
Units can be, for example, services (''.service''), mount points (''.mount''), devices (''.device'') or sockets (''.socket'').<br />
<br />
When using ''systemctl'', you generally have to specify the complete name of the unit file, including its suffix, for example {{ic|sshd.socket}}. There are however a few short forms when specifying the unit in the following ''systemctl'' commands:<br />
<br />
* If you do not specify the suffix, systemctl will assume ''.service''. For example, {{ic|netctl}} and {{ic|netctl.service}} are equivalent.<br />
* Mount points will automatically be translated into the appropriate ''.mount'' unit. For example, specifying {{ic|/home}} is equivalent to {{ic|home.mount}}.<br />
* Similar to mount points, devices are automatically translated into the appropriate ''.device'' unit, therefore specifying {{ic|/dev/sda2}} is equivalent to {{ic|dev-sda2.device}}.<br />
<br />
See {{ic|man systemd.unit}} for details.<br />
<br />
{{Note|Some unit names contain an {{ic|@}} sign (e.g. {{ic|name@''string''.service}}): this means that they are [http://0pointer.de/blog/projects/instances.html instances] of a ''template'' unit, whose actual file name does not contain the {{ic|''string''}} part (e.g. {{ic|name@.service}}). {{ic|''string''}} is called the ''instance identifier'', and is similar to an argument that is passed to the template unit when called with the ''systemctl'' command: in the unit file it will substitute the {{ic|%i}} specifier. <br />
<br />
To be more accurate, ''before'' trying to instantiate the {{ic|name@.suffix}} template unit, ''systemd'' will actually look for a unit with the exact {{ic|name@string.suffix}} file name, although by convention such a "clash" happens rarely, i.e. most unit files containing an {{ic|@}} sign are meant to be templates. Also, if a template unit is called without an instance identifier, it will just fail, since the {{ic|%i}} specifier cannot be substituted.<br />
}}<br />
<br />
{{Tip|<br />
* Most of the following commands also work if multiple units are specified, see {{ic|man systemctl}} for more information.<br />
* Since [https://github.com/systemd/systemd/blob/master/NEWS#L323-L326 systemd 220], a {{ic|--now}} switch can be used in conjunction with {{ic|enable}}, {{ic|disable}} and {{ic|mask}} to respectively start, stop or mask immediately the unit rather than after the next boot.<br />
* A package may offer units for different purposes. If you just installed a package, {{ic|pacman -Qql ''package'' <nowiki>|</nowiki> grep -Fe .service -e .socket}} can be used to check and find them.}}<br />
<br />
'''Start''' a unit immediately:<br />
<br />
# systemctl start ''unit''<br />
<br />
'''Stop''' a unit immediately:<br />
<br />
# systemctl stop ''unit''<br />
<br />
'''Restart''' a unit:<br />
<br />
# systemctl restart ''unit''<br />
<br />
Ask a unit to '''reload''' its configuration:<br />
<br />
# systemctl reload ''unit''<br />
<br />
Show the '''status''' of a unit, including whether it is running or not:<br />
<br />
$ systemctl status ''unit''<br />
<br />
'''Check''' whether a unit is already enabled or not:<br />
<br />
$ systemctl is-enabled ''unit''<br />
<br />
'''Enable''' a unit to be started on '''bootup''':<br />
<br />
# systemctl enable ''unit''<br />
<br />
'''Disable''' a unit to not start during bootup:<br />
<br />
# systemctl disable ''unit''<br />
<br />
'''Mask''' a unit to make it impossible to start it:<br />
<br />
# systemctl mask ''unit''<br />
<br />
'''Unmask''' a unit:<br />
<br />
# systemctl unmask ''unit''<br />
<br />
Show the '''manual page''' associated with a unit (this has to be supported by the unit file):<br />
<br />
$ systemctl help ''unit''<br />
<br />
Reload ''systemd'', scanning for '''new or changed units''':<br />
<br />
# systemctl daemon-reload<br />
<br />
=== Power management ===<br />
<br />
[[polkit]] is necessary for power management as an unprivileged user. If you are in a local ''systemd-logind'' user session and no other session is active, the following commands will work without root privileges. If not (for example, because another user is logged into a tty), ''systemd'' will automatically ask you for the root password.<br />
<br />
Shut down and reboot the system:<br />
<br />
$ systemctl reboot<br />
<br />
Shut down and power-off the system:<br />
<br />
$ systemctl poweroff<br />
<br />
Suspend the system:<br />
<br />
$ systemctl suspend<br />
<br />
Put the system into hibernation:<br />
<br />
$ systemctl hibernate<br />
<br />
Put the system into hybrid-sleep state (or suspend-to-both):<br />
<br />
$ systemctl hybrid-sleep<br />
<br />
== Writing unit files ==<br />
<br />
The syntax of ''systemd'''s [http://www.freedesktop.org/software/systemd/man/systemd.unit.html unit files] is inspired by XDG Desktop Entry Specification ''.desktop'' files, which are in turn inspired by Microsoft Windows ''.ini'' files. Unit files are loaded from two locations. From lowest to highest precedence they are:<br />
<br />
* {{ic|/usr/lib/systemd/system/}}: units provided by installed packages<br />
* {{ic|/etc/systemd/system/}}: units installed by the system administrator<br />
<br />
{{Note|<br />
* The load paths are completely different when running ''systemd'' in [[systemd/User#How it works|user mode]].<br />
* systemd unit names may only contain ASCII alphanumeric characters, underscores and periods. All other characters must be replaced by C-style "\x2d" escapes. See {{ic|man systemd.unit}} and {{ic|man systemd-escape}} for more information.}}<br />
<br />
Look at the units installed by your packages for examples, as well as the [http://www.freedesktop.org/software/systemd/man/systemd.service.html#Examples annotated example section] of {{ic|man systemd.service}}.<br />
<br />
{{Tip|Comments prepended with {{ic|#}} may be used in unit-files as well, but only in new lines. Do not use end-line comments after ''systemd'' parameters or the unit will fail to activate.}}<br />
<br />
=== Handling dependencies ===<br />
<br />
With ''systemd'', dependencies can be resolved by designing the unit files correctly. The most typical case is that the unit ''A'' requires the unit ''B'' to be running before ''A'' is started. In that case add {{ic|1=Requires=''B''}} and {{ic|1=After=''B''}} to the {{ic|[Unit]}} section of ''A''. If the dependency is optional, add {{ic|1=Wants=''B''}} and {{ic|1=After=''B''}} instead. Note that {{ic|1=Wants=}} and {{ic|1=Requires=}} do not imply {{ic|1=After=}}, meaning that if {{ic|1=After=}} is not specified, the two units will be started in parallel.<br />
<br />
Dependencies are typically placed on services and not on targets. For example, {{ic|network.target}} is pulled in by whatever service configures your network interfaces, therefore ordering your custom unit after it is sufficient since {{ic|network.target}} is started anyway.<br />
<br />
=== Service types ===<br />
<br />
There are several different start-up types to consider when writing a custom service file. This is set with the {{ic|1=Type=}} parameter in the {{ic|[Service]}} section:<br />
<br />
* {{ic|1=Type=simple}} (default): ''systemd'' considers the service to be started up immediately. The process must not fork. Do not use this type if other services need to be ordered on this service, unless it is socket activated.<br />
* {{ic|1=Type=forking}}: ''systemd'' considers the service started up once the process forks and the parent has exited. For classic daemons use this type unless you know that it is not necessary. You should specify {{ic|1=PIDFile=}} as well so ''systemd'' can keep track of the main process.<br />
* {{ic|1=Type=oneshot}}: this is useful for scripts that do a single job and then exit. You may want to set {{ic|1=RemainAfterExit=yes}} as well so that ''systemd'' still considers the service as active after the process has exited.<br />
* {{ic|1=Type=notify}}: identical to {{ic|1=Type=simple}}, but with the stipulation that the daemon will send a signal to ''systemd'' when it is ready. The reference implementation for this notification is provided by ''libsystemd-daemon.so''.<br />
* {{ic|1=Type=dbus}}: the service is considered ready when the specified {{ic|BusName}} appears on DBus's system bus.<br />
* {{ic|1=Type=idle}}: ''systemd'' will delay execution of the service binary until all jobs are dispatched. Other than that behavior is very similar to {{ic|1=Type=simple}}. <br />
<br />
See the [http://www.freedesktop.org/software/systemd/man/systemd.service.html#Type= systemd.service(5)] man page for a more detailed explanation of the {{ic|Type}} values.<br />
<br />
=== Editing provided units ===<br />
<br />
To avoid conflicts with pacman, unit files provided by packages should not be directly edited. There are two safe ways to modify a unit without touching the original file: create a new unit file which overwrites the original unit or create drop-in snippets which are applied on top of the original unit. For both methods, you must reload the unit afterwards to apply your changes. This can be done either by editing the unit with {{ic|systemctl edit}} (which reloads the unit automatically) or by reloading all units with:<br />
<br />
# systemctl daemon-reload<br />
<br />
{{Tip|<br />
* You can use ''systemd-delta'' to see which unit files have been overridden or extended and what exactly has been changed.<br />
* Use {{ic|systemctl cat ''unit''}} to view the content of a unit file and all associated drop-in snippets.<br />
* Syntax highlighting for ''systemd'' unit files within [[Vim]] can be enabled by installing {{Pkg|vim-systemd}}.<br />
}}<br />
<br />
==== Replacement unit files ====<br />
<br />
To replace the unit file {{ic|/usr/lib/systemd/system/''unit''}}, create the file {{ic|/etc/systemd/system/''unit''}} and reenable the unit to update the symlinks:<br />
<br />
# systemctl reenable ''unit''<br />
<br />
Alternatively, run:<br />
<br />
# systemctl edit --full ''unit''<br />
<br />
This opens {{ic|/etc/systemd/system/''unit''}} in your editor (copying the installed version if it does not exist yet) and automatically reloads it when you finish editing.<br />
<br />
{{Note|Pacman does not update the replacement unit files when the originals are updated, so this method can make system maintenance more difficult. For this reason the next approach is recommended.}}<br />
<br />
==== Drop-in snippets ====<br />
<br />
To create drop-in snippets for the unit file {{ic|/usr/lib/systemd/system/''unit''}}, create the directory {{ic|/etc/systemd/system/''unit''.d/}} and place ''.conf'' files there to override or add new options. ''systemd'' will parse these ''.conf'' files and apply them on top of the original unit.<br />
<br />
The easiest way to do this is to run:<br />
<br />
# systemctl edit ''unit''<br />
<br />
This opens the file {{ic|/etc/systemd/system/''unit''.d/override.conf}} in your text editor (creating it if necessary) and automatically reloads the unit when you are done editing.<br />
<br />
==== Examples ====<br />
<br />
For example, if you simply want to add an additional dependency to a unit, you may create the following file:<br />
<br />
{{hc|/etc/systemd/system/''unit''.d/customdependency.conf|2=<br />
[Unit]<br />
Requires=''new dependency''<br />
After=''new dependency''<br />
}}<br />
<br />
As another example, in order to replace the {{ic|ExecStart}} directive for a unit that is not of type {{ic|oneshot}}, create the following file:<br />
<br />
{{hc|/etc/systemd/system/''unit''.d/customexec.conf|2=<br />
[Service]<br />
ExecStart=<br />
ExecStart=''new command''<br />
}}<br />
<br />
Note how {{ic|ExecStart}} must be cleared before being re-assigned ([https://bugzilla.redhat.com/show_bug.cgi?id=756787#c9]).<br />
<br />
One more example to automatically restart a service:<br />
<br />
{{hc|/etc/systemd/system/''unit''.d/restart.conf|2=<br />
[Service]<br />
Restart=always<br />
RestartSec=30<br />
}}<br />
<br />
== Targets ==<br />
<br />
{{Style|Unclear description, copy-pasted content (explicitly mentions "Fedora").|section=Make section "Targets" more clearly}}<br />
<br />
''systemd'' uses ''targets'' which serve a similar purpose as runlevels but act a little different. Each ''target'' is named instead of numbered and is intended to serve a specific purpose with the possibility of having multiple ones active at the same time. Some ''target''s are implemented by inheriting all of the services of another ''target'' and adding additional services to it. There are ''systemd'' ''target''s that mimic the common SystemVinit runlevels so you can still switch ''target''s using the familiar {{ic|telinit RUNLEVEL}} command.<br />
<br />
=== Get current targets ===<br />
<br />
The following should be used under ''systemd'' instead of running {{ic|runlevel}}:<br />
<br />
$ systemctl list-units --type=target<br />
<br />
=== Create custom target ===<br />
<br />
The runlevels that held a defined meaning under sysvinit (i.e., 0, 1, 3, 5, and 6); have a 1:1 mapping with a specific ''systemd'' ''target''. Unfortunately, there is no good way to do the same for the user-defined runlevels like 2 and 4. If you make use of those it is suggested that you make a new named ''systemd'' ''target'' as {{ic|/etc/systemd/system/''your target''}} that takes one of the existing runlevels as a base (you can look at {{ic|/usr/lib/systemd/system/graphical.target}} as an example), make a directory {{ic|/etc/systemd/system/''your target''.wants}}, and then symlink the additional services from {{ic|/usr/lib/systemd/system/}} that you wish to enable.<br />
<br />
=== Targets table ===<br />
<br />
{| class="wikitable"<br />
! SysV Runlevel !! systemd Target !! Notes<br />
|-<br />
| 0 || runlevel0.target, poweroff.target || Halt the system.<br />
|-<br />
| 1, s, single || runlevel1.target, rescue.target || Single user mode.<br />
|-<br />
| 2, 4 || runlevel2.target, runlevel4.target, multi-user.target || User-defined/Site-specific runlevels. By default, identical to 3.<br />
|-<br />
| 3 || runlevel3.target, multi-user.target || Multi-user, non-graphical. Users can usually login via multiple consoles or via the network.<br />
|-<br />
| 5 || runlevel5.target, graphical.target || Multi-user, graphical. Usually has all the services of runlevel 3 plus a graphical login.<br />
|-<br />
| 6 || runlevel6.target, reboot.target || Reboot<br />
|-<br />
| emergency || emergency.target || Emergency shell<br />
|-<br />
|}<br />
<br />
=== Change current target ===<br />
<br />
In ''systemd'' targets are exposed via ''target units''. You can change them like this:<br />
<br />
# systemctl isolate graphical.target<br />
<br />
This will only change the current target, and has no effect on the next boot. This is equivalent to commands such as {{ic|telinit 3}} or {{ic|telinit 5}} in Sysvinit.<br />
<br />
=== Change default target to boot into ===<br />
<br />
The standard target is {{ic|default.target}}, which is aliased by default to {{ic|graphical.target}} (which roughly corresponds to the old runlevel 5). To change the default target at boot-time, append one of the following [[kernel parameters]] to your bootloader:<br />
<br />
* {{ic|1=systemd.unit=multi-user.target}} (which roughly corresponds to the old runlevel 3),<br />
* {{ic|1=systemd.unit=rescue.target}} (which roughly corresponds to the old runlevel 1).<br />
<br />
Alternatively, you may leave the bootloader alone and change {{ic|default.target}}. This can be done using ''systemctl'':<br />
<br />
# systemctl set-default multi-user.target<br />
<br />
To be able to override the previously set {{ic|default.target}}, use the force option:<br />
<br />
# systemctl set-default -f multi-user.target<br />
<br />
The effect of this command is output by ''systemctl''; a symlink to the new default target is made at {{ic|/etc/systemd/system/default.target}}.<br />
<br />
== Temporary files ==<br />
<br />
"''systemd-tmpfiles'' creates, deletes and cleans up volatile and temporary files and directories." It reads configuration files in {{ic|/etc/tmpfiles.d/}} and {{ic|/usr/lib/tmpfiles.d/}} to discover which actions to perform. Configuration files in the former directory take precedence over those in the latter directory.<br />
<br />
Configuration files are usually provided together with service files, and they are named in the style of {{ic|/usr/lib/tmpfiles.d/''program''.conf}}. For example, the [[Samba]] daemon expects the directory {{ic|/run/samba}} to exist and to have the correct permissions. Therefore, the {{Pkg|samba}} package ships with this configuration:<br />
<br />
{{hc|/usr/lib/tmpfiles.d/samba.conf|<br />
D /run/samba 0755 root root}}<br />
<br />
Configuration files may also be used to write values into certain files on boot. For example, if you used {{ic|/etc/rc.local}} to disable wakeup from USB devices with {{ic|echo USBE > /proc/acpi/wakeup}}, you may use the following tmpfile instead:<br />
<br />
{{hc|/etc/tmpfiles.d/disable-usb-wake.conf|<br />
w /proc/acpi/wakeup - - - - USBE}}<br />
<br />
See the {{ic|systemd-tmpfiles(8)}} and {{ic|tmpfiles.d(5)}} man pages for details.<br />
<br />
{{Note|This method may not work to set options in {{ic|/sys}} since the ''systemd-tmpfiles-setup'' service may run before the appropriate device modules is loaded. In this case you could check whether the module has a parameter for the option you want to set with {{ic|modinfo ''module''}} and set this option with a [[Kernel modules#Setting module options|config file in /etc/modprobe.d]]. Otherwise you will have to write a [[Udev#About_udev_rules|udev rule]] to set the appropriate attribute as soon as the device appears.}}<br />
<br />
== Timers ==<br />
<br />
A timer is a unit configuration file whose name ends with ''.timer'' and encodes information about a timer controlled and supervised by ''systemd'', for timer-based activation. See [[systemd/Timers]].<br />
<br />
{{Note|Timers can replace ''cron'' functionality to a great extent. See [[systemd/Timers#As a cron replacement]].}}<br />
<br />
== Journal ==<br />
<br />
''systemd'' has its own logging system called the journal; therefore, running a {{ic|syslog}} daemon is no longer required. To read the log, use:<br />
<br />
# journalctl<br />
<br />
In Arch Linux, the directory {{ic|/var/log/journal/}} is a part of the {{Pkg|systemd}} package, and the journal (when {{ic|1=Storage=}} is set to {{ic|auto}} in {{ic|/etc/systemd/journald.conf}}) will write to {{ic|/var/log/journal/}}. If you or some program delete that directory, ''systemd'' will '''not''' recreate it automatically and instead will write its logs to {{ic|/run/systemd/journal}} in a nonpersistent way. However, the folder will be recreated when you set {{ic|1=Storage=persistent}} and run {{ic|systemctl restart systemd-journald}} (or reboot).<br />
<br />
=== Filtering output ===<br />
<br />
''journalctl'' allows you to filter the output by specific fields. Be aware that if there are many messages to display or filtering of large time span has to be done, the output of this command can be delayed for quite some time.<br />
<br />
{{Tip|While the journal is stored in a binary format, the content of stored messages is not modified. This means it is viewable with ''strings'', for example for recovery in an environment which does not have ''systemd'' installed. Example command:<br />
{{bc|$ strings /mnt/arch/var/log/journal/af4967d77fba44c6b093d0e9862f6ddd/system.journal <nowiki>| grep -i</nowiki> ''message''}}<br />
}}<br />
<br />
Examples:<br />
<br />
* Show all messages from this boot: {{bc|# journalctl -b}} However, often one is interested in messages not from the current, but from the previous boot (e.g. if an unrecoverable system crash happened). This is possible through optional offset parameter of the {{ic|-b}} flag: {{ic|journalctl -b -0}} shows messages from the current boot, {{ic|journalctl -b -1}} from the previous boot, {{ic|journalctl -b -2}} from the second previous and so on. See {{ic|man 1 journalctl}} for full description, the semantics is much more powerful.<br />
* Show all messages from date (and optional time): {{bc|1=# journalctl --since="2012-10-30 18:17:16"}}<br />
* Show all messages since 20 minutes ago: {{bc|1=# journalctl --since "20 min ago"}}<br />
* Follow new messages: {{bc|# journalctl -f}}<br />
* Show all messages by a specific executable: {{bc|# journalctl /usr/lib/systemd/systemd}}<br />
* Show all messages by a specific process: {{bc|1=# journalctl _PID=1}}<br />
* Show all messages by a specific unit: {{bc|# journalctl -u netcfg}}<br />
* Show kernel ring buffer: {{bc|1=# journalctl -k}}<br />
* Show auth.log equivalent by filtering on syslog facility: {{bc|1=# journalctl -f -l SYSLOG_FACILITY=10}}<br />
<br />
See {{ic|man 1 journalctl}}, {{ic|man 7 systemd.journal-fields}}, or Lennart's [http://0pointer.de/blog/projects/journalctl.html blog post] for details.<br />
<br />
{{Tip|1=<br />
By default, ''journalctl'' truncates lines longer than screen width, but in some cases, it may be better to enable wrapping instead of truncating. This can be controlled by the {{ic|SYSTEMD_LESS}} [[environment variable]], which contains options passed to [[Core utilities#less|less]] (the default pager) and defaults to {{ic|FRSXMK}} (see {{ic|man 1 less}} and {{ic|man 1 journalctl}} for details).<br />
<br />
By omitting the {{ic|S}} option, the output will be wrapped instead of truncated. For example, start ''journalctl'' as follows:<br />
<br />
$ SYSTEMD_LESS=FRXMK journalctl<br />
<br />
If you would like to set this behaviour as default, [[Environment variables#Per_user|export]] the variable from {{ic|~/.bashrc}} or {{ic|~/.zshrc}}.<br />
}}<br />
<br />
=== Journal size limit ===<br />
<br />
If the journal is persistent (non-volatile), its size limit is set to a default value of 10% of the size of the respective file system. For example, with {{ic|/var/log/journal}} located on a 50 GiB root partition this would lead to 5 GiB of journal data. The maximum size of the persistent journal can be controlled by uncommenting and changing the following:<br />
<br />
{{hc|/etc/systemd/journald.conf|2=<br />
SystemMaxUse=50M<br />
}}<br />
<br />
Refer to {{ic|man journald.conf}} for more info.<br />
<br />
=== Clean journal files manually ===<br />
<br />
The journal files are located under {{ic|/var/log/journal}}, {{ic|rm}} will do the work.<br />
Or, use {{ic|journalctl}},<br />
<br />
Examples:<br />
<br />
* Remove archived journal files until the disk space they use falls below 100M: {{bc|1=# journalctl --vacuum-size=100M}}<br />
* Make all journal files contain no data older than 2 weeks. {{bc|1=# journalctl --vacuum-time=2weeks}}<br />
<br />
Refer to {{ic|man journalctl}} for more info.<br />
<br />
=== Journald in conjunction with syslog ===<br />
<br />
Compatibility with a classic, non-journald aware [[Syslog-ng|syslog]] implementation can be provided by letting ''systemd'' forward all messages via the socket {{ic|/run/systemd/journal/syslog}}. To make the syslog daemon work with the journal, it has to bind to this socket instead of {{ic|/dev/log}} ([http://lwn.net/Articles/474968/ official announcement]). <br />
<br />
As of ''systemd'' 216 the default {{ic|journald.conf}} for forwarding to the socket was changed to {{ic|1=ForwardToSyslog=no}} to avoid system overhead, because [[rsyslog]] or [[syslog-ng]] (since 3.6) pull the messages from the journal by [http://lists.freedesktop.org/archives/systemd-devel/2014-August/022295.html#journald itself]. <br />
<br />
See [[Syslog-ng#Overview]] and [[Syslog-ng#syslog-ng and systemd journal]], or [[rsyslog]] respectively, for details on configuration.<br />
<br />
=== Forward journald to /dev/tty12 ===<br />
<br />
Create a [[#Editing provided units|drop-in directory]] {{ic|/etc/systemd/journald.conf.d}} and create a {{ic|fw-tty12.conf}} file in it:<br />
<br />
{{hc|1=/etc/systemd/journald.conf.d/fw-tty12.conf|2=<br />
[Journal]<br />
ForwardToConsole=yes<br />
TTYPath=/dev/tty12<br />
MaxLevelConsole=info<br />
}}<br />
<br />
Then [[restart]] systemd-journald.<br />
<br />
=== Specify a different journal to view ===<br />
There may be a need to check the logs of another system that is dead in the water, like booting from a live system to recover a production system. In such case, one can mount the disk in e.g. {{ic|/mnt}}, and specify the journal path via {{ic|-D}}/{{ic|--directory}}, like so:<br />
<br />
$ journalctl -D ''/mnt''/var/log/journal -xe<br />
<br />
== Troubleshooting ==<br />
<br />
=== Investigating systemd errors ===<br />
<br />
As an example, we will investigate an error with {{ic|systemd-modules-load}} service:<br />
<br />
'''1.''' Lets find the ''systemd'' services which fail to start:<br />
<br />
{{hc|1=$ systemctl --failed|2=<br />
systemd-modules-load.service loaded '''failed failed''' Load Kernel Modules<br />
}}<br />
<br />
'''2.''' Ok, we found a problem with {{ic|systemd-modules-load}} service. We want to know more:<br />
{{hc|$ systemctl status systemd-modules-load|2=<br />
systemd-modules-load.service - Load Kernel Modules<br />
Loaded: loaded (/usr/lib/systemd/system/systemd-modules-load.service; static)<br />
Active: '''failed''' (Result: exit-code) since So 2013-08-25 11:48:13 CEST; 32s ago<br />
Docs: man:systemd-modules-load.service(8).<br />
man:modules-load.d(5)<br />
Process: '''15630''' ExecStart=/usr/lib/systemd/systemd-modules-load ('''code=exited, status=1/FAILURE''')<br />
}}<br />
If the {{ic|Process ID}} is not listed, just restart the failed service with {{ic|systemctl restart systemd-modules-load}}<br />
<br />
'''3.''' Now we have the process id (PID) to investigate this error in depth. Enter the following command with the current {{ic|Process ID}} (here: 15630):<br />
{{hc|1=$ journalctl _PID=15630|2=<br />
-- Logs begin at Sa 2013-05-25 10:31:12 CEST, end at So 2013-08-25 11:51:17 CEST. --<br />
Aug 25 11:48:13 mypc systemd-modules-load[15630]: '''Failed to find module 'blacklist usblp''''<br />
Aug 25 11:48:13 mypc systemd-modules-load[15630]: '''Failed to find module 'install usblp /bin/false'''' <br />
}}<br />
<br />
'''4.''' We see that some of the kernel module configs have wrong settings. Therefore we have a look at these settings in {{ic|/etc/modules-load.d/}}:<br />
{{hc|$ ls -Al /etc/modules-load.d/|<br />
...<br />
-rw-r--r-- 1 root root 79 1. Dez 2012 blacklist.conf<br />
-rw-r--r-- 1 root root 1 2. Mär 14:30 encrypt.conf<br />
-rw-r--r-- 1 root root 3 5. Dez 2012 printing.conf<br />
-rw-r--r-- 1 root root 6 14. Jul 11:01 realtek.conf<br />
-rw-r--r-- 1 root root 65 2. Jun 23:01 virtualbox.conf<br />
...<br />
}}<br />
<br />
'''5.''' The {{ic|Failed to find module 'blacklist usblp'}} error message might be related to a wrong setting inside of {{ic|blacklist.conf}}. Lets deactivate it with inserting a trailing '''#''' before each option we found via step 3:<br />
{{hc|/etc/modules-load.d/blacklist.conf|<br />
'''#''' blacklist usblp<br />
'''#''' install usblp /bin/false<br />
}}<br />
<br />
'''6.''' Now, try to start {{ic|systemd-modules-load}}:<br />
$ systemctl start systemd-modules-load<br />
If it was successful, this should not prompt anything. If you see any error, go back to step 3 and use the new PID for solving the errors left.<br />
<br />
If everything is ok, you can verify that the service was started successfully with:<br />
{{hc|$ systemctl status systemd-modules-load|2=<br />
systemd-modules-load.service - Load Kernel Modules<br />
Loaded: '''loaded''' (/usr/lib/systemd/system/systemd-modules-load.service; static)<br />
Active: '''active (exited)''' since So 2013-08-25 12:22:31 CEST; 34s ago<br />
Docs: man:systemd-modules-load.service(8)<br />
man:modules-load.d(5)<br />
Process: 19005 ExecStart=/usr/lib/systemd/systemd-modules-load (code=exited, status=0/SUCCESS)<br />
Aug 25 12:22:31 mypc systemd[1]: '''Started Load Kernel Modules'''.<br />
}}<br />
<br />
Often you can solve these kind of problems like shown above. For further investigation look at [[#Diagnosing boot problems]].<br />
<br />
=== Diagnosing boot problems ===<br />
<br />
''systemd'' has several options for diagnosing problems with the boot process. See [[boot debugging]] and the [http://freedesktop.org/wiki/Software/systemd/Debugging/ systemd debugging documentation].<br />
<br />
=== Diagnosing problems with a specific service ===<br />
<br />
{{Accuracy|This may not catch all errors such as missing libraries.|User talk:Alucryd#Plex}}<br />
<br />
If some ''systemd'' service misbehaves and you want to get more information about what is going on, set the {{ic|SYSTEMD_LOG_LEVEL}} [[environment variable]] to {{ic|debug}}. For example, to run the ''systemd-networkd'' daemon in debug mode:<br />
<br />
# systemctl stop systemd-networkd<br />
# SYSTEMD_LOG_LEVEL=debug /lib/systemd/systemd-networkd<br />
<br />
Or, equivalently, modify the service file temporarily for gathering enough output. For example: <br />
<br />
{{hc|/usr/lib/systemd/system/systemd-networkd.service|2=<br />
[Service]<br />
...<br />
Environment=SYSTEMD_LOG_LEVEL=debug<br />
....<br />
}}<br />
<br />
If debug information is required long-term, add the variable the [[#Editing provided units|regular]] way.<br />
<br />
=== Shutdown/reboot takes terribly long ===<br />
<br />
If the shutdown process takes a very long time (or seems to freeze) most likely a service not exiting is to blame. ''systemd'' waits some time for each service to exit before trying to kill it. To find out if you are affected, see [http://freedesktop.org/wiki/Software/systemd/Debugging/#shutdowncompleteseventually this article].<br />
<br />
=== Short lived processes do not seem to log any output ===<br />
<br />
If {{ic|journalctl -u foounit}} does not show any output for a short lived service, look at the PID instead. For example, if {{ic|systemd-modules-load.service}} fails, and {{ic|systemctl status systemd-modules-load}} shows that it ran as PID 123, then you might be able to see output in the journal for that PID, i.e. {{ic|journalctl -b _PID&#61;123}}. Metadata fields for the journal such as {{ic|_SYSTEMD_UNIT}} and {{ic|_COMM}} are collected asynchronously and rely on the {{ic|/proc}} directory for the process existing. Fixing this requires fixing the kernel to provide this data via a socket connection, similar to {{ic|SCM_CREDENTIALS}}.<br />
<br />
=== Disabling application crash dumps journaling ===<br />
<br />
Edit the file {{ic|/etc/systemd/coredump.conf}} by adding this line:<br />
<br />
Storage=none<br />
<br />
and run:<br />
<br />
# systemctl daemon-reload<br />
<br />
to reload the configuration.<br />
<br />
=== Boot time increasing over time ===<br />
<br />
After using {{ic|systemd-analyze}} a number of users have noticed that their boot time has increased significantly in comparison with what it used to be. After using {{ic|systemd-analyze blame}} [[NetworkManager]] is being reported as taking an unusually large amount of time to start. <br />
<br />
The problem for some users has been due to {{ic|/var/log/journal}} becoming too large. This may have other impacts on performance, such as for {{ic|systemctl status}} or {{ic|journalctl}}. As such the solution is to remove every file within the folder (ideally making a backup of it somewhere, at least temporarily) and then setting a journal file size limit as described in [[#Journal size limit]].<br />
<br />
=== systemd-tmpfiles-setup.service fails to start at boot ===<br />
<br />
Starting with systemd 219, {{ic|/usr/lib/tmpfiles.d/systemd.conf}} specifies ACL attributes for directories under {{ic|/var/log/journal}} and, therefore, requires ACL support to be enabled for the filesystem the journal resides on.<br />
<br />
See [[Access Control Lists#Enabling ACL]] for instructions on how to enable ACL on the filesystem that houses {{ic|/var/log/journal}}.<br />
<br />
=== systemctl enable fails for symlinks in /etc/systemd/system ===<br />
<br />
If {{ic|/etc/systemd/system/''foo''.service}} is a symlink and {{ic|systemctl enable ''foo''.service}} is run, it will fail with this error:<br />
<br />
Failed to issue method call: No such file or directory<br />
<br />
This is a [https://bugzilla.redhat.com/show_bug.cgi?id=955379#c14 design choice] of systemd. As a workaround, enabling by absolute path works:<br />
<br />
# systemctl enable ''/absolute/path/foo''.service<br />
<br />
== See also ==<br />
<br />
*[http://www.freedesktop.org/wiki/Software/systemd Official web site]<br />
*[[Wikipedia:systemd|Wikipedia article]]<br />
*[http://0pointer.de/public/systemd-man/ Manual pages]<br />
*[http://freedesktop.org/wiki/Software/systemd/Optimizations systemd optimizations]<br />
*[http://www.freedesktop.org/wiki/Software/systemd/FrequentlyAskedQuestions FAQ]<br />
*[http://www.freedesktop.org/wiki/Software/systemd/TipsAndTricks Tips and tricks]<br />
*[http://0pointer.de/public/systemd-ebook-psankar.pdf systemd for Administrators (PDF)]<br />
*[http://fedoraproject.org/wiki/Systemd About systemd on Fedora Project]<br />
*[http://fedoraproject.org/wiki/How_to_debug_Systemd_problems How to debug systemd problems]<br />
*[http://www.h-online.com/open/features/Control-Centre-The-systemd-Linux-init-system-1565543.html Two] [http://www.h-online.com/open/features/Booting-up-Tools-and-tips-for-systemd-1570630.html part] introductory article in ''The H Open'' magazine.<br />
*[http://0pointer.de/blog/projects/systemd.html Lennart's blog story]<br />
*[http://0pointer.de/blog/projects/systemd-update.html Status update]<br />
*[http://0pointer.de/blog/projects/systemd-update-2.html Status update2]<br />
*[http://0pointer.de/blog/projects/systemd-update-3.html Status update3]<br />
*[http://0pointer.de/blog/projects/why.html Most recent summary]<br />
*[http://fedoraproject.org/wiki/SysVinit_to_Systemd_Cheatsheet Fedora's SysVinit to systemd cheatsheet]<br />
*[http://wiki.gentoo.org/wiki/Systemd Gentoo Wiki systemd page]<br />
*[[Emacs#Syntax highlighting for systemd Files|Emacs Syntax highlighting for Systemd files]]</div>Beta990https://wiki.archlinux.org/index.php?title=Uniform_look_for_Qt_and_GTK_applications&diff=412376Uniform look for Qt and GTK applications2015-12-15T13:12:09Z<p>Beta990: /* Using a GTK+ icon theme in Qt apps */ kde-gtk-config can change icon-theme,</p>
<hr />
<div>[[Category:Widget toolkits]]<br />
[[Category:Eye candy]]<br />
[[es:Uniform look for Qt and GTK applications]]<br />
[[it:Uniform look for Qt and GTK applications]]<br />
[[ja:Qt と GTK アプリケーションの外観の統合]]<br />
[[ru:Uniform look for Qt and GTK applications]]<br />
[[uk:Uniform look for Qt and GTK applications]]<br />
[[zh-cn:Uniform look for Qt and GTK applications]]<br />
{{Related articles start}}<br />
{{Related|GTK+}}<br />
{{Related|Qt}}<br />
{{Related articles end}}<br />
[[Qt]] and [[GTK+]] based programs both use a different widget toolkit to render the graphical user interface. Each come with different themes, styles and icon sets by default, among other things, so the "look and feel" differ significantly. This article will help you make your Qt and GTK+ applications look similar for a more streamlined and integrated desktop experience.<br />
<br />
== Overview ==<br />
<br />
To get a similar look between the toolkits, you will most likely have to modify the following:<br />
* '''Theme''': The custom appearance of an application, widget set, etc. It usually consists of a style, an icon theme and a color theme.<br />
* '''Style''': The graphical layout and look of the widget set.<br />
* '''Icon Theme''': A set of global icons.<br />
* '''Color Theme''': A set of global colors that are used in conjunction with the style.<br />
<br />
You can choose various approaches:<br />
* Use a special [[#Theme engines|theme engine]], which intermediates the modification of the other graphical toolkit to match your main toolkit.<br />
* Modify [[#Styles for both Qt and GTK+|GTK+ and Qt styles]] separately with the tools listed below for each toolkit and aim for choosing similarly looking themes (style, colors, icons, cursors, fonts).<br />
<br />
== Theme engines ==<br />
<br />
A ''theme engine'' can be thought of as a thin layer API which translates themes (excluding icons) between one or more toolkits. These engines add some extra code in the process and it is arguable that this kind of a solution is not as elegant and optimal as using native styles.<br />
<br />
=== QGtkStyle ===<br />
<br />
{{Warning|Depending on GTK+ 2 theme, this style may cause rendering issues such as transparent fonts or inconsistent widgets.}}<br />
<br />
This Qt style uses GTK+ 2 to render all components to blend in with [[GNOME]] and similar GTK+ based environments. Beginning with Qt 4.5, this style is included in Qt. It requires {{Pkg|gtk2}} to be installed and configured.<br />
<br />
This is the default Qt4 style in Cinnamon, GNOME and Xfce, and the default Qt5 style in Cinnamon, GNOME, MATE, LXDE and Xfce. In other environments:<br />
<br />
* For Qt4, it can be enabled with ''Qt Configuration'' ({{ic|qtconfig-qt4}}), choose ''GTK+'' under ''Appearance > GUI Style''. Alternatively, edit the {{ic|/etc/xdg/Trolltech.conf}} (system-wide) or {{ic|~/.config/Trolltech.conf}} (user-specific) file:<br />
<br />
{{hc|~/.config/Trolltech.conf|2=<br />
...<br />
[Qt]<br />
style=GTK+<br />
...<br />
}}<br />
<br />
* For Qt 5, it can be enabled by setting the following [[Environment variables#Graphical applications|environment variable]]: {{ic|1=QT_STYLE_OVERRIDE=GTK+}}.<br />
<br />
For full uniformity, make sure that the configured [[GTK+#Themes|GTK+ theme]] supports both GTK+ 2 and GTK+ 3.<br />
<br />
== Styles for both Qt and GTK+ ==<br />
<br />
There are widget style sets available for the purpose of integration, where builds are written and provided for both Qt and GTK+, all major versions included. With these, you can have one look for all applications regardless of the toolkit they had been written with.<br />
<br />
{{Note|1=Since version 3.16, GTK+ 3 [https://bbs.archlinux.org/viewtopic.php?pid=1518404#p1518404 does not support] non-CSS themes, hence previous solutions such as Oxygen-Gtk are [https://bugs.kde.org/show_bug.cgi?id=340288 no longer viable] options.}}<br />
<br />
=== Breeze ===<br />
<br />
Breeze is the default Qt style of KDE Plasma. It can be installed with the {{Pkg|breeze}} package for Qt5, the {{Pkg|breeze-kde4}} package for Qt4, and the {{Pkg|breeze-gtk}} package for GTK+ 2 and GTK+ 3.<br />
<br />
Once installed, you can use one of the many [[GTK+#Configuration tools|GTK+ configuration tools]] to change the GTK+ theme.<br />
<br />
=== Adwaita ===<br />
<br />
Adwaita is the default GNOME theme. It can be installed with the {{Pkg|gnome-themes-standard}} package, which contains the GTK+ 2 and 3 themes. [https://github.com/MartinBriza/adwaita-qt adwaita-qt] is an unofficial Qt port of the Adwaita theme. Unlike [[#QGtkStyle]], which mimic the GTK+ 2 theme, it provides a native Qt style made to look like the GTK+ 3 Adwaita. It can be [[install|installed]] with the {{AUR|adwaita-qt5}} package for the Qt5 version, and {{AUR|adwaita-qt4}} for the Qt 4 version.<br />
<br />
To set it as default, you can use {{Pkg|qt5ct}} for Qt 5, or {{ic|qtconfig-qt4}} (part of the {{Pkg|qt4}} package) for Qt 4.<br />
<br />
== Tips and tricks ==<br />
=== KDE file dialogs for GTK+ applications ===<br />
<br />
{{Warning|Some GTK+ applications may not be compatible with KGtk-wrapper (e.g. [[Chromium]]), sometimes the wrapper makes the application crash (e.g. [[Firefox]]) and even other applications like [[KDM]] (when used with e.g. [[Thunderbird]]).}}<br />
<br />
{{AUR|kgtk}} from the [[AUR]] is a wrapper script which uses {{ic|LD_PRELOAD}} to force KDE file dialogs in GTK+ 2.x apps. Once installed you can run GTK+ 2.x applications with {{ic|kgtk-wrapper}} in two ways (using [[Gimp]] in the examples):<br />
<br />
* Calling {{ic|kgtk-wrapper}} directly and using the GTK+ 2.x binary as an argument:<br />
:{{bc|$ /usr/bin/kgtk-wrapper gimp}}<br />
* Modifying the KDE .desktop shortcuts files you can find at {{ic|/usr/share/applications/}} to prefix the {{ic|Exec}} statement with kgtk-wrapper.<br />
:e.g. with [[GIMP]], edit the {{ic|/usr/share/applications/gimp.desktop}} shortcut file and replace {{ic|1=Exec=gimp-2.8 %U}} by {{ic|1=Exec=kgtk-wrapper gimp-2.8 %U}}.<br />
<br />
=== Using a GTK+ icon theme in Qt apps ===<br />
<br />
If running [[KDE]], install {{Pkg|kde-gtk-config}} and select the icon-theme under ''System Settings > Application Style > GTK''.<br />
<br />
If you are not using [[GNOME]], run {{ic|gconf-editor}}, look under ''desktop > gnome > interface'' for the {{ic|icon_theme}} key and change it to your preference. As you are not using GNOME, it is possible that you will have to set {{ic|1=export DESKTOP_SESSION=gnome}} somewhere in your {{ic|~/.xinitrc}} or, if you are using [[LightDM]], in {{ic|/etc/environment}}.<br />
<br />
=== Improve subpixel rendering of GTK apps under KDE Plasma ===<br />
<br />
See [[Font configuration#LCD filter]].<br />
<br />
== Troubleshooting ==<br />
<br />
=== Qt applications do not use QGtkStyle ===<br />
Qt will not apply QGtkStyle correctly if GTK+ is using the [[#GTK+-Qt Engine|GTK+-Qt Engine]]. Qt determines whether the GTK+-Qt Engine is in use by reading the GTK+ configuration files listed in the environmental variable {{ic|GTK2_RC_FILES}}. If the environmental variable is not set properly, Qt assumes you are using the engine, sets QGtkStyle to use the style GTK+ style ''Clearlooks'', and outputs an error message:<br />
<br />
QGtkStyle cannot be used together with the GTK_Qt engine.<br />
<br />
Another error you may get after launching {{ic|qtconfig-qt4}} from a shell and selecting the GTK+ style is:<br />
<br />
QGtkStyle was unable to detect the current GTK+ theme.<br />
<br />
According to [https://bbs.archlinux.org/viewtopic.php?id&#61;99175&p&#61;1 this thread], you may simply have to install {{Pkg|libgnomeui}} to solve this issue. This has the added benefit that you do not need to edit a file every time you change your theme via a graphical tool, like the one provided by xfce.<br />
<br />
Users of [[Openbox]] and other non-GNOME environments may encounter this problem. To solve this, first add the following to your {{ic|.xinitrc}} file:<br />
{{hc|.xinitrc|<nowiki><br />
...<br />
export GTK2_RC_FILES="$HOME/.gtkrc-2.0"<br />
...<br />
</nowiki>}}<br />
<br />
{{Note|<br />
* Make sure to add this line before invoking the window manager.<br />
* You can add multiple paths by separating them with colons.<br />
* Make sure to use {{ic|$HOME}} instead of {{ic|~}} as it will not properly expand to the user's home directory.<br />
}}<br />
<br />
Then specify the theme you want in the {{ic|~/.gtkrc-2.0}} file using a [[#GTK2 styles|dedicated application]] or manually, by adding:<br />
{{hc|.gtkrc-2.0|<nowiki><br />
...<br />
gtk-theme-name="[name of theme]"<br />
...<br />
</nowiki>}}<br />
<br />
Some tools only insert the following include directive in {{ic|~/.gtkrc-2.0}}:<br />
{{hc|.gtkrc-2.0|<br />
...<br />
include "/usr/share/themes/SomeTheme/gtk-2.0/gtkrc"<br />
...<br />
}}<br />
<br />
which apparently is not recognized by all versions of QGtkStyle. You can hotfix this problem by inserting the {{ic|gtk-theme-name}} manually in your {{ic|~/.gtkrc-2.0}} file like above.<br />
<br />
{{Note|Style-changing applications will most probably rewrite the {{ic|~/.gtkrc-2.0}} file the next time you change themes.}}<br />
<br />
If these steps do not work, install {{Pkg|gconf}} and run this command:<br />
<br />
gconftool-2 --set --type string /desktop/gnome/interface/gtk_theme [name of theme]<br />
<br />
If you further want to set the same icon and cursor theme, then you have to specify them, too.<br />
<br />
gconftool-2 --set --type string /desktop/gnome/interface/icon_theme Faenza-Dark<br />
<br />
This sets the icon theme to Faenza-Dark located in {{ic|/usr/share/icons/Faenza-Dark}}. For the cursor theme you first have to set the gconf value.<br />
<br />
gconftool-2 --set --type string /desktop/gnome/peripherals/mouse/cursor_theme Adwaita<br />
<br />
Then you will have to create the file {{ic|/usr/share/icons/default/index.theme}} with the following lines:<br />
<br />
[Icon Theme]<br />
Inherits=Adwaita<br />
<br />
=== Themes not working in GTK+ apps ===<br />
<br />
If the style or theme engine you set up is not showing in your GTK applications then it is likely your GTK+ settings files are not being loaded for some reason. You can check where your system expects to find these files by doing the following..<br />
$ export | grep gtk<br />
<br />
Usually the expected files should be {{ic|~/.gtkrc}} for GTK1 and {{ic|~/.gtkrc2.0}} or {{ic|~/.gtkrc2.0-kde}} for GTK+ 2.x.<br />
<br />
Newer versions of {{AUR|gtk-qt-engine}}{{Broken package link|{{aur-mirror|gtk-qt-engine}}}} use {{ic|~/.gtkrc2.0-kde}} and set the export variable in {{ic|~/.kde/env/gtk-qt-engine.rc.sh}}.<br />
If you recently removed '''gtk-qt-engine''' and are trying to set a GTK+ theme then you must also remove {{ic|~/.kde/env/gtk-qt-engine.rc.sh}} and reboot. Doing this will ensure that GTK+ looks for its settings in the standard {{ic|~/.gtkrc2.0}} instead of the {{ic|~/.gtkrc2.0-kde}} file.</div>Beta990https://wiki.archlinux.org/index.php?title=GTK&diff=412375GTK2015-12-15T13:10:58Z<p>Beta990: /* Configuration tools */ Appearance => Style</p>
<hr />
<div>[[Category:Widget toolkits]]<br />
[[cs:GTK+]]<br />
[[de:GTK+]]<br />
[[es:GTK+]]<br />
[[it:GTK+]]<br />
[[ja:GTK+]]<br />
[[ru:GTK+]]<br />
[[uk:GTK+]]<br />
[[zh-CN:GTK+]]<br />
{{Related articles start}}<br />
{{Related|Uniform Look for Qt and GTK Applications}}<br />
{{Related|Qt}}<br />
{{Related|GNU Project}}<br />
{{Related|GTK+/Development}}<br />
{{Related articles end}}<br />
From the [http://www.gtk.org GTK+ website]:<br />
:''GTK+, or the GIMP Toolkit, is a multi-platform toolkit for creating graphical user interfaces. Offering a complete set of widgets, GTK+ is suitable for projects ranging from small one-off tools to complete application suites.''<br />
<br />
GTK+, The GIMP Toolkit, was initially made by the [[GNU Project]] for the [[GIMP]] but is now a very popular toolkit with bindings for many languages. This article will explore the tools used to configure the GTK+ theme, style, icon, font and font size, and also detail manual configuration.<br />
<br />
== Installation ==<br />
<br />
Two versions of GTK+ are currently available in the [[official repositories]]. They can be [[install]]ed with the following packages:<br />
* '''GTK+ 3.x''' is available with the {{Pkg|gtk3}} package.<br />
* '''GTK+ 2.x''' is available with the {{Pkg|gtk2}} package.<br />
* '''GTK+ 1.x''' is available with the {{AUR|gtk}} package.<br />
<br />
== Themes ==<br />
<br />
In GTK+ 2, the default theme is ''Raleigh'', but Arch Linux has a custom configuration file at {{ic|/usr/share/gtk-2.0/gtkrc}}, which sets the default theme to ''Adwaita''. In GTK+ 3, the default theme is ''Adwaita'', but ''HighContrast'' and ''Raleigh'' themes are also included.<br />
<br />
To force a specific theme, you can set environment variables.<br />
* For GTK+ 2, use the {{ic|GTK2_RC_FILES}} environment variable, for example:<br />
$ GTK2_RC_FILES=/usr/share/themes/Industrial/gtk-2.0/gtkrc gimp<br />
:will launch GIMP with the Industrial theme.<br />
* For GTK+ 3, use the {{ic|GTK_THEME}} environment variable, for example:<br />
$ GTK_THEME=Adwaita:dark gnome-calculator<br />
:will launch GNOME Calculator with the dark variant of Adwaita theme.<br />
<br />
More themes can be installed from the official repositories or the [[AUR]].<br />
<br />
'''Both GTK+ 2 and GTK+ 3 are supported:'''<br />
* {{App|Breeze|GTK+ version of KDE's default widget theme.|https://quickgit.kde.org/?p&#61;breeze-gtk.git|{{Pkg|breeze-gtk}}}}<br />
* {{App|Deepin|Default theme for the Deepin desktop.|https://gitcafe.com/Deepin/deepin-gtk-theme|{{Pkg|deepin-gtk-theme}}}}<br />
* {{App|GNOME Standard Themes|Default themes for the GNOME desktop. Includes: ''Adwaita'', ''HighContrast''|https://github.com/GNOME/gnome-themes-standard|{{Pkg|gnome-themes-standard}}}}<br />
* {{App|MATE Themes|Default themes for the MATE desktop. Includes: ''BlackMATE'', ''BlueMenta'', ''Blue-Submarine'', ''ContrastHigh'', ''ContrastHighInverse'', ''GreenLaguna'', ''Green-Submarine'', ''Menta'', ''TraditionalGreen'', ''TraditionalOk'', ''TraditionalOkTest''|https://github.com/mate-desktop/mate-themes|{{Pkg|mate-themes}}}}<br />
* {{App|Numix|A flat and light theme with a modern look (GNOME, Openbox, Unity, Xfce).|https://numixproject.org/|{{Pkg|numix-themes}}}}<br />
* {{App|Arc|A flat theme with a modern look and transparent elements.|https://github.com/horst3180/Arc-theme|{{AUR|gtk-theme-arc-git}}}}<br />
* {{App|Ceti-2|Theme for GTK 3, GTK 2 and Gnome-Shell.|http://horst3180.deviantart.com/art/Ceti-2-Theme-489193140|{{AUR|ceti-2-themes}}}}<br />
* {{App|Clearlooks-Phénix|GTK3 theme visually close to Clearlooks.|https://github.com/jpfleury/clearlooks-phenix|{{AUR|clearlooks-phenix-gtk-theme}}}}<br />
* {{App|Gnome-breeze|A GTK theme created to match with the new Plasma 5 Breeze.|https://github.com/dirruk1/gnome-breeze|{{AUR|gnome-breeze-git}}}}<br />
* {{App|Greybird|A grey and blue Xfce theme, used by default in Xubuntu 12.04.|http://shimmerproject.org/our-projects/greybird/|{{AUR|xfce-theme-greybird}}}}<br />
* {{App|Orion|A modern and light GTK theme.|http://deviantart.com/view/281431756|{{AUR|gtk-theme-orion}}}}<br />
* {{App|Vertex|Theme for GTK 3, GTK 2, Gnome-Shell and Cinnamon.|http://horst3180.deviantart.com/art/Vertex-Theme-470663601|{{AUR|vertex-themes}}}}<br />
* {{App|Zukitwo|Themes for GTK, gnome-shell and more.|http://gnome-look.org/content/show.php/Zukitwo?content&#61;140562|{{AUR|zukitwo-themes}}}}<br />
<br />
'''Only GTK+ 2 is supported:'''<br />
* {{App|GTK+ Engines|Theme engines for GTK+ 2. Includes: ''Clearlooks'', ''Crux'', ''Industrial'', ''Mist'', ''Redmond'', ''ThinIce''|https://github.com/GNOME/gtk-engines|{{Pkg|gtk-engines}}}}<br />
* {{App|Xfce Gtk+ Engine|Xfce Gtk+-2.0 engine and themes|http://git.xfce.org/xfce/gtk-xfce-engine/|{{Pkg|gtk-xfce-engine}}}}<br />
* {{App|Oxygen-Gtk|Port of the default KDE widget theme (Oxygen) to GTK2|https://projects.kde.org/projects/playground/artwork/oxygen-gtk/|{{Pkg|oxygen-gtk2}}}}<br />
* {{App|Aurora Gtk Engine|Latest member of the Clearlooks family.|http://gnome-look.org/content/show.php/Aurora+Gtk+Engine?content&#61;56438|{{Pkg|gtk-engine-aurora}}}}<br />
* {{App|Openbox Themes|Various themes for the Openbox window manager.|https://www.debian.org/|{{Pkg|openbox-themes}}}}<br />
* {{App|QtCurve|A configurable set of widget styles for KDE and Gtk.|https://projects.kde.org/projects/playground/base/qtcurve|{{Pkg|qtcurve-gtk2}}}}<br />
<br />
There are a number of additional GTK+ themes in the [[AUR]]: [https://aur.archlinux.org/packages.php?K=gtk-theme search for gtk-theme], [https://aur.archlinux.org/packages.php?K=gtk2-theme search for gtk2-theme].<br />
<br />
{{Note|<br />
*Because GTK+ 3 changes rapidly, GTK+ 3 themes often require re-working after a GTK+ 3 release. For this reason, not all GTK+ 3 themes may look as intended when used with the latest GTK+ 3 version.<br />
* Some themes may require {{Pkg|librsvg}} to display correctly, but not all specify it as a dependency. Try installing it if the chosen theme looks broken.<br />
* Some themes are not usable as-is for displaying a panel (light text over light background), so you need to use the provided [http://i.imgur.com/QmeyN.png panel background].<br />
}}<br />
<br />
=== GTK+ and Qt ===<br />
<br />
If you have GTK+ and Qt (KDE) applications on your desktop then you know that their looks do not blend well. If you wish to make your GTK+ styles match your Qt styles please read [[Uniform look for Qt and GTK applications]].<br />
<br />
== Configuration tools ==<br />
<br />
Most major [[desktop environments]] provide tools to configure the GTK+ theme, icons, font and font size, and manage these settings via [http://standards.freedesktop.org/xsettings-spec/xsettings-spec-0.5.html XSettings]:<br />
* If you use [[Cinnamon]], use Themes tool (''cinnamon-settings themes''): go to ''System Settings > Themes''.<br />
* If you use [[Enlightenment]]: go to ''Settings > All > Look > Application Theme''.<br />
* If you use [[GNOME]], use GNOME Tweak Tool (''gnome-tweak-tool''): install {{Pkg|gnome-tweak-tool}}.<br />
* If you use [[MATE]], use the Appearance Preferences tool (''mate-appearance-properties''): go to ''System > Settings > Appearance''.<br />
* If you use [[Xfce]], use the Appearance tool: go to ''Settings > Appearance''.<br />
<br />
Other GUI tools generally overwrite the [[#Configuration|configuration files]].<br />
<br />
'''Both GTK+ 2 and GTK+ 3 are supported:'''<br />
* {{App|KDE GTK Configurator|Application that allows you to change style and font of GTK+2 and Gtk+3 applications.|https://projects.kde.org/kde-gtk-config|{{Pkg|kde-gtk-config}}}}<br />
:After installation, {{ic|kde-gtk-config}} can also be found in ''System Settings > Application Style > GTK''.<br />
* {{App|LXAppearance|Desktop independent GTK+2 and GTK+3 style configuration tool from the LXDE project (it does not require other parts of the LXDE desktop).|http://wiki.lxde.org/en/LXAppearance|{{Pkg|lxappearance}}}}<br />
<br />
'''Only GTK+ 2 is supported:'''<br />
* {{App|GTK-KDE4|Application that allows you to change style and font of GTK+2 applications in KDE4.|http://kde-look.org/content/show.php?content&#61;74689|{{AUR|gtk-kde4}}}}<br />
:After installation, {{ic|gtk-kde4}} can also be found in ''System Settings > Lost and Found > GTK style''.<br />
* {{App|GTK+ Change Theme|Little program that lets you change your GTK+ 2.0 theme (considered a better alternative to ''switch2'').|http://plasmasturm.org/code/gtk-chtheme/|{{Pkg|gtk-chtheme}}}}<br />
* {{App|GTK+ Preference Tool|GTK+ theme selector and font switcher.|http://gtk-win.sourceforge.net/home/index.php/Main/GTKPreferenceTool|{{Pkg|gtk2_prefs}}}}<br />
* {{App|GTK+ Theme Switch|Simple GTK+ theme switcher.|http://muhri.net/nav.php3?node&#61;gts|{{Pkg|gtk-theme-switch2}}}}<br />
<br />
== Configuration ==<br />
<br />
GTK+ settings can be specified manually in configuration files, but desktop environments and applications can override these settings. Depending on GTK+ version, these files are located at:<br />
* GTK+ 2 user specific: {{ic|~/.gtkrc-2.0}} or {{ic|~/.config/gtkrc-2.0}}<br />
* GTK+ 2 system wide: {{ic|/etc/gtk-2.0/gtkrc}}<br />
* GTK+ 3 user specific: {{ic|$XDG_CONFIG_HOME/gtk-3.0/settings.ini}}, or {{ic|$HOME/.config/gtk-3.0/settings.ini}} if {{ic|$XDG_CONFIG_HOME}} is not set<br />
* GTK+ 3 system wide: {{ic|/etc/gtk-3.0/settings.ini}}<br />
<br />
{{Note|<br />
*See the [http://library.gnome.org/devel/gtk3/stable/GtkSettings.html#GtkSettings.properties GTK+ 3 ''GtkSettings'' properties] (and [http://library.gnome.org/devel/gtk2/stable/GtkSettings.html#GtkSettings.properties GTK+ 2 properties]) in the GTK+ programming reference manual for the full list of currently supported GTK+ configuration options.<br />
*Some of the settings described below (such as {{ic|gtk-icon-sizes}}) are deprecated and ignored since GTK+ 3.10.<br />
*If you edit your GTK+ configuration files, only newly started applications will display the changes.}}<br />
<br />
=== Basic theme configuration ===<br />
<br />
To manually change the GTK+ theme, icons, font and font size, add the following to the configuration files, for example:<br />
<br />
'''GTK+ 2:'''<br />
{{hc|~/.gtkrc-2.0|2=<br />
gtk-icon-theme-name = "Adwaita"<br />
gtk-theme-name = "Adwaita"<br />
gtk-font-name = "DejaVu Sans 11"<br />
}}<br />
<br />
'''GTK+ 3:'''<br />
{{hc|$XDG_CONFIG_HOME/gtk-3.0/settings.ini|2=<br />
[Settings]<br />
gtk-icon-theme-name = Adwaita<br />
gtk-theme-name = Adwaita<br />
gtk-font-name = DejaVu Sans 11<br />
}}<br />
<br />
{{Note|The icon theme name is the name defined in the theme's index file, ''not'' the name of its directory.}}<br />
<br />
=== Dark theme variant ===<br />
<br />
Some GTK+ 3 theme contain a dark theme variant, but it's only used by default, when the application request it explicitly. To use dark theme variant with all GTK+ 3 applications, set:<br />
<br />
gtk-application-prefer-dark-theme = true<br />
<br />
=== Keyboard shortcuts ===<br />
<br />
Keyboard shortcuts (otherwise known as ''accelerators'' in GTK+) may be changed by hovering the mouse over the respective menu item, and pressing the desired key combination. To enable this feature, set:<br />
<br />
gtk-can-change-accels = 1<br />
<br />
=== GNOME menu delay ===<br />
<br />
This setting controls the delay between pointing the mouse at a menu and that menu opening. This delay is measured in milliseconds.<br />
<br />
gtk-menu-popup-delay = 0<br />
<br />
=== Reduce widget sizes ===<br />
<br />
If you have a small screen or you just do not like big icons and widgets, you can resize things easily. <br />
<br />
To have icons without text in toolbars ([https://developer.gnome.org/gtk3/stable/gtk3-Standard-Enumerations.html#GtkToolbarStyle valid values]), use<br />
<br />
gtk-toolbar-style = GTK_TOOLBAR_ICONS<br />
<br />
To use smaller icons, use a line like this:<br />
<br />
gtk-icon-sizes = "panel-menu=16,16:panel=16,16:gtk-menu=16,16:gtk-large-toolbar=16,16\<br />
:gtk-small-toolbar=16,16:gtk-button=16,16"<br />
<br />
Or to remove icons from buttons completely:<br />
<br />
gtk-button-images = 0<br />
<br />
You can also remove icons from menus:<br />
<br />
gtk-menu-images = 0<br />
<br />
See also [http://martin.ankerl.com/2008/10/10/how-to-make-a-compact-gnome-theme/] and [http://gnome-look.org/content/show.php/Simple+eGTK?content=119812].<br />
<br />
=== File-Chooser Startup-Location ===<br />
<br />
Open the file-chooser within the '''current-working-directory''' and not with the artifical '''recent''' location. Normally the '''current-working-directory''' is '''home-directory'''.<br />
<br />
'''GTK+ 3'''<br />
<br />
Modify DConf with ''gsettings'', there is no configuration file available:<br />
<br />
$ gsettings set org.gtk.Settings.FileChooser startup-mode cwd<br />
<br />
'''GTK+ 2'''<br />
<br />
Modify {{ic|~/.config/gtk-2.0/gtkfilechooser.ini}}configuration file:<br />
<br />
{{hc|~/.config/gtk-2.0/gtkfilechooser.ini|<br />
StartupMode&#61;cwd}}<br />
<br />
=== Legacy scrolling behavior ===<br />
<br />
{{Note|This setting is not obeyed by all GTK+ applications.}}<br />
{{Tip|Legacy scrolling behaviour can be achieved reliably simply by using right click instead of left click.}}<br />
<br />
Prior to GTK+ 3.6, clicking on either side of the slider in the scrollbar would move the scrollbar in the direction of the click by approximately one page. Since GTK+ 3.6, the slider will move directly to the position of the click. This behaviour can be reverted in some applications by creating the file with the content below:<br />
<br />
{{hc|~/.config/gtk-3.0/settings.ini|<nowiki><br />
[Settings]<br />
gtk-primary-button-warps-slider = false<br />
</nowiki>}}<br />
<br />
=== Disable overlay scrollbars ===<br />
<br />
Since GTK+ 3.15, overlay scrollbars are enabled by default, meaning that scrollbars will be shown only on mouseover in GTK+ 3 applications. This behavior can be reverted by setting the following environment variable: {{ic|1=GTK_OVERLAY_SCROLLING=0}}. <br />
<br />
See [[Environment variables#Graphical applications]].<br />
<br />
==== Remove overlay scroll indicators ====<br />
<br />
The positions of the overlay scrollbars are indicated by thin dashed lines in the application window. These dashed lines will be present even when overlay scrolling is disabled using the environment variable discussed in the section above. To remove the indicator lines, create the following file:<br />
<br />
{{hc|~/.config/gtk-3.0/gtk.css|<br />
/* Remove dotted lines from GTK+ 3 applications */<br />
.undershoot.top, .undershoot.right, .undershoot.bottom, .undershoot.left { background-image: none; }<br />
}}<br />
<br />
== GTK+ and HTML with Broadway ==<br />
The GDK Broadway backend provides support for displaying GTK+ applications in a web browser, using HTML5 and web sockets. <br />
[https://developer.gnome.org/gtk3/3.8/gtk-broadway.html]<br />
<br />
When using broadwayd, specify the display number to use, prefixed with a colon, similar to X. The default display number is 1.<br />
<br />
$ display_number&#61;:5<br />
Start it.<br />
$ broadwayd $display_number <br />
<br />
Port Used on default<br />
port &#61; 8080 + ($display_number - 1)<br />
<br />
Point your browser to http://localhost:port<br />
<br />
To Start apps<br />
<br />
$ GDK_BACKEND&#61;broadway BROADWAY_DISPLAY&#61;$display_number ''<<app>>''<br />
<br />
Alternatively can set address and port<br />
<br />
$ broadwayd --port $port_number --address $address $display_number<br />
<br />
== Troubleshooting ==<br />
<br />
=== Different themes between GTK+ 2 and GTK+ 3 applications ===<br />
<br />
In general, if a selected theme has support for both GTK+ 2 and GTK+ 3, the theme will be applied to all GTK+ 2 and GTK+ 3 applications. If a selected theme has support for only GTK+ 2, it will be used for GTK+ 2 applications and the default GTK+ theme will be used for GTK+ 3 applications. If the selected theme has support for only GTK+ 3, it will be used for GTK+ 3 applications and the default GTK+ theme will be used for GTK+ 2 applications. Thus for application theme consistency, it is best to use a theme which has support for both GTK+ 2 and GTK+ 3.<br />
<br />
You could find what themes installed on your system have both an GTK+ 2 and GTK+ 3 version by using this command (does not work with names containing spaces):<br />
find $(find ~/.themes /usr/share/themes/ -wholename "*/gtk-3.0" | sed -e "s/^\(.*\)\/gtk-3.0$/\1/") -wholename "*/gtk-2.0" | sed -e "s/.*\/\(.*\)\/gtk-2.0/\1"/<br />
<br />
=== Theme not applied to root applications ===<br />
<br />
As user theme files ({{ic|$XDG_CONFIG_HOME/gtk-3.0/settings.ini}}, {{ic|~/.gtkrc-2.0}}) are not read by other accounts, the selected theme will not apply to [[Running_X_apps_as_root|X applications run as root]]. Possible solutions include:<br />
<br />
* Configure system-wide theme files: {{ic|/etc/gtk-3.0/settings.ini}} (GTK+ 3) or {{ic|/etc/gtk-2.0/gtkrc}} (GTK+ 2)<br />
* Create symlinks, e.g<br />
# ln -s /home/[username]/.gtkrc-2.0 /root/.gtkrc-2.0<br />
* Adjust the theme as root<br />
# gksu lxappearance<br />
* Use a settings daemon (this is what most desktop environments do). A desktop-agnostic variant using [http://standards.freedesktop.org/xsettings-spec/xsettings-spec-0.5.html XSettings] is available in the [[AUR]] under {{aur|xsettingsd-git}}.<br />
<br />
=== Client-side decorations ===<br />
<br />
GTK 3.12 introduced [http://blogs.gnome.org/mclasen/2013/12/05/client-side-decorations-in-themes/ client-side decorations], which move the title-bar away from the window manager. This may present issues such as [http://redmine.audacious-media-player.org/boards/1/topics/1135 double title-bars], no title-bar at all or [https://github.com/chjj/compton/issues/189 double shadows] with compositing enabled.<br />
<br />
To remove the shadow and gap around windows (for example in combination with a tiling window manager), create the following file:<br />
<br />
{{hc|~/.config/gtk-3.0/gtk.css|<nowiki>.window-frame, .window-frame:backdrop {<br />
box-shadow: 0 0 0 black;<br />
border-style: none;<br />
margin: 0;<br />
border-radius: 0;<br />
}<br />
<br />
.titlebar {<br />
border-radius: 0;<br />
}<br />
<br />
.window-frame.csd.popup {<br />
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(0, 0, 0, 0.13);<br />
}<br />
<br />
.header-bar {<br />
background-image: none;<br />
background-color: #ededed;<br />
box-shadow: none;<br />
}<br />
/* You may want to use this if you don't like the double title.<br />
GtkLabel.title {<br />
opacity: 0;<br />
}*/<br />
</nowiki>}}<br />
<br />
To adjust the buttons in the header bar, use the {{ic|gtk-decoration-layout}} setting. [https://developer.gnome.org/gtk3/stable/GtkSettings.html#GtkSettings--gtk-decoration-layout] The below examples removes all buttons:<br />
<br />
{{hc|~/.config/gtk-3.0/settings.ini|2=<br />
gtk-decoration-layout=menu:<br />
}}<br />
<br />
=== cedilla ç/Ç instead of ć/Ć ===<br />
<br />
See [https://bugs.launchpad.net/ubuntu/+source/gtk+2.0/+bug/518056], and [https://bugs.launchpad.net/ubuntu/+source/gtk+2.0/+bug/518056/comments/37] for a workaround using Xcompose (US international layout).<br />
<br />
===Suppress warning about accessibility bus===<br />
<br />
If your terminal shows a warning like:<br />
<br />
WARNING **: Couldn't connect to accessibility bus:<br />
<br />
when running GTK+ 3 programs, you can suppress the warning by executing it like:<br />
<br />
NO_AT_BRIDGE=1 ''theprogram''<br />
<br />
or by adding {{ic|1=NO_AT_BRIDGE=1}} to your {{ic|~/.bashrc}} or {{ic|/etc/environment}}.<br />
<br />
=== Titlebar background color mismatch ===<br />
<br />
If you are using a [[window manager]] which uses a window decoration theme that mimics the GTK+ theme background color, you may find that the titlebar color no longer completely matches the application color in some GTK+ 3 applications. As a workaround, create the following file:<br />
{{hc|~/.config/gtk-3.0/gtk.css|<br />
/* Always use background color */<br />
GtkWindow {<br />
background-color: @theme_bg_color;<br />
}<br />
<br />
/* Fix tooltip background override */<br />
.tooltip {<br />
background-color: rgba(0, 0, 0, 0.8);<br />
}<br />
<br />
.tooltip * {<br />
background-color: transparent;<br />
}<br />
<br />
/* Fix Nautilus desktop window background override */<br />
NautilusWindow {<br />
background-color: transparent; <br />
}<br />
}}<br />
<br />
=== Wrong focus events with tiling window managers ===<br />
<br />
{{Note|1=This disables touchscreen support for GTK3 applications. [https://bugzilla.gnome.org/show_bug.cgi?id=677329#c14]}}<br />
<br />
[[Environment_variables#Defining_variables|Define]] {{ic|1=GDK_CORE_DEVICE_EVENTS=1}} to use GTK2 style input, instead of xinput2. [https://bugzilla.gnome.org/show_bug.cgi?id=677329#c10]<br />
<br />
=== Thumbnail support for GTK+ 2 file dialog ===<br />
<br />
Install {{AUR|gtk2-patched-filechooser-icon-view}} to have the option to view files as thumbnails instead of list in the GTK+ file chooser.<br />
<br />
== Examples ==<br />
<br />
GTK+ 2 configuration example:<br />
<br />
{{hc|~/.gtkrc-2.0|2=<br />
# GTK theme<br />
include "/usr/share/themes/Clearlooks/gtk-2.0/gtkrc"<br />
<br />
# Font<br />
style "myfont" {<br />
font_name = "DejaVu Sans 8"<br />
}<br />
widget_class "*" style "myfont"<br />
gtk-font-name = "DejaVu Sans 8"<br />
<br />
# Icon theme<br />
gtk-icon-theme-name = "Tango"<br />
<br />
# Toolbar style<br />
gtk-toolbar-style = GTK_TOOLBAR_ICONS<br />
}}<br />
<br />
GTK+ 3 example of a configuration as converted from GTK+ 2.x to GTK+ 3.x by {{Pkg|lxappearance}}:<br />
<br />
{{hc|$XDG_CONFIG_HOME/gtk-3.0/settings.ini|2=<br />
[Settings] <br />
gtk-theme-name=TraditionalOk<br />
gtk-icon-theme-name=Fog<br />
gtk-font-name=Luxi Sans 12<br />
gtk-cursor-theme-name=mate<br />
gtk-cursor-theme-size=24<br />
gtk-toolbar-style=GTK_TOOLBAR_BOTH_HORIZ<br />
gtk-toolbar-icon-size=GTK_ICON_SIZE_LARGE_TOOLBAR<br />
gtk-button-images=1<br />
gtk-menu-images=1<br />
gtk-enable-event-sounds=0<br />
gtk-enable-input-feedback-sounds=0<br />
gtk-xft-antialias=1<br />
gtk-xft-hinting=1<br />
gtk-xft-hintstyle=hintslight<br />
gtk-xft-rgba=rgb<br />
}}<br />
<br />
== See also ==<br />
<br />
* [http://www.gtk.org/ The official GTK+ website]<br />
* [[Wikipedia:GTK+|Wikipedia article about GTK+]]<br />
* [http://developer.gnome.org/gtk-tutorial/stable/ GTK+ 2.0 Tutorial]<br />
* [http://developer.gnome.org/gtk3/stable/ GTK+ 3 Reference Manual]<br />
* [http://developer.gnome.org/gtkmm-tutorial/stable/ gtkmm Tutorial]<br />
* [http://developer.gnome.org/gtkmm/stable/ gtkmm Reference Manual]</div>Beta990https://wiki.archlinux.org/index.php?title=KDE&diff=412374KDE2015-12-15T13:05:04Z<p>Beta990: /* Qt 5 icons theme */ Removed KDE4 reference, added note about Gnome icon-themes</p>
<hr />
<div>[[Category:KDE]]<br />
[[ar:KDE]]<br />
[[cs:KDE]]<br />
[[de:KDE]]<br />
[[es:KDE]]<br />
[[fr:KDE]]<br />
[[it:KDE]]<br />
[[ja:KDE]]<br />
[[pl:KDE]]<br />
[[ru:KDE]]<br />
[[tr:KDE Masaüstü Ortamı]]<br />
[[zh-CN:KDE]]<br />
[[zh-TW:KDE]]<br />
{{Related articles start}}<br />
{{Related|Desktop environment}}<br />
{{Related|Display manager}}<br />
{{Related|Dolphin}}<br />
{{Related|Window manager}}<br />
{{Related|Qt}}<br />
{{Related|KDM}}<br />
{{Related|KDevelop 4}}<br />
{{Related|Trinity}}<br />
{{Related|Uniform Look for Qt and GTK Applications}}<br />
{{Related articles end}}<br />
<br />
KDE is a software project currently comprising of a [[desktop environment]] known as Plasma (or Plasma Workspaces), a collection of libraries and frameworks (KDE Frameworks) and several applications (KDE Applications) as well. KDE upstream has a well maintained [http://userbase.kde.org/ UserBase wiki]. Detailed information about most KDE applications can be found there.<br />
<br />
== Installation ==<br />
<br />
=== Plasma Desktop ===<br />
<br />
{{Note|<br />
*Plasma 5 is not co-installable with Plasma 4.<br />
*The Plasma 4 desktop is unmaintained since August 2015.[https://www.kde.org/announcements/announce-applications-15.08.0.php] It is no longer in the official repositories since December 2015.[https://www.archlinux.org/news/dropping-plasma-4/]}}<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 [[KDE Packages]]. Alternatively, for a more minimal Plasma installation, install the {{Pkg|plasma-desktop}} package.<br />
<br />
=== Upgrading from Plasma 4 to 5 ===<br />
<br />
# Isolate {{ic|multi-user.target}}{{bc|# systemctl isolate multi-user.target}} <br />
# [[Pacman|Uninstall]] the kdebase-workspace package{{bc|# pacman -Rc kdebase-workspace}} <br />
# [[Install]] the {{pkg|plasma-meta}} package or the {{grp|plasma}} group.<br />
# If you use KDM as display manager, disable it{{bc|# systemctl disable kdm}} and enable [[SDDM]]{{bc|# systemctl enable sddm}} or install and enable any other [[display manager]].<br />
# Reboot.<br />
<br />
{{Note|The Plasma 4 configuration is not automatically migrated to Plasma 5, so you will have to configure your desktop from scratch.}}<br />
<br />
=== KDE applications and language packs ===<br />
<br />
To install the full set of KDE Applications, install the {{Grp|kde-applications}} group or the {{Pkg|kde-applications-meta}} meta-packages to install specific modules. Note that this will only install applications, it will not install any version of the Plasma Desktop.<br />
<br />
If you need language files, install {{ic|kde-l10n-'''yourlanguagehere'''}} (e.g. {{Pkg|kde-l10n-de}} for the German language). For a full list of available languages see [https://www.archlinux.org/packages/extra/any/kde-l10n/ this link].<br />
<br />
== Starting Plasma ==<br />
<br />
{{Tip|<br />
*[[KDM]] is not available in Plasma 5. KDE upstream [http://blog.davidedmundson.co.uk/blog/display_managers_finale recommends] using the [[SDDM]] display manager as it provides integration with the Plasma 5 theme.<br />
*To better integrate SDDM with Plasma, it is recommended to edit {{ic|/etc/sddm.conf}} to use the breeze theme. Refer to [[SDDM#Theme settings]] for instructions.}}<br />
<br />
To launch a Plasma 5 session, choose ''Plasma'' in your [[display manager]] menu.<br />
<br />
Alternatively, to start Plasma with ''startx'', append {{ic|exec startkde}} to your {{ic|.xinitrc}} file. If you want to start Xorg at login, please see [[Start X at login]].<br />
<br />
== Configuration ==<br />
<br />
Most settings for KDE applications are stored in {{ic|~/.config}}, but some older applications may use {{ic|~/.kde4}}. However, configuring KDE is primarily done through the '''System Settings''' application. It can be started from a terminal by executing ''systemsettings5''.<br />
<br />
Frameworks 5 applications can use KDE 4 configuration however they expect the configuration files to be located in different places. To allow Frameworks 5 applications running in KDE 4 to share the same configurations they may be moved to the new locations and symlinked back to the old. Examples are:<br />
*Konsole profiles from {{ic|~/.kde4/share/apps/konsole}} to {{ic|~/.local/share/konsole/}}<br />
*Application appearance from {{ic|~/.kde4/share/config/kdeglobals}} to {{ic|~/.config/kdeglobals}} <br />
<br />
=== Personalization ===<br />
<br />
==== Plasma desktop ====<br />
<br />
===== Themes =====<br />
<br />
{{Note|1=If the Plasma cursor theme is incorrect in some instances, see the following [https://bbs.archlinux.org/viewtopic.php?pid=1533071#p1533071 forum post] for a workaround.}}<br />
[http://kde-look.org/index.php?xcontentmode=76 Plasma themes] define the look of panels and plasmoids. For easy system-wide installation, some such themes are available in both the official repositories and the [https://aur.archlinux.org/packages.php?O=0&K=plasmatheme&do_Search=Go AUR].<br />
<br />
The easiest way to install themes is by going through the Desktop Settings control panel:<br />
<br />
Workspace Theme > Desktop Theme > Get new Themes<br />
<br />
This will present a nice frontend for [http://www.kde-look.org/ kde-look.org] that allows you to install, uninstall, or update third-party plasmoid scripts with literally just one click.<br />
<br />
Splash and Lock screens are currently unavailable so to customize these screens you have to modify the original theme found in {{ic|/usr/share/plasma/look-and-feel/}}.<br />
See [https://www.kubuntuforums.net/showthread.php?67599-Plasma-5-background-images&s=59832dc20e5bfc2948dbb591d8453f61 this thread] on the Kubuntu forums.<br />
<br />
Note that the [[SDDM]] login screen is not part of this theme.<br />
<br />
====== Qt and GTK+ Applications Appearance ======<br />
<br />
{{Tip|For Qt and GTK theme consistency, see [[Uniform look for Qt and GTK applications]].}}<br />
<br />
;Qt4<br />
For Qt4 applications to have a consistent appearance, you need to install {{Pkg|breeze-kde4}} and then pick Breeze as GUI Style in {{ic|qtconfig-qt4}}.<br />
<br />
;GTK+<br />
The recommended theme for a pleasant appearance in GTK+ applications is {{Pkg|breeze-gtk}} or {{AUR|gnome-breeze-git}}, a GTK+ theme designed to mimic the appearance of Plasma 5 Breeze.<br />
Install {{Pkg|kde-gtk-config}} and select the installed GTK-theme for GTK2/GTK3-Theme in ''System Settings > Application Style > GNOME Application Style''.<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 />
Plasmoid binaries can be installed using PKGBUILDs from [https://aur.archlinux.org/packages.php?O=0&K=plasmoid&do_Search=Go&PP=25&SO=d&SB=v AUR], or you can write your own PKGBUILD.<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 Widgets''.<br />
<br />
This will present a nice frontend for [http://www.kde-look.org/ kde-look.org] that allows you to install, uninstall, or update third-party plasmoid scripts with literally just one click.<br />
<br />
Most plasmoids are not created officially by KDE developers. You can also try installing Mac OS X widgets, Microsoft Windows Vista/7 widgets, Google Widgets, and even SuperKaramba widgets.<br />
<br />
===== Sound applet in the system tray =====<br />
<br />
[[Install]] {{Pkg|plasma-pa}} or {{Pkg|kmix}} (start Kmix from the Application Launcher).<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|~/.kde4/share/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-desktop": ("Plasma" "Plasma")/!d; s/^ *\([^ ]*\) .*/\1/g'); do<br />
xprop -id $WID -remove _KDE_NET_WM_SHADOW<br />
done<br />
</nowiki>}}<br />
<br />
The script can be run on login with ''Add Script'' in ''Autostart'':<br />
<br />
$ kcmshell4 autostart<br />
<br />
==== Window decorations ====<br />
<br />
[http://kde-look.org/index.php?xcontentmode=75 Window decorations] can be changed in ''System Settings > Workspace Appearance > 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?O=0&K=kdestyle&do_Search=Go&PP=25&SO=d&SB=v AUR].<br />
<br />
==== Icon themes ====<br />
<br />
Not many full system icons themes are available for KDE 4. You can open up ''System Settings > Application Appearance > Icons'' and browse for new ones or install them manually. Many of them can be found on [http://www.kde-look.org/ kde-look.org].<br />
<br />
Official logos, icons, CD labels and other artwork for Arch Linux are provided in the {{AUR|archlinux-artwork}} package. After installing you can find such artwork at {{ic|/usr/share/archlinux/}}.<br />
<br />
===== Qt 5 icons theme =====<br />
<br />
Icon-themes can be installed and changed on ''System Settings > Icons''.<br />
{{note|[[Gnome]] and KDE4 installed icon-themes may not be (fully) compatible with Plasma.<br />
It's recommended to install Plasma compatible icon-themes instead.}}<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''.<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 > Appearance > 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 '''96''' in ''System Settings > Application Appearance > Fonts''.<br />
<br />
If that does not work, try setting the DPI directly in your Xorg configuration as documented [[Xorg#Setting_DPI_manually|here]].<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]<br />
However, you can achieve something similar by editing the file {{ic|~/.config/kwinrc}} adding <br />
{{ic|1=BorderlessMaximizedWindows=true}} in the {{ic|[Windows]}} section.<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 > Printer Configuration''. To use this method, you must first install {{Pkg|print-manager}} and {{Pkg|cups}}.<br />
<br />
The {{ic|avahi-daemon.service}} and {{ic|org.cups.cupsd.service}} daemons must be started first; otherwise, you will get the following error:<br />
The service 'Printer Configuration' does not provide an interface 'KCModule'<br />
with keyword 'system-config- printer-kde/system-config-printer-kde.py'<br />
The factory does not support creating components of the specified type.<br />
<br />
If you are getting the following error, you need to give your user the right to manage printers.<br />
There was an error during CUPS operation: 'cups-authorization-canceled'<br />
<br />
For CUPS, this is set in {{ic|/etc/cups/cups-files.conf}}.<br />
<br />
Adding {{ic|lpadmin}} to {{ic|/etc/group}} and then to the {{ic|SystemGroup}} directive in {{ic|/etc/cups/cups-files.conf}} allows anyone in the {{ic|lpadmin}} group to configure printers. Do ''not'' add the {{ic|lp}} group to the {{ic|SystemGroup}} directive, or printing will fail.<br />
<br />
# groupadd -g107 lpadmin<br />
<br />
{{hc|/etc/cups/cups-files.conf|# Administrator user group...<br />
SystemGroup sys root lpadmin}}<br />
<br />
{{Tip|Read [[CUPS#Administration]] to get more details on how to configure CUPS.}}<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 usershares, which the stock smb.conf does not have enabled. Instructions to add them are in [[Samba#Creating usershare path]], after which sharing in Dolphin should work out of the box after restarting Samba.<br />
<br />
=== KDE Desktop activities ===<br />
<br />
KDE Desktop Activities are Plasma-based virtual-desktop-like sets of Plasma Widgets where you can independently configure widgets as if you have more than one screen or desktop.<br />
<br />
On your desktop, click the Cashew Plasmoid and, on the pop-up window, press "Activities".<br />
<br />
A plasma bar presenting you the current existing Plasma Desktop Activities will appear at the bottom of the screen. You can navigate between them by pressing the correspondent icons.<br />
<br />
=== Power saving ===<br />
<br />
Plasma has an integrated power saving service called "'''Powerdevil Power Management'''" that may adjust the power saving profile of the system and/or the brightness of the screen (if supported).<br />
<br />
=== Monitoring changes on local files and directories ===<br />
<br />
KDE now uses '''inotify''' directly from the kernel with '''kdirwatch''' (included in kdelibs), so Gamin or FAM are no longer needed. You may want to install this {{AUR|kdirwatch}}{{Broken package link|{{aur-mirror|kdirwatch}}}} from AUR which is a GUI frontend for kdirwatch.<br />
<br />
=== Autostarting applications ===<br />
<br />
{{Accuracy|See [[KDE Wallet#Using the KDE Wallet to store ssh keys]]. Merge general information here.}}<br />
<br />
Plasma can autostart applications and run scripts on startup and shutdown. To autostart an application, start {{ic|systemsettings}} and navigate to ''Startup and Shutdown'' -> ''Autostart'' and add the program or shell script of your choice. Note that programs can be autostarted on login only, whilst shell scripts can also be run on shutdown or even before Plasma itself starts. For applications, a {{ic|.desktop}} file will be created in the {{ic|~/.config/autostart}} directory. For shell scripts, a symlink will be created in one the following directories:<br />
* {{ic|~/.config/autostart-scripts}} - for starting at login.<br />
* {{ic|~/.config/plasma-workspace/shutdown}} - for starting on shutdown.<br />
* {{ic|~/.config/plasma-workspace/env}} - for starting prior to login.<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.<br />
<br />
'''Configuration for look and feel of GTK applications.'''<br />
* {{Pkg|kde-gtk-config}}<br />
* {{AUR|kcm-gtk}}{{Broken package link|{{aur-mirror|kcm-gtk}}}}<br />
* {{AUR|kcm-qt-graphicssystem}}<br />
<br />
'''Configuration for the GRUB bootloader.'''<br />
* {{AUR|grub2-editor}}{{Broken package link|{{aur-mirror|grub2-editor}}}}<br />
<br />
'''Configuration for the [[Uncomplicated Firewall]] (UFW)'''<br />
* {{AUR|kcm-ufw}}<br />
<br />
'''Configuration for [[PolicyKit]]'''<br />
* {{AUR|kcm-polkit-kde-git}}{{Broken package link|{{aur-mirror|kcm-polkit-kde-git}}}}<br />
<br />
'''Configuration for Wacom tablets'''<br />
* {{AUR|kcm-wacomtablet}}<br />
<br />
'''Configuration for systemd'''<br />
* {{Pkg|systemd-kcm}}<br />
<br />
More KCMs can be found at [http://kde-apps.org/index.php?xcontentmode=273 kde-apps.org].<br />
<br />
== Desktop search ==<br />
<br />
KDE implements desktop search with a software called Baloo, a file indexing and searching solution.<br />
<br />
=== Baloo ===<br />
<br />
==== Using and configuring Baloo ====<br />
<br />
In order to search using Baloo on the KDE Plasma Desktop, press {{ic|ALT+F2}} and type in your query. Within Dolphin press {{ic|CTRL+F}}.<br />
<br />
By default the Desktop Search KCM exposes only two options: A panel to blacklist folders and, as of 4.13.1, a way to disable it with one click.<br />
<br />
Alternatively you can edit your {{ic|~/.kde4/share/config/baloofilerc}} (KDE4) or {{ic|~/.config/baloofilerc}} (KF5) file ([https://community.kde.org/Baloo/Configuration info]). Additionally the {{ic|balooctl}} process can also be used. In order to disable Baloo run {{ic|balooctl disable}}.<br />
<br />
Once you added additional folders to the blacklist or disabled Baloo entirely, a process named {{ic|baloo_file_cleaner}} removes all unneeded index files automatically. They are stored under {{ic|~/.local/share/baloo/}}.<br />
<br />
More advanced configuration options are available through {{AUR|kcm_baloo_advanced}}.<br />
<br />
==== How do I index a removable device? ====<br />
<br />
By default every removable device is blacklisted. You just have to remove your device from the blacklist in the KCM panel.<br />
<br />
=== Web browsers ===<br />
==== Konqueror and Rekonq ====<br />
Konqueror supports two rendering engines – KHTML and QtWebKit (via the {{Pkg|kwebkitpart}} package) – Rekonq supports only QtWebKit. KHTML development was halted after Qt shipped WebKit but was kept for compatibility reasons. QtWebKit, in turn, has since been [https://www.mail-archive.com/development@qt-project.org/msg18866.html deprecated] by the Qt Project and replaced by [[Chromium]]-based Qt WebEngine which is currently not supported by either Konqueror or Rekonq.<br />
<br />
A successor named Fiber is currently in development, which will use Chromium's engine.<br />
<br />
==== Firefox ====<br />
Firefox can be configured to better integrate with Plasma. See [[Firefox#KDE_integration|Firefox KDE integration]] for details.<br />
<br />
==== Qupzilla ====<br />
Qupzilla ({{Pkg|qupzilla}}) is a Qt web browser with Plasma integration features. Qupzilla 2.0 will use Qt WebEngine intead of WebKit.<br />
<br />
== PIM ==<br />
<br />
KDE offers its own stack for personal information management. This includes emails, contacts, calendar, etc.<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.<br />
<br />
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 />
==== Disabling Akonadi ====<br />
<br />
See this [http://userbase.kde.org/Akonadi#Disabling_the_Akonadi_subsystem section in the KDE userbase]. Alternatively, install {{AUR|akonadi-fake}}.<br />
<br />
==== Database configuration ====<br />
<br />
Start {{ic|akonaditray}} from package {{Pkg|kdepim-runtime}}. Right click on it and select '''configure'''. In the Akonadi server configure tab, you can:<br />
* Configuring Akonadi to use MySQL/MariaDB Server<br />
** If your home directory is on a ZFS pool, you will need to create {{ic|~/.config/akonadi/mysql-local.conf}} with the following contents:<br />
<br />
[mysqld]<br />
innodb_use_native_aio = 0<br />
<br />
Otherwise you will get the [[MySQL#OS error 22 when running on ZFS|OS error 22]]<br />
* Configuring Akonadi to use PostgreSQL Server<br />
* Configuring Akonadi to use SQLite<br />
** Edit {{ic|~/.config/akonadi/akonadiserverrc}} to match the below<br />
<br />
[General]<br />
Driver=QSQLITE3<br />
<br />
[QSQLITE3]<br />
Name=/home/username/.local/akonadi/akonadi.db<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 />
You can choose between backends based on [[GStreamer]] and [[VLC]] – each available in versions for Qt4 applications and Qt5 applications ({{Pkg|phonon-qt4-gstreamer}}, {{Pkg|phonon-qt5-gstreamer}} – {{Pkg|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 [http://community.kde.org/Phonon/FeatureMatrix features set.]<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 at ''System Settings > Multimedia > Phonon > Backend''. For Plasma 5 this would be ''System Settings > Multimedia > Backend''.<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 />
<br />
== Useful applications ==<br />
<br />
The official set of KDE applications may be found [http://www.kde.org/applications/ here].<br />
<br />
=== Yakuake ===<br />
<br />
[[Yakuake]] provides a Quake-like terminal emulator whose visibility is toggled by the F12 key. It also has support for multiple tabs. Yakuake is available in the package {{Pkg|yakuake}}.<br />
<br />
=== KDE Telepathy ===<br />
<br />
[http://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 '+xx', e.g. '+49' for Germany). 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). Note that 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 />
== Tips and tricks ==<br />
<br />
=== Using an alternative window manager ===<br />
There may be reasons you want to use another window manager than KWin, for example to work around the DRI bug that causes [[PRIME#Black_screen_with_GL-based_compositors|black screen with PRIME]].<br />
<br />
To use an alternative [[window manager]] with Plasma open the ''System Settings'' panel, navigate to ''(Default) Applications > Window Manager > Use a different window manager'' and select the window manager you wish to use from the list.<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 {{ic|.xinitrc}} file:<br />
exec openbox-kde-session<br />
<br />
==== Compiz custom ====<br />
<br />
If you need to run Compiz with custom options and switches select ''Compiz custom'' and then create a script called {{ic|compiz-kde-launcher}} and add to it the commands you wish to use to start Compiz. See the example below:<br />
<br />
{{hc|/usr/local/bin/compiz-kde-launcher|<nowiki><br />
#!/bin/bash<br />
LIBGL_ALWAYS_INDIRECT=1<br />
compiz --replace &<br />
wait<br />
</nowiki>}}<br />
<br />
Then make it executable:<br />
$ chmod +x /usr/local/bin/compiz-kde-launcher<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 />
=== Integrate Android ===<br />
<br />
KDE Connect provides several features for you:<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 {{ic|KDE Connect}} from [https://play.google.com/store/apps/details?id=org.kde.kdeconnect_tp Google Play] or from [https://f-droid.org/repository/browse/?fdid=org.kde.kdeconnect_tp F-Droid].<br />
<br />
=== Configure KWin to use OpenGL ES ===<br />
Due to QtQuick2, both the Qt OpenGL module and KWin have to be [http://blog.martin-graesslin.com/blog/2013/11/kwin5-qtquick-2-and-the-caused-changes-for-opengl/ compiled against OpenGL ES.]<br />
<br />
=== Speed up application startup ===<br />
<br />
User Rob described a "[http://kdemonkey.blogspot.nl/2008/04/magic-trick.html magic trick]" on his blog to improve application start-up time by 50-150ms.<br />
To enable it, create this folder in your home:<br />
$ mkdir ~/.compose-cache/<br />
It can produce freezes under heavy io. To avoid this, also do:<br />
$ ln -sfv /run/user/$UID/ /home/$USER/.compose-cache<br />
<br />
{{Note|For those curious about what is going on here, this enables an optimization which Lubos (of general KDE speediness fame) came up with some time ago and was then rewritten and integrated into libx11. Ordinarily, on startup, applications read input method information from {{ic|/usr/share/X11/locale/''your locale''/Compose}}. This file is quite long (>5000 lines for the en_US.UTF-8 one) and takes some time to process. libX11 can create a cache of the parsed information which is much quicker to read subsequently, but it will only re-use an existing cache or create a new one in {{ic|~/.compose-cache}} if the directory already exists.}}<br />
<br />
=== Configuring monitor resolution / multiple monitors ===<br />
<br />
To enable display resolution management and multiple monitors in Plasma 5, install {{Pkg|kscreen}}. This adds the additional options to System Settings/Display and Monitor.<br />
<br />
=== Open application launcher with Super key (Windows key) ===<br />
<br />
Install and start {{Pkg|ksuperkey}}. Now assign Alt + F1 as hot key. The Super Key will now open the application launcher. You can add ksuperkey to the autostart if you don't want to start it manually.<br />
<br />
== Troubleshooting ==<br />
<br />
=== Graphics card related ===<br />
<br />
==== Intel ====<br />
<br />
If you use 3D-accelerated composition with Intel, you might find that the Plasma panel and other applications don't refresh properly (stay frozen). Some Intel drivers have [https://bugzilla.redhat.com/show_bug.cgi?id=1259475 problems with EGL]. Try to set Plasma 5's ''OpenGL interface'' setting to GLX instead (in System Settings under ''Display and Monitor'' -> ''Compositor''. If that does not work, see ''[[Intel_graphics#SNA_issues|Intel graphics SNA issues]]'' for alternative solutions.<br />
<br />
==== Plasma keeps crashing with legacy Nvidia ====<br />
<br />
There is a bug in Plasma with using the Nvidia-304xx driver described [https://bugs.kde.org/show_bug.cgi?id=348753 here.] Rather than disabling compositing, try creating a file kwin.sh in ~/.config/plasma-workspace/env/ with the following content<br />
<br />
#!/bin/sh<br />
export KWIN_EXPLICIT_SYNC=0<br />
Then go to the system-settings -> Startup and Shutdown -> Autostart and Check/Add the script as a pre-kde startup file<br />
<br />
=== Configuration related ===<br />
<br />
Many problems in KDE are related to configuration.<br />
<br />
==== Reset all kdelib4 apps configuration ====<br />
<br />
To test whether your config is the problem try quitting all kdelib4 apps and run:<br />
<br />
$ cp -r ~/.kde4 ~/.kde4.safekeeping<br />
$ rm .kde4/{cache,socket,tmp}-$(hostname)<br />
<br />
The ''rm'' command just removes symbolic links which will be recreated automatically.<br />
<br />
If the problem does not manifest itself, gradually move parts from the saved configuration back, and restart the application(s) regularly to test and identify problematic parts.<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 it 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 (bugs.kde.org) '''only if it is an official widget'''. If it is not, it is recommended you find the entry on kde-look.org 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}}:<br />
<br />
$ for j in plasma*; do mv -- "$j" "${j%}.bak"; done<br />
<br />
This command will '''rename all Plasma related configs''' 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 [[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 and several other problems such as ark being unable to unrar or unzip or amarok not recognizing any of your musics. This solution can also resolve problems with KDE and Qt programmes looking bad following upgrade.<br />
<br />
Rebuild your cache with the following commands:<br />
<br />
$ rm ~/.config/Trolltech.conf<br />
$ kbuildsycoca4 --noincremental<br />
<br />
Hopefully, your problems are now fixed.<br />
<br />
=== Clean akonadi configuration to fix KMail ===<br />
<br />
First, make sure that KMail is not running. Then backup configuration:<br />
$ mv ~/.local/share/akonadi ~/.local/share/akonadi-old<br />
$ mv ~/.config/akonadi ~/.config/akonadi-old<br />
<br />
Start ''SystemSettings > Personal'' and remove all the resources. Go back to Dolphin and remove the original {{ic|~/.local/share/akonadi}} and<br />
{{ic|~/.config/akonadi}} - the copies you made ensure that you can back-track if necessary.<br />
<br />
Now go back to the System Settings page and carefully add the necessary resources. You should see the resource reading in your mail folders. Then start Kontact/KMail to see if it work properly.<br />
<br />
=== Getting current state of KWin for support and debug purposes ===<br />
<br />
This command prints out a wonderful summary of the current state of KWin including used options, used compositing backend and relevant OpenGL driver capabilities. See more on [http://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 />
=== KDE and Qt programs look bad when in a different window manager ===<br />
<br />
If you are using KDE or Qt programs but not in a full Plasma session (specifically, you did not run {{ic|startkde}}), then as of Plasma 4.6.1 you will need to tell Qt how to find KDE's styles (Oxygen, QtCurve etc.)<br />
<br />
You just need to set the environment variable {{ic|QT_PLUGIN_PATH}}. E.g. put:<br />
<br />
export QT_PLUGIN_PATH=$HOME/.kde4/lib/kde4/plugins/:/usr/lib/kde4/plugins/<br />
<br />
into your {{ic|/etc/profile}} (or {{ic|~/.profile}} if you do not have root access). {{ic|qtconfig-qt4}} should then be able to find your KDE styles and everything should look nice again!<br />
<br />
Alternatively, you can symlink the Qt styles directory to the KDE styles one:<br />
# ln -s /usr/lib/kde4/plugins/styles/ /usr/lib/qt4/pluginlib32-libdbusmenu-glibs/styles<br />
<br />
Under Gnome you can try to install the package libgnomeui.<br />
<br />
=== KF5/Qt5 applications don't display icons in i3/fvwm/awesome ===<br />
<br />
See [[Qt#Configuration of Qt apps under environments other than KDE]].<br />
<br />
=== Graphical related problems ===<br />
<br />
==== Low 2D desktop performance (or) artifacts appear when on 2D ====<br />
<br />
===== GPU driver problem =====<br />
<br />
Make sure you have the proper driver for your card installed, so that your desktop is at least 2D accelerated. Follow these articles for more information: [[ATI]], [[NVIDIA]], [[Intel]] for more information, in order to make sure that everything is all right.<br />
The open-source ATI and Intel drivers and the proprietary (binary) Nvidia driver should theoretically provide the best 2D and 3D acceleration.<br />
<br />
===== The Raster engine workaround =====<br />
<br />
If this does not solve your problems, your driver may not provide a good '''XRender''' acceleration which the current Qt painter engine relies on by default.<br />
<br />
You can change the painter engine to software based only by invoking the application with the {{ic|-graphicssystem raster}} command line. This rendering engine can be set as the default one by recompiling Qt with the same as configure option, {{ic|-graphicssystem raster}}.<br />
<br />
The raster paint engine enables the CPU to do the majority of the painting, as opposed to the GPU. You may get better performance, depending on your system. This is basically a work-around for the terrible Linux driver stack, since the CPU should obviously not be doing graphical computations since it is designed for fewer threads of greater complexity, as opposed to the GPU which is many threads but lesser computational strength. So, only use Raster engine if you are having problems or your GPU is much slower than you CPU, otherwise is better to use XRender.<br />
<br />
Since Qt 4.7+, recompiling Qt is not needed. Simply export {{ic|1=QT_GRAPHICSSYSTEM=raster}}, or {{ic|opengl}}, or {{ic|native}} (for the default). Raster depends on the CPU, OpenGL depends on the GPU and high driver support, and Native is just using the X11 rendering (mixture, usually).<br />
<br />
'''The best and automatic way to do that''' is to install {{AUR|kcm-qt-graphicssystem}} from AUR and configure this particular Qt setting through ''System Settings > Qt Graphics System''.<br />
<br />
For more information, consult this [http://apachelog.wordpress.com/2010/09/05/qt-graphics-system-kcm/ KDE Developer blog entry] and/or this [http://labs.trolltech.com/blogs/2009/12/18/qt-graphics-and-performance-the-raster-engine/ Qt Developer blog entry].<br />
<br />
==== Low 3D desktop performance====<br />
<br />
KDE begins with desktop effects enabled. Older cards may be insufficient for 3D desktop acceleration. You can disable desktop effects in ''System Settings > Desktop Effects'' and you can toggle desktop effects with {{ic|Alt+Shift+F12}}.<br />
<br />
{{Note| You may encounter such problems with 3D desktop performance even when using a more powerful graphics card, especially the catalyst proprietary driver ({{ic|fglrx}}). This driver is known for having problems with 3D acceleration. Visit [[ATI|the ATI Wiki page]] for more troubleshooting.}}<br />
<br />
==== Desktop compositing is disabled on my system with a modern Nvidia GPU ====<br />
<br />
Sometimes, KWin may have settings in its configuration file ({{ic|kwinrc}}) that ''may'' cause a problem on re-activating the 3D desktop {{ic|OpenGL}} compositing. That could be caused randomly (for example, due to a sudden Xorg crash or restart, and it gets corrupted), so, in case that happens, delete your {{ic|~/.kde4/share/config/kwinrc}} file and relogin. The KWin settings will turn to the KDE default ones and the problem should be probably gone.<br />
<br />
==== Flickering in fullscreen when compositing is enabled ====<br />
<br />
As of KDE SC 4.6.0, there is an option in ''Sytem Settings > Desktop Effect > Advanced > Suspend desktop effects for fullscreen windows''. Uncheck it would tell kwin to disable unredirect fullscren.<br />
<br />
==== Screen Tearing with desktop compositing enabled ====<br />
<br />
KWin may suffer from [[Wikipedia:Screen tearing|screen tearing]] while desktop effects are enabled. Uncheck the VSync option under ''System Settings > Desktop Effects > Advanced > Use Vsync''.<br />
<br />
{{Note|With the release of Plasma 4.11, several new Vsync options have been added, which may help with screen tearing.}}<br />
<br />
For proprietary driver users, ensure that the driver's VSync option is enabled (''amdccle'' for [[Catalyst]] users, and ''nvidia-settings'' for [[NVIDIA]] users).<br />
<br />
==== Display settings lost on reboot (multiple monitors) ====<br />
There is a [https://bugs.kde.org/show_bug.cgi?id=346961 bug] in kscreen that makes it forget dual screen settings after reboot with certain displays.<br />
A possible workaround is to delete kscreen and make sure that your screen resolution is specified in a xorg.conf file:<br />
* For Nouveau you can use the template at [[Nouveau#Dual Head]], just edit it to suit your setup.<br />
* For the proprietary nvidia driver you can use the [[NVIDIA#Using_NVIDIA_Settings|nvidia-settings]] utility as root to write the config file.<br />
<br />
''' Other suggestion '''<br />
<br />
Installing {{Pkg|kscreen4}} might fix the problem unless your screens share the same EDID. Kscreen is the improved screen management software for KDE, more information can be found [https://fedoraproject.org/wiki/Changes/KScreen?rd=Features/KScreen here].<br />
<br />
=== Sound problems under KDE ===<br />
<br />
==== ALSA related problems ====<br />
<br />
{{Note|First make sure you have {{Pkg|alsa-lib}} and {{Pkg|alsa-utils}} installed.}}<br />
<br />
===== "Falling back to default" messages when trying to listen to any sound in KDE =====<br />
<br />
When you encounter such messages:<br />
The audio playback device ''name_of_the_sound_device'' does not work.<br />
Falling back to default<br />
Go to ''System Settings > Multimedia > Phonon'' and set the device named {{ic|default}} above all the other devices in each box you see.<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 {{Pkg|phonon-qt4-vlc}} or {{Pkg|phonon-qt5-vlc}}.<br />
Then, make sure the backend is preferred via ''System Settings > Multimedia > Phonon > Backend (tab)''.<br />
<br />
=== Konsole does not save commands' history ===<br />
<br />
By default console command history is saved only when you type 'exit' in console. When you close Konsole with 'x' in the corner it does not happen.<br />
To enable autosaving after every command execution:<br />
<br />
{{hc|~/.bashrc|<nowiki><br />
shopt -s histappend<br />
[[ "${PROMPT_COMMAND}" ]] && PROMPT_COMMAND="$PROMPT_COMMAND;history -a" || PROMPT_COMMAND="history -a"<br />
</nowiki>}}<br />
<br />
=== Inotify folder watch limit ===<br />
<br />
If you get the following error:<br />
<br />
KDE Baloo Filewatch service reached the inotify folder watch limit. File changes may be ignored.<br />
<br />
Then you will need to increase the inotify folder watch limit:<br />
<br />
# echo 10000 > /proc/sys/fs/inotify/max_user_watches<br />
<br />
To make changes permanent, create {{ic|/etc/sysctl.d/90-inotify.conf}} with<br />
<br />
#increase inotify watch limit<br />
fs.inotify.max_user_watches = 10000<br />
<br />
== Unstable releases ==<br />
<br />
When KDE is reaching beta or RC milestone, KDE "unstable" packages are uploaded to the ''kde-unstable'' repository. They stay there until KDE is declared stable and passes to the ''extra'' repository.<br />
<br />
You can add ''kde-unstable'' with:<br />
<br />
{{hc|/etc/pacman.conf|2=<br />
[kde-unstable]<br />
Include = /etc/pacman.d/mirrorlist<br />
}}<br />
<br />
{{Warning|Make sure to add these lines '''before''' the ''extra'' repository. Adding the section after ''extra'' will cause [[pacman]] to prefer the older packages in the extra repository. {{ic|pacman -Syu}} will not install them, and will warn that they are "too new" if installed manually. Also, some of the libraries will stay at the older versions, which may cause file conflicts and/or instability!}}<br />
<br />
# ''kde-unstable'' is based upon ''testing''. Therefore, you need to enable the repositories in the following order: ''kde-unstable'', ''testing'', ''core'', ''extra'', ''community-testing'', ''community''.<br />
# To update from a previous KDE installation, run: {{ic|# pacman -Syu}} or {{ic|# pacman -S kde-unstable/kde}}<br />
# If you do not have KDE installed, you might have difficulties to install it by using groups (limitation of pacman)<br />
# '''Subscribe and read the [https://mailman.archlinux.org/pipermail/arch-dev-public/ arch-dev-public] mailing list'''<br />
# Make sure [[#Bugs|you make bug reports]] if you find any problems.<br />
<br />
== Bugs ==<br />
<br />
It is preferable that if you find a minor or serious bug, you should visit [https://bugs.archlinux.org the Arch Bug Tracker] or/and [http://bugs.kde.org KDE Bug Tracker] in order to report that. Make sure that you are clear about what you want to report.<br />
<br />
If you have any problem and you write about in on the Arch forums, first make sure that you have '''fully''' updated your system using a good sync mirror (check [https://www.archlinux.de/?page=MirrorStatus here]) or try [[Reflector]].<br />
<br />
== See also ==<br />
<br />
* [http://www.kde.org KDE homepage]<br />
* [https://bugs.kde.org KDE bug tracker]<br />
* [https://projects.kde.org KDE Projects]<br />
* [http://blog.martin-graesslin.com/blog/kategorien/kde/ Martin Graesslin's blog]</div>Beta990https://wiki.archlinux.org/index.php?title=KDE&diff=412373KDE2015-12-15T12:57:41Z<p>Beta990: /* Sound applet in the system tray */ typo 2</p>
<hr />
<div>[[Category:KDE]]<br />
[[ar:KDE]]<br />
[[cs:KDE]]<br />
[[de:KDE]]<br />
[[es:KDE]]<br />
[[fr:KDE]]<br />
[[it:KDE]]<br />
[[ja:KDE]]<br />
[[pl:KDE]]<br />
[[ru:KDE]]<br />
[[tr:KDE Masaüstü Ortamı]]<br />
[[zh-CN:KDE]]<br />
[[zh-TW:KDE]]<br />
{{Related articles start}}<br />
{{Related|Desktop environment}}<br />
{{Related|Display manager}}<br />
{{Related|Dolphin}}<br />
{{Related|Window manager}}<br />
{{Related|Qt}}<br />
{{Related|KDM}}<br />
{{Related|KDevelop 4}}<br />
{{Related|Trinity}}<br />
{{Related|Uniform Look for Qt and GTK Applications}}<br />
{{Related articles end}}<br />
<br />
KDE is a software project currently comprising of a [[desktop environment]] known as Plasma (or Plasma Workspaces), a collection of libraries and frameworks (KDE Frameworks) and several applications (KDE Applications) as well. KDE upstream has a well maintained [http://userbase.kde.org/ UserBase wiki]. Detailed information about most KDE applications can be found there.<br />
<br />
== Installation ==<br />
<br />
=== Plasma Desktop ===<br />
<br />
{{Note|<br />
*Plasma 5 is not co-installable with Plasma 4.<br />
*The Plasma 4 desktop is unmaintained since August 2015.[https://www.kde.org/announcements/announce-applications-15.08.0.php] It is no longer in the official repositories since December 2015.[https://www.archlinux.org/news/dropping-plasma-4/]}}<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 [[KDE Packages]]. Alternatively, for a more minimal Plasma installation, install the {{Pkg|plasma-desktop}} package.<br />
<br />
=== Upgrading from Plasma 4 to 5 ===<br />
<br />
# Isolate {{ic|multi-user.target}}{{bc|# systemctl isolate multi-user.target}} <br />
# [[Pacman|Uninstall]] the kdebase-workspace package{{bc|# pacman -Rc kdebase-workspace}} <br />
# [[Install]] the {{pkg|plasma-meta}} package or the {{grp|plasma}} group.<br />
# If you use KDM as display manager, disable it{{bc|# systemctl disable kdm}} and enable [[SDDM]]{{bc|# systemctl enable sddm}} or install and enable any other [[display manager]].<br />
# Reboot.<br />
<br />
{{Note|The Plasma 4 configuration is not automatically migrated to Plasma 5, so you will have to configure your desktop from scratch.}}<br />
<br />
=== KDE applications and language packs ===<br />
<br />
To install the full set of KDE Applications, install the {{Grp|kde-applications}} group or the {{Pkg|kde-applications-meta}} meta-packages to install specific modules. Note that this will only install applications, it will not install any version of the Plasma Desktop.<br />
<br />
If you need language files, install {{ic|kde-l10n-'''yourlanguagehere'''}} (e.g. {{Pkg|kde-l10n-de}} for the German language). For a full list of available languages see [https://www.archlinux.org/packages/extra/any/kde-l10n/ this link].<br />
<br />
== Starting Plasma ==<br />
<br />
{{Tip|<br />
*[[KDM]] is not available in Plasma 5. KDE upstream [http://blog.davidedmundson.co.uk/blog/display_managers_finale recommends] using the [[SDDM]] display manager as it provides integration with the Plasma 5 theme.<br />
*To better integrate SDDM with Plasma, it is recommended to edit {{ic|/etc/sddm.conf}} to use the breeze theme. Refer to [[SDDM#Theme settings]] for instructions.}}<br />
<br />
To launch a Plasma 5 session, choose ''Plasma'' in your [[display manager]] menu.<br />
<br />
Alternatively, to start Plasma with ''startx'', append {{ic|exec startkde}} to your {{ic|.xinitrc}} file. If you want to start Xorg at login, please see [[Start X at login]].<br />
<br />
== Configuration ==<br />
<br />
Most settings for KDE applications are stored in {{ic|~/.config}}, but some older applications may use {{ic|~/.kde4}}. However, configuring KDE is primarily done through the '''System Settings''' application. It can be started from a terminal by executing ''systemsettings5''.<br />
<br />
Frameworks 5 applications can use KDE 4 configuration however they expect the configuration files to be located in different places. To allow Frameworks 5 applications running in KDE 4 to share the same configurations they may be moved to the new locations and symlinked back to the old. Examples are:<br />
*Konsole profiles from {{ic|~/.kde4/share/apps/konsole}} to {{ic|~/.local/share/konsole/}}<br />
*Application appearance from {{ic|~/.kde4/share/config/kdeglobals}} to {{ic|~/.config/kdeglobals}} <br />
<br />
=== Personalization ===<br />
<br />
==== Plasma desktop ====<br />
<br />
===== Themes =====<br />
<br />
{{Note|1=If the Plasma cursor theme is incorrect in some instances, see the following [https://bbs.archlinux.org/viewtopic.php?pid=1533071#p1533071 forum post] for a workaround.}}<br />
[http://kde-look.org/index.php?xcontentmode=76 Plasma themes] define the look of panels and plasmoids. For easy system-wide installation, some such themes are available in both the official repositories and the [https://aur.archlinux.org/packages.php?O=0&K=plasmatheme&do_Search=Go AUR].<br />
<br />
The easiest way to install themes is by going through the Desktop Settings control panel:<br />
<br />
Workspace Theme > Desktop Theme > Get new Themes<br />
<br />
This will present a nice frontend for [http://www.kde-look.org/ kde-look.org] that allows you to install, uninstall, or update third-party plasmoid scripts with literally just one click.<br />
<br />
Splash and Lock screens are currently unavailable so to customize these screens you have to modify the original theme found in {{ic|/usr/share/plasma/look-and-feel/}}.<br />
See [https://www.kubuntuforums.net/showthread.php?67599-Plasma-5-background-images&s=59832dc20e5bfc2948dbb591d8453f61 this thread] on the Kubuntu forums.<br />
<br />
Note that the [[SDDM]] login screen is not part of this theme.<br />
<br />
====== Qt and GTK+ Applications Appearance ======<br />
<br />
{{Tip|For Qt and GTK theme consistency, see [[Uniform look for Qt and GTK applications]].}}<br />
<br />
;Qt4<br />
For Qt4 applications to have a consistent appearance, you need to install {{Pkg|breeze-kde4}} and then pick Breeze as GUI Style in {{ic|qtconfig-qt4}}.<br />
<br />
;GTK+<br />
The recommended theme for a pleasant appearance in GTK+ applications is {{Pkg|breeze-gtk}} or {{AUR|gnome-breeze-git}}, a GTK+ theme designed to mimic the appearance of Plasma 5 Breeze.<br />
Install {{Pkg|kde-gtk-config}} and select the installed GTK-theme for GTK2/GTK3-Theme in ''System Settings > Application Style > GNOME Application Style''.<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 />
Plasmoid binaries can be installed using PKGBUILDs from [https://aur.archlinux.org/packages.php?O=0&K=plasmoid&do_Search=Go&PP=25&SO=d&SB=v AUR], or you can write your own PKGBUILD.<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 Widgets''.<br />
<br />
This will present a nice frontend for [http://www.kde-look.org/ kde-look.org] that allows you to install, uninstall, or update third-party plasmoid scripts with literally just one click.<br />
<br />
Most plasmoids are not created officially by KDE developers. You can also try installing Mac OS X widgets, Microsoft Windows Vista/7 widgets, Google Widgets, and even SuperKaramba widgets.<br />
<br />
===== Sound applet in the system tray =====<br />
<br />
[[Install]] {{Pkg|plasma-pa}} or {{Pkg|kmix}} (start Kmix from the Application Launcher).<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|~/.kde4/share/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-desktop": ("Plasma" "Plasma")/!d; s/^ *\([^ ]*\) .*/\1/g'); do<br />
xprop -id $WID -remove _KDE_NET_WM_SHADOW<br />
done<br />
</nowiki>}}<br />
<br />
The script can be run on login with ''Add Script'' in ''Autostart'':<br />
<br />
$ kcmshell4 autostart<br />
<br />
==== Window decorations ====<br />
<br />
[http://kde-look.org/index.php?xcontentmode=75 Window decorations] can be changed in ''System Settings > Workspace Appearance > 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?O=0&K=kdestyle&do_Search=Go&PP=25&SO=d&SB=v AUR].<br />
<br />
==== Icon themes ====<br />
<br />
Not many full system icons themes are available for KDE 4. You can open up ''System Settings > Application Appearance > Icons'' and browse for new ones or install them manually. Many of them can be found on [http://www.kde-look.org/ kde-look.org].<br />
<br />
Official logos, icons, CD labels and other artwork for Arch Linux are provided in the {{AUR|archlinux-artwork}} package. After installing you can find such artwork at {{ic|/usr/share/archlinux/}}.<br />
<br />
===== Qt 5 icons theme =====<br />
<br />
If you are on Plasma 5, use ''System Settings > Icons'', while if you are on Plasma 4 use {{ic|kcmshell5 icons}} to set the icons theme.<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''.<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 > Appearance > 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 '''96''' in ''System Settings > Application Appearance > Fonts''.<br />
<br />
If that does not work, try setting the DPI directly in your Xorg configuration as documented [[Xorg#Setting_DPI_manually|here]].<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]<br />
However, you can achieve something similar by editing the file {{ic|~/.config/kwinrc}} adding <br />
{{ic|1=BorderlessMaximizedWindows=true}} in the {{ic|[Windows]}} section.<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 > Printer Configuration''. To use this method, you must first install {{Pkg|print-manager}} and {{Pkg|cups}}.<br />
<br />
The {{ic|avahi-daemon.service}} and {{ic|org.cups.cupsd.service}} daemons must be started first; otherwise, you will get the following error:<br />
The service 'Printer Configuration' does not provide an interface 'KCModule'<br />
with keyword 'system-config- printer-kde/system-config-printer-kde.py'<br />
The factory does not support creating components of the specified type.<br />
<br />
If you are getting the following error, you need to give your user the right to manage printers.<br />
There was an error during CUPS operation: 'cups-authorization-canceled'<br />
<br />
For CUPS, this is set in {{ic|/etc/cups/cups-files.conf}}.<br />
<br />
Adding {{ic|lpadmin}} to {{ic|/etc/group}} and then to the {{ic|SystemGroup}} directive in {{ic|/etc/cups/cups-files.conf}} allows anyone in the {{ic|lpadmin}} group to configure printers. Do ''not'' add the {{ic|lp}} group to the {{ic|SystemGroup}} directive, or printing will fail.<br />
<br />
# groupadd -g107 lpadmin<br />
<br />
{{hc|/etc/cups/cups-files.conf|# Administrator user group...<br />
SystemGroup sys root lpadmin}}<br />
<br />
{{Tip|Read [[CUPS#Administration]] to get more details on how to configure CUPS.}}<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 usershares, which the stock smb.conf does not have enabled. Instructions to add them are in [[Samba#Creating usershare path]], after which sharing in Dolphin should work out of the box after restarting Samba.<br />
<br />
=== KDE Desktop activities ===<br />
<br />
KDE Desktop Activities are Plasma-based virtual-desktop-like sets of Plasma Widgets where you can independently configure widgets as if you have more than one screen or desktop.<br />
<br />
On your desktop, click the Cashew Plasmoid and, on the pop-up window, press "Activities".<br />
<br />
A plasma bar presenting you the current existing Plasma Desktop Activities will appear at the bottom of the screen. You can navigate between them by pressing the correspondent icons.<br />
<br />
=== Power saving ===<br />
<br />
Plasma has an integrated power saving service called "'''Powerdevil Power Management'''" that may adjust the power saving profile of the system and/or the brightness of the screen (if supported).<br />
<br />
=== Monitoring changes on local files and directories ===<br />
<br />
KDE now uses '''inotify''' directly from the kernel with '''kdirwatch''' (included in kdelibs), so Gamin or FAM are no longer needed. You may want to install this {{AUR|kdirwatch}}{{Broken package link|{{aur-mirror|kdirwatch}}}} from AUR which is a GUI frontend for kdirwatch.<br />
<br />
=== Autostarting applications ===<br />
<br />
{{Accuracy|See [[KDE Wallet#Using the KDE Wallet to store ssh keys]]. Merge general information here.}}<br />
<br />
Plasma can autostart applications and run scripts on startup and shutdown. To autostart an application, start {{ic|systemsettings}} and navigate to ''Startup and Shutdown'' -> ''Autostart'' and add the program or shell script of your choice. Note that programs can be autostarted on login only, whilst shell scripts can also be run on shutdown or even before Plasma itself starts. For applications, a {{ic|.desktop}} file will be created in the {{ic|~/.config/autostart}} directory. For shell scripts, a symlink will be created in one the following directories:<br />
* {{ic|~/.config/autostart-scripts}} - for starting at login.<br />
* {{ic|~/.config/plasma-workspace/shutdown}} - for starting on shutdown.<br />
* {{ic|~/.config/plasma-workspace/env}} - for starting prior to login.<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.<br />
<br />
'''Configuration for look and feel of GTK applications.'''<br />
* {{Pkg|kde-gtk-config}}<br />
* {{AUR|kcm-gtk}}{{Broken package link|{{aur-mirror|kcm-gtk}}}}<br />
* {{AUR|kcm-qt-graphicssystem}}<br />
<br />
'''Configuration for the GRUB bootloader.'''<br />
* {{AUR|grub2-editor}}{{Broken package link|{{aur-mirror|grub2-editor}}}}<br />
<br />
'''Configuration for the [[Uncomplicated Firewall]] (UFW)'''<br />
* {{AUR|kcm-ufw}}<br />
<br />
'''Configuration for [[PolicyKit]]'''<br />
* {{AUR|kcm-polkit-kde-git}}{{Broken package link|{{aur-mirror|kcm-polkit-kde-git}}}}<br />
<br />
'''Configuration for Wacom tablets'''<br />
* {{AUR|kcm-wacomtablet}}<br />
<br />
'''Configuration for systemd'''<br />
* {{Pkg|systemd-kcm}}<br />
<br />
More KCMs can be found at [http://kde-apps.org/index.php?xcontentmode=273 kde-apps.org].<br />
<br />
== Desktop search ==<br />
<br />
KDE implements desktop search with a software called Baloo, a file indexing and searching solution.<br />
<br />
=== Baloo ===<br />
<br />
==== Using and configuring Baloo ====<br />
<br />
In order to search using Baloo on the KDE Plasma Desktop, press {{ic|ALT+F2}} and type in your query. Within Dolphin press {{ic|CTRL+F}}.<br />
<br />
By default the Desktop Search KCM exposes only two options: A panel to blacklist folders and, as of 4.13.1, a way to disable it with one click.<br />
<br />
Alternatively you can edit your {{ic|~/.kde4/share/config/baloofilerc}} (KDE4) or {{ic|~/.config/baloofilerc}} (KF5) file ([https://community.kde.org/Baloo/Configuration info]). Additionally the {{ic|balooctl}} process can also be used. In order to disable Baloo run {{ic|balooctl disable}}.<br />
<br />
Once you added additional folders to the blacklist or disabled Baloo entirely, a process named {{ic|baloo_file_cleaner}} removes all unneeded index files automatically. They are stored under {{ic|~/.local/share/baloo/}}.<br />
<br />
More advanced configuration options are available through {{AUR|kcm_baloo_advanced}}.<br />
<br />
==== How do I index a removable device? ====<br />
<br />
By default every removable device is blacklisted. You just have to remove your device from the blacklist in the KCM panel.<br />
<br />
=== Web browsers ===<br />
==== Konqueror and Rekonq ====<br />
Konqueror supports two rendering engines – KHTML and QtWebKit (via the {{Pkg|kwebkitpart}} package) – Rekonq supports only QtWebKit. KHTML development was halted after Qt shipped WebKit but was kept for compatibility reasons. QtWebKit, in turn, has since been [https://www.mail-archive.com/development@qt-project.org/msg18866.html deprecated] by the Qt Project and replaced by [[Chromium]]-based Qt WebEngine which is currently not supported by either Konqueror or Rekonq.<br />
<br />
A successor named Fiber is currently in development, which will use Chromium's engine.<br />
<br />
==== Firefox ====<br />
Firefox can be configured to better integrate with Plasma. See [[Firefox#KDE_integration|Firefox KDE integration]] for details.<br />
<br />
==== Qupzilla ====<br />
Qupzilla ({{Pkg|qupzilla}}) is a Qt web browser with Plasma integration features. Qupzilla 2.0 will use Qt WebEngine intead of WebKit.<br />
<br />
== PIM ==<br />
<br />
KDE offers its own stack for personal information management. This includes emails, contacts, calendar, etc.<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.<br />
<br />
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 />
==== Disabling Akonadi ====<br />
<br />
See this [http://userbase.kde.org/Akonadi#Disabling_the_Akonadi_subsystem section in the KDE userbase]. Alternatively, install {{AUR|akonadi-fake}}.<br />
<br />
==== Database configuration ====<br />
<br />
Start {{ic|akonaditray}} from package {{Pkg|kdepim-runtime}}. Right click on it and select '''configure'''. In the Akonadi server configure tab, you can:<br />
* Configuring Akonadi to use MySQL/MariaDB Server<br />
** If your home directory is on a ZFS pool, you will need to create {{ic|~/.config/akonadi/mysql-local.conf}} with the following contents:<br />
<br />
[mysqld]<br />
innodb_use_native_aio = 0<br />
<br />
Otherwise you will get the [[MySQL#OS error 22 when running on ZFS|OS error 22]]<br />
* Configuring Akonadi to use PostgreSQL Server<br />
* Configuring Akonadi to use SQLite<br />
** Edit {{ic|~/.config/akonadi/akonadiserverrc}} to match the below<br />
<br />
[General]<br />
Driver=QSQLITE3<br />
<br />
[QSQLITE3]<br />
Name=/home/username/.local/akonadi/akonadi.db<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 />
You can choose between backends based on [[GStreamer]] and [[VLC]] – each available in versions for Qt4 applications and Qt5 applications ({{Pkg|phonon-qt4-gstreamer}}, {{Pkg|phonon-qt5-gstreamer}} – {{Pkg|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 [http://community.kde.org/Phonon/FeatureMatrix features set.]<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 at ''System Settings > Multimedia > Phonon > Backend''. For Plasma 5 this would be ''System Settings > Multimedia > Backend''.<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 />
<br />
== Useful applications ==<br />
<br />
The official set of KDE applications may be found [http://www.kde.org/applications/ here].<br />
<br />
=== Yakuake ===<br />
<br />
[[Yakuake]] provides a Quake-like terminal emulator whose visibility is toggled by the F12 key. It also has support for multiple tabs. Yakuake is available in the package {{Pkg|yakuake}}.<br />
<br />
=== KDE Telepathy ===<br />
<br />
[http://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 '+xx', e.g. '+49' for Germany). 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). Note that 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 />
== Tips and tricks ==<br />
<br />
=== Using an alternative window manager ===<br />
There may be reasons you want to use another window manager than KWin, for example to work around the DRI bug that causes [[PRIME#Black_screen_with_GL-based_compositors|black screen with PRIME]].<br />
<br />
To use an alternative [[window manager]] with Plasma open the ''System Settings'' panel, navigate to ''(Default) Applications > Window Manager > Use a different window manager'' and select the window manager you wish to use from the list.<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 {{ic|.xinitrc}} file:<br />
exec openbox-kde-session<br />
<br />
==== Compiz custom ====<br />
<br />
If you need to run Compiz with custom options and switches select ''Compiz custom'' and then create a script called {{ic|compiz-kde-launcher}} and add to it the commands you wish to use to start Compiz. See the example below:<br />
<br />
{{hc|/usr/local/bin/compiz-kde-launcher|<nowiki><br />
#!/bin/bash<br />
LIBGL_ALWAYS_INDIRECT=1<br />
compiz --replace &<br />
wait<br />
</nowiki>}}<br />
<br />
Then make it executable:<br />
$ chmod +x /usr/local/bin/compiz-kde-launcher<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 />
=== Integrate Android ===<br />
<br />
KDE Connect provides several features for you:<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 {{ic|KDE Connect}} from [https://play.google.com/store/apps/details?id=org.kde.kdeconnect_tp Google Play] or from [https://f-droid.org/repository/browse/?fdid=org.kde.kdeconnect_tp F-Droid].<br />
<br />
=== Configure KWin to use OpenGL ES ===<br />
Due to QtQuick2, both the Qt OpenGL module and KWin have to be [http://blog.martin-graesslin.com/blog/2013/11/kwin5-qtquick-2-and-the-caused-changes-for-opengl/ compiled against OpenGL ES.]<br />
<br />
=== Speed up application startup ===<br />
<br />
User Rob described a "[http://kdemonkey.blogspot.nl/2008/04/magic-trick.html magic trick]" on his blog to improve application start-up time by 50-150ms.<br />
To enable it, create this folder in your home:<br />
$ mkdir ~/.compose-cache/<br />
It can produce freezes under heavy io. To avoid this, also do:<br />
$ ln -sfv /run/user/$UID/ /home/$USER/.compose-cache<br />
<br />
{{Note|For those curious about what is going on here, this enables an optimization which Lubos (of general KDE speediness fame) came up with some time ago and was then rewritten and integrated into libx11. Ordinarily, on startup, applications read input method information from {{ic|/usr/share/X11/locale/''your locale''/Compose}}. This file is quite long (>5000 lines for the en_US.UTF-8 one) and takes some time to process. libX11 can create a cache of the parsed information which is much quicker to read subsequently, but it will only re-use an existing cache or create a new one in {{ic|~/.compose-cache}} if the directory already exists.}}<br />
<br />
=== Configuring monitor resolution / multiple monitors ===<br />
<br />
To enable display resolution management and multiple monitors in Plasma 5, install {{Pkg|kscreen}}. This adds the additional options to System Settings/Display and Monitor.<br />
<br />
=== Open application launcher with Super key (Windows key) ===<br />
<br />
Install and start {{Pkg|ksuperkey}}. Now assign Alt + F1 as hot key. The Super Key will now open the application launcher. You can add ksuperkey to the autostart if you don't want to start it manually.<br />
<br />
== Troubleshooting ==<br />
<br />
=== Graphics card related ===<br />
<br />
==== Intel ====<br />
<br />
If you use 3D-accelerated composition with Intel, you might find that the Plasma panel and other applications don't refresh properly (stay frozen). Some Intel drivers have [https://bugzilla.redhat.com/show_bug.cgi?id=1259475 problems with EGL]. Try to set Plasma 5's ''OpenGL interface'' setting to GLX instead (in System Settings under ''Display and Monitor'' -> ''Compositor''. If that does not work, see ''[[Intel_graphics#SNA_issues|Intel graphics SNA issues]]'' for alternative solutions.<br />
<br />
==== Plasma keeps crashing with legacy Nvidia ====<br />
<br />
There is a bug in Plasma with using the Nvidia-304xx driver described [https://bugs.kde.org/show_bug.cgi?id=348753 here.] Rather than disabling compositing, try creating a file kwin.sh in ~/.config/plasma-workspace/env/ with the following content<br />
<br />
#!/bin/sh<br />
export KWIN_EXPLICIT_SYNC=0<br />
Then go to the system-settings -> Startup and Shutdown -> Autostart and Check/Add the script as a pre-kde startup file<br />
<br />
=== Configuration related ===<br />
<br />
Many problems in KDE are related to configuration.<br />
<br />
==== Reset all kdelib4 apps configuration ====<br />
<br />
To test whether your config is the problem try quitting all kdelib4 apps and run:<br />
<br />
$ cp -r ~/.kde4 ~/.kde4.safekeeping<br />
$ rm .kde4/{cache,socket,tmp}-$(hostname)<br />
<br />
The ''rm'' command just removes symbolic links which will be recreated automatically.<br />
<br />
If the problem does not manifest itself, gradually move parts from the saved configuration back, and restart the application(s) regularly to test and identify problematic parts.<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 it 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 (bugs.kde.org) '''only if it is an official widget'''. If it is not, it is recommended you find the entry on kde-look.org 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}}:<br />
<br />
$ for j in plasma*; do mv -- "$j" "${j%}.bak"; done<br />
<br />
This command will '''rename all Plasma related configs''' 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 [[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 and several other problems such as ark being unable to unrar or unzip or amarok not recognizing any of your musics. This solution can also resolve problems with KDE and Qt programmes looking bad following upgrade.<br />
<br />
Rebuild your cache with the following commands:<br />
<br />
$ rm ~/.config/Trolltech.conf<br />
$ kbuildsycoca4 --noincremental<br />
<br />
Hopefully, your problems are now fixed.<br />
<br />
=== Clean akonadi configuration to fix KMail ===<br />
<br />
First, make sure that KMail is not running. Then backup configuration:<br />
$ mv ~/.local/share/akonadi ~/.local/share/akonadi-old<br />
$ mv ~/.config/akonadi ~/.config/akonadi-old<br />
<br />
Start ''SystemSettings > Personal'' and remove all the resources. Go back to Dolphin and remove the original {{ic|~/.local/share/akonadi}} and<br />
{{ic|~/.config/akonadi}} - the copies you made ensure that you can back-track if necessary.<br />
<br />
Now go back to the System Settings page and carefully add the necessary resources. You should see the resource reading in your mail folders. Then start Kontact/KMail to see if it work properly.<br />
<br />
=== Getting current state of KWin for support and debug purposes ===<br />
<br />
This command prints out a wonderful summary of the current state of KWin including used options, used compositing backend and relevant OpenGL driver capabilities. See more on [http://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 />
=== KDE and Qt programs look bad when in a different window manager ===<br />
<br />
If you are using KDE or Qt programs but not in a full Plasma session (specifically, you did not run {{ic|startkde}}), then as of Plasma 4.6.1 you will need to tell Qt how to find KDE's styles (Oxygen, QtCurve etc.)<br />
<br />
You just need to set the environment variable {{ic|QT_PLUGIN_PATH}}. E.g. put:<br />
<br />
export QT_PLUGIN_PATH=$HOME/.kde4/lib/kde4/plugins/:/usr/lib/kde4/plugins/<br />
<br />
into your {{ic|/etc/profile}} (or {{ic|~/.profile}} if you do not have root access). {{ic|qtconfig-qt4}} should then be able to find your KDE styles and everything should look nice again!<br />
<br />
Alternatively, you can symlink the Qt styles directory to the KDE styles one:<br />
# ln -s /usr/lib/kde4/plugins/styles/ /usr/lib/qt4/pluginlib32-libdbusmenu-glibs/styles<br />
<br />
Under Gnome you can try to install the package libgnomeui.<br />
<br />
=== KF5/Qt5 applications don't display icons in i3/fvwm/awesome ===<br />
<br />
See [[Qt#Configuration of Qt apps under environments other than KDE]].<br />
<br />
=== Graphical related problems ===<br />
<br />
==== Low 2D desktop performance (or) artifacts appear when on 2D ====<br />
<br />
===== GPU driver problem =====<br />
<br />
Make sure you have the proper driver for your card installed, so that your desktop is at least 2D accelerated. Follow these articles for more information: [[ATI]], [[NVIDIA]], [[Intel]] for more information, in order to make sure that everything is all right.<br />
The open-source ATI and Intel drivers and the proprietary (binary) Nvidia driver should theoretically provide the best 2D and 3D acceleration.<br />
<br />
===== The Raster engine workaround =====<br />
<br />
If this does not solve your problems, your driver may not provide a good '''XRender''' acceleration which the current Qt painter engine relies on by default.<br />
<br />
You can change the painter engine to software based only by invoking the application with the {{ic|-graphicssystem raster}} command line. This rendering engine can be set as the default one by recompiling Qt with the same as configure option, {{ic|-graphicssystem raster}}.<br />
<br />
The raster paint engine enables the CPU to do the majority of the painting, as opposed to the GPU. You may get better performance, depending on your system. This is basically a work-around for the terrible Linux driver stack, since the CPU should obviously not be doing graphical computations since it is designed for fewer threads of greater complexity, as opposed to the GPU which is many threads but lesser computational strength. So, only use Raster engine if you are having problems or your GPU is much slower than you CPU, otherwise is better to use XRender.<br />
<br />
Since Qt 4.7+, recompiling Qt is not needed. Simply export {{ic|1=QT_GRAPHICSSYSTEM=raster}}, or {{ic|opengl}}, or {{ic|native}} (for the default). Raster depends on the CPU, OpenGL depends on the GPU and high driver support, and Native is just using the X11 rendering (mixture, usually).<br />
<br />
'''The best and automatic way to do that''' is to install {{AUR|kcm-qt-graphicssystem}} from AUR and configure this particular Qt setting through ''System Settings > Qt Graphics System''.<br />
<br />
For more information, consult this [http://apachelog.wordpress.com/2010/09/05/qt-graphics-system-kcm/ KDE Developer blog entry] and/or this [http://labs.trolltech.com/blogs/2009/12/18/qt-graphics-and-performance-the-raster-engine/ Qt Developer blog entry].<br />
<br />
==== Low 3D desktop performance====<br />
<br />
KDE begins with desktop effects enabled. Older cards may be insufficient for 3D desktop acceleration. You can disable desktop effects in ''System Settings > Desktop Effects'' and you can toggle desktop effects with {{ic|Alt+Shift+F12}}.<br />
<br />
{{Note| You may encounter such problems with 3D desktop performance even when using a more powerful graphics card, especially the catalyst proprietary driver ({{ic|fglrx}}). This driver is known for having problems with 3D acceleration. Visit [[ATI|the ATI Wiki page]] for more troubleshooting.}}<br />
<br />
==== Desktop compositing is disabled on my system with a modern Nvidia GPU ====<br />
<br />
Sometimes, KWin may have settings in its configuration file ({{ic|kwinrc}}) that ''may'' cause a problem on re-activating the 3D desktop {{ic|OpenGL}} compositing. That could be caused randomly (for example, due to a sudden Xorg crash or restart, and it gets corrupted), so, in case that happens, delete your {{ic|~/.kde4/share/config/kwinrc}} file and relogin. The KWin settings will turn to the KDE default ones and the problem should be probably gone.<br />
<br />
==== Flickering in fullscreen when compositing is enabled ====<br />
<br />
As of KDE SC 4.6.0, there is an option in ''Sytem Settings > Desktop Effect > Advanced > Suspend desktop effects for fullscreen windows''. Uncheck it would tell kwin to disable unredirect fullscren.<br />
<br />
==== Screen Tearing with desktop compositing enabled ====<br />
<br />
KWin may suffer from [[Wikipedia:Screen tearing|screen tearing]] while desktop effects are enabled. Uncheck the VSync option under ''System Settings > Desktop Effects > Advanced > Use Vsync''.<br />
<br />
{{Note|With the release of Plasma 4.11, several new Vsync options have been added, which may help with screen tearing.}}<br />
<br />
For proprietary driver users, ensure that the driver's VSync option is enabled (''amdccle'' for [[Catalyst]] users, and ''nvidia-settings'' for [[NVIDIA]] users).<br />
<br />
==== Display settings lost on reboot (multiple monitors) ====<br />
There is a [https://bugs.kde.org/show_bug.cgi?id=346961 bug] in kscreen that makes it forget dual screen settings after reboot with certain displays.<br />
A possible workaround is to delete kscreen and make sure that your screen resolution is specified in a xorg.conf file:<br />
* For Nouveau you can use the template at [[Nouveau#Dual Head]], just edit it to suit your setup.<br />
* For the proprietary nvidia driver you can use the [[NVIDIA#Using_NVIDIA_Settings|nvidia-settings]] utility as root to write the config file.<br />
<br />
''' Other suggestion '''<br />
<br />
Installing {{Pkg|kscreen4}} might fix the problem unless your screens share the same EDID. Kscreen is the improved screen management software for KDE, more information can be found [https://fedoraproject.org/wiki/Changes/KScreen?rd=Features/KScreen here].<br />
<br />
=== Sound problems under KDE ===<br />
<br />
==== ALSA related problems ====<br />
<br />
{{Note|First make sure you have {{Pkg|alsa-lib}} and {{Pkg|alsa-utils}} installed.}}<br />
<br />
===== "Falling back to default" messages when trying to listen to any sound in KDE =====<br />
<br />
When you encounter such messages:<br />
The audio playback device ''name_of_the_sound_device'' does not work.<br />
Falling back to default<br />
Go to ''System Settings > Multimedia > Phonon'' and set the device named {{ic|default}} above all the other devices in each box you see.<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 {{Pkg|phonon-qt4-vlc}} or {{Pkg|phonon-qt5-vlc}}.<br />
Then, make sure the backend is preferred via ''System Settings > Multimedia > Phonon > Backend (tab)''.<br />
<br />
=== Konsole does not save commands' history ===<br />
<br />
By default console command history is saved only when you type 'exit' in console. When you close Konsole with 'x' in the corner it does not happen.<br />
To enable autosaving after every command execution:<br />
<br />
{{hc|~/.bashrc|<nowiki><br />
shopt -s histappend<br />
[[ "${PROMPT_COMMAND}" ]] && PROMPT_COMMAND="$PROMPT_COMMAND;history -a" || PROMPT_COMMAND="history -a"<br />
</nowiki>}}<br />
<br />
=== Inotify folder watch limit ===<br />
<br />
If you get the following error:<br />
<br />
KDE Baloo Filewatch service reached the inotify folder watch limit. File changes may be ignored.<br />
<br />
Then you will need to increase the inotify folder watch limit:<br />
<br />
# echo 10000 > /proc/sys/fs/inotify/max_user_watches<br />
<br />
To make changes permanent, create {{ic|/etc/sysctl.d/90-inotify.conf}} with<br />
<br />
#increase inotify watch limit<br />
fs.inotify.max_user_watches = 10000<br />
<br />
== Unstable releases ==<br />
<br />
When KDE is reaching beta or RC milestone, KDE "unstable" packages are uploaded to the ''kde-unstable'' repository. They stay there until KDE is declared stable and passes to the ''extra'' repository.<br />
<br />
You can add ''kde-unstable'' with:<br />
<br />
{{hc|/etc/pacman.conf|2=<br />
[kde-unstable]<br />
Include = /etc/pacman.d/mirrorlist<br />
}}<br />
<br />
{{Warning|Make sure to add these lines '''before''' the ''extra'' repository. Adding the section after ''extra'' will cause [[pacman]] to prefer the older packages in the extra repository. {{ic|pacman -Syu}} will not install them, and will warn that they are "too new" if installed manually. Also, some of the libraries will stay at the older versions, which may cause file conflicts and/or instability!}}<br />
<br />
# ''kde-unstable'' is based upon ''testing''. Therefore, you need to enable the repositories in the following order: ''kde-unstable'', ''testing'', ''core'', ''extra'', ''community-testing'', ''community''.<br />
# To update from a previous KDE installation, run: {{ic|# pacman -Syu}} or {{ic|# pacman -S kde-unstable/kde}}<br />
# If you do not have KDE installed, you might have difficulties to install it by using groups (limitation of pacman)<br />
# '''Subscribe and read the [https://mailman.archlinux.org/pipermail/arch-dev-public/ arch-dev-public] mailing list'''<br />
# Make sure [[#Bugs|you make bug reports]] if you find any problems.<br />
<br />
== Bugs ==<br />
<br />
It is preferable that if you find a minor or serious bug, you should visit [https://bugs.archlinux.org the Arch Bug Tracker] or/and [http://bugs.kde.org KDE Bug Tracker] in order to report that. Make sure that you are clear about what you want to report.<br />
<br />
If you have any problem and you write about in on the Arch forums, first make sure that you have '''fully''' updated your system using a good sync mirror (check [https://www.archlinux.de/?page=MirrorStatus here]) or try [[Reflector]].<br />
<br />
== See also ==<br />
<br />
* [http://www.kde.org KDE homepage]<br />
* [https://bugs.kde.org KDE bug tracker]<br />
* [https://projects.kde.org KDE Projects]<br />
* [http://blog.martin-graesslin.com/blog/kategorien/kde/ Martin Graesslin's blog]</div>Beta990https://wiki.archlinux.org/index.php?title=KDE&diff=412372KDE2015-12-15T12:57:14Z<p>Beta990: /* Sound applet in the system tray */ typo</p>
<hr />
<div>[[Category:KDE]]<br />
[[ar:KDE]]<br />
[[cs:KDE]]<br />
[[de:KDE]]<br />
[[es:KDE]]<br />
[[fr:KDE]]<br />
[[it:KDE]]<br />
[[ja:KDE]]<br />
[[pl:KDE]]<br />
[[ru:KDE]]<br />
[[tr:KDE Masaüstü Ortamı]]<br />
[[zh-CN:KDE]]<br />
[[zh-TW:KDE]]<br />
{{Related articles start}}<br />
{{Related|Desktop environment}}<br />
{{Related|Display manager}}<br />
{{Related|Dolphin}}<br />
{{Related|Window manager}}<br />
{{Related|Qt}}<br />
{{Related|KDM}}<br />
{{Related|KDevelop 4}}<br />
{{Related|Trinity}}<br />
{{Related|Uniform Look for Qt and GTK Applications}}<br />
{{Related articles end}}<br />
<br />
KDE is a software project currently comprising of a [[desktop environment]] known as Plasma (or Plasma Workspaces), a collection of libraries and frameworks (KDE Frameworks) and several applications (KDE Applications) as well. KDE upstream has a well maintained [http://userbase.kde.org/ UserBase wiki]. Detailed information about most KDE applications can be found there.<br />
<br />
== Installation ==<br />
<br />
=== Plasma Desktop ===<br />
<br />
{{Note|<br />
*Plasma 5 is not co-installable with Plasma 4.<br />
*The Plasma 4 desktop is unmaintained since August 2015.[https://www.kde.org/announcements/announce-applications-15.08.0.php] It is no longer in the official repositories since December 2015.[https://www.archlinux.org/news/dropping-plasma-4/]}}<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 [[KDE Packages]]. Alternatively, for a more minimal Plasma installation, install the {{Pkg|plasma-desktop}} package.<br />
<br />
=== Upgrading from Plasma 4 to 5 ===<br />
<br />
# Isolate {{ic|multi-user.target}}{{bc|# systemctl isolate multi-user.target}} <br />
# [[Pacman|Uninstall]] the kdebase-workspace package{{bc|# pacman -Rc kdebase-workspace}} <br />
# [[Install]] the {{pkg|plasma-meta}} package or the {{grp|plasma}} group.<br />
# If you use KDM as display manager, disable it{{bc|# systemctl disable kdm}} and enable [[SDDM]]{{bc|# systemctl enable sddm}} or install and enable any other [[display manager]].<br />
# Reboot.<br />
<br />
{{Note|The Plasma 4 configuration is not automatically migrated to Plasma 5, so you will have to configure your desktop from scratch.}}<br />
<br />
=== KDE applications and language packs ===<br />
<br />
To install the full set of KDE Applications, install the {{Grp|kde-applications}} group or the {{Pkg|kde-applications-meta}} meta-packages to install specific modules. Note that this will only install applications, it will not install any version of the Plasma Desktop.<br />
<br />
If you need language files, install {{ic|kde-l10n-'''yourlanguagehere'''}} (e.g. {{Pkg|kde-l10n-de}} for the German language). For a full list of available languages see [https://www.archlinux.org/packages/extra/any/kde-l10n/ this link].<br />
<br />
== Starting Plasma ==<br />
<br />
{{Tip|<br />
*[[KDM]] is not available in Plasma 5. KDE upstream [http://blog.davidedmundson.co.uk/blog/display_managers_finale recommends] using the [[SDDM]] display manager as it provides integration with the Plasma 5 theme.<br />
*To better integrate SDDM with Plasma, it is recommended to edit {{ic|/etc/sddm.conf}} to use the breeze theme. Refer to [[SDDM#Theme settings]] for instructions.}}<br />
<br />
To launch a Plasma 5 session, choose ''Plasma'' in your [[display manager]] menu.<br />
<br />
Alternatively, to start Plasma with ''startx'', append {{ic|exec startkde}} to your {{ic|.xinitrc}} file. If you want to start Xorg at login, please see [[Start X at login]].<br />
<br />
== Configuration ==<br />
<br />
Most settings for KDE applications are stored in {{ic|~/.config}}, but some older applications may use {{ic|~/.kde4}}. However, configuring KDE is primarily done through the '''System Settings''' application. It can be started from a terminal by executing ''systemsettings5''.<br />
<br />
Frameworks 5 applications can use KDE 4 configuration however they expect the configuration files to be located in different places. To allow Frameworks 5 applications running in KDE 4 to share the same configurations they may be moved to the new locations and symlinked back to the old. Examples are:<br />
*Konsole profiles from {{ic|~/.kde4/share/apps/konsole}} to {{ic|~/.local/share/konsole/}}<br />
*Application appearance from {{ic|~/.kde4/share/config/kdeglobals}} to {{ic|~/.config/kdeglobals}} <br />
<br />
=== Personalization ===<br />
<br />
==== Plasma desktop ====<br />
<br />
===== Themes =====<br />
<br />
{{Note|1=If the Plasma cursor theme is incorrect in some instances, see the following [https://bbs.archlinux.org/viewtopic.php?pid=1533071#p1533071 forum post] for a workaround.}}<br />
[http://kde-look.org/index.php?xcontentmode=76 Plasma themes] define the look of panels and plasmoids. For easy system-wide installation, some such themes are available in both the official repositories and the [https://aur.archlinux.org/packages.php?O=0&K=plasmatheme&do_Search=Go AUR].<br />
<br />
The easiest way to install themes is by going through the Desktop Settings control panel:<br />
<br />
Workspace Theme > Desktop Theme > Get new Themes<br />
<br />
This will present a nice frontend for [http://www.kde-look.org/ kde-look.org] that allows you to install, uninstall, or update third-party plasmoid scripts with literally just one click.<br />
<br />
Splash and Lock screens are currently unavailable so to customize these screens you have to modify the original theme found in {{ic|/usr/share/plasma/look-and-feel/}}.<br />
See [https://www.kubuntuforums.net/showthread.php?67599-Plasma-5-background-images&s=59832dc20e5bfc2948dbb591d8453f61 this thread] on the Kubuntu forums.<br />
<br />
Note that the [[SDDM]] login screen is not part of this theme.<br />
<br />
====== Qt and GTK+ Applications Appearance ======<br />
<br />
{{Tip|For Qt and GTK theme consistency, see [[Uniform look for Qt and GTK applications]].}}<br />
<br />
;Qt4<br />
For Qt4 applications to have a consistent appearance, you need to install {{Pkg|breeze-kde4}} and then pick Breeze as GUI Style in {{ic|qtconfig-qt4}}.<br />
<br />
;GTK+<br />
The recommended theme for a pleasant appearance in GTK+ applications is {{Pkg|breeze-gtk}} or {{AUR|gnome-breeze-git}}, a GTK+ theme designed to mimic the appearance of Plasma 5 Breeze.<br />
Install {{Pkg|kde-gtk-config}} and select the installed GTK-theme for GTK2/GTK3-Theme in ''System Settings > Application Style > GNOME Application Style''.<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 />
Plasmoid binaries can be installed using PKGBUILDs from [https://aur.archlinux.org/packages.php?O=0&K=plasmoid&do_Search=Go&PP=25&SO=d&SB=v AUR], or you can write your own PKGBUILD.<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 Widgets''.<br />
<br />
This will present a nice frontend for [http://www.kde-look.org/ kde-look.org] that allows you to install, uninstall, or update third-party plasmoid scripts with literally just one click.<br />
<br />
Most plasmoids are not created officially by KDE developers. You can also try installing Mac OS X widgets, Microsoft Windows Vista/7 widgets, Google Widgets, and even SuperKaramba widgets.<br />
<br />
===== Sound applet in the system tray =====<br />
<br />
[[Install]] {{Pkg|plasma-pa}} or ({{Pkg|kmix}} (start Kmix from the Application Launcher).<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|~/.kde4/share/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-desktop": ("Plasma" "Plasma")/!d; s/^ *\([^ ]*\) .*/\1/g'); do<br />
xprop -id $WID -remove _KDE_NET_WM_SHADOW<br />
done<br />
</nowiki>}}<br />
<br />
The script can be run on login with ''Add Script'' in ''Autostart'':<br />
<br />
$ kcmshell4 autostart<br />
<br />
==== Window decorations ====<br />
<br />
[http://kde-look.org/index.php?xcontentmode=75 Window decorations] can be changed in ''System Settings > Workspace Appearance > 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?O=0&K=kdestyle&do_Search=Go&PP=25&SO=d&SB=v AUR].<br />
<br />
==== Icon themes ====<br />
<br />
Not many full system icons themes are available for KDE 4. You can open up ''System Settings > Application Appearance > Icons'' and browse for new ones or install them manually. Many of them can be found on [http://www.kde-look.org/ kde-look.org].<br />
<br />
Official logos, icons, CD labels and other artwork for Arch Linux are provided in the {{AUR|archlinux-artwork}} package. After installing you can find such artwork at {{ic|/usr/share/archlinux/}}.<br />
<br />
===== Qt 5 icons theme =====<br />
<br />
If you are on Plasma 5, use ''System Settings > Icons'', while if you are on Plasma 4 use {{ic|kcmshell5 icons}} to set the icons theme.<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''.<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 > Appearance > 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 '''96''' in ''System Settings > Application Appearance > Fonts''.<br />
<br />
If that does not work, try setting the DPI directly in your Xorg configuration as documented [[Xorg#Setting_DPI_manually|here]].<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]<br />
However, you can achieve something similar by editing the file {{ic|~/.config/kwinrc}} adding <br />
{{ic|1=BorderlessMaximizedWindows=true}} in the {{ic|[Windows]}} section.<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 > Printer Configuration''. To use this method, you must first install {{Pkg|print-manager}} and {{Pkg|cups}}.<br />
<br />
The {{ic|avahi-daemon.service}} and {{ic|org.cups.cupsd.service}} daemons must be started first; otherwise, you will get the following error:<br />
The service 'Printer Configuration' does not provide an interface 'KCModule'<br />
with keyword 'system-config- printer-kde/system-config-printer-kde.py'<br />
The factory does not support creating components of the specified type.<br />
<br />
If you are getting the following error, you need to give your user the right to manage printers.<br />
There was an error during CUPS operation: 'cups-authorization-canceled'<br />
<br />
For CUPS, this is set in {{ic|/etc/cups/cups-files.conf}}.<br />
<br />
Adding {{ic|lpadmin}} to {{ic|/etc/group}} and then to the {{ic|SystemGroup}} directive in {{ic|/etc/cups/cups-files.conf}} allows anyone in the {{ic|lpadmin}} group to configure printers. Do ''not'' add the {{ic|lp}} group to the {{ic|SystemGroup}} directive, or printing will fail.<br />
<br />
# groupadd -g107 lpadmin<br />
<br />
{{hc|/etc/cups/cups-files.conf|# Administrator user group...<br />
SystemGroup sys root lpadmin}}<br />
<br />
{{Tip|Read [[CUPS#Administration]] to get more details on how to configure CUPS.}}<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 usershares, which the stock smb.conf does not have enabled. Instructions to add them are in [[Samba#Creating usershare path]], after which sharing in Dolphin should work out of the box after restarting Samba.<br />
<br />
=== KDE Desktop activities ===<br />
<br />
KDE Desktop Activities are Plasma-based virtual-desktop-like sets of Plasma Widgets where you can independently configure widgets as if you have more than one screen or desktop.<br />
<br />
On your desktop, click the Cashew Plasmoid and, on the pop-up window, press "Activities".<br />
<br />
A plasma bar presenting you the current existing Plasma Desktop Activities will appear at the bottom of the screen. You can navigate between them by pressing the correspondent icons.<br />
<br />
=== Power saving ===<br />
<br />
Plasma has an integrated power saving service called "'''Powerdevil Power Management'''" that may adjust the power saving profile of the system and/or the brightness of the screen (if supported).<br />
<br />
=== Monitoring changes on local files and directories ===<br />
<br />
KDE now uses '''inotify''' directly from the kernel with '''kdirwatch''' (included in kdelibs), so Gamin or FAM are no longer needed. You may want to install this {{AUR|kdirwatch}}{{Broken package link|{{aur-mirror|kdirwatch}}}} from AUR which is a GUI frontend for kdirwatch.<br />
<br />
=== Autostarting applications ===<br />
<br />
{{Accuracy|See [[KDE Wallet#Using the KDE Wallet to store ssh keys]]. Merge general information here.}}<br />
<br />
Plasma can autostart applications and run scripts on startup and shutdown. To autostart an application, start {{ic|systemsettings}} and navigate to ''Startup and Shutdown'' -> ''Autostart'' and add the program or shell script of your choice. Note that programs can be autostarted on login only, whilst shell scripts can also be run on shutdown or even before Plasma itself starts. For applications, a {{ic|.desktop}} file will be created in the {{ic|~/.config/autostart}} directory. For shell scripts, a symlink will be created in one the following directories:<br />
* {{ic|~/.config/autostart-scripts}} - for starting at login.<br />
* {{ic|~/.config/plasma-workspace/shutdown}} - for starting on shutdown.<br />
* {{ic|~/.config/plasma-workspace/env}} - for starting prior to login.<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.<br />
<br />
'''Configuration for look and feel of GTK applications.'''<br />
* {{Pkg|kde-gtk-config}}<br />
* {{AUR|kcm-gtk}}{{Broken package link|{{aur-mirror|kcm-gtk}}}}<br />
* {{AUR|kcm-qt-graphicssystem}}<br />
<br />
'''Configuration for the GRUB bootloader.'''<br />
* {{AUR|grub2-editor}}{{Broken package link|{{aur-mirror|grub2-editor}}}}<br />
<br />
'''Configuration for the [[Uncomplicated Firewall]] (UFW)'''<br />
* {{AUR|kcm-ufw}}<br />
<br />
'''Configuration for [[PolicyKit]]'''<br />
* {{AUR|kcm-polkit-kde-git}}{{Broken package link|{{aur-mirror|kcm-polkit-kde-git}}}}<br />
<br />
'''Configuration for Wacom tablets'''<br />
* {{AUR|kcm-wacomtablet}}<br />
<br />
'''Configuration for systemd'''<br />
* {{Pkg|systemd-kcm}}<br />
<br />
More KCMs can be found at [http://kde-apps.org/index.php?xcontentmode=273 kde-apps.org].<br />
<br />
== Desktop search ==<br />
<br />
KDE implements desktop search with a software called Baloo, a file indexing and searching solution.<br />
<br />
=== Baloo ===<br />
<br />
==== Using and configuring Baloo ====<br />
<br />
In order to search using Baloo on the KDE Plasma Desktop, press {{ic|ALT+F2}} and type in your query. Within Dolphin press {{ic|CTRL+F}}.<br />
<br />
By default the Desktop Search KCM exposes only two options: A panel to blacklist folders and, as of 4.13.1, a way to disable it with one click.<br />
<br />
Alternatively you can edit your {{ic|~/.kde4/share/config/baloofilerc}} (KDE4) or {{ic|~/.config/baloofilerc}} (KF5) file ([https://community.kde.org/Baloo/Configuration info]). Additionally the {{ic|balooctl}} process can also be used. In order to disable Baloo run {{ic|balooctl disable}}.<br />
<br />
Once you added additional folders to the blacklist or disabled Baloo entirely, a process named {{ic|baloo_file_cleaner}} removes all unneeded index files automatically. They are stored under {{ic|~/.local/share/baloo/}}.<br />
<br />
More advanced configuration options are available through {{AUR|kcm_baloo_advanced}}.<br />
<br />
==== How do I index a removable device? ====<br />
<br />
By default every removable device is blacklisted. You just have to remove your device from the blacklist in the KCM panel.<br />
<br />
=== Web browsers ===<br />
==== Konqueror and Rekonq ====<br />
Konqueror supports two rendering engines – KHTML and QtWebKit (via the {{Pkg|kwebkitpart}} package) – Rekonq supports only QtWebKit. KHTML development was halted after Qt shipped WebKit but was kept for compatibility reasons. QtWebKit, in turn, has since been [https://www.mail-archive.com/development@qt-project.org/msg18866.html deprecated] by the Qt Project and replaced by [[Chromium]]-based Qt WebEngine which is currently not supported by either Konqueror or Rekonq.<br />
<br />
A successor named Fiber is currently in development, which will use Chromium's engine.<br />
<br />
==== Firefox ====<br />
Firefox can be configured to better integrate with Plasma. See [[Firefox#KDE_integration|Firefox KDE integration]] for details.<br />
<br />
==== Qupzilla ====<br />
Qupzilla ({{Pkg|qupzilla}}) is a Qt web browser with Plasma integration features. Qupzilla 2.0 will use Qt WebEngine intead of WebKit.<br />
<br />
== PIM ==<br />
<br />
KDE offers its own stack for personal information management. This includes emails, contacts, calendar, etc.<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.<br />
<br />
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 />
==== Disabling Akonadi ====<br />
<br />
See this [http://userbase.kde.org/Akonadi#Disabling_the_Akonadi_subsystem section in the KDE userbase]. Alternatively, install {{AUR|akonadi-fake}}.<br />
<br />
==== Database configuration ====<br />
<br />
Start {{ic|akonaditray}} from package {{Pkg|kdepim-runtime}}. Right click on it and select '''configure'''. In the Akonadi server configure tab, you can:<br />
* Configuring Akonadi to use MySQL/MariaDB Server<br />
** If your home directory is on a ZFS pool, you will need to create {{ic|~/.config/akonadi/mysql-local.conf}} with the following contents:<br />
<br />
[mysqld]<br />
innodb_use_native_aio = 0<br />
<br />
Otherwise you will get the [[MySQL#OS error 22 when running on ZFS|OS error 22]]<br />
* Configuring Akonadi to use PostgreSQL Server<br />
* Configuring Akonadi to use SQLite<br />
** Edit {{ic|~/.config/akonadi/akonadiserverrc}} to match the below<br />
<br />
[General]<br />
Driver=QSQLITE3<br />
<br />
[QSQLITE3]<br />
Name=/home/username/.local/akonadi/akonadi.db<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 />
You can choose between backends based on [[GStreamer]] and [[VLC]] – each available in versions for Qt4 applications and Qt5 applications ({{Pkg|phonon-qt4-gstreamer}}, {{Pkg|phonon-qt5-gstreamer}} – {{Pkg|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 [http://community.kde.org/Phonon/FeatureMatrix features set.]<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 at ''System Settings > Multimedia > Phonon > Backend''. For Plasma 5 this would be ''System Settings > Multimedia > Backend''.<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 />
<br />
== Useful applications ==<br />
<br />
The official set of KDE applications may be found [http://www.kde.org/applications/ here].<br />
<br />
=== Yakuake ===<br />
<br />
[[Yakuake]] provides a Quake-like terminal emulator whose visibility is toggled by the F12 key. It also has support for multiple tabs. Yakuake is available in the package {{Pkg|yakuake}}.<br />
<br />
=== KDE Telepathy ===<br />
<br />
[http://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 '+xx', e.g. '+49' for Germany). 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). Note that 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 />
== Tips and tricks ==<br />
<br />
=== Using an alternative window manager ===<br />
There may be reasons you want to use another window manager than KWin, for example to work around the DRI bug that causes [[PRIME#Black_screen_with_GL-based_compositors|black screen with PRIME]].<br />
<br />
To use an alternative [[window manager]] with Plasma open the ''System Settings'' panel, navigate to ''(Default) Applications > Window Manager > Use a different window manager'' and select the window manager you wish to use from the list.<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 {{ic|.xinitrc}} file:<br />
exec openbox-kde-session<br />
<br />
==== Compiz custom ====<br />
<br />
If you need to run Compiz with custom options and switches select ''Compiz custom'' and then create a script called {{ic|compiz-kde-launcher}} and add to it the commands you wish to use to start Compiz. See the example below:<br />
<br />
{{hc|/usr/local/bin/compiz-kde-launcher|<nowiki><br />
#!/bin/bash<br />
LIBGL_ALWAYS_INDIRECT=1<br />
compiz --replace &<br />
wait<br />
</nowiki>}}<br />
<br />
Then make it executable:<br />
$ chmod +x /usr/local/bin/compiz-kde-launcher<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 />
=== Integrate Android ===<br />
<br />
KDE Connect provides several features for you:<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 {{ic|KDE Connect}} from [https://play.google.com/store/apps/details?id=org.kde.kdeconnect_tp Google Play] or from [https://f-droid.org/repository/browse/?fdid=org.kde.kdeconnect_tp F-Droid].<br />
<br />
=== Configure KWin to use OpenGL ES ===<br />
Due to QtQuick2, both the Qt OpenGL module and KWin have to be [http://blog.martin-graesslin.com/blog/2013/11/kwin5-qtquick-2-and-the-caused-changes-for-opengl/ compiled against OpenGL ES.]<br />
<br />
=== Speed up application startup ===<br />
<br />
User Rob described a "[http://kdemonkey.blogspot.nl/2008/04/magic-trick.html magic trick]" on his blog to improve application start-up time by 50-150ms.<br />
To enable it, create this folder in your home:<br />
$ mkdir ~/.compose-cache/<br />
It can produce freezes under heavy io. To avoid this, also do:<br />
$ ln -sfv /run/user/$UID/ /home/$USER/.compose-cache<br />
<br />
{{Note|For those curious about what is going on here, this enables an optimization which Lubos (of general KDE speediness fame) came up with some time ago and was then rewritten and integrated into libx11. Ordinarily, on startup, applications read input method information from {{ic|/usr/share/X11/locale/''your locale''/Compose}}. This file is quite long (>5000 lines for the en_US.UTF-8 one) and takes some time to process. libX11 can create a cache of the parsed information which is much quicker to read subsequently, but it will only re-use an existing cache or create a new one in {{ic|~/.compose-cache}} if the directory already exists.}}<br />
<br />
=== Configuring monitor resolution / multiple monitors ===<br />
<br />
To enable display resolution management and multiple monitors in Plasma 5, install {{Pkg|kscreen}}. This adds the additional options to System Settings/Display and Monitor.<br />
<br />
=== Open application launcher with Super key (Windows key) ===<br />
<br />
Install and start {{Pkg|ksuperkey}}. Now assign Alt + F1 as hot key. The Super Key will now open the application launcher. You can add ksuperkey to the autostart if you don't want to start it manually.<br />
<br />
== Troubleshooting ==<br />
<br />
=== Graphics card related ===<br />
<br />
==== Intel ====<br />
<br />
If you use 3D-accelerated composition with Intel, you might find that the Plasma panel and other applications don't refresh properly (stay frozen). Some Intel drivers have [https://bugzilla.redhat.com/show_bug.cgi?id=1259475 problems with EGL]. Try to set Plasma 5's ''OpenGL interface'' setting to GLX instead (in System Settings under ''Display and Monitor'' -> ''Compositor''. If that does not work, see ''[[Intel_graphics#SNA_issues|Intel graphics SNA issues]]'' for alternative solutions.<br />
<br />
==== Plasma keeps crashing with legacy Nvidia ====<br />
<br />
There is a bug in Plasma with using the Nvidia-304xx driver described [https://bugs.kde.org/show_bug.cgi?id=348753 here.] Rather than disabling compositing, try creating a file kwin.sh in ~/.config/plasma-workspace/env/ with the following content<br />
<br />
#!/bin/sh<br />
export KWIN_EXPLICIT_SYNC=0<br />
Then go to the system-settings -> Startup and Shutdown -> Autostart and Check/Add the script as a pre-kde startup file<br />
<br />
=== Configuration related ===<br />
<br />
Many problems in KDE are related to configuration.<br />
<br />
==== Reset all kdelib4 apps configuration ====<br />
<br />
To test whether your config is the problem try quitting all kdelib4 apps and run:<br />
<br />
$ cp -r ~/.kde4 ~/.kde4.safekeeping<br />
$ rm .kde4/{cache,socket,tmp}-$(hostname)<br />
<br />
The ''rm'' command just removes symbolic links which will be recreated automatically.<br />
<br />
If the problem does not manifest itself, gradually move parts from the saved configuration back, and restart the application(s) regularly to test and identify problematic parts.<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 it 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 (bugs.kde.org) '''only if it is an official widget'''. If it is not, it is recommended you find the entry on kde-look.org 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}}:<br />
<br />
$ for j in plasma*; do mv -- "$j" "${j%}.bak"; done<br />
<br />
This command will '''rename all Plasma related configs''' 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 [[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 and several other problems such as ark being unable to unrar or unzip or amarok not recognizing any of your musics. This solution can also resolve problems with KDE and Qt programmes looking bad following upgrade.<br />
<br />
Rebuild your cache with the following commands:<br />
<br />
$ rm ~/.config/Trolltech.conf<br />
$ kbuildsycoca4 --noincremental<br />
<br />
Hopefully, your problems are now fixed.<br />
<br />
=== Clean akonadi configuration to fix KMail ===<br />
<br />
First, make sure that KMail is not running. Then backup configuration:<br />
$ mv ~/.local/share/akonadi ~/.local/share/akonadi-old<br />
$ mv ~/.config/akonadi ~/.config/akonadi-old<br />
<br />
Start ''SystemSettings > Personal'' and remove all the resources. Go back to Dolphin and remove the original {{ic|~/.local/share/akonadi}} and<br />
{{ic|~/.config/akonadi}} - the copies you made ensure that you can back-track if necessary.<br />
<br />
Now go back to the System Settings page and carefully add the necessary resources. You should see the resource reading in your mail folders. Then start Kontact/KMail to see if it work properly.<br />
<br />
=== Getting current state of KWin for support and debug purposes ===<br />
<br />
This command prints out a wonderful summary of the current state of KWin including used options, used compositing backend and relevant OpenGL driver capabilities. See more on [http://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 />
=== KDE and Qt programs look bad when in a different window manager ===<br />
<br />
If you are using KDE or Qt programs but not in a full Plasma session (specifically, you did not run {{ic|startkde}}), then as of Plasma 4.6.1 you will need to tell Qt how to find KDE's styles (Oxygen, QtCurve etc.)<br />
<br />
You just need to set the environment variable {{ic|QT_PLUGIN_PATH}}. E.g. put:<br />
<br />
export QT_PLUGIN_PATH=$HOME/.kde4/lib/kde4/plugins/:/usr/lib/kde4/plugins/<br />
<br />
into your {{ic|/etc/profile}} (or {{ic|~/.profile}} if you do not have root access). {{ic|qtconfig-qt4}} should then be able to find your KDE styles and everything should look nice again!<br />
<br />
Alternatively, you can symlink the Qt styles directory to the KDE styles one:<br />
# ln -s /usr/lib/kde4/plugins/styles/ /usr/lib/qt4/pluginlib32-libdbusmenu-glibs/styles<br />
<br />
Under Gnome you can try to install the package libgnomeui.<br />
<br />
=== KF5/Qt5 applications don't display icons in i3/fvwm/awesome ===<br />
<br />
See [[Qt#Configuration of Qt apps under environments other than KDE]].<br />
<br />
=== Graphical related problems ===<br />
<br />
==== Low 2D desktop performance (or) artifacts appear when on 2D ====<br />
<br />
===== GPU driver problem =====<br />
<br />
Make sure you have the proper driver for your card installed, so that your desktop is at least 2D accelerated. Follow these articles for more information: [[ATI]], [[NVIDIA]], [[Intel]] for more information, in order to make sure that everything is all right.<br />
The open-source ATI and Intel drivers and the proprietary (binary) Nvidia driver should theoretically provide the best 2D and 3D acceleration.<br />
<br />
===== The Raster engine workaround =====<br />
<br />
If this does not solve your problems, your driver may not provide a good '''XRender''' acceleration which the current Qt painter engine relies on by default.<br />
<br />
You can change the painter engine to software based only by invoking the application with the {{ic|-graphicssystem raster}} command line. This rendering engine can be set as the default one by recompiling Qt with the same as configure option, {{ic|-graphicssystem raster}}.<br />
<br />
The raster paint engine enables the CPU to do the majority of the painting, as opposed to the GPU. You may get better performance, depending on your system. This is basically a work-around for the terrible Linux driver stack, since the CPU should obviously not be doing graphical computations since it is designed for fewer threads of greater complexity, as opposed to the GPU which is many threads but lesser computational strength. So, only use Raster engine if you are having problems or your GPU is much slower than you CPU, otherwise is better to use XRender.<br />
<br />
Since Qt 4.7+, recompiling Qt is not needed. Simply export {{ic|1=QT_GRAPHICSSYSTEM=raster}}, or {{ic|opengl}}, or {{ic|native}} (for the default). Raster depends on the CPU, OpenGL depends on the GPU and high driver support, and Native is just using the X11 rendering (mixture, usually).<br />
<br />
'''The best and automatic way to do that''' is to install {{AUR|kcm-qt-graphicssystem}} from AUR and configure this particular Qt setting through ''System Settings > Qt Graphics System''.<br />
<br />
For more information, consult this [http://apachelog.wordpress.com/2010/09/05/qt-graphics-system-kcm/ KDE Developer blog entry] and/or this [http://labs.trolltech.com/blogs/2009/12/18/qt-graphics-and-performance-the-raster-engine/ Qt Developer blog entry].<br />
<br />
==== Low 3D desktop performance====<br />
<br />
KDE begins with desktop effects enabled. Older cards may be insufficient for 3D desktop acceleration. You can disable desktop effects in ''System Settings > Desktop Effects'' and you can toggle desktop effects with {{ic|Alt+Shift+F12}}.<br />
<br />
{{Note| You may encounter such problems with 3D desktop performance even when using a more powerful graphics card, especially the catalyst proprietary driver ({{ic|fglrx}}). This driver is known for having problems with 3D acceleration. Visit [[ATI|the ATI Wiki page]] for more troubleshooting.}}<br />
<br />
==== Desktop compositing is disabled on my system with a modern Nvidia GPU ====<br />
<br />
Sometimes, KWin may have settings in its configuration file ({{ic|kwinrc}}) that ''may'' cause a problem on re-activating the 3D desktop {{ic|OpenGL}} compositing. That could be caused randomly (for example, due to a sudden Xorg crash or restart, and it gets corrupted), so, in case that happens, delete your {{ic|~/.kde4/share/config/kwinrc}} file and relogin. The KWin settings will turn to the KDE default ones and the problem should be probably gone.<br />
<br />
==== Flickering in fullscreen when compositing is enabled ====<br />
<br />
As of KDE SC 4.6.0, there is an option in ''Sytem Settings > Desktop Effect > Advanced > Suspend desktop effects for fullscreen windows''. Uncheck it would tell kwin to disable unredirect fullscren.<br />
<br />
==== Screen Tearing with desktop compositing enabled ====<br />
<br />
KWin may suffer from [[Wikipedia:Screen tearing|screen tearing]] while desktop effects are enabled. Uncheck the VSync option under ''System Settings > Desktop Effects > Advanced > Use Vsync''.<br />
<br />
{{Note|With the release of Plasma 4.11, several new Vsync options have been added, which may help with screen tearing.}}<br />
<br />
For proprietary driver users, ensure that the driver's VSync option is enabled (''amdccle'' for [[Catalyst]] users, and ''nvidia-settings'' for [[NVIDIA]] users).<br />
<br />
==== Display settings lost on reboot (multiple monitors) ====<br />
There is a [https://bugs.kde.org/show_bug.cgi?id=346961 bug] in kscreen that makes it forget dual screen settings after reboot with certain displays.<br />
A possible workaround is to delete kscreen and make sure that your screen resolution is specified in a xorg.conf file:<br />
* For Nouveau you can use the template at [[Nouveau#Dual Head]], just edit it to suit your setup.<br />
* For the proprietary nvidia driver you can use the [[NVIDIA#Using_NVIDIA_Settings|nvidia-settings]] utility as root to write the config file.<br />
<br />
''' Other suggestion '''<br />
<br />
Installing {{Pkg|kscreen4}} might fix the problem unless your screens share the same EDID. Kscreen is the improved screen management software for KDE, more information can be found [https://fedoraproject.org/wiki/Changes/KScreen?rd=Features/KScreen here].<br />
<br />
=== Sound problems under KDE ===<br />
<br />
==== ALSA related problems ====<br />
<br />
{{Note|First make sure you have {{Pkg|alsa-lib}} and {{Pkg|alsa-utils}} installed.}}<br />
<br />
===== "Falling back to default" messages when trying to listen to any sound in KDE =====<br />
<br />
When you encounter such messages:<br />
The audio playback device ''name_of_the_sound_device'' does not work.<br />
Falling back to default<br />
Go to ''System Settings > Multimedia > Phonon'' and set the device named {{ic|default}} above all the other devices in each box you see.<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 {{Pkg|phonon-qt4-vlc}} or {{Pkg|phonon-qt5-vlc}}.<br />
Then, make sure the backend is preferred via ''System Settings > Multimedia > Phonon > Backend (tab)''.<br />
<br />
=== Konsole does not save commands' history ===<br />
<br />
By default console command history is saved only when you type 'exit' in console. When you close Konsole with 'x' in the corner it does not happen.<br />
To enable autosaving after every command execution:<br />
<br />
{{hc|~/.bashrc|<nowiki><br />
shopt -s histappend<br />
[[ "${PROMPT_COMMAND}" ]] && PROMPT_COMMAND="$PROMPT_COMMAND;history -a" || PROMPT_COMMAND="history -a"<br />
</nowiki>}}<br />
<br />
=== Inotify folder watch limit ===<br />
<br />
If you get the following error:<br />
<br />
KDE Baloo Filewatch service reached the inotify folder watch limit. File changes may be ignored.<br />
<br />
Then you will need to increase the inotify folder watch limit:<br />
<br />
# echo 10000 > /proc/sys/fs/inotify/max_user_watches<br />
<br />
To make changes permanent, create {{ic|/etc/sysctl.d/90-inotify.conf}} with<br />
<br />
#increase inotify watch limit<br />
fs.inotify.max_user_watches = 10000<br />
<br />
== Unstable releases ==<br />
<br />
When KDE is reaching beta or RC milestone, KDE "unstable" packages are uploaded to the ''kde-unstable'' repository. They stay there until KDE is declared stable and passes to the ''extra'' repository.<br />
<br />
You can add ''kde-unstable'' with:<br />
<br />
{{hc|/etc/pacman.conf|2=<br />
[kde-unstable]<br />
Include = /etc/pacman.d/mirrorlist<br />
}}<br />
<br />
{{Warning|Make sure to add these lines '''before''' the ''extra'' repository. Adding the section after ''extra'' will cause [[pacman]] to prefer the older packages in the extra repository. {{ic|pacman -Syu}} will not install them, and will warn that they are "too new" if installed manually. Also, some of the libraries will stay at the older versions, which may cause file conflicts and/or instability!}}<br />
<br />
# ''kde-unstable'' is based upon ''testing''. Therefore, you need to enable the repositories in the following order: ''kde-unstable'', ''testing'', ''core'', ''extra'', ''community-testing'', ''community''.<br />
# To update from a previous KDE installation, run: {{ic|# pacman -Syu}} or {{ic|# pacman -S kde-unstable/kde}}<br />
# If you do not have KDE installed, you might have difficulties to install it by using groups (limitation of pacman)<br />
# '''Subscribe and read the [https://mailman.archlinux.org/pipermail/arch-dev-public/ arch-dev-public] mailing list'''<br />
# Make sure [[#Bugs|you make bug reports]] if you find any problems.<br />
<br />
== Bugs ==<br />
<br />
It is preferable that if you find a minor or serious bug, you should visit [https://bugs.archlinux.org the Arch Bug Tracker] or/and [http://bugs.kde.org KDE Bug Tracker] in order to report that. Make sure that you are clear about what you want to report.<br />
<br />
If you have any problem and you write about in on the Arch forums, first make sure that you have '''fully''' updated your system using a good sync mirror (check [https://www.archlinux.de/?page=MirrorStatus here]) or try [[Reflector]].<br />
<br />
== See also ==<br />
<br />
* [http://www.kde.org KDE homepage]<br />
* [https://bugs.kde.org KDE bug tracker]<br />
* [https://projects.kde.org KDE Projects]<br />
* [http://blog.martin-graesslin.com/blog/kategorien/kde/ Martin Graesslin's blog]</div>Beta990https://wiki.archlinux.org/index.php?title=KDE&diff=412371KDE2015-12-15T12:56:56Z<p>Beta990: /* Sound applet in the system tray */ Kmix != plasa-pa, also it has nothing to do with the session, it also starts on an empty session start</p>
<hr />
<div>[[Category:KDE]]<br />
[[ar:KDE]]<br />
[[cs:KDE]]<br />
[[de:KDE]]<br />
[[es:KDE]]<br />
[[fr:KDE]]<br />
[[it:KDE]]<br />
[[ja:KDE]]<br />
[[pl:KDE]]<br />
[[ru:KDE]]<br />
[[tr:KDE Masaüstü Ortamı]]<br />
[[zh-CN:KDE]]<br />
[[zh-TW:KDE]]<br />
{{Related articles start}}<br />
{{Related|Desktop environment}}<br />
{{Related|Display manager}}<br />
{{Related|Dolphin}}<br />
{{Related|Window manager}}<br />
{{Related|Qt}}<br />
{{Related|KDM}}<br />
{{Related|KDevelop 4}}<br />
{{Related|Trinity}}<br />
{{Related|Uniform Look for Qt and GTK Applications}}<br />
{{Related articles end}}<br />
<br />
KDE is a software project currently comprising of a [[desktop environment]] known as Plasma (or Plasma Workspaces), a collection of libraries and frameworks (KDE Frameworks) and several applications (KDE Applications) as well. KDE upstream has a well maintained [http://userbase.kde.org/ UserBase wiki]. Detailed information about most KDE applications can be found there.<br />
<br />
== Installation ==<br />
<br />
=== Plasma Desktop ===<br />
<br />
{{Note|<br />
*Plasma 5 is not co-installable with Plasma 4.<br />
*The Plasma 4 desktop is unmaintained since August 2015.[https://www.kde.org/announcements/announce-applications-15.08.0.php] It is no longer in the official repositories since December 2015.[https://www.archlinux.org/news/dropping-plasma-4/]}}<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 [[KDE Packages]]. Alternatively, for a more minimal Plasma installation, install the {{Pkg|plasma-desktop}} package.<br />
<br />
=== Upgrading from Plasma 4 to 5 ===<br />
<br />
# Isolate {{ic|multi-user.target}}{{bc|# systemctl isolate multi-user.target}} <br />
# [[Pacman|Uninstall]] the kdebase-workspace package{{bc|# pacman -Rc kdebase-workspace}} <br />
# [[Install]] the {{pkg|plasma-meta}} package or the {{grp|plasma}} group.<br />
# If you use KDM as display manager, disable it{{bc|# systemctl disable kdm}} and enable [[SDDM]]{{bc|# systemctl enable sddm}} or install and enable any other [[display manager]].<br />
# Reboot.<br />
<br />
{{Note|The Plasma 4 configuration is not automatically migrated to Plasma 5, so you will have to configure your desktop from scratch.}}<br />
<br />
=== KDE applications and language packs ===<br />
<br />
To install the full set of KDE Applications, install the {{Grp|kde-applications}} group or the {{Pkg|kde-applications-meta}} meta-packages to install specific modules. Note that this will only install applications, it will not install any version of the Plasma Desktop.<br />
<br />
If you need language files, install {{ic|kde-l10n-'''yourlanguagehere'''}} (e.g. {{Pkg|kde-l10n-de}} for the German language). For a full list of available languages see [https://www.archlinux.org/packages/extra/any/kde-l10n/ this link].<br />
<br />
== Starting Plasma ==<br />
<br />
{{Tip|<br />
*[[KDM]] is not available in Plasma 5. KDE upstream [http://blog.davidedmundson.co.uk/blog/display_managers_finale recommends] using the [[SDDM]] display manager as it provides integration with the Plasma 5 theme.<br />
*To better integrate SDDM with Plasma, it is recommended to edit {{ic|/etc/sddm.conf}} to use the breeze theme. Refer to [[SDDM#Theme settings]] for instructions.}}<br />
<br />
To launch a Plasma 5 session, choose ''Plasma'' in your [[display manager]] menu.<br />
<br />
Alternatively, to start Plasma with ''startx'', append {{ic|exec startkde}} to your {{ic|.xinitrc}} file. If you want to start Xorg at login, please see [[Start X at login]].<br />
<br />
== Configuration ==<br />
<br />
Most settings for KDE applications are stored in {{ic|~/.config}}, but some older applications may use {{ic|~/.kde4}}. However, configuring KDE is primarily done through the '''System Settings''' application. It can be started from a terminal by executing ''systemsettings5''.<br />
<br />
Frameworks 5 applications can use KDE 4 configuration however they expect the configuration files to be located in different places. To allow Frameworks 5 applications running in KDE 4 to share the same configurations they may be moved to the new locations and symlinked back to the old. Examples are:<br />
*Konsole profiles from {{ic|~/.kde4/share/apps/konsole}} to {{ic|~/.local/share/konsole/}}<br />
*Application appearance from {{ic|~/.kde4/share/config/kdeglobals}} to {{ic|~/.config/kdeglobals}} <br />
<br />
=== Personalization ===<br />
<br />
==== Plasma desktop ====<br />
<br />
===== Themes =====<br />
<br />
{{Note|1=If the Plasma cursor theme is incorrect in some instances, see the following [https://bbs.archlinux.org/viewtopic.php?pid=1533071#p1533071 forum post] for a workaround.}}<br />
[http://kde-look.org/index.php?xcontentmode=76 Plasma themes] define the look of panels and plasmoids. For easy system-wide installation, some such themes are available in both the official repositories and the [https://aur.archlinux.org/packages.php?O=0&K=plasmatheme&do_Search=Go AUR].<br />
<br />
The easiest way to install themes is by going through the Desktop Settings control panel:<br />
<br />
Workspace Theme > Desktop Theme > Get new Themes<br />
<br />
This will present a nice frontend for [http://www.kde-look.org/ kde-look.org] that allows you to install, uninstall, or update third-party plasmoid scripts with literally just one click.<br />
<br />
Splash and Lock screens are currently unavailable so to customize these screens you have to modify the original theme found in {{ic|/usr/share/plasma/look-and-feel/}}.<br />
See [https://www.kubuntuforums.net/showthread.php?67599-Plasma-5-background-images&s=59832dc20e5bfc2948dbb591d8453f61 this thread] on the Kubuntu forums.<br />
<br />
Note that the [[SDDM]] login screen is not part of this theme.<br />
<br />
====== Qt and GTK+ Applications Appearance ======<br />
<br />
{{Tip|For Qt and GTK theme consistency, see [[Uniform look for Qt and GTK applications]].}}<br />
<br />
;Qt4<br />
For Qt4 applications to have a consistent appearance, you need to install {{Pkg|breeze-kde4}} and then pick Breeze as GUI Style in {{ic|qtconfig-qt4}}.<br />
<br />
;GTK+<br />
The recommended theme for a pleasant appearance in GTK+ applications is {{Pkg|breeze-gtk}} or {{AUR|gnome-breeze-git}}, a GTK+ theme designed to mimic the appearance of Plasma 5 Breeze.<br />
Install {{Pkg|kde-gtk-config}} and select the installed GTK-theme for GTK2/GTK3-Theme in ''System Settings > Application Style > GNOME Application Style''.<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 />
Plasmoid binaries can be installed using PKGBUILDs from [https://aur.archlinux.org/packages.php?O=0&K=plasmoid&do_Search=Go&PP=25&SO=d&SB=v AUR], or you can write your own PKGBUILD.<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 Widgets''.<br />
<br />
This will present a nice frontend for [http://www.kde-look.org/ kde-look.org] that allows you to install, uninstall, or update third-party plasmoid scripts with literally just one click.<br />
<br />
Most plasmoids are not created officially by KDE developers. You can also try installing Mac OS X widgets, Microsoft Windows Vista/7 widgets, Google Widgets, and even SuperKaramba widgets.<br />
<br />
===== Sound applet in the system tray =====<br />
<br />
[[Install]] {{Pkg|plasma-pa}}) or ({{Pkg|kmix}} (start Kmix from the Application Launcher).<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|~/.kde4/share/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-desktop": ("Plasma" "Plasma")/!d; s/^ *\([^ ]*\) .*/\1/g'); do<br />
xprop -id $WID -remove _KDE_NET_WM_SHADOW<br />
done<br />
</nowiki>}}<br />
<br />
The script can be run on login with ''Add Script'' in ''Autostart'':<br />
<br />
$ kcmshell4 autostart<br />
<br />
==== Window decorations ====<br />
<br />
[http://kde-look.org/index.php?xcontentmode=75 Window decorations] can be changed in ''System Settings > Workspace Appearance > 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?O=0&K=kdestyle&do_Search=Go&PP=25&SO=d&SB=v AUR].<br />
<br />
==== Icon themes ====<br />
<br />
Not many full system icons themes are available for KDE 4. You can open up ''System Settings > Application Appearance > Icons'' and browse for new ones or install them manually. Many of them can be found on [http://www.kde-look.org/ kde-look.org].<br />
<br />
Official logos, icons, CD labels and other artwork for Arch Linux are provided in the {{AUR|archlinux-artwork}} package. After installing you can find such artwork at {{ic|/usr/share/archlinux/}}.<br />
<br />
===== Qt 5 icons theme =====<br />
<br />
If you are on Plasma 5, use ''System Settings > Icons'', while if you are on Plasma 4 use {{ic|kcmshell5 icons}} to set the icons theme.<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''.<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 > Appearance > 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 '''96''' in ''System Settings > Application Appearance > Fonts''.<br />
<br />
If that does not work, try setting the DPI directly in your Xorg configuration as documented [[Xorg#Setting_DPI_manually|here]].<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]<br />
However, you can achieve something similar by editing the file {{ic|~/.config/kwinrc}} adding <br />
{{ic|1=BorderlessMaximizedWindows=true}} in the {{ic|[Windows]}} section.<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 > Printer Configuration''. To use this method, you must first install {{Pkg|print-manager}} and {{Pkg|cups}}.<br />
<br />
The {{ic|avahi-daemon.service}} and {{ic|org.cups.cupsd.service}} daemons must be started first; otherwise, you will get the following error:<br />
The service 'Printer Configuration' does not provide an interface 'KCModule'<br />
with keyword 'system-config- printer-kde/system-config-printer-kde.py'<br />
The factory does not support creating components of the specified type.<br />
<br />
If you are getting the following error, you need to give your user the right to manage printers.<br />
There was an error during CUPS operation: 'cups-authorization-canceled'<br />
<br />
For CUPS, this is set in {{ic|/etc/cups/cups-files.conf}}.<br />
<br />
Adding {{ic|lpadmin}} to {{ic|/etc/group}} and then to the {{ic|SystemGroup}} directive in {{ic|/etc/cups/cups-files.conf}} allows anyone in the {{ic|lpadmin}} group to configure printers. Do ''not'' add the {{ic|lp}} group to the {{ic|SystemGroup}} directive, or printing will fail.<br />
<br />
# groupadd -g107 lpadmin<br />
<br />
{{hc|/etc/cups/cups-files.conf|# Administrator user group...<br />
SystemGroup sys root lpadmin}}<br />
<br />
{{Tip|Read [[CUPS#Administration]] to get more details on how to configure CUPS.}}<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 usershares, which the stock smb.conf does not have enabled. Instructions to add them are in [[Samba#Creating usershare path]], after which sharing in Dolphin should work out of the box after restarting Samba.<br />
<br />
=== KDE Desktop activities ===<br />
<br />
KDE Desktop Activities are Plasma-based virtual-desktop-like sets of Plasma Widgets where you can independently configure widgets as if you have more than one screen or desktop.<br />
<br />
On your desktop, click the Cashew Plasmoid and, on the pop-up window, press "Activities".<br />
<br />
A plasma bar presenting you the current existing Plasma Desktop Activities will appear at the bottom of the screen. You can navigate between them by pressing the correspondent icons.<br />
<br />
=== Power saving ===<br />
<br />
Plasma has an integrated power saving service called "'''Powerdevil Power Management'''" that may adjust the power saving profile of the system and/or the brightness of the screen (if supported).<br />
<br />
=== Monitoring changes on local files and directories ===<br />
<br />
KDE now uses '''inotify''' directly from the kernel with '''kdirwatch''' (included in kdelibs), so Gamin or FAM are no longer needed. You may want to install this {{AUR|kdirwatch}}{{Broken package link|{{aur-mirror|kdirwatch}}}} from AUR which is a GUI frontend for kdirwatch.<br />
<br />
=== Autostarting applications ===<br />
<br />
{{Accuracy|See [[KDE Wallet#Using the KDE Wallet to store ssh keys]]. Merge general information here.}}<br />
<br />
Plasma can autostart applications and run scripts on startup and shutdown. To autostart an application, start {{ic|systemsettings}} and navigate to ''Startup and Shutdown'' -> ''Autostart'' and add the program or shell script of your choice. Note that programs can be autostarted on login only, whilst shell scripts can also be run on shutdown or even before Plasma itself starts. For applications, a {{ic|.desktop}} file will be created in the {{ic|~/.config/autostart}} directory. For shell scripts, a symlink will be created in one the following directories:<br />
* {{ic|~/.config/autostart-scripts}} - for starting at login.<br />
* {{ic|~/.config/plasma-workspace/shutdown}} - for starting on shutdown.<br />
* {{ic|~/.config/plasma-workspace/env}} - for starting prior to login.<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.<br />
<br />
'''Configuration for look and feel of GTK applications.'''<br />
* {{Pkg|kde-gtk-config}}<br />
* {{AUR|kcm-gtk}}{{Broken package link|{{aur-mirror|kcm-gtk}}}}<br />
* {{AUR|kcm-qt-graphicssystem}}<br />
<br />
'''Configuration for the GRUB bootloader.'''<br />
* {{AUR|grub2-editor}}{{Broken package link|{{aur-mirror|grub2-editor}}}}<br />
<br />
'''Configuration for the [[Uncomplicated Firewall]] (UFW)'''<br />
* {{AUR|kcm-ufw}}<br />
<br />
'''Configuration for [[PolicyKit]]'''<br />
* {{AUR|kcm-polkit-kde-git}}{{Broken package link|{{aur-mirror|kcm-polkit-kde-git}}}}<br />
<br />
'''Configuration for Wacom tablets'''<br />
* {{AUR|kcm-wacomtablet}}<br />
<br />
'''Configuration for systemd'''<br />
* {{Pkg|systemd-kcm}}<br />
<br />
More KCMs can be found at [http://kde-apps.org/index.php?xcontentmode=273 kde-apps.org].<br />
<br />
== Desktop search ==<br />
<br />
KDE implements desktop search with a software called Baloo, a file indexing and searching solution.<br />
<br />
=== Baloo ===<br />
<br />
==== Using and configuring Baloo ====<br />
<br />
In order to search using Baloo on the KDE Plasma Desktop, press {{ic|ALT+F2}} and type in your query. Within Dolphin press {{ic|CTRL+F}}.<br />
<br />
By default the Desktop Search KCM exposes only two options: A panel to blacklist folders and, as of 4.13.1, a way to disable it with one click.<br />
<br />
Alternatively you can edit your {{ic|~/.kde4/share/config/baloofilerc}} (KDE4) or {{ic|~/.config/baloofilerc}} (KF5) file ([https://community.kde.org/Baloo/Configuration info]). Additionally the {{ic|balooctl}} process can also be used. In order to disable Baloo run {{ic|balooctl disable}}.<br />
<br />
Once you added additional folders to the blacklist or disabled Baloo entirely, a process named {{ic|baloo_file_cleaner}} removes all unneeded index files automatically. They are stored under {{ic|~/.local/share/baloo/}}.<br />
<br />
More advanced configuration options are available through {{AUR|kcm_baloo_advanced}}.<br />
<br />
==== How do I index a removable device? ====<br />
<br />
By default every removable device is blacklisted. You just have to remove your device from the blacklist in the KCM panel.<br />
<br />
=== Web browsers ===<br />
==== Konqueror and Rekonq ====<br />
Konqueror supports two rendering engines – KHTML and QtWebKit (via the {{Pkg|kwebkitpart}} package) – Rekonq supports only QtWebKit. KHTML development was halted after Qt shipped WebKit but was kept for compatibility reasons. QtWebKit, in turn, has since been [https://www.mail-archive.com/development@qt-project.org/msg18866.html deprecated] by the Qt Project and replaced by [[Chromium]]-based Qt WebEngine which is currently not supported by either Konqueror or Rekonq.<br />
<br />
A successor named Fiber is currently in development, which will use Chromium's engine.<br />
<br />
==== Firefox ====<br />
Firefox can be configured to better integrate with Plasma. See [[Firefox#KDE_integration|Firefox KDE integration]] for details.<br />
<br />
==== Qupzilla ====<br />
Qupzilla ({{Pkg|qupzilla}}) is a Qt web browser with Plasma integration features. Qupzilla 2.0 will use Qt WebEngine intead of WebKit.<br />
<br />
== PIM ==<br />
<br />
KDE offers its own stack for personal information management. This includes emails, contacts, calendar, etc.<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.<br />
<br />
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 />
==== Disabling Akonadi ====<br />
<br />
See this [http://userbase.kde.org/Akonadi#Disabling_the_Akonadi_subsystem section in the KDE userbase]. Alternatively, install {{AUR|akonadi-fake}}.<br />
<br />
==== Database configuration ====<br />
<br />
Start {{ic|akonaditray}} from package {{Pkg|kdepim-runtime}}. Right click on it and select '''configure'''. In the Akonadi server configure tab, you can:<br />
* Configuring Akonadi to use MySQL/MariaDB Server<br />
** If your home directory is on a ZFS pool, you will need to create {{ic|~/.config/akonadi/mysql-local.conf}} with the following contents:<br />
<br />
[mysqld]<br />
innodb_use_native_aio = 0<br />
<br />
Otherwise you will get the [[MySQL#OS error 22 when running on ZFS|OS error 22]]<br />
* Configuring Akonadi to use PostgreSQL Server<br />
* Configuring Akonadi to use SQLite<br />
** Edit {{ic|~/.config/akonadi/akonadiserverrc}} to match the below<br />
<br />
[General]<br />
Driver=QSQLITE3<br />
<br />
[QSQLITE3]<br />
Name=/home/username/.local/akonadi/akonadi.db<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 />
You can choose between backends based on [[GStreamer]] and [[VLC]] – each available in versions for Qt4 applications and Qt5 applications ({{Pkg|phonon-qt4-gstreamer}}, {{Pkg|phonon-qt5-gstreamer}} – {{Pkg|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 [http://community.kde.org/Phonon/FeatureMatrix features set.]<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 at ''System Settings > Multimedia > Phonon > Backend''. For Plasma 5 this would be ''System Settings > Multimedia > Backend''.<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 />
<br />
== Useful applications ==<br />
<br />
The official set of KDE applications may be found [http://www.kde.org/applications/ here].<br />
<br />
=== Yakuake ===<br />
<br />
[[Yakuake]] provides a Quake-like terminal emulator whose visibility is toggled by the F12 key. It also has support for multiple tabs. Yakuake is available in the package {{Pkg|yakuake}}.<br />
<br />
=== KDE Telepathy ===<br />
<br />
[http://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 '+xx', e.g. '+49' for Germany). 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). Note that 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 />
== Tips and tricks ==<br />
<br />
=== Using an alternative window manager ===<br />
There may be reasons you want to use another window manager than KWin, for example to work around the DRI bug that causes [[PRIME#Black_screen_with_GL-based_compositors|black screen with PRIME]].<br />
<br />
To use an alternative [[window manager]] with Plasma open the ''System Settings'' panel, navigate to ''(Default) Applications > Window Manager > Use a different window manager'' and select the window manager you wish to use from the list.<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 {{ic|.xinitrc}} file:<br />
exec openbox-kde-session<br />
<br />
==== Compiz custom ====<br />
<br />
If you need to run Compiz with custom options and switches select ''Compiz custom'' and then create a script called {{ic|compiz-kde-launcher}} and add to it the commands you wish to use to start Compiz. See the example below:<br />
<br />
{{hc|/usr/local/bin/compiz-kde-launcher|<nowiki><br />
#!/bin/bash<br />
LIBGL_ALWAYS_INDIRECT=1<br />
compiz --replace &<br />
wait<br />
</nowiki>}}<br />
<br />
Then make it executable:<br />
$ chmod +x /usr/local/bin/compiz-kde-launcher<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 />
=== Integrate Android ===<br />
<br />
KDE Connect provides several features for you:<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 {{ic|KDE Connect}} from [https://play.google.com/store/apps/details?id=org.kde.kdeconnect_tp Google Play] or from [https://f-droid.org/repository/browse/?fdid=org.kde.kdeconnect_tp F-Droid].<br />
<br />
=== Configure KWin to use OpenGL ES ===<br />
Due to QtQuick2, both the Qt OpenGL module and KWin have to be [http://blog.martin-graesslin.com/blog/2013/11/kwin5-qtquick-2-and-the-caused-changes-for-opengl/ compiled against OpenGL ES.]<br />
<br />
=== Speed up application startup ===<br />
<br />
User Rob described a "[http://kdemonkey.blogspot.nl/2008/04/magic-trick.html magic trick]" on his blog to improve application start-up time by 50-150ms.<br />
To enable it, create this folder in your home:<br />
$ mkdir ~/.compose-cache/<br />
It can produce freezes under heavy io. To avoid this, also do:<br />
$ ln -sfv /run/user/$UID/ /home/$USER/.compose-cache<br />
<br />
{{Note|For those curious about what is going on here, this enables an optimization which Lubos (of general KDE speediness fame) came up with some time ago and was then rewritten and integrated into libx11. Ordinarily, on startup, applications read input method information from {{ic|/usr/share/X11/locale/''your locale''/Compose}}. This file is quite long (>5000 lines for the en_US.UTF-8 one) and takes some time to process. libX11 can create a cache of the parsed information which is much quicker to read subsequently, but it will only re-use an existing cache or create a new one in {{ic|~/.compose-cache}} if the directory already exists.}}<br />
<br />
=== Configuring monitor resolution / multiple monitors ===<br />
<br />
To enable display resolution management and multiple monitors in Plasma 5, install {{Pkg|kscreen}}. This adds the additional options to System Settings/Display and Monitor.<br />
<br />
=== Open application launcher with Super key (Windows key) ===<br />
<br />
Install and start {{Pkg|ksuperkey}}. Now assign Alt + F1 as hot key. The Super Key will now open the application launcher. You can add ksuperkey to the autostart if you don't want to start it manually.<br />
<br />
== Troubleshooting ==<br />
<br />
=== Graphics card related ===<br />
<br />
==== Intel ====<br />
<br />
If you use 3D-accelerated composition with Intel, you might find that the Plasma panel and other applications don't refresh properly (stay frozen). Some Intel drivers have [https://bugzilla.redhat.com/show_bug.cgi?id=1259475 problems with EGL]. Try to set Plasma 5's ''OpenGL interface'' setting to GLX instead (in System Settings under ''Display and Monitor'' -> ''Compositor''. If that does not work, see ''[[Intel_graphics#SNA_issues|Intel graphics SNA issues]]'' for alternative solutions.<br />
<br />
==== Plasma keeps crashing with legacy Nvidia ====<br />
<br />
There is a bug in Plasma with using the Nvidia-304xx driver described [https://bugs.kde.org/show_bug.cgi?id=348753 here.] Rather than disabling compositing, try creating a file kwin.sh in ~/.config/plasma-workspace/env/ with the following content<br />
<br />
#!/bin/sh<br />
export KWIN_EXPLICIT_SYNC=0<br />
Then go to the system-settings -> Startup and Shutdown -> Autostart and Check/Add the script as a pre-kde startup file<br />
<br />
=== Configuration related ===<br />
<br />
Many problems in KDE are related to configuration.<br />
<br />
==== Reset all kdelib4 apps configuration ====<br />
<br />
To test whether your config is the problem try quitting all kdelib4 apps and run:<br />
<br />
$ cp -r ~/.kde4 ~/.kde4.safekeeping<br />
$ rm .kde4/{cache,socket,tmp}-$(hostname)<br />
<br />
The ''rm'' command just removes symbolic links which will be recreated automatically.<br />
<br />
If the problem does not manifest itself, gradually move parts from the saved configuration back, and restart the application(s) regularly to test and identify problematic parts.<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 it 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 (bugs.kde.org) '''only if it is an official widget'''. If it is not, it is recommended you find the entry on kde-look.org 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}}:<br />
<br />
$ for j in plasma*; do mv -- "$j" "${j%}.bak"; done<br />
<br />
This command will '''rename all Plasma related configs''' 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 [[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 and several other problems such as ark being unable to unrar or unzip or amarok not recognizing any of your musics. This solution can also resolve problems with KDE and Qt programmes looking bad following upgrade.<br />
<br />
Rebuild your cache with the following commands:<br />
<br />
$ rm ~/.config/Trolltech.conf<br />
$ kbuildsycoca4 --noincremental<br />
<br />
Hopefully, your problems are now fixed.<br />
<br />
=== Clean akonadi configuration to fix KMail ===<br />
<br />
First, make sure that KMail is not running. Then backup configuration:<br />
$ mv ~/.local/share/akonadi ~/.local/share/akonadi-old<br />
$ mv ~/.config/akonadi ~/.config/akonadi-old<br />
<br />
Start ''SystemSettings > Personal'' and remove all the resources. Go back to Dolphin and remove the original {{ic|~/.local/share/akonadi}} and<br />
{{ic|~/.config/akonadi}} - the copies you made ensure that you can back-track if necessary.<br />
<br />
Now go back to the System Settings page and carefully add the necessary resources. You should see the resource reading in your mail folders. Then start Kontact/KMail to see if it work properly.<br />
<br />
=== Getting current state of KWin for support and debug purposes ===<br />
<br />
This command prints out a wonderful summary of the current state of KWin including used options, used compositing backend and relevant OpenGL driver capabilities. See more on [http://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 />
=== KDE and Qt programs look bad when in a different window manager ===<br />
<br />
If you are using KDE or Qt programs but not in a full Plasma session (specifically, you did not run {{ic|startkde}}), then as of Plasma 4.6.1 you will need to tell Qt how to find KDE's styles (Oxygen, QtCurve etc.)<br />
<br />
You just need to set the environment variable {{ic|QT_PLUGIN_PATH}}. E.g. put:<br />
<br />
export QT_PLUGIN_PATH=$HOME/.kde4/lib/kde4/plugins/:/usr/lib/kde4/plugins/<br />
<br />
into your {{ic|/etc/profile}} (or {{ic|~/.profile}} if you do not have root access). {{ic|qtconfig-qt4}} should then be able to find your KDE styles and everything should look nice again!<br />
<br />
Alternatively, you can symlink the Qt styles directory to the KDE styles one:<br />
# ln -s /usr/lib/kde4/plugins/styles/ /usr/lib/qt4/pluginlib32-libdbusmenu-glibs/styles<br />
<br />
Under Gnome you can try to install the package libgnomeui.<br />
<br />
=== KF5/Qt5 applications don't display icons in i3/fvwm/awesome ===<br />
<br />
See [[Qt#Configuration of Qt apps under environments other than KDE]].<br />
<br />
=== Graphical related problems ===<br />
<br />
==== Low 2D desktop performance (or) artifacts appear when on 2D ====<br />
<br />
===== GPU driver problem =====<br />
<br />
Make sure you have the proper driver for your card installed, so that your desktop is at least 2D accelerated. Follow these articles for more information: [[ATI]], [[NVIDIA]], [[Intel]] for more information, in order to make sure that everything is all right.<br />
The open-source ATI and Intel drivers and the proprietary (binary) Nvidia driver should theoretically provide the best 2D and 3D acceleration.<br />
<br />
===== The Raster engine workaround =====<br />
<br />
If this does not solve your problems, your driver may not provide a good '''XRender''' acceleration which the current Qt painter engine relies on by default.<br />
<br />
You can change the painter engine to software based only by invoking the application with the {{ic|-graphicssystem raster}} command line. This rendering engine can be set as the default one by recompiling Qt with the same as configure option, {{ic|-graphicssystem raster}}.<br />
<br />
The raster paint engine enables the CPU to do the majority of the painting, as opposed to the GPU. You may get better performance, depending on your system. This is basically a work-around for the terrible Linux driver stack, since the CPU should obviously not be doing graphical computations since it is designed for fewer threads of greater complexity, as opposed to the GPU which is many threads but lesser computational strength. So, only use Raster engine if you are having problems or your GPU is much slower than you CPU, otherwise is better to use XRender.<br />
<br />
Since Qt 4.7+, recompiling Qt is not needed. Simply export {{ic|1=QT_GRAPHICSSYSTEM=raster}}, or {{ic|opengl}}, or {{ic|native}} (for the default). Raster depends on the CPU, OpenGL depends on the GPU and high driver support, and Native is just using the X11 rendering (mixture, usually).<br />
<br />
'''The best and automatic way to do that''' is to install {{AUR|kcm-qt-graphicssystem}} from AUR and configure this particular Qt setting through ''System Settings > Qt Graphics System''.<br />
<br />
For more information, consult this [http://apachelog.wordpress.com/2010/09/05/qt-graphics-system-kcm/ KDE Developer blog entry] and/or this [http://labs.trolltech.com/blogs/2009/12/18/qt-graphics-and-performance-the-raster-engine/ Qt Developer blog entry].<br />
<br />
==== Low 3D desktop performance====<br />
<br />
KDE begins with desktop effects enabled. Older cards may be insufficient for 3D desktop acceleration. You can disable desktop effects in ''System Settings > Desktop Effects'' and you can toggle desktop effects with {{ic|Alt+Shift+F12}}.<br />
<br />
{{Note| You may encounter such problems with 3D desktop performance even when using a more powerful graphics card, especially the catalyst proprietary driver ({{ic|fglrx}}). This driver is known for having problems with 3D acceleration. Visit [[ATI|the ATI Wiki page]] for more troubleshooting.}}<br />
<br />
==== Desktop compositing is disabled on my system with a modern Nvidia GPU ====<br />
<br />
Sometimes, KWin may have settings in its configuration file ({{ic|kwinrc}}) that ''may'' cause a problem on re-activating the 3D desktop {{ic|OpenGL}} compositing. That could be caused randomly (for example, due to a sudden Xorg crash or restart, and it gets corrupted), so, in case that happens, delete your {{ic|~/.kde4/share/config/kwinrc}} file and relogin. The KWin settings will turn to the KDE default ones and the problem should be probably gone.<br />
<br />
==== Flickering in fullscreen when compositing is enabled ====<br />
<br />
As of KDE SC 4.6.0, there is an option in ''Sytem Settings > Desktop Effect > Advanced > Suspend desktop effects for fullscreen windows''. Uncheck it would tell kwin to disable unredirect fullscren.<br />
<br />
==== Screen Tearing with desktop compositing enabled ====<br />
<br />
KWin may suffer from [[Wikipedia:Screen tearing|screen tearing]] while desktop effects are enabled. Uncheck the VSync option under ''System Settings > Desktop Effects > Advanced > Use Vsync''.<br />
<br />
{{Note|With the release of Plasma 4.11, several new Vsync options have been added, which may help with screen tearing.}}<br />
<br />
For proprietary driver users, ensure that the driver's VSync option is enabled (''amdccle'' for [[Catalyst]] users, and ''nvidia-settings'' for [[NVIDIA]] users).<br />
<br />
==== Display settings lost on reboot (multiple monitors) ====<br />
There is a [https://bugs.kde.org/show_bug.cgi?id=346961 bug] in kscreen that makes it forget dual screen settings after reboot with certain displays.<br />
A possible workaround is to delete kscreen and make sure that your screen resolution is specified in a xorg.conf file:<br />
* For Nouveau you can use the template at [[Nouveau#Dual Head]], just edit it to suit your setup.<br />
* For the proprietary nvidia driver you can use the [[NVIDIA#Using_NVIDIA_Settings|nvidia-settings]] utility as root to write the config file.<br />
<br />
''' Other suggestion '''<br />
<br />
Installing {{Pkg|kscreen4}} might fix the problem unless your screens share the same EDID. Kscreen is the improved screen management software for KDE, more information can be found [https://fedoraproject.org/wiki/Changes/KScreen?rd=Features/KScreen here].<br />
<br />
=== Sound problems under KDE ===<br />
<br />
==== ALSA related problems ====<br />
<br />
{{Note|First make sure you have {{Pkg|alsa-lib}} and {{Pkg|alsa-utils}} installed.}}<br />
<br />
===== "Falling back to default" messages when trying to listen to any sound in KDE =====<br />
<br />
When you encounter such messages:<br />
The audio playback device ''name_of_the_sound_device'' does not work.<br />
Falling back to default<br />
Go to ''System Settings > Multimedia > Phonon'' and set the device named {{ic|default}} above all the other devices in each box you see.<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 {{Pkg|phonon-qt4-vlc}} or {{Pkg|phonon-qt5-vlc}}.<br />
Then, make sure the backend is preferred via ''System Settings > Multimedia > Phonon > Backend (tab)''.<br />
<br />
=== Konsole does not save commands' history ===<br />
<br />
By default console command history is saved only when you type 'exit' in console. When you close Konsole with 'x' in the corner it does not happen.<br />
To enable autosaving after every command execution:<br />
<br />
{{hc|~/.bashrc|<nowiki><br />
shopt -s histappend<br />
[[ "${PROMPT_COMMAND}" ]] && PROMPT_COMMAND="$PROMPT_COMMAND;history -a" || PROMPT_COMMAND="history -a"<br />
</nowiki>}}<br />
<br />
=== Inotify folder watch limit ===<br />
<br />
If you get the following error:<br />
<br />
KDE Baloo Filewatch service reached the inotify folder watch limit. File changes may be ignored.<br />
<br />
Then you will need to increase the inotify folder watch limit:<br />
<br />
# echo 10000 > /proc/sys/fs/inotify/max_user_watches<br />
<br />
To make changes permanent, create {{ic|/etc/sysctl.d/90-inotify.conf}} with<br />
<br />
#increase inotify watch limit<br />
fs.inotify.max_user_watches = 10000<br />
<br />
== Unstable releases ==<br />
<br />
When KDE is reaching beta or RC milestone, KDE "unstable" packages are uploaded to the ''kde-unstable'' repository. They stay there until KDE is declared stable and passes to the ''extra'' repository.<br />
<br />
You can add ''kde-unstable'' with:<br />
<br />
{{hc|/etc/pacman.conf|2=<br />
[kde-unstable]<br />
Include = /etc/pacman.d/mirrorlist<br />
}}<br />
<br />
{{Warning|Make sure to add these lines '''before''' the ''extra'' repository. Adding the section after ''extra'' will cause [[pacman]] to prefer the older packages in the extra repository. {{ic|pacman -Syu}} will not install them, and will warn that they are "too new" if installed manually. Also, some of the libraries will stay at the older versions, which may cause file conflicts and/or instability!}}<br />
<br />
# ''kde-unstable'' is based upon ''testing''. Therefore, you need to enable the repositories in the following order: ''kde-unstable'', ''testing'', ''core'', ''extra'', ''community-testing'', ''community''.<br />
# To update from a previous KDE installation, run: {{ic|# pacman -Syu}} or {{ic|# pacman -S kde-unstable/kde}}<br />
# If you do not have KDE installed, you might have difficulties to install it by using groups (limitation of pacman)<br />
# '''Subscribe and read the [https://mailman.archlinux.org/pipermail/arch-dev-public/ arch-dev-public] mailing list'''<br />
# Make sure [[#Bugs|you make bug reports]] if you find any problems.<br />
<br />
== Bugs ==<br />
<br />
It is preferable that if you find a minor or serious bug, you should visit [https://bugs.archlinux.org the Arch Bug Tracker] or/and [http://bugs.kde.org KDE Bug Tracker] in order to report that. Make sure that you are clear about what you want to report.<br />
<br />
If you have any problem and you write about in on the Arch forums, first make sure that you have '''fully''' updated your system using a good sync mirror (check [https://www.archlinux.de/?page=MirrorStatus here]) or try [[Reflector]].<br />
<br />
== See also ==<br />
<br />
* [http://www.kde.org KDE homepage]<br />
* [https://bugs.kde.org KDE bug tracker]<br />
* [https://projects.kde.org KDE Projects]<br />
* [http://blog.martin-graesslin.com/blog/kategorien/kde/ Martin Graesslin's blog]</div>Beta990https://wiki.archlinux.org/index.php?title=KDE&diff=412370KDE2015-12-15T12:53:22Z<p>Beta990: /* Qt and GTK+ Applications Appearance */ Changed to breeze-gtk, added kde-gtk-config to be installed and as main app to change GTK-themes.</p>
<hr />
<div>[[Category:KDE]]<br />
[[ar:KDE]]<br />
[[cs:KDE]]<br />
[[de:KDE]]<br />
[[es:KDE]]<br />
[[fr:KDE]]<br />
[[it:KDE]]<br />
[[ja:KDE]]<br />
[[pl:KDE]]<br />
[[ru:KDE]]<br />
[[tr:KDE Masaüstü Ortamı]]<br />
[[zh-CN:KDE]]<br />
[[zh-TW:KDE]]<br />
{{Related articles start}}<br />
{{Related|Desktop environment}}<br />
{{Related|Display manager}}<br />
{{Related|Dolphin}}<br />
{{Related|Window manager}}<br />
{{Related|Qt}}<br />
{{Related|KDM}}<br />
{{Related|KDevelop 4}}<br />
{{Related|Trinity}}<br />
{{Related|Uniform Look for Qt and GTK Applications}}<br />
{{Related articles end}}<br />
<br />
KDE is a software project currently comprising of a [[desktop environment]] known as Plasma (or Plasma Workspaces), a collection of libraries and frameworks (KDE Frameworks) and several applications (KDE Applications) as well. KDE upstream has a well maintained [http://userbase.kde.org/ UserBase wiki]. Detailed information about most KDE applications can be found there.<br />
<br />
== Installation ==<br />
<br />
=== Plasma Desktop ===<br />
<br />
{{Note|<br />
*Plasma 5 is not co-installable with Plasma 4.<br />
*The Plasma 4 desktop is unmaintained since August 2015.[https://www.kde.org/announcements/announce-applications-15.08.0.php] It is no longer in the official repositories since December 2015.[https://www.archlinux.org/news/dropping-plasma-4/]}}<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 [[KDE Packages]]. Alternatively, for a more minimal Plasma installation, install the {{Pkg|plasma-desktop}} package.<br />
<br />
=== Upgrading from Plasma 4 to 5 ===<br />
<br />
# Isolate {{ic|multi-user.target}}{{bc|# systemctl isolate multi-user.target}} <br />
# [[Pacman|Uninstall]] the kdebase-workspace package{{bc|# pacman -Rc kdebase-workspace}} <br />
# [[Install]] the {{pkg|plasma-meta}} package or the {{grp|plasma}} group.<br />
# If you use KDM as display manager, disable it{{bc|# systemctl disable kdm}} and enable [[SDDM]]{{bc|# systemctl enable sddm}} or install and enable any other [[display manager]].<br />
# Reboot.<br />
<br />
{{Note|The Plasma 4 configuration is not automatically migrated to Plasma 5, so you will have to configure your desktop from scratch.}}<br />
<br />
=== KDE applications and language packs ===<br />
<br />
To install the full set of KDE Applications, install the {{Grp|kde-applications}} group or the {{Pkg|kde-applications-meta}} meta-packages to install specific modules. Note that this will only install applications, it will not install any version of the Plasma Desktop.<br />
<br />
If you need language files, install {{ic|kde-l10n-'''yourlanguagehere'''}} (e.g. {{Pkg|kde-l10n-de}} for the German language). For a full list of available languages see [https://www.archlinux.org/packages/extra/any/kde-l10n/ this link].<br />
<br />
== Starting Plasma ==<br />
<br />
{{Tip|<br />
*[[KDM]] is not available in Plasma 5. KDE upstream [http://blog.davidedmundson.co.uk/blog/display_managers_finale recommends] using the [[SDDM]] display manager as it provides integration with the Plasma 5 theme.<br />
*To better integrate SDDM with Plasma, it is recommended to edit {{ic|/etc/sddm.conf}} to use the breeze theme. Refer to [[SDDM#Theme settings]] for instructions.}}<br />
<br />
To launch a Plasma 5 session, choose ''Plasma'' in your [[display manager]] menu.<br />
<br />
Alternatively, to start Plasma with ''startx'', append {{ic|exec startkde}} to your {{ic|.xinitrc}} file. If you want to start Xorg at login, please see [[Start X at login]].<br />
<br />
== Configuration ==<br />
<br />
Most settings for KDE applications are stored in {{ic|~/.config}}, but some older applications may use {{ic|~/.kde4}}. However, configuring KDE is primarily done through the '''System Settings''' application. It can be started from a terminal by executing ''systemsettings5''.<br />
<br />
Frameworks 5 applications can use KDE 4 configuration however they expect the configuration files to be located in different places. To allow Frameworks 5 applications running in KDE 4 to share the same configurations they may be moved to the new locations and symlinked back to the old. Examples are:<br />
*Konsole profiles from {{ic|~/.kde4/share/apps/konsole}} to {{ic|~/.local/share/konsole/}}<br />
*Application appearance from {{ic|~/.kde4/share/config/kdeglobals}} to {{ic|~/.config/kdeglobals}} <br />
<br />
=== Personalization ===<br />
<br />
==== Plasma desktop ====<br />
<br />
===== Themes =====<br />
<br />
{{Note|1=If the Plasma cursor theme is incorrect in some instances, see the following [https://bbs.archlinux.org/viewtopic.php?pid=1533071#p1533071 forum post] for a workaround.}}<br />
[http://kde-look.org/index.php?xcontentmode=76 Plasma themes] define the look of panels and plasmoids. For easy system-wide installation, some such themes are available in both the official repositories and the [https://aur.archlinux.org/packages.php?O=0&K=plasmatheme&do_Search=Go AUR].<br />
<br />
The easiest way to install themes is by going through the Desktop Settings control panel:<br />
<br />
Workspace Theme > Desktop Theme > Get new Themes<br />
<br />
This will present a nice frontend for [http://www.kde-look.org/ kde-look.org] that allows you to install, uninstall, or update third-party plasmoid scripts with literally just one click.<br />
<br />
Splash and Lock screens are currently unavailable so to customize these screens you have to modify the original theme found in {{ic|/usr/share/plasma/look-and-feel/}}.<br />
See [https://www.kubuntuforums.net/showthread.php?67599-Plasma-5-background-images&s=59832dc20e5bfc2948dbb591d8453f61 this thread] on the Kubuntu forums.<br />
<br />
Note that the [[SDDM]] login screen is not part of this theme.<br />
<br />
====== Qt and GTK+ Applications Appearance ======<br />
<br />
{{Tip|For Qt and GTK theme consistency, see [[Uniform look for Qt and GTK applications]].}}<br />
<br />
;Qt4<br />
For Qt4 applications to have a consistent appearance, you need to install {{Pkg|breeze-kde4}} and then pick Breeze as GUI Style in {{ic|qtconfig-qt4}}.<br />
<br />
;GTK+<br />
The recommended theme for a pleasant appearance in GTK+ applications is {{Pkg|breeze-gtk}} or {{AUR|gnome-breeze-git}}, a GTK+ theme designed to mimic the appearance of Plasma 5 Breeze.<br />
Install {{Pkg|kde-gtk-config}} and select the installed GTK-theme for GTK2/GTK3-Theme in ''System Settings > Application Style > GNOME Application Style''.<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 />
Plasmoid binaries can be installed using PKGBUILDs from [https://aur.archlinux.org/packages.php?O=0&K=plasmoid&do_Search=Go&PP=25&SO=d&SB=v AUR], or you can write your own PKGBUILD.<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 Widgets''.<br />
<br />
This will present a nice frontend for [http://www.kde-look.org/ kde-look.org] that allows you to install, uninstall, or update third-party plasmoid scripts with literally just one click.<br />
<br />
Most plasmoids are not created officially by KDE developers. You can also try installing Mac OS X widgets, Microsoft Windows Vista/7 widgets, Google Widgets, and even SuperKaramba widgets.<br />
<br />
===== Sound applet in the system tray =====<br />
<br />
[[Install]] Kmix ({{Pkg|kmix}} AND {{Pkg|plasma-pa}}) and start it from the application launcher. Since Plasma, by default, autostarts programs from the previous session, it does not need to be started manually upon every login.<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|~/.kde4/share/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-desktop": ("Plasma" "Plasma")/!d; s/^ *\([^ ]*\) .*/\1/g'); do<br />
xprop -id $WID -remove _KDE_NET_WM_SHADOW<br />
done<br />
</nowiki>}}<br />
<br />
The script can be run on login with ''Add Script'' in ''Autostart'':<br />
<br />
$ kcmshell4 autostart<br />
<br />
==== Window decorations ====<br />
<br />
[http://kde-look.org/index.php?xcontentmode=75 Window decorations] can be changed in ''System Settings > Workspace Appearance > 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?O=0&K=kdestyle&do_Search=Go&PP=25&SO=d&SB=v AUR].<br />
<br />
==== Icon themes ====<br />
<br />
Not many full system icons themes are available for KDE 4. You can open up ''System Settings > Application Appearance > Icons'' and browse for new ones or install them manually. Many of them can be found on [http://www.kde-look.org/ kde-look.org].<br />
<br />
Official logos, icons, CD labels and other artwork for Arch Linux are provided in the {{AUR|archlinux-artwork}} package. After installing you can find such artwork at {{ic|/usr/share/archlinux/}}.<br />
<br />
===== Qt 5 icons theme =====<br />
<br />
If you are on Plasma 5, use ''System Settings > Icons'', while if you are on Plasma 4 use {{ic|kcmshell5 icons}} to set the icons theme.<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''.<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 > Appearance > 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 '''96''' in ''System Settings > Application Appearance > Fonts''.<br />
<br />
If that does not work, try setting the DPI directly in your Xorg configuration as documented [[Xorg#Setting_DPI_manually|here]].<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]<br />
However, you can achieve something similar by editing the file {{ic|~/.config/kwinrc}} adding <br />
{{ic|1=BorderlessMaximizedWindows=true}} in the {{ic|[Windows]}} section.<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 > Printer Configuration''. To use this method, you must first install {{Pkg|print-manager}} and {{Pkg|cups}}.<br />
<br />
The {{ic|avahi-daemon.service}} and {{ic|org.cups.cupsd.service}} daemons must be started first; otherwise, you will get the following error:<br />
The service 'Printer Configuration' does not provide an interface 'KCModule'<br />
with keyword 'system-config- printer-kde/system-config-printer-kde.py'<br />
The factory does not support creating components of the specified type.<br />
<br />
If you are getting the following error, you need to give your user the right to manage printers.<br />
There was an error during CUPS operation: 'cups-authorization-canceled'<br />
<br />
For CUPS, this is set in {{ic|/etc/cups/cups-files.conf}}.<br />
<br />
Adding {{ic|lpadmin}} to {{ic|/etc/group}} and then to the {{ic|SystemGroup}} directive in {{ic|/etc/cups/cups-files.conf}} allows anyone in the {{ic|lpadmin}} group to configure printers. Do ''not'' add the {{ic|lp}} group to the {{ic|SystemGroup}} directive, or printing will fail.<br />
<br />
# groupadd -g107 lpadmin<br />
<br />
{{hc|/etc/cups/cups-files.conf|# Administrator user group...<br />
SystemGroup sys root lpadmin}}<br />
<br />
{{Tip|Read [[CUPS#Administration]] to get more details on how to configure CUPS.}}<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 usershares, which the stock smb.conf does not have enabled. Instructions to add them are in [[Samba#Creating usershare path]], after which sharing in Dolphin should work out of the box after restarting Samba.<br />
<br />
=== KDE Desktop activities ===<br />
<br />
KDE Desktop Activities are Plasma-based virtual-desktop-like sets of Plasma Widgets where you can independently configure widgets as if you have more than one screen or desktop.<br />
<br />
On your desktop, click the Cashew Plasmoid and, on the pop-up window, press "Activities".<br />
<br />
A plasma bar presenting you the current existing Plasma Desktop Activities will appear at the bottom of the screen. You can navigate between them by pressing the correspondent icons.<br />
<br />
=== Power saving ===<br />
<br />
Plasma has an integrated power saving service called "'''Powerdevil Power Management'''" that may adjust the power saving profile of the system and/or the brightness of the screen (if supported).<br />
<br />
=== Monitoring changes on local files and directories ===<br />
<br />
KDE now uses '''inotify''' directly from the kernel with '''kdirwatch''' (included in kdelibs), so Gamin or FAM are no longer needed. You may want to install this {{AUR|kdirwatch}}{{Broken package link|{{aur-mirror|kdirwatch}}}} from AUR which is a GUI frontend for kdirwatch.<br />
<br />
=== Autostarting applications ===<br />
<br />
{{Accuracy|See [[KDE Wallet#Using the KDE Wallet to store ssh keys]]. Merge general information here.}}<br />
<br />
Plasma can autostart applications and run scripts on startup and shutdown. To autostart an application, start {{ic|systemsettings}} and navigate to ''Startup and Shutdown'' -> ''Autostart'' and add the program or shell script of your choice. Note that programs can be autostarted on login only, whilst shell scripts can also be run on shutdown or even before Plasma itself starts. For applications, a {{ic|.desktop}} file will be created in the {{ic|~/.config/autostart}} directory. For shell scripts, a symlink will be created in one the following directories:<br />
* {{ic|~/.config/autostart-scripts}} - for starting at login.<br />
* {{ic|~/.config/plasma-workspace/shutdown}} - for starting on shutdown.<br />
* {{ic|~/.config/plasma-workspace/env}} - for starting prior to login.<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.<br />
<br />
'''Configuration for look and feel of GTK applications.'''<br />
* {{Pkg|kde-gtk-config}}<br />
* {{AUR|kcm-gtk}}{{Broken package link|{{aur-mirror|kcm-gtk}}}}<br />
* {{AUR|kcm-qt-graphicssystem}}<br />
<br />
'''Configuration for the GRUB bootloader.'''<br />
* {{AUR|grub2-editor}}{{Broken package link|{{aur-mirror|grub2-editor}}}}<br />
<br />
'''Configuration for the [[Uncomplicated Firewall]] (UFW)'''<br />
* {{AUR|kcm-ufw}}<br />
<br />
'''Configuration for [[PolicyKit]]'''<br />
* {{AUR|kcm-polkit-kde-git}}{{Broken package link|{{aur-mirror|kcm-polkit-kde-git}}}}<br />
<br />
'''Configuration for Wacom tablets'''<br />
* {{AUR|kcm-wacomtablet}}<br />
<br />
'''Configuration for systemd'''<br />
* {{Pkg|systemd-kcm}}<br />
<br />
More KCMs can be found at [http://kde-apps.org/index.php?xcontentmode=273 kde-apps.org].<br />
<br />
== Desktop search ==<br />
<br />
KDE implements desktop search with a software called Baloo, a file indexing and searching solution.<br />
<br />
=== Baloo ===<br />
<br />
==== Using and configuring Baloo ====<br />
<br />
In order to search using Baloo on the KDE Plasma Desktop, press {{ic|ALT+F2}} and type in your query. Within Dolphin press {{ic|CTRL+F}}.<br />
<br />
By default the Desktop Search KCM exposes only two options: A panel to blacklist folders and, as of 4.13.1, a way to disable it with one click.<br />
<br />
Alternatively you can edit your {{ic|~/.kde4/share/config/baloofilerc}} (KDE4) or {{ic|~/.config/baloofilerc}} (KF5) file ([https://community.kde.org/Baloo/Configuration info]). Additionally the {{ic|balooctl}} process can also be used. In order to disable Baloo run {{ic|balooctl disable}}.<br />
<br />
Once you added additional folders to the blacklist or disabled Baloo entirely, a process named {{ic|baloo_file_cleaner}} removes all unneeded index files automatically. They are stored under {{ic|~/.local/share/baloo/}}.<br />
<br />
More advanced configuration options are available through {{AUR|kcm_baloo_advanced}}.<br />
<br />
==== How do I index a removable device? ====<br />
<br />
By default every removable device is blacklisted. You just have to remove your device from the blacklist in the KCM panel.<br />
<br />
=== Web browsers ===<br />
==== Konqueror and Rekonq ====<br />
Konqueror supports two rendering engines – KHTML and QtWebKit (via the {{Pkg|kwebkitpart}} package) – Rekonq supports only QtWebKit. KHTML development was halted after Qt shipped WebKit but was kept for compatibility reasons. QtWebKit, in turn, has since been [https://www.mail-archive.com/development@qt-project.org/msg18866.html deprecated] by the Qt Project and replaced by [[Chromium]]-based Qt WebEngine which is currently not supported by either Konqueror or Rekonq.<br />
<br />
A successor named Fiber is currently in development, which will use Chromium's engine.<br />
<br />
==== Firefox ====<br />
Firefox can be configured to better integrate with Plasma. See [[Firefox#KDE_integration|Firefox KDE integration]] for details.<br />
<br />
==== Qupzilla ====<br />
Qupzilla ({{Pkg|qupzilla}}) is a Qt web browser with Plasma integration features. Qupzilla 2.0 will use Qt WebEngine intead of WebKit.<br />
<br />
== PIM ==<br />
<br />
KDE offers its own stack for personal information management. This includes emails, contacts, calendar, etc.<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.<br />
<br />
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 />
==== Disabling Akonadi ====<br />
<br />
See this [http://userbase.kde.org/Akonadi#Disabling_the_Akonadi_subsystem section in the KDE userbase]. Alternatively, install {{AUR|akonadi-fake}}.<br />
<br />
==== Database configuration ====<br />
<br />
Start {{ic|akonaditray}} from package {{Pkg|kdepim-runtime}}. Right click on it and select '''configure'''. In the Akonadi server configure tab, you can:<br />
* Configuring Akonadi to use MySQL/MariaDB Server<br />
** If your home directory is on a ZFS pool, you will need to create {{ic|~/.config/akonadi/mysql-local.conf}} with the following contents:<br />
<br />
[mysqld]<br />
innodb_use_native_aio = 0<br />
<br />
Otherwise you will get the [[MySQL#OS error 22 when running on ZFS|OS error 22]]<br />
* Configuring Akonadi to use PostgreSQL Server<br />
* Configuring Akonadi to use SQLite<br />
** Edit {{ic|~/.config/akonadi/akonadiserverrc}} to match the below<br />
<br />
[General]<br />
Driver=QSQLITE3<br />
<br />
[QSQLITE3]<br />
Name=/home/username/.local/akonadi/akonadi.db<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 />
You can choose between backends based on [[GStreamer]] and [[VLC]] – each available in versions for Qt4 applications and Qt5 applications ({{Pkg|phonon-qt4-gstreamer}}, {{Pkg|phonon-qt5-gstreamer}} – {{Pkg|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 [http://community.kde.org/Phonon/FeatureMatrix features set.]<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 at ''System Settings > Multimedia > Phonon > Backend''. For Plasma 5 this would be ''System Settings > Multimedia > Backend''.<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 />
<br />
== Useful applications ==<br />
<br />
The official set of KDE applications may be found [http://www.kde.org/applications/ here].<br />
<br />
=== Yakuake ===<br />
<br />
[[Yakuake]] provides a Quake-like terminal emulator whose visibility is toggled by the F12 key. It also has support for multiple tabs. Yakuake is available in the package {{Pkg|yakuake}}.<br />
<br />
=== KDE Telepathy ===<br />
<br />
[http://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 '+xx', e.g. '+49' for Germany). 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). Note that 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 />
== Tips and tricks ==<br />
<br />
=== Using an alternative window manager ===<br />
There may be reasons you want to use another window manager than KWin, for example to work around the DRI bug that causes [[PRIME#Black_screen_with_GL-based_compositors|black screen with PRIME]].<br />
<br />
To use an alternative [[window manager]] with Plasma open the ''System Settings'' panel, navigate to ''(Default) Applications > Window Manager > Use a different window manager'' and select the window manager you wish to use from the list.<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 {{ic|.xinitrc}} file:<br />
exec openbox-kde-session<br />
<br />
==== Compiz custom ====<br />
<br />
If you need to run Compiz with custom options and switches select ''Compiz custom'' and then create a script called {{ic|compiz-kde-launcher}} and add to it the commands you wish to use to start Compiz. See the example below:<br />
<br />
{{hc|/usr/local/bin/compiz-kde-launcher|<nowiki><br />
#!/bin/bash<br />
LIBGL_ALWAYS_INDIRECT=1<br />
compiz --replace &<br />
wait<br />
</nowiki>}}<br />
<br />
Then make it executable:<br />
$ chmod +x /usr/local/bin/compiz-kde-launcher<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 />
=== Integrate Android ===<br />
<br />
KDE Connect provides several features for you:<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 {{ic|KDE Connect}} from [https://play.google.com/store/apps/details?id=org.kde.kdeconnect_tp Google Play] or from [https://f-droid.org/repository/browse/?fdid=org.kde.kdeconnect_tp F-Droid].<br />
<br />
=== Configure KWin to use OpenGL ES ===<br />
Due to QtQuick2, both the Qt OpenGL module and KWin have to be [http://blog.martin-graesslin.com/blog/2013/11/kwin5-qtquick-2-and-the-caused-changes-for-opengl/ compiled against OpenGL ES.]<br />
<br />
=== Speed up application startup ===<br />
<br />
User Rob described a "[http://kdemonkey.blogspot.nl/2008/04/magic-trick.html magic trick]" on his blog to improve application start-up time by 50-150ms.<br />
To enable it, create this folder in your home:<br />
$ mkdir ~/.compose-cache/<br />
It can produce freezes under heavy io. To avoid this, also do:<br />
$ ln -sfv /run/user/$UID/ /home/$USER/.compose-cache<br />
<br />
{{Note|For those curious about what is going on here, this enables an optimization which Lubos (of general KDE speediness fame) came up with some time ago and was then rewritten and integrated into libx11. Ordinarily, on startup, applications read input method information from {{ic|/usr/share/X11/locale/''your locale''/Compose}}. This file is quite long (>5000 lines for the en_US.UTF-8 one) and takes some time to process. libX11 can create a cache of the parsed information which is much quicker to read subsequently, but it will only re-use an existing cache or create a new one in {{ic|~/.compose-cache}} if the directory already exists.}}<br />
<br />
=== Configuring monitor resolution / multiple monitors ===<br />
<br />
To enable display resolution management and multiple monitors in Plasma 5, install {{Pkg|kscreen}}. This adds the additional options to System Settings/Display and Monitor.<br />
<br />
=== Open application launcher with Super key (Windows key) ===<br />
<br />
Install and start {{Pkg|ksuperkey}}. Now assign Alt + F1 as hot key. The Super Key will now open the application launcher. You can add ksuperkey to the autostart if you don't want to start it manually.<br />
<br />
== Troubleshooting ==<br />
<br />
=== Graphics card related ===<br />
<br />
==== Intel ====<br />
<br />
If you use 3D-accelerated composition with Intel, you might find that the Plasma panel and other applications don't refresh properly (stay frozen). Some Intel drivers have [https://bugzilla.redhat.com/show_bug.cgi?id=1259475 problems with EGL]. Try to set Plasma 5's ''OpenGL interface'' setting to GLX instead (in System Settings under ''Display and Monitor'' -> ''Compositor''. If that does not work, see ''[[Intel_graphics#SNA_issues|Intel graphics SNA issues]]'' for alternative solutions.<br />
<br />
==== Plasma keeps crashing with legacy Nvidia ====<br />
<br />
There is a bug in Plasma with using the Nvidia-304xx driver described [https://bugs.kde.org/show_bug.cgi?id=348753 here.] Rather than disabling compositing, try creating a file kwin.sh in ~/.config/plasma-workspace/env/ with the following content<br />
<br />
#!/bin/sh<br />
export KWIN_EXPLICIT_SYNC=0<br />
Then go to the system-settings -> Startup and Shutdown -> Autostart and Check/Add the script as a pre-kde startup file<br />
<br />
=== Configuration related ===<br />
<br />
Many problems in KDE are related to configuration.<br />
<br />
==== Reset all kdelib4 apps configuration ====<br />
<br />
To test whether your config is the problem try quitting all kdelib4 apps and run:<br />
<br />
$ cp -r ~/.kde4 ~/.kde4.safekeeping<br />
$ rm .kde4/{cache,socket,tmp}-$(hostname)<br />
<br />
The ''rm'' command just removes symbolic links which will be recreated automatically.<br />
<br />
If the problem does not manifest itself, gradually move parts from the saved configuration back, and restart the application(s) regularly to test and identify problematic parts.<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 it 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 (bugs.kde.org) '''only if it is an official widget'''. If it is not, it is recommended you find the entry on kde-look.org 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}}:<br />
<br />
$ for j in plasma*; do mv -- "$j" "${j%}.bak"; done<br />
<br />
This command will '''rename all Plasma related configs''' 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 [[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 and several other problems such as ark being unable to unrar or unzip or amarok not recognizing any of your musics. This solution can also resolve problems with KDE and Qt programmes looking bad following upgrade.<br />
<br />
Rebuild your cache with the following commands:<br />
<br />
$ rm ~/.config/Trolltech.conf<br />
$ kbuildsycoca4 --noincremental<br />
<br />
Hopefully, your problems are now fixed.<br />
<br />
=== Clean akonadi configuration to fix KMail ===<br />
<br />
First, make sure that KMail is not running. Then backup configuration:<br />
$ mv ~/.local/share/akonadi ~/.local/share/akonadi-old<br />
$ mv ~/.config/akonadi ~/.config/akonadi-old<br />
<br />
Start ''SystemSettings > Personal'' and remove all the resources. Go back to Dolphin and remove the original {{ic|~/.local/share/akonadi}} and<br />
{{ic|~/.config/akonadi}} - the copies you made ensure that you can back-track if necessary.<br />
<br />
Now go back to the System Settings page and carefully add the necessary resources. You should see the resource reading in your mail folders. Then start Kontact/KMail to see if it work properly.<br />
<br />
=== Getting current state of KWin for support and debug purposes ===<br />
<br />
This command prints out a wonderful summary of the current state of KWin including used options, used compositing backend and relevant OpenGL driver capabilities. See more on [http://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 />
=== KDE and Qt programs look bad when in a different window manager ===<br />
<br />
If you are using KDE or Qt programs but not in a full Plasma session (specifically, you did not run {{ic|startkde}}), then as of Plasma 4.6.1 you will need to tell Qt how to find KDE's styles (Oxygen, QtCurve etc.)<br />
<br />
You just need to set the environment variable {{ic|QT_PLUGIN_PATH}}. E.g. put:<br />
<br />
export QT_PLUGIN_PATH=$HOME/.kde4/lib/kde4/plugins/:/usr/lib/kde4/plugins/<br />
<br />
into your {{ic|/etc/profile}} (or {{ic|~/.profile}} if you do not have root access). {{ic|qtconfig-qt4}} should then be able to find your KDE styles and everything should look nice again!<br />
<br />
Alternatively, you can symlink the Qt styles directory to the KDE styles one:<br />
# ln -s /usr/lib/kde4/plugins/styles/ /usr/lib/qt4/pluginlib32-libdbusmenu-glibs/styles<br />
<br />
Under Gnome you can try to install the package libgnomeui.<br />
<br />
=== KF5/Qt5 applications don't display icons in i3/fvwm/awesome ===<br />
<br />
See [[Qt#Configuration of Qt apps under environments other than KDE]].<br />
<br />
=== Graphical related problems ===<br />
<br />
==== Low 2D desktop performance (or) artifacts appear when on 2D ====<br />
<br />
===== GPU driver problem =====<br />
<br />
Make sure you have the proper driver for your card installed, so that your desktop is at least 2D accelerated. Follow these articles for more information: [[ATI]], [[NVIDIA]], [[Intel]] for more information, in order to make sure that everything is all right.<br />
The open-source ATI and Intel drivers and the proprietary (binary) Nvidia driver should theoretically provide the best 2D and 3D acceleration.<br />
<br />
===== The Raster engine workaround =====<br />
<br />
If this does not solve your problems, your driver may not provide a good '''XRender''' acceleration which the current Qt painter engine relies on by default.<br />
<br />
You can change the painter engine to software based only by invoking the application with the {{ic|-graphicssystem raster}} command line. This rendering engine can be set as the default one by recompiling Qt with the same as configure option, {{ic|-graphicssystem raster}}.<br />
<br />
The raster paint engine enables the CPU to do the majority of the painting, as opposed to the GPU. You may get better performance, depending on your system. This is basically a work-around for the terrible Linux driver stack, since the CPU should obviously not be doing graphical computations since it is designed for fewer threads of greater complexity, as opposed to the GPU which is many threads but lesser computational strength. So, only use Raster engine if you are having problems or your GPU is much slower than you CPU, otherwise is better to use XRender.<br />
<br />
Since Qt 4.7+, recompiling Qt is not needed. Simply export {{ic|1=QT_GRAPHICSSYSTEM=raster}}, or {{ic|opengl}}, or {{ic|native}} (for the default). Raster depends on the CPU, OpenGL depends on the GPU and high driver support, and Native is just using the X11 rendering (mixture, usually).<br />
<br />
'''The best and automatic way to do that''' is to install {{AUR|kcm-qt-graphicssystem}} from AUR and configure this particular Qt setting through ''System Settings > Qt Graphics System''.<br />
<br />
For more information, consult this [http://apachelog.wordpress.com/2010/09/05/qt-graphics-system-kcm/ KDE Developer blog entry] and/or this [http://labs.trolltech.com/blogs/2009/12/18/qt-graphics-and-performance-the-raster-engine/ Qt Developer blog entry].<br />
<br />
==== Low 3D desktop performance====<br />
<br />
KDE begins with desktop effects enabled. Older cards may be insufficient for 3D desktop acceleration. You can disable desktop effects in ''System Settings > Desktop Effects'' and you can toggle desktop effects with {{ic|Alt+Shift+F12}}.<br />
<br />
{{Note| You may encounter such problems with 3D desktop performance even when using a more powerful graphics card, especially the catalyst proprietary driver ({{ic|fglrx}}). This driver is known for having problems with 3D acceleration. Visit [[ATI|the ATI Wiki page]] for more troubleshooting.}}<br />
<br />
==== Desktop compositing is disabled on my system with a modern Nvidia GPU ====<br />
<br />
Sometimes, KWin may have settings in its configuration file ({{ic|kwinrc}}) that ''may'' cause a problem on re-activating the 3D desktop {{ic|OpenGL}} compositing. That could be caused randomly (for example, due to a sudden Xorg crash or restart, and it gets corrupted), so, in case that happens, delete your {{ic|~/.kde4/share/config/kwinrc}} file and relogin. The KWin settings will turn to the KDE default ones and the problem should be probably gone.<br />
<br />
==== Flickering in fullscreen when compositing is enabled ====<br />
<br />
As of KDE SC 4.6.0, there is an option in ''Sytem Settings > Desktop Effect > Advanced > Suspend desktop effects for fullscreen windows''. Uncheck it would tell kwin to disable unredirect fullscren.<br />
<br />
==== Screen Tearing with desktop compositing enabled ====<br />
<br />
KWin may suffer from [[Wikipedia:Screen tearing|screen tearing]] while desktop effects are enabled. Uncheck the VSync option under ''System Settings > Desktop Effects > Advanced > Use Vsync''.<br />
<br />
{{Note|With the release of Plasma 4.11, several new Vsync options have been added, which may help with screen tearing.}}<br />
<br />
For proprietary driver users, ensure that the driver's VSync option is enabled (''amdccle'' for [[Catalyst]] users, and ''nvidia-settings'' for [[NVIDIA]] users).<br />
<br />
==== Display settings lost on reboot (multiple monitors) ====<br />
There is a [https://bugs.kde.org/show_bug.cgi?id=346961 bug] in kscreen that makes it forget dual screen settings after reboot with certain displays.<br />
A possible workaround is to delete kscreen and make sure that your screen resolution is specified in a xorg.conf file:<br />
* For Nouveau you can use the template at [[Nouveau#Dual Head]], just edit it to suit your setup.<br />
* For the proprietary nvidia driver you can use the [[NVIDIA#Using_NVIDIA_Settings|nvidia-settings]] utility as root to write the config file.<br />
<br />
''' Other suggestion '''<br />
<br />
Installing {{Pkg|kscreen4}} might fix the problem unless your screens share the same EDID. Kscreen is the improved screen management software for KDE, more information can be found [https://fedoraproject.org/wiki/Changes/KScreen?rd=Features/KScreen here].<br />
<br />
=== Sound problems under KDE ===<br />
<br />
==== ALSA related problems ====<br />
<br />
{{Note|First make sure you have {{Pkg|alsa-lib}} and {{Pkg|alsa-utils}} installed.}}<br />
<br />
===== "Falling back to default" messages when trying to listen to any sound in KDE =====<br />
<br />
When you encounter such messages:<br />
The audio playback device ''name_of_the_sound_device'' does not work.<br />
Falling back to default<br />
Go to ''System Settings > Multimedia > Phonon'' and set the device named {{ic|default}} above all the other devices in each box you see.<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 {{Pkg|phonon-qt4-vlc}} or {{Pkg|phonon-qt5-vlc}}.<br />
Then, make sure the backend is preferred via ''System Settings > Multimedia > Phonon > Backend (tab)''.<br />
<br />
=== Konsole does not save commands' history ===<br />
<br />
By default console command history is saved only when you type 'exit' in console. When you close Konsole with 'x' in the corner it does not happen.<br />
To enable autosaving after every command execution:<br />
<br />
{{hc|~/.bashrc|<nowiki><br />
shopt -s histappend<br />
[[ "${PROMPT_COMMAND}" ]] && PROMPT_COMMAND="$PROMPT_COMMAND;history -a" || PROMPT_COMMAND="history -a"<br />
</nowiki>}}<br />
<br />
=== Inotify folder watch limit ===<br />
<br />
If you get the following error:<br />
<br />
KDE Baloo Filewatch service reached the inotify folder watch limit. File changes may be ignored.<br />
<br />
Then you will need to increase the inotify folder watch limit:<br />
<br />
# echo 10000 > /proc/sys/fs/inotify/max_user_watches<br />
<br />
To make changes permanent, create {{ic|/etc/sysctl.d/90-inotify.conf}} with<br />
<br />
#increase inotify watch limit<br />
fs.inotify.max_user_watches = 10000<br />
<br />
== Unstable releases ==<br />
<br />
When KDE is reaching beta or RC milestone, KDE "unstable" packages are uploaded to the ''kde-unstable'' repository. They stay there until KDE is declared stable and passes to the ''extra'' repository.<br />
<br />
You can add ''kde-unstable'' with:<br />
<br />
{{hc|/etc/pacman.conf|2=<br />
[kde-unstable]<br />
Include = /etc/pacman.d/mirrorlist<br />
}}<br />
<br />
{{Warning|Make sure to add these lines '''before''' the ''extra'' repository. Adding the section after ''extra'' will cause [[pacman]] to prefer the older packages in the extra repository. {{ic|pacman -Syu}} will not install them, and will warn that they are "too new" if installed manually. Also, some of the libraries will stay at the older versions, which may cause file conflicts and/or instability!}}<br />
<br />
# ''kde-unstable'' is based upon ''testing''. Therefore, you need to enable the repositories in the following order: ''kde-unstable'', ''testing'', ''core'', ''extra'', ''community-testing'', ''community''.<br />
# To update from a previous KDE installation, run: {{ic|# pacman -Syu}} or {{ic|# pacman -S kde-unstable/kde}}<br />
# If you do not have KDE installed, you might have difficulties to install it by using groups (limitation of pacman)<br />
# '''Subscribe and read the [https://mailman.archlinux.org/pipermail/arch-dev-public/ arch-dev-public] mailing list'''<br />
# Make sure [[#Bugs|you make bug reports]] if you find any problems.<br />
<br />
== Bugs ==<br />
<br />
It is preferable that if you find a minor or serious bug, you should visit [https://bugs.archlinux.org the Arch Bug Tracker] or/and [http://bugs.kde.org KDE Bug Tracker] in order to report that. Make sure that you are clear about what you want to report.<br />
<br />
If you have any problem and you write about in on the Arch forums, first make sure that you have '''fully''' updated your system using a good sync mirror (check [https://www.archlinux.de/?page=MirrorStatus here]) or try [[Reflector]].<br />
<br />
== See also ==<br />
<br />
* [http://www.kde.org KDE homepage]<br />
* [https://bugs.kde.org KDE bug tracker]<br />
* [https://projects.kde.org KDE Projects]<br />
* [http://blog.martin-graesslin.com/blog/kategorien/kde/ Martin Graesslin's blog]</div>Beta990https://wiki.archlinux.org/index.php?title=Firefox&diff=412369Firefox2015-12-15T12:44:14Z<p>Beta990: /* KDE integration */ Update for Plasma (remove KDE4 reference) and changed orion to breeze</p>
<hr />
<div>[[Category:Web browser]]<br />
[[ar:Firefox]]<br />
[[cs:Firefox]]<br />
[[de:Firefox]]<br />
[[es:Firefox]]<br />
[[fr:Firefox]]<br />
[[it:Firefox]]<br />
[[ja:Firefox]]<br />
[[ko:Firefox]]<br />
[[ru:Firefox]]<br />
[[tr:Firefox]]<br />
[[zh-CN:Firefox]]<br />
{{Related articles start}}<br />
{{Related|Browser plugins}}<br />
{{Related|Firefox tweaks}}<br />
{{Related|Chromium}}<br />
{{Related|Opera}}<br />
{{Related articles end}}<br />
[http://www.firefox.com Firefox] is a popular open-source graphical web browser from [http://www.mozilla.com Mozilla].<br />
<br />
== Installing ==<br />
<br />
Firefox can be [[installed]] with the {{Pkg|firefox}} package.<br />
<br />
Other alternatives include:<br />
<br />
*{{App|Firefox Extended Support Release|long-term supported version|https://www.mozilla.org/en-US/firefox/organizations/|{{AUR|firefox-esr-bin}}}}<br />
*{{App|Firefox Beta|cutting-edge version|https://www.mozilla.org/en-US/firefox/channel|{{AUR|firefox-beta-bin}}}}<br />
*{{App|Firefox Aurora/Developer edition|for developers|https://www.mozilla.org/en-US/firefox/aurora/|{{AUR|firefox-aurora}}}}<br />
*{{App|Firefox Nightly|nightly builds for testing|https://nightly.mozilla.org/|{{AUR|firefox-nightly}}}}<br />
* {{App|Firefox KDE|Version of Firefox that incorporates an OpenSUSE patch for better KDE integration than is possible through simple Firefox plugins.|https://build.opensuse.org/package/show/mozilla:Factory/MozillaFirefox|{{AUR|firefox-kde-opensuse}}}}<br />
* On top of the different Mozilla build channels, a number of forks exist with more or less special features; see [[List of applications#Gecko-based]].<br />
<br />
Here you can find an overview of Mozilla's [https://wiki.mozilla.org/Releases releases].<br />
<br />
There are a number of language packs available for Firefox, other than the standard English. Language packs are usually named as {{ic|firefox-i18n-languagecode}} (where {{ic|languagecode}} can be any language code, such as '''de''', '''ja''', '''fr''', etc.). For a list of available language packs see [https://www.archlinux.org/packages/?sort=&q=firefox-i18n&maintainer=&last_update=&flagged=&limit=100 this].<br />
<br />
== Add-ons ==<br />
<br />
Firefox is well known for its large library of add-ons which can be used to add new features or modify the behavior of existing features of Firefox. You can find new add-ons or manage installed add-ons with Firefox's "Add-ons Manager."<br />
<br />
For a list of popular add-ons, see [https://addons.mozilla.org/en-US/firefox/extensions/?sort=popular Mozilla's add-on list sorted by popularity]. See also [[Wikipedia:List of Firefox extensions|List of Firefox extensions]] on Wikipedia.<br />
<br />
== Configuration ==<br />
<br />
Firefox exposes a number of configuration options. To examine them, enter:<br />
about:config<br />
in the Firefox address bar.<br />
<br />
Once set, these affect the user's current profile, and may be synchronized across all devices via [https://www.mozilla.org/en-US/firefox/sync/ Firefox Sync]. Please note that only a subset of the {{ic|about:config}} entries are synchronized by this method, and the exact subset may be found by searching for {{ic|services.sync.prefs}} in {{ic|about:config}}.<br />
<br />
Firefox also allows configuration for a profile via a {{ic|user.js}} file: [http://kb.mozillazine.org/User.js_file user.js] kept in the profile folder, usually {{ic|~/.mozilla/firefox/''some name''.default/}}. For a useful starting point, see e.g [https://github.com/pyllyukko/user.js custom user.js] which is targeted at privacy/security conscious users.<br />
<br />
One drawback of the above approach is that it is not applied system-wide. Furthermore, this is not useful as a "pre-configuration", since the profile directory is created after first launch of the browser. You can, however, let ''firefox'' create a new profile and, after closing it again, [https://support.mozilla.org/en-US/kb/back-and-restore-information-firefox-profiles#w_restoring-a-profile-backup copy the contents] of an already created profile folder into it. <br />
<br />
Sometimes it may be desired to lock certain settings, a feature useful in widespread deployments of customized Firefox. In order to create a system-wide configuration, follow the steps outlined in [http://kb.mozillazine.org/Locking_preferences Locking preferences]:<br />
<br />
1. Create {{ic|/usr/lib/firefox/defaults/pref/local-settings.js}}:<br />
pref("general.config.obscure_value", 0);<br />
pref("general.config.filename", "mozilla.cfg");<br />
2. Create {{ic|/usr/lib/firefox/mozilla.cfg}} (this stores the actual configuration):<br />
//<br />
//...your settings...<br />
// e.g to disable Pocket, uncomment the following line<br />
// lockPref("browser.pocket.enabled", false);<br />
<br />
Please note that the first line must contain exactly {{ic|//}}. The syntax of the file is similar to that of {{ic|user.js}}.<br />
<br />
== Plugins ==<br />
<br />
See the main article: [[Browser plugins]]<br />
<br />
To find out what plugins are installed/enabled, enter:<br />
about:plugins<br />
in the Firefox address bar or go to the ''Add-ons'' entry in the Firefox Menu and select the ''Plugins'' tab.<br />
<br />
=== GNOME Keyring integration ===<br />
<br />
Install {{AUR|firefox-gnome-keyring}}{{Broken package link|{{aur-mirror|firefox-gnome-keyring}}}} or {{AUR|mozilla-extension-gnome-keyring-git}} (all-JavaScript implementation) to integrate Firefox with [[GNOME Keyring]]. To make firefox-gnome-keyring use your login keychain, set extensions.gnome-keyring.keyringName to "login" (without the double quotes) in about:config. Note the lowercase 'l' despite the the keychain name having an uppercase 'L' in Seahorse.<br />
<br />
=== KDE integration ===<br />
<br />
* To bring the KDE look to GTK apps (including Firefox), install {{Pkg|breeze-gtk}} and {{Pkg|kde-gtk-config}}. Afterwards, go to {{ic|System Settings}} -> {{ic|Application Style}} -> {{ic|GTK}}. Be sure to choose 'Breeze' in 'Select a GTK2/GTK3 Theme' and check 'Show icons in GTK buttons' and 'Show icons in GTK'.<br />
<br />
* To use KDE's KPart technology with Firefox, by embedding different KDE file viewers into the browser, you can install {{Pkg|kpartsplugin}}.<br />
<br />
* For integration with KDE’s mime type system and file dialogs, one can use {{AUR|firefox-kde-opensuse}} variant from AUR with OpenSUSE’s patches applied.<br />
<br />
* Add-ons may provide some integration, such as [https://addons.mozilla.org/en-US/firefox/addon/kde-wallet-password-integratio/ KWallet integration] and [https://addons.mozilla.org/en-US/firefox/addon/plasmanotify/ Plasma notifications].<br />
<br />
=== Dictionaries for spell checking ===<br />
<br />
To enable spell checking for a specific language right click on any text field and check the ''Check Spelling'' box. To select a language for spell checking to you have right click again and select your language from the ''Languages'' sub-menu.<br />
<br />
To get more languages just click ''Add Dictionaries...'' and select the dictionary you want to install from the list.<br />
<br />
Alternatively, you can install the {{Pkg|hunspell}} package. You also need to install dictionaries for your language, such as {{Pkg|hunspell-fr}} (for the French language) or {{Pkg|hunspell-he}} (for Hebrew).<br />
<br />
By default, Firefox will try to symlink all your hunspell dictionaries in {{ic|/usr/lib/firefox/dictionaries}}. If you want to have less dictionaries offered to you in Firefox, you can remove some of those links. Be aware that it may not stand an upgrade of Firefox.<br />
<br />
When your default language choice does not stick, see [[#Firefox does not remember default spell check language]].<br />
<br />
=== Adding search engines ===<br />
<br />
Search engines can be added to Firefox through normal add-ons, see [https://addons.mozilla.org/en-US/firefox/search-tools/ this page] for a list of available search engines.<br />
<br />
A very extensive list of search engines can be found [http://mycroft.mozdev.org/ here].<br />
<br />
Also, you can use the [https://firefox.maltekraus.de/extensions/add-to-search-bar add-to-searchbar] extension to add a search to your search bar from any web site, by simply right clicking on the site's search field and selecting ''Add to Search Bar...''<br />
<br />
If you want a manual solution, take a look at {{ic|~/.mozilla/firefox/''xxxxxxxx''.default/searchplugins/}} (where ''xxxxxxxx'' is your profile ID).<br />
<br />
==== arch-firefox-search ====<br />
<br />
Install the {{Pkg|arch-firefox-search}} package to add Arch-specific searches (AUR, wiki, forum, etc, as specified by user) to the Firefox search toolbar.<br />
<br />
=== Multimedia playback ===<br />
<br />
If {{ic|media.gstreamer.enabled}} is {{ic|true}} in {{ic|about:config}}, Firefox will try to use [[GStreamer]] for playing multimedia inside HTML5 {{ic|<audio>}} and {{ic|<video>}} elements. For this to work, the optional dependencies of the {{Pkg|firefox}} package need to be installed (see [[Browser plugins#Multimedia playback]] for details).<br />
<br />
Restart Firefox, and go to [https://www.youtube.com/html5 YouTube's HTML5 page] or [http://www.quirksmode.org/html5/tests/video.html this page] to verify that it is correctly installed and is in use.<br />
<br />
Alternatively, to force Firefox to rely on the Adobe Flash Player to play HTML5 audio, set {{ic|media.gstreamer.enabled}} to {{ic|false}} in your {{ic|about:config}}.<br />
<br />
== Troubleshooting ==<br />
<br />
=== Firefox startup takes very long === <br />
<br />
If Firefox takes much longer to start up than other browsers, it may be due to lacking configuration of the localhost in {{ic|/etc/hosts}}. See [[Network configuration#Local network hostname resolution]] on how to set it up. <br />
<br />
=== Font troubleshooting ===<br />
<br />
See [[Font configuration]].<br />
<br />
=== Setting an email client ===<br />
<br />
Inside the browser, {{ic|mailto}} links by default are opened by a web application such as Gmail or Yahoo Mail. To set an external email program, go to ''Preferences > Applications'' and modify the ''action'' corresponding to the {{ic|mailto}} content type; the file path will need to be designated (e.g. {{ic|/usr/bin/kmail}} for Kmail).<br />
<br />
Outside the browser, {{ic|mailto}} links are handled by the {{ic|x-scheme-handler/mailto}} mime type, which can be easily configured with [[xdg-mime]]. See [[Default applications]] for details and alternatives.<br />
<br />
=== File association ===<br />
<br />
See [[Default applications]].<br />
<br />
==== File association problems ====<br />
<br />
{{Expansion|Mention {{ic|xdg-open}} trick in {{ic|Preferences > Applications}}, and possible mistakes with {{ic|octet/binary-stream}} [https://bugs.launchpad.net/ubuntu/+source/firefox/+bug/918019/comments/12]}}<br />
<br />
{{Accuracy|1={{Pkg|firefox}} does not seem to use {{Pkg|libgnome}} at all, though [https://bugzilla.mozilla.org/show_bug.cgi?id=694570 this bug] is still open.}}<br />
<br />
For non-[[GNOME]] users, Firefox may not associate file types properly or at all (in the "Open With" part of the download dialog). Installing {{Pkg|libgnome}} amends the problem.<br />
<br />
See also [http://alien.slackbook.org/blog/make-firefox-understand-downloaded-files/].<br />
<br />
=== Firefox keeps creating ~/Desktop even when this is not desired ===<br />
<br />
Firefox uses {{ic|~/Desktop}} as the default place for download and upload files. To change it to another folder, set the {{ic|XDG_DESKTOP_DIR}} option as explained in [[Xdg user directories]].<br />
<br />
=== Make plugins respect blocked pop-ups ===<br />
<br />
Some plugins can misbehave and bypass the default settings, such as the Flash plugin. You can prevent this by doing the following:<br />
<br />
# Type {{ic|about:config}} into the address bar.<br />
# Right-click on the page and select {{ic|New}} and then {{ic|Integer}}.<br />
# Name it {{ic|privacy.popups.disable_from_plugins}}.<br />
# Set the value to 2.<br />
<br />
The possible values are:<br />
* '''0''': Allow all popups from plugins.<br />
* '''1''': Allow popups, but limit them to dom.popup_maximum.<br />
* '''2''': Block popups from plugins.<br />
* '''3''': Block popups from plugins, even on whitelisted sites.<br />
<br />
=== Middle-click errors ===<br />
<br />
A common error message you can get while using the middle mouse button in Firefox is:<br />
The URL is not valid and cannot be loaded.<br />
<br />
Another symptom is that middle-clicking results in unexpected behavior, like accessing a random web page.<br />
<br />
The reason stems from the use of the middle mouse buttons in UNIX-like operating systems. The middle mouse button is used to paste whatever text has been highlighted/added to the clipboard. Then there is the possibly conflicting feature in Firefox, which defaults to loading the URL of the corresponding text when the button is depressed. This can be easily disabled by going to {{ic|about:config}} and setting the {{ic|middlemouse.contentLoadURL}} option to '''false'''.<br />
<br />
Alternatively, having the traditional scroll cursor on middle-click (default behavior on Windows browsers) can be achieved by searching for {{ic|general.autoScroll}} and setting it to '''true'''.<br />
<br />
=== Backspace does not work as the 'Back' button ===<br />
<br />
As per [http://ubuntu.wordpress.com/2006/12/21/fix-firefox-backspace-to-take-you-to-the-previous-page/ this article], the feature has been removed in order to fix a bug. To re-introduce the original behavior go to {{ic|about:config}} and set the {{ic|browser.backspace_action}} option to '''0''' (zero).<br />
<br />
=== Firefox does not remember login information ===<br />
<br />
It may be due to a corrupted {{ic|cookies.sqlite}} file in [http://support.mozilla.com/en-US/kb/Profiles#How_to_find_your_profile Firefox's profile] folder. In order to fix this, just rename or remove {{ic|cookie.sqlite}} while Firefox is not running.<br />
<br />
Open a terminal of choice and type the following:<br />
$ cd ~/.mozilla/firefox/xxxxxxxx.default/<br />
$ rm -f cookies.sqlite<br />
{{Note|xxxxxxxx represents a random string of 8 characters.}}<br />
<br />
Restart Firefox and see if it solved the problem.<br />
<br />
=== Unreadable input fields with dark GTK+ themes ===<br />
<br />
{{Merge|Firefox tweaks#Appearance|Anything on that page might be in troubleshooting section as well, so let's keep the info in one place.}}<br />
<br />
When using a dark [[GTK+]] theme, one might encounter Internet pages with unreadable input and text fields (e.g. Amazon can have white text on white background). This can happen because the site only sets either background or text color, and Firefox takes the other one from the theme.<br />
<br />
A work around is to explicitly setting standard colors for all web pages in {{ic|~/.mozilla/firefox/xxxxxxxx.default/chrome/userContent.css}} or using [https://addons.mozilla.org/en-US/firefox/addon/stylish/ stylish add-on].<br />
<br />
The following sets input fields to standard black text / white background; both can be overridden by the displayed site, so that colors are seen as intended:<br />
<br />
{{Note|If you want {{ic|urlbar}} and {{ic|searchbar}} to be {{ic|white}} remove the two first {{ic|:not}} css selectors.}}<br />
{{bc|<br />
1=input:not(.urlbar-input):not(.textbox-input):not(.form-control):not([type='checkbox']) {<br />
-moz-appearance: none !important;<br />
background-color: white;<br />
color: black;<br />
}<br />
<br />
#downloads-indicator-counter {<br />
color: white;<br />
}<br />
<br />
textarea {<br />
-moz-appearance: none !important;<br />
background-color: white;<br />
color: black;<br />
}<br />
<br />
select {<br />
-moz-appearance: none !important;<br />
background-color: white;<br />
color: black;<br />
}<br />
}}<br />
<br />
=== "Do you want Firefox to save your tabs for the next time it starts?" dialog does not appear ===<br />
<br />
From the [http://support.mozilla.com/en-US/questions/767751 Mozilla support] site:<br />
<br />
# Type {{ic|about:config}} in the address bar.<br />
# Set {{ic|browser.warnOnQuit}} to '''true'''.<br />
# Set {{ic|browser.showQuitWarning}} to '''true'''.<br />
<br />
=== Silently fails when installing desktop apps from marketplace ===<br />
<br />
Installation of apps from firefox os marketplace will silently fail if there's no {{ic|~/.local/share/applications}} folder.<br />
<br />
=== Firefox detects the wrong version of my plugin ===<br />
<br />
When you close Firefox, the latter saves the current timestamp and version of your plugins inside {{ic|pluginreg.dat}} located in your profile folder, typically in {{ic|~/.mozilla/firefox/''some name''.default/}}.<br />
<br />
If you upgraded your plugin when Firefox was still running, you will thus have the wrong information inside that file. The next time you will restart Firefox you will get that message {{ic|Firefox has prevented the outdated plugin "XXXX" from running on ...}} when you will be trying to open content dedicated to that plugin on the web. This problem often appears with the official [[Browser plugins#Flash Player|Adobe Flash Player plugin]] which has been upgraded while Firefox was still running.<br />
<br />
The solution is to remove the file {{ic|pluginreg.dat}} from your profile and that is it. Firefox will not complain about the missing file as it will be recreated the next time Firefox will be closed.<br />
[https://bugzilla.mozilla.org/show_bug.cgi?id=1109795#c16]<br />
<br />
=== Javascript context menu doesn't appear on some sites ===<br />
<br />
In {{ic|about:config}}, unset the {{ic|dom.w3c_touch_events.enabled}} setting.<br />
<br />
=== Firefox does not remember default spell check language ===<br />
<br />
The default spell checking language can be set as follows:<br />
<br />
# Type {{ic|about:config}} in the address bar.<br />
# Set {{ic|spellchecker.dictionary}} to your language of choice, for instance {{ic|en_GB}}.<br />
# Notice that the for dictionaries installed as a Firefox plugin the notation is {{ic|en-GB}}, and for {{Pkg|hunspell}} dictionaries the notation is {{ic|en_GB}}.<br />
<br />
When you only have system wide dictionaries installed with {{Pkg|hunspell}}, Firefox might not remember your default dictionary language settings. This can be fixed by having at least one [https://addons.mozilla.org/en-US/firefox/language-tools/ dictionary] installed as a Firefox plugin. Notice that now you will also have a tab '''Dictionaries''' in '''add-ons'''.<br />
<br />
Related questions on the '''StackExchange''' platform: [http://stackoverflow.com/questions/26936792/change-firefox-spell-check-default-language/29446115], [http://stackoverflow.com/questions/21542515/change-default-language-on-firefox/29446353], [http://askubuntu.com/questions/184300/how-can-i-change-firefoxs-default-dictionary/576877]<br />
<br />
Related bug reports: [https://bugzilla.mozilla.org/show_bug.cgi?id=776028 Bugzilla 776028], [https://bugs.launchpad.net/ubuntu/+source/firefox/+bug/1026869 Ubuntu bug 1026869]<br />
<br />
=== Some MathML symbols are missing ===<br />
<br />
You need some Math fonts, namely Latin Modern Math and STIX (see this MDN page: [https://developer.mozilla.org/en-US/docs/Mozilla/MathML_Project/Fonts#Linux]), to display MathML correctly.<br />
<br />
In Arch Linux, these fonts are provided by {{Pkg|texlive-core}} '''and''' {{Pkg|texlive-fontsextra}}, but they are not available to fontconfig by default. See [[TeX Live#Fonts]] for details.<br />
<br />
== See also ==<br />
<br />
* [http://www.mozilla.org/firefox/ Official website]<br />
* [http://www.mozilla.org/ Mozilla Foundation]<br />
* [https://wiki.mozilla.org/Firefox Firefox wiki]<br />
* [https://addons.mozilla.org/ Firefox Add-ons]<br />
* [https://addons.mozilla.org/en-US/firefox/themes/ Firefox themes]</div>Beta990https://wiki.archlinux.org/index.php?title=Adminer&diff=412309Adminer2015-12-14T21:47:30Z<p>Beta990: /* Configuration under Nginx */ Clean-up, few spelling fixes</p>
<hr />
<div>[[Category:Web server]]<br />
[[cs:Adminer]]<br />
[[ja:Adminer]]<br />
[http://www.adminer.org/ Adminer] is a simple tool for database management. It's possible to manage [[MySQL]], [[PostgreSQL]], [[Sqlite3]], MS SQL and [[Oracle]].<br />
<br />
It's a simpler alternative to [[PhpMyAdmin]]. You can find more pieces of information about this project at the [http://www.adminer.org/en/ official page] or at [[Wikipedia:Adminer|Wikipedia]].<br />
<br />
== Installation ==<br />
[[Install]] {{AUR|adminer}} - Adminer will be installed as {{ic|/usr/share/webapps/adminer/index.php}}.<br />
Ensure the correct extensions in {{ic|/etc/php/php.ini}} are uncommenting, e.g. {{ic|<nowiki>extension=pdo_mysql.so</nowiki>}} should provide [[MySQL]] database management.<br />
<br />
{{Warning|As of PHP 5.5, {{ic|mysql.so}} is [http://www.php.net/manual/de/migration55.deprecated.php deprecated] and will fill up your log files with error messages. It is no longer available in PHP 7.0.}}<br />
<br />
== Configuration under Apache ==<br />
<br />
Add the following line to {{ic| /etc/httpd/conf/httpd.conf}}:<br />
<br />
Include conf/extra/httpd-adminer.conf<br />
<br />
Then [[restart]] your [[apache]] daemon. <br />
# systemctl restart httpd<br />
<br />
{{Note|The Adminer can be accessed by your browser on [http://localhost/adminer http://localhost/adminer].}}<br />
<br />
In case there is an (403) error, comment the {{ic|php_admin_value}} line inside {{ic|/etc/httpd/conf/extra/httpd-adminer.conf}}.<br />
<br />
== Configuration under Nginx ==<br />
<br />
Ensure that the [[nginx#PHP configuration|php FastCGI interface]] is configured correct.<br />
<br />
Then add the following {{ic|server}} block to your {{ic|/etc/nginx/nginx.conf}} or place it in a file under {{ic|/etc/nginx/servers-available/}} and [[nginx#Managing server entries|enable]] it.<br />
<br />
Afterwards restart the server with {{ic|systemctl restart nginx.service}}.<br />
<br />
{{hc|/etc/nginx/nginx.conf|<nowiki><br />
server {<br />
listen 80;<br />
server_name db.domainname.dom;<br />
root /usr/share/webapps/adminer;<br />
<br />
# If you want to use a .htpass file, uncomment the three following lines.<br />
#auth_basic "Admin-Area! Password needed!";<br />
#auth_basic_user_file /usr/share/webapps/adminer/.htpass;<br />
#access_log /var/log/nginx/adminer-access.log;<br />
<br />
error_log /var/log/nginx/adminer-error.log;<br />
location / {<br />
index index.php;<br />
try_files $uri $uri/ /index.php?$args;<br />
}<br />
<br />
location ~ .php$ {<br />
include fastcgi.conf;<br />
#fastcgi_pass localhost:9000;<br />
fastcgi_pass unix:/run/php-fpm/php-fpm.sock;<br />
fastcgi_index index.php;<br />
fastcgi_param SCRIPT_FILENAME /usr/share/webapps/adminer$fastcgi_script_name;<br />
}<br />
}<br />
</nowiki>}}<br />
<br />
== See also ==<br />
<br />
* [http://www.adminer.org/en/ Official Adminer webpage]<br />
* [http://php.vrana.cz/ Author's weblog]</div>Beta990https://wiki.archlinux.org/index.php?title=Adminer&diff=412308Adminer2015-12-14T21:44:23Z<p>Beta990: /* Installation */ A bit easier to understand, pdo_mysql instead of mysqli</p>
<hr />
<div>[[Category:Web server]]<br />
[[cs:Adminer]]<br />
[[ja:Adminer]]<br />
[http://www.adminer.org/ Adminer] is a simple tool for database management. It's possible to manage [[MySQL]], [[PostgreSQL]], [[Sqlite3]], MS SQL and [[Oracle]].<br />
<br />
It's a simpler alternative to [[PhpMyAdmin]]. You can find more pieces of information about this project at the [http://www.adminer.org/en/ official page] or at [[Wikipedia:Adminer|Wikipedia]].<br />
<br />
== Installation ==<br />
[[Install]] {{AUR|adminer}} - Adminer will be installed as {{ic|/usr/share/webapps/adminer/index.php}}.<br />
Ensure the correct extensions in {{ic|/etc/php/php.ini}} are uncommenting, e.g. {{ic|<nowiki>extension=pdo_mysql.so</nowiki>}} should provide [[MySQL]] database management.<br />
<br />
{{Warning|As of PHP 5.5, {{ic|mysql.so}} is [http://www.php.net/manual/de/migration55.deprecated.php deprecated] and will fill up your log files with error messages. It is no longer available in PHP 7.0.}}<br />
<br />
== Configuration under Apache ==<br />
<br />
Add the following line to {{ic| /etc/httpd/conf/httpd.conf}}:<br />
<br />
Include conf/extra/httpd-adminer.conf<br />
<br />
Then [[restart]] your [[apache]] daemon. <br />
# systemctl restart httpd<br />
<br />
{{Note|The Adminer can be accessed by your browser on [http://localhost/adminer http://localhost/adminer].}}<br />
<br />
In case there is an (403) error, comment the {{ic|php_admin_value}} line inside {{ic|/etc/httpd/conf/extra/httpd-adminer.conf}}.<br />
<br />
== Configuration under Nginx ==<br />
<br />
Ensure that the [[nginx#PHP configuration|php FastCGI interface]] is configured correct.<br />
<br />
Then ad the folwing {{ic|server}} block to your {{ic|/etc/nginx/nginx.conf}} or place it in a file under {{ic|/etc/nginx/servers-available/}} and [[nginx#Managing server entries|enable]] it.<br />
<br />
Afterwards restart the server with {{ic|systemctl restart nginx.service}}.<br />
<br />
{{hc|/etc/nginx/nginx.conf|<nowiki><br />
server {<br />
listen 80;<br />
server_name db.domainname.dom;<br />
root /usr/share/webapps/adminer;<br />
<br />
# If you want to use a .htpass file, uncomment the three following lines.<br />
#auth_basic "Admin-Area! Password needed!";<br />
#auth_basic_user_file /usr/share/webapps/adminer/.htpass;<br />
#access_log /var/log/nginx/adminer-access.log;<br />
<br />
error_log /var/log/nginx/adminer-error.log;<br />
location / {<br />
index index.php;<br />
try_files $uri $uri/ /index.php?$args;<br />
}<br />
<br />
location ~ .php$ {<br />
include fastcgi.conf;<br />
#fastcgi_pass localhost:9000;<br />
fastcgi_pass unix:/run/php-fpm/php-fpm.sock;<br />
fastcgi_index index.php;<br />
fastcgi_param SCRIPT_FILENAME /usr/share/webapps/adminer$fastcgi_script_name;<br />
}<br />
}<br />
<br />
</nowiki>}}<br />
<br />
== See also ==<br />
<br />
* [http://www.adminer.org/en/ Official Adminer webpage]<br />
* [http://php.vrana.cz/ Author's weblog]</div>Beta990https://wiki.archlinux.org/index.php?title=Adminer&diff=412307Adminer2015-12-14T21:38:52Z<p>Beta990: /* Configuration under Apache */ A bit more simple</p>
<hr />
<div>[[Category:Web server]]<br />
[[cs:Adminer]]<br />
[[ja:Adminer]]<br />
[http://www.adminer.org/ Adminer] is a simple tool for database management. It's possible to manage [[MySQL]], [[PostgreSQL]], [[Sqlite3]], MS SQL and [[Oracle]].<br />
<br />
It's a simpler alternative to [[PhpMyAdmin]]. You can find more pieces of information about this project at the [http://www.adminer.org/en/ official page] or at [[Wikipedia:Adminer|Wikipedia]].<br />
<br />
== Installation ==<br />
<br />
Ensure you do not have a manually downloaded copy of Adminer installed!<br />
<br />
<br />
[[Install]] {{AUR|adminer}}.<br />
<br />
Adminer will be installed as {{ic|/usr/share/webapps/adminer/index.php}}.<br />
<br />
Don't forget to enable {{ic|mysqli.so}} in your {{ic|/etc/php/php.ini}} by uncommenting following line:<br />
extension=mysqli.so<br />
<br />
{{Warning|As of PHP 5.5, {{ic|mysql.so}} is [http://www.php.net/manual/de/migration55.deprecated.php deprecated] and will fill up your log files with error messages. It is no longer available in PHP 7.0.}}<br />
<br />
== Configuration under Apache ==<br />
<br />
Add the following line to {{ic| /etc/httpd/conf/httpd.conf}}:<br />
<br />
Include conf/extra/httpd-adminer.conf<br />
<br />
Then [[restart]] your [[apache]] daemon. <br />
# systemctl restart httpd<br />
<br />
{{Note|The Adminer can be accessed by your browser on [http://localhost/adminer http://localhost/adminer].}}<br />
<br />
In case there is an (403) error, comment the {{ic|php_admin_value}} line inside {{ic|/etc/httpd/conf/extra/httpd-adminer.conf}}.<br />
<br />
== Configuration under Nginx ==<br />
<br />
Ensure that the [[nginx#PHP configuration|php FastCGI interface]] is configured correct.<br />
<br />
Then ad the folwing {{ic|server}} block to your {{ic|/etc/nginx/nginx.conf}} or place it in a file under {{ic|/etc/nginx/servers-available/}} and [[nginx#Managing server entries|enable]] it.<br />
<br />
Afterwards restart the server with {{ic|systemctl restart nginx.service}}.<br />
<br />
{{hc|/etc/nginx/nginx.conf|<nowiki><br />
server {<br />
listen 80;<br />
server_name db.domainname.dom;<br />
root /usr/share/webapps/adminer;<br />
<br />
# If you want to use a .htpass file, uncomment the three following lines.<br />
#auth_basic "Admin-Area! Password needed!";<br />
#auth_basic_user_file /usr/share/webapps/adminer/.htpass;<br />
#access_log /var/log/nginx/adminer-access.log;<br />
<br />
error_log /var/log/nginx/adminer-error.log;<br />
location / {<br />
index index.php;<br />
try_files $uri $uri/ /index.php?$args;<br />
}<br />
<br />
location ~ .php$ {<br />
include fastcgi.conf;<br />
#fastcgi_pass localhost:9000;<br />
fastcgi_pass unix:/run/php-fpm/php-fpm.sock;<br />
fastcgi_index index.php;<br />
fastcgi_param SCRIPT_FILENAME /usr/share/webapps/adminer$fastcgi_script_name;<br />
}<br />
}<br />
<br />
</nowiki>}}<br />
<br />
== See also ==<br />
<br />
* [http://www.adminer.org/en/ Official Adminer webpage]<br />
* [http://php.vrana.cz/ Author's weblog]</div>Beta990https://wiki.archlinux.org/index.php?title=List_of_applications/Security&diff=411959List of applications/Security2015-12-13T17:10:20Z<p>Beta990: /* Password managers */ Added keepassx2</p>
<hr />
<div><noinclude><br />
[[Category:Applications]]<br />
[[es:List of applications/Security]]<br />
[[it:List of applications/Security]]<br />
[[ja:アプリケーション一覧/セキュリティ]]<br />
[[ru:List of applications/Security]]<br />
[[zh-cn:List of applications/Security]]<br />
[[zh-tw:List of applications/Security]]<br />
{{List of applications navigation}}<br />
</noinclude><br />
== Security ==<br />
<br />
For detailed guides, see the main ArchWiki page, [[Security]].<br />
<br />
==== Firewalls ====<br />
<br />
See the main article: [[Firewalls]].<br />
<br />
See also [[Wikipedia:Comparison of firewalls]].<br />
<br />
==== Network security ====<br />
<br />
* {{App|[[Wikipedia:Arpwatch|Arpwatch]]|Tool that monitors ethernet activity and keeps a database of Ethernet/IP address pairings.|http://ee.lbl.gov/|{{Pkg|arpwatch}}}}<br />
* {{App|Bro|Powerful network analysis framework that is much different from the typical IDS you may know.|https://www.bro.org/}}<br />
* {{App|EtherApe|Graphical network monitor for Unix modeled after etherman. Featuring link layer, IP and TCP modes, it displays network activity graphically. Hosts and links change in size with traffic. Color coded protocols display.|http://etherape.sourceforge.net/|{{Pkg|etherape}}}}<br />
* {{App|[[Honeyd]]|Tool that allows the user to set up and run multiple virtual hosts on a computer network.|http://www.honeyd.org/|{{AUR|honeyd}}}}<br />
* {{App|IPTraf|Console-based network monitoring utility.|https://fedorahosted.org/iptraf-ng/|{{Pkg|iptraf-ng}}}}<br />
* {{App|Kismet|802.11 layer2 wireless network detector, sniffer, and intrusion detection system.|http://www.kismetwireless.net/|{{Pkg|kismet}}}}<br />
* {{App|Nemesis|Command-line network packet crafting and injection utility.|http://nemesis.sourceforge.net/|{{Pkg|nemesis}}}}<br />
* {{App|[[Nmap]]|Security scanner used to discover hosts and services on a computer network, thus creating a "map" of the network.|http://nmap.org/|{{Pkg|nmap}}}}<br />
* {{App|[[Ntop]]|Network probe that shows network usage in a way similar to what top does for processes.|http://www.ntop.org/|{{Pkg|ntop}}}}<br />
* {{App|[[Snort]]|Network intrusion prevention and detection system.|http://www.snort.org/|{{AUR|snort}}}}<br />
* {{App|[[Sshguard]]|Daemon that protects SSH and other services against brute-force attacts, similar to Fail2ban.|http://www.sshguard.net/|{{Pkg|sshguard}}}}<br />
* {{App|[[Suricata]]|High performance Network IDS, IPS and Network Security Monitoring engine.|http://suricata-ids.org/|{{AUR|suricata}}}}<br />
* {{App|[[Wikipedia:tcpdump|Tcpdump]]|Common console-based packet analyzer that allows the user to intercept and display TCP/IP and other packets being transmitted or received over a network.|http://www.tcpdump.org/|{{Pkg|tcpdump}}}}<br />
* {{App|[[vnStat]]|Console-based network traffic monitor that keeps a log of network traffic for the selected interfaces.|http://humdi.net/vnstat/|{{Pkg|vnstat}}}}<br />
* {{App|[[Wireshark]]|Network protocol analyzer that lets you capture and interactively browse the traffic running on a computer network.|http://www.wireshark.org/|{{Pkg|wireshark-cli}} {{Pkg|wireshark-gtk}}}}<br />
<br />
==== Threat and vulnerability detection ====<br />
<br />
* {{App|AFICK|Security tool that allows to monitor the changes on your files systems, and so can detect intrusions.|http://afick.sourceforge.net/|{{AUR|afick}}}}<br />
* {{App|Lynis|Security and system auditing tool to harden Unix/Linux systems.|https://cisofy.com/lynis/|{{Pkg|lynis}}}}<br />
* {{App|[[Metasploit Framework]]|An advanced open-source platform for developing, testing, and using exploit code.|http://www.metasploit.com/|{{AUR|metasploit}}}}<br />
* {{App|[[Nessus]]|Comprehensive vulnerability scanning program.|http://www.nessus.org/products/nessus|{{AUR|nessus}}}}<br />
* {{App|[[OpenVAS]]|Framework of several services and tools offering a comprehensive and powerful vulnerability scanning and vulnerability management solution. FOSS Nessus fork.|http://www.openvas.org/|{{Grp|openvas}}}}<br />
* {{App|Osiris|Tool for monitoring system integrity and changes across a network.|https://launchpad.net/osiris|{{Pkg|osiris}}}}<br />
* {{App|OSSEC|Open Source Host-based Intrusion Detection System that performs log analysis, file integrity checking, policy monitoring, rootkit detection, real-time alerting and active response.|http://www.ossec.net/|{{AUR|ossec-agent}} {{AUR|ossec-local}} {{AUR|ossec-server}}}}<br />
* {{App|Samhain|Host-based intrusion detection system (HIDS) provides file integrity checking and log file monitoring/analysis, as well as rootkit detection, port monitoring, detection of rogue SUID executables, and hidden processes. |http://www.la-samhna.de/samhain/index.html}}<br />
* {{App|Tiger|Security tool that can be use both as a security audit and intrusion detection system.|http://www.nongnu.org/tiger/|{{AUR|tiger}}}}<br />
* {{App|[[Wikipedia:Open Source Tripwire|Tripwire]]|Intrusion detection system.|http://tripwire.sourceforge.net/|{{AUR|tripwire}}{{Broken package link|{{aur-mirror|tripwire}}}}}}<br />
<br />
==== File security ====<br />
<br />
* {{App|[[AIDE]]|File and directory integrity checker.|http://aide.sourceforge.net/|{{Pkg|aide}}}}<br />
* {{App|Logcheck|Simple utility which is designed to allow a system administrator to view the logfiles which are produced upon hosts under their control.|https://logcheck.alioth.debian.org/}}<br />
* {{App|[[Logwatch]]|Customizable log analysis system.|http://sourceforge.net/projects/logwatch/|{{Pkg|logwatch}}}}<br />
* {{App|OpenDLP|OpenDLP is a free and open source, agent- and agentless-based, centrally-managed, massively distributable data loss prevention tool.|https://code.google.com/p/opendlp/}}<br />
* {{App|Swatch|Utility that can monitor just about any type of log.|http://swatch.sourceforge.net/|{{AUR|swatch}}{{Broken package link|{{aur-mirror|swatch}}}}}}<br />
<br />
==== Anti malware ====<br />
<br />
* {{App|chkrootkit|Locally checks for signs of a rootkit.|http://www.chkrootkit.org/|{{AUR|chkrootkit}}}}<br />
* {{App|[[ClamAV]]|Open source antivirus engine for detecting trojans, viruses, malware & other malicious threats.|http://www.clamav.net/|{{Pkg|clamav}}}}<br />
* {{App|Linux Malware Detect|Malware scanner designed around the threats faced in shared hosted environments.|https://www.rfxn.com/projects/linux-malware-detect/|{{AUR|maldet}}}}<br />
* {{App|Rootkit Hunter|Checks machines for the presence of rootkits and other unwanted tools.|http://rkhunter.sourceforge.net/|{{Pkg|rkhunter}}}}<br />
<br />
==== Backup programs ====<br />
<br />
See the main article: [[Backup programs]].<br />
<br />
See also [[Wikipedia:Comparison of backup software]].<br />
<br />
==== Screen lockers ====<br />
{{Warning|Only ''sflock'', ''physlock'', ''Cinnamon Screensaver'', ''MATE Screensaver'' and ''GNOME Screensaver'' are able to block tty access.}}<br />
<br />
* {{App|Cinnamon Screensaver|Screen locker for the Cinnamon desktop.|https://github.com/linuxmint/cinnamon-screensaver|{{Pkg|cinnamon-screensaver}}}}<br />
* {{App|GNOME Screensaver|Screen locker for the GNOME Flashback desktop.|https://wiki.gnome.org/Projects/GnomeScreensaver|{{Pkg|gnome-screensaver}}}}<br />
* {{App|i3lock|A simple screen locker. Provides user feedback, uses PAM authentication, supports DPMS. The background can be set to an image or solid color.|http://i3wm.org/i3lock/|{{Pkg|i3lock}}}}<br />
* {{App|i3lock-blur|Fork of ''i3lock'' which can use your desktop with the blur effect applied as a background.|http://github.com/karulont/i3lock-blur|{{Aur|i3lock-blur}}}}<br />
* {{App|i3lock-wrapper|A simple wrapper around ''i3lock'' which sets up a blurred screenshot of the desktop as a background image.|https://github.com/ashinkarov/i3-extras|{{Aur|i3lock-wrapper}}}}<br />
* {{App|Light-locker|A simple locker (forked from ''gnome-screensaver'') that aims to have simple, sane, secure defaults and be well integrated with the desktop while not carrying any desktop-specific dependencies. It relies on [[LightDM]] for locking and unlocking your session via ConsoleKit/UPower or ''logind/systemd''|https://github.com/the-cavalry/light-locker|{{Pkg|light-locker}}}}<br />
* {{App|MATE Screensaver|Screensaver and locker for MATE Desktop Environment.|https://github.com/mate-desktop/mate-screensaver|{{Pkg|mate-screensaver}}}}<br />
* {{App|physlock|Screen and console locker.|https://github.com/muennich/physlock|{{AUR|physlock}}}}<br />
* {{App|sflock|Simple screen locker utility for X, based on slock. Provides a very basic user feedback.|https://github.com/benruijl/sflock|{{AUR|sflock-git}}}}<br />
* {{App|slock|Very simple and lightweight X screen locker. Offers only a black background when locked, there are no animations or text fields.|http://tools.suckless.org/slock|{{Pkg|slock}}}}<br />
* {{App|sxlock|Fork of sflock with a few enhancements. Provides basic user feedback, uses PAM authentication, supports DPMS and RandR. Supports {{ic|sxlock.service}} to lock the screen on suspend/hibernation. See the [https://github.com/lahwaacz/sxlock/blob/master/README.md README] for more information.|https://github.com/lahwaacz/sxlock|{{AUR|sxlock-git}}}}<br />
* {{App|vlock|TTY locker. A mirror of the [https://lists.archlinux.org/pipermail/aur-general/2013-July/024662.html original vlock] is available at [https://github.com/WorMzy/vlock github].|http://www.kbd-project.org|{{Pkg|kbd}}}}<br />
* {{App|xlockmore|Simple X11 screen lock with PAM support.|http://www.tux.org/~bagleyd/xlockmore.html|{{Pkg|xlockmore}}}}<br />
* {{App|[[XScreenSaver]]|Screen saver and locker for the X Window System.|http://www.jwz.org/xscreensaver/|{{Pkg|xscreensaver}}}}<br />
* {{App|XSecureLock|X11 screen lock utility designed with the primary goal of security.|https://github.com/google/xsecurelock|{{AUR|xsecurelock-git}}}}<br />
<br />
==== Hash checkers ====<br />
<br />
* {{app|cfv|Tiny utility to both test and create checksum files, support {{ic|.sfv}}, {{ic|.csv}}, {{ic|.crc}}, {{ic|.md5}}, {{ic|md5sum}}, {{ic|sha1sum}}, {{ic|.torrent}}, {{ic|par}}, and {{ic|.par2}} files.| http://cfv.sourceforge.net/|{{pkg|cfv}}}}<br />
* {{App|GtkHash|A GTK+ utility for computing message digests or checksums|http://gtkhash.sourceforge.net/|{{AUR|gtkhash}}}}<br />
* {{App|hashdeep|A cross-platform tools to computer hashes, or message digests, for any number of files|http://md5deep.sourceforge.net/|{{AUR|md5deep}}{{Broken package link|{{aur-mirror|md5deep}}}}}}<br />
* {{App|Parano|A GNOME frontend for creating/editing/checking MD5 and SFV files|http://parano.berlios.de/|{{AUR|parano}}}}<br />
* {{App|Quick Hash GUI|A GUI to enable the rapid selection and subsequent hashing of files (individually or recursively throughout a folder structure) text and (on Linux) disks.|http://sourceforge.net/projects/quickhash/}}<br />
* {{App|RHash|Utility for verifying hash sums (SFV, CRC, etc). Supports lots of algorithms.|http://rhash.anz.ru/|{{Pkg|rhash}}}}<br />
* {{App|MassHash|A set of file hashing tools (both CLI and GTK+ GUI) written in Python. Supported algorithms include MD5, SHA-1, SHA-224, SHA-256, SHA-384, SHA-512.|http://jdleicher.github.io/MassHash/|{{AUR|masshash}}}}<br />
<br />
==== Encryption, signing, steganography ====<br />
<br />
* {{app|ccrypt|A command-line utility for encrypting and decrypting files and streams.|http://ccrypt.sourceforge.net/|{{pkg|ccrypt}}}}<br />
* {{app|[[GnuPG]]|The GNU project's complete and free implementation of the OpenPGP standard as defined by RFC4880. Free and Open Source replacement of PGP, mostly used for digital signing of packages.|http://gnupg.org/|{{pkg|gnupg}}}}<br />
* {{app|gzsteg|A utiltiy that can hide data in gzip compressed files|http://www.nic.funet.fi/pub/crypt/steganography/|{{AUR?|gzsteg}}}}<br />
* {{app|silenteye|A steganography application written in C++, use Qt4 library.|http://www.silenteye.org/|{{AUR?|silenteye}}}}<br />
* {{app|snow|Steganography program for concealing messages in text files|http://www.darkside.com.au/snow/|{{aur|snow}}{{Broken package link|{{aur-mirror|snow}}}}}}<br />
* {{app|steghide|A steganography utility that is able to hide data in various kinds of image and audio files.|http://steghide.sourceforge.net|{{pkg|steghide}}}}<br />
* {{app|stegparty|A steganography utility hides text by typoing text existing text files.|https://github.com/countrygeek/stegparty|{{AUR|stegparty}}{{Broken package link|{{aur-mirror|stegparty}}}}}}<br />
<br />
==== Password managers ====<br />
<br />
* {{App|Console Password Manager|Curses based password manager using PGP-encryption.|http://github.com/comotion/cpm|{{AUR|cpm}}{{Broken package link|{{aur-mirror|cpm}}}}}}<br />
* {{App|Figaro's Password Manager 2|GTK2 port of [http://fpm.sourceforge.net/ Figaro's Password Manager] with some new enhancements.|http://als.regnet.cz/fpm2/|{{AUR|fpm2}}}}<br />
* {{App|GPass|Password manegement software for GNOME2 desktop.|http://projects.netlab.jp/gpass/|{{AUR|gpass}}}}<br />
* {{App|GPassword Manager|Simple, lightweight and cross-platform utility for managing and accessing passwords.|http://sourceforge.net/projects/gpasswordman/|{{AUR|gpasswordman}}{{Broken package link|{{aur-mirror|gpasswordman}}}}}}<br />
* {{App|Gtkpass|Gtkpass is a GTK and Libkpass-based password manager for KeePass 1.x databases.|https://sourceforge.net/projects/gtkpass/|{{AUR|gtkpass}}{{Broken package link|{{aur-mirror|gtkpass}}}}}}<br />
* {{App|Ked Password Manager|A password manager that helps to manage large numbers of passwords.|http://kedpm.sourceforge.net|{{AUR|kedpm}}}}<br />
* {{App|[[KeePass|KeePass Password Safe]]|Free open source Mono-based password manager, which helps you to manage your passwords in a secure way.|http://keepass.info/|{{Pkg|keepass}}}}<br />
* {{App|KeePassC|KeePassC is a curses-based password manager compatible to KeePass v.1.x and KeePassX.|https://raymontag.github.com/keepassc|{{AUR|keepassc}}}}<br />
* {{App|KeePassX|Free and open source Qt-based password manager. Compatible with KeePass v.1.x and KeePass v.2.x.|http://www.keepassx.org/|{{Pkg|keepassx}} {{Pkg|keepassx2}}}} <br />
* {{App|MyPasswords|What you need for managing your passwords, including the passwords of your online accounts, bank accounts and ... with the corresponding URLs.|http://sourceforge.net/projects/mypasswords7/}}<br />
* {{App|MyPasswordSafe|Easy-to-use QT based password manager, compatible with Password Safe files (and therefore pwsafe).|http://www.semanticgap.com/myps/|{{AUR|mypasswordsafe}}{{Broken package link|{{aur-mirror|mypasswordsafe}}}}}}<br />
* {{App|Pasaffe|Easy to use password manager for Gnome with a Password Safe 3.0 compatible database.|https://launchpad.net/pasaffe|{{AUR|pasaffe}}{{Broken package link|{{aur-mirror|pasaffe}}}}}}<br />
* {{App|[[pass]]|Simple console based password manager|http://www.passwordstore.org/|{{Pkg|pass}}}}<br />
* {{App|Password Gorilla|A cross-platform password manager.|https://github.com/zdia/gorilla/wiki/|{{AUR|password-gorilla}} {{AUR|gorilla}}{{Broken package link|{{aur-mirror|gorilla}}}}}}<br />
* {{App|Password Safe|Simple and secure password manager.|http://passwordsafe.sourceforge.net/|{{AUR|passwordsafe}}}}<br />
* {{App|pwsafe|Unix commandline program that manages encrypted password databases.|http://nsd.dyndns.org/pwsafe/|{{Pkg|pwsafe}}}}<br />
* {{App|QPass|Easy to use password manager with built-in password generator.|http://qpass.sourceforge.net|{{AUR|qpass}}{{Broken package link|{{aur-mirror|qpass}}}}}}<br />
* {{App|Revelation|Password manager for the GNOME desktop.|http://revelation.olasagasti.info/|{{AUR|revelation}}}}<br />
* {{App|Seahorse|GNOME application for managing encryption keys and passwords in the GnomeKeyring.|https://wiki.gnome.org/Apps/Seahorse|{{Pkg|seahorse}}}}<br />
* {{App|Universal Password Manager|Allows you to store usernames, passwords, URLs and generic notes in an encrypted database protected by one master password.|http://upm.sourceforge.net/|{{AUR|upm}}{{Broken package link|{{aur-mirror|upm}}}}}}</div>Beta990https://wiki.archlinux.org/index.php?title=NetworkManager&diff=411958NetworkManager2015-12-13T16:57:52Z<p>Beta990: /* Plasma 4 */ KDE4 is removed from repo ś</p>
<hr />
<div>[[Category:Network configuration]]<br />
[[cs:NetworkManager]]<br />
[[de:Networkmanager]]<br />
[[es:NetworkManager]]<br />
[[fr:NetworkManager]]<br />
[[it:NetworkManager]]<br />
[[ja:NetworkManager]]<br />
[[pt:NetworkManager]]<br />
[[ru:NetworkManager]]<br />
[[tr:NetworkManager]]<br />
[[zh-CN:NetworkManager]]<br />
{{Related articles start}}<br />
{{Related|Network configuration}}<br />
{{Related|Wireless network configuration}}<br />
{{Related|:Category:Network managers}}<br />
{{Related articles end}}<br />
[http://projects.gnome.org/NetworkManager/ NetworkManager] is a program for providing detection and configuration for systems to automatically connect to network. NetworkManager's functionality can be useful for both wireless and wired networks. For wireless networks, NetworkManager prefers known wireless networks and has the ability to switch to the most reliable network. NetworkManager-aware applications can switch from online and offline mode. NetworkManager also prefers wired connections over wireless ones, has support for modem connections and certain types of VPN. NetworkManager was originally developed by Red Hat and now is hosted by the [[GNOME]] project.<br />
<br />
{{Warning|By default, Wi-Fi passwords are stored in clear text. See section [[#Encrypted Wi-Fi passwords]]}}<br />
<br />
== Installation ==<br />
<br />
NetworkManager can be [[install]]ed with the package {{Pkg|networkmanager}}. The package does not include the tray applet ''nm-applet'' which is part of the [https://www.archlinux.org/packages/extra/i686/network-manager-applet/ network-manager-applet]. Since version 1.0 it gained internal functionality for basic DHCP support. For full featured DHCP and if you require IPv6 support, {{Pkg|dhclient}} integrates it. <br />
<br />
{{Note|You must ensure that no other service that wants to configure the network is running; in fact, multiple networking services will conflict. You can find a list of the currently running services with {{ic|1=systemctl --type=service}} and then [[stop]] them. See [[#Configuration]] to enable the NetworkManager service.}}<br />
<br />
=== VPN support ===<br />
<br />
NetworkManager VPN support is based on a plug-in system. If you need VPN support via NetworkManager, you have to install one of the following packages:<br />
<br />
* {{Pkg|networkmanager-openconnect}}<br />
* {{Pkg|networkmanager-openvpn}}<br />
* {{Pkg|networkmanager-pptp}}<br />
* {{Pkg|networkmanager-vpnc}}<br />
* {{AUR|networkmanager-l2tp}}<br />
<br />
=== PPPoE / DSL support ===<br />
<br />
[[Install]] {{pkg|rp-pppoe}} for PPPoE / DSL connection support.<br />
<br />
== Graphical front-ends ==<br />
<br />
To configure and have easy access to NetworkManager, most users will want to install an applet. This GUI front-end usually resides in the system tray (or notification area) and allows network selection and configuration of NetworkManager. Various applets exist for different types of desktops.<br />
<br />
=== GNOME ===<br />
<br />
[[GNOME]]'s {{Pkg|network-manager-applet}} works in all environments.<br />
<br />
To store authentication details for connections (Wireless/DSL) install and configure [[GNOME Keyring]].<br />
<br />
Be aware that after enabling the tick-box option {{ic|Make available to other users}} for a connection, NetworkManager stores the password in plain-text, though the respective file is accessible only to root (or other users via {{ic|nm-applet}}). See [[#Encrypted Wi-Fi passwords]].<br />
<br />
=== KDE ===<br />
<br />
==== Plasma 5 ====<br />
<br />
[[pacman|Install]] the {{Pkg|plasma-nm}} applet.<br />
<br />
=== Xfce ===<br />
<br />
While {{Pkg|network-manager-applet}} works in [[Xfce]], but in order to see notifications, including error messages, {{ic|nm-applet}} needs an implementation of the Freedesktop desktop notifications specification (see the [http://www.galago-project.org/specs/notification/0.9/index.html Galapago Project]) to display them. To enable notifications install {{Pkg|xfce4-notifyd}}, a package that provides an implementation for the specification.<br />
<br />
Without such a notification daemon, {{ic|nm-applet}} outputs the following errors to stdout/stderr:<br />
<br />
(nm-applet:24209): libnotify-WARNING **: Failed to connect to proxy<br />
** (nm-applet:24209): WARNING **: get_all_cb: couldn't retrieve<br />
system settings properties: (25) Launch helper exited with unknown<br />
return code 1.<br />
** (nm-applet:24209): WARNING **: fetch_connections_done: error<br />
fetching connections: (25) Launch helper exited with unknown return<br />
code 1.<br />
** (nm-applet:24209): WARNING **: Failed to register as an agent:<br />
(25) Launch helper exited with unknown return code 1<br />
<br />
{{ic|nm-applet}} will still work fine, though, but without notifications.<br />
<br />
If {{ic|nm-applet}} is not prompting for a password when connecting to new wifi networks, and is just disconnecting immediately, you may need to install {{Pkg|gnome-keyring}}. <br />
<br />
Should the applet not appear, install the {{AUR|xfce4-indicator-plugin}} package. [http://askubuntu.com/questions/449658/networkmanager-tray-nm-applet-is-gone-after-upgrade-to-14-04-trusty]<br />
<br />
=== Openbox ===<br />
<br />
To work properly in [[Openbox]], the GNOME applet requires the {{Pkg|xfce4-notifyd}} notification daemon for the same reason as in XFCE and the {{Pkg|gnome-icon-theme}} package to be able to display the applet in the systray.<br />
<br />
If you want to store authentication details (Wireless/DSL) install and configure [[gnome-keyring]].<br />
<br />
{{ic|nm-applet}} installs the autostart file at {{ic|/etc/xdg/autostart/nm-applet.desktop}}. If you have issues with it (e.g. {{ic|nm-applet}} is started twice or is not started at all), see [[Openbox#autostart]] or [https://bbs.archlinux.org/viewtopic.php?pid=993738] for solution.<br />
<br />
=== Other desktops and window managers ===<br />
<br />
In all other scenarios it is recommended to use the GNOME applet. You will also need to be sure that the {{Pkg|gnome-icon-theme}} package is installed to be able to display the applet.<br />
<br />
To store connection secrets install and configure [[GNOME Keyring]].<br />
<br />
In order to run {{ic|nm-applet}} without a systray, you can use {{Pkg|trayer}} or {{Pkg|stalonetray}}. For example, you can add a script like this one in your path:<br />
<br />
{{hc|nmgui|<nowiki><br />
#!/bin/sh<br />
nm-applet 2>&1 /dev/null &<br />
stalonetray 2>&1 /dev/null<br />
killall nm-applet<br />
</nowiki>}}<br />
<br />
When you close the ''stalonetray'' window, it closes {{ic|nm-applet}} too, so no extra memory is used once you are done with network settings.<br />
<br />
=== Command line ===<br />
<br />
{{Style|Why is this a subsection of [[#Graphical front-ends]]?}}<br />
<br />
The following applications can be useful for configuring and managing networks without X.<br />
<br />
==== nmcli ====<br />
<br />
A command line frontend, ''nmcli'', is included with {{Pkg|networkmanager}}.<br />
<br />
For usage information, see {{ic|man nmcli}}. Examples:<br />
<br />
* To connect to a wifi network: {{bc|nmcli dev wifi connect <name> password <password>}}<br />
* To connect to a wifi on the {{ic|wlan1}} wifi interface: {{bc|nmcli dev wifi connect <name> password <password> iface wlan1 [profile name]}}<br />
* To disconnect an interface: {{bc|nmcli dev disconnect iface eth0}}<br />
* To reconnect an interface marked as disconnected: {{bc|nmcli con up uuid <uuid>}}<br />
* To get a list of UUIDs: {{bc|nmcli con show}}<br />
* To see a list of network devices and their state: {{bc|nmcli dev}}<br />
* To turn off wifi: {{bc|nmcli r wifi off}}<br />
<br />
==== nmtui ====<br />
<br />
A curses based graphical frontend, ''nmtui'', is included with {{Pkg|networkmanager}}.<br />
<br />
For usage information, see {{ic|man nmtui}}.<br />
<br />
==== nmcli-dmenu ====<br />
<br />
Alternatively there is {{AUR|networkmanager-dmenu-git}} which is a small script to manage NetworkManager connections with ''dmenu'' instead of {{ic|nm-applet}}. It provides all essential features such as connect to existing NetworkManager wifi or wired connections, connect to new wifi connections, requests passphrase if required, connect to existing VPN connections, enable/disable networking, launch ''nm-connection-editor'' GUI.<br />
<br />
== Configuration ==<br />
<br />
NetworkManager will require some additional steps to be able run properly. Make sure you have configured {{ic|/etc/hosts}} as described in [[Network configuration#Set the hostname]] section.<br />
<br />
=== Enable NetworkManager ===<br />
<br />
NetworkManager is [[systemd#Using units|controlled]] via {{ic|NetworkManager.service}}. Once the NetworkManager daemon is started, it will automatically connect to any available "system connections" that have already been configured. Any "user connections" or unconfigured connections will need ''nmcli'' or an applet to configure and connect.<br />
<br />
NetworkManager has a global configuration file at {{ic|/etc/NetworkManager/NetworkManager.conf}}. Usually no configuration needs to be done to the global defaults. <br />
<br />
{{Note|1=NetworkManager will print meaningless warnings ({{Bug|34971}}) to your system log, when [[#Network services with NetworkManager dispatcher|NetworkManager-dispatcher.service]] and [https://www.archlinux.org/packages/?name=modemmanager ModemManager.service] are not enabled. You may enable both to suppress the messages.}}<br />
<br />
=== Enable NetworkManager Wait Online ===<br />
<br />
If you have services which fail if they are started before the network is up, you may use {{ic|NetworkManager-wait-online.service}} in addition to {{ic|NetworkManager.service}}. This is, however, rarely necessary because most networked daemons start up okay, even if the network has not been configured yet.<br />
<br />
In some cases, the service will still fail to start successfully on boot due to the timeout setting in {{ic|/usr/lib/systemd/system/NetworkManager-wait-online.service}} being too short. Change the default timeout from 30 to a higher value.<br />
<br />
=== Set up PolicyKit permissions ===<br />
<br />
See [[General troubleshooting#Session permissions]] for setting up a working session.<br />
<br />
With a working session, you have several options for granting the necessary privileges to NetworkManager:<br />
<br />
* ''Option 1.'' Run a [[Polkit]] authentication agent when you log in, such as {{ic|/usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1}} (part of {{Pkg|polkit-gnome}}). You will be prompted for your password whenever you add or remove a network connection.<br />
* ''Option 2.'' [[Users and groups#Group management|Add]] yourself to the {{ic|wheel}} group. You will not have to enter your password, but your user account may be granted other permissions as well, such as the ability to use [[sudo]] without entering the root password.<br />
* ''Option 3.'' [[Users and groups#Group management|Add]] yourself to the {{ic|network}} group and create the following file:<br />
<br />
{{hc|/etc/polkit-1/rules.d/50-org.freedesktop.NetworkManager.rules|<nowiki><br />
polkit.addRule(function(action, subject) {<br />
if (action.id.indexOf("org.freedesktop.NetworkManager.") == 0 && subject.isInGroup("network")) {<br />
return polkit.Result.YES;<br />
}<br />
});<br />
</nowiki>}}<br />
<br />
: All users in the {{ic|network}} group will be able to add and remove networks without a password. This will not work under [[systemd]] if you do not have an active session with ''systemd-logind''.<br />
<br />
=== Network services with NetworkManager dispatcher ===<br />
<br />
There are quite a few network services that you will not want running until NetworkManager brings up an interface. Good examples are [[NTPd]] and network filesystem mounts of various types (e.g. '''netfs'''). NetworkManager has the ability to start these services when you connect to a network and stop them when you disconnect. To activate the feature you need to [[start]] the {{ic|NetworkManager-dispatcher.service}}.<br />
<br />
Once the feature is active, scripts can be added to the {{ic|/etc/NetworkManager/dispatcher.d}} directory. These scripts must be '''owned by root''', otherwise the dispatcher will not execute them. For added security, set group ownership to root as well:<br />
<br />
# chown root:root ''scriptname''<br />
<br />
Also, the script must have '''write permission for owner only''', otherwise the dispatcher will not execute them:<br />
<br />
# chmod 755 ''scriptname''<br />
<br />
The scripts will be run in alphabetical order at connection time, and in reverse alphabetical order at disconnect time. They receive two arguments: the name of the interface (e.g. {{ic|eth0}}) and the status (''up'' or ''down'' for interfaces and ''vpn-up'' or ''vpn-down'' for vpn connections). To ensure what order they come up in, it is common to use numerical characters prior to the name of the script (e.g. {{ic|10_portmap}} or {{ic|30_netfs}} (which ensures that the ''portmapper'' is up before NFS mounts are attempted).<br />
<br />
{{Warning|If you connect to foreign or public networks, be aware of what services you are starting and what servers you expect to be available for them to connect to. You could make a security hole by starting the wrong services while connected to a public network}}<br />
<br />
==== Avoiding the dispatcher timeout ====<br />
<br />
If the above is working, then this section is not relevant. However, there is a general problem related to running dispatcher scripts which take longer to be executed. Initially an internal timeout of three seconds only was used. If the called script did not complete in time, it was killed. Later the timeout was extended to about 20 seconds (see the [https://bugzilla.redhat.com/show_bug.cgi?id=982734 Bugtracker] for more information). If the timeout still creates the problem, a work around may be to modify the dispatcher service file {{ic|/usr/lib/systemd/system/NetworkManager-dispatcher.service}} to remain active after exit: <br />
<br />
{{hc|/etc/systemd/system/NetworkManager-dispatcher.service|2=<br />
.include /usr/lib/systemd/system/NetworkManager-dispatcher.service<br />
[Service]<br />
RemainAfterExit=yes}}<br />
<br />
Now start and enable the modified {{ic|NetworkManager-dispatcher}} service.<br />
<br />
{{Warning|Adding the {{ic|RemainAfterExit}} line to it will prevent the dispatcher from closing. Unfortunately, the dispatcher '''has''' to close before it can run your scripts again. With it the dispatcher will not time out but it also will not close, which means that the scripts will only run once per boot. Therefore, do not add the line unless the timeout is definitely causing a problem.}}<br />
<br />
==== Start OpenNTPD ====<br />
<br />
Install the {{Pkg|networkmanager-dispatcher-openntpd}} package.<br />
<br />
==== Mount remote folder with sshfs ====<br />
<br />
As the script is run in a very restrictive environment, you have to export {{ic|SSH_AUTH_SOCK}} in order to connect to your SSH agent. There are different ways to accomplish this, see [https://bbs.archlinux.org/viewtopic.php?pid=1042030#p1042030 this message] for more information. The example below works with [[GNOME Keyring]], and will ask you for the password if not unlocked already. In case NetworkManager connects automatically on login, it is likely ''gnome-keyring'' has not yet started and the export will fail (hence the sleep). The {{ic|UUID}} to match can be found with the command {{ic|nmcli con status}} or {{ic|nmcli con list}}. <br />
<br />
{{bc|<nowiki><br />
#!/bin/sh<br />
USER='username'<br />
REMOTE='user@host:/remote/path'<br />
LOCAL='/local/path'<br />
<br />
interface=$1 status=$2<br />
if [ "$CONNECTION_UUID" = "</nowiki>''uuid''<nowiki>" ]; then<br />
case $status in<br />
up)<br />
export SSH_AUTH_SOCK=$(find /tmp -maxdepth 1 -type s -user "$USER" -name 'ssh')<br />
su "$USER" -c "sshfs $REMOTE $LOCAL"<br />
;;<br />
down)<br />
fusermount -u "$LOCAL"<br />
;;<br />
esac<br />
fi<br />
</nowiki>}}<br />
<br />
==== Use dispatcher to connect to a VPN after a network connection is established ====<br />
<br />
In this example we want to connect automatically to a previously defined VPN connection after connecting to a specific Wi-Fi network. First thing to do is to create the dispatcher script that defines what to do after we are connected to the network.<br />
<br />
:1. Create the dispatcher script:<br />
<br />
{{hc|/etc/NetworkManager/dispatcher.d/vpn-up|<nowiki><br />
#!/bin/sh<br />
VPN_NAME="name of VPN connection defined in NetworkManager"<br />
ESSID="Wi-Fi network ESSID (not connection name)"<br />
<br />
interface=$1 status=$2<br />
case $status in<br />
up|vpn-down)<br />
if iwgetid | grep -qs ":\"$ESSID\""; then<br />
nmcli con up id "$VPN_NAME"<br />
fi<br />
;;<br />
down)<br />
if iwgetid | grep -qs ":\"$ESSID\""; then<br />
if nmcli con show --active | grep "$VPN_NAME"; then<br />
nmcli con down id "$VPN_NAME"<br />
fi<br />
fi<br />
;;<br />
esac<br />
</nowiki>}}<br />
<br />
If you would like to attempt to automatically connect to VPN for all Wi-Fi networks, you can use the following definition of the ESSID: {{ic|1=ESSID=$(iwgetid -r)}}. Remember to set the script's permissions [[#Network services with NetworkManager dispatcher|accordingly]]. <br />
<br />
If you require and tick the {{ic|nm-applet}} option to ''Make the VPN connection available to all users'', trying to connect may still fail and NetworkManager will complain about 'no valid VPN secrets', because of [http://developer.gnome.org/NetworkManager/0.9/secrets-flags.html the way VPN secrets are stored], which brings us to step 2:<br />
<br />
:2. Either edit the VPN connection configuration file to make NetworkManager store the secrets by itself rather than inside a keyring [https://bugzilla.redhat.com/show_bug.cgi?id=710552 that will be inaccessible for root]: open up {{ic|/etc/NetworkManager/system-connections/''name of your VPN connection''}} and change the {{ic|password-flags}} and {{ic|secret-flags}} from {{ic|1}} to {{ic|0}}.<br />
<br />
Alternatively put the password directly in the configuration file adding the section {{ic|vpn-secrets}}:<br />
<br />
[vpn]<br />
....<br />
password-flags=0<br />
<br />
[vpn-secrets]<br />
password=''your_password''<br />
<br />
{{Note|It may now be necessary to re-open the NetworkManager connection editor and save the VPN passwords/secrets again.}}<br />
<br />
==== Use dispatcher to handle mounting of CIFS shares ====<br />
<br />
Some CIFS shares are only available on certain networks or locations (e.g. at home). You can use the dispatcher to only mount CIFS shares that are present at your current location.<br />
<br />
The following script will check if we connected to a specific network and mount shares accordingly:<br />
{{hc|/etc/NetworkManager/dispatcher.d/mount_cifs|<nowiki><br />
#!/bin/bash<br />
if [ "$2" = "up" ]<br />
if [ "$CONNECTION_UUID" = "uuid" ]<br />
mount /your/mount/point & <br />
# add more shares as needed<br />
fi<br />
fi<br />
</nowiki>}}<br />
{{Note|You can get a list of uuids using [[#nmcli|nmcli]].}}<br />
<br />
The following script will unmount all CIFS before a disconnect from a specific network:<br />
{{hc|/etc/NetworkManager/dispatcher.d/pre-down.d/mount_cifs|<nowiki><br />
#!/bin/bash<br />
umount -a -l -t cifs<br />
</nowiki>}}<br />
{{Note|Make sure this script is located in the pre-down.d subdirectory as shown above, otherwise it will unmount all shares on any connection state change.}}<br />
{{Note|Ever since NetworkManager 0.9.8, the 'pre-down' and 'down' actions are not executed on shutdown or restart, so the above script will only work if you manually disconnect from the network. See [https://bugzilla.gnome.org/show_bug.cgi?id&#61;701242 this bug report] for more info.}}<br />
<br />
As before, do not forget to set the script permissions [[#Network services with NetworkManager dispatcher|accordingly]].<br />
<br />
See also [[NFS#NetworkManager dispatcher]] for another example script that parses {{ic|/etc/fstab}} mounts during dispatcher actions.<br />
<br />
=== Proxy settings ===<br />
<br />
NetworkManager does not directly handle proxy settings, but if you are using GNOME or KDE, you could use [http://marin.jb.free.fr/proxydriver/ proxydriver] wich handles proxy settings using NetworkManager's informations. proxydriver is found in the package {{AUR|proxydriver}}.<br />
<br />
In order for ''proxydriver'' to be able to change the proxy settings, you would need to execute this command, as part of the GNOME startup process (System -> Preferences -> Startup Applications):<br />
<br />
xhost +si:localuser:''your_username''<br />
<br />
See: [[Proxy settings]].<br />
<br />
=== Disable NetworkManager ===<br />
<br />
It might not be obvious, but the service automatically starts through ''dbus''. To completely disable it you can [[mask]] the services {{ic|NetworkManager}} and {{ic|NetworkManager-dispatcher}}.<br />
<br />
== Testing ==<br />
<br />
NetworkManager applets are designed to load upon login so no further configuration should be necessary for most users. If you have already disabled your previous network settings and disconnected from your network, you can now test if NetworkManager will work. The first step is to [[start]] {{ic|NetworkManager.service}}.<br />
<br />
Some applets will provide you with a {{ic|.desktop}} file so that the NetworkManager applet can be loaded through the application menu. If it does not, you are going to either have to discover the command to use or logout and login again to start the applet. Once the applet is started, it will likely begin polling network connections with for auto-configuration with a DHCP server.<br />
<br />
To start the GNOME applet in non-xdg-compliant window managers like [[awesome]]:<br />
<br />
nm-applet --sm-disable &<br />
<br />
For static IP addresses, you will have to configure NetworkManager to understand them. The process usually involves right-clicking the applet and selecting something like 'Edit Connections'.<br />
<br />
== Troubleshooting ==<br />
<br />
Some fixes to common problems.<br />
<br />
=== No prompt for password of secured Wi-Fi networks ===<br />
<br />
When trying to connect to a secured Wi-Fi network, no prompt for a password is shown and no connection is established. This happens when no keyring package is installed. An easy solution is to install {{Pkg|gnome-keyring}}. If you want the passwords to be stored in encrypted form, follow [[GNOME Keyring]] to set up the ''gnome-keyring-daemon''.<br />
<br />
=== No traffic via PPTP tunnel ===<br />
<br />
PPTP connection logins successfully; you see a ppp0 interface with the correct VPN IP address, but you cannot even ping the remote IP address. It is due to lack of MPPE (Microsoft Point-to-Point Encryption) support in stock Arch pppd. It is recommended to first try with the stock Arch {{Pkg|ppp}} as it may work as intended.<br />
<br />
To solve the problem it should be sufficient to install the {{AUR|ppp-mppe}}{{Broken package link|{{aur-mirror|ppp-mppe}}}} package.<br />
<br />
See also [[WPA2 Enterprise#MS-CHAPv2]].<br />
<br />
=== Network management disabled ===<br />
<br />
When NetworkManager shuts down but the pid (state) file is not removed, you will see a {{ic|Network management disabled}} message. If this happens, remove the file manually:<br />
<br />
# rm /var/lib/NetworkManager/NetworkManager.state<br />
<br />
=== Customizing resolv.conf ===<br />
<br />
See the main page: [[resolv.conf]]. If you use {{Pkg|dhclient}}, you may try the {{AUR|networkmanager-dispatch-resolv}}{{Broken package link|{{aur-mirror|networkmanager-dispatch-resolv}}}} package.<br />
<br />
=== DHCP problems with dhclient ===<br />
<br />
If you have problems with getting an IP address via DHCP, try to add the following to your {{ic|/etc/dhclient.conf}}:<br />
<br />
interface "eth0" {<br />
send dhcp-client-identifier 01:aa:bb:cc:dd:ee:ff;<br />
}<br />
<br />
Where {{ic|aa:bb:cc:dd:ee:ff}} is the MAC address of this NIC. The MAC address can be found using the {{ic|ip link show ''interface''}} command from the {{Pkg|iproute2}} package.<br />
<br />
=== Hostname problems ===<br />
<br />
It depends on the NetworkManager plugins used, whether the hostname is forwarded to a router on connect. The generic "keyfile" plugin does not forward the hostname in default configuration. To make it forward the hostname, add the following to {{ic|/etc/NetworkManager/NetworkManager.conf}}:<br />
<br />
[keyfile]<br />
hostname=''your_hostname''<br />
<br />
The options under {{ic|[keyfile]}} will be applied to network connections in the default {{ic|/etc/NetworkManager/system-connections}} path. <br />
<br />
Another option is to configure the DHCP client, which NetworkManager starts automatically, to forward it. NetworkManager utilizes {{Pkg|dhclient}} in default and falls back to its internal DHCP funtionality, if the former is not installed. To make ''dhclient'' forward the hostname requires to set a non-default option, ''dhcpcd'' forwards the hostname by default. <br />
<br />
First, check which DHCP client is used (''dhclient'' in this example):<br />
<br />
{{hc|<nowiki># journalctl -b | egrep "dhc"</nowiki>|<br />
...<br />
Nov 17 21:03:20 zenbook dhclient[2949]: Nov 17 21:03:20 zenbook dhclient[2949]: Bound to *:546<br />
Nov 17 21:03:20 zenbook dhclient[2949]: Listening on Socket/wlan0<br />
Nov 17 21:03:20 zenbook dhclient[2949]: Sending on Socket/wlan0<br />
Nov 17 21:03:20 zenbook dhclient[2949]: XMT: Info-Request on wlan0, interval 1020ms.<br />
Nov 17 21:03:20 zenbook dhclient[2949]: RCV: Reply message on wlan0 from fe80::126f:3fff:fe0c:2dc.<br />
}}<br />
<br />
==== Configure dhclient to push the hostname to the DHCP server ====<br />
<br />
Copy the example configuration file:<br />
<br />
# cp /usr/share/dhclient/dhclient.conf.example /etc/dhclient.conf<br />
<br />
Take a look at the file - there will only really be one line we want to keep and ''dhclient'' will use it's defaults (as it has been using if you did not have this file) for the other options. This is the important line:<br />
<br />
{{hc|/etc/dhclient.conf|2=send host-name = pick-first-value(gethostname(), "ISC-dhclient");}}<br />
<br />
Force an IP address renewal by your favorite means, and you should now see your hostname on your DHCP server.<br />
<br />
IPv6 push host name:<br />
<br />
# cp /usr/share/dhclient/dhclient.conf.example /etc/dhclient6.conf<br />
<br />
{{hc|/etc/dhclient6.conf|2=send fqdn.fqdn = pick-first-value(gethostname(), "ISC-dhclient");}}<br />
<br />
==== Configure NetworkManager to use a specific DHCP client ====<br />
<br />
If you want to explicitly set the DHCP client used by NetworkManager, it can be set in the global configuration: <br />
<br />
{{hc|1=/etc/NetworkManager/NetworkManager.conf|2=dhcp=internal}}<br />
<br />
The alternative {{ic|1=dhcp=dhclient}} is used per default, if this option is not set. <br />
<br />
Then [[restart]] {{ic|NetworkManager.service}}.<br />
<br />
{{Note|1=Support for {{Pkg|dhcpcd}} has been [https://projects.archlinux.org/svntogit/packages.git/commit/trunk?h=packages/networkmanager&id=a1df79cbcebaec0c043789eb31965e57d17b6cdb disabled] in {{Pkg|networkmanager}}-1.0.0-2 (2015-02-14).}}<br />
<br />
=== Missing default route ===<br />
<br />
On at least one KDE4 system, no default route was created when establishing wireless connections with NetworkManager. Changing the route settings of the wireless connection to remove the default selection "Use only for resources on this connection" solved the issue.<br />
<br />
=== 3G modem not detected ===<br />
<br />
See [[USB 3G Modem#Network Manager]].<br />
<br />
=== Switching off WLAN on laptops ===<br />
<br />
Sometimes NetworkManager will not work when you disable your Wi-Fi adapter with a switch on your laptop and try to enable it again afterwards. This is often a problem with ''rfkill''. [[Install]] the {{Pkg|rfkill}} package and use:<br />
<br />
$ watch -n1 rfkill list all<br />
<br />
to check if the driver notifies ''rfkill'' about the wireless adapter's status. If one identifier stays blocked after you switch on the adapter you could try to manually unblock it with (where X is the number of the identifier provided by the above output):<br />
<br />
# rfkill event unblock X<br />
<br />
=== Static IP address settings revert to DHCP ===<br />
<br />
Due to an unresolved bug, when changing default connections to a static IP address, {{ic|nm-applet}} may not properly store the configuration change, and will revert to automatic DHCP.<br />
<br />
To work around this issue you have to edit the default connection (e.g. "Auto eth0") in {{ic|nm-applet}}, change the connection name (e.g. "my eth0"), uncheck the "Available to all users" checkbox, change your static IP address settings as desired, and click '''Apply'''. This will save a new connection with the given name.<br />
<br />
Next, you will want to make the default connection not connect automatically. To do so, run {{ic|nm-connection-editor}} ('''not''' as root). In the connection editor, edit the default connection (e.g. "Auto eth0") and uncheck "Connect automatically". Click '''Apply''' and close the connection editor.<br />
<br />
=== Cannot edit connections as normal user ===<br />
<br />
See [[#Set up PolicyKit permissions]].<br />
<br />
=== Forget hidden wireless network ===<br />
<br />
Since hidden networks are not displayed in the selection list of the Wireless view, they cannot be forgotten (removed) with the GUI. You can delete one with the following command:<br />
<br />
# rm /etc/NetworkManager/system-connections/''SSID''<br />
<br />
This works for any other connection.<br />
<br />
=== VPN not working in GNOME ===<br />
<br />
When setting up OpenConnect or vpnc connections in NetworkManager while using GNOME, you will sometimes never see the dialog box pop up and the following error appears in {{ic|/var/log/errors.log}}:<br />
<br />
localhost NetworkManager[399]: <error> [1361719690.10506] [nm-vpn-connection.c:1405] get_secrets_cb(): Failed to request VPN secrets #3: (6) No agents were available for this request.<br />
<br />
This is caused by the GNOME NM Applet expecting dialog scripts to be at {{ic|/usr/lib/gnome-shell}}, when NetworkManager's packages put them in {{ic|/usr/lib/networkmanager}}.<br />
As a "temporary" fix (this bug has been around for a while now), make the following symlink(s):<br />
<br />
* For OpenConnect: {{ic|ln -s /usr/lib/networkmanager/nm-openconnect-auth-dialog /usr/lib/gnome-shell/}}<br />
* For VPNC (i.e. Cisco VPN): {{ic|ln -s /usr/lib/networkmanager/nm-vpnc-auth-dialog /usr/lib/gnome-shell/}}<br />
<br />
This may need to be done for any other NM VPN plugins as well, but these are the two most common.<br />
<br />
=== Unable to connect to visible European wireless networks ===<br />
<br />
WLAN chips are shipped with a default [[Wireless network configuration#Respecting the regulatory domain|regulatory domain]]. If your access point does not operate within these limitations, you will not be able to connect to the network. Fixing this is easy:<br />
<br />
# [[Install]] {{Pkg|crda}}<br />
# Uncomment the correct Country Code in {{ic|/etc/conf.d/wireless-regdom}}<br />
# Reboot the system, because the setting is only read on boot<br />
<br />
=== Automatic connect to VPN on boot is not working ===<br />
<br />
The problem occurs when the system (i.e. NetworkManager running as the root user) tries to establish a VPN connection, but the password is not accessible because it is stored in the Gnome keyring of a particular user. <br />
<br />
A solution is to keep the password to your VPN in plaintext, as described in step (2.) of [[#Use dispatcher to connect to a VPN after a network connection is established]]. <br />
<br />
You do not need to use the dispatcher described in step (1.) to auto-connect anymore, if you use the new "auto-connect VPN" option from the {{ic|nm-applet}} GUI.<br />
<br />
=== Systemd Bottleneck ===<br />
<br />
Over time the log files ({{ic|/var/log/journal}}) can become very large. This can have a big impact on boot performance when using NetworkManager, see: [[Systemd#Boot time increasing over time]].<br />
<br />
=== Regular network disconnects (WiFi) ===<br />
<br />
Some WiFi drivers have issues when scanning for base stations whilst connected/associated. Symptoms include VPN disconnects/reconnects and lost packets, web pages failing to load and then refresh fine.<br />
<br />
Running {{ic|journalctl -f}} will indicate that this is taking place, messages like the following will be contained in the logs at regular intervals.<br />
<br />
NetworkManager[410]: <info> (wlp3s0): roamed from BSSID 00:14:48:11:20:CF (my-wifi-name) to (none) ((none))<br />
<br />
There is a patched version of NetworkManager which should prevent this type of scanning: {{AUR|networkmanager-noscan}}.<br />
<br />
== Tips and tricks ==<br />
<br />
=== Encrypted Wi-Fi passwords ===<br />
<br />
By default, NetworkManager stores passwords in clear text in the connection files at {{ic|/etc/NetworkManager/system-connections/}}. To print the stored passwords, use the following command:<br />
<br />
# grep -H '^psk=' /etc/NetworkManager/system-connections/*<br />
<br />
The passwords are accessible to the root user in the filesystem and to users with access to settings via the GUI (e.g. {{ic|nm-applet}}). <br />
<br />
If it is preferable to save the passwords in encrypted form instead of clear text, this can be achieved by storing them in a keyring which NetworkManager then queries for the passwords. A suggested keyring daemon is [[GNOME Keyring]] or (for KDE specifically) [[KDE Wallet]]. The keyring daemon has to be started and the keyring needs to be unlocked for the following to work.<br />
<br />
Furthermore, NetworkManager needs to be configured not to store the password for all users. Using GNOME {{ic|nm-applet}}, run {{ic|nm-connection-editor}} from a terminal, select a network connection, click {{ic|Edit}}, select the {{ic|Wifi-Security}} tab and click on the right icon of password and check {{ic|Store the password for this user}}. Using KDE's {{Pkg|kdeplasma-applets-plasma-nm}}, click the applet, click on the top right {{ic|Settings}} icon, double click on a network connection, in the {{ic|General settings}} tab, untick {{ic|all users may connect to this network}}. If the option is ticked, the passwords will still be stored in clear text, even if a keyring daemon is running.<br />
<br />
If the option was selected previously and you un-tick it, you may have to use the {{ic|reset}} option first to make the password disappear from the file. Alternatively, delete the connection first and set it up again. <br />
<br />
The downside of using the keyring is that the connections have to be set up for each user.<br />
<br />
=== Sharing internet connection over Wi-Fi ===<br />
<br />
You can share your internet connection (e.g.: 3G or wired) with a few clicks using nm. You will need a supported Wi-Fi card (Cards based on Atheros AR9xx or at least AR5xx are probably best choice).<br />
<br />
==== Ad-hoc ====<br />
<br />
* [[Install]] the {{Pkg|dnsmasq}} package to be able to actually share the connection.<br />
* Custom {{ic|dnsmasq.conf}} may interfere with NetworkManager (not sure about this, but i think so).<br />
* Click on applet and choose "Create new wireless network".<br />
* Follow wizard (if using WEP, be sure to use 5 or 13 character long password, different lengths will fail).<br />
* Settings will remain stored for the next time you need it.<br />
<br />
==== Real AP ====<br />
<br />
Support of infrastructure mode (which is needed by Android phones as they intentionally do not support ad-hoc) is added by NetworkManager as of late 2012.<br />
<br />
See [https://fedoraproject.org/wiki/Features/RealHotspot Fedora's wiki].<br />
<br />
=== Sharing internet connection over Ethernet ===<br />
<br />
Scenario: your device has internet connection over wi-fi and you want to share the internet connection to other devices over ethernet.<br />
<br />
Requirements:<br />
* [[Install]] the {{Pkg|dnsmasq}} package to be able to actually share the connection.<br />
* You internet connected device and the other devices are connected over a suitable ethernet cable (this usually means a cross over cable or a switch in between).<br />
<br />
Steps:<br />
* Run {{ic|nm-connection-editor}} from terminal.<br />
* Add a new ethernet connection.<br />
* Give it some sensible name. For example "Shared Internet"<br />
* Go to "IPv4 Settings".<br />
* For "Method:" select "Shared to other computers".<br />
* Save<br />
<br />
Now you should have a new option "Shared Internet" under the Wired connections in NetworkManager.<br />
<br />
=== Checking if networking is up inside a cron job or script ===<br />
<br />
Some ''cron'' jobs require networking to be up to succeed. You may wish to avoid running these jobs when the network is down. To accomplish this, add an '''if''' test for networking that queries NetworkManager's ''nm-tool'' and checks the state of networking. The test shown here succeeds if any interface is up, and fails if they are all down. This is convenient for laptops that might be hardwired, might be on wireless, or might be off the network.<br />
<br />
{{bc|<nowiki><br />
if [ $(nm-tool|grep State|cut -f2 -d' ') == "connected" ]; then<br />
#Whatever you want to do if the network is online<br />
else<br />
#Whatever you want to do if the network is offline - note, this and the else above are optional<br />
fi<br />
</nowiki>}}<br />
<br />
This useful for a {{ic|cron.hourly}} script that runs ''fpupdate'' for the F-Prot virus scanner signature update, as an example. Another way it might be useful, with a little modification, is to differentiate between networks using various parts of the output from ''nm-tool''; for example, since the active wireless network is denoted with an asterisk, you could grep for the network name and then grep for a literal asterisk.<br />
<br />
=== Automatically unlock keyring after login ===<br />
<br />
==== GNOME ====<br />
<br />
# Right click on the {{ic|nm-applet}} icon in your panel and select Edit Connections and open the Wireless tab<br />
# Select the connection you want to work with and click the Edit button<br />
# Check the boxes “Connect Automatically” and “Available to all users”<br />
Log out and log back in to complete.<br />
<br />
{{Note|The following method is dated and known not to work on at least one machine!}}<br />
* In {{ic|/etc/pam.d/gdm}} (or your corresponding daemon in {{ic|/etc/pam.d}}), add these lines at the end of the "auth" and "session" blocks if they do not exist already: <br />
auth optional pam_gnome_keyring.so<br />
session optional pam_gnome_keyring.so auto_start<br />
<br />
* In {{ic|/etc/pam.d/passwd}}, use this line for the 'password' block:<br />
password optional pam_gnome_keyring.so<br />
<br />
:Next time you log in, you should be asked if you want the password to be unlocked automatically on login.<br />
<br />
==== KDE ====<br />
<br />
{{Out of date|The described approach seems to be very old. pam_keyring is unmaintained and {{Aur|pam-keyring-tool}}{{Broken package link|{{aur-mirror|pam-keyring-tool}}}} has been flaged out of date since the end of 2012. See if the approach described on the [[KDE Wallet]] page helps you.}}<br />
<br />
{{Note|See https://wiki.gnome.org/Projects/GnomeKeyring/Pam/Manual for reference, and if you are using [[KDE]] with KDM, you can use {{AUR|pam-keyring-tool}}{{Broken package link|{{aur-mirror|pam-keyring-tool}}}}.}}<br />
<br />
Put a script like the following in {{ic|~/.kde4/Autostart}}:<br />
#!/bin/sh<br />
echo PASSWORD | /usr/bin/pam-keyring-tool --unlock --keyring=default -s<br />
Similar should work with Openbox, LXDE, etc.<br />
<br />
==== SLiM login manager ====<br />
<br />
See [[SLiM#SLiM and Gnome Keyring]].<br />
<br />
=== KDE and OpenConnect VPN with password authentication ===<br />
<br />
{{Pkg|kdeplasma-applets-plasma-nm}} now supports configuring username and password for OpenConnect VPN connections. Open your VPN connection, accept the certificate, and connection fields will appear. If not, see the instructions below. Now enter the correct username and password.<br />
<br />
==== Troubleshooting ====<br />
<br />
While you may type both values at connection time, {{Pkg|kdeplasma-applets-plasma-nm}} 0.9.3.2-1 and above are capable of retrieving OpenConnect username and password directly from KWallet.<br />
<br />
Open "KDE Wallet Manager" and look up your OpenConnect VPN connection under "Network Management|Maps". Click "Show values" and <br />
enter your credentials in key "VpnSecrets" in this form (replace ''username'' and ''password'' accordingly):<br />
<br />
form:main:username%SEP%''username''%SEP%form:main:password%SEP%''password''<br />
<br />
Next time you connect, username and password should appear in the "VPN secrets" dialog box.<br />
<br />
=== Ignore specific devices ===<br />
<br />
Sometimes it may be desired that NetworkManager ignores specific devices and does not try to configure addresses and routes for them.You can quickly and easily ignore devices by MAC or interface-name by using the following in {{ic|/etc/NetworkManager/NetworkManager.conf}}:<br />
[keyfile]<br />
unmanaged-devices=mac:00:22:68:1c:59:b1;mac:00:1E:65:30:D1:C4;interface-name:eth0<br />
After you have put this in, [[Daemon|restart]] NetworkManager, and you should be able to configure interfaces without NetworkManager altering what you have set.<br />
<br />
=== Enable DNS Caching ===<br />
<br />
{{Merge|dnsmasq#NetworkManager|should be covered only in one place}}<br />
<br />
DNS requests can be sped up by caching previous requests locally for subsequent lookup. NetworkManager has a plugin to enable DNS caching using dnsmasq, but it is not enabled in the default configuration. It is, however, easy to enable using the following instructions.<br />
<br />
Start by [[pacman|installing]] {{Pkg|dnsmasq}}. Then, edit {{ic|/etc/NetworkManager/NetworkManager.conf}} and add the following line under the {{ic|[main]}} section:<br />
<br />
dns=dnsmasq<br />
<br />
Now restart NetworkManager or reboot. NetworkManager will automatically start dnsmasq and add 127.0.0.1 to {{ic|/etc/resolv.conf}}. The actual DNS servers can be found in {{ic|/var/run/NetworkManager/dnsmasq.conf}}. You can verify dnsmasq is being used by doing the same DNS lookup twice with dig and verifying the server and query times.<br />
<br />
=== Enable IPv6 Privacy Extensions ===<br />
<br />
See [[IPv6#NetworkManager]]<br />
<br />
== See also ==<br />
<br />
* [http://blogs.gnome.org/dcbw/2015/02/16/networkmanager-for-administrators-part-1/ NetworkManager for Administrators Part 1]</div>Beta990https://wiki.archlinux.org/index.php?title=Solid_state_drive&diff=411957Solid state drive2015-12-13T16:53:38Z<p>Beta990: /* Choice of filesystem */ Wrong section? Also see "VFAT only supports TRIM by the mount option discard, not.. "</p>
<hr />
<div>[[Category:Storage]]<br />
[[it:Solid State Drives]]<br />
[[ja:ソリッドステートドライブ]]<br />
[[ru:Solid State Drives]]<br />
[[zh-CN:Solid State Drives]]<br />
[[zh-TW:Solid State Drives]]<br />
{{Related articles start}}<br />
{{Related|SSD Benchmarking}}<br />
{{Related|SSD memory cell clearing}}<br />
{{Related|profile-sync-daemon}}<br />
{{Related articles end}}<br />
<br />
Solid State Drives (SSDs) are not PnP devices. Special considerations such as partition alignment, choice of file system, TRIM support, etc. are needed to set up SSDs for optimal performance. This article attempts to capture referenced, key learnings to enable users to get the most out of SSDs under Linux. Users are encouraged to read this article in its entirety before acting on recommendations.<br />
<br />
{{Note|This article is targeted at users running Linux, but much of the content is also relevant to other operating systems like BSD, Mac OS X or Windows.}}<br />
<br />
== Overview ==<br />
<br />
=== Advantages over HDDs ===<br />
<br />
*Fast read speeds - 2-3x faster than modern desktop HDDs (7,200 RPM using SATA2 interface).<br />
*Sustained read speeds - no decrease in read speed across the entirety of the device. HDD performance tapers off as the drive heads move from the outer edges to the center of HDD platters.<br />
*Minimal access time - approximately 100x faster than an HDD. For example, 0.1 ms (100 us) vs. 12-20 ms (12,000-20,000 us) for desktop HDDs.<br />
*High degree of reliability.<br />
*No moving parts.<br />
*Minimal heat production.<br />
*Minimal power consumption - fractions of a W at idle and 1-2 W while reading/writing vs. 10-30 W for a HDD depending on RPMs.<br />
*Light-weight - ideal for laptops.<br />
<br />
=== Limitations ===<br />
<br />
*Per-storage cost (about a third of a dollar per GB, vs. around a dime or two per GB for rotating media).<br />
*Capacity of marketed models is lower than that of HDDs.<br />
*Large cells require different filesystem optimizations than rotating media. The flash translation layer hides the raw flash access which a modern OS could use to optimize access.<br />
*Partitions and filesystems need some SSD-specific tuning. Page size and erase page size are not autodetected.<br />
*Cells wear out. Consumer MLC cells at mature 50nm processes can handle 10000 writes each; 35nm generally handles 5000 writes, and 25nm 3000 (smaller being higher density and cheaper). If writes are properly spread out, are not too small, and align well with cells, this translates into a lifetime write volume for the SSD that is a multiple of its capacity. Daily write volumes have to be balanced against life expectancy. However, tests [http://techreport.com/review/25889/the-ssd-endurance-experiment-500tb-update][http://techreport.com/review/26523/the-ssd-endurance-experiment-casualties-on-the-way-to-a-petabyte][http://techreport.com/review/27436/the-ssd-endurance-experiment-two-freaking-petabytes][http://techreport.com/review/27909/the-ssd-endurance-experiment-theyre-all-dead] performed on recent hardware suggest that SSD wear is negligible, with the lifetime expectancy of SSDs comparable to those of HDDs even with artificially high write-volumes.<br />
*Firmwares and controllers are complex. They occasionally have bugs. Modern ones consume power comparable with HDDs. They [https://lwn.net/Articles/353411/ implement] the equivalent of a log-structured filesystem with garbage collection. They translate SATA commands traditionally intended for rotating media. Some of them do on the fly compression. They spread out repeated writes across the entire area of the flash, to prevent wearing out some cells prematurely. They also coalesce writes together so that small writes are not amplified into as many erase cycles of large cells. Finally they move cells containing data so that the cell does not lose its contents over time.<br />
*Performance can drop as the disk gets filled. Garbage collection is not universally well implemented, meaning freed space is not always collected into entirely free cells.<br />
<br />
=== Pre-purchase considerations ===<br />
<br />
{{Accuracy|Would be nice to get some sources here, particularly on the "75% occupancy"}}<br />
<br />
There are several key features to look for prior to purchasing a contemporary SSD.<br />
*Native [[wikipedia:TRIM|TRIM]] support is a vital feature that both prolongs SSD lifetime and reduces loss of performance for write operations over time.<br />
*Buying the right sized SSD is key. As with all filesystems, target <75 % occupancy for all SSD partitions to ensure efficient use by the kernel.<br />
<br />
== Choice of filesystem ==<br />
<br />
This section describes optimized [[filesystems]] to use on a SSD.<br />
<br />
It's still possible/required to use other filesystems, e.g. FAT32 for the [[UEFI#EFI_System_Partition|EFI System Partition]].<br />
<br />
=== Btrfs ===<br />
<br />
[[wikipedia:Btrfs|Btrfs]] support has been included with the mainline 2.6.29 release of the Linux kernel. Some feel that it is not mature enough for production use while there are also early adopters of this potential successor to ext4. Users are encouraged to read the [[Btrfs]] article for more info.<br />
<br />
=== Ext4 ===<br />
<br />
[[wikipedia:Ext4|Ext4]] is another filesystem that has support for SSD. It is considered as stable since 2.6.28 and is mature enough for daily use. ext4 users can enable the TRIM command support using the {{ic|discard}} mount option in [[fstab]] (or with {{ic|tune2fs -o discard /dev/sdaX}}).<br />
See the [http://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git;a=blob;f=Documentation/filesystems/ext4.txt official in kernel tree documentation] for further information on ext4.<br />
<br />
=== XFS ===<br />
<br />
Many users do not realize that in addition to ext4 and btrfs, [[wikipedia:XFS|XFS]] has TRIM support as well. This can be enabled in the usual ways. That is, the choice may be made of either using the discard option mentioned above, or by using the fstrim command. More information can be found on the [http://xfs.org/index.php/FITRIM/discard XFS wiki].<br />
<br />
=== JFS ===<br />
<br />
As of Linux kernel version 3.7, proper TRIM support has been added. So far, there is not a great wealth of information of the topic but it has certainly been picked up by [http://www.phoronix.com/scan.php?page=news_item&px=MTE5ODY Linux news sites.] It is apparent that it can be enabled via the {{ic|discard}} mount option, or by using the method of batch TRIMs with fstrim.<br />
<br />
=== Other filesystems ===<br />
<br />
There are other filesystems specifically [[wikipedia:List_of_flash_file_systems#File_systems_optimized_for_flash_memory.2C_solid_state_media|designed for SSD]], for example [[F2FS]].<br />
<br />
== Tips for maximizing SSD performance ==<br />
<br />
=== Partition alignment ===<br />
<br />
See [[Partitioning#Partition alignment]].<br />
<br />
=== TRIM ===<br />
<br />
{{Expansion|Mention which options apply to which filesystems.}}<br />
<br />
Most SSDs support the [[wikipedia:TRIM|ATA_TRIM command]] for sustained long-term performance and wear-leveling. For more including some before and after benchmark, see [https://sites.google.com/site/lightrush/random-1/howtoconfigureext4toenabletrimforssdsonubuntu this] tutorial. <br />
<br />
As of Linux kernel version 3.8 onwards, the following filesystems support TRIM: [[Ext4]], [[Btrfs]], [[JFS]], VFAT, [[XFS]], [[F2FS]].<br />
<br />
As of {{Pkg|ntfs-3g}} version 2015.3.14, TRIM is supported for [[NTFS]] filesystem too [http://permalink.gmane.org/gmane.comp.file-systems.ntfs-3g.devel/1101].<br />
<br />
VFAT only supports TRIM by the mount option {{ic|discard}}, not manually with ''fstrim''.<br />
<br />
The [[#Choice of filesystem|Choice of Filesystem]] section of this article offers more details.<br />
<br />
==== Verify TRIM support ====<br />
<br />
# hdparm -I /dev/sda | grep TRIM<br />
* Data Set Management TRIM supported (limit 1 block)<br />
<br />
Note that there are different types of TRIM support defined by the specification. Hence, the output may differ depending what the drive supports. See [[wikipedia:TRIM#ATA]] for more information.<br />
<br />
==== Apply periodic TRIM via fstrim ====<br />
<br />
{{Note|This method does not work for VFAT filesystems.}}<br />
<br />
The {{Pkg|util-linux}} package (part of {{Grp|base}} and {{Grp|base-devel}}) provides {{ic|fstrim.service}} and {{ic|fstrim.timer}} [[systemd]] unit files. [[Enabling]] the timer will activate the service weekly, which will then trim all mounted filesystems on devices that support the discard operation.<br />
<br />
The timer relies on the timestamp of {{ic|/var/lib/systemd/timers/stamp-fstrim.timer}} (which it will create upon first invocation) to know whether a week has elapsed since it last ran. Therefore there is no need to worry about too frequent invocations, in an ''anacron''-like fashion.<br />
<br />
It is also possible to query the units activity and status using standard {{ic|journalctl}} and {{ic|systemctl status}} commands:<br />
{{bc|1=<br />
# journalctl -u fstrim<br />
...<br />
<shows several log entries if enabled><br />
...<br />
# systemctl status fstrim<br />
● fstrim.service - Discard unused blocks<br />
Loaded: loaded (/usr/lib/systemd/system/fstrim.service; static; vendor preset: disabled)<br />
Active: inactive (dead) since lun. 2015-06-08 00:00:18 CEST; 2 days ago<br />
Process: 18152 ExecStart=/sbin/fstrim -a (code=exited, status=0/SUCCESS)<br />
Main PID: 18152 (code=exited, status=0/SUCCESS)<br />
<br />
juin 08 00:00:16 arch-clevo systemd[1]: Starting Discard unused blocks...<br />
juin 08 00:00:18 arch-clevo systemd[1]: Started Discard unused blocks.<br />
}}<br />
{{Note|Specify the {{ic|.timer}} suffix if you specifically want to inquire about it.}}<br />
<br />
If you wish to change the periodicity of the timer or the command run, simply [[Systemd#Editing_provided_unit_files|edit the provided unit files]].<br />
<br />
==== Enable continuous TRIM by mount flag ====<br />
<br />
{{Warning|1=Users need to be certain that their SSD supports TRIM before attempting to mount a partition with the {{ic|discard}} flag. Data loss can occur otherwise! Unfortunately, there are wide quality gaps of SSD's bios' to perform continuous TRIM, which is also why using the {{ic|discard}} mount flag is [http://thread.gmane.org/gmane.comp.file-systems.ext4/41974 recommended against] generally by filesystem developer Theodore Ts'o. If in doubt about your hardware, [[#Apply periodic TRIM via fstrim]] instead.<br />
<br />
Also be aware of other [[WikiPedia:Trim_(computing)#Shortcomings|shortcomings]], most importantly that "TRIM commands [https://blog.algolia.com/when-solid-state-drives-are-not-that-solid/ have been linked] to serious data corruption in several devices, most notably Samsung 8* series." After the data corruption [https://github.com/torvalds/linux/blob/e64f638483a21105c7ce330d543fa1f1c35b5bc7/drivers/ata/libata-core.c#L4109-L4286 had been confirmed], the Linux kernel blacklisted queued TRIM command execution for a number of [https://github.com/torvalds/linux/blob/e64f638483a21105c7ce330d543fa1f1c35b5bc7/drivers/ata/libata-core.c#L4227 popular devices] as of July 1, 2015. Read [http://linux.slashdot.org/story/15/07/30/1814200/samsung-finds-fixes-bug-in-linux-trim-code Samsung Finds, Fixes Bug In Linux Trim Code] on Slashdot for more recent updates.}}<br />
<br />
Using the {{ic|discard}} option for a mount in {{ic|/etc/fstab}} enables continuous TRIM in device operations:<br />
<br />
/dev/sda2 /boot ext4 defaults,noatime,'''discard''' 0 2<br />
/dev/sda1 /boot/efi vfat defaults,noatime,'''discard''' 0 2<br />
/dev/sda3 / ext4 defaults,noatime,'''discard''' 0 2<br />
<br />
The main benefit of continuous TRIM is speed; an SSD can perform more efficient [http://arstechnica.com/gadgets/2015/04/ask-ars-my-ssd-does-garbage-collection-so-i-dont-need-trim-right/ garbage collection]. However, results vary and particularly earlier SSD generations may also show just the opposite effect. Also for this reason, some distributions decided against using it (e.g. Ubuntu: see [http://www.phoronix.com/scan.php?page=news_item&px=MTUxOTY this article] and the [https://blueprints.launchpad.net/ubuntu/+spec/core-1311-ssd-trimming related blueprint]).<br />
<br />
{{Note|<br />
* TRIM is not by default activated when using block-device encryption on a SSD; for more information see [[Dm-crypt/Specialties#Discard.2FTRIM_support_for_solid_state_drives_.28SSD.29|Dm-crypt/TRIM support for SSD]].<br />
* There is no need for the {{ic|discard}} flag if you run {{ic|fstrim}} periodically.<br />
* Using the {{ic|discard}} flag for an ext3 root partition will result in it being mounted read-only.<br />
* Before SATA 3.1, TRIM commands are synchronous and will block all I/O while running. This may cause short freezes while this happens, for example during a filesystem sync. You may not want to use {{ic|discard}} in that case but [[#Apply periodic TRIM via fstrim]] instead. One way to check your SATA version is with {{ic|smartctl --info /dev/sd''X''}}.<br />
}}<br />
<br />
==== Enable continuous TRIM with tune2fs (discouraged) ====<br />
<br />
One can set the trim flag statically with tune2fs:<br />
<br />
# tune2fs -o discard /dev/sd'''XY'''<br />
<br />
{{Warning|This method will cause the {{ic|discard}} option to [https://bbs.archlinux.org/viewtopic.php?id&#61;137314 not show up] with {{ic|mount}}.}}<br />
<br />
==== Enable TRIM for LVM ====<br />
<br />
Change the value of {{ic|issue_discards}} option from 0 to 1 in {{ic|/etc/lvm/lvm.conf}}.<br />
<br />
{{Note|Enabling this option will "issue discards to a logical volumes's underlying physical volume(s) when the logical volume is no longer using the physical volumes' space (e.g. lvremove, lvreduce, etc)" (see {{ic|man lvm.conf}} and/or inline comments in {{ic|/etc/lvm/lvm.conf}}). As such it does not seem to be required for "regular" TRIM requests (file deletions inside a filesystem) to be functional.}}<br />
<br />
==== Enable TRIM for dm-crypt ====<br />
<br />
{{Warning|The discard option allows discard requests to be passed through the encrypted block device. This improves performance on SSD storage but has security implications. See [[Dm-crypt/Specialties#Discard.2FTRIM_support_for_solid_state_drives_.28SSD.29|Dm-crypt/TRIM support for SSD]] for more information.}}<br />
<br />
For non-root filesystems, configure {{ic|/etc/crypttab}} to include {{ic|discard}} in the list of options for encrypted block devices located on a SSD (see [[Dm-crypt/System configuration#crypttab]]).<br />
<br />
For the root filesystem, follow the instructions from [[Dm-crypt/Specialties#Discard.2FTRIM_support_for_solid_state_drives_.28SSD.29|Dm-crypt/TRIM support for SSD]] to add the right kernel parameter to the bootloader configuration.<br />
<br />
=== I/O scheduler ===<br />
<br />
See [[Maximizing performance#Tuning IO schedulers]]. <br />
<br />
==== systemd-tmpfiles ====<br />
<br />
If you have more than one storage device, or wish to avoid clutter on the kernel cmdline, you can set the I/O scheduler via {{ic|systemd-tmpfiles}}:<br />
<br />
{{hc|/etc/tmpfiles.d/10_ioscheduler.conf|2=<br />
w /sys/block/sdX/queue/scheduler - - - - noop<br />
}}<br />
<br />
For more detail on {{ic|systemd-tmpfiles|}} see [[Systemd#Temporary_files]].<br />
<br />
==== Using udev for one device or HDD/SSD mixed environment ====<br />
<br />
Though the above will undoubtedly work, it is probably considered a reliable workaround. Ergo, it would be preferred to use the system that is responsible for the devices in the first place to implement the scheduler. In this case it is udev, and to do this, all one needs is a simple [[udev]] rule.<br />
<br />
To do this, create the following:<br />
<br />
{{hc|/etc/udev/rules.d/60-schedulers.rules|<nowiki><br />
# set deadline scheduler for non-rotating disks<br />
ACTION=="add|change", KERNEL=="sd[a-z]", ATTR{queue/rotational}=="0", ATTR{queue/scheduler}="deadline"<br />
</nowiki>}}<br />
<br />
Of course, set Deadline/CFQ to the desired schedulers. Changes should occur upon next boot. To check success of the new rule:<br />
<br />
$ cat /sys/block/sd'''X'''/queue/scheduler # where '''X''' is the device in question<br />
<br />
{{Note|In the example sixty is chosen because that is the number udev uses for its own persistent naming rules. Thus, it would seem that block devices are at this point able to be modified and this is a safe position for this particular rule. But the rule can be named anything so long as it ends in {{ic|.rules}}.)}}<br />
<br />
=== Swap space on SSDs ===<br />
<br />
One can place a swap partition on an SSD. A recommended tweak for SSDs using a swap partition is to reduce the [[swappiness]] of the system to some very low value (for example {{ic|1}}), and thus avoiding writes to swap.<br />
<br />
== Tips for SSD security ==<br />
<br />
=== Hdparm shows "frozen" state ===<br />
<br />
Some motherboard BIOS' issue a "security freeze" command to attached storage devices on initialization. Likewise some SSD (and HDD) BIOS' are set to "security freeze" in the factory already. Both result in the device's password security settings to be set to '''frozen''', as shown in below output: <br />
<br />
{{hc|head=:~# hdparm -I /dev/sda |output=<br />
Security: <br />
Master password revision code = 65534<br />
supported<br />
not enabled<br />
'''not locked'''<br />
'''frozen'''<br />
not expired: security count<br />
supported: enhanced erase<br />
4min for SECURITY ERASE UNIT. 2min for ENHANCED SECURITY ERASE UNIT. }}<br />
<br />
Operations like formatting the device or installing operating systems are not affected by the "security freeze". <br />
<br />
The above output shows the device is '''not locked''' by a HDD-password on boot and the '''frozen''' state safeguards the device against malwares which may try to lock it by setting a password to it at runtime. <br />
<br />
If you intend to set a password to a "frozen" device yourself, a motherboard BIOS with support for it is required. A lot of notebooks have support, because it is required for [[Wikipedia:Hardware-based_full_disk_encryption|hardware encryption]], but support may not be trivial for a desktop/server board. For the Intel DH67CL/BL motherboard, for example, the motherboard has to be set to "maintenance mode" by a physical jumper to access the settings (see [http://sstahlman.blogspot.in/2014/07/hardware-fde-with-intel-ssd-330-on.html?showComment=1411193181867#c4579383928221016762], [https://communities.intel.com/message/251978#251978]). <br />
<br />
{{Warning|Do not try to change the above '''lock''' security settings with {{ic|hdparm}} unless you know exactly what you are doing.}}<br />
<br />
If you intend to erase the SSD, see [[Securely wipe disk#hdparm]] and [[#SSD memory cell clearing|below]].<br />
<br />
=== SSD memory cell clearing ===<br />
<br />
On occasion, users may wish to completely reset an SSD's cells to the same virgin state they were at the time the device was installed thus restoring it to its [http://www.anandtech.com/storage/showdoc.aspx?i=3531&p=8 factory default write performance]. Write performance is known to degrade over time even on SSDs with native TRIM support. TRIM only safeguards against file deletes, not replacements such as an incremental save.<br />
<br />
The reset is easily accomplished in a three step procedure denoted on the [[SSD memory cell clearing]] wiki article. If the reason for the reset is to wipe data, you may not want to rely on the SSD bios to perform it securely. See [[Securely wipe disk#Flash memory]] for further information and examples to perform a wipe.<br />
<br />
== Tips for minimizing disk reads/writes ==<br />
<br />
An overarching theme for SSD usage should be 'simplicity' in terms of locating high-read/write operations either in RAM (Random Access Memory) or on a physical HDD rather than on an SSD. Doing so will add longevity to an SSD. This is primarily due to the large erase block size (512 KiB in some cases); a lot of small writes result in huge effective writes.<br />
<br />
{{Note|A 32GB SSD with a mediocre 10x write amplification factor, a standard 10000 write/erase cycle, and '''10GB of data written per day''', would get an '''8 years life expectancy'''. It gets better with bigger SSDs and modern controllers with less write amplification. Also compare [http://techreport.com/review/25889/the-ssd-endurance-experiment-500tb-update] when considering whether any particular strategy to limit disk writes is actually needed.}}<br />
<br />
Use {{Pkg|iotop}} and sort by disk writes to see how much and how frequently are programs writing to the disk.<br />
<br />
{{Tip|''iotop'' can be run in batch mode instead of the default interactive mode using the {{ic|-b}} option. {{ic|-o}} is used to show only processes actually doing I/O, and {{ic|-qqq}} is to suppress column names and I/O summary. See {{ic|man iotop}} for more options.<br />
# iotop -boqqq<br />
}}<br />
<br />
=== Intelligent partition scheme ===<br />
<br />
*For systems with both an SSD and an HDD, consider relocating the {{ic|/var}} partition to a magnetic disc on the system rather than on the SSD itself to avoid read/write wear.<br />
<br />
=== noatime mount option ===<br />
<br />
{{Merge|fstab#atime options|This should be described only in one place, just link to [[fstab]] afterwards.}}<br />
<br />
Using this flag in one's {{ic|/etc/fstab}} halts the logging of read accesses to the file system via an update to the atime information associated with the file. The importance of the {{ic|noatime}} setting is that it eliminates the need by the system to make writes to the file system for files which are simply being read. Since writes can be somewhat expensive as mentioned in previous section, this can result in measurable performance gains.<br />
<br />
{{Note|The write time information to a file will continue to be updated anytime the file is written to with this option enabled.}}<br />
<br />
/dev/sda1 / ext4 defaults,'''noatime''' 0 1<br />
/dev/sda2 /home ext4 defaults,'''noatime''' 0 2<br />
<br />
{{Note|This setting will cause issues with some programs such as [[Mutt]], as the access time of the file will eventually be previous than the modification time, which would make no sense. Using the {{ic|relatime}} option instead of {{ic|noatime}} will ensure that the atime field will never be prior to the last modification time of a file. Alternatively, using the maildir storage format also solves this mutt issue.}}<br />
<br />
=== Locate frequently used files to RAM ===<br />
<br />
==== Browser profiles ====<br />
<br />
One can ''easily'' mount browser profile(s) such as chromium, firefox, opera, etc. into RAM via tmpfs and also use rsync to keep them synced with HDD-based backups. In addition to the obvious speed enhancements, users will also save read/write cycles on their SSD by doing so.<br />
<br />
The AUR contains several packages to automate this process, for example {{AUR|profile-sync-daemon}}.<br />
<br />
==== Others ====<br />
<br />
For the same reasons a browser's profile can be relocated to RAM, so can highly used directories such as {{ic|/srv/http}} (if running a web server). A sister project to {{AUR|profile-sync-daemon}} is {{AUR|anything-sync-daemon}}, which allows users to define '''any''' directory to sync to RAM using the same underlying logic and safe guards.<br />
<br />
=== Compiling in tmpfs ===<br />
<br />
Intentionally compiling in [[tmpfs]] is great to minimize disk reads/writes. For more information, refer to [[Makepkg#Improving compile times]].<br />
<br />
=== Disabling journaling on the filesystem ===<br />
<br />
Using a journaling filesystem such as ext4 on an SSD '''without''' a journal is an option to decrease read/writes. The obvious drawback of using a filesystem with journaling disabled is data loss as a result of an ungraceful dismount (i.e. post power failure, kernel lockup, etc.). With modern SSDs, [http://tytso.livejournal.com/61830.html Ted Tso] advocates that journaling can be enabled with minimal extraneous read/write cycles under most circumstances:<br />
<br />
'''Amount of data written (in megabytes) on an ext4 file system mounted with {{ic|noatime}}.'''<br />
<br />
{| class="wikitable"<br />
! operation !! journal !! w/o journal !! percent change<br />
|-<br />
!git clone<br />
|367.0<br />
|353.0<br />
|3.81 %<br />
|-<br />
!make<br />
|207.6<br />
|199.4<br />
|3.95 %<br />
|-<br />
!make clean<br />
|6.45<br />
|3.73<br />
|42.17 %<br />
|}<br />
<br />
''"What the results show is that metadata-heavy workloads, such as make clean, do result in almost twice the amount data written to disk. This is to be expected, since all changes to metadata blocks are first written to the journal and the journal transaction committed before the metadata is written to their final location on disk. However, for more common workloads where we are writing data as well as modifying filesystem metadata blocks, the difference is much smaller."''<br />
<br />
{{Note|The make clean example from the table above typifies the importance of intentionally doing compiling in tmpfs as recommended in the [[#Compiling in tmpfs|preceding section]] of this article!}}<br />
<br />
== Firmware updates ==<br />
<br />
=== ADATA ===<br />
<br />
ADATA has a utility available for Linux (i686) on their support page [http://www.adata.com.tw/index.php?action=ss_main&page=ss_content_driver&lan=en here]. The link to latest firmware will appear after selecting the model. The latest Linux update utility is packed with firmware and needs to be run as root. One may need to set correct permissions for binary file first.<br />
<br />
=== Crucial ===<br />
<br />
Crucial provides an option for updating the firmware with an ISO image. These images can be found after selecting the product [http://www.crucial.com/usa/en/support-ssd here] and downloading the "Manual Boot File." Owners of an M4 Crucial model, may check if a firmware upgrade is needed with {{ic|smartctl}}.<br />
<br />
{{hc|$ smartctl --all /dev/sd'''X'''|<br />
==> WARNING: This drive may hang after 5184 hours of power-on time:<br />
http://www.tomshardware.com/news/Crucial-m4-Firmware-BSOD,14544.html<br />
See the following web pages for firmware updates:<br />
http://www.crucial.com/support/firmware.aspx<br />
http://www.micron.com/products/solid-state-storage/client-ssd#software<br />
}}<br />
<br />
Users seeing this warning are advised to backup all sensible data and '''consider upgrading immediately'''.<br />
<br />
=== Intel ===<br />
<br />
Intel has a Linux live system based [https://downloadcenter.intel.com/download/18363 Firmware Update Tool] for operating systems that are not compatible with its [https://downloadcenter.intel.com/download/18455 Intel® Solid-State Drive Toolbox] software.<br />
<br />
=== Kingston ===<br />
<br />
Kingston has a Linux utility to update the firmware of Sandforce controller based drives: [http://www.kingston.com/en/ssd SSD support page]. Click the images on the page to go to a support page for your SSD model. Support specifically for, e.g. the SH100S3 SSD, can be found here: [http://www.kingston.com/en/support/technical/downloads?product=sh100s3&filename=sh100_503fw_win support page].<br />
<br />
=== Mushkin ===<br />
<br />
The lesser known Mushkin brand Solid State drives also use Sandforce controllers, and have a Linux utility (nearly identical to Kingston's) to update the firmware.<br />
<br />
=== OCZ ===<br />
<br />
OCZ has a command line utility available for Linux (i686 and x86_64) on their forum [http://www.ocztechnology.com/ssd_tools/ here].<br />
<br />
=== Samsung ===<br />
<br />
Samsung notes that update methods other than using their Magician Software are "not supported," but it is possible. The Magician Software can be used to make a USB drive bootable with the firmware update. Samsung provides pre-made [http://www.samsung.com/global/business/semiconductor/samsungssd/downloads.html bootable ISO images] that can be used to update the firmware. Another option is to use Samsung's {{AUR|samsung_magician}}, which is available in the AUR. Magician only supports Samsung-branded SSDs; those manufactured by Samsung for OEMs (e.g., Lenovo) are not supported.<br />
<br />
{{Note|Samsung does not make it obvious at all that they actually provide these. They seem to have 4 different firmware update pages, and each references different ways of doing things.}}<br />
<br />
Users preferring to run the firmware update from a live USB created under Linux (without using Samsung's "Magician" software under Microsoft Windows) can refer to [http://fomori.org/blog/?p=933 this post] for reference.<br />
<br />
=== SanDisk ===<br />
<br />
SanDisk makes '''ISO firmware images''' to allow SSD firmware update on operating systems that are unsupported by their SanDisk SSD Toolkit. One must choose the firmware for the right ''SSD model'', as well as for the ''capacity'' that it has (e.g. 60GB, '''or''' 256GB). After burning the adequate ISO firmware image, simply restart the PC to boot with the newly created CD/DVD boot disk (may work from a USB stick).<br />
<br />
The iso images just contain a linux kernel and an initrd. Extract them to {{ic|/boot}} partition and boot them with [[GRUB]] or [[Syslinux]] to update the firmware.<br />
<br />
I could not find a single page listing the firmware updates yet (site is a mess IMHO), but here are some relevant links:<br />
<br />
SanDisk Extreme SSD [http://kb.sandisk.com/app/answers/detail/a_id/10127 Firmware Release notes] and [http://kb.sandisk.com/app/answers/detail/a_id/10476 Manual Firmware update version R211] <br />
<br />
SanDisk Ultra SSD [http://kb.sandisk.com/app/answers/detail/a_id/10192 Firmware release notes] and [http://kb.sandisk.com/app/answers/detail/a_id/10477 Manual Firmware update version 365A13F0]<br />
<br />
== Troubleshooting ==<br />
<br />
It is possible that the issue you are encountering is a firmware bug which is not Linux specific, so before trying to troubleshoot an issue affecting the SSD device, you should first check if updates are available for:<br />
* The [[#Firmware updates|SSD's firmware]]<br />
* The [[Flashing_BIOS_from_Linux|motherboard's BIOS/UEFI firmware]]<br />
<br />
Even if it is a firmware bug it might be possible to avoid it, so if there are no updates to the firmware or you hesitant on updating firmware then the following might help.<br />
<br />
=== Resolving NCQ errors ===<br />
<br />
Some SSDs and SATA chipsets do not work properly with Linux Native Command Queueing (NCQ). The tell-tale dmesg errors look like this:<br />
<br />
[ 9.115544] ata9: exception Emask 0x0 SAct 0xf SErr 0x0 action 0x10 frozen<br />
[ 9.115550] ata9.00: failed command: READ FPDMA QUEUED<br />
[ 9.115556] ata9.00: cmd 60/04:00:d4:82:85/00:00:1f:00:00/40 tag 0 ncq 2048 in<br />
[ 9.115557] res 40/00:18:d3:82:85/00:00:1f:00:00/40 Emask 0x4 (timeout)<br />
<br />
To disable NCQ on boot, add {{ic|1=libata.force=noncq}} to the kernel command line in the [[bootloader]] configuration. To disable NCQ only for disk 0 on port 1 use: {{ic|1=libata.force=1.00:noncq}}<br />
<br />
Alternatively, you may disable NCQ for a specific drive without rebooting via sysfs:<br />
<br />
{{bc|<br />
# echo 1 > /sys/block/sdX/device/queue_depth<br />
}}<br />
<br />
If this (and also updating the firmware) does not resolves the problem or cause other issues, then [[Reporting bug guidelines|file a bug report]].<br />
<br />
=== Resolving SATA power management related errors ===<br />
<br />
Some SSDs (e.g. Transcend MTS400) are failing when SATA Active Link Power Management, [[wikipedia:Aggressive_Link_Power_Management|ALPM]], is enabled.<br />
ALPM is disabled by default and enabled by a power saving daemon (e.g. [[TLP]], [[Laptop Mode Tools]]).<br />
<br />
If you starting to encounter SATA related errors when using such daemon then you should try to disable ALPM by setting its state to {{ic|max_performance}} for both battery and AC powered profiles.<br />
<br />
== See also ==<br />
<br />
* [http://www.reddit.com/r/archlinux/comments/rkwjm/what_should_i_keep_in_mind_when_installing_on_ssd/ Discussion on Reddit about installing Arch on an SSD]<br />
* See the [[Flashcache]] article for advanced information on using solid-state with rotational drives for top performance.<br />
* [http://lifehacker.com/5837769/make-sure-your-partitions-are-correctly-aligned-for-optimal-solid-state-drive-performance Speed Up Your SSD By Correctly Aligning Your Partitions] (using GParted)<br />
* [http://permalink.gmane.org/gmane.comp.file-systems.btrfs/19446 Re: Varying Leafsize and Nodesize in Btrfs]<br />
* [http://thread.gmane.org/gmane.comp.file-systems.btrfs/19650/focus=19667 Re: SSD alignment and Btrfs sector size]<br />
* [http://forums.anandtech.com/showthread.php?t=2266113 Erase Block (Alignment) Misinformation?]<br />
* [http://superuser.com/questions/492084/is-alignment-to-erase-block-size-needed-for-modern-ssds Is alignment to erase block size needed for modern SSD's?]<br />
* [http://thread.gmane.org/gmane.comp.file-systems.btrfs/15646 Btrfs support for efficient SSD operation (data blocks alignment)]<br />
* [http://serverfault.com/questions/356534/ssd-erase-block-size-lvm-pv-on-raw-device-alignment SSD, Erase Block Size & LVM: PV on raw device, Alignment]</div>Beta990https://wiki.archlinux.org/index.php?title=Uncomplicated_Firewall&diff=411956Uncomplicated Firewall2015-12-13T16:44:11Z<p>Beta990: /* Disable UFW logging */ Forgot space</p>
<hr />
<div>[[Category:Firewalls]]<br />
[[ja:Uncomplicated Firewall]]<br />
From the project [https://launchpad.net/ufw home page]:<br />
: ''Ufw stands for Uncomplicated Firewall, and is a program for managing a netfilter [[firewall]]. It provides a command line interface and aims to be uncomplicated and easy to use.''<br />
<br />
== Installation ==<br />
<br />
{{Pkg|ufw}} can be installed from the [[official repositories]].<br />
<br />
Start ufw as [[systemd]] [[Daemon|service]] to have it running and enable it to make it available after boot.<br />
<br />
== Basic configuration ==<br />
<br />
A very simplistic configuration which will deny all by default, allow any protocol from inside a 192.168.0.1-192.168.0.255 LAN, and allow incoming Deluge and SSH traffic from anywhere:<br />
<br />
# ufw default deny<br />
# ufw allow from 192.168.0.0/24<br />
# ufw allow Deluge<br />
# ufw allow SSH<br />
<br />
The next line is only needed ''once'' the first time you install the package: <br />
<br />
# ufw enable<br />
<br />
Then enable the {{ic|ufw}} service with [[Systemd#Using units|systemctl]].<br />
<br />
Finally, query the rules being applied via the status command:<br />
{{hc|# ufw status|<br />
Status: active<br />
To Action From<br />
-- ------ ----<br />
Anywhere ALLOW 192.168.0.0/24<br />
Deluge ALLOW Anywhere<br />
SSH ALLOW Anywhere<br />
}}<br />
The status report shows the rules added by the user. For most cases this will be what is needed, but it is good to be aware that builtin-rules do exist. These include filters to allow UPNP, AVAHI and DHCP replies. In order to see all rules setup <br />
# ufw show raw <br />
may be used, as well as further reports listed in the manpage. Since these reports also summarize traffic, they may be somewhat difficult to read. Another way to check for accepted traffic: <br />
# iptables -S | grep ACCEPT<br />
While this works just fine for reporting, keep in mind not to enable the {{ic|iptables}} service as long as you use {{ic|ufw}} for managing it. <br />
{{Note|If special network variables are set on the system in {{ic|/etc/sysctl.d/*}}, it may be necessary to update {{ic|/etc/ufw/sysctl.conf}} accordingly since this configuration overrides the default settings.}}<br />
<br />
== Adding other applications ==<br />
<br />
The PKG comes with some defaults based on the default ports of many common daemons and programs. Inspect the options by looking in the {{ic|/etc/ufw/applications.d}} directory or by listing them in the program itself:<br />
<br />
# ufw app list<br />
<br />
If users are running any of the applications on a non-standard port, it is recommended to simply make {{ic|/etc/ufw/applications.d/custom}} containing the needed data using the defaults as a guide.<br />
<br />
{{Warning|If users modify any of the PKG provided rule sets, these will be overwritten the first time the ufw package is updated. This is why custom app definitions need to reside in a non-PKG file as recommended above!}}<br />
<br />
Example, deluge with custom tcp ports that range from 20202-20205:<br />
<br />
{{bc|1=<br />
[Deluge-my]<br />
title=Deluge<br />
description=Deluge BitTorrent client<br />
ports=20202:20205/tcp<br />
}}<br />
<br />
Should you require to define both tcp and udp ports for the same application, simply separate them with a pipe as shown: this app opens tcp ports 10000-10002 and udp port 10003:<br />
ports=10000:10002/tcp|10003/udp<br />
<br />
One can also use a comma to define ports if a range is not desired. This example opens tcp ports 10000-10002 (inclusive) and udp ports 10003 and 10009<br />
<br />
ports=10000:10002/tcp|10003,10009/udp<br />
<br />
== Deleting applications ==<br />
<br />
Drawing on the Deluge/Deluge-my example above, the following will remove the standard Deluge rules and replace them with the Deluge-my rules from the above example:<br />
<br />
# ufw delete allow Deluge<br />
# ufw allow Deluge-my<br />
<br />
Query the result via the status command:<br />
<br />
{{hc|# ufw status|<br />
Status: active<br />
To Action From<br />
-- ------ ----<br />
Anywhere ALLOW 192.168.0.0/24<br />
SSH ALLOW Anywhere<br />
Deluge-my ALLOW Anywhere<br />
}}<br />
<br />
== Rate limiting with ufw ==<br />
<br />
ufw has the ability to deny connections from an IP address that has attempted to initiate 6 or more connections in the last 30 seconds. Users should consider using this option for services such as sshd.<br />
<br />
Using the above basic configuration, to enable rate limiting we would simply replace the allow parameter with the limit parameter. The new rule will then replace the previous.<br />
<br />
{{hc|# ufw limit SSH|<br />
Rule updated<br />
}}<br />
<br />
{{hc|# ufw status|<br />
Status: active<br />
To Action From<br />
-- ------ ----<br />
Anywhere ALLOW 192.168.0.0/24<br />
SSH LIMIT Anywhere<br />
Deluge-my ALLOW Anywhere<br />
}}<br />
<br />
== User rules ==<br />
All user rules are stored in {{ic|usr/lib/ufw/user.rules}} and {{ic|usr/lib/ufw/user6.rules}} for IPv4 and IPv6 respectively.<br />
<br />
== Tips and tricks ==<br />
<br />
=== Disable remote ping ===<br />
Change {{ic|ACCEPT}} to {{ic|DROP}} in the following lines:<br />
<br />
{{hc|/etc/ufw/before.rules|<br />
# ok icmp codes<br />
-A ufw-before-input -p icmp --icmp-type destination-unreachable -j ACCEPT<br />
-A ufw-before-input -p icmp --icmp-type source-quench -j ACCEPT<br />
-A ufw-before-input -p icmp --icmp-type time-exceeded -j ACCEPT<br />
-A ufw-before-input -p icmp --icmp-type parameter-problem -j ACCEPT<br />
-A ufw-before-input -p icmp --icmp-type echo-request -j ACCEPT<br />
}}<br />
<br />
If you use IPv6, related rules are in {{ic|/etc/ufw/before6.rules}}.<br />
<br />
=== Disable UFW logging ===<br />
Disabling logging may be useful to stop UFW filling up the kernel ({{ic|dmesg}}) and message logs:<br />
<br />
# ufw logging off<br />
<br />
== GUI frontends ==<br />
<br />
=== Gufw ===<br />
<br />
{{Pkg|gufw}} is a GTK front-end for Ufw that aims to make managing a Linux firewall as accessible and easy as possible. It features pre-sets for common ports and p2p applications. It requires {{Pkg|python}}, {{Pkg|ufw}}, and GTK support.<br />
<br />
=== kcm-ufw ===<br />
<br />
{{AUR|kcm-ufw}} is KDE4 control module for ufw. The following features are supported:<br />
* Enable/disable firewall<br />
* Configure firewall default settings<br />
* Add, edit, and remove rules<br />
* Re-order rules via drag'n'drop<br />
* Import/export of rules<br />
* Setting of some IP tables modules<br />
<br />
The module will appear under "Network and Connectivity" category.<br />
<br />
== See also ==<br />
<br />
* [[sshguard]]<br />
* [http://help.ubuntu.com/community/UFW Ubuntu UFW documentation]<br />
* [http://manpages.ubuntu.com/manpages/natty/en/man8/ufw.8.html UFW manual]</div>Beta990https://wiki.archlinux.org/index.php?title=Uncomplicated_Firewall&diff=411955Uncomplicated Firewall2015-12-13T16:43:58Z<p>Beta990: /* Tips and tricks */ Added UFW logging, helps keeping the dmesg clean</p>
<hr />
<div>[[Category:Firewalls]]<br />
[[ja:Uncomplicated Firewall]]<br />
From the project [https://launchpad.net/ufw home page]:<br />
: ''Ufw stands for Uncomplicated Firewall, and is a program for managing a netfilter [[firewall]]. It provides a command line interface and aims to be uncomplicated and easy to use.''<br />
<br />
== Installation ==<br />
<br />
{{Pkg|ufw}} can be installed from the [[official repositories]].<br />
<br />
Start ufw as [[systemd]] [[Daemon|service]] to have it running and enable it to make it available after boot.<br />
<br />
== Basic configuration ==<br />
<br />
A very simplistic configuration which will deny all by default, allow any protocol from inside a 192.168.0.1-192.168.0.255 LAN, and allow incoming Deluge and SSH traffic from anywhere:<br />
<br />
# ufw default deny<br />
# ufw allow from 192.168.0.0/24<br />
# ufw allow Deluge<br />
# ufw allow SSH<br />
<br />
The next line is only needed ''once'' the first time you install the package: <br />
<br />
# ufw enable<br />
<br />
Then enable the {{ic|ufw}} service with [[Systemd#Using units|systemctl]].<br />
<br />
Finally, query the rules being applied via the status command:<br />
{{hc|# ufw status|<br />
Status: active<br />
To Action From<br />
-- ------ ----<br />
Anywhere ALLOW 192.168.0.0/24<br />
Deluge ALLOW Anywhere<br />
SSH ALLOW Anywhere<br />
}}<br />
The status report shows the rules added by the user. For most cases this will be what is needed, but it is good to be aware that builtin-rules do exist. These include filters to allow UPNP, AVAHI and DHCP replies. In order to see all rules setup <br />
# ufw show raw <br />
may be used, as well as further reports listed in the manpage. Since these reports also summarize traffic, they may be somewhat difficult to read. Another way to check for accepted traffic: <br />
# iptables -S | grep ACCEPT<br />
While this works just fine for reporting, keep in mind not to enable the {{ic|iptables}} service as long as you use {{ic|ufw}} for managing it. <br />
{{Note|If special network variables are set on the system in {{ic|/etc/sysctl.d/*}}, it may be necessary to update {{ic|/etc/ufw/sysctl.conf}} accordingly since this configuration overrides the default settings.}}<br />
<br />
== Adding other applications ==<br />
<br />
The PKG comes with some defaults based on the default ports of many common daemons and programs. Inspect the options by looking in the {{ic|/etc/ufw/applications.d}} directory or by listing them in the program itself:<br />
<br />
# ufw app list<br />
<br />
If users are running any of the applications on a non-standard port, it is recommended to simply make {{ic|/etc/ufw/applications.d/custom}} containing the needed data using the defaults as a guide.<br />
<br />
{{Warning|If users modify any of the PKG provided rule sets, these will be overwritten the first time the ufw package is updated. This is why custom app definitions need to reside in a non-PKG file as recommended above!}}<br />
<br />
Example, deluge with custom tcp ports that range from 20202-20205:<br />
<br />
{{bc|1=<br />
[Deluge-my]<br />
title=Deluge<br />
description=Deluge BitTorrent client<br />
ports=20202:20205/tcp<br />
}}<br />
<br />
Should you require to define both tcp and udp ports for the same application, simply separate them with a pipe as shown: this app opens tcp ports 10000-10002 and udp port 10003:<br />
ports=10000:10002/tcp|10003/udp<br />
<br />
One can also use a comma to define ports if a range is not desired. This example opens tcp ports 10000-10002 (inclusive) and udp ports 10003 and 10009<br />
<br />
ports=10000:10002/tcp|10003,10009/udp<br />
<br />
== Deleting applications ==<br />
<br />
Drawing on the Deluge/Deluge-my example above, the following will remove the standard Deluge rules and replace them with the Deluge-my rules from the above example:<br />
<br />
# ufw delete allow Deluge<br />
# ufw allow Deluge-my<br />
<br />
Query the result via the status command:<br />
<br />
{{hc|# ufw status|<br />
Status: active<br />
To Action From<br />
-- ------ ----<br />
Anywhere ALLOW 192.168.0.0/24<br />
SSH ALLOW Anywhere<br />
Deluge-my ALLOW Anywhere<br />
}}<br />
<br />
== Rate limiting with ufw ==<br />
<br />
ufw has the ability to deny connections from an IP address that has attempted to initiate 6 or more connections in the last 30 seconds. Users should consider using this option for services such as sshd.<br />
<br />
Using the above basic configuration, to enable rate limiting we would simply replace the allow parameter with the limit parameter. The new rule will then replace the previous.<br />
<br />
{{hc|# ufw limit SSH|<br />
Rule updated<br />
}}<br />
<br />
{{hc|# ufw status|<br />
Status: active<br />
To Action From<br />
-- ------ ----<br />
Anywhere ALLOW 192.168.0.0/24<br />
SSH LIMIT Anywhere<br />
Deluge-my ALLOW Anywhere<br />
}}<br />
<br />
== User rules ==<br />
All user rules are stored in {{ic|usr/lib/ufw/user.rules}} and {{ic|usr/lib/ufw/user6.rules}} for IPv4 and IPv6 respectively.<br />
<br />
== Tips and tricks ==<br />
<br />
=== Disable remote ping ===<br />
Change {{ic|ACCEPT}} to {{ic|DROP}} in the following lines:<br />
<br />
{{hc|/etc/ufw/before.rules|<br />
# ok icmp codes<br />
-A ufw-before-input -p icmp --icmp-type destination-unreachable -j ACCEPT<br />
-A ufw-before-input -p icmp --icmp-type source-quench -j ACCEPT<br />
-A ufw-before-input -p icmp --icmp-type time-exceeded -j ACCEPT<br />
-A ufw-before-input -p icmp --icmp-type parameter-problem -j ACCEPT<br />
-A ufw-before-input -p icmp --icmp-type echo-request -j ACCEPT<br />
}}<br />
<br />
If you use IPv6, related rules are in {{ic|/etc/ufw/before6.rules}}.<br />
<br />
=== Disable UFW logging ===<br />
Disabling logging may be useful to stop UFW filling up the kernel ({{ic|dmesg}}) and message logs:<br />
<br />
# ufw logging off<br />
<br />
== GUI frontends ==<br />
<br />
=== Gufw ===<br />
<br />
{{Pkg|gufw}} is a GTK front-end for Ufw that aims to make managing a Linux firewall as accessible and easy as possible. It features pre-sets for common ports and p2p applications. It requires {{Pkg|python}}, {{Pkg|ufw}}, and GTK support.<br />
<br />
=== kcm-ufw ===<br />
<br />
{{AUR|kcm-ufw}} is KDE4 control module for ufw. The following features are supported:<br />
* Enable/disable firewall<br />
* Configure firewall default settings<br />
* Add, edit, and remove rules<br />
* Re-order rules via drag'n'drop<br />
* Import/export of rules<br />
* Setting of some IP tables modules<br />
<br />
The module will appear under "Network and Connectivity" category.<br />
<br />
== See also ==<br />
<br />
* [[sshguard]]<br />
* [http://help.ubuntu.com/community/UFW Ubuntu UFW documentation]<br />
* [http://manpages.ubuntu.com/manpages/natty/en/man8/ufw.8.html UFW manual]</div>Beta990https://wiki.archlinux.org/index.php?title=Btrfs&diff=411194Btrfs2015-12-07T18:57:10Z<p>Beta990: /* btrfs check */ Removed example, since it is already mention how to use in the man pages and also on the Btrfs Wiki. Also this isn't a blog, there's already a page about backups, etc.</p>
<hr />
<div>[[Category:File systems]]<br />
[[ja:Btrfs]]<br />
[[zh-CN:Btrfs]]<br />
{{Related articles start}}<br />
{{Related|File systems}}<br />
{{Related|Btrfs - Tips and tricks}}<br />
{{Related|Mkinitcpio-btrfs}}<br />
{{Related|Snapper}}<br />
{{Related articles end}}<br />
<br />
From [[Wikipedia:Btrfs]]<br />
<br />
:''Btrfs (B-tree file system, variously pronounced: "Butter F S", "Better F S", "B-tree F S", or simply "Bee Tee Arr Eff Ess") is a GPL-licensed experimental copy-on-write file system for Linux. Development began at Oracle Corporation in 2007.''<br />
<br />
From [https://btrfs.wiki.kernel.org/index.php/Main_Page Btrfs Wiki]<br />
<br />
:''Btrfs is a new copy on write (CoW) filesystem for Linux aimed at implementing advanced features while focusing on fault tolerance, repair and easy administration. Jointly developed at Oracle, Red Hat, Fujitsu, Intel, SUSE, STRATO and many others, Btrfs is licensed under the GPL and open for contribution from anyone.''<br />
<br />
{{Warning|<br />
* Btrfs has some features that are considered experimental. See the Btrfs Wiki's [https://btrfs.wiki.kernel.org/index.php/Main_Page#Stability_status Stability status,] [https://btrfs.wiki.kernel.org/index.php/FAQ#Is_btrfs_stable.3F Is Btrfs stable,] and [https://btrfs.wiki.kernel.org/index.php/Getting_started Getting started] for more detailed information.<br />
* Beware of the [[#Limitations|limitations]].<br />
}}<br />
<br />
== Installation ==<br />
<br />
The official kernels {{Pkg|linux}} and {{Pkg|linux-lts}} include support for Btrfs, user space utilities are available in {{Pkg|btrfs-progs}}. <br />
<br />
[[GRUB]], [[mkinitcpio]], and [[Syslinux]] have support for Btrfs and require no additional configuration.<br />
<br />
=== Additional packages ===<br />
<br />
* {{Pkg|btrfs-progs}} includes ''btrfsck'', a tool that can fix errors on Btrfs filesystems.<br />
* {{AUR|btrfs-progs-git}} for nightly<br />
<br />
{{Tip|See [https://btrfs.wiki.kernel.org/index.php/Getting_started Btrfs Wiki Getting Started] for suggestions regarding running Btrfs effectively.}}<br />
<br />
== General administration of Btrfs ==<br />
<br />
=== Creating a new file system ===<br />
<br />
A Btrfs file system can either be newly created or have one converted.<br />
<br />
To format a partition do:<br />
<br />
# mkfs.btrfs -L ''mylabel'' /dev/''partition''<br />
<br />
{{Note|1=As of [https://git.kernel.org/cgit/linux/kernel/git/mason/btrfs-progs.git/commit/?id=c652e4efb8e2dd76ef1627d8cd649c6af5905902 this] commit (November 2013), Btrfs default blocksize is 16KB.}}<br />
<br />
To use a larger blocksize for data/metadata, specify a value for the {{ic|nodesize}} via the {{ic|-n}} switch as shown in this example using 16KB blocks:<br />
<br />
# mkfs.btrfs -L ''mylabel'' -n 16k /dev/''partition''<br />
<br />
Multiple devices can be entered to create a RAID. Supported RAID levels include RAID 0, RAID 1, RAID 10, RAID 5 and RAID 6. The RAID levels can be configured separately for data and metadata using the {{ic|-d}} and {{ic|-m}} options respectively. By default the metadata is mirrored and data is striped. See [https://btrfs.wiki.kernel.org/index.php/Using_Btrfs_with_Multiple_Devices Using Btrfs with Multiple Devices] for more information about how to create a Btrfs RAID volume.<br />
<br />
# mkfs.btrfs [''options''] /dev/''part1'' /dev/''part2'' ...<br />
<br />
=== Convert from Ext3/4 ===<br />
<br />
{{Warning| As of mid-to-late 2015, there are many reports on the btrfs mailing list about incomplete/corrupt/broken conversions. The situation is improving as patches are being submitted, but proceed very carefully. Make sure you have ''working'' backups of any data you cannot afford to lose. See [https://btrfs.wiki.kernel.org/index.php/Conversion_from_Ext3 Conversion from Ext3] on the btrfs wiki.}}<br />
<br />
Boot from an install CD, then convert by doing:<br />
<br />
# btrfs-convert /dev/''partition''<br />
<br />
Mount the partion and test the conversion by checking the files. Be sure to change the {{ic|/etc/fstab}} to reflect the change ('''type''' to {{ic|btrfs}} and '''fs_passno''' [the last field] to {{ic|0}} as Btrfs does not do a file system check on boot). Also note that the UUID of the partition will have changed, so update fstab accordingly when using UUIDs. {{ic|chroot}} into the system and rebuild the GRUB menu list (see [[Install from existing Linux]] and [[GRUB]] articles). If converting a root filesystem, while still chrooted run {{ic|mkinitcpio -p linux}} to regenerate the initramfs or the system will not successfully boot. If you get stuck in grub with 'unknown filesystem' try reinstalling grub with {{ic|grub-install /dev/''partition''}} and regenerate the config as well {{ic|grub-mkconfig -o /boot/grub/grub.cfg}}.<br />
<br />
After confirming that there are no problems, complete the conversion by deleting the backup {{ic|ext2_saved}} sub-volume. Note that you cannot revert back to ext3/4 without it.<br />
<br />
# btrfs subvolume delete /ext2_saved<br />
<br />
Finally [[#Balance|balance]] the file system to reclaim the space.<br />
<br />
=== Mount options ===<br />
<br />
{{Warning|Specific mount options can disable safety features and increase the risk of complete file system corruption.}}<br />
<br />
See [https://btrfs.wiki.kernel.org/index.php/Mount_options Btrfs Wiki Mount options] and [https://btrfs.wiki.kernel.org/index.php/Gotchas Btrfs Wiki Gotchas] for more information.<br />
<br />
In addition to configurations that can be made during or after file system creation, the various mount options for Btrfs can drastically change its performance characteristics.<br />
<br />
As this is a file system that is still in active development, changes and regressions should be expected. See links in the [[#See also]] section for some benchmarks.<br />
<br />
==== Examples ====<br />
<br />
* '''Linux 3.15'''<br />
** Btrfs on a SSD for system installation and an emphasis on maximizing performance (also read [[#SSD TRIM]])<br />
*:{{bc|1=noatime,discard,ssd,compress=lzo,space_cache}}<br />
** Btrfs on a HDD for archival purposes with an emphasis on maximizing space.<br />
*: {{bc|1=noatime,autodefrag,compress-force=lzo,space_cache}}<br />
<br />
=== Displaying used/free space ===<br />
<br />
General linux userspace tools such as {{ic|/usr/bin/df}} will inaccurately report free space on a Btrfs partition since it does not take into account space allocated for and used by the metadata. It is recommended to use {{ic|/usr/bin/btrfs}} to query a Btrfs partition. Below is an illustration of this effect, first querying using {{ic|df -h}}, and then using {{ic|btrfs filesystem df}}:<br />
<br />
{{hc|$ df -h /|<br />
Filesystem Size Used Avail Use% Mounted on<br />
/dev/sda3 119G 3.0G 116G 3% /<br />
}}<br />
<br />
{{hc|$ btrfs filesystem df /|2=<br />
Data: total=3.01GB, used=2.73GB<br />
System: total=4.00MB, used=16.00KB<br />
Metadata: total=1.01GB, used=181.83MB<br />
}}<br />
<br />
Notice that {{ic|df -h}} reports 3.0GB used but {{ic|btrfs filesystem df}} reports 2.73GB for the data. This is due to the way Btrfs allocates space into the pool. The true disk usage is the sum of all three 'used' values which is inferior to 3.0GB as reported by {{ic|df -h}}.<br />
<br />
{{Note|1=If you see an entry of type {{ic|unknown}} in the output of {{ic|btrfs filesystem df}} at kernel >= 3.15, this is a display bug. As of [http://thread.gmane.org/gmane.comp.file-systems.btrfs/34419 this patch], the entry means GlobalReserve, which is kind of a buffer for changes not yet flushed. This entry is displayed as {{ic|unknown, single}} in RAID setups and is not possible to re-balance.}}<br />
<br />
Another useful command to show a less verbose readout of used space is {{ic|btrfs filesystem show}}:<br />
<br />
{{hc|# btrfs filesystem show /dev/sda3|<br />
failed to open /dev/sr0: No medium found<br />
Label: 'arch64' uuid: 02ad2ea2-be12-2233-8765-9e0a48e9303a<br />
Total devices 1 FS bytes used 2.91GB<br />
devid 1 size 118.95GB used 4.02GB path /dev/sda2<br />
<br />
Btrfs v0.20-rc1-358-g194aa4a-dirty<br />
}}<br />
<br />
== Limitations ==<br />
<br />
A few limitations should be known before trying.<br />
<br />
=== Encryption ===<br />
<br />
Btrfs has no built-in encryption support (this may come in future); users can encrypt the partition before running {{ic|mkfs.btrfs}}. See [[dm-crypt]]. <br />
<br />
Existing Btrfs file system, can use something like [[EncFS]] or [[TrueCrypt]], though perhaps without some of Btrfs' features.<br />
<br />
=== Swap file ===<br />
<br />
Btrfs does not yet support [[Swap#Swap_file|swap files]]. This is due to swap files requiring a function that Btrfs doesn't have for possibility of file system corruption [https://btrfs.wiki.kernel.org/index.php/FAQ#Does_btrfs_support_swap_files.3F]. Patches for swapfile support are already available [https://lkml.org/lkml/2014/12/9/718] and may be included in an upcoming kernel release. As an alternative a swap file can be mounted on a loop device with poorer performance but will not be able to hibernate. Install the package {{Pkg|systemd-swap}} from the [[official repositories]] to automate this.<br />
<br />
=== Linux-rt kernel ===<br />
<br />
As of version 3.14.12_rt9, the [[Kernel#-rt|linux-rt]] kernel does not boot with the Btrfs file system. This is due to the slow development of the ''rt'' patchset.<br />
<br />
== Features ==<br />
<br />
Various features are available and can be adjusted.<br />
<br />
=== Commit interval settings ===<br />
<br />
The resolution at which data are written to the filesystem is dictated by Btrfs itself and by system-wide settings. Btrfs defaults to a 30 seconds checkpoint interval in which new data are committed to the filesystem. This is tuneable using mount options (see below)<br />
<br />
System-wide settings also affect commit intervals. They include the files under {{ic|/proc/sys/vm/*}} and are out-of-scope of this wiki article. The kernel documentation for them resides in {{ic|Documentation/sysctl/vm.txt}}.<br />
<br />
=== Copy-On-Write (CoW) ===<br />
<br />
By default, Btrfs performs copy-on-write for all files, at all times: If you write a file that did not exist before, then the data is written to empty space, and some of the metadata blocks that make up the filesystem are copied-on-write. In a traditional filesystem, if you then go back and overwrite a piece of that file, then the piece you are writing is put directly over the data it is replacing. In a CoW filesystem, the new data is written to a piece of free space on the disk, and only then is the file's metadata changed to refer to the new data. The old data that was replaced can then be freed up if nothing points to it any more.<br />
<br />
Copy-on-write comes with some advantages, but can negatively affect performance with large files that have small random writes because it will fragment them (even if no "copy" is ever performed!). It is recommended to disable copy-on-write for database files and virtual machine images. <br />
<br />
One can disable copy-on-write for the entire block device by mounting it with {{ic|nodatacow}} option. However, this will disable copy-on-write for the entire file system.<br />
<br />
{{Note|{{ic|nodatacow}} will only affect newly created files. Copy-on-write may still happen for existing files.}}<br />
<br />
To disable copy-on-write for single files/directories do:<br />
<br />
$ chattr +C ''/dir/file''<br />
<br />
This will disable copy-on-write for those operation in which there is only one reference to the file. If there is more than one reference (e.g. through {{ic|1=cp --reflink=always}} or because of a filesystem snapshot), copy-on-write still occurs.<br />
<br />
{{Note|From chattr man page: For Btrfs, the 'C' flag should be set on new or empty files. If it is set on a file which already has data blocks, it is undefined when the blocks assigned to the file will be fully stable. If the 'C' flag is set on a directory, it will have no effect on the directory, but new files created in that directory will have the {{ic|No_COW}} attribute.}}<br />
<br />
{{Tip|In accordance with the note above, you can use the following trick to disable copy-on-write on existing files in a directory:<br />
$ mv ''/path/to/dir'' ''/path/to/dir''_old<br />
$ mkdir ''/path/to/dir''<br />
$ chattr +C ''/path/to/dir''<br />
$ cp -a ''/path/to/dir''_old/* ''/path/to/dir''<br />
$ rm -rf ''/path/to/dir''_old<br />
Make sure that the data are not used during this process. Also note that {{ic|mv}} or {{ic|cp --reflink}} as described below will not work.<br />
}}<br />
<br />
Likewise, to save space by forcing copy-on-write when copying files use:<br />
<br />
$ cp --reflink ''source'' ''dest'' <br />
<br />
As {{ic|''dest''}} file is changed, only those blocks that are changed from source will be written to the disk. One might consider aliasing ''cp'' to {{ic|1=cp --reflink=auto}}.<br />
<br />
=== Multi-device filesystem and RAID feature ===<br />
<br />
See [https://btrfs.wiki.kernel.org/index.php/Using_Btrfs_with_Multiple_Devices Using Btrfs with Multiple Devices] for suggestions.<br />
<br />
==== Multi-device filesystem ====<br />
<br />
When creating a Btrfs filesystem, one can pass many partitions or disk devices to ''mkfs.btrfs''. The filesystem will be created across these devices. One can '''"'''pool'''"''' this way, multiple partitions or devices to get a single Btrfs filesystem.<br />
<br />
One can also add or remove device from an existing Btrfs filesystem (caution is mandatory).<br />
<br />
==== RAID features ====<br />
<br />
{{Note|As of kernel 3.19, the recovery and rebuild code has been integrated. This brings the implementation to the point where it should be usable for most purposes. Since this is new code, you should expect it to stabilize over the next couple of kernel releases.}}<br />
<br />
When creating a multi-device filesystem, one can also specify to use RAID0, RAID1, RAID10, RAID5 or RAID6 across the devices comprising the filesystem. RAID levels can be applied independently to data and metadata. By default, metadata is duplicated on single volumes or RAID1 on multi-disk sets.<br />
<br />
Btrfs works in block-pairs for raid0, raid1, and raid10. This means:<br />
<br />
raid0 - block-pair striped across 2 devices<br />
<br />
raid1 - block-pair written to 2 devices<br />
<br />
The raid level can be changed while the disks are online using the {{ic|btrfs balance}} command:<br />
<br />
# btrfs balance start -mconvert=RAIDLEVEL -dconvert=RAIDLEVEL /path/to/mount<br />
<br />
For 2 disk sets, this matches raid levels as defined in md-raid (mdadm). For 3+ disk-sets, the result is entirely different than md-raid. <br />
<br />
For example:<br />
* Three 1TB disks in an md based raid1 yields a {{ic|/dev/md0}} with 1TB free space and the ability to safely lose 2 disks without losing data.<br />
* Three 1TB disks in a Btrfs volume with data=raid1 will allow the storage of approximately 1.5TB of data before reporting full. Only 1 disk can safely be lost without losing data.<br />
<br />
Btrfs uses a round-robin scheme to decide how block-pairs are spread among disks. As of Linux 3.0, a quasi-round-robin scheme is used which prefers larger disks when distributing block pairs. This allows raid0 and raid1 to take advantage of most (and sometimes all) space in a disk set made of multiple disks. For example, a set consisting of a 1TB disk and 2 500GB disks with data=raid1 will place a copy of every block on the 1TB disk and alternate (round-robin) placing blocks on each of the 500GB disks. Full space utilization will be made. A set made from a 1TB disk, a 750GB disk, and a 500GB disk will work the same, but the filesystem will report full with 250GB unusable on the 750GB disk. To always take advantage of the full space (even in the last example), use data=single. (data=single is akin to JBOD defined by some raid controllers) See [https://btrfs.wiki.kernel.org/index.php/FAQ#How_much_space_do_I_get_with_unequal_devices_in_RAID-1_mode.3F the Btrfs FAQ] for more info.<br />
<br />
=== Sub-volumes ===<br />
<br />
See the following links for more details:<br />
* [https://btrfs.wiki.kernel.org/index.php/SysadminGuide#Subvolumes Btrfs Wiki SysadminGuide#Subvolumes]<br />
* [https://btrfs.wiki.kernel.org/index.php/Getting_started#Basic_Filesystem_Commands Btrfs Wiki Getting started#Basic Filesystem Commands]<br />
* [https://btrfs.wiki.kernel.org/index.php/Trees Btrfs Wiki Trees] <br />
<br />
==== Creating sub-volumes ====<br />
<br />
To create a sub-volume:<br />
<br />
# btrfs subvolume create ''/path/to/subvolume''<br />
<br />
==== Listing sub-volumes ====<br />
<br />
To see a list of current sub-volumes:<br />
<br />
# btrfs subvolume list -p .<br />
<br />
==== Setting a default sub-volume ====<br />
<br />
{{Warning|Changing the default subvolume with {{ic|btrfs subvolume set-default}} will make the top level of the filesystem inaccessible, except by use of the {{ic|1=subvolid=0}} mount option. Reference: [https://btrfs.wiki.kernel.org/index.php/SysadminGuide Btrfs Wiki Sysadmin Guide].}}<br />
<br />
The default sub-volume is mounted if no {{ic|1=subvol=}} mount option is provided.<br />
<br />
# btrfs subvolume set-default ''subvolume-id'' /.<br />
<br />
'''Example:'''<br />
<br />
{{hc|# btrfs subvolume list .|<br />
ID 258 gen 9512 top level 5 path root_subvolume<br />
ID 259 gen 9512 top level 258 path home<br />
ID 260 gen 9512 top level 258 path var<br />
ID 261 gen 9512 top level 258 path usr<br />
}}<br />
<br />
# btrfs subvolume set-default 258 .<br />
<br />
'''Reset:'''<br />
<br />
# btrfs subvolume set-default 0 .<br />
<br />
==== Snapshots ====<br />
<br />
See [https://btrfs.wiki.kernel.org/index.php/SysadminGuide#Snapshots Btrfs Wiki SysadminGuide#Snapshots] for details.<br />
<br />
To create a snapshot:<br />
<br />
# btrfs subvolume snapshot ''source'' [''dest''/]''name''<br />
<br />
Snapshots are not recursive. Every sub-volume inside sub-volume will be an empty directory inside the snapshot.<br />
<br />
=== Defragmentation ===<br />
<br />
Btrfs supports online defragmentation. To defragment the metadata of the root folder:<br />
<br />
# btrfs filesystem defragment /<br />
<br />
This ''will not'' defragment the entire file system. For more information read [https://btrfs.wiki.kernel.org/index.php/Problem_FAQ#Defragmenting_a_directory_doesn.27t_work this page] on the Btrfs wiki.<br />
<br />
To defragment the entire file system verbosely:<br />
<br />
# btrfs filesystem defragment -r -v /<br />
<br />
{{Note|The command above will defragment only file data. To defragment directory metadata for every directory in the file system, run this command: {{bc|# find / -xdev -type d -print -exec btrfs filesystem defragment '{}' \;}}}}<br />
<br />
=== Compression ===<br />
<br />
Btrfs supports transparent compression, meaning every file on the partition is automatically compressed. This not only reduces the size of files, but also [http://www.phoronix.com/scan.php?page=article&item=btrfs_compress_2635&num=1 improves performance], in particular if using the [http://www.phoronix.com/scan.php?page=article&item=btrfs_lzo_2638&num=1 lzo algorithm], in some specific use cases (e.g. single thread with heavy file IO), while obviously harming performance on other cases (e.g. multithreaded and/or cpu intensive tasks with large file IO).<br />
<br />
Compression is enabled using the {{ic|1=compress=zlib}} or {{ic|1=compress=lzo}} mount options. Only files created or modified after the mount option is added will be compressed. However, it can be applied quite easily to existing files (e.g. after a conversion from ext3/4) using the {{ic|btrfs filesystem defragment -c''alg''}} command, where {{ic|''alg''}} is either {{ic|zlib}} or {{ic|lzo}}. In order to re-compress the whole file system with {{ic|lzo}}, run the following command:<br />
<br />
# btrfs filesystem defragment -r -v -clzo /<br />
<br />
{{Tip|Compression can also be enabled per-file without using the {{ic|compress}} mount option; simply apply {{ic|chattr +c}} to the file. When applied to directories, it will cause new files to be automatically compressed as they come.}}<br />
<br />
When installing Arch to an empty Btrfs partition, set the {{ic|compress}} option after [[Beginners' guide#Prepare the storage devices|preparing the storage drive]]. Simply switch to another terminal ({{ic|Ctrl+Alt+''number''}}), and run the following command:<br />
<br />
# mount -o remount,compress=lzo /mnt/target<br />
<br />
After the installation is finished, add {{ic|1=compress=lzo}} to the mount options of the root file system in [[fstab]].<br />
<br />
=== Checkpoint interval ===<br />
<br />
Starting with Linux 3.12, users are able to change the checkpoint interval from the default 30 s to any value by appending the {{ic|commit}} mount option in {{ic|/etc/fstab}} for the btrfs partition.<br />
<br />
LABEL=arch64 / btrfs defaults,noatime,ssd,compress=lzo,commit=120 0 0<br />
<br />
=== Partitioning ===<br />
<br />
Btrfs can occupy an entire data storage device, replacing the [[MBR]] or [[GPT]] partitioning schemes. One can use [[#Sub-volumes|subvolumes]] to simulate partitions.<br />
There are some limitations to this approach in single disk setups:<br />
<br />
* Cannot use different [[file systems]] for different [[fstab|mount points]].<br />
* Cannot use [[Swap|swap area]] as Btrfs does not support [[Swap#Swap_file|swap files]] and there is no place to create [[Swap#Swap_partition|swap partition]]. This also limits the use of hibernation/resume, which needs a swap area to store the hibernation image.<br />
* Cannot use [[UEFI]] to boot.<br />
<br />
To overwrite the existing partition table with Btrfs, run the following command:<br />
<br />
# mkfs.btrfs /dev/sd''X''<br />
<br />
Do not specify {{ic|/dev/sda''X''}} or it will format an existing partition instead of replacing the entire partitioning scheme.<br />
<br />
Install the [[boot loader]] in a like fashion to installing it for a data storage device with a [[Master Boot Record]]. For example:<br />
<br />
# grub-install --recheck /dev/sd''X''<br />
<br />
for [[GRUB#Install_to_440-byte_MBR_boot_code_region|GRUB]].<br />
<br />
{{Warning|Using the {{ic|btrfs subvolume set-default}} command to change the default sub-volume from anything other than the top level (ID 0) may break Grub. See [[#Setting a default sub-volume]] to reset.}}<br />
<br />
=== Scrub ===<br />
See [https://btrfs.wiki.kernel.org/index.php/Glossary Btrfs Wiki Glossary].<br />
<br />
# btrfs scrub start /<br />
# btrfs scrub status /<br />
<br />
{{Warning|The running scrub process will prevent the system from suspending, see [http://comments.gmane.org/gmane.comp.file-systems.btrfs/33106 this thread] for details.}}<br />
<br />
==== Services ====<br />
<br />
The {{Pkg|btrfs-progs}} package brings the {{ic|btrfs-scrub@.timer}} unit for monthly scrubbing the specified mountpoint. [[Enable]] the timer with an encoded path, e.g. {{ic|btrfs-scrub@-.timer}} for {{ic|/}} and {{ic|btrfs-scrub@home.timer}} for {{ic|/home}}.<br />
<br />
{{Accuracy|The {{ic|btrfs-scrub@.service}} unit provided by {{Pkg|btrfs-progs}} does not use {{ic|1=Type=forking}}.}}<br />
<br />
{{Note|If running the scrub as a systemd service, use {{ic|1=Type=forking}}. Alternatively, you can pass the {{ic|-B}} flag to {{ic|btrfs scrub start}} to run it in the foreground and use the default {{ic|Type}} value.}}<br />
<br />
=== Balance ===<br />
<br />
See [https://btrfs.wiki.kernel.org/index.php/FAQ#What_does_.22balance.22_do.3F Upstream FAQ page].<br />
<br />
Since {{Pkg|btrfs-progs}}-3.12 ''balancing'' is a background process - see {{ic|man 8 btrfs-balance}} for full description.<br />
<br />
# btrfs balance start /<br />
# btrfs balance status /<br />
<br />
=== SSD TRIM ===<br />
A Btrfs filesystem will automatically free unused blocks from an SSD drive supporting the TRIM command.<br />
<br />
More information about enabling and using TRIM can be found on the [[Solid_State_Drives#TRIM| Solid State Drivers]] page.<br />
<br />
== Troubleshooting ==<br />
<br />
See the [https://btrfs.wiki.kernel.org/index.php/Problem_FAQ Btrfs Problem FAQ] for general troubleshooting.<br />
<br />
=== GRUB ===<br />
<br />
==== Partition offset ====<br />
<br />
{{Note|1=The offset problem may happen when you try to embed {{ic|core.img}} into a partitioned disk. It means that [https://wiki.archlinux.org/index.php?title=Talk:Btrfs&diff=319474&oldid=292530 it is OK] to embed grub's {{ic|corg.img}} into a Btrfs pool on a partitionless disk (e.g. {{ic|/dev/sd''X''}}) directly.}}<br />
<br />
[[GRUB]] can boot Btrfs partitions however the module may be larger than other [[file systems]]. And the {{ic|core.img}} file made by {{ic|grub-install}} may not fit in the first 63 sectors (31.5KiB) of the drive between the MBR and the first partition. Up-to-date partitioning tools such as {{ic|fdisk}} and {{ic|gdisk}} avoid this issue by offsetting the first partition by roughly 1MiB or 2MiB.<br />
<br />
==== Missing root ====<br />
<br />
Users experiencing the following: {{ic|1=error no such device: root}} when booting from a RAID style setup then edit /usr/share/grub/grub-mkconfig_lib and remove both quotes from the line {{ic|1=echo " search --no-floppy --fs-uuid --set=root ${hints} ${fs_uuid}"}}. Regenerate the config for grub and the system should boot without an error.<br />
<br />
=== BTRFS: open_ctree failed ===<br />
<br />
As of November 2014 there seems to be a bug in [[systemd]] or [[mkinitcpio]] causing the following error on systems with multi-device Btrfs filesystem using the {{ic|btrfs}} hook in {{ic|mkinitcpio.conf}}:<br />
<br />
{{bc|<nowiki><br />
BTRFS: open_ctree failed<br />
mount: wrong fs type, bad option, bad superblock on /dev/sdb2, missing codepage or helper program, or other error<br />
<br />
In some cases useful info is found in syslog - try dmesg|tail or so.<br />
<br />
You are now being dropped into an emergency shell.<br />
</nowiki>}}<br />
<br />
A workaround is to remove {{ic|btrfs}} from the {{ic|HOOKS}} array in {{ic|/etc/mkinitcpio.conf}} and instead add {{ic|btrfs}} to the {{ic|MODULES}} array. Then regenerate the initramfs with {{ic|mkinitcpio -p linux}} (adjust the preset if needed) and reboot.<br />
<br />
See the [https://bbs.archlinux.org/viewtopic.php?id=189845 original forums thread] and {{Bug|42884}} for further information and discussion.<br />
<br />
You will get the same error if you try to mount a raid array without one of the devices. In that case you must add the {{ic|degraded}} mount option to {{ic|/etc/fstab}}. If your root resides on the array, you must also add {{ic|1=rootflags=degraded}} to your [[kernel parameters]].<br />
<br />
=== btrfs check ===<br />
{{Warning|Since Btrfs is under heavy development, especially the {{ic|btrfs check}} command, it is highly recommended to create a '''backup''' and consult the following Btfrs documentation before executing {{ic|btrfs check}} with the {{ic|--repair}} switch.}}<br />
<br />
The ''[https://btrfs.wiki.kernel.org/index.php/Manpage/btrfs-check btrfs check]'' command can be used to check or repair an unmounted Btrfs filesystem. However, this repair tool is still immature and not able to repair certain filesystem errors even those that do not render the filesystem unmountable.<br />
<br />
See [https://btrfs.wiki.kernel.org/index.php/Btrfsck Btrfsck] for more information.<br />
<br />
== See also ==<br />
<br />
* '''Official site'''<br />
** [https://btrfs.wiki.kernel.org/ Btrfs Wiki]<br />
** [https://btrfs.wiki.kernel.org/index.php/Glossary Btrfs Wiki Glossary]<br />
* '''Official FAQs'''<br />
** [https://btrfs.wiki.kernel.org/index.php/FAQ Btrfs Wiki FAQ]<br />
** [https://btrfs.wiki.kernel.org/index.php/Problem_FAQ Btrfs Wiki Problem FAQ]<br />
* '''Btrfs pull requests'''<br />
** [http://lkml.indiana.edu/hypermail/linux/kernel/1401.3/03045.html 3.14]<br />
** [http://lkml.indiana.edu/hypermail/linux/kernel/1311.1/03526.html 3.13]<br />
** [http://lkml.indiana.edu/hypermail/linux/kernel/1309.1/02981.html 3.12]<br />
** [http://lkml.indiana.edu/hypermail/linux/kernel/1305.1/01064.html 3.11]<br />
* '''Performance related'''<br />
** [http://superuser.com/questions/432188/should-i-put-my-multi-device-btrfs-filesystem-on-disk-partitions-or-raw-devices Btrfs on raw disks?]<br />
** [http://comments.gmane.org/gmane.comp.file-systems.btrfs/19440 Varying leafsize and nodesize in Btrfs]<br />
** [http://comments.gmane.org/gmane.comp.file-systems.btrfs/15646 Btrfs support for efficient SSD operation (data blocks alignment)]<br />
** [https://btrfs.wiki.kernel.org/index.php/FAQ#Is_Btrfs_optimized_for_SSD.3F Is Btrfs optimized for SSDs?]<br />
** '''Phoronix mount option benchmarking'''<br />
*** [http://www.phoronix.com/scan.php?page=article&item=linux_314_btrfs Linux 3.14]<br />
*** [http://www.phoronix.com/scan.php?page=article&item=linux_btrfs_311&num=1 Linux 3.11]<br />
*** [http://www.phoronix.com/scan.php?page=news_item&px=MTM0OTU Linux 3.9]<br />
*** [http://www.phoronix.com/scan.php?page=article&item=btrfs_linux37_mounts&num=1 Linux 3.7]<br />
*** [http://www.phoronix.com/scan.php?page=article&item=linux_btrfs_options&num=1 Linux 3.2]<br />
** [http://blog.erdemagaoglu.com/post/4605524309/lzo-vs-snappy-vs-lzf-vs-zlib-a-comparison-of Lzo vs. zLib]<br />
* '''Miscellaneous'''<br />
** [http://www.funtoo.org/wiki/BTRFS_Fun Funtoo Wiki Btrfs Fun]<br />
** [http://www.phoronix.com/scan.php?page=news_item&px=MTA0ODU Avi Miller presenting Btrfs] at SCALE 10x, January 2012.<br />
** [http://www.phoronix.com/scan.php?page=news_item&px=MTA4Mzc Summary of Chris Mason's talk] from LFCS 2012<br />
** [http://git.kernel.org/?p&#61;linux/kernel/git/torvalds/linux-2.6.git;a&#61;commit;h&#61;35054394c4b3cecd52577c2662c84da1f3e73525 Btrfs: stop providing a bmap operation to avoid swapfile corruptions] 2009-01-21<br />
** [http://marc.merlins.org/perso/btrfs/post_2014-03-22_Btrfs-Tips_-Doing-Fast-Incremental-Backups-With-Btrfs-Send-and-Receive.html Doing Fast Incremental Backups With Btrfs Send and Receive]</div>Beta990https://wiki.archlinux.org/index.php?title=VDPAU&diff=411164VDPAU2015-12-07T10:03:55Z<p>Beta990: /* Configuration */ Mentions VA-API instead of VDPAU</p>
<hr />
<div>[[Category:Graphics]]<br />
[[Category:X server]]<br />
[[ja:VDPAU]]<br />
[[ru:VDPAU]]<br />
[[zh-CN:VDPAU]]<br />
{{Related articles start}}<br />
{{Related|VA-API}}<br />
{{Related|XvMC}}<br />
{{Related articles end}}<br />
<br />
'''[http://http.download.nvidia.com/XFree86/vdpau/doxygen/html/ Video Decode and Presentation API for Unix]''' is an open source library and API to offload portions of the video decoding process and video post-processing to the GPU video-hardware.<br />
<br />
== Supported hardware ==<br />
<br />
'''Open source drivers:'''<br />
<br />
* [[ATI|AMD]] Radeon 9500 and newer GPUs are supported by the {{Pkg|mesa-vdpau}} package.<br />
* [[Intel]] GMA 4500 series and newer GPUs are supported by the {{Pkg|libvdpau-va-gl}} package together with the {{pkg|libva-intel-driver}} package.<br />
* [[Nouveau|NVIDIA]] GeForce 8 series and newer GPUs are supported by the {{Pkg|mesa-vdpau}} package. It [http://nouveau.freedesktop.org/wiki/VideoAcceleration/#firmware requires] the {{AUR|nouveau-fw}} package, which contains the required firmware to operate that is presently extracted from the NVIDIA binary driver.<br />
<br />
'''Proprietary drivers:'''<br />
<br />
* [[AMD Catalyst|AMD]] Radeon HD 4000 series and newer GPUs are supported by the {{Pkg|libvdpau-va-gl}} package together with the {{AUR|libva-xvba-driver}} package. It uses the {{AUR|catalyst-utils}} driver for Radeon HD 5000 series and newer, and {{AUR|catalyst-total-hd234k}} for Radeon HD 4000 series.<br />
* [[NVIDIA]] GeForce 400 series and newer GPUs are supported by the {{Pkg|nvidia-utils}} package.<br />
** GeForce 8/9 and GeForce 100-300 series are supported by the {{Pkg|nvidia-340xx-utils}} package.<br />
<br />
=== Supported formats ===<br />
<br />
{| class="wikitable" style="width: 100%"<br />
! <br />
! colspan="3" | Open source<br />
! colspan="2" | Proprietary<br />
|-<br />
! <br />
! AMD<br />
! Intel<br />
! Nvidia<br />
! AMD<br />
! Nvidia<br />
|-<br />
| MPEG2 decoding<br />
| Radeon 9500 and newer<br />
| <center>—<sup>2</sup></center><br />
| GeForce 8 and newer<br />
| <center>—<sup>2</sup></center><br />
| GeForce 8 and newer<br />
|-<br />
| MPEG4 decoding<br />
| Radeon HD 6000 and newer<br />
| <center>—<sup>2</sup></center><br />
| GeForce 200 and newer<br />
| <center>—<sup>2</sup></center><br />
| GeForce 200 and newer<br />
|-<br />
| H.264 decoding<br />
| Radeon HD 4000 and newer<br />
| GMA 4500<sup>1</sup>, Ironlake Graphics and newer<br />
| GeForce 8 and newer<br />
| Radeon HD 4000 and newer<br />
| GeForce 8 and newer<br />
|-<br />
| HEVC (H.265) decoding<br />
| <center>—</center><br />
| <center>—<sup>2</sup></center><br />
| <center>—</center><br />
| <center>—<sup>2</sup></center><br />
| GeForce 900<sup>4</sup> and newer<br />
|-<br />
| VC1 decoding<br />
| Radeon HD 4000 and newer<br />
| <center>—<sup>2</sup></center><br />
| GeForce 8<sup>3</sup> and newer<br />
| <center>—<sup>2</sup></center><br />
| GeForce 8<sup>3</sup> and newer<br />
|}<br />
<br />
* <sup>1</sup> Supported by the {{AUR|libva-intel-driver-g45-h264}} package. See [[Intel graphics#H.264 decoding on GMA 4500]] for instructions and caveats.<br />
* <sup>2</sup> As of version 0.3, the VA GL driver doesn't support any other hardware decoder than H.264.<br />
* <sup>3</sup> [[Wikipedia:Nvidia PureVideo|Except]] GeForce 8800 Ultra, 8800 GTX, 8800 GTS (320/640 MB).<br />
* <sup>4</sup> Except GeForce GTX 970 and GTX 980.<br />
<br />
In order to check what features are supported by your GPU, run the following command, which is provided by the {{Pkg|vdpauinfo}} package:<br />
<br />
$ vdpauinfo<br />
<br />
=== Configuration ===<br />
{{Note|There may no need to export the {{ic|LIBVA_DRIVER}}, since most (modern) applications and environments will find the VDPAU library automatically.}}<br />
<br />
The environment variable {{ic|VDPAU_DRIVER}} determines the driver file used. You can enable the [[environment variable]] [[Environment variables#Globally|globally]] or [[Environment variables#Per_user|locally per user]].<br />
<br />
The correct driver name depends on your setup:<br />
<br />
* For Intel Graphics or AMD Catalyst you need to set it to {{ic|va_gl}}.<br />
* For the open source AMD/ATI driver, you need to set it to the proper driver version depending on your GPU.<br />
* For Nvidia's proprietary version set the variable to "nvidia".<br />
<br />
The driver name can determine by running:<br />
{{hc|$ grep -i vdpau ~/.local/share/xorg/Xorg.0.log|<br />
(II) RADEON(0): [DRI2] VDPAU driver: r300<br />
}}<br />
In this case you want to set {{ic|1=VDPAU_DRIVER=r300}}.<br />
<br />
==== Hybrid graphics ====<br />
<br />
For hybrid setups (both NVIDIA and AMD), it may be necessary to set following environment variable:<br />
<br />
$ export DRI_PRIME=1<br />
<br />
For more information, see the [[PRIME]] wiki page.<br />
<br />
== Supported software ==<br />
<br />
* {{App|Adobe Flash Player|see [[Browser plugins#Adobe Flash Player]].||{{Pkg|flashplugin}}}}<br />
* {{App|[[MPlayer]] or [http://www.mplayer2.org/ mplayer2]|see [[MPlayer#Enabling VDPAU]].|| {{Pkg|mplayer}} {{Aur|mplayer2}}}}<br />
* {{App|gnome-mplayer|To enable hardware acceleration: ''Edit > Preferences > Player'', then set Video Output to {{ic|vdpau}}.||{{Pkg|gnome-mplayer}}}}<br />
* {{App|[[SMplayer]]|To enable hardware acceleration: ''Options > Preferences > General > Video'', then set Output driver to {{ic|vdpau}}.||{{Pkg|smplayer}}}}<br />
* {{App|bomi|Hardware acceleration can be enabled: ''Preferences > Video > Hardware acceleration''.|https://bomi-player.github.io|{{Aur|bomi}} {{Aur|bomi-git}}}}<br />
* {{App|[[Mpv]]|see [[Mpv#Hardware Decoding]].||{{Pkg|mpv}}}}<br />
* {{App|[[VLC media player]]|see [[VLC media player#Hardware acceleration support]].||{{Pkg|vlc}}}}</div>Beta990https://wiki.archlinux.org/index.php?title=VDPAU&diff=411163VDPAU2015-12-07T10:02:21Z<p>Beta990: /* Configuration */ Added note</p>
<hr />
<div>[[Category:Graphics]]<br />
[[Category:X server]]<br />
[[ja:VDPAU]]<br />
[[ru:VDPAU]]<br />
[[zh-CN:VDPAU]]<br />
{{Related articles start}}<br />
{{Related|VA-API}}<br />
{{Related|XvMC}}<br />
{{Related articles end}}<br />
<br />
'''[http://http.download.nvidia.com/XFree86/vdpau/doxygen/html/ Video Decode and Presentation API for Unix]''' is an open source library and API to offload portions of the video decoding process and video post-processing to the GPU video-hardware.<br />
<br />
== Supported hardware ==<br />
<br />
'''Open source drivers:'''<br />
<br />
* [[ATI|AMD]] Radeon 9500 and newer GPUs are supported by the {{Pkg|mesa-vdpau}} package.<br />
* [[Intel]] GMA 4500 series and newer GPUs are supported by the {{Pkg|libvdpau-va-gl}} package together with the {{pkg|libva-intel-driver}} package.<br />
* [[Nouveau|NVIDIA]] GeForce 8 series and newer GPUs are supported by the {{Pkg|mesa-vdpau}} package. It [http://nouveau.freedesktop.org/wiki/VideoAcceleration/#firmware requires] the {{AUR|nouveau-fw}} package, which contains the required firmware to operate that is presently extracted from the NVIDIA binary driver.<br />
<br />
'''Proprietary drivers:'''<br />
<br />
* [[AMD Catalyst|AMD]] Radeon HD 4000 series and newer GPUs are supported by the {{Pkg|libvdpau-va-gl}} package together with the {{AUR|libva-xvba-driver}} package. It uses the {{AUR|catalyst-utils}} driver for Radeon HD 5000 series and newer, and {{AUR|catalyst-total-hd234k}} for Radeon HD 4000 series.<br />
* [[NVIDIA]] GeForce 400 series and newer GPUs are supported by the {{Pkg|nvidia-utils}} package.<br />
** GeForce 8/9 and GeForce 100-300 series are supported by the {{Pkg|nvidia-340xx-utils}} package.<br />
<br />
=== Supported formats ===<br />
<br />
{| class="wikitable" style="width: 100%"<br />
! <br />
! colspan="3" | Open source<br />
! colspan="2" | Proprietary<br />
|-<br />
! <br />
! AMD<br />
! Intel<br />
! Nvidia<br />
! AMD<br />
! Nvidia<br />
|-<br />
| MPEG2 decoding<br />
| Radeon 9500 and newer<br />
| <center>—<sup>2</sup></center><br />
| GeForce 8 and newer<br />
| <center>—<sup>2</sup></center><br />
| GeForce 8 and newer<br />
|-<br />
| MPEG4 decoding<br />
| Radeon HD 6000 and newer<br />
| <center>—<sup>2</sup></center><br />
| GeForce 200 and newer<br />
| <center>—<sup>2</sup></center><br />
| GeForce 200 and newer<br />
|-<br />
| H.264 decoding<br />
| Radeon HD 4000 and newer<br />
| GMA 4500<sup>1</sup>, Ironlake Graphics and newer<br />
| GeForce 8 and newer<br />
| Radeon HD 4000 and newer<br />
| GeForce 8 and newer<br />
|-<br />
| HEVC (H.265) decoding<br />
| <center>—</center><br />
| <center>—<sup>2</sup></center><br />
| <center>—</center><br />
| <center>—<sup>2</sup></center><br />
| GeForce 900<sup>4</sup> and newer<br />
|-<br />
| VC1 decoding<br />
| Radeon HD 4000 and newer<br />
| <center>—<sup>2</sup></center><br />
| GeForce 8<sup>3</sup> and newer<br />
| <center>—<sup>2</sup></center><br />
| GeForce 8<sup>3</sup> and newer<br />
|}<br />
<br />
* <sup>1</sup> Supported by the {{AUR|libva-intel-driver-g45-h264}} package. See [[Intel graphics#H.264 decoding on GMA 4500]] for instructions and caveats.<br />
* <sup>2</sup> As of version 0.3, the VA GL driver doesn't support any other hardware decoder than H.264.<br />
* <sup>3</sup> [[Wikipedia:Nvidia PureVideo|Except]] GeForce 8800 Ultra, 8800 GTX, 8800 GTS (320/640 MB).<br />
* <sup>4</sup> Except GeForce GTX 970 and GTX 980.<br />
<br />
In order to check what features are supported by your GPU, run the following command, which is provided by the {{Pkg|vdpauinfo}} package:<br />
<br />
$ vdpauinfo<br />
<br />
=== Configuration ===<br />
{{Note|There may no need to export the {{ic|LIBVA_DRIVER}}, since most (modern) applications and environments will find the VA-API library [[#Verifying|automatically]].}}<br />
<br />
The environment variable {{ic|VDPAU_DRIVER}} determines the driver file used. You can enable the [[environment variable]] [[Environment variables#Globally|globally]] or [[Environment variables#Per_user|locally per user]].<br />
<br />
The correct driver name depends on your setup:<br />
<br />
* For Intel Graphics or AMD Catalyst you need to set it to {{ic|va_gl}}.<br />
* For the open source AMD/ATI driver, you need to set it to the proper driver version depending on your GPU.<br />
* For Nvidia's proprietary version set the variable to "nvidia".<br />
<br />
The driver name can determine by running:<br />
{{hc|$ grep -i vdpau ~/.local/share/xorg/Xorg.0.log|<br />
(II) RADEON(0): [DRI2] VDPAU driver: r300<br />
}}<br />
In this case you want to set {{ic|1=VDPAU_DRIVER=r300}}.<br />
<br />
==== Hybrid graphics ====<br />
<br />
For hybrid setups (both NVIDIA and AMD), it may be necessary to set following environment variable:<br />
<br />
$ export DRI_PRIME=1<br />
<br />
For more information, see the [[PRIME]] wiki page.<br />
<br />
== Supported software ==<br />
<br />
* {{App|Adobe Flash Player|see [[Browser plugins#Adobe Flash Player]].||{{Pkg|flashplugin}}}}<br />
* {{App|[[MPlayer]] or [http://www.mplayer2.org/ mplayer2]|see [[MPlayer#Enabling VDPAU]].|| {{Pkg|mplayer}} {{Aur|mplayer2}}}}<br />
* {{App|gnome-mplayer|To enable hardware acceleration: ''Edit > Preferences > Player'', then set Video Output to {{ic|vdpau}}.||{{Pkg|gnome-mplayer}}}}<br />
* {{App|[[SMplayer]]|To enable hardware acceleration: ''Options > Preferences > General > Video'', then set Output driver to {{ic|vdpau}}.||{{Pkg|smplayer}}}}<br />
* {{App|bomi|Hardware acceleration can be enabled: ''Preferences > Video > Hardware acceleration''.|https://bomi-player.github.io|{{Aur|bomi}} {{Aur|bomi-git}}}}<br />
* {{App|[[Mpv]]|see [[Mpv#Hardware Decoding]].||{{Pkg|mpv}}}}<br />
* {{App|[[VLC media player]]|see [[VLC media player#Hardware acceleration support]].||{{Pkg|vlc}}}}</div>Beta990https://wiki.archlinux.org/index.php?title=ATI&diff=411162ATI2015-12-07T09:58:33Z<p>Beta990: /* Performance tuning */ Should be under Driver Options</p>
<hr />
<div>[[Category:Graphics]]<br />
[[Category:X server]]<br />
[[de:ATI]]<br />
[[es:ATI]]<br />
[[fr:ATI]]<br />
[[it:ATI]]<br />
[[ja:ATI]]<br />
[[pl:ATI]]<br />
[[ru:ATI]]<br />
[[tr:ATI]]<br />
[[zh-CN:ATI]]<br />
{{Related articles start}}<br />
{{Related|AMD Catalyst}}<br />
{{Related|Xorg}}<br />
{{Related articles end}}<br />
<br />
{{Out of date|Owners of newer cards need {{Pkg|xf86-video-amdgpu}} instead of {{Pkg|xf86-video-ati}}.}}<br />
<br />
Owners of '''AMD''' (previously '''ATI''') video cards have a choice between AMD's [[AMD Catalyst|proprietary driver]] ({{AUR|catalyst}}) and the open source driver ({{Pkg|xf86-video-ati}}). This article covers the open source driver.<br />
<br />
The open source driver is ''on par'' performance-wise with the proprietary driver for many cards. (See this [http://www.phoronix.com/scan.php?page=article&item=radeonsi-cat-wow&num=1 benchmark].) It also has good dual-head support but worse TV-out support. Newer cards support might be lagging behind Catalyst.<br />
<br />
If unsure, try the open source driver first, it will suit most needs and is generally less problematic. (See the [http://www.x.org/wiki/RadeonFeature feature matrix] to know what is supported for the GPU.)<br />
<br />
== Naming conventions ==<br />
<br />
The [[Wikipedia:Radeon|Radeon]] brand follows a naming scheme that relates each product to a market segment. Within this article, readers will see both ''product'' names (e.g. HD 4850, X1900) and ''code'' or ''core'' names (e.g. RV770, R580). Traditionally, a ''product series'' will correspond to a ''core series'' (e.g. the "X1000" product series includes the X1300, X1600, X1800, and X1900 products which utilize the "R500" core series &ndash; including the RV515, RV530, R520, and R580 cores).<br />
<br />
For a table of core and product series, see [[Wikipedia:Radeon]] and [[Wikipedia:List of AMD graphics processing units]].<br />
<br />
== Overview ==<br />
*Latest Fiji and Tonga based graphics cards (Volcanic Islands/GCN 1.2) utilizing the new amdgpu kernel driver currently lack reclocking support, preventing the system to access the full performance. Reclocking is expected after Kernel release 4.4.<br />
*Radeons in the Rx 300 (except for R9 380), Rx 200 and HD 7xxx (Sea/Southern Islands or GCN 1.1/1.0) series and newer (except maybe the latest series) have almost complete feature coverage and offer best performance.<br />
*Radeons up to the X1xxx series are fully supported, stable, and full 2D and 3D accelerations are provided.<br />
*Radeons from HD 2xxx to HD 6xxx have full 2D acceleration and functional 3D acceleration, but are not supported by all the features that the proprietary driver provides. Performance varies from medicore for some cards to excellent for others.<br />
*Support of DRI1, RandR 1.2/1.3/1.4, Glamor, EXA acceleration and [[KMS|kernel mode-setting]]/DRI2.<br />
<br />
Check the [http://www.x.org/wiki/RadeonFeature feature matrix] for more details.<br />
<br />
Generally, '''xf86-video-ati''' should be your first choice, no matter which AMD/ATI card you own. In case you need to use a driver for newer AMD cards, you should consider the proprietary '''catalyst''' driver.<br />
<br />
{{Note|'''xf86-video-ati''' is specified as '''''radeon''''' for the kernel and in {{ic|xorg.conf}}. }}<br />
<br />
== Installation ==<br />
<br />
{{Note|If coming from the proprietary Catalyst driver, see [[AMD Catalyst#Uninstallation]] first.}}<br />
<br />
[[Install]] the {{Pkg|xf86-video-ati}} package. It provides the DDX driver for 2D acceleration and it pulls in {{Pkg|mesa}} as a dependency, providing the DRI driver for 3D acceleration.<br />
<br />
To enable OpenGL support, also install {{Pkg|mesa-libgl}}. If you are on x86_64 and need 32-bit support, also install {{Pkg|lib32-mesa-libgl}} from the [[multilib]] repository.<br />
<br />
Support for [[#Enabling video acceleration|accelerated video decoding]] is provided by {{Pkg|mesa-vdpau}} and {{Pkg|lib32-mesa-vdpau}} packages.<br />
<br />
== Configuration ==<br />
<br />
Xorg will automatically load the driver and it will use your monitor's EDID to set the native resolution. Configuration is only required for tuning the driver.<br />
<br />
If you want manual configuration, create {{ic|/etc/X11/xorg.conf.d/20-radeon.conf}}, and add the following:<br />
<br />
Section "Device"<br />
Identifier "Radeon"<br />
Driver "radeon"<br />
EndSection<br />
<br />
Using this section, you can enable features and tweak the driver settings.<br />
<br />
== Loading ==<br />
<br />
The radeon kernel module should load fine automatically on system boot.<br />
<br />
If it does not happen, then:<br />
<br />
* Make sure you do '''not''' have {{ic|nomodeset}} or {{ic|1=vga=}} as a [[kernel parameter]], since radeon requires kernel mode-setting.<br />
* Also, check that you have not disabled radeon by using any modprobe blacklisting within {{ic|/etc/modprobe.d/}} or {{ic|/usr/lib/modprobe.d/}}.<br />
<br />
=== Enable early KMS ===<br />
<br />
{{Tip|If you have problems with the resolution, [[Kernel mode setting#Forcing modes and EDID]] may help.}}<br />
<br />
[[Kernel mode setting]] (KMS) is supported by the radeon driver and is mandatory and enabled by default. <br />
<br />
KMS is typically initialized after the [[Arch boot process#initramfs|initramfs stage]]. It is possible, however, to enable KMS during the initramfs stage. To do this, add the {{ic|radeon}} module to the {{ic|MODULES}} line in {{ic|/etc/mkinitcpio.conf}}:<br />
<br />
MODULES="... radeon ..."<br />
<br />
Now, regenerate the initramfs:<br />
<br />
# mkinitcpio -p linux<br />
<br />
The change takes effect at the next reboot.<br />
<br />
== Performance tuning ==<br />
=== Enabling video acceleration ===<br />
[[VA-API]] and [[VDPAU]] can be installed to provide hardware accelerated video encoding and decoding.<br />
<br />
=== Driver Options ===<br />
The following options apply to {{ic|/etc/X11/xorg.conf.d/'''20-radeon.conf'''}}.<br />
<br />
Please read {{ic|man radeon}} and [http://www.x.org/wiki/RadeonFeature/#index4h2 RadeonFeature] first before applying driver options.<br />
<br />
'''ColorTiling''' and '''ColorTiling2D''' is completely safe to enable and supposedly is enabled by default. Most users will notice increased performance but it is not yet supported on R200 and earlier cards. Can be enabled on earlier cards, but the workload is transferred to the CPU:<br />
<br />
Option "ColorTiling" "on"<br />
Option "ColorTiling2D" "on"<br />
<br />
'''DRI3''' support can be enabled, instead of using the default '''DRI2'''. You may want to read the following benchmark by [http://www.phoronix.com/scan.php?page=article&item=radeon-dri3-perf&num=1 Phoronix] to give you an idea of the performance of DRI2 vs DRI3:<br />
<br />
Option "DRI" "3"<br />
<br />
'''TearFree''' is a tearing prevention using the hardware page flipping mechanism. Enabling this<br />
option currently disables Option "EnablePageFlip":<br />
<br />
Option "TearFree" "on"<br />
<br />
'''Acceleration architecture'''; Glamor is available as 2D acceleration method implement through OpenGL, and it should work with graphic cards whose drivers are newer or equal to R300.<br />
Since xf86-video-ati driver-1:7.2.0-1, it is automatically enabled with radeonsi drivers (Southern Islands and superior GFX cards); on other graphic cards the method can be forced by adding AccelMethod '''glamor''' to the config file:<br />
<br />
Option "AccelMethod" "glamor"<br />
<br />
When using Glamor as acceleration architecture it is possible to enable the option '''ShadowPrimary''', enables a so-called "shadow primary" buffer for fast CPU access to pixel data, and separate scanout buf‐fers for each display controller (CRTC). This may improve performance for some 2D workloads, potentially at the expense of other (e.g. 3D, video) workloads. Note that enabling this option currently disables Option "EnablePageFlip":<br />
<br />
Option "ShadowPrimary" "on"<br />
<br />
'''EXAVSync ''' is only available when using EXA and can be enabled to avoid tearing by stalling the engine until the display controller has passed the destination region. It reduces tearing at the cost of performance and has been know to cause instability on some chips:<br />
<br />
Option "EXAVSync" "yes"<br />
<br />
Below is a sample config file of {{ic|/etc/X11/xorg.conf.d/'''20-radeon.conf'''}}:<br />
<br />
{{bc|<br />
Section "Device"<br />
Identifier "Radeon"<br />
Driver "radeon"<br />
Option "AccelMethod" "Glamor"<br />
Option "DRI" "3"<br />
Option "TearFree" "on"<br />
EndSection<br />
}}<br />
<br />
{{Tip|{{Pkg|driconf}} is a tool that allows to modify several settings: vsync, anisotropic filtering, texture compression, etc. Using this tool it is also possible to "disable Low Impact fallback" needed by some programs (e.g. Google Earth).}}<br />
<br />
=== Kernel Parameters ===<br />
{{Tip|You may want to debug the newly parameters with {{ic|systool}} as stated in [[Kernel modules#Obtaining information]].}}<br />
Useful [[kernel parameters]] may be {{ic|1=radeon.bapm=1}} [https://www.phoronix.com/scan.php?page=news_item&px=MTczMzI], {{ic|1=radeon.disp_priority=2}} [http://lists.freedesktop.org/pipermail/xorg/2013-February/055477.html], {{ic|1=radeon.hw_i2c=1}} [https://superuser.com/questions/723760/does-radeon-hw-i2c-1-has-any-thing-to-do-with-temperature-readings], {{ic|1=radeon.mst=1}} [https://www.phoronix.com/scan.php?page=news_item&px=Linux-4.1-Radeon-DP-MST], {{ic|1=radeon.msi=1}} (force-enable MSI-support), {{ic|1=radeon.audio=0}} (force-disable GPU audio) and/or {{ic|1=radeon.tv=0}} (disable TV-out).<br />
<br />
Defining the '''gartsize''', if not autodetected, can be done by adding {{ic|1=radeon.gartsize=32}} into [[kernel parameters]].<br />
<br />
{{Note|Setting this parameter should not be needed anymore with modern AMD videocards:<br />
{{bc|<nowiki><br />
[drm] Detected VRAM RAM=2048M, BAR=256M<br />
[drm] radeon: 2048M of VRAM memory ready<br />
[drm] radeon: 2048M of GTT memory ready.<br />
</nowiki>}}<br />
}}<br />
<br />
The changes take effect at the next reboot.<br />
<br />
==== Deactivating PCI-E 2.0 ====<br />
<br />
Since kernel 3.6, PCI-E v2.0 in '''radeon''' is turned on by default.<br />
<br />
It may be unstable with some motherboards, deactivation can be done by adding {{ic|1=radeon.pcie_gen2=0}} as a [[kernel parameters]].<br />
<br />
See [http://www.phoronix.com/scan.php?page=article&item=amd_pcie_gen2&num=1 Phoronix article] for more information.<br />
<br />
=== Gallium Heads-Up Display ===<br />
<br />
The radeon driver supports activating a heads up display which can draw transparent graphs and text on top of applications that are rendering such as games. These can show such values as the current frame rate or the CPU load for each CPU core or an average of all of them. The HUD is controlled by the GALLIUM_HUD environment variable, and can be passed the following list of parameters among others:<br />
*"fps" - displays current frames per second<br />
*"cpu" - displays the average CPU load<br />
*"cpu0" - displays the CPU load for the first CPU core<br />
*"cpu0+cpu1" - displays the CPU load for the first two CPU cores<br />
*"draw-calls" - displays how many times each material in an object is drawn to the screen<br />
*"requested-VRAM" - displayed how much VRAM is being used on the GPU<br />
*"pixels-rendered" - displays how many pixels are being displayed<br />
<br />
To see a full list of parameters as well as some notes on operating GALLIUM_HUD you can also pass the "help" parameter to a simple application such as glxgears and see the corresponding terminal output:<br />
{{bc|1=# GALLIUM_HUD="help" glxgears }}<br />
<br />
More information can be found from this [http://lists.freedesktop.org/archives/mesa-dev/2013-March/036586.html mailing list post] or [https://kparal.wordpress.com/2014/03/03/fraps-like-fps-overlay-for-linux/ this blog post].<br />
<br />
== Hybrid graphics/AMD Dynamic Switchable Graphics ==<br />
<br />
It is the technology used on recent laptops equiped with two GPUs, one power-efficent (generally Intel integrated card) and one more powerful and more power-hungry (generally Radeon or Nvidia). There are two ways to get it work:<br />
<br />
* If it is not required to run 'GPU-hungry' applications, it is possible to disable the discrete card (see [https://help.ubuntu.com/community/HybridGraphics#Using_vga_switcheroo Ubuntu wiki]): {{ic|echo OFF > /sys/kernel/debug/vgaswitcheroo/switch}}.<br />
* [[PRIME]]: Is a proper way to use hybrid graphics on Linux, but still requires a bit of manual intervention from the user.<br />
<br />
== Powersaving ==<br />
{{Note|Power management is supported on all chips that include the appropriate power state tables in the vbios (R1xx and newer). "dpm" is only supported on R6xx and newer chips.}}<br />
<br />
With the radeon driver, power saving is disabled by default and has to be enabled manually if desired.<br />
<br />
You can choose between three different methods:<br />
<br />
# [[#Dynamic power management|dpm]] (enabled by default since kernel 3.13)<br />
# [[#Dynamic frequency switching|dynpm]]<br />
# [[#Profile-based frequency switching|profile]]<br />
<br />
'''It is hard to say which is the best for you, so you have to try it yourself!'''<br />
<br />
See http://www.x.org/wiki/RadeonFeature/#index3h2 for more details.<br />
<br />
=== Dynamic power management ===<br />
<br />
Since kernel 3.13, DPM is enabled by default for [http://kernelnewbies.org/Linux_3.13#head-f95c198f6fdc7defe36f470dc8369cf0e16898df lots of AMD Radeon hardware]. If you want to disable it, add the parameter {{ic|1=radeon.dpm=0}} to the [[kernel parameters]].<br />
<br />
Unlike [[#Dynamic frequency switching|dynpm]], the "dpm" method uses hardware on the GPU to dynamically change the clocks and voltage based on GPU load. It also enables clock and power gating.<br />
<br />
There are 3 operation modes to choose from:<br />
<br />
* {{ic|battery}} lowest power consumption<br />
* {{ic|balanced}} sane default<br />
* {{ic|performance}} highest performance<br />
<br />
They can be changed via sysfs<br />
# echo battery > /sys/class/drm/card0/device/power_dpm_state<br />
<br />
For testing or debugging purposes, you can force the card to run in a set performance mode:<br />
<br />
* {{ic|auto}} default; uses all levels in the power state<br />
* {{ic|low}} enforces the lowest performance level<br />
* {{ic|high}} enforces the highest performance level<br />
<br />
# echo low > /sys/class/drm/card0/device/power_dpm_force_performance_level<br />
<br />
=== Old methods ===<br />
<br />
==== Dynamic frequency switching ====<br />
<br />
This method dynamically changes the frequency depending on GPU load, so performance is ramped up when running GPU intensive apps, and ramped down when the GPU is idle. The re-clocking is attempted during vertical blanking periods, but due to the timing of the re-clocking functions, does not always complete in the blanking period, which can lead to flicker in the display. Due to this, dynpm only works when a single head is active.<br />
<br />
It can be activated by simply running the following command:<br />
<br />
# echo dynpm > /sys/class/drm/card0/device/power_method<br />
<br />
==== Profile-based frequency switching ====<br />
<br />
This method will allow you to select one of the five profiles (described below). Different profiles, for the most part, end up changing the frequency/voltage of the GPU. This method is not as aggressive, but is more stable and flicker free and works with multiple heads active.<br />
<br />
To activate the method, run the following command:<br />
<br />
# echo profile > /sys/class/drm/card0/device/power_method<br />
<br />
Select one of the available profiles:<br />
* {{ic|default}} uses the default clocks and does not change the power state. This is the default behaviour.<br />
* {{ic|auto}} selects between {{ic|mid}} and {{ic|high}} power states based on the whether the system is on battery power or not.<br />
* {{ic|low}} forces the gpu to be in the {{ic|low}} power state all the time. Note that {{ic|low}} can cause display problems on some laptops, which is why {{ic|auto}} only uses {{ic|low}} when monitors are off. Selected on other profiles when the monitors are in the [[DPMS]]-off state.<br />
* {{ic|mid}} forces the gpu to be in the {{ic|mid}} power state all the time.<br />
* {{ic|high}} forces the gpu to be in the {{ic|high}} power state all the time.<br />
<br />
As an example, we will activate the {{ic|low}} profile (replace {{ic|low}} with any of the aforementioned profiles as necessary):<br />
<br />
# echo low > /sys/class/drm/card0/device/power_profile<br />
<br />
==== Persistent configuration ====<br />
<br />
The activation described above is not persistent, it will not last when the computer is rebooted. To make it persistent, you can use [[systemd#Temporary files|systemd-tmpfiles]] (example for [[#Dynamic frequency switching]]):<br />
<br />
{{hc|/etc/tmpfiles.d/radeon-pm.conf|<nowiki><br />
w /sys/class/drm/card0/device/power_method - - - - dynpm<br />
</nowiki>}}<br />
<br />
Alternatively, you may use this [[udev]] rule instead (example for [[#Profile-based frequency switching]]):<br />
<br />
{{hc|/etc/udev/rules.d/30-radeon-pm.rules|<nowiki><br />
KERNEL=="dri/card0", SUBSYSTEM=="drm", DRIVERS=="radeon", ATTR{device/power_method}="profile", ATTR{device/power_profile}="low"<br />
</nowiki>}}<br />
<br />
{{Note|If the above rule is failing, try removing the {{ic|dri/}} prefix.}}<br />
<br />
==== Graphical tools ====<br />
<br />
* {{App|Radeon-tray|A small program to control the power profiles of your Radeon card via systray icon. It is written in PyQt4 and is suitable for non-Gnome users.|https://github.com/StuntsPT/Radeon-tray|{{AUR|radeon-tray}}}}<br />
* {{App|power-play-switcher|A gui for changing powerplay setting of the open source driver for ati radeon video cards.|https://code.google.com/p/power-play-switcher/|{{AUR|power-play-switcher}}{{Broken package link|{{aur-mirror|power-play-switcher}}}}}}<br />
* {{App|Gnome-shell-extension-Radeon-Power-Profile-Manager|A small extension for Gnome-shell that will allow you to change the power profile of your radeon card when using the open source drivers.|https://github.com/StuntsPT/shell-extension-radeon-power-profile-manager|{{AUR|gnome-shell-extension-radeon-ppm}}{{Broken package link|{{aur-mirror|gnome-shell-extension-radeon-ppm}}}} {{AUR|gnome-shell-extension-radeon-power-profile-manager-git}}{{Broken package link|{{aur-mirror|gnome-shell-extension-radeon-power-profile-manager-git}}}}}}<br />
<br />
=== Other notes ===<br />
<br />
To view the speed that the GPU is running at, perform the following command and you will get something like this output:<br />
<br />
{{hc|# cat /sys/kernel/debug/dri/0/radeon_pm_info|<nowiki><br />
state: PM_STATE_ENABLED<br />
default engine clock: 300000 kHz<br />
current engine clock: 300720 kHz<br />
default memory clock: 200000 kHz<br />
</nowiki>}}<br />
<br />
It depends on which GPU line yours is, however. Along with the radeon driver versions, kernel versions, etc. So it may not have much/any voltage regulation at all.<br />
<br />
Thermal sensors are implemented via external i2c chips or via the internal thermal sensor (rv6xx-evergreen only). To get the temperature on asics that use i2c chips, you need to load the appropriate hwmon driver for the sensor used on your board (lm63, lm64, etc.). The drm will attempt to load the appropriate hwmon driver. On boards that use the internal thermal sensor, the drm will set up the hwmon interface automatically. When the appropriate driver is loaded, the temperatures can be accessed via [[lm_sensors]] tools or via sysfs in {{ic|/sys/class/hwmon}}.<br />
<br />
== Fan Speed ==<br />
<br />
While the power saving features above should handle fan speeds quite well, some cards may still be too noisy in their idle state. In this case, and when your card supports it, you can change the fan speed manually.<br />
<br />
{{Note|<br />
* Keep in mind that the following method sets the fan speed to a fixed value, hence it will not adjust with the stress of your gpu, which can lead to overheating under heavy load.<br />
* Better check your gpu temperature when applying lower than standard values. <br />
}}<br />
<br />
First, issue the following command to enable the manual adjustment of the fan speed of your graphics card (or your first gpu in case of a multi gpu setup). <br />
<br />
# echo 1 > /sys/class/drm/card0/device/hwmon/hwmon2/pwm1_enable<br />
<br />
Then set your desired fan speed from 0 to 255, which corresponds to 0-100% fan speed (The following command sets it to roughly 20%). <br />
<br />
# echo 55 > /sys/class/drm/card0/device/hwmon/hwmon2/pwm1<br />
<br />
For persistence, use [[systemd#Temporary files|systemd-tmpfiles]] as shown above by the example with power profiles.<br />
<br />
If a fixed value isn't desired, there are possibilities to define a custom fan curve manually by, for example, writing a script in which fan speeds are set depending on the current temperature (current value in /sys/class/drm/card0/device/hwmon/hwmon2/temp1_input), preferably with hystereses. There is also a gui solution: http://github.com/marazmista/radeon-profile{{AUR|radeon-profile-git}}.<br />
<br />
== TV out ==<br />
<br />
First, check that you have an S-video output: {{ic|xrandr}} should give you something like<br />
Screen 0: minimum 320x200, current 1024x768, maximum 1280x1200<br />
...<br />
S-video disconnected (normal left inverted right x axis y axis)<br />
<br />
Now we should tell Xorg that it is actually connected (it ''is'', right?)<br />
xrandr --output S-video --set "load detection" 1<br />
<br />
Setting TV standard to use:<br />
xrandr --output S-video --set "tv standard" ntsc<br />
<br />
Adding a mode for it (currently supports only 800x600):<br />
xrandr --addmode S-video 800x600<br />
<br />
Clone mode:<br />
xrandr --output S-video --same-as VGA-0<br />
<br />
Now let us try to see what we have:<br />
xrandr --output S-video --mode 800x600<br />
<br />
At this point you should see a 800x600 version of your desktop on your TV.<br />
<br />
To disable the output, do<br />
xrandr --output S-video --off<br />
<br />
Also you may notice that the video is being played on monitor only and not on the TV. Where the Xv overlay is sent is controlled by XV_CRTC attribute.<br />
<br />
To send the output to the TV, do:<br />
xvattr -a XV_CRTC -v 1<br />
<br />
{{Note| you need to install {{AUR|xvattr}}{{Broken package link|{{aur-mirror|xvattr}}}} to execute this command.}}<br />
<br />
To switch back to the monitor, I change this to {{ic|0}}. {{ic|-1}} is used for automatic switching in dualhead setups.<br />
<br />
Please see [http://www.x.org/wiki/radeonTV Enabling TV-Out Statically] for how to enable TV-out in your xorg configuration file.<br />
<br />
=== Force TV-out in KMS ===<br />
<br />
The kernel can recognize {{ic|1=video=}} parameter in following form (see [[KMS]] for more details):<br />
<br />
video=<conn>:<xres>x<yres>[M][R][-<bpp>][@<refresh>][i][m][eDd]<br />
<br />
For example:<br />
<br />
video=DVI-I-1:1280x1024-24@60e<br />
<br />
Parameters with whitespaces must be quoted:<br />
<br />
"video=9-pin DIN-1:1024x768-24@60e"<br />
<br />
Current mkinitcpio implementation also requires {{ic|#}} in front. For example:<br />
<br />
root=/dev/disk/by-uuid/d950a14f-fc0c-451d-b0d4-f95c2adefee3 ro quiet radeon.modeset=1 security=none # video=DVI-I-1:1280x1024-24@60e "video=9-pin DIN-1:1024x768-24@60e"<br />
<br />
* Grub can pass such command line as is.<br />
* Lilo needs backslashes for doublequotes (append {{ic|1=# \"video=9-pin DIN-1:1024x768-24@60e\"}})<br />
* Grub2: TODO<br />
<br />
You can get list of your video outputs with following command:<br />
<br />
{{bc|<nowiki>$ ls -1 /sys/class/drm/ | grep -E '^card[[:digit:]]+-' | cut -d- -f2-</nowiki>}}<br />
<br />
== HDMI audio ==<br />
<br />
HDMI audio is supported in the {{Pkg|xf86-video-ati}} video driver. By default HDMI audio is disabled in the driver kernel versions >=3.0 because it can be problematic. To enable HDMI audio add {{ic|1=radeon.audio=1}} to your [[kernel parameters]].<br />
<br />
If there is no video after boot up, the driver option has to be disabled.<br />
<br />
{{Note|<br />
* If HDMI audio does not work after installing the driver, test your setup with the procedure at [[Advanced Linux Sound Architecture/Troubleshooting#HDMI Output does not work]].<br />
* If the sound is distorted in PulseAudio try setting {{ic|1=tsched=0}} as described in [[PulseAudio/Troubleshooting#Glitches, skips or crackling]] and make sure {{ic|rtkit}} daemon is running.<br />
* Your sound card might use the same module, since HDA compliant hardware is pretty common. [[Advanced_Linux_Sound_Architecture#Set_the_default_sound_card|Change the default sound card]] using one of the suggested methods, which include using the {{ic|defaults}} node in alsa configuration.<br />
}}<br />
<br />
== Dual Head setup ==<br />
<br />
=== Independent X screens ===<br />
<br />
Independent dual-headed setups can be configured the usual way. However you might want to know that the radeon driver has a {{ic|"ZaphodHeads"}} option which allows you to bind a specific device section to an output of your choice, for instance using:<br />
Section "Device"<br />
Identifier "Device0"<br />
Driver "radeon"<br />
Option "ZaphodHeads" "VGA-0"<br />
VendorName "ATI"<br />
BusID "PCI:1:0:0"<br />
Screen 0<br />
EndSection<br />
<br />
This can be a life-saver, because some cards which have more than two outputs (for instance one HDMI out, one DVI, one VGA), will only select and use HDMI+DVI outputs for the dual-head setup, unless you explicitely specify {{ic|"ZaphodHeads" "VGA-0"}}.<br />
<br />
== Turn vsync off ==<br />
<br />
The radeon driver will enable vsync by default, which is perfectly fine except for benchmarking. To turn it off, create {{ic|~/.drirc}} (or edit it if it already exists) and add the following section:<br />
{{hc|~/.drirc|<nowiki><br />
<driconf><br />
<device screen="0" driver="dri2"><br />
<application name="Default"><br />
<option name="vblank_mode" value="0" /><br />
</application><br />
</device><br />
<!-- Other devices ... --><br />
</driconf><br />
</nowiki>}}<br />
Make sure the driver is '''dri2''', not your video card code (like r600).<br />
<br />
{{Accuracy|If the above does not work, please file a bug report. Also, why is the {{ic|SwapbuffersWait}} option relevant here?}}<br />
<br />
If vsync is still enabled, you can try to disable it by editing the xf86-video-ati configuration :<br />
<br />
{{hc|/etc/X11/xorg.conf.d/20-radeon.con|<nowiki><br />
Section "Device"<br />
Identifier "My Graphics Card"<br />
Driver "radeon"<br />
Option "EXAVSync" "off"<br />
Option "SwapbuffersWait" "false" <br />
EndSection<br />
</nowiki>}}<br />
<br />
== Troubleshooting ==<br />
<br />
=== Artifacts upon logging in ===<br />
<br />
If encountering artifacts, first try starting X without {{ic|/etc/X11/xorg.conf}}. Recent versions of Xorg are capable of reliable auto-detection and auto-configuration for most use cases. Outdated or improperly configured {{ic|xorg.conf}} files are known to cause trouble.<br />
<br />
In order to run without a configuration tile, it is recommended that the {{ic|xorg-input-drivers}} package group be installed.<br />
<br />
You may as well try disabling {{ic|EXAPixmaps}} in {{ic|/etc/X11/xorg.conf.d/20-radeon.conf}}:<br />
<br />
Section "Device"<br />
Identifier "Radeon"<br />
Driver "radeon"<br />
Option "EXAPixmaps" "off"<br />
EndSection<br />
<br />
=== Adding undetected resolutions ===<br />
<br />
Please see the [[Xrandr#Adding_undetected_resolutions|Xrandr page]].<br />
<br />
=== AGP is disabled (with KMS) ===<br />
<br />
If you experience poor performance and dmesg shows something like this<br />
[drm:radeon_agp_init] *ERROR* Unable to acquire AGP: -19<br />
then check if the agp driver for your motherboard (e.g., {{ic|via_agp}}, {{ic|intel_agp}} etc.) is loaded before the {{ic|radeon}} module, see [[#Enabling KMS|Enabling KMS]].<br />
<br />
=== TV showing a black border around the screen ===<br />
<br />
When I connected my TV to my Radeon HD 5770 using the HDMI port, the TV showed a blurry picture with a 2-3cm border around it. This is not the case when using the proprietary driver. However, this protection against overscanning (see [[Wikipedia:Overscan]]) can be turned off using xrandr:<br />
xrandr --output HDMI-0 --set underscan off<br />
<br />
=== Black screen with mouse cursor on resume from suspend in X ===<br />
<br />
Waking from suspend on cards with 32MB or less can result in a black screen with a mouse pointer in X. Some parts of the screen may be redrawn when under the mouse cursor. Forcing {{ic|EXAPixmaps}} to {{ic|"enabled"}} in {{ic|/etc/X11/xorg.conf.d/20-radeon.conf}} may fix the problem. See [[#Performance tuning|performance tuning]] for more information.<br />
<br />
=== No desktop effects in KDE4 with X1300 and Radeon driver ===<br />
<br />
A bug in KDE4 may prevent an accurate video hardware check, thereby deactivating desktop effects despite the X1300 having more than sufficient GPU power. A workaround may be to manually override such checks in KDE4 configuration files {{ic|/usr/share/kde-settings/kde-profile/default/share/config/kwinrc}} and/or {{ic|.kde/share/config/kwinrc}}. <br />
<br />
Add:<br />
DisableChecks=true<br />
<br />
To the [Compositing] section. Ensure that compositing is enabled with:<br />
Enabled=true<br />
<br />
=== Black screen and no console, but X works in KMS ===<br />
<br />
This is a solution to no-console problem that might come up, when using two or more ATI cards on the same PC. Fujitsu Siemens Amilo PA 3553 laptop for example has this problem. This is due to fbcon console driver mapping itself to wrong framebuffer device that exist on the wrong card. This can be fixed by adding a this to the kernel boot line:<br />
fbcon=map:1<br />
This will tell the fbcon to map itself to the {{ic|/dev/fb1}} framebuffer dev and not the {{ic|/dev/fb0}}, that in our case exist on the wrong graphics card. If that does not fix your problem, try booting with<br />
fbcon=map:0<br />
instead.<br />
<br />
=== 2D performance (e.g. scrolling) is slow ===<br />
<br />
If you have problem with 2D performance, like scrolling in terminal or browser, you might need to add {{ic|Option "MigrationHeuristic" "greedy"}} into the {{ic|"Device"}} section of your {{ic|xorg.conf}} file.<br />
<br />
{{Note|This only applies to EXA.}}<br />
<br />
Below is a sample config file {{ic|/etc/X11/xorg.conf.d/'''20-radeon.conf'''}}:<br />
<br />
{{bc|<br />
Section "Device"<br />
Identifier "My Graphics Card"<br />
Driver "radeon"<br />
Option "MigrationHeuristic" "greedy"<br />
EndSection<br />
}}<br />
<br />
=== Monitor rotation works for cursor but not windows/content ===<br />
<br />
Users with newer graphics boards who have enabled EXA instead of glamor may find that rotating their monitor with xrandr causes the cursor and monitor dimensions to rotate, but windows and other content stay in their normal orientation. Additionally, the cursor moves according to normal rotation when the user moves the mouse. Look for the following line in your {{ic|/var/log/Xorg.0.log}} when you issue the xrandr rotate command:<br />
{{bc|<br />
(EE) RADEON(0): Rotation requires acceleration!<br />
}}<br />
Acceleration is disabled when using EXA on newer graphics cards (source: [https://bugs.freedesktop.org/show_bug.cgi?id=73420#c17 comment 17]). You must choose between enabling EXA ([[#Glamor|detailed above in the glamor section]]) and the ability to rotate.<br />
<br />
=== ATI X1600 (RV530 series) 3D application show black windows ===<br />
<br />
There are three possible solutions:<br />
* Try add {{ic|<nowiki>pci=nomsi</nowiki>}} to your boot loader [[Kernel parameters]].<br />
* If this does not work, you can try adding {{ic|noapic}} instead of {{ic|<nowiki>pci=nomsi</nowiki>}}.<br />
* If none of the above work, then you can try running {{ic|<nowiki>vblank_mode=0 glxgears</nowiki>}} or {{ic|<nowiki>vblank_mode=1 glxgears</nowiki>}} to see which one works for you, then install {{pkg|driconf}} and set that option in {{ic|~/.drirc}}.<br />
<br />
=== Cursor corruption after coming out of sleep ===<br />
<br />
If the cursor becomes corrupted like it's repeating itself vertically after the monitor(s) comes out of sleep, set {{ic|"SWCursor" "True"}} in the {{ic|"Device"}} section of the {{ic|20-radeon.conf}} configuration file.<br />
<br />
=== DisplayPort stays black on multimonitor mode ===<br />
<br />
Try booting with the [[kernel parameter]] {{ic|1=radeon.audio=0}}.<br />
<br />
=== Low 2D performance in console and X ===<br />
<br />
Since kernel 4.1.4, [[#Dynamic power management|dpm]] is broken on certain R9 270X cards (chip device number 6810, subsystem 174b:e271, shown as Curacao XT, PC Partner Limited / Sapphire Technology Device e271 in lspci). The regression is caused by a [https://git.kernel.org/cgit/linux/kernel/git/stable/linux-stable.git/commit/?id=ea039f927524e36c15b5905b4c9469d788591932 fix] for cards with the same PCI ids. Disabling dpm (add {{ic|1=radeon.dpm=0}} to the [[kernel parameters]]) solves the problem.</div>Beta990https://wiki.archlinux.org/index.php?title=ATI&diff=411161ATI2015-12-07T09:58:13Z<p>Beta990: /* Enabling video acceleration */ Moved into tuning</p>
<hr />
<div>[[Category:Graphics]]<br />
[[Category:X server]]<br />
[[de:ATI]]<br />
[[es:ATI]]<br />
[[fr:ATI]]<br />
[[it:ATI]]<br />
[[ja:ATI]]<br />
[[pl:ATI]]<br />
[[ru:ATI]]<br />
[[tr:ATI]]<br />
[[zh-CN:ATI]]<br />
{{Related articles start}}<br />
{{Related|AMD Catalyst}}<br />
{{Related|Xorg}}<br />
{{Related articles end}}<br />
<br />
{{Out of date|Owners of newer cards need {{Pkg|xf86-video-amdgpu}} instead of {{Pkg|xf86-video-ati}}.}}<br />
<br />
Owners of '''AMD''' (previously '''ATI''') video cards have a choice between AMD's [[AMD Catalyst|proprietary driver]] ({{AUR|catalyst}}) and the open source driver ({{Pkg|xf86-video-ati}}). This article covers the open source driver.<br />
<br />
The open source driver is ''on par'' performance-wise with the proprietary driver for many cards. (See this [http://www.phoronix.com/scan.php?page=article&item=radeonsi-cat-wow&num=1 benchmark].) It also has good dual-head support but worse TV-out support. Newer cards support might be lagging behind Catalyst.<br />
<br />
If unsure, try the open source driver first, it will suit most needs and is generally less problematic. (See the [http://www.x.org/wiki/RadeonFeature feature matrix] to know what is supported for the GPU.)<br />
<br />
== Naming conventions ==<br />
<br />
The [[Wikipedia:Radeon|Radeon]] brand follows a naming scheme that relates each product to a market segment. Within this article, readers will see both ''product'' names (e.g. HD 4850, X1900) and ''code'' or ''core'' names (e.g. RV770, R580). Traditionally, a ''product series'' will correspond to a ''core series'' (e.g. the "X1000" product series includes the X1300, X1600, X1800, and X1900 products which utilize the "R500" core series &ndash; including the RV515, RV530, R520, and R580 cores).<br />
<br />
For a table of core and product series, see [[Wikipedia:Radeon]] and [[Wikipedia:List of AMD graphics processing units]].<br />
<br />
== Overview ==<br />
*Latest Fiji and Tonga based graphics cards (Volcanic Islands/GCN 1.2) utilizing the new amdgpu kernel driver currently lack reclocking support, preventing the system to access the full performance. Reclocking is expected after Kernel release 4.4.<br />
*Radeons in the Rx 300 (except for R9 380), Rx 200 and HD 7xxx (Sea/Southern Islands or GCN 1.1/1.0) series and newer (except maybe the latest series) have almost complete feature coverage and offer best performance.<br />
*Radeons up to the X1xxx series are fully supported, stable, and full 2D and 3D accelerations are provided.<br />
*Radeons from HD 2xxx to HD 6xxx have full 2D acceleration and functional 3D acceleration, but are not supported by all the features that the proprietary driver provides. Performance varies from medicore for some cards to excellent for others.<br />
*Support of DRI1, RandR 1.2/1.3/1.4, Glamor, EXA acceleration and [[KMS|kernel mode-setting]]/DRI2.<br />
<br />
Check the [http://www.x.org/wiki/RadeonFeature feature matrix] for more details.<br />
<br />
Generally, '''xf86-video-ati''' should be your first choice, no matter which AMD/ATI card you own. In case you need to use a driver for newer AMD cards, you should consider the proprietary '''catalyst''' driver.<br />
<br />
{{Note|'''xf86-video-ati''' is specified as '''''radeon''''' for the kernel and in {{ic|xorg.conf}}. }}<br />
<br />
== Installation ==<br />
<br />
{{Note|If coming from the proprietary Catalyst driver, see [[AMD Catalyst#Uninstallation]] first.}}<br />
<br />
[[Install]] the {{Pkg|xf86-video-ati}} package. It provides the DDX driver for 2D acceleration and it pulls in {{Pkg|mesa}} as a dependency, providing the DRI driver for 3D acceleration.<br />
<br />
To enable OpenGL support, also install {{Pkg|mesa-libgl}}. If you are on x86_64 and need 32-bit support, also install {{Pkg|lib32-mesa-libgl}} from the [[multilib]] repository.<br />
<br />
Support for [[#Enabling video acceleration|accelerated video decoding]] is provided by {{Pkg|mesa-vdpau}} and {{Pkg|lib32-mesa-vdpau}} packages.<br />
<br />
== Configuration ==<br />
<br />
Xorg will automatically load the driver and it will use your monitor's EDID to set the native resolution. Configuration is only required for tuning the driver.<br />
<br />
If you want manual configuration, create {{ic|/etc/X11/xorg.conf.d/20-radeon.conf}}, and add the following:<br />
<br />
Section "Device"<br />
Identifier "Radeon"<br />
Driver "radeon"<br />
EndSection<br />
<br />
Using this section, you can enable features and tweak the driver settings.<br />
<br />
== Loading ==<br />
<br />
The radeon kernel module should load fine automatically on system boot.<br />
<br />
If it does not happen, then:<br />
<br />
* Make sure you do '''not''' have {{ic|nomodeset}} or {{ic|1=vga=}} as a [[kernel parameter]], since radeon requires kernel mode-setting.<br />
* Also, check that you have not disabled radeon by using any modprobe blacklisting within {{ic|/etc/modprobe.d/}} or {{ic|/usr/lib/modprobe.d/}}.<br />
<br />
=== Enable early KMS ===<br />
<br />
{{Tip|If you have problems with the resolution, [[Kernel mode setting#Forcing modes and EDID]] may help.}}<br />
<br />
[[Kernel mode setting]] (KMS) is supported by the radeon driver and is mandatory and enabled by default. <br />
<br />
KMS is typically initialized after the [[Arch boot process#initramfs|initramfs stage]]. It is possible, however, to enable KMS during the initramfs stage. To do this, add the {{ic|radeon}} module to the {{ic|MODULES}} line in {{ic|/etc/mkinitcpio.conf}}:<br />
<br />
MODULES="... radeon ..."<br />
<br />
Now, regenerate the initramfs:<br />
<br />
# mkinitcpio -p linux<br />
<br />
The change takes effect at the next reboot.<br />
<br />
== Performance tuning ==<br />
The following options apply to {{ic|/etc/X11/xorg.conf.d/'''20-radeon.conf'''}}.<br />
<br />
Please read {{ic|man radeon}} and [http://www.x.org/wiki/RadeonFeature/#index4h2 RadeonFeature] first before applying driver options.<br />
<br />
=== Enabling video acceleration ===<br />
[[VA-API]] and [[VDPAU]] can be installed to provide hardware accelerated video encoding and decoding.<br />
<br />
=== Driver Options ===<br />
<br />
'''ColorTiling''' and '''ColorTiling2D''' is completely safe to enable and supposedly is enabled by default. Most users will notice increased performance but it is not yet supported on R200 and earlier cards. Can be enabled on earlier cards, but the workload is transferred to the CPU:<br />
<br />
Option "ColorTiling" "on"<br />
Option "ColorTiling2D" "on"<br />
<br />
'''DRI3''' support can be enabled, instead of using the default '''DRI2'''. You may want to read the following benchmark by [http://www.phoronix.com/scan.php?page=article&item=radeon-dri3-perf&num=1 Phoronix] to give you an idea of the performance of DRI2 vs DRI3:<br />
<br />
Option "DRI" "3"<br />
<br />
'''TearFree''' is a tearing prevention using the hardware page flipping mechanism. Enabling this<br />
option currently disables Option "EnablePageFlip":<br />
<br />
Option "TearFree" "on"<br />
<br />
'''Acceleration architecture'''; Glamor is available as 2D acceleration method implement through OpenGL, and it should work with graphic cards whose drivers are newer or equal to R300.<br />
Since xf86-video-ati driver-1:7.2.0-1, it is automatically enabled with radeonsi drivers (Southern Islands and superior GFX cards); on other graphic cards the method can be forced by adding AccelMethod '''glamor''' to the config file:<br />
<br />
Option "AccelMethod" "glamor"<br />
<br />
When using Glamor as acceleration architecture it is possible to enable the option '''ShadowPrimary''', enables a so-called "shadow primary" buffer for fast CPU access to pixel data, and separate scanout buf‐fers for each display controller (CRTC). This may improve performance for some 2D workloads, potentially at the expense of other (e.g. 3D, video) workloads. Note that enabling this option currently disables Option "EnablePageFlip":<br />
<br />
Option "ShadowPrimary" "on"<br />
<br />
'''EXAVSync ''' is only available when using EXA and can be enabled to avoid tearing by stalling the engine until the display controller has passed the destination region. It reduces tearing at the cost of performance and has been know to cause instability on some chips:<br />
<br />
Option "EXAVSync" "yes"<br />
<br />
Below is a sample config file of {{ic|/etc/X11/xorg.conf.d/'''20-radeon.conf'''}}:<br />
<br />
{{bc|<br />
Section "Device"<br />
Identifier "Radeon"<br />
Driver "radeon"<br />
Option "AccelMethod" "Glamor"<br />
Option "DRI" "3"<br />
Option "TearFree" "on"<br />
EndSection<br />
}}<br />
<br />
{{Tip|{{Pkg|driconf}} is a tool that allows to modify several settings: vsync, anisotropic filtering, texture compression, etc. Using this tool it is also possible to "disable Low Impact fallback" needed by some programs (e.g. Google Earth).}}<br />
<br />
=== Kernel Parameters ===<br />
{{Tip|You may want to debug the newly parameters with {{ic|systool}} as stated in [[Kernel modules#Obtaining information]].}}<br />
Useful [[kernel parameters]] may be {{ic|1=radeon.bapm=1}} [https://www.phoronix.com/scan.php?page=news_item&px=MTczMzI], {{ic|1=radeon.disp_priority=2}} [http://lists.freedesktop.org/pipermail/xorg/2013-February/055477.html], {{ic|1=radeon.hw_i2c=1}} [https://superuser.com/questions/723760/does-radeon-hw-i2c-1-has-any-thing-to-do-with-temperature-readings], {{ic|1=radeon.mst=1}} [https://www.phoronix.com/scan.php?page=news_item&px=Linux-4.1-Radeon-DP-MST], {{ic|1=radeon.msi=1}} (force-enable MSI-support), {{ic|1=radeon.audio=0}} (force-disable GPU audio) and/or {{ic|1=radeon.tv=0}} (disable TV-out).<br />
<br />
Defining the '''gartsize''', if not autodetected, can be done by adding {{ic|1=radeon.gartsize=32}} into [[kernel parameters]].<br />
<br />
{{Note|Setting this parameter should not be needed anymore with modern AMD videocards:<br />
{{bc|<nowiki><br />
[drm] Detected VRAM RAM=2048M, BAR=256M<br />
[drm] radeon: 2048M of VRAM memory ready<br />
[drm] radeon: 2048M of GTT memory ready.<br />
</nowiki>}}<br />
}}<br />
<br />
The changes take effect at the next reboot.<br />
<br />
==== Deactivating PCI-E 2.0 ====<br />
<br />
Since kernel 3.6, PCI-E v2.0 in '''radeon''' is turned on by default.<br />
<br />
It may be unstable with some motherboards, deactivation can be done by adding {{ic|1=radeon.pcie_gen2=0}} as a [[kernel parameters]].<br />
<br />
See [http://www.phoronix.com/scan.php?page=article&item=amd_pcie_gen2&num=1 Phoronix article] for more information.<br />
<br />
=== Gallium Heads-Up Display ===<br />
<br />
The radeon driver supports activating a heads up display which can draw transparent graphs and text on top of applications that are rendering such as games. These can show such values as the current frame rate or the CPU load for each CPU core or an average of all of them. The HUD is controlled by the GALLIUM_HUD environment variable, and can be passed the following list of parameters among others:<br />
*"fps" - displays current frames per second<br />
*"cpu" - displays the average CPU load<br />
*"cpu0" - displays the CPU load for the first CPU core<br />
*"cpu0+cpu1" - displays the CPU load for the first two CPU cores<br />
*"draw-calls" - displays how many times each material in an object is drawn to the screen<br />
*"requested-VRAM" - displayed how much VRAM is being used on the GPU<br />
*"pixels-rendered" - displays how many pixels are being displayed<br />
<br />
To see a full list of parameters as well as some notes on operating GALLIUM_HUD you can also pass the "help" parameter to a simple application such as glxgears and see the corresponding terminal output:<br />
{{bc|1=# GALLIUM_HUD="help" glxgears }}<br />
<br />
More information can be found from this [http://lists.freedesktop.org/archives/mesa-dev/2013-March/036586.html mailing list post] or [https://kparal.wordpress.com/2014/03/03/fraps-like-fps-overlay-for-linux/ this blog post].<br />
<br />
== Hybrid graphics/AMD Dynamic Switchable Graphics ==<br />
<br />
It is the technology used on recent laptops equiped with two GPUs, one power-efficent (generally Intel integrated card) and one more powerful and more power-hungry (generally Radeon or Nvidia). There are two ways to get it work:<br />
<br />
* If it is not required to run 'GPU-hungry' applications, it is possible to disable the discrete card (see [https://help.ubuntu.com/community/HybridGraphics#Using_vga_switcheroo Ubuntu wiki]): {{ic|echo OFF > /sys/kernel/debug/vgaswitcheroo/switch}}.<br />
* [[PRIME]]: Is a proper way to use hybrid graphics on Linux, but still requires a bit of manual intervention from the user.<br />
<br />
== Powersaving ==<br />
{{Note|Power management is supported on all chips that include the appropriate power state tables in the vbios (R1xx and newer). "dpm" is only supported on R6xx and newer chips.}}<br />
<br />
With the radeon driver, power saving is disabled by default and has to be enabled manually if desired.<br />
<br />
You can choose between three different methods:<br />
<br />
# [[#Dynamic power management|dpm]] (enabled by default since kernel 3.13)<br />
# [[#Dynamic frequency switching|dynpm]]<br />
# [[#Profile-based frequency switching|profile]]<br />
<br />
'''It is hard to say which is the best for you, so you have to try it yourself!'''<br />
<br />
See http://www.x.org/wiki/RadeonFeature/#index3h2 for more details.<br />
<br />
=== Dynamic power management ===<br />
<br />
Since kernel 3.13, DPM is enabled by default for [http://kernelnewbies.org/Linux_3.13#head-f95c198f6fdc7defe36f470dc8369cf0e16898df lots of AMD Radeon hardware]. If you want to disable it, add the parameter {{ic|1=radeon.dpm=0}} to the [[kernel parameters]].<br />
<br />
Unlike [[#Dynamic frequency switching|dynpm]], the "dpm" method uses hardware on the GPU to dynamically change the clocks and voltage based on GPU load. It also enables clock and power gating.<br />
<br />
There are 3 operation modes to choose from:<br />
<br />
* {{ic|battery}} lowest power consumption<br />
* {{ic|balanced}} sane default<br />
* {{ic|performance}} highest performance<br />
<br />
They can be changed via sysfs<br />
# echo battery > /sys/class/drm/card0/device/power_dpm_state<br />
<br />
For testing or debugging purposes, you can force the card to run in a set performance mode:<br />
<br />
* {{ic|auto}} default; uses all levels in the power state<br />
* {{ic|low}} enforces the lowest performance level<br />
* {{ic|high}} enforces the highest performance level<br />
<br />
# echo low > /sys/class/drm/card0/device/power_dpm_force_performance_level<br />
<br />
=== Old methods ===<br />
<br />
==== Dynamic frequency switching ====<br />
<br />
This method dynamically changes the frequency depending on GPU load, so performance is ramped up when running GPU intensive apps, and ramped down when the GPU is idle. The re-clocking is attempted during vertical blanking periods, but due to the timing of the re-clocking functions, does not always complete in the blanking period, which can lead to flicker in the display. Due to this, dynpm only works when a single head is active.<br />
<br />
It can be activated by simply running the following command:<br />
<br />
# echo dynpm > /sys/class/drm/card0/device/power_method<br />
<br />
==== Profile-based frequency switching ====<br />
<br />
This method will allow you to select one of the five profiles (described below). Different profiles, for the most part, end up changing the frequency/voltage of the GPU. This method is not as aggressive, but is more stable and flicker free and works with multiple heads active.<br />
<br />
To activate the method, run the following command:<br />
<br />
# echo profile > /sys/class/drm/card0/device/power_method<br />
<br />
Select one of the available profiles:<br />
* {{ic|default}} uses the default clocks and does not change the power state. This is the default behaviour.<br />
* {{ic|auto}} selects between {{ic|mid}} and {{ic|high}} power states based on the whether the system is on battery power or not.<br />
* {{ic|low}} forces the gpu to be in the {{ic|low}} power state all the time. Note that {{ic|low}} can cause display problems on some laptops, which is why {{ic|auto}} only uses {{ic|low}} when monitors are off. Selected on other profiles when the monitors are in the [[DPMS]]-off state.<br />
* {{ic|mid}} forces the gpu to be in the {{ic|mid}} power state all the time.<br />
* {{ic|high}} forces the gpu to be in the {{ic|high}} power state all the time.<br />
<br />
As an example, we will activate the {{ic|low}} profile (replace {{ic|low}} with any of the aforementioned profiles as necessary):<br />
<br />
# echo low > /sys/class/drm/card0/device/power_profile<br />
<br />
==== Persistent configuration ====<br />
<br />
The activation described above is not persistent, it will not last when the computer is rebooted. To make it persistent, you can use [[systemd#Temporary files|systemd-tmpfiles]] (example for [[#Dynamic frequency switching]]):<br />
<br />
{{hc|/etc/tmpfiles.d/radeon-pm.conf|<nowiki><br />
w /sys/class/drm/card0/device/power_method - - - - dynpm<br />
</nowiki>}}<br />
<br />
Alternatively, you may use this [[udev]] rule instead (example for [[#Profile-based frequency switching]]):<br />
<br />
{{hc|/etc/udev/rules.d/30-radeon-pm.rules|<nowiki><br />
KERNEL=="dri/card0", SUBSYSTEM=="drm", DRIVERS=="radeon", ATTR{device/power_method}="profile", ATTR{device/power_profile}="low"<br />
</nowiki>}}<br />
<br />
{{Note|If the above rule is failing, try removing the {{ic|dri/}} prefix.}}<br />
<br />
==== Graphical tools ====<br />
<br />
* {{App|Radeon-tray|A small program to control the power profiles of your Radeon card via systray icon. It is written in PyQt4 and is suitable for non-Gnome users.|https://github.com/StuntsPT/Radeon-tray|{{AUR|radeon-tray}}}}<br />
* {{App|power-play-switcher|A gui for changing powerplay setting of the open source driver for ati radeon video cards.|https://code.google.com/p/power-play-switcher/|{{AUR|power-play-switcher}}{{Broken package link|{{aur-mirror|power-play-switcher}}}}}}<br />
* {{App|Gnome-shell-extension-Radeon-Power-Profile-Manager|A small extension for Gnome-shell that will allow you to change the power profile of your radeon card when using the open source drivers.|https://github.com/StuntsPT/shell-extension-radeon-power-profile-manager|{{AUR|gnome-shell-extension-radeon-ppm}}{{Broken package link|{{aur-mirror|gnome-shell-extension-radeon-ppm}}}} {{AUR|gnome-shell-extension-radeon-power-profile-manager-git}}{{Broken package link|{{aur-mirror|gnome-shell-extension-radeon-power-profile-manager-git}}}}}}<br />
<br />
=== Other notes ===<br />
<br />
To view the speed that the GPU is running at, perform the following command and you will get something like this output:<br />
<br />
{{hc|# cat /sys/kernel/debug/dri/0/radeon_pm_info|<nowiki><br />
state: PM_STATE_ENABLED<br />
default engine clock: 300000 kHz<br />
current engine clock: 300720 kHz<br />
default memory clock: 200000 kHz<br />
</nowiki>}}<br />
<br />
It depends on which GPU line yours is, however. Along with the radeon driver versions, kernel versions, etc. So it may not have much/any voltage regulation at all.<br />
<br />
Thermal sensors are implemented via external i2c chips or via the internal thermal sensor (rv6xx-evergreen only). To get the temperature on asics that use i2c chips, you need to load the appropriate hwmon driver for the sensor used on your board (lm63, lm64, etc.). The drm will attempt to load the appropriate hwmon driver. On boards that use the internal thermal sensor, the drm will set up the hwmon interface automatically. When the appropriate driver is loaded, the temperatures can be accessed via [[lm_sensors]] tools or via sysfs in {{ic|/sys/class/hwmon}}.<br />
<br />
== Fan Speed ==<br />
<br />
While the power saving features above should handle fan speeds quite well, some cards may still be too noisy in their idle state. In this case, and when your card supports it, you can change the fan speed manually.<br />
<br />
{{Note|<br />
* Keep in mind that the following method sets the fan speed to a fixed value, hence it will not adjust with the stress of your gpu, which can lead to overheating under heavy load.<br />
* Better check your gpu temperature when applying lower than standard values. <br />
}}<br />
<br />
First, issue the following command to enable the manual adjustment of the fan speed of your graphics card (or your first gpu in case of a multi gpu setup). <br />
<br />
# echo 1 > /sys/class/drm/card0/device/hwmon/hwmon2/pwm1_enable<br />
<br />
Then set your desired fan speed from 0 to 255, which corresponds to 0-100% fan speed (The following command sets it to roughly 20%). <br />
<br />
# echo 55 > /sys/class/drm/card0/device/hwmon/hwmon2/pwm1<br />
<br />
For persistence, use [[systemd#Temporary files|systemd-tmpfiles]] as shown above by the example with power profiles.<br />
<br />
If a fixed value isn't desired, there are possibilities to define a custom fan curve manually by, for example, writing a script in which fan speeds are set depending on the current temperature (current value in /sys/class/drm/card0/device/hwmon/hwmon2/temp1_input), preferably with hystereses. There is also a gui solution: http://github.com/marazmista/radeon-profile{{AUR|radeon-profile-git}}.<br />
<br />
== TV out ==<br />
<br />
First, check that you have an S-video output: {{ic|xrandr}} should give you something like<br />
Screen 0: minimum 320x200, current 1024x768, maximum 1280x1200<br />
...<br />
S-video disconnected (normal left inverted right x axis y axis)<br />
<br />
Now we should tell Xorg that it is actually connected (it ''is'', right?)<br />
xrandr --output S-video --set "load detection" 1<br />
<br />
Setting TV standard to use:<br />
xrandr --output S-video --set "tv standard" ntsc<br />
<br />
Adding a mode for it (currently supports only 800x600):<br />
xrandr --addmode S-video 800x600<br />
<br />
Clone mode:<br />
xrandr --output S-video --same-as VGA-0<br />
<br />
Now let us try to see what we have:<br />
xrandr --output S-video --mode 800x600<br />
<br />
At this point you should see a 800x600 version of your desktop on your TV.<br />
<br />
To disable the output, do<br />
xrandr --output S-video --off<br />
<br />
Also you may notice that the video is being played on monitor only and not on the TV. Where the Xv overlay is sent is controlled by XV_CRTC attribute.<br />
<br />
To send the output to the TV, do:<br />
xvattr -a XV_CRTC -v 1<br />
<br />
{{Note| you need to install {{AUR|xvattr}}{{Broken package link|{{aur-mirror|xvattr}}}} to execute this command.}}<br />
<br />
To switch back to the monitor, I change this to {{ic|0}}. {{ic|-1}} is used for automatic switching in dualhead setups.<br />
<br />
Please see [http://www.x.org/wiki/radeonTV Enabling TV-Out Statically] for how to enable TV-out in your xorg configuration file.<br />
<br />
=== Force TV-out in KMS ===<br />
<br />
The kernel can recognize {{ic|1=video=}} parameter in following form (see [[KMS]] for more details):<br />
<br />
video=<conn>:<xres>x<yres>[M][R][-<bpp>][@<refresh>][i][m][eDd]<br />
<br />
For example:<br />
<br />
video=DVI-I-1:1280x1024-24@60e<br />
<br />
Parameters with whitespaces must be quoted:<br />
<br />
"video=9-pin DIN-1:1024x768-24@60e"<br />
<br />
Current mkinitcpio implementation also requires {{ic|#}} in front. For example:<br />
<br />
root=/dev/disk/by-uuid/d950a14f-fc0c-451d-b0d4-f95c2adefee3 ro quiet radeon.modeset=1 security=none # video=DVI-I-1:1280x1024-24@60e "video=9-pin DIN-1:1024x768-24@60e"<br />
<br />
* Grub can pass such command line as is.<br />
* Lilo needs backslashes for doublequotes (append {{ic|1=# \"video=9-pin DIN-1:1024x768-24@60e\"}})<br />
* Grub2: TODO<br />
<br />
You can get list of your video outputs with following command:<br />
<br />
{{bc|<nowiki>$ ls -1 /sys/class/drm/ | grep -E '^card[[:digit:]]+-' | cut -d- -f2-</nowiki>}}<br />
<br />
== HDMI audio ==<br />
<br />
HDMI audio is supported in the {{Pkg|xf86-video-ati}} video driver. By default HDMI audio is disabled in the driver kernel versions >=3.0 because it can be problematic. To enable HDMI audio add {{ic|1=radeon.audio=1}} to your [[kernel parameters]].<br />
<br />
If there is no video after boot up, the driver option has to be disabled.<br />
<br />
{{Note|<br />
* If HDMI audio does not work after installing the driver, test your setup with the procedure at [[Advanced Linux Sound Architecture/Troubleshooting#HDMI Output does not work]].<br />
* If the sound is distorted in PulseAudio try setting {{ic|1=tsched=0}} as described in [[PulseAudio/Troubleshooting#Glitches, skips or crackling]] and make sure {{ic|rtkit}} daemon is running.<br />
* Your sound card might use the same module, since HDA compliant hardware is pretty common. [[Advanced_Linux_Sound_Architecture#Set_the_default_sound_card|Change the default sound card]] using one of the suggested methods, which include using the {{ic|defaults}} node in alsa configuration.<br />
}}<br />
<br />
== Dual Head setup ==<br />
<br />
=== Independent X screens ===<br />
<br />
Independent dual-headed setups can be configured the usual way. However you might want to know that the radeon driver has a {{ic|"ZaphodHeads"}} option which allows you to bind a specific device section to an output of your choice, for instance using:<br />
Section "Device"<br />
Identifier "Device0"<br />
Driver "radeon"<br />
Option "ZaphodHeads" "VGA-0"<br />
VendorName "ATI"<br />
BusID "PCI:1:0:0"<br />
Screen 0<br />
EndSection<br />
<br />
This can be a life-saver, because some cards which have more than two outputs (for instance one HDMI out, one DVI, one VGA), will only select and use HDMI+DVI outputs for the dual-head setup, unless you explicitely specify {{ic|"ZaphodHeads" "VGA-0"}}.<br />
<br />
== Turn vsync off ==<br />
<br />
The radeon driver will enable vsync by default, which is perfectly fine except for benchmarking. To turn it off, create {{ic|~/.drirc}} (or edit it if it already exists) and add the following section:<br />
{{hc|~/.drirc|<nowiki><br />
<driconf><br />
<device screen="0" driver="dri2"><br />
<application name="Default"><br />
<option name="vblank_mode" value="0" /><br />
</application><br />
</device><br />
<!-- Other devices ... --><br />
</driconf><br />
</nowiki>}}<br />
Make sure the driver is '''dri2''', not your video card code (like r600).<br />
<br />
{{Accuracy|If the above does not work, please file a bug report. Also, why is the {{ic|SwapbuffersWait}} option relevant here?}}<br />
<br />
If vsync is still enabled, you can try to disable it by editing the xf86-video-ati configuration :<br />
<br />
{{hc|/etc/X11/xorg.conf.d/20-radeon.con|<nowiki><br />
Section "Device"<br />
Identifier "My Graphics Card"<br />
Driver "radeon"<br />
Option "EXAVSync" "off"<br />
Option "SwapbuffersWait" "false" <br />
EndSection<br />
</nowiki>}}<br />
<br />
== Troubleshooting ==<br />
<br />
=== Artifacts upon logging in ===<br />
<br />
If encountering artifacts, first try starting X without {{ic|/etc/X11/xorg.conf}}. Recent versions of Xorg are capable of reliable auto-detection and auto-configuration for most use cases. Outdated or improperly configured {{ic|xorg.conf}} files are known to cause trouble.<br />
<br />
In order to run without a configuration tile, it is recommended that the {{ic|xorg-input-drivers}} package group be installed.<br />
<br />
You may as well try disabling {{ic|EXAPixmaps}} in {{ic|/etc/X11/xorg.conf.d/20-radeon.conf}}:<br />
<br />
Section "Device"<br />
Identifier "Radeon"<br />
Driver "radeon"<br />
Option "EXAPixmaps" "off"<br />
EndSection<br />
<br />
=== Adding undetected resolutions ===<br />
<br />
Please see the [[Xrandr#Adding_undetected_resolutions|Xrandr page]].<br />
<br />
=== AGP is disabled (with KMS) ===<br />
<br />
If you experience poor performance and dmesg shows something like this<br />
[drm:radeon_agp_init] *ERROR* Unable to acquire AGP: -19<br />
then check if the agp driver for your motherboard (e.g., {{ic|via_agp}}, {{ic|intel_agp}} etc.) is loaded before the {{ic|radeon}} module, see [[#Enabling KMS|Enabling KMS]].<br />
<br />
=== TV showing a black border around the screen ===<br />
<br />
When I connected my TV to my Radeon HD 5770 using the HDMI port, the TV showed a blurry picture with a 2-3cm border around it. This is not the case when using the proprietary driver. However, this protection against overscanning (see [[Wikipedia:Overscan]]) can be turned off using xrandr:<br />
xrandr --output HDMI-0 --set underscan off<br />
<br />
=== Black screen with mouse cursor on resume from suspend in X ===<br />
<br />
Waking from suspend on cards with 32MB or less can result in a black screen with a mouse pointer in X. Some parts of the screen may be redrawn when under the mouse cursor. Forcing {{ic|EXAPixmaps}} to {{ic|"enabled"}} in {{ic|/etc/X11/xorg.conf.d/20-radeon.conf}} may fix the problem. See [[#Performance tuning|performance tuning]] for more information.<br />
<br />
=== No desktop effects in KDE4 with X1300 and Radeon driver ===<br />
<br />
A bug in KDE4 may prevent an accurate video hardware check, thereby deactivating desktop effects despite the X1300 having more than sufficient GPU power. A workaround may be to manually override such checks in KDE4 configuration files {{ic|/usr/share/kde-settings/kde-profile/default/share/config/kwinrc}} and/or {{ic|.kde/share/config/kwinrc}}. <br />
<br />
Add:<br />
DisableChecks=true<br />
<br />
To the [Compositing] section. Ensure that compositing is enabled with:<br />
Enabled=true<br />
<br />
=== Black screen and no console, but X works in KMS ===<br />
<br />
This is a solution to no-console problem that might come up, when using two or more ATI cards on the same PC. Fujitsu Siemens Amilo PA 3553 laptop for example has this problem. This is due to fbcon console driver mapping itself to wrong framebuffer device that exist on the wrong card. This can be fixed by adding a this to the kernel boot line:<br />
fbcon=map:1<br />
This will tell the fbcon to map itself to the {{ic|/dev/fb1}} framebuffer dev and not the {{ic|/dev/fb0}}, that in our case exist on the wrong graphics card. If that does not fix your problem, try booting with<br />
fbcon=map:0<br />
instead.<br />
<br />
=== 2D performance (e.g. scrolling) is slow ===<br />
<br />
If you have problem with 2D performance, like scrolling in terminal or browser, you might need to add {{ic|Option "MigrationHeuristic" "greedy"}} into the {{ic|"Device"}} section of your {{ic|xorg.conf}} file.<br />
<br />
{{Note|This only applies to EXA.}}<br />
<br />
Below is a sample config file {{ic|/etc/X11/xorg.conf.d/'''20-radeon.conf'''}}:<br />
<br />
{{bc|<br />
Section "Device"<br />
Identifier "My Graphics Card"<br />
Driver "radeon"<br />
Option "MigrationHeuristic" "greedy"<br />
EndSection<br />
}}<br />
<br />
=== Monitor rotation works for cursor but not windows/content ===<br />
<br />
Users with newer graphics boards who have enabled EXA instead of glamor may find that rotating their monitor with xrandr causes the cursor and monitor dimensions to rotate, but windows and other content stay in their normal orientation. Additionally, the cursor moves according to normal rotation when the user moves the mouse. Look for the following line in your {{ic|/var/log/Xorg.0.log}} when you issue the xrandr rotate command:<br />
{{bc|<br />
(EE) RADEON(0): Rotation requires acceleration!<br />
}}<br />
Acceleration is disabled when using EXA on newer graphics cards (source: [https://bugs.freedesktop.org/show_bug.cgi?id=73420#c17 comment 17]). You must choose between enabling EXA ([[#Glamor|detailed above in the glamor section]]) and the ability to rotate.<br />
<br />
=== ATI X1600 (RV530 series) 3D application show black windows ===<br />
<br />
There are three possible solutions:<br />
* Try add {{ic|<nowiki>pci=nomsi</nowiki>}} to your boot loader [[Kernel parameters]].<br />
* If this does not work, you can try adding {{ic|noapic}} instead of {{ic|<nowiki>pci=nomsi</nowiki>}}.<br />
* If none of the above work, then you can try running {{ic|<nowiki>vblank_mode=0 glxgears</nowiki>}} or {{ic|<nowiki>vblank_mode=1 glxgears</nowiki>}} to see which one works for you, then install {{pkg|driconf}} and set that option in {{ic|~/.drirc}}.<br />
<br />
=== Cursor corruption after coming out of sleep ===<br />
<br />
If the cursor becomes corrupted like it's repeating itself vertically after the monitor(s) comes out of sleep, set {{ic|"SWCursor" "True"}} in the {{ic|"Device"}} section of the {{ic|20-radeon.conf}} configuration file.<br />
<br />
=== DisplayPort stays black on multimonitor mode ===<br />
<br />
Try booting with the [[kernel parameter]] {{ic|1=radeon.audio=0}}.<br />
<br />
=== Low 2D performance in console and X ===<br />
<br />
Since kernel 4.1.4, [[#Dynamic power management|dpm]] is broken on certain R9 270X cards (chip device number 6810, subsystem 174b:e271, shown as Curacao XT, PC Partner Limited / Sapphire Technology Device e271 in lspci). The regression is caused by a [https://git.kernel.org/cgit/linux/kernel/git/stable/linux-stable.git/commit/?id=ea039f927524e36c15b5905b4c9469d788591932 fix] for cards with the same PCI ids. Disabling dpm (add {{ic|1=radeon.dpm=0}} to the [[kernel parameters]]) solves the problem.</div>Beta990https://wiki.archlinux.org/index.php?title=ATI&diff=411160ATI2015-12-07T09:57:48Z<p>Beta990: /* Performance tuning */ Moved VA into Performance Tuning</p>
<hr />
<div>[[Category:Graphics]]<br />
[[Category:X server]]<br />
[[de:ATI]]<br />
[[es:ATI]]<br />
[[fr:ATI]]<br />
[[it:ATI]]<br />
[[ja:ATI]]<br />
[[pl:ATI]]<br />
[[ru:ATI]]<br />
[[tr:ATI]]<br />
[[zh-CN:ATI]]<br />
{{Related articles start}}<br />
{{Related|AMD Catalyst}}<br />
{{Related|Xorg}}<br />
{{Related articles end}}<br />
<br />
{{Out of date|Owners of newer cards need {{Pkg|xf86-video-amdgpu}} instead of {{Pkg|xf86-video-ati}}.}}<br />
<br />
Owners of '''AMD''' (previously '''ATI''') video cards have a choice between AMD's [[AMD Catalyst|proprietary driver]] ({{AUR|catalyst}}) and the open source driver ({{Pkg|xf86-video-ati}}). This article covers the open source driver.<br />
<br />
The open source driver is ''on par'' performance-wise with the proprietary driver for many cards. (See this [http://www.phoronix.com/scan.php?page=article&item=radeonsi-cat-wow&num=1 benchmark].) It also has good dual-head support but worse TV-out support. Newer cards support might be lagging behind Catalyst.<br />
<br />
If unsure, try the open source driver first, it will suit most needs and is generally less problematic. (See the [http://www.x.org/wiki/RadeonFeature feature matrix] to know what is supported for the GPU.)<br />
<br />
== Naming conventions ==<br />
<br />
The [[Wikipedia:Radeon|Radeon]] brand follows a naming scheme that relates each product to a market segment. Within this article, readers will see both ''product'' names (e.g. HD 4850, X1900) and ''code'' or ''core'' names (e.g. RV770, R580). Traditionally, a ''product series'' will correspond to a ''core series'' (e.g. the "X1000" product series includes the X1300, X1600, X1800, and X1900 products which utilize the "R500" core series &ndash; including the RV515, RV530, R520, and R580 cores).<br />
<br />
For a table of core and product series, see [[Wikipedia:Radeon]] and [[Wikipedia:List of AMD graphics processing units]].<br />
<br />
== Overview ==<br />
*Latest Fiji and Tonga based graphics cards (Volcanic Islands/GCN 1.2) utilizing the new amdgpu kernel driver currently lack reclocking support, preventing the system to access the full performance. Reclocking is expected after Kernel release 4.4.<br />
*Radeons in the Rx 300 (except for R9 380), Rx 200 and HD 7xxx (Sea/Southern Islands or GCN 1.1/1.0) series and newer (except maybe the latest series) have almost complete feature coverage and offer best performance.<br />
*Radeons up to the X1xxx series are fully supported, stable, and full 2D and 3D accelerations are provided.<br />
*Radeons from HD 2xxx to HD 6xxx have full 2D acceleration and functional 3D acceleration, but are not supported by all the features that the proprietary driver provides. Performance varies from medicore for some cards to excellent for others.<br />
*Support of DRI1, RandR 1.2/1.3/1.4, Glamor, EXA acceleration and [[KMS|kernel mode-setting]]/DRI2.<br />
<br />
Check the [http://www.x.org/wiki/RadeonFeature feature matrix] for more details.<br />
<br />
Generally, '''xf86-video-ati''' should be your first choice, no matter which AMD/ATI card you own. In case you need to use a driver for newer AMD cards, you should consider the proprietary '''catalyst''' driver.<br />
<br />
{{Note|'''xf86-video-ati''' is specified as '''''radeon''''' for the kernel and in {{ic|xorg.conf}}. }}<br />
<br />
== Installation ==<br />
<br />
{{Note|If coming from the proprietary Catalyst driver, see [[AMD Catalyst#Uninstallation]] first.}}<br />
<br />
[[Install]] the {{Pkg|xf86-video-ati}} package. It provides the DDX driver for 2D acceleration and it pulls in {{Pkg|mesa}} as a dependency, providing the DRI driver for 3D acceleration.<br />
<br />
To enable OpenGL support, also install {{Pkg|mesa-libgl}}. If you are on x86_64 and need 32-bit support, also install {{Pkg|lib32-mesa-libgl}} from the [[multilib]] repository.<br />
<br />
Support for [[#Enabling video acceleration|accelerated video decoding]] is provided by {{Pkg|mesa-vdpau}} and {{Pkg|lib32-mesa-vdpau}} packages.<br />
<br />
== Configuration ==<br />
<br />
Xorg will automatically load the driver and it will use your monitor's EDID to set the native resolution. Configuration is only required for tuning the driver.<br />
<br />
If you want manual configuration, create {{ic|/etc/X11/xorg.conf.d/20-radeon.conf}}, and add the following:<br />
<br />
Section "Device"<br />
Identifier "Radeon"<br />
Driver "radeon"<br />
EndSection<br />
<br />
Using this section, you can enable features and tweak the driver settings.<br />
<br />
== Loading ==<br />
<br />
The radeon kernel module should load fine automatically on system boot.<br />
<br />
If it does not happen, then:<br />
<br />
* Make sure you do '''not''' have {{ic|nomodeset}} or {{ic|1=vga=}} as a [[kernel parameter]], since radeon requires kernel mode-setting.<br />
* Also, check that you have not disabled radeon by using any modprobe blacklisting within {{ic|/etc/modprobe.d/}} or {{ic|/usr/lib/modprobe.d/}}.<br />
<br />
=== Enable early KMS ===<br />
<br />
{{Tip|If you have problems with the resolution, [[Kernel mode setting#Forcing modes and EDID]] may help.}}<br />
<br />
[[Kernel mode setting]] (KMS) is supported by the radeon driver and is mandatory and enabled by default. <br />
<br />
KMS is typically initialized after the [[Arch boot process#initramfs|initramfs stage]]. It is possible, however, to enable KMS during the initramfs stage. To do this, add the {{ic|radeon}} module to the {{ic|MODULES}} line in {{ic|/etc/mkinitcpio.conf}}:<br />
<br />
MODULES="... radeon ..."<br />
<br />
Now, regenerate the initramfs:<br />
<br />
# mkinitcpio -p linux<br />
<br />
The change takes effect at the next reboot.<br />
<br />
== Performance tuning ==<br />
The following options apply to {{ic|/etc/X11/xorg.conf.d/'''20-radeon.conf'''}}.<br />
<br />
Please read {{ic|man radeon}} and [http://www.x.org/wiki/RadeonFeature/#index4h2 RadeonFeature] first before applying driver options.<br />
<br />
=== Enabling video acceleration ===<br />
[[VA-API]] and [[VDPAU]] can be installed to provide hardware accelerated video encoding and decoding.<br />
<br />
=== Driver Options ===<br />
<br />
'''ColorTiling''' and '''ColorTiling2D''' is completely safe to enable and supposedly is enabled by default. Most users will notice increased performance but it is not yet supported on R200 and earlier cards. Can be enabled on earlier cards, but the workload is transferred to the CPU:<br />
<br />
Option "ColorTiling" "on"<br />
Option "ColorTiling2D" "on"<br />
<br />
'''DRI3''' support can be enabled, instead of using the default '''DRI2'''. You may want to read the following benchmark by [http://www.phoronix.com/scan.php?page=article&item=radeon-dri3-perf&num=1 Phoronix] to give you an idea of the performance of DRI2 vs DRI3:<br />
<br />
Option "DRI" "3"<br />
<br />
'''TearFree''' is a tearing prevention using the hardware page flipping mechanism. Enabling this<br />
option currently disables Option "EnablePageFlip":<br />
<br />
Option "TearFree" "on"<br />
<br />
'''Acceleration architecture'''; Glamor is available as 2D acceleration method implement through OpenGL, and it should work with graphic cards whose drivers are newer or equal to R300.<br />
Since xf86-video-ati driver-1:7.2.0-1, it is automatically enabled with radeonsi drivers (Southern Islands and superior GFX cards); on other graphic cards the method can be forced by adding AccelMethod '''glamor''' to the config file:<br />
<br />
Option "AccelMethod" "glamor"<br />
<br />
When using Glamor as acceleration architecture it is possible to enable the option '''ShadowPrimary''', enables a so-called "shadow primary" buffer for fast CPU access to pixel data, and separate scanout buf‐fers for each display controller (CRTC). This may improve performance for some 2D workloads, potentially at the expense of other (e.g. 3D, video) workloads. Note that enabling this option currently disables Option "EnablePageFlip":<br />
<br />
Option "ShadowPrimary" "on"<br />
<br />
'''EXAVSync ''' is only available when using EXA and can be enabled to avoid tearing by stalling the engine until the display controller has passed the destination region. It reduces tearing at the cost of performance and has been know to cause instability on some chips:<br />
<br />
Option "EXAVSync" "yes"<br />
<br />
Below is a sample config file of {{ic|/etc/X11/xorg.conf.d/'''20-radeon.conf'''}}:<br />
<br />
{{bc|<br />
Section "Device"<br />
Identifier "Radeon"<br />
Driver "radeon"<br />
Option "AccelMethod" "Glamor"<br />
Option "DRI" "3"<br />
Option "TearFree" "on"<br />
EndSection<br />
}}<br />
<br />
{{Tip|{{Pkg|driconf}} is a tool that allows to modify several settings: vsync, anisotropic filtering, texture compression, etc. Using this tool it is also possible to "disable Low Impact fallback" needed by some programs (e.g. Google Earth).}}<br />
<br />
=== Kernel Parameters ===<br />
{{Tip|You may want to debug the newly parameters with {{ic|systool}} as stated in [[Kernel modules#Obtaining information]].}}<br />
Useful [[kernel parameters]] may be {{ic|1=radeon.bapm=1}} [https://www.phoronix.com/scan.php?page=news_item&px=MTczMzI], {{ic|1=radeon.disp_priority=2}} [http://lists.freedesktop.org/pipermail/xorg/2013-February/055477.html], {{ic|1=radeon.hw_i2c=1}} [https://superuser.com/questions/723760/does-radeon-hw-i2c-1-has-any-thing-to-do-with-temperature-readings], {{ic|1=radeon.mst=1}} [https://www.phoronix.com/scan.php?page=news_item&px=Linux-4.1-Radeon-DP-MST], {{ic|1=radeon.msi=1}} (force-enable MSI-support), {{ic|1=radeon.audio=0}} (force-disable GPU audio) and/or {{ic|1=radeon.tv=0}} (disable TV-out).<br />
<br />
Defining the '''gartsize''', if not autodetected, can be done by adding {{ic|1=radeon.gartsize=32}} into [[kernel parameters]].<br />
<br />
{{Note|Setting this parameter should not be needed anymore with modern AMD videocards:<br />
{{bc|<nowiki><br />
[drm] Detected VRAM RAM=2048M, BAR=256M<br />
[drm] radeon: 2048M of VRAM memory ready<br />
[drm] radeon: 2048M of GTT memory ready.<br />
</nowiki>}}<br />
}}<br />
<br />
The changes take effect at the next reboot.<br />
<br />
==== Deactivating PCI-E 2.0 ====<br />
<br />
Since kernel 3.6, PCI-E v2.0 in '''radeon''' is turned on by default.<br />
<br />
It may be unstable with some motherboards, deactivation can be done by adding {{ic|1=radeon.pcie_gen2=0}} as a [[kernel parameters]].<br />
<br />
See [http://www.phoronix.com/scan.php?page=article&item=amd_pcie_gen2&num=1 Phoronix article] for more information.<br />
<br />
=== Gallium Heads-Up Display ===<br />
<br />
The radeon driver supports activating a heads up display which can draw transparent graphs and text on top of applications that are rendering such as games. These can show such values as the current frame rate or the CPU load for each CPU core or an average of all of them. The HUD is controlled by the GALLIUM_HUD environment variable, and can be passed the following list of parameters among others:<br />
*"fps" - displays current frames per second<br />
*"cpu" - displays the average CPU load<br />
*"cpu0" - displays the CPU load for the first CPU core<br />
*"cpu0+cpu1" - displays the CPU load for the first two CPU cores<br />
*"draw-calls" - displays how many times each material in an object is drawn to the screen<br />
*"requested-VRAM" - displayed how much VRAM is being used on the GPU<br />
*"pixels-rendered" - displays how many pixels are being displayed<br />
<br />
To see a full list of parameters as well as some notes on operating GALLIUM_HUD you can also pass the "help" parameter to a simple application such as glxgears and see the corresponding terminal output:<br />
{{bc|1=# GALLIUM_HUD="help" glxgears }}<br />
<br />
More information can be found from this [http://lists.freedesktop.org/archives/mesa-dev/2013-March/036586.html mailing list post] or [https://kparal.wordpress.com/2014/03/03/fraps-like-fps-overlay-for-linux/ this blog post].<br />
<br />
== Hybrid graphics/AMD Dynamic Switchable Graphics ==<br />
<br />
It is the technology used on recent laptops equiped with two GPUs, one power-efficent (generally Intel integrated card) and one more powerful and more power-hungry (generally Radeon or Nvidia). There are two ways to get it work:<br />
<br />
* If it is not required to run 'GPU-hungry' applications, it is possible to disable the discrete card (see [https://help.ubuntu.com/community/HybridGraphics#Using_vga_switcheroo Ubuntu wiki]): {{ic|echo OFF > /sys/kernel/debug/vgaswitcheroo/switch}}.<br />
* [[PRIME]]: Is a proper way to use hybrid graphics on Linux, but still requires a bit of manual intervention from the user.<br />
<br />
== Powersaving ==<br />
{{Note|Power management is supported on all chips that include the appropriate power state tables in the vbios (R1xx and newer). "dpm" is only supported on R6xx and newer chips.}}<br />
<br />
With the radeon driver, power saving is disabled by default and has to be enabled manually if desired.<br />
<br />
You can choose between three different methods:<br />
<br />
# [[#Dynamic power management|dpm]] (enabled by default since kernel 3.13)<br />
# [[#Dynamic frequency switching|dynpm]]<br />
# [[#Profile-based frequency switching|profile]]<br />
<br />
'''It is hard to say which is the best for you, so you have to try it yourself!'''<br />
<br />
See http://www.x.org/wiki/RadeonFeature/#index3h2 for more details.<br />
<br />
=== Dynamic power management ===<br />
<br />
Since kernel 3.13, DPM is enabled by default for [http://kernelnewbies.org/Linux_3.13#head-f95c198f6fdc7defe36f470dc8369cf0e16898df lots of AMD Radeon hardware]. If you want to disable it, add the parameter {{ic|1=radeon.dpm=0}} to the [[kernel parameters]].<br />
<br />
Unlike [[#Dynamic frequency switching|dynpm]], the "dpm" method uses hardware on the GPU to dynamically change the clocks and voltage based on GPU load. It also enables clock and power gating.<br />
<br />
There are 3 operation modes to choose from:<br />
<br />
* {{ic|battery}} lowest power consumption<br />
* {{ic|balanced}} sane default<br />
* {{ic|performance}} highest performance<br />
<br />
They can be changed via sysfs<br />
# echo battery > /sys/class/drm/card0/device/power_dpm_state<br />
<br />
For testing or debugging purposes, you can force the card to run in a set performance mode:<br />
<br />
* {{ic|auto}} default; uses all levels in the power state<br />
* {{ic|low}} enforces the lowest performance level<br />
* {{ic|high}} enforces the highest performance level<br />
<br />
# echo low > /sys/class/drm/card0/device/power_dpm_force_performance_level<br />
<br />
=== Old methods ===<br />
<br />
==== Dynamic frequency switching ====<br />
<br />
This method dynamically changes the frequency depending on GPU load, so performance is ramped up when running GPU intensive apps, and ramped down when the GPU is idle. The re-clocking is attempted during vertical blanking periods, but due to the timing of the re-clocking functions, does not always complete in the blanking period, which can lead to flicker in the display. Due to this, dynpm only works when a single head is active.<br />
<br />
It can be activated by simply running the following command:<br />
<br />
# echo dynpm > /sys/class/drm/card0/device/power_method<br />
<br />
==== Profile-based frequency switching ====<br />
<br />
This method will allow you to select one of the five profiles (described below). Different profiles, for the most part, end up changing the frequency/voltage of the GPU. This method is not as aggressive, but is more stable and flicker free and works with multiple heads active.<br />
<br />
To activate the method, run the following command:<br />
<br />
# echo profile > /sys/class/drm/card0/device/power_method<br />
<br />
Select one of the available profiles:<br />
* {{ic|default}} uses the default clocks and does not change the power state. This is the default behaviour.<br />
* {{ic|auto}} selects between {{ic|mid}} and {{ic|high}} power states based on the whether the system is on battery power or not.<br />
* {{ic|low}} forces the gpu to be in the {{ic|low}} power state all the time. Note that {{ic|low}} can cause display problems on some laptops, which is why {{ic|auto}} only uses {{ic|low}} when monitors are off. Selected on other profiles when the monitors are in the [[DPMS]]-off state.<br />
* {{ic|mid}} forces the gpu to be in the {{ic|mid}} power state all the time.<br />
* {{ic|high}} forces the gpu to be in the {{ic|high}} power state all the time.<br />
<br />
As an example, we will activate the {{ic|low}} profile (replace {{ic|low}} with any of the aforementioned profiles as necessary):<br />
<br />
# echo low > /sys/class/drm/card0/device/power_profile<br />
<br />
==== Persistent configuration ====<br />
<br />
The activation described above is not persistent, it will not last when the computer is rebooted. To make it persistent, you can use [[systemd#Temporary files|systemd-tmpfiles]] (example for [[#Dynamic frequency switching]]):<br />
<br />
{{hc|/etc/tmpfiles.d/radeon-pm.conf|<nowiki><br />
w /sys/class/drm/card0/device/power_method - - - - dynpm<br />
</nowiki>}}<br />
<br />
Alternatively, you may use this [[udev]] rule instead (example for [[#Profile-based frequency switching]]):<br />
<br />
{{hc|/etc/udev/rules.d/30-radeon-pm.rules|<nowiki><br />
KERNEL=="dri/card0", SUBSYSTEM=="drm", DRIVERS=="radeon", ATTR{device/power_method}="profile", ATTR{device/power_profile}="low"<br />
</nowiki>}}<br />
<br />
{{Note|If the above rule is failing, try removing the {{ic|dri/}} prefix.}}<br />
<br />
==== Graphical tools ====<br />
<br />
* {{App|Radeon-tray|A small program to control the power profiles of your Radeon card via systray icon. It is written in PyQt4 and is suitable for non-Gnome users.|https://github.com/StuntsPT/Radeon-tray|{{AUR|radeon-tray}}}}<br />
* {{App|power-play-switcher|A gui for changing powerplay setting of the open source driver for ati radeon video cards.|https://code.google.com/p/power-play-switcher/|{{AUR|power-play-switcher}}{{Broken package link|{{aur-mirror|power-play-switcher}}}}}}<br />
* {{App|Gnome-shell-extension-Radeon-Power-Profile-Manager|A small extension for Gnome-shell that will allow you to change the power profile of your radeon card when using the open source drivers.|https://github.com/StuntsPT/shell-extension-radeon-power-profile-manager|{{AUR|gnome-shell-extension-radeon-ppm}}{{Broken package link|{{aur-mirror|gnome-shell-extension-radeon-ppm}}}} {{AUR|gnome-shell-extension-radeon-power-profile-manager-git}}{{Broken package link|{{aur-mirror|gnome-shell-extension-radeon-power-profile-manager-git}}}}}}<br />
<br />
=== Other notes ===<br />
<br />
To view the speed that the GPU is running at, perform the following command and you will get something like this output:<br />
<br />
{{hc|# cat /sys/kernel/debug/dri/0/radeon_pm_info|<nowiki><br />
state: PM_STATE_ENABLED<br />
default engine clock: 300000 kHz<br />
current engine clock: 300720 kHz<br />
default memory clock: 200000 kHz<br />
</nowiki>}}<br />
<br />
It depends on which GPU line yours is, however. Along with the radeon driver versions, kernel versions, etc. So it may not have much/any voltage regulation at all.<br />
<br />
Thermal sensors are implemented via external i2c chips or via the internal thermal sensor (rv6xx-evergreen only). To get the temperature on asics that use i2c chips, you need to load the appropriate hwmon driver for the sensor used on your board (lm63, lm64, etc.). The drm will attempt to load the appropriate hwmon driver. On boards that use the internal thermal sensor, the drm will set up the hwmon interface automatically. When the appropriate driver is loaded, the temperatures can be accessed via [[lm_sensors]] tools or via sysfs in {{ic|/sys/class/hwmon}}.<br />
<br />
== Fan Speed ==<br />
<br />
While the power saving features above should handle fan speeds quite well, some cards may still be too noisy in their idle state. In this case, and when your card supports it, you can change the fan speed manually.<br />
<br />
{{Note|<br />
* Keep in mind that the following method sets the fan speed to a fixed value, hence it will not adjust with the stress of your gpu, which can lead to overheating under heavy load.<br />
* Better check your gpu temperature when applying lower than standard values. <br />
}}<br />
<br />
First, issue the following command to enable the manual adjustment of the fan speed of your graphics card (or your first gpu in case of a multi gpu setup). <br />
<br />
# echo 1 > /sys/class/drm/card0/device/hwmon/hwmon2/pwm1_enable<br />
<br />
Then set your desired fan speed from 0 to 255, which corresponds to 0-100% fan speed (The following command sets it to roughly 20%). <br />
<br />
# echo 55 > /sys/class/drm/card0/device/hwmon/hwmon2/pwm1<br />
<br />
For persistence, use [[systemd#Temporary files|systemd-tmpfiles]] as shown above by the example with power profiles.<br />
<br />
If a fixed value isn't desired, there are possibilities to define a custom fan curve manually by, for example, writing a script in which fan speeds are set depending on the current temperature (current value in /sys/class/drm/card0/device/hwmon/hwmon2/temp1_input), preferably with hystereses. There is also a gui solution: http://github.com/marazmista/radeon-profile{{AUR|radeon-profile-git}}.<br />
<br />
== TV out ==<br />
<br />
First, check that you have an S-video output: {{ic|xrandr}} should give you something like<br />
Screen 0: minimum 320x200, current 1024x768, maximum 1280x1200<br />
...<br />
S-video disconnected (normal left inverted right x axis y axis)<br />
<br />
Now we should tell Xorg that it is actually connected (it ''is'', right?)<br />
xrandr --output S-video --set "load detection" 1<br />
<br />
Setting TV standard to use:<br />
xrandr --output S-video --set "tv standard" ntsc<br />
<br />
Adding a mode for it (currently supports only 800x600):<br />
xrandr --addmode S-video 800x600<br />
<br />
Clone mode:<br />
xrandr --output S-video --same-as VGA-0<br />
<br />
Now let us try to see what we have:<br />
xrandr --output S-video --mode 800x600<br />
<br />
At this point you should see a 800x600 version of your desktop on your TV.<br />
<br />
To disable the output, do<br />
xrandr --output S-video --off<br />
<br />
Also you may notice that the video is being played on monitor only and not on the TV. Where the Xv overlay is sent is controlled by XV_CRTC attribute.<br />
<br />
To send the output to the TV, do:<br />
xvattr -a XV_CRTC -v 1<br />
<br />
{{Note| you need to install {{AUR|xvattr}}{{Broken package link|{{aur-mirror|xvattr}}}} to execute this command.}}<br />
<br />
To switch back to the monitor, I change this to {{ic|0}}. {{ic|-1}} is used for automatic switching in dualhead setups.<br />
<br />
Please see [http://www.x.org/wiki/radeonTV Enabling TV-Out Statically] for how to enable TV-out in your xorg configuration file.<br />
<br />
=== Force TV-out in KMS ===<br />
<br />
The kernel can recognize {{ic|1=video=}} parameter in following form (see [[KMS]] for more details):<br />
<br />
video=<conn>:<xres>x<yres>[M][R][-<bpp>][@<refresh>][i][m][eDd]<br />
<br />
For example:<br />
<br />
video=DVI-I-1:1280x1024-24@60e<br />
<br />
Parameters with whitespaces must be quoted:<br />
<br />
"video=9-pin DIN-1:1024x768-24@60e"<br />
<br />
Current mkinitcpio implementation also requires {{ic|#}} in front. For example:<br />
<br />
root=/dev/disk/by-uuid/d950a14f-fc0c-451d-b0d4-f95c2adefee3 ro quiet radeon.modeset=1 security=none # video=DVI-I-1:1280x1024-24@60e "video=9-pin DIN-1:1024x768-24@60e"<br />
<br />
* Grub can pass such command line as is.<br />
* Lilo needs backslashes for doublequotes (append {{ic|1=# \"video=9-pin DIN-1:1024x768-24@60e\"}})<br />
* Grub2: TODO<br />
<br />
You can get list of your video outputs with following command:<br />
<br />
{{bc|<nowiki>$ ls -1 /sys/class/drm/ | grep -E '^card[[:digit:]]+-' | cut -d- -f2-</nowiki>}}<br />
<br />
== HDMI audio ==<br />
<br />
HDMI audio is supported in the {{Pkg|xf86-video-ati}} video driver. By default HDMI audio is disabled in the driver kernel versions >=3.0 because it can be problematic. To enable HDMI audio add {{ic|1=radeon.audio=1}} to your [[kernel parameters]].<br />
<br />
If there is no video after boot up, the driver option has to be disabled.<br />
<br />
{{Note|<br />
* If HDMI audio does not work after installing the driver, test your setup with the procedure at [[Advanced Linux Sound Architecture/Troubleshooting#HDMI Output does not work]].<br />
* If the sound is distorted in PulseAudio try setting {{ic|1=tsched=0}} as described in [[PulseAudio/Troubleshooting#Glitches, skips or crackling]] and make sure {{ic|rtkit}} daemon is running.<br />
* Your sound card might use the same module, since HDA compliant hardware is pretty common. [[Advanced_Linux_Sound_Architecture#Set_the_default_sound_card|Change the default sound card]] using one of the suggested methods, which include using the {{ic|defaults}} node in alsa configuration.<br />
}}<br />
<br />
== Dual Head setup ==<br />
<br />
=== Independent X screens ===<br />
<br />
Independent dual-headed setups can be configured the usual way. However you might want to know that the radeon driver has a {{ic|"ZaphodHeads"}} option which allows you to bind a specific device section to an output of your choice, for instance using:<br />
Section "Device"<br />
Identifier "Device0"<br />
Driver "radeon"<br />
Option "ZaphodHeads" "VGA-0"<br />
VendorName "ATI"<br />
BusID "PCI:1:0:0"<br />
Screen 0<br />
EndSection<br />
<br />
This can be a life-saver, because some cards which have more than two outputs (for instance one HDMI out, one DVI, one VGA), will only select and use HDMI+DVI outputs for the dual-head setup, unless you explicitely specify {{ic|"ZaphodHeads" "VGA-0"}}.<br />
<br />
== Enabling video acceleration ==<br />
Using the [[VA-API|Video Acceleration API]] is recommended to provide hardware accelerated video encoding and decoding.<br />
<br />
== Turn vsync off ==<br />
<br />
The radeon driver will enable vsync by default, which is perfectly fine except for benchmarking. To turn it off, create {{ic|~/.drirc}} (or edit it if it already exists) and add the following section:<br />
{{hc|~/.drirc|<nowiki><br />
<driconf><br />
<device screen="0" driver="dri2"><br />
<application name="Default"><br />
<option name="vblank_mode" value="0" /><br />
</application><br />
</device><br />
<!-- Other devices ... --><br />
</driconf><br />
</nowiki>}}<br />
Make sure the driver is '''dri2''', not your video card code (like r600).<br />
<br />
{{Accuracy|If the above does not work, please file a bug report. Also, why is the {{ic|SwapbuffersWait}} option relevant here?}}<br />
<br />
If vsync is still enabled, you can try to disable it by editing the xf86-video-ati configuration :<br />
<br />
{{hc|/etc/X11/xorg.conf.d/20-radeon.con|<nowiki><br />
Section "Device"<br />
Identifier "My Graphics Card"<br />
Driver "radeon"<br />
Option "EXAVSync" "off"<br />
Option "SwapbuffersWait" "false" <br />
EndSection<br />
</nowiki>}}<br />
<br />
== Troubleshooting ==<br />
<br />
=== Artifacts upon logging in ===<br />
<br />
If encountering artifacts, first try starting X without {{ic|/etc/X11/xorg.conf}}. Recent versions of Xorg are capable of reliable auto-detection and auto-configuration for most use cases. Outdated or improperly configured {{ic|xorg.conf}} files are known to cause trouble.<br />
<br />
In order to run without a configuration tile, it is recommended that the {{ic|xorg-input-drivers}} package group be installed.<br />
<br />
You may as well try disabling {{ic|EXAPixmaps}} in {{ic|/etc/X11/xorg.conf.d/20-radeon.conf}}:<br />
<br />
Section "Device"<br />
Identifier "Radeon"<br />
Driver "radeon"<br />
Option "EXAPixmaps" "off"<br />
EndSection<br />
<br />
=== Adding undetected resolutions ===<br />
<br />
Please see the [[Xrandr#Adding_undetected_resolutions|Xrandr page]].<br />
<br />
=== AGP is disabled (with KMS) ===<br />
<br />
If you experience poor performance and dmesg shows something like this<br />
[drm:radeon_agp_init] *ERROR* Unable to acquire AGP: -19<br />
then check if the agp driver for your motherboard (e.g., {{ic|via_agp}}, {{ic|intel_agp}} etc.) is loaded before the {{ic|radeon}} module, see [[#Enabling KMS|Enabling KMS]].<br />
<br />
=== TV showing a black border around the screen ===<br />
<br />
When I connected my TV to my Radeon HD 5770 using the HDMI port, the TV showed a blurry picture with a 2-3cm border around it. This is not the case when using the proprietary driver. However, this protection against overscanning (see [[Wikipedia:Overscan]]) can be turned off using xrandr:<br />
xrandr --output HDMI-0 --set underscan off<br />
<br />
=== Black screen with mouse cursor on resume from suspend in X ===<br />
<br />
Waking from suspend on cards with 32MB or less can result in a black screen with a mouse pointer in X. Some parts of the screen may be redrawn when under the mouse cursor. Forcing {{ic|EXAPixmaps}} to {{ic|"enabled"}} in {{ic|/etc/X11/xorg.conf.d/20-radeon.conf}} may fix the problem. See [[#Performance tuning|performance tuning]] for more information.<br />
<br />
=== No desktop effects in KDE4 with X1300 and Radeon driver ===<br />
<br />
A bug in KDE4 may prevent an accurate video hardware check, thereby deactivating desktop effects despite the X1300 having more than sufficient GPU power. A workaround may be to manually override such checks in KDE4 configuration files {{ic|/usr/share/kde-settings/kde-profile/default/share/config/kwinrc}} and/or {{ic|.kde/share/config/kwinrc}}. <br />
<br />
Add:<br />
DisableChecks=true<br />
<br />
To the [Compositing] section. Ensure that compositing is enabled with:<br />
Enabled=true<br />
<br />
=== Black screen and no console, but X works in KMS ===<br />
<br />
This is a solution to no-console problem that might come up, when using two or more ATI cards on the same PC. Fujitsu Siemens Amilo PA 3553 laptop for example has this problem. This is due to fbcon console driver mapping itself to wrong framebuffer device that exist on the wrong card. This can be fixed by adding a this to the kernel boot line:<br />
fbcon=map:1<br />
This will tell the fbcon to map itself to the {{ic|/dev/fb1}} framebuffer dev and not the {{ic|/dev/fb0}}, that in our case exist on the wrong graphics card. If that does not fix your problem, try booting with<br />
fbcon=map:0<br />
instead.<br />
<br />
=== 2D performance (e.g. scrolling) is slow ===<br />
<br />
If you have problem with 2D performance, like scrolling in terminal or browser, you might need to add {{ic|Option "MigrationHeuristic" "greedy"}} into the {{ic|"Device"}} section of your {{ic|xorg.conf}} file.<br />
<br />
{{Note|This only applies to EXA.}}<br />
<br />
Below is a sample config file {{ic|/etc/X11/xorg.conf.d/'''20-radeon.conf'''}}:<br />
<br />
{{bc|<br />
Section "Device"<br />
Identifier "My Graphics Card"<br />
Driver "radeon"<br />
Option "MigrationHeuristic" "greedy"<br />
EndSection<br />
}}<br />
<br />
=== Monitor rotation works for cursor but not windows/content ===<br />
<br />
Users with newer graphics boards who have enabled EXA instead of glamor may find that rotating their monitor with xrandr causes the cursor and monitor dimensions to rotate, but windows and other content stay in their normal orientation. Additionally, the cursor moves according to normal rotation when the user moves the mouse. Look for the following line in your {{ic|/var/log/Xorg.0.log}} when you issue the xrandr rotate command:<br />
{{bc|<br />
(EE) RADEON(0): Rotation requires acceleration!<br />
}}<br />
Acceleration is disabled when using EXA on newer graphics cards (source: [https://bugs.freedesktop.org/show_bug.cgi?id=73420#c17 comment 17]). You must choose between enabling EXA ([[#Glamor|detailed above in the glamor section]]) and the ability to rotate.<br />
<br />
=== ATI X1600 (RV530 series) 3D application show black windows ===<br />
<br />
There are three possible solutions:<br />
* Try add {{ic|<nowiki>pci=nomsi</nowiki>}} to your boot loader [[Kernel parameters]].<br />
* If this does not work, you can try adding {{ic|noapic}} instead of {{ic|<nowiki>pci=nomsi</nowiki>}}.<br />
* If none of the above work, then you can try running {{ic|<nowiki>vblank_mode=0 glxgears</nowiki>}} or {{ic|<nowiki>vblank_mode=1 glxgears</nowiki>}} to see which one works for you, then install {{pkg|driconf}} and set that option in {{ic|~/.drirc}}.<br />
<br />
=== Cursor corruption after coming out of sleep ===<br />
<br />
If the cursor becomes corrupted like it's repeating itself vertically after the monitor(s) comes out of sleep, set {{ic|"SWCursor" "True"}} in the {{ic|"Device"}} section of the {{ic|20-radeon.conf}} configuration file.<br />
<br />
=== DisplayPort stays black on multimonitor mode ===<br />
<br />
Try booting with the [[kernel parameter]] {{ic|1=radeon.audio=0}}.<br />
<br />
=== Low 2D performance in console and X ===<br />
<br />
Since kernel 4.1.4, [[#Dynamic power management|dpm]] is broken on certain R9 270X cards (chip device number 6810, subsystem 174b:e271, shown as Curacao XT, PC Partner Limited / Sapphire Technology Device e271 in lspci). The regression is caused by a [https://git.kernel.org/cgit/linux/kernel/git/stable/linux-stable.git/commit/?id=ea039f927524e36c15b5905b4c9469d788591932 fix] for cards with the same PCI ids. Disabling dpm (add {{ic|1=radeon.dpm=0}} to the [[kernel parameters]]) solves the problem.</div>Beta990https://wiki.archlinux.org/index.php?title=VA-API&diff=411159VA-API2015-12-07T09:55:29Z<p>Beta990: /* Configuration */ Sorry, the section VDPAU is separated from VA-API</p>
<hr />
<div>[[Category:Graphics]]<br />
[[Category:X server]]<br />
[[ja:VA-API]]<br />
[[ru:VA-API]]<br />
[[zh-CN:VA-API]]<br />
{{Related articles start}}<br />
{{Related|VDPAU}}<br />
{{Related|XvMC}}<br />
{{Related articles end}}<br />
<br />
'''[http://www.freedesktop.org/wiki/Software/vaapi Video Acceleration API]''' is a specification and open source library to provide hardware accelerated video encoding and decoding.<br />
<br />
== Supported hardware ==<br />
<br />
'''Open source drivers:'''<br />
<br />
* [[ATI|AMD]] Radeon 9500 and newer GPUs are supported by the {{pkg|libva-vdpau-driver}} package together with the {{pkg|mesa}} package.<br />
* [[Intel]] GMA 4500 series and newer GPUs are supported by the {{pkg|libva-intel-driver}} package together with the {{pkg|mesa}} package.<br />
* [[Nouveau|NVIDIA]] GeForce 8 series and newer GPUs are supported by the {{pkg|libva-vdpau-driver}} package together with the {{pkg|mesa}} package. It uses the {{AUR|nouveau-fw}} package, which contains the required firmware to operate that is presently extracted from the NVIDIA binary driver.<br />
<br />
'''Proprietary drivers:'''<br />
<br />
* [[AMD Catalyst|AMD]] Radeon HD 4000 series and newer GPUs are supported by the {{AUR|libva-xvba-driver}} package. It uses the {{AUR|catalyst-utils}} driver for Radeon HD 5000 series and newer, and {{AUR|catalyst-total-hd234k}} for Radeon HD 4000 series.<br />
* [[NVIDIA]] GeForce 8 series and newer GPUs are supported by the {{pkg|libva-vdpau-driver}} package together with the {{pkg|nvidia-utils}} driver.<br />
<br />
=== Supported formats ===<br />
<br />
{| class="wikitable" style="width: 100%"<br />
! <br />
! colspan="3" | Open source<br />
! colspan="2" | Proprietary<br />
|-<br />
! <br />
! AMD<br />
! Intel<br />
! Nvidia<br />
! AMD<br />
! Nvidia<br />
|-<br />
| MPEG2 decoding<br />
| Radeon 9500 and newer<br />
| GMA 4500 and newer<br />
| GeForce 8 and newer<br />
| Radeon HD 4000 and newer<br />
| GeForce 8 and newer<br />
|-<br />
| MPEG4 decoding<br />
| Radeon HD 6000 and newer<br />
| <center>—</center><br />
| GeForce 200 and newer<br />
| Radeon HD 6000 and newer<br />
| GeForce 200 and newer<br />
|-<br />
| H264 decoding<br />
| Radeon HD 4000 and newer<br />
| GMA 4500<sup>1</sup>, Ironlake Graphics and newer<br />
| GeForce 8 and newer<br />
| Radeon HD 4000 and newer<br />
| GeForce 8 and newer<br />
|-<br />
| VC1 decoding<br />
| Radeon HD 4000 and newer<br />
| Sandy Bridge Graphics and newer<br />
| GeForce 8200, 8300, 8400, 9300, 200 and newer<br />
| Radeon HD 4000 and newer<br />
| GeForce 8 and newer<br />
|-<br />
| MPEG2 encoding<br />
| <center>—</center><br />
| Ivy Bridge Graphics and newer<br />
| <center>—</center><br />
| <center>—</center><br />
| <center>—</center><br />
|-<br />
| H264 encoding<br />
| <center>—</center><br />
| Sandy Bridge Graphics and newer<br />
| <center>—</center><br />
| <center>—</center><br />
| <center>—</center><br />
|}<br />
<br />
<sup>1</sup>Supported by the {{AUR|libva-intel-driver-g45-h264}} package. See [[Intel graphics#H.264_decoding_on_GMA_4500|H.264 decoding on GMA 4500]] for instructions and caveats.<br />
<br />
In order to check what profiles (features) are supported by your GPU, you may want to read the [[#Verifying]] section.<br />
<br />
=== Configuration ===<br />
<br />
{{Note|There may no need to export the {{ic|LIBVA_DRIVER}}, since most (modern) applications and environments will find the VA-API library [[#Verifying|automatically]].}}<br />
<br />
For VAAPI acceleration, set the environment variable {{ic|LIBVA_DRIVER_NAME}} for {{Pkg|libva}} to find the desired driver, e.g.:<br />
<br />
{{hc|1=~/.bashrc|2=<br />
export LIBVA_DRIVER_NAME=gallium<br />
}}<br />
<br />
=== Verifying ===<br />
Verify the settings for VAAPI by running {{ic|vainfo}}, which is provided by the {{Pkg|libva}} package:<br />
{{hc|$ vainfo|<nowiki><br />
libva info: VA-API version 0.38.0<br />
libva info: va_getDriverName() returns 0<br />
libva info: User requested driver 'vdpau'<br />
libva info: Trying to open /usr/lib/dri/vdpau_drv_video.so<br />
libva info: Found init function __vaDriverInit_0_35<br />
libva info: va_openDriver() returns 0<br />
vainfo: VA-API version: 0.38 (libva 1.6.1)<br />
vainfo: Driver version: Splitted-Desktop Systems VDPAU backend for VA-API - 0.7.4<br />
vainfo: Supported profile and entrypoints<br />
VAProfileMPEG2Simple : VAEntrypointVLD<br />
VAProfileMPEG2Main : VAEntrypointVLD<br />
VAProfileMPEG4Simple : VAEntrypointVLD<br />
VAProfileMPEG4AdvancedSimple : VAEntrypointVLD<br />
VAProfileH264Baseline : VAEntrypointVLD<br />
VAProfileH264Main : VAEntrypointVLD<br />
VAProfileH264High : VAEntrypointVLD<br />
VAProfileVC1Simple : VAEntrypointVLD<br />
VAProfileVC1Main : VAEntrypointVLD<br />
VAProfileVC1Advanced : VAEntrypointVLD</nowiki>}}<br />
<br />
''VAEntrypointVLD'' means that your card is capable to decode this format, ''VAEntrypointEncSlice'' means that you can encode to this format.<br />
<br />
== Supported software ==<br />
<br />
* [[GStreamer]] based players - VA-API is used automatically, if supported format found.<br />
: See more at http://docs.gstreamer.com/display/GstSDK/Playback+tutorial+8%3A+Hardware-accelerated+video+decoding.<br />
* VLC media player: see [[VLC media player#Hardware acceleration support]].<br />
* Mpv: see [[Mpv#Hardware Decoding]].<br />
* MPlayer: see [[MPlayer#Enabling VA-API]].</div>Beta990https://wiki.archlinux.org/index.php?title=NVIDIA&diff=411158NVIDIA2015-12-07T09:54:25Z<p>Beta990: /* Enabling Pure Video HD (VDPAU/VAAPI) */ Removed section, since this is already merged into the Mplayer section and VA/VDPAU Wiki</p>
<hr />
<div>[[Category:Graphics]]<br />
[[Category:X server]]<br />
[[cs:NVIDIA]]<br />
[[de:Nvidia]]<br />
[[es:NVIDIA]]<br />
[[fa:اِنویدیا]]<br />
[[fr:Nvidia]]<br />
[[it:NVIDIA]]<br />
[[ja:NVIDIA]]<br />
[[nl:NVIDIA]]<br />
[[ru:NVIDIA]]<br />
[[tr:Nvidia]]<br />
[[zh-CN:NVIDIA]]<br />
{{Related articles start}}<br />
{{Related|Nouveau}}<br />
{{Related|Bumblebee}}<br />
{{Related|NVIDIA Optimus}}<br />
{{Related|Xorg}}<br />
{{Related articles end}}<br />
<br />
This article covers installing and configuring [http://www.nvidia.com NVIDIA]'s ''proprietary'' graphic card driver. For information about the open-source drivers, see [[Nouveau]]. If you have a laptop with hybrid Intel/NVIDIA graphics, see [[NVIDIA Optimus]] instead.<br />
<br />
== Installing ==<br />
<br />
{{Warning|Avoid installing the NVIDIA driver through the package provided from the NVIDIA website. Installation through [[pacman]] allows upgrading the driver together with the rest of the system.}}<br />
<br />
These instructions are for those using the stock {{Pkg|linux}} or {{Pkg|linux-lts}} packages. For custom kernel setup, skip to the [[#Alternate install: custom kernel|next]] subsection.<br />
<br />
1. If you do not know what graphics card you have, find out by issuing:<br />
:{{bc|<nowiki>$ lspci -k | grep -A 2 -E "(VGA|3D)"</nowiki>}}<br />
<br />
2. Determine the necessary driver version for your card by:<br />
:* finding the code name (e.g. NV50, NVC0, etc.) on [http://nouveau.freedesktop.org/wiki/CodeNames nouveau wiki's code names page]<br />
:* looking up the name in NVIDIA's [http://www.nvidia.com/object/IO_32667.html legacy card list]: if your card is not there you can use the latest driver<br />
:* visiting NVIDIA's [http://www.nvidia.com/Download/index.aspx driver download site]<br />
<br />
3. Install the appropriate driver for your card:<br />
:* For GeForce 400 series cards and newer [NVCx and newer], [[install]] the {{Pkg|nvidia}} or {{Pkg|nvidia-lts}} package along with {{Pkg|nvidia-libgl}}.<br />
:* For GeForce 8000/9000 and 100-300 series cards [NV5x, NV8x, NV9x and NVAx] from around 2006-2010, [[install]] the {{Pkg|nvidia-340xx}} or {{Pkg|nvidia-340xx-lts}} package along with {{Pkg|nvidia-340xx-libgl}}.<br />
:* For GeForce 6000/7000 series cards [NV4x and NV6x] from around 2004-2006, [[install]] the {{Pkg|nvidia-304xx}} or {{Pkg|nvidia-304xx-lts}} package along with {{Pkg|nvidia-304xx-libgl}}.<br />
<br />
:* For even older cards, have a look at [[#Unsupported drivers]].<br />
:* For the very latest GPU models, it may be required to [[install]] the {{AUR|nvidia-beta}} package, since the stable drivers may not support the newly introduced features.<br />
<br />
4. If you are on 64-bit and also need 32-bit OpenGL support, you must also install the equivalent ''lib32'' package from the [[multilib]] repository (e.g. {{Pkg|lib32-nvidia-libgl}}, {{Pkg|lib32-nvidia-340xx-libgl}} or {{Pkg|lib32-nvidia-304xx-libgl}}).<br />
<br />
5. Reboot. The {{Pkg|nvidia}} package contains a file which blacklists the ''nouveau'' module, so rebooting is necessary.<br />
<br />
Once the driver has been installed, continue to [[#Configuring]].<br />
<br />
=== Pure Video HD (VDPAU/VAAPI) ===<br />
<br />
At least a video card with second generation PureVideo HD[http://en.wikipedia.org/wiki/Nvidia_PureVideo#Table_of_PureVideo_.28HD.29_GPUs] is required to use [[VDPAU]] and [[VA-API]].<br />
<br />
=== Unsupported drivers ===<br />
<br />
If you have a GeForce 5 FX series card or older, Nvidia no longer supports drivers for your card. This means that these drivers [http://nvidia.custhelp.com/app/answers/detail/a_id/3142/ do not support the current Xorg version]. It thus might be easier if you use the [[nouveau]] driver, which supports the old cards with the current Xorg.<br />
<br />
However, Nvidia's legacy drivers are still available and might provide better 3D performance/stability if you are willing to downgrade Xorg:<br />
<br />
* For GeForce 5 FX series cards [NV30-NV36], install the {{AUR|nvidia-173xx-dkms}} package. Last supported Xorg version is 1.15.<br />
* For GeForce 2/3/4 MX/Ti series cards [NV11, NV17-NV28], install the {{AUR|nvidia-96xx-dkms}} package. Last supported Xorg version is 1.12.<br />
<br />
{{Tip|The legacy nvidia-96xx-dkms and nvidia-173xx-dkms drivers can also be installed from the unofficial [http://pkgbuild.com/~bgyorgy/city.html <nowiki>[city] repository</nowiki>]. (It is strongly advised that you do not skip any dependencies restriction when installing from here)}}<br />
<br />
=== Alternate install: custom kernel ===<br />
<br />
First of all, it is good to know how the ABS works by reading some of the other articles about it:<br />
<br />
* Main article for [[ABS]]<br />
* Article on [[makepkg]]<br />
* Article on [[Creating packages]]<br />
<br />
The following is a short tutorial for making a custom NVIDIA driver package using [[ABS]]:<br />
<br />
[[Install]] the {{Pkg|abs}} package and generate the tree with:<br />
# abs<br />
As a standard user, make a temporary directory for creating the new package:<br />
$ mkdir -p ~/abs<br />
Make a copy of the {{ic|nvidia}} package directory:<br />
$ cp -r /var/abs/extra/nvidia/ ~/abs/<br />
Go into the temporary {{ic|nvidia}} build directory:<br />
$ cd ~/abs/nvidia<br />
It is required to edit the files {{ic|nvidia.install}} and {{ic|PKGBUILD}} so that they contain the right kernel version variables.<br />
<br />
While running the custom kernel, get the appropriate kernel and local version names:<br />
$ uname -r<br />
# In nvidia.install, replace the {{ic|EXTRAMODULES<nowiki>=</nowiki>'extramodules-3.4-ARCH'}} variable with the custom kernel version, such as {{ic|EXTRAMODULES<nowiki>=</nowiki>'extramodules-3.4.4'}} or {{ic|EXTRAMODULES<nowiki>=</nowiki>'extramodules-3.4.4-custom'}} depending on what the kernel's version is and the local version's text/numbers. Do this for all instances of the version number within this file.<br />
# In PKGBUILD, change the {{ic|_extramodules<nowiki>=</nowiki>extramodules-3.4-ARCH}} variable to match the appropriate version, as above.<br />
# If there are multiple kernels installed in parallel (such as a custom kernel alongside the default -ARCH kernel), change the {{ic|pkgname<nowiki>=</nowiki>nvidia}} variable in the PKGBUILD to a unique identifier, such as nvidia-344 or nvidia-custom. This will allow both kernels to use the nvidia module, since the custom nvidia module has a different package name and will not overwrite the original. You will also need to comment the line in {{ic|package()}} that blacklists the nouveau module in {{ic|/usr/lib/modprobe.d/nvidia.conf}} (no need to do it again).<br />
<br />
Then do:<br />
$ makepkg -ci<br />
The {{ic|-c}} operand tells makepkg to clean left over files after building the package, whereas {{ic|-i}} specifies that makepkg should automatically run pacman to install the resulting package.<br />
<br />
==== Automatic re-compilation of the NVIDIA module with kernel update ====<br />
<br />
This is possible with the {{AUR|nvidia-hook}} package. You will need to install the module sources: {{Pkg|nvidia-dkms}}. In ''nvidia-hook'', the 'automatic re-compilation' functionality is done by a {{ic|nvidia}} hook on [[mkinitcpio]] after forcing to update the {{Pkg|linux-headers}} package. You will need to add {{ic|nvidia}} to the HOOKS array in {{ic|/etc/mkinitcpio.conf}}.<br />
<br />
The hook will call the ''dkms'' command to update the NVIDIA module for the version of your new kernel.<br />
<br />
{{Note|<br />
* If you are using this functionality it is '''important''' to look at the installation process of the {{Pkg|linux}} (or any other kernel) package. nvidia hook will tell you if anything goes wrong.<br />
* If you would like to do this manually please see [[Dynamic Kernel Module Support#Usage]].<br />
}}<br />
<br />
== Configuring ==<br />
<br />
It is possible that after installing the driver it may not be needed to create an Xorg server configuration file. You can run [[Xorg#Running|a test]] to see if the Xorg server will function correctly without a configuration file. However, it may be required to create a configuration file (prefer {{ic|/etc/X11/xorg.conf.d/20-nvidia.conf}} over {{ic|/etc/X11/xorg.conf}}) in order to adjust various settings. This configuration can be generated by the NVIDIA Xorg configuration tool, or it can be created manually. If created manually, it can be a minimal configuration (in the sense that it will only pass the basic options to the [[Xorg]] server), or it can include a number of settings that can bypass Xorg's auto-discovered or pre-configured options.<br />
{{Note|Since 1.8.x Xorg uses separate configuration files in {{ic|/etc/X11/xorg.conf.d/}} - check out [[#Advanced: 20-nvidia.conf|advanced configuration]] section.}}<br />
<br />
=== Minimal configuration ===<br />
<br />
A basic configuration block in {{ic|20-nvidia.conf}} (or deprecated in {{ic|xorg.conf}}) would look like this:<br />
<br />
{{hc|/etc/X11/xorg.conf.d/20-nvidia.conf|<br />
Section "Device"<br />
Identifier "Nvidia Card"<br />
Driver "nvidia"<br />
VendorName "NVIDIA Corporation"<br />
Option "NoLogo" "true"<br />
#Option "UseEDID" "false"<br />
#Option "ConnectedMonitor" "DFP"<br />
# ...<br />
EndSection<br />
}}<br />
<br />
{{Tip|If upgrading from nouveau make sure to remove "{{ic|nouveau}}" from {{ic|/etc/mkinitcpio.conf}}. See [[#Switching between NVIDIA and nouveau drivers|Switching between NVIDIA and nouveau drivers]], if switching between the open and proprietary drivers often.}}<br />
<br />
=== Automatic configuration ===<br />
<br />
The NVIDIA package includes an automatic configuration tool to create an Xorg server configuration file ({{ic|xorg.conf}}) and can be run by:<br />
# nvidia-xconfig<br />
<br />
This command will auto-detect and create (or edit, if already present) the {{ic|/etc/X11/xorg.conf}} configuration according to present hardware.<br />
<br />
If there are instances of DRI, ensure they are commented out:<br />
# Load "dri"<br />
Double check your {{ic|/etc/X11/xorg.conf}} to make sure your default depth, horizontal sync, vertical refresh, and resolutions are acceptable.<br />
<br />
{{Warning|That may still not work properly with Xorg-server 1.8 }}<br />
<br />
=== Multiple monitors ===<br />
<br />
:''See [[Multihead]] for more general information''<br />
<br />
==== Using NVIDIA Settings ====<br />
<br />
You can use the {{ic|nvidia-settings}} tool provided by {{Pkg|nvidia-utils}} to configure your multi-monitor setup. With this method, you will use the proprietary software NVIDIA provides with their drivers. Simply run {{ic|nvidia-settings}} as root, then configure as you wish, and then save the configuration to {{ic|/etc/X11/xorg.conf.d/10-monitor.conf}}.<br />
<br />
==== ConnectedMonitor ====<br />
<br />
If the driver doesn't properly detect a second monitor, you can force it to do so with ConnectedMonitor. <br />
<br />
{{hc|/etc/X11/xorg.conf|<br />
<br />
Section "Monitor"<br />
Identifier "Monitor1"<br />
VendorName "Panasonic"<br />
ModelName "Panasonic MICRON 2100Ex"<br />
HorizSync 30.0 - 121.0 # this monitor has incorrect EDID, hence Option "UseEDIDFreqs" "false"<br />
VertRefresh 50.0 - 160.0<br />
Option "DPMS"<br />
EndSection<br />
<br />
Section "Monitor"<br />
Identifier "Monitor2"<br />
VendorName "Gateway"<br />
ModelName "GatewayVX1120"<br />
HorizSync 30.0 - 121.0<br />
VertRefresh 50.0 - 160.0<br />
Option "DPMS"<br />
EndSection<br />
<br />
Section "Device"<br />
Identifier "Device1"<br />
Driver "nvidia"<br />
Option "NoLogo"<br />
Option "UseEDIDFreqs" "false"<br />
Option "ConnectedMonitor" "CRT,CRT"<br />
VendorName "NVIDIA Corporation"<br />
BoardName "GeForce 6200 LE"<br />
BusID "PCI:3:0:0"<br />
Screen 0<br />
EndSection<br />
<br />
Section "Device"<br />
Identifier "Device2"<br />
Driver "nvidia"<br />
Option "NoLogo"<br />
Option "UseEDIDFreqs" "false"<br />
Option "ConnectedMonitor" "CRT,CRT"<br />
VendorName "NVIDIA Corporation"<br />
BoardName "GeForce 6200 LE"<br />
BusID "PCI:3:0:0"<br />
Screen 1<br />
EndSection<br />
<br />
}}<br />
<br />
The duplicated device with {{ic|Screen}} is how you get X to use two monitors on one card without {{ic|TwinView}}. Note that {{ic|nvidia-settings}} will strip out any {{ic|ConnectedMonitor}} options you have added.<br />
<br />
==== TwinView ====<br />
<br />
You want only one big screen instead of two. Set the {{ic|TwinView}} argument to {{ic|1}}. This option should be used if you desire compositing. TwinView only works on a per card basis, when all participating monitors are connected to the same card.<br />
Option "TwinView" "1"<br />
<br />
Example configuration:<br />
{{hc|/etc/X11/xorg.conf.d/10-monitor.conf|<br />
Section "ServerLayout"<br />
Identifier "TwinLayout"<br />
Screen 0 "metaScreen" 0 0<br />
EndSection<br />
<br />
Section "Monitor"<br />
Identifier "Monitor0"<br />
Option "Enable" "true"<br />
EndSection<br />
<br />
Section "Monitor"<br />
Identifier "Monitor1"<br />
Option "Enable" "true"<br />
EndSection<br />
<br />
Section "Device"<br />
Identifier "Card0"<br />
Driver "nvidia"<br />
VendorName "NVIDIA Corporation"<br />
<br />
#refer to the link below for more information on each of the following options.<br />
Option "HorizSync" "DFP-0: 28-33; DFP-1 28-33"<br />
Option "VertRefresh" "DFP-0: 43-73; DFP-1 43-73"<br />
Option "MetaModes" "1920x1080, 1920x1080"<br />
Option "ConnectedMonitor" "DFP-0, DFP-1"<br />
Option "MetaModeOrientation" "DFP-1 LeftOf DFP-0"<br />
EndSection<br />
<br />
Section "Screen"<br />
Identifier "metaScreen"<br />
Device "Card0"<br />
Monitor "Monitor0"<br />
DefaultDepth 24<br />
Option "TwinView" "True"<br />
SubSection "Display"<br />
Modes "1920x1080"<br />
EndSubSection<br />
EndSection<br />
}}<br />
<br />
[ftp://download.nvidia.com/XFree86/Linux-x86/355.11/README/configtwinview.html Device option information].<br />
<br />
If you have multiple cards that are SLI capable, it is possible to run more than one monitor attached to separate cards (for example: two cards in SLI with one monitor attached to each). The "MetaModes" option in conjunction with SLI Mosaic mode enables this. Below is a configuration which works for the aforementioned example and runs [[GNOME]] flawlessly.<br />
{{hc|/etc/X11/xorg.conf.d/10-monitor.conf|<br />
Section "Device"<br />
Identifier "Card A"<br />
Driver "nvidia"<br />
BusID "PCI:1:00:0"<br />
EndSection<br />
<br />
Section "Device"<br />
Identifier "Card B"<br />
Driver "nvidia"<br />
BusID "PCI:2:00:0"<br />
EndSection<br />
<br />
Section "Monitor"<br />
Identifier "Right Monitor"<br />
EndSection<br />
<br />
Section "Monitor"<br />
Identifier "Left Monitor"<br />
EndSection<br />
<br />
Section "Screen"<br />
Identifier "Right Screen"<br />
Device "Card A"<br />
Monitor "Right Monitor"<br />
DefaultDepth 24<br />
Option "SLI" "Mosaic"<br />
Option "Stereo" "0"<br />
Option "BaseMosaic" "True"<br />
Option "MetaModes" "GPU-0.DFP-0: 1920x1200+4480+0, GPU-1.DFP-0:1920x1200+0+0"<br />
SubSection "Display"<br />
Depth 24<br />
EndSubSection<br />
EndSection<br />
<br />
Section "Screen"<br />
Identifier "Left Screen"<br />
Device "Card B"<br />
Monitor "Left Monitor"<br />
DefaultDepth 24<br />
Option "SLI" "Mosaic"<br />
Option "Stereo" "0"<br />
Option "BaseMosaic" "True"<br />
Option "MetaModes" "GPU-0.DFP-0: 1920x1200+4480+0, GPU-1.DFP-0:1920x1200+0+0"<br />
SubSection "Display"<br />
Depth 24<br />
EndSubSection<br />
EndSection<br />
<br />
Section "ServerLayout"<br />
Identifier "Default"<br />
Screen 0 "Right Screen" 0 0<br />
Option "Xinerama" "0"<br />
EndSection}}<br />
<br />
===== Manual CLI configuration with xrandr =====<br />
{{Accuracy|Do these commands set up the monitors in ''TwinView'' mode?}}<br />
<br />
If the latest solutions do not work for you, you can use your window manager's ''autostart'' implementation with {{Pkg|xorg-xrandr}}.<br />
<br />
Some {{ic|xrandr}} examples could be:<br />
<br />
xrandr --output DVI-I-0 --auto --primary --left-of DVI-I-1<br />
<br />
or:<br />
<br />
xrandr --output DVI-I-1 --pos 1440x0 --mode 1440x900 --rate 75.0<br />
<br />
When:<br />
<br />
* {{ic|--output}} is used to indicate the "monitor" to which the options are set.<br />
* {{ic|DVI-I-1}} is the name of the second monitor.<br />
* {{ic|--pos}} is the position of the second monitor relative to the first.<br />
* {{ic|--mode}} is the resolution of the second monitor.<br />
* {{ic|--rate}} is the refresh rate (in Hz).<br />
<br />
==== Mosaic mode ====<br />
<br />
Mosaic mode is the only way to use more than 2 monitors across multiple graphics cards with compositing. Your window manager may or may not recognize the distinction between each monitor.<br />
<br />
===== Base Mosaic =====<br />
<br />
Base Mosaic mode works on any set of Geforce 8000 series or higher GPUs. It cannot be enabled from within the nvidia-setting GUI. You must either use the {{ic|nvidia-xconfig}} command line program or edit {{ic|xorg.conf}} by hand. Metamodes must be specified. The following is an example for four DFPs in a 2x2 configuration, each running at 1920x1024, with two DFPs connected to two cards:<br />
$ nvidia-xconfig --base-mosaic --metamodes="GPU-0.DFP-0: 1920x1024+0+0, GPU-0.DFP-1: 1920x1024+1920+0, GPU-1.DFP-0: 1920x1024+0+1024, GPU-1.DFP-1: 1920x1024+1920+1024"<br />
<br />
{{Note|While the documentation lists a 2x2 configuration of monitors, Nvidia has reduced that ability to just 3 monitors in Base Mosaic mode as of driver version 304. More monitors are available with a Quadro card, but with standard consumer cards, it is limited to three. The explanation given for this reduction is "Feature parity with the Windows driver". As of September 2014, Windows has no restriction on the number of monitors, even on the same driver version. This is not a bug, this is entirely by design.}}<br />
<br />
===== SLI Mosaic =====<br />
<br />
If you have an SLI configuration and each GPU is a Quadro FX 5800, Quadro Fermi or newer then you can use SLI Mosaic mode. It can be enabled from within the nvidia-settings GUI or from the command line with:<br />
$ nvidia-xconfig --sli=Mosaic --metamodes="GPU-0.DFP-0: 1920x1024+0+0, GPU-0.DFP-1: 1920x1024+1920+0, GPU-1.DFP-0: 1920x1024+0+1024, GPU-1.DFP-1: 1920x1024+1920+1024"<br />
<br />
=== Driver Persistence ===<br />
<br />
Since version 319, Nvidia has changed the way driver persistence works, it now has a daemon that is to be run at boot. See the [http://docs.nvidia.com/deploy/driver-persistence/index.html Driver Persistence] section of the Nvidia documentation for more details.<br />
<br />
To start the persistence daemon at boot, [[enable]] the {{ic|nvidia-persistenced.service}}. For manual usage see the [http://docs.nvidia.com/deploy/driver-persistence/index.html#usage upstream documentation].<br />
<br />
== Tweaking ==<br />
<br />
=== GUI: nvidia-settings ===<br />
<br />
The NVIDIA package includes the {{ic|nvidia-settings}} program that allows adjustment of several additional settings.<br />
<br />
For the settings to be loaded on login, run this command from the terminal:<br />
$ nvidia-settings --load-config-only<br />
<br />
The desktop environment's auto-startup method 'may' not work for loading nvidia-settings properly (KDE). To be sure that settings are really loaded put the command in ~/.xinitrc file (create if not present).<br />
<br />
{{Tip|On rare occasions the {{ic|~/.nvidia-settings-rc}} may become corrupt. If this happens, the Xorg server may crash and the file will have to be deleted to fix the problem.}}<br />
<br />
=== Advanced: 20-nvidia.conf ===<br />
<br />
Edit {{ic|/etc/X11/xorg.conf.d/20-nvidia.conf}}, and add the option to the correct section. The Xorg server will need to be restarted before any changes are applied.<br />
<br />
See [ftp://download.nvidia.com/XFree86/Linux-x86/355.11/README/README.txt NVIDIA Accelerated Linux Graphics Driver README and Installation Guide] for additional details and options.<br />
<br />
==== Disabling the logo on startup ====<br />
<br />
Add the {{ic|"NoLogo"}} option under section {{ic|Device}}:<br />
Option "NoLogo" "1"<br />
<br />
==== Overriding monitor detection ====<br />
<br />
The {{ic|"ConnectedMonitor"}} option under section {{ic|Device}} allows to override monitor detection when X server starts, which may save a significant amount of time at start up. The available options are: {{ic|"CRT"}} for analog connections, {{ic|"DFP"}} for digital monitors and {{ic|"TV"}} for televisions.<br />
<br />
The following statement forces the NVIDIA driver to bypass startup checks and recognize the monitor as DFP:<br />
Option "ConnectedMonitor" "DFP"<br />
{{Note| Use "CRT" for all analog 15 pin VGA connections, even if the display is a flat panel. "DFP" is intended for DVI, HDMI, or DisplayPort digital connections only.}}<br />
<br />
==== Enabling brightness control ====<br />
<br />
Add under section {{ic|Device}}:<br />
Option "RegistryDwords" "EnableBrightnessControl=1"<br />
<br />
If brightness control still does not work with this option, try installing {{AUR|nvidia-bl}} or {{AUR|nvidiabl}}.<br />
<br />
==== Enabling SLI ====<br />
<br />
{{Warning|As of May 7, 2011, you may experience sluggish video performance in GNOME 3 after enabling SLI.}}<br />
<br />
Taken from the NVIDIA driver's [ftp://download.nvidia.com/XFree86/Linux-x86/355.11/README/xconfigoptions.html README] Appendix B: ''This option controls the configuration of SLI rendering in supported configurations.'' A "supported configuration" is a computer equipped with an SLI-Certified Motherboard and 2 or 3 SLI-Certified GeForce GPUs. See NVIDIA's [http://www.slizone.com/page/home.html SLI Zone] for more information.<br />
<br />
Find the first GPU's PCI Bus ID using {{ic|lspci}}:<br />
{{hc|<nowiki>$ lspci | grep VGA</nowiki>|<br />
03:00.0 VGA compatible controller: nVidia Corporation G92 [GeForce 8800 GTS 512] (rev a2)<br />
05:00.0 VGA compatible controller: nVidia Corporation G92 [GeForce 8800 GTS 512] (rev a2)<br />
}}<br />
<br />
Add the BusID (3 in the previous example) under section {{ic|Device}}:<br />
BusID "PCI:3:0:0"<br />
<br />
{{Note|The format is important. The BusID value must be specified as {{ic|"PCI:<BusID>:0:0"}}}}<br />
<br />
Add the desired SLI rendering mode value under section {{ic|Screen}}:<br />
Option "SLI" "AA"<br />
<br />
The following table presents the available rendering modes.<br />
<br />
{| class="wikitable"<br />
! Value !! Behavior<br />
|-<br />
| 0, no, off, false, Single || Use only a single GPU when rendering.<br />
|-<br />
| 1, yes, on, true, Auto || Enable SLI and allow the driver to automatically select the appropriate rendering mode.<br />
|-<br />
| AFR || Enable SLI and use the alternate frame rendering mode.<br />
|-<br />
| SFR || Enable SLI and use the split frame rendering mode.<br />
|-<br />
| AA || Enable SLI and use SLI antialiasing. Use this in conjunction with full scene antialiasing to improve visual quality.<br />
|}<br />
<br />
Alternatively, you can use the {{ic|nvidia-xconfig}} utility to insert these changes into {{ic|xorg.conf}} with a single command:<br />
# nvidia-xconfig --busid=PCI:3:0:0 --sli=AA<br />
<br />
To verify that SLI mode is enabled from a shell:<br />
{{hc|<nowiki>$ nvidia-settings -q all | grep SLIMode</nowiki>|<br />
Attribute 'SLIMode' (arch:0.0): AA <br />
'SLIMode' is a string attribute.<br />
'SLIMode' is a read-only attribute.<br />
'SLIMode' can use the following target types: X Screen.<br />
}}<br />
<br />
{{Warning| After enabling SLI, your system may become frozen/non-responsive upon starting xorg. It is advisable that you disable your display manager before restarting.}}<br />
<br />
==== Enabling overclocking ====<br />
<br />
{{Warning|Please note that overclocking may damage hardware and that no responsibility may be placed on the authors of this page due to any damage to any information technology equipment from operating products out of specifications set by the manufacturer.}}<br />
<br />
Overclocking is controlled via ''Coolbits'' option in the {{ic|Device}} section, which enables various unsupported features:<br />
Option "Coolbits" "''value''"<br />
<br />
{{Tip|The ''Coolbits'' option can be easily controlled with the ''nvidia-xconfig'', which manipulates the Xorg configuration files: {{bc|1=# nvidia-xconfig --cool-bits=''value''}}}}<br />
<br />
The ''Coolbits'' value is the sum of its component bits in the binary numeral system. The component bits are:<br />
<br />
* {{ic|1}} (bit 0) - Enables overclocking of older (pre-Fermi) cores on the ''Clock Frequencies'' page in ''nvidia-settings''.<br />
* {{ic|2}} (bit 1) - When this bit is set, the driver will "attempt to initialize SLI when using GPUs with different amounts of video memory".<br />
* {{ic|4}} (bit 2) - Enables manual configuration of GPU fan speed on the ''Thermal Monitor'' page in ''nvidia-settings''.<br />
* {{ic|8}} (bit 3) - Enables overclocking on the ''PowerMizer'' page in ''nvidia-settings''. Available since version 337.12 for the Fermi architecture and newer.[http://www.phoronix.com/scan.php?px=MTY1OTM&page=news_item]<br />
* {{ic|16}} (bit 4) - Enables overvoltage using ''nvidia-settings'' CLI options. Available since version 346.16 for the Fermi architecture and newer.[http://www.phoronix.com/scan.php?page=news_item&px=MTg0MDI]<br />
<br />
To enable multiple features, add the ''Coolbits'' values together. For example, to enable overclocking and overvoltage of Fermi cores, set {{ic|Option "Coolbits" "24"}}.<br />
<br />
The documentation of ''Coolbits'' can be found in {{ic|/usr/share/doc/nvidia/html/xconfigoptions.html}}. Driver version 346.16 documentation on ''Coolbits'' can be found online [ftp://download.nvidia.com/XFree86/Linux-x86/355.11/README/xconfigoptions.html here].<br />
<br />
{{Note|An alternative is to edit and reflash the GPU BIOS either under DOS (preferred), or within a Win32 environment by way of [http://www.mvktech.net/component/option,com_remository/Itemid,26/func,select/id,127/orderby,2/page,1/ nvflash]{{Dead link|2013|05|25}} and [http://www.mvktech.net/component/option,com_remository/Itemid,26/func,select/id,135/orderby,2/page,1/ NiBiTor 6.0]{{Dead link|2013|05|25}}. The advantage of BIOS flashing is that not only can voltage limits be raised, but stability is generally improved over software overclocking methods such as Coolbits. [http://ivanvojtko.blogspot.sk/2014/03/how-to-overclock-geforce-460gtx-fermi.html Fermi BIOS modification tutorial]}}<br />
<br />
===== Setting static 2D/3D clocks =====<br />
<br />
Set the following string in the {{ic|Device}} section to enable PowerMizer at its maximum performance level (VSync won't work without this line):<br />
Option "RegistryDwords" "PerfLevelSrc=0x2222"<br />
<br />
== Tips and tricks ==<br />
<br />
=== Fixing terminal resolution ===<br />
Transitioning from nouveau may cause your startup terminal to display at a lower resolution. For GRUB, see [[GRUB/Tips and tricks#Setting the framebuffer resolution]] for details.<br />
<br />
=== Avoid screen tearing in KDE (KWin) ===<br />
<br />
{{hc|/etc/profile.d/kwin.sh|<nowiki><br />
export __GL_YIELD="USLEEP"<br />
</nowiki>}}<br />
<br />
Also if the above doesn't help, then try this:<br />
{{hc|/etc/profile.d/kwin.sh|<nowiki><br />
export KWIN_TRIPLE_BUFFER=1<br />
</nowiki>}}<br />
<br />
Do not have both of the above enabled at the same time.<br />
Also if you enable triple buffering make sure to enable TripleBuffering for the driver itself.<br />
Source: https://bugs.kde.org/show_bug.cgi?id=322060<br />
<br />
=== Hardware accelerated video decoding with XvMC ===<br />
<br />
Accelerated decoding of MPEG-1 and MPEG-2 videos via [[XvMC]] are supported on GeForce4, GeForce 5 FX, GeForce 6 and GeForce 7 series cards. To use it, create a new file {{ic|/etc/X11/XvMCConfig}} with the following content:<br />
libXvMCNVIDIA_dynamic.so.1<br />
<br />
See how to configure [[XvMC#Supported software|supported software]].<br />
<br />
=== Using TV-out ===<br />
<br />
A good article on the subject can be found [http://en.wikibooks.org/wiki/NVidia/TV-OUT here].<br />
<br />
=== X with a TV (DFP) as the only display ===<br />
<br />
The X server falls back to CRT-0 if no monitor is automatically detected. This can be a problem when using a DVI connected TV as the main display, and X is started while the TV is turned off or otherwise disconnected.<br />
<br />
To force NVIDIA to use DFP, store a copy of the EDID somewhere in the filesystem so that X can parse the file instead of reading EDID from the TV/DFP.<br />
<br />
To acquire the EDID, start nvidia-settings. It will show some information in tree format, ignore the rest of the settings for now and select the GPU (the corresponding entry should be titled "GPU-0" or similar), click the {{ic|DFP}} section (again, {{ic|DFP-0}} or similar), click on the {{ic|Acquire Edid}} Button and store it somewhere, for example, {{ic|/etc/X11/dfp0.edid}}.<br />
<br />
If in the front-end mouse and keyboard aren't attached, the EDID can be acquired using only the command line. Run an X server with enough verbosity to print out the EDID block:<br />
$ startx -- -logverbose 6<br />
After the X Server has finished initializing, close it and your log file will probably be in {{ic|/var/log/Xorg.0.log}}. Extract the EDID block using nvidia-xconfig:<br />
$ nvidia-xconfig --extract-edids-from-file=/var/log/Xorg.0.log --extract-edids-output-file=/etc/X11/dfp0.bin<br />
<br />
Edit {{ic|xorg.conf}} by adding to the {{ic|Device}} section:<br />
Option "ConnectedMonitor" "DFP"<br />
Option "CustomEDID" "DFP-0:/etc/X11/dfp0.edid"<br />
The {{ic|ConnectedMonitor}} option forces the driver to recognize the DFP as if it were connected. The {{ic|CustomEDID}} provides EDID data for the device, meaning that it will start up just as if the TV/DFP was connected during X the process.<br />
<br />
This way, one can automatically start a display manager at boot time and still have a working and properly configured X screen by the time the TV gets powered on.<br />
<br />
If the above changes didn't work, in the {{ic|xorg.conf}} under {{ic|Device}} section you can try to remove the {{ic|Option "ConnectedMonitor" "DFP"}} and add the following lines:<br />
Option "ModeValidation" "NoDFPNativeResolutionCheck"<br />
Option "ConnectedMonitor" "DFP-0"<br />
<br />
The {{ic|NoDFPNativeResolutionCheck}} prevents NVIDIA driver from disabling all the modes that do not fit in the native resolution.<br />
<br />
=== Check the power source ===<br />
<br />
The NVIDIA X.org driver can also be used to detect the GPU's current source of power. To see the current power source, check the 'GPUPowerSource' read-only parameter (0 - AC, 1 - battery):<br />
<br />
{{hc|$ nvidia-settings -q GPUPowerSource -t|1}}<br />
<br />
=== Listening to ACPI events ===<br />
<br />
NVIDIA drivers automatically try to connect to the [[acpid]] daemon and listen to ACPI events such as battery power, docking, some hotkeys, etc. If connection fails, X.org will output the following warning:<br />
<br />
{{hc|~/.local/share/xorg/Xorg.0.log|<br />
NVIDIA(0): ACPI: failed to connect to the ACPI event daemon; the daemon<br />
NVIDIA(0): may not be running or the "AcpidSocketPath" X<br />
NVIDIA(0): configuration option may not be set correctly. When the<br />
NVIDIA(0): ACPI event daemon is available, the NVIDIA X driver will<br />
NVIDIA(0): try to use it to receive ACPI event notifications. For<br />
NVIDIA(0): details, please see the "ConnectToAcpid" and<br />
NVIDIA(0): "AcpidSocketPath" X configuration options in Appendix B: X<br />
NVIDIA(0): Config Options in the README.<br />
}}<br />
<br />
While completely harmless, you may get rid of this message by disabling the {{ic|ConnectToAcpid}} option in your {{ic|/etc/X11/xorg.conf.d/20-nvidia.conf}}:<br />
<br />
Section "Device"<br />
...<br />
Driver "nvidia"<br />
Option "ConnectToAcpid" "0"<br />
...<br />
EndSection<br />
<br />
If you are on laptop, it might be a good idea to install and enable the [[acpid]] daemon instead.<br />
<br />
=== Displaying GPU temperature in the shell ===<br />
<br />
==== Method 1 - nvidia-settings ====<br />
<br />
{{Note|This method requires that you are using X. Use Method 2 or Method 3 if you are not. Also note that Method 3 currently does not not work with newer NVIDIA cards such as GeForce 200 series cards as well as embedded GPUs such as the Zotac IONITX's 8800GS.}}<br />
<br />
To display the GPU temp in the shell, use {{ic|nvidia-settings}} as follows:<br />
$ nvidia-settings -q gpucoretemp<br />
<br />
This will output something similar to the following:<br />
Attribute 'GPUCoreTemp' (hostname:0.0): 41.<br />
'GPUCoreTemp' is an integer attribute.<br />
'GPUCoreTemp' is a read-only attribute.<br />
'GPUCoreTemp' can use the following target types: X Screen, GPU.<br />
<br />
The GPU temps of this board is 41 C.<br />
<br />
In order to get just the temperature for use in utils such as {{ic|rrdtool}} or {{ic|conky}}, among others:<br />
{{hc|$ nvidia-settings -q gpucoretemp -t|41}}<br />
<br />
==== Method 2 - nvidia-smi ====<br />
<br />
Use nvidia-smi which can read temps directly from the GPU without the need to use X at all. This is important for a small group of users who do not have X running on their boxes, perhaps because the box is headless running server apps. <br />
To display the GPU temperature in the shell, use nvidia-smi as follows:<br />
<br />
$ nvidia-smi<br />
<br />
This should output something similar to the following:<br />
{{hc|$ nvidia-smi|<nowiki><br />
Fri Jan 6 18:53:54 2012 <br />
+------------------------------------------------------+ <br />
| NVIDIA-SMI 2.290.10 Driver Version: 290.10 | <br />
|-------------------------------+----------------------+----------------------+<br />
| Nb. Name | Bus Id Disp. | Volatile ECC SB / DB |<br />
| Fan Temp Power Usage /Cap | Memory Usage | GPU Util. Compute M. |<br />
|===============================+======================+======================|<br />
| 0. GeForce 8500 GT | 0000:01:00.0 N/A | N/A N/A |<br />
| 30% 62 C N/A N/A / N/A | 17% 42MB / 255MB | N/A Default |<br />
|-------------------------------+----------------------+----------------------|<br />
| Compute processes: GPU Memory |<br />
| GPU PID Process name Usage |<br />
|=============================================================================|<br />
| 0. ERROR: Not Supported |<br />
+-----------------------------------------------------------------------------+<br />
</nowiki>}}<br />
<br />
Only for temperature:<br />
{{hc|$ nvidia-smi -q -d TEMPERATURE|<nowiki><br />
<br />
==============NVSMI LOG==============<br />
<br />
Timestamp : Sun Apr 12 08:49:10 2015<br />
Driver Version : 346.59<br />
<br />
Attached GPUs : 1<br />
GPU 0000:01:00.0<br />
Temperature<br />
GPU Current Temp : 52 C<br />
GPU Shutdown Temp : N/A<br />
GPU Slowdown Temp : N/A<br />
<br />
</nowiki>}}<br />
<br />
In order to get just the temperature for use in utils such as rrdtool or conky, among others:<br />
<br />
{{hc|<nowiki>$ nvidia-smi --query-gpu=temperature.gpu --format=csv,noheader,nounits</nowiki>|52}}<br />
<br />
Reference: http://www.question-defense.com/2010/03/22/gpu-linux-shell-temp-get-nvidia-gpu-temperatures-via-linux-cli.<br />
<br />
==== Method 3 - nvclock ====<br />
<br />
Use {{AUR|nvclock}} which is available from the [[AUR]].<br />
{{Note|{{ic|nvclock}} cannot access thermal sensors on newer NVIDIA cards such as Geforce 200 series cards.}}<br />
<br />
There can be significant differences between the temperatures reported by nvclock and nvidia-settings/nv-control. According to [http://sourceforge.net/projects/nvclock/forums/forum/67426/topic/1906899 this post] by the author (thunderbird) of nvclock, the nvclock values should be more accurate.<br />
<br />
=== Set fan speed at login ===<br />
<br />
{{Poor writing|Refer to [[#Enabling overclocking]] for description of ''Coolbits''.}}<br />
<br />
You can adjust the fan speed on your graphics card with ''nvidia-settings''' console interface. First ensure that your Xorg configuration sets the Coolbits option to {{ic|4}}, {{ic|5}} or {{ic|12}} for fermi and above in your {{ic|Device}} section to enable fan control.<br />
<br />
Option "Coolbits" "4"<br />
<br />
{{Note|GeForce 400/500 series cards cannot currently set fan speeds at login using this method. This method only allows for the setting of fan speeds within the current X session by way of nvidia-settings.}}<br />
<br />
Place the following line in your [[xinitrc]] file to adjust the fan when you launch Xorg. Replace {{ic|''n''}} with the fan speed percentage you want to set.<br />
<br />
nvidia-settings -a "[gpu:0]/GPUFanControlState=1" -a "[fan:0]/GPUCurrentFanSpeed=''n''"<br />
<br />
You can also configure a second GPU by incrementing the GPU and fan number.<br />
<br />
nvidia-settings -a "[gpu:0]/GPUFanControlState=1" -a "[fan:0]/GPUCurrentFanSpeed=''n''" \<br />
-a "[gpu:1]/GPUFanControlState=1" -a [fan:1]/GPUCurrentFanSpeed=''n''" &<br />
<br />
If you use a login manager such as GDM or KDM, you can create a desktop entry file to process this setting. Create {{ic|~/.config/autostart/nvidia-fan-speed.desktop}} and place this text inside it. Again, change {{ic|''n''}} to the speed percentage you want.<br />
<br />
[Desktop Entry]<br />
Type=Application<br />
Exec=nvidia-settings -a "[gpu:0]/GPUFanControlState=1" -a "[fan:0]/GPUCurrentFanSpeed=''n''"<br />
X-GNOME-Autostart-enabled=true<br />
Name=nvidia-fan-speed<br />
<br />
{{Note|Since the drivers version 349.16, {{ic|GPUCurrentFanSpeed}} has to be replaced with {{ic|GPUTargetFanSpeed}}.[https://devtalk.nvidia.com/default/topic/821563/linux/can-t-control-fan-speed-with-beta-driver-349-12/post/4526208/#4526208]}}<br />
<br />
=== Order of install/deinstall for changing drivers ===<br />
<br />
{{Expansion|Not clear what this does}}<br />
<br />
Where the old driver is nvidiaO and the new driver is nvidiaN.<br />
<br />
*remove nvidiaO<br />
*install nvidia-libglN<br />
*install nvidiaN<br />
*install lib32-nvidia-libgl-N (if required)<br />
<br />
=== Switching between NVIDIA and nouveau drivers ===<br />
<br />
If you need to switch between drivers, you may use the following script, run as root (say yes to all confirmations):<br />
<br />
{{bc|1=<nowiki><br />
#!/bin/bash<br />
BRANCH= # Enter a branch if needed, i.e. -340xx or -304xx<br />
NVIDIA=nvidia${BRANCH} # If no branch entered above this would be "nvidia"<br />
NOUVEAU=xf86-video-nouveau<br />
<br />
# Replace -R with -Rs to if you want to remove the unneeded dependencies<br />
if [ $(pacman -Qqs ^mesa-libgl$) ]; then<br />
pacman -S $NVIDIA ${NVIDIA}-libgl # Add lib32-${NVIDIA}-libgl and ${NVIDIA}-lts if needed<br />
# pacman -R $NOUVEAU<br />
elif [ $(pacman -Qqs ^${NVIDIA}$) ]; then<br />
pacman -S --needed $NOUVEAU mesa-libgl # Add lib32-mesa-libgl if needed<br />
pacman -R $NVIDIA # Add ${NVIDIA}-lts if needed<br />
fi<br />
</nowiki>}}<br />
<br />
=== Avoid tearing with GeForce 500/600/700/900 series cards === <br />
<br />
Tearing can be avoided by forcing a full composition pipeline, regardless of the compositor you are using. To test whether this option will work, type<br />
nvidia-settings --assign CurrentMetaMode="nvidia-auto-select +0+0 { ForceFullCompositionPipeline = On }"<br />
It has been reported to reduce the performance of some OpenGL applications, though.<br />
<br />
In order to make the change permanent, you need to add the following line to the {{ic|"Screen"}} section of your Xorg configuration file, for example {{ic|/etc/X11/xorg.conf.d/20-nvidia.conf}}:<br />
Option "metamodes" "nvidia-auto-select +0+0 { ForceFullCompositionPipeline = On }"<br />
<br />
If you don't have an Xorg configuration file, you can create one for your present hardware using {{ic|nvidia-xconfig}} (see [[#Automatic configuration]]) and move it from {{ic|/etc/X11/xorg.conf}} to the preferred location {{ic|/etc/X11/xorg.conf.d/20-nvidia.conf}}.<br />
<br />
== Troubleshooting ==<br />
<br />
=== Gaming using TwinView ===<br />
<br />
In case you want to play fullscreen games when using TwinView, you will notice that games recognize the two screens as being one big screen. While this is technically correct (the virtual X screen really is the size of your screens combined), you probably do not want to play on both screens at the same time. <br />
<br />
To correct this behavior for SDL, try:<br />
export SDL_VIDEO_FULLSCREEN_HEAD=1<br />
<br />
For OpenGL, add the appropriate Metamodes to your xorg.conf in section {{ic|Device}} and restart X:<br />
Option "Metamodes" "1680x1050,1680x1050; 1280x1024,1280x1024; 1680x1050,NULL; 1280x1024,NULL;"<br />
<br />
Another method that may either work alone or in conjunction with those mentioned above is [[Gaming#Starting_games_in_a_separate_X_server|starting games in a separate X server]].<br />
<br />
=== Vertical sync using TwinView ===<br />
<br />
If you're using TwinView and vertical sync (the "Sync to VBlank" option in '''nvidia-settings'''), you will notice that only one screen is being properly synced, unless you have two identical monitors. Although '''nvidia-settings''' does offer an option to change which screen is being synced (the "Sync to this display device" option), this does not always work. A solution is to add the following environment variables at startup, for example append in {{ic|/etc/profile}}:<br />
<br />
export __GL_SYNC_TO_VBLANK=1<br />
export __GL_SYNC_DISPLAY_DEVICE=DFP-0<br />
export __VDPAU_NVIDIA_SYNC_DISPLAY_DEVICE=DFP-0<br />
<br />
You can change {{ic|DFP-0}} with your preferred screen ({{ic|DFP-0}} is the DVI port and {{ic|CRT-0}} is the VGA port). You can find the identifier for your display from '''nvidia-settings''' in the "X Server XVideoSettings" section.<br />
<br />
=== Wayland (gdm) crashes after nvidia-libgl installation ===<br />
<br />
On some Intel CPUs outdated microcode causes instability with Wayland when nvidia are installed, causing gdm to crash.<br />
<br />
[[Microcode#Updating Microcode|Updating the microcode]] should solve this problem.<br />
<br />
=== Corrupted screen: "Six screens" Problem ===<br />
<br />
For some users, using GeForce GT 100M's, the screen gets corrupted after X starts, divided into 6 sections with a resolution limited to 640x480.<br />
The same problem has been recently reported with Quadro 2000 and hi-res displays.<br />
<br />
To solve this problem, enable the Validation Mode {{ic|NoTotalSizeCheck}} in section {{ic|Device}}:<br />
Section "Device"<br />
...<br />
Option "ModeValidation" "NoTotalSizeCheck"<br />
...<br />
EndSection<br />
<br />
=== '/dev/nvidia0' input/output error ===<br />
<br />
{{Accuracy|Verify that the BIOS related suggestions work and are not coincidentally set while troubleshooting.|section='/dev/nvidia0' Input/Output error... suggested fixes}}<br />
This error can occur for several different reasons, and the most common solution given for this error is to check for group/file permissions, which in almost every case is ''not'' the problem. The NVIDIA documentation does not talk in detail on what you should<br />
do to correct this problem but there are a few things that have worked for some people. The problem can be a IRQ conflict with another device or bad routing by either the kernel or your BIOS.<br />
<br />
First thing to try is to remove other video devices such as video capture cards and see if the problem goes away. If there are too many video processors on the same system it can lead into the kernel being unable to start them because of memory allocation problems with the video controller. In particular on systems with low video memory this can occur even if there is only one video processor. In such case you should find out the amount of your system's video memory (e.g. with {{ic|lspci -v}}) and pass allocation parameters to the kernel, e.g. for a 32-bit kernel:<br />
vmalloc=384M<br />
<br />
If running a 64bit kernel, a driver defect can cause the NVIDIA module to fail initializing when IOMMU is on. Turning it off in the BIOS has been confirmed to work for some users. [http://www.nvnews.net/vbulletin/showthread.php?s=68bb2fabadcb53b10b286aa42d13c5bc&t=159335][[User:Clickthem#nvidia module]]<br />
<br />
Another thing to try is to change your BIOS IRQ routing from {{ic|Operating system controlled}} to {{ic|BIOS controlled}} or the other way around. The first one can be passed as a kernel parameter:<br />
PCI=biosirq<br />
<br />
The {{ic|noacpi}} kernel parameter has also been suggested as a solution but since it disables ACPI completely it should be used with caution. Some hardware are easily damaged by overheating.<br />
<br />
{{Note|The kernel parameters can be passed either through the kernel command line or the bootloader configuration file. See your bootloader Wiki page for more information.}}<br />
<br />
=== '/dev/nvidiactl' errors ===<br />
<br />
Trying to start an OpenGL application might result in errors such as:<br />
Error: Could not open /dev/nvidiactl because the permissions are too<br />
restrictive. Please see the {{ic|FREQUENTLY ASKED QUESTIONS}} <br />
section of {{ic|/usr/share/doc/NVIDIA_GLX-1.0/README}} <br />
for steps to correct.<br />
<br />
Solve by adding the appropriate user to the {{ic|video}} group and log in again:<br />
# gpasswd -a username video<br />
<br />
=== 32-bit applications do not start ===<br />
<br />
Under 64-bit systems, installing {{ic|lib32-nvidia-libgl}} that corresponds to the same version installed for the 64-bit driver fixes the problem.<br />
<br />
=== Errors after updating the kernel ===<br />
<br />
If a custom build of NVIDIA's module is used instead of the package from the ''extra'' repository, a recompile is required every time the kernel is updated. Rebooting is generally recommended after updating kernel and graphic drivers.<br />
<br />
=== Crashing in general ===<br />
<br />
* Try disabling {{ic|RenderAccel}} in xorg.conf.<br />
* If Xorg outputs an error about "conflicting memory type" or "failed to allocate primary buffer: out of memory", add {{ic|nopat}} at the end of the {{ic|kernel}} line in {{ic|/boot/grub/menu.lst}}.<br />
* If the NVIDIA compiler complains about different versions of GCC between the current one and the one used for compiling the kernel, add in {{ic|/etc/profile}}:<br />
export IGNORE_CC_MISMATCH=1<br />
* If Xorg is crashing with a "Signal 11" while using nvidia-96xx drivers, try disabling PAT. Pass the argument {{ic|nopat}} to [[kernel parameters]].<br />
More information about troubleshooting the driver can be found in the [https://forums.geforce.com/ NVIDIA forums.]<br />
<br />
=== Bad performance after installing a new driver version ===<br />
<br />
If FPS have dropped in comparison with older drivers, first check if direct rendering is turned on (glxinfo is included in {{Pkg|mesa-demos}}):<br />
$ glxinfo | grep direct<br />
If the command prints:<br />
direct rendering: No<br />
then that could be an indication for the sudden FPS drop.<br />
<br />
A possible solution could be to regress to the previously installed driver version and rebooting afterwards.<br />
<br />
=== CPU spikes with 400 series cards ===<br />
<br />
If you are experiencing intermittent CPU spikes with a 400 series card, it may be caused by PowerMizer constantly changing the GPU's clock frequency. Switching PowerMizer's setting from Adaptive to Performance, add the following to the {{ic|Device}} section of your Xorg configuration:<br />
<br />
Option "RegistryDwords" "PowerMizerEnable=0x1; PerfLevelSrc=0x3322; PowerMizerDefaultAC=0x1"<br />
<br />
=== Laptops: X hangs on login/out, worked around with Ctrl+Alt+Backspace ===<br />
<br />
If, while using the legacy NVIDIA drivers, Xorg hangs on login and logout (particularly with an odd screen split into two black and white/gray pieces), but logging in is still possible via {{ic|Ctrl+Alt+Backspace}} (or whatever the new "kill X" key binding is), try adding this in {{ic|/etc/modprobe.d/modprobe.conf}}:<br />
options nvidia NVreg_Mobile=1<br />
<br />
One user had luck with this instead, but it makes performance drop significantly for others:<br />
options nvidia NVreg_DeviceFileUID=0 NVreg_DeviceFileGID=33 NVreg_DeviceFileMode=0660 NVreg_SoftEDIDs=0 NVreg_Mobile=1<br />
<br />
Note that {{ic|NVreg_Mobile}} needs to be changed according to the laptop:<br />
* 1 for Dell laptops.<br />
* 2 for non-Compal Toshiba laptops.<br />
* 3 for other laptops.<br />
* 4 for Compal Toshiba laptops.<br />
* 5 for Gateway laptops.<br />
<br />
See [ftp://download.nvidia.com/XFree86/Linux-x86/355.11/README/README.txt NVIDIA Driver's README: Appendix K] for more information.<br />
<br />
=== No screens found on a laptop/NVIDIA Optimus ===<br />
<br />
On a laptop, if the NVIDIA driver cannot find any screens, you may have an NVIDIA Optimus setup : an Intel chipset connected to the screen and the video outputs, and a NVIDIA card that does all the hard work and writes to the chipset's video memory.<br />
<br />
Check if {{ic|<nowiki>$ lspci | grep VGA</nowiki>}}<br />
outputs something similar to:<br />
00:02.0 VGA compatible controller: Intel Corporation Core Processor Integrated Graphics Controller (rev 02)<br />
01:00.0 VGA compatible controller: nVidia Corporation Device 0df4 (rev a1)<br />
<br />
NVIDIA drivers now offer Optimus support since 319.12 Beta [[http://www.nvidia.com/object/linux-display-amd64-319.12-driver.html]] with kernels above and including 3.9.<br />
<br />
Another solution is to install the [[Intel]] driver to handle the screens, then if you want 3D software you should run them through [[Bumblebee]] to tell them to use the NVIDIA card.<br />
<br />
==== Possible Workaround ====<br />
<br />
Enter the BIOS and changed the default graphics setting from 'Optimus' to 'Discrete' and the install NVIDIA drivers (295.20-1 at time of writing) recognized the screens.<br />
<br />
Steps:<br />
# Enter BIOS.<br />
# Find Graphics Settings (should be in tab ''Config > Display'').<br />
# Change 'Graphics Device' to 'Discrete Graphics' (Disables Intel integrated graphics).<br />
# Change OS Detection for Nvidia Optimus to "Disabled".<br />
# Save and exit.<br />
<br />
Tested on a Lenovo W520 with a Quadro 1000M and Nvidia Optimus<br />
<br />
=== Screen(s) found, but none have a usable configuration ===<br />
<br />
Sometimes NVIDIA and X have trouble finding the active screen. If your graphics card has multiple outputs try plugging your monitor into the other ones. On a laptop it may be because your graphics card has vga/tv outs. Xorg.0.log will provide more info.<br />
<br />
Another thing to try is adding invalid {{ic|"ConnectedMonitor" Option}} to {{ic|Section "Device"}}<br />
to force Xorg throws error and shows you how correct it.<br />
[ftp://download.nvidia.com/XFree86/Linux-x86/355.11/README/xconfigoptions.html Here]<br />
more about ConnectedMonitor setting.<br />
<br />
After re-run X see Xorg.0.log to get valid CRT-x,DFP-x,TV-x values.<br />
<br />
{{ic|nvidia-xconfig --query-gpu-info}} could be helpful.<br />
<br />
=== Blackscreen at X startup with new driver ===<br />
<br />
If you have installed an update of Nvidia and you screen stay black after launching Xorg. You have to use the {{ic|<nowiki>rcutree.rcu_idle_gp_delay=1</nowiki>}} [[kernel parameter]].<br />
<br />
You can also try to add the {{ic|nvidia}} module directly to your [[mkinitcpio]] config file.<br />
<br />
If the screen still stays black with '''both''' the {{ic|<nowiki>rcutree.rcu_idle_gp_delay=1</nowiki>}} [[kernel parameter]] and the {{ic|nvidia}} module directly in the [[mkinitcpio]] config file, try re-installing {{Pkg|nvidia}} and {{Pkg|nvidia-libgl}} in that order, and finally reload the driver:<br />
<br />
# modprobe nvidia<br />
<br />
=== Backlight is not turning off in some occasions ===<br />
<br />
By default, DPMS should turn off backlight with the timeouts set or by running xset. However, probably due to a bug in the proprietary Nvidia drivers the result is a blank screen with no powersaving whatsoever. To workaround it, until the bug has been fixed you can use the {{ic|vbetool}} as root.<br />
<br />
Install the {{Pkg|vbetool}} package.<br />
<br />
Turn off your screen on demand and then by pressing a random key backlight turns on again:<br />
<br />
vbetool dpms off && read -n1; vbetool dpms on<br />
<br />
Alternatively, xrandr is able to disable and re-enable monitor outputs without requiring root.<br />
<br />
xrandr --output DP-1 --off; read -n1; xrandr --output DP-1 --auto<br />
<br />
=== Blue tint on videos with Flash ===<br />
<br />
A problem with {{Pkg|flashplugin}} versions 11.2.202.228-1 and 11.2.202.233-1 causes it to send the U/V panes in the incorrect order resulting in a blue tint on certain videos. There are a few potential fixes for this bug:<br />
<br />
# Install the latest {{Pkg|libvdpau}}.<br />
# Patch {{ic|vdpau_trace.so}} with [https://bbs.archlinux.org/viewtopic.php?pid=1078368#p1078368 this makepkg].<br />
# Right click on a video, select "Settings..." and uncheck "Enable hardware acceleration". Reload the page for it to take affect. Note that this disables GPU acceleration.<br />
# [[Downgrade]] the {{Pkg|flashplugin}} package to version 11.1.102.63-1 at most.<br />
# Use {{AUR|google-chrome}} with the new Pepper API {{AUR|chromium-pepper-flash}}.<br />
# Try one of the few Flash alternatives.<br />
<br />
The merits of each are discussed in [https://bbs.archlinux.org/viewtopic.php?id=137877 this thread].<br />
<br />
=== Bleeding overlay with Flash ===<br />
<br />
This bug is due to the incorrect colour key being used by the {{Pkg|flashplugin}} version 11.2.202.228-1 and causes the flash content to "leak" into other pages or solid black backgrounds. To avoid this problem simply install the latest {{Pkg|libvdpau}} or export {{ic|1=VDPAU_NVIDIA_NO_OVERLAY=1}} within either your shell profile (E.g. {{ic|~/.bash_profile}} or {{ic|~/.zprofile}}) or {{ic|~/.xinitrc}}<br />
<br />
=== Full system freeze using Flash ===<br />
<br />
If you experience occasional full system freezes (only the mouse is moving) using flashplugin<br />
and get:<br />
<br />
{{hc|/var/log/errors.log|<br />
NVRM: Xid (0000:01:00): 31, Ch 00000007, engmask 00000120, intr 10000000<br />
}}<br />
<br />
A possible workaround is to switch off Hardware Acceleration in Flash, setting<br />
<br />
{{hc|/etc/adobe/mms.cfg|2=<br />
EnableLinuxHWVideoDecode=0<br />
}}<br />
<br />
Or, if you want to keep Hardware acceleration enabled, you may try to::<br />
export VDPAU_NVIDIA_NO_OVERLAY=1<br />
<br />
...before starting the browser.<br />
Note that this may introduce tearing.<br />
<br />
=== Xorg fails to load or Red Screen of Death ===<br />
<br />
If you get a red screen and use GRUB disable the GRUB framebuffer by editing {{ic|/etc/default/grub}} and uncomment GRUB_TERMINAL_OUTPUT. For more information see [[GRUB#Disable_framebuffer|GRUB]].<br />
<br />
=== Black screen on systems with Intel integrated GPU ===<br />
<br />
If you have an Intel CPU with an integrated GPU (e.g. Intel HD 4000) and have installed the {{Pkg|nvidia}} package, you may experience a black screen on boot, when changing virtual terminal, or when exiting an X session. This may be caused by a conflict between the graphics modules. This is solved by blacklisting the Intel GPU modules. Create the file {{ic|/etc/modprobe.d/blacklist.conf}} and prevent the ''i915'' and ''intel_agp'' modules from loading on boot:<br />
<br />
{{hc|/etc/modprobe.d/blacklist.conf|<br />
install i915 /usr/bin/false<br />
install intel_agp /usr/bin/false<br />
}}<br />
<br />
=== Black screen on systems with VIA integrated GPU ===<br />
<br />
As above, blacklisting the ''viafb'' module may resolve conflicts with NVIDIA drivers:<br />
<br />
{{hc|/etc/modprobe.d/blacklist.conf|<br />
install viafb /usr/bin/false<br />
}}<br />
<br />
=== X fails with "no screens found" with Intel iGPU ===<br />
<br />
Like above, if you have an Intel CPU with an integrated GPU and X fails to start with <br />
<br />
[ 76.633] (EE) No devices detected.<br />
[ 76.633] Fatal server error:<br />
[ 76.633] no screens found<br />
<br />
then you need to add your discrete card's BusID to your X configuration. Find it:<br />
<br />
{{hc|<nowiki># lspci | grep VGA</nowiki>|<br />
00:02.0 VGA compatible controller: Intel Corporation Xeon E3-1200 v2/3rd Gen Core processor Graphics Controller (rev 09)<br />
01:00.0 VGA compatible controller: NVIDIA Corporation GK107 [GeForce GTX 650] (rev a1)<br />
}}<br />
<br />
then you fix it by adding it to the card's Device section in your X configuration. In my case:<br />
<br />
{{hc|/etc/X11/xorg.conf.d/10-nvidia.conf|<br />
Section "Device"<br />
Identifier "Device0"<br />
Driver "nvidia"<br />
VendorName "NVIDIA Corporation"<br />
BusID "PCI:1:0:0"<br />
EndSection<br />
}}<br />
<br />
Note how {{ic|01:00.0}} is written as {{ic|1:0:0}}.<br />
<br />
=== Xorg fails during boot, but otherwise starts fine ===<br />
<br />
On very fast booting systems, systemd may attempt to start the display manager before the NVIDIA driver has fully initialized. You will see a message like the following in your logs only when Xorg runs during boot.<br />
{{hc|/var/log/Xorg.0.log|output=<br />
[ 1.807] (EE) NVIDIA(0): Failed to initialize the NVIDIA kernel module. Please see the<br />
[ 1.807] (EE) NVIDIA(0): system's kernel log for additional error messages and<br />
[ 1.808] (EE) NVIDIA(0): consult the NVIDIA README for details.<br />
[ 1.808] (EE) NVIDIA(0): *** Aborting ***<br />
}}<br />
In this case you will need to establish an ordering dependency from the display manager to the DRI device. First create device units for DRI devices by creating a new udev rules file.<br />
{{hc|/etc/udev/rules.d/99-systemd-dri-devices.rules|output=<br />
ACTION=="add", KERNEL=="card*", SUBSYSTEM=="drm", TAG+="systemd"<br />
}}<br />
Then create dependencies from the display manager to the device(s).<br />
{{hc|/etc/systemd/system/display-manager.service.d/10-wait-for-dri-devices.conf|output=<br />
[Unit]<br />
Wants=dev-dri-card0.device<br />
After=dev-dri-card0.device<br />
}}<br />
If you have additional cards needed for the desktop then list them in Wants and After seperated by spaces.<br />
<br />
=== Flash video players crashes ===<br />
<br />
If you are getting frequent crashes of Flash video players, try to switch off Hardware Acceleration:<br />
<br />
{{hc|/etc/adobe/mms.cfg|2=<br />
EnableLinuxHWVideoDecode=0<br />
}}<br />
<br />
(This problem appeared after installing the proprietary nvidia driver, and was fixed by changing this setting.)<br />
<br />
=== Override EDID ===<br />
<br />
If your monitor is providing wrong EDID information, the nvidia-driver will pick a very small solution.<br />
Nvidia's driver options change, this guide refers to nvidia 346.47-11.<br />
<br />
Aside from manually setting modelines in the xorg config, you have to allow non-edid modes and disable edid in the device section:<br />
<br />
{{hc|/etc/X11/xorg.conf.d/10-monitor.conf|2=<br />
Section "Monitor"<br />
Identifier "Monitor0"<br />
VendorName "Unknown"<br />
ModelName "Unknown"<br />
HorizSync 30-94<br />
VertRefresh 56-76<br />
DisplaySize 518.4 324.0<br />
Option "DPMS"<br />
# 1920x1200 59.95 Hz (CVT 2.30MA-R) hsync: 74.04 kHz; pclk: 154.00 MHz<br />
Modeline "1920x1200R" 154.00 1920 1968 2000 2080 1200 1203 1209 1235 +hsync -vsync<br />
EndSection<br />
<br />
Section "Device"<br />
Identifier "Device0"<br />
Driver "nvidia"<br />
VendorName "NVIDIA Corporation"<br />
Option "UseEdidFreqs" "FALSE"<br />
Option "UseEDID" "FALSE"<br />
Option "ModeValidation" "AllowNonEdidModes"<br />
EndSection<br />
<br />
Section "Screen"<br />
Identifier "Screen0"<br />
Device "Device0"<br />
Monitor "Monitor0"<br />
DefaultDepth 24<br />
SubSection "Display"<br />
Depth 24<br />
Modes "1920x1200R"<br />
EndSubSection<br />
EndSection<br />
}}<br />
<br />
=== Fix rendering lag (firefox, gedit, vim, tmux …) ===<br />
nvidia-settings -a InitialPixmapPlacement=0<br />
<br />
https://bugzilla.gnome.org/show_bug.cgi?id=728464<br />
<br />
=== Screen Tearing with Multiple Monitor Orientations ===<br />
<br />
When running multiple monitors in different orientations (through [[Xrandr]] settings) such as portrait and landscape simultaneously, you may notice screen tearing in one of the orientations/monitors. Unfortunately, this issue is fixed by setting all monitors to the same orientation via [[Xrandr]] settings<br />
<br />
== See also ==<br />
<br />
* [https://forums.geforce.com/ NVIDIA User forums]<br />
* [ftp://download.nvidia.com/XFree86/Linux-x86/355.11/README/README.txt Official README for NVIDIA drivers, all on one text page. Most Recent Driver Version as of September 7, 2015: 355.11.]<br />
* [ftp://download.nvidia.com/XFree86/Linux-x86/355.11/README/xconfigoptions.html README Appendix B. X Config Options, 355.11 (direct link)]</div>Beta990https://wiki.archlinux.org/index.php?title=NVIDIA&diff=411157NVIDIA2015-12-07T09:53:32Z<p>Beta990: /* Installing */ Moved VA-API/VDPAU to the install section</p>
<hr />
<div>[[Category:Graphics]]<br />
[[Category:X server]]<br />
[[cs:NVIDIA]]<br />
[[de:Nvidia]]<br />
[[es:NVIDIA]]<br />
[[fa:اِنویدیا]]<br />
[[fr:Nvidia]]<br />
[[it:NVIDIA]]<br />
[[ja:NVIDIA]]<br />
[[nl:NVIDIA]]<br />
[[ru:NVIDIA]]<br />
[[tr:Nvidia]]<br />
[[zh-CN:NVIDIA]]<br />
{{Related articles start}}<br />
{{Related|Nouveau}}<br />
{{Related|Bumblebee}}<br />
{{Related|NVIDIA Optimus}}<br />
{{Related|Xorg}}<br />
{{Related articles end}}<br />
<br />
This article covers installing and configuring [http://www.nvidia.com NVIDIA]'s ''proprietary'' graphic card driver. For information about the open-source drivers, see [[Nouveau]]. If you have a laptop with hybrid Intel/NVIDIA graphics, see [[NVIDIA Optimus]] instead.<br />
<br />
== Installing ==<br />
<br />
{{Warning|Avoid installing the NVIDIA driver through the package provided from the NVIDIA website. Installation through [[pacman]] allows upgrading the driver together with the rest of the system.}}<br />
<br />
These instructions are for those using the stock {{Pkg|linux}} or {{Pkg|linux-lts}} packages. For custom kernel setup, skip to the [[#Alternate install: custom kernel|next]] subsection.<br />
<br />
1. If you do not know what graphics card you have, find out by issuing:<br />
:{{bc|<nowiki>$ lspci -k | grep -A 2 -E "(VGA|3D)"</nowiki>}}<br />
<br />
2. Determine the necessary driver version for your card by:<br />
:* finding the code name (e.g. NV50, NVC0, etc.) on [http://nouveau.freedesktop.org/wiki/CodeNames nouveau wiki's code names page]<br />
:* looking up the name in NVIDIA's [http://www.nvidia.com/object/IO_32667.html legacy card list]: if your card is not there you can use the latest driver<br />
:* visiting NVIDIA's [http://www.nvidia.com/Download/index.aspx driver download site]<br />
<br />
3. Install the appropriate driver for your card:<br />
:* For GeForce 400 series cards and newer [NVCx and newer], [[install]] the {{Pkg|nvidia}} or {{Pkg|nvidia-lts}} package along with {{Pkg|nvidia-libgl}}.<br />
:* For GeForce 8000/9000 and 100-300 series cards [NV5x, NV8x, NV9x and NVAx] from around 2006-2010, [[install]] the {{Pkg|nvidia-340xx}} or {{Pkg|nvidia-340xx-lts}} package along with {{Pkg|nvidia-340xx-libgl}}.<br />
:* For GeForce 6000/7000 series cards [NV4x and NV6x] from around 2004-2006, [[install]] the {{Pkg|nvidia-304xx}} or {{Pkg|nvidia-304xx-lts}} package along with {{Pkg|nvidia-304xx-libgl}}.<br />
<br />
:* For even older cards, have a look at [[#Unsupported drivers]].<br />
:* For the very latest GPU models, it may be required to [[install]] the {{AUR|nvidia-beta}} package, since the stable drivers may not support the newly introduced features.<br />
<br />
4. If you are on 64-bit and also need 32-bit OpenGL support, you must also install the equivalent ''lib32'' package from the [[multilib]] repository (e.g. {{Pkg|lib32-nvidia-libgl}}, {{Pkg|lib32-nvidia-340xx-libgl}} or {{Pkg|lib32-nvidia-304xx-libgl}}).<br />
<br />
5. Reboot. The {{Pkg|nvidia}} package contains a file which blacklists the ''nouveau'' module, so rebooting is necessary.<br />
<br />
Once the driver has been installed, continue to [[#Configuring]].<br />
<br />
=== Pure Video HD (VDPAU/VAAPI) ===<br />
<br />
At least a video card with second generation PureVideo HD[http://en.wikipedia.org/wiki/Nvidia_PureVideo#Table_of_PureVideo_.28HD.29_GPUs] is required to use [[VDPAU]] and [[VA-API]].<br />
<br />
=== Unsupported drivers ===<br />
<br />
If you have a GeForce 5 FX series card or older, Nvidia no longer supports drivers for your card. This means that these drivers [http://nvidia.custhelp.com/app/answers/detail/a_id/3142/ do not support the current Xorg version]. It thus might be easier if you use the [[nouveau]] driver, which supports the old cards with the current Xorg.<br />
<br />
However, Nvidia's legacy drivers are still available and might provide better 3D performance/stability if you are willing to downgrade Xorg:<br />
<br />
* For GeForce 5 FX series cards [NV30-NV36], install the {{AUR|nvidia-173xx-dkms}} package. Last supported Xorg version is 1.15.<br />
* For GeForce 2/3/4 MX/Ti series cards [NV11, NV17-NV28], install the {{AUR|nvidia-96xx-dkms}} package. Last supported Xorg version is 1.12.<br />
<br />
{{Tip|The legacy nvidia-96xx-dkms and nvidia-173xx-dkms drivers can also be installed from the unofficial [http://pkgbuild.com/~bgyorgy/city.html <nowiki>[city] repository</nowiki>]. (It is strongly advised that you do not skip any dependencies restriction when installing from here)}}<br />
<br />
=== Alternate install: custom kernel ===<br />
<br />
First of all, it is good to know how the ABS works by reading some of the other articles about it:<br />
<br />
* Main article for [[ABS]]<br />
* Article on [[makepkg]]<br />
* Article on [[Creating packages]]<br />
<br />
The following is a short tutorial for making a custom NVIDIA driver package using [[ABS]]:<br />
<br />
[[Install]] the {{Pkg|abs}} package and generate the tree with:<br />
# abs<br />
As a standard user, make a temporary directory for creating the new package:<br />
$ mkdir -p ~/abs<br />
Make a copy of the {{ic|nvidia}} package directory:<br />
$ cp -r /var/abs/extra/nvidia/ ~/abs/<br />
Go into the temporary {{ic|nvidia}} build directory:<br />
$ cd ~/abs/nvidia<br />
It is required to edit the files {{ic|nvidia.install}} and {{ic|PKGBUILD}} so that they contain the right kernel version variables.<br />
<br />
While running the custom kernel, get the appropriate kernel and local version names:<br />
$ uname -r<br />
# In nvidia.install, replace the {{ic|EXTRAMODULES<nowiki>=</nowiki>'extramodules-3.4-ARCH'}} variable with the custom kernel version, such as {{ic|EXTRAMODULES<nowiki>=</nowiki>'extramodules-3.4.4'}} or {{ic|EXTRAMODULES<nowiki>=</nowiki>'extramodules-3.4.4-custom'}} depending on what the kernel's version is and the local version's text/numbers. Do this for all instances of the version number within this file.<br />
# In PKGBUILD, change the {{ic|_extramodules<nowiki>=</nowiki>extramodules-3.4-ARCH}} variable to match the appropriate version, as above.<br />
# If there are multiple kernels installed in parallel (such as a custom kernel alongside the default -ARCH kernel), change the {{ic|pkgname<nowiki>=</nowiki>nvidia}} variable in the PKGBUILD to a unique identifier, such as nvidia-344 or nvidia-custom. This will allow both kernels to use the nvidia module, since the custom nvidia module has a different package name and will not overwrite the original. You will also need to comment the line in {{ic|package()}} that blacklists the nouveau module in {{ic|/usr/lib/modprobe.d/nvidia.conf}} (no need to do it again).<br />
<br />
Then do:<br />
$ makepkg -ci<br />
The {{ic|-c}} operand tells makepkg to clean left over files after building the package, whereas {{ic|-i}} specifies that makepkg should automatically run pacman to install the resulting package.<br />
<br />
==== Automatic re-compilation of the NVIDIA module with kernel update ====<br />
<br />
This is possible with the {{AUR|nvidia-hook}} package. You will need to install the module sources: {{Pkg|nvidia-dkms}}. In ''nvidia-hook'', the 'automatic re-compilation' functionality is done by a {{ic|nvidia}} hook on [[mkinitcpio]] after forcing to update the {{Pkg|linux-headers}} package. You will need to add {{ic|nvidia}} to the HOOKS array in {{ic|/etc/mkinitcpio.conf}}.<br />
<br />
The hook will call the ''dkms'' command to update the NVIDIA module for the version of your new kernel.<br />
<br />
{{Note|<br />
* If you are using this functionality it is '''important''' to look at the installation process of the {{Pkg|linux}} (or any other kernel) package. nvidia hook will tell you if anything goes wrong.<br />
* If you would like to do this manually please see [[Dynamic Kernel Module Support#Usage]].<br />
}}<br />
<br />
== Configuring ==<br />
<br />
It is possible that after installing the driver it may not be needed to create an Xorg server configuration file. You can run [[Xorg#Running|a test]] to see if the Xorg server will function correctly without a configuration file. However, it may be required to create a configuration file (prefer {{ic|/etc/X11/xorg.conf.d/20-nvidia.conf}} over {{ic|/etc/X11/xorg.conf}}) in order to adjust various settings. This configuration can be generated by the NVIDIA Xorg configuration tool, or it can be created manually. If created manually, it can be a minimal configuration (in the sense that it will only pass the basic options to the [[Xorg]] server), or it can include a number of settings that can bypass Xorg's auto-discovered or pre-configured options.<br />
{{Note|Since 1.8.x Xorg uses separate configuration files in {{ic|/etc/X11/xorg.conf.d/}} - check out [[#Advanced: 20-nvidia.conf|advanced configuration]] section.}}<br />
<br />
=== Minimal configuration ===<br />
<br />
A basic configuration block in {{ic|20-nvidia.conf}} (or deprecated in {{ic|xorg.conf}}) would look like this:<br />
<br />
{{hc|/etc/X11/xorg.conf.d/20-nvidia.conf|<br />
Section "Device"<br />
Identifier "Nvidia Card"<br />
Driver "nvidia"<br />
VendorName "NVIDIA Corporation"<br />
Option "NoLogo" "true"<br />
#Option "UseEDID" "false"<br />
#Option "ConnectedMonitor" "DFP"<br />
# ...<br />
EndSection<br />
}}<br />
<br />
{{Tip|If upgrading from nouveau make sure to remove "{{ic|nouveau}}" from {{ic|/etc/mkinitcpio.conf}}. See [[#Switching between NVIDIA and nouveau drivers|Switching between NVIDIA and nouveau drivers]], if switching between the open and proprietary drivers often.}}<br />
<br />
=== Automatic configuration ===<br />
<br />
The NVIDIA package includes an automatic configuration tool to create an Xorg server configuration file ({{ic|xorg.conf}}) and can be run by:<br />
# nvidia-xconfig<br />
<br />
This command will auto-detect and create (or edit, if already present) the {{ic|/etc/X11/xorg.conf}} configuration according to present hardware.<br />
<br />
If there are instances of DRI, ensure they are commented out:<br />
# Load "dri"<br />
Double check your {{ic|/etc/X11/xorg.conf}} to make sure your default depth, horizontal sync, vertical refresh, and resolutions are acceptable.<br />
<br />
{{Warning|That may still not work properly with Xorg-server 1.8 }}<br />
<br />
=== Multiple monitors ===<br />
<br />
:''See [[Multihead]] for more general information''<br />
<br />
==== Using NVIDIA Settings ====<br />
<br />
You can use the {{ic|nvidia-settings}} tool provided by {{Pkg|nvidia-utils}} to configure your multi-monitor setup. With this method, you will use the proprietary software NVIDIA provides with their drivers. Simply run {{ic|nvidia-settings}} as root, then configure as you wish, and then save the configuration to {{ic|/etc/X11/xorg.conf.d/10-monitor.conf}}.<br />
<br />
==== ConnectedMonitor ====<br />
<br />
If the driver doesn't properly detect a second monitor, you can force it to do so with ConnectedMonitor. <br />
<br />
{{hc|/etc/X11/xorg.conf|<br />
<br />
Section "Monitor"<br />
Identifier "Monitor1"<br />
VendorName "Panasonic"<br />
ModelName "Panasonic MICRON 2100Ex"<br />
HorizSync 30.0 - 121.0 # this monitor has incorrect EDID, hence Option "UseEDIDFreqs" "false"<br />
VertRefresh 50.0 - 160.0<br />
Option "DPMS"<br />
EndSection<br />
<br />
Section "Monitor"<br />
Identifier "Monitor2"<br />
VendorName "Gateway"<br />
ModelName "GatewayVX1120"<br />
HorizSync 30.0 - 121.0<br />
VertRefresh 50.0 - 160.0<br />
Option "DPMS"<br />
EndSection<br />
<br />
Section "Device"<br />
Identifier "Device1"<br />
Driver "nvidia"<br />
Option "NoLogo"<br />
Option "UseEDIDFreqs" "false"<br />
Option "ConnectedMonitor" "CRT,CRT"<br />
VendorName "NVIDIA Corporation"<br />
BoardName "GeForce 6200 LE"<br />
BusID "PCI:3:0:0"<br />
Screen 0<br />
EndSection<br />
<br />
Section "Device"<br />
Identifier "Device2"<br />
Driver "nvidia"<br />
Option "NoLogo"<br />
Option "UseEDIDFreqs" "false"<br />
Option "ConnectedMonitor" "CRT,CRT"<br />
VendorName "NVIDIA Corporation"<br />
BoardName "GeForce 6200 LE"<br />
BusID "PCI:3:0:0"<br />
Screen 1<br />
EndSection<br />
<br />
}}<br />
<br />
The duplicated device with {{ic|Screen}} is how you get X to use two monitors on one card without {{ic|TwinView}}. Note that {{ic|nvidia-settings}} will strip out any {{ic|ConnectedMonitor}} options you have added.<br />
<br />
==== TwinView ====<br />
<br />
You want only one big screen instead of two. Set the {{ic|TwinView}} argument to {{ic|1}}. This option should be used if you desire compositing. TwinView only works on a per card basis, when all participating monitors are connected to the same card.<br />
Option "TwinView" "1"<br />
<br />
Example configuration:<br />
{{hc|/etc/X11/xorg.conf.d/10-monitor.conf|<br />
Section "ServerLayout"<br />
Identifier "TwinLayout"<br />
Screen 0 "metaScreen" 0 0<br />
EndSection<br />
<br />
Section "Monitor"<br />
Identifier "Monitor0"<br />
Option "Enable" "true"<br />
EndSection<br />
<br />
Section "Monitor"<br />
Identifier "Monitor1"<br />
Option "Enable" "true"<br />
EndSection<br />
<br />
Section "Device"<br />
Identifier "Card0"<br />
Driver "nvidia"<br />
VendorName "NVIDIA Corporation"<br />
<br />
#refer to the link below for more information on each of the following options.<br />
Option "HorizSync" "DFP-0: 28-33; DFP-1 28-33"<br />
Option "VertRefresh" "DFP-0: 43-73; DFP-1 43-73"<br />
Option "MetaModes" "1920x1080, 1920x1080"<br />
Option "ConnectedMonitor" "DFP-0, DFP-1"<br />
Option "MetaModeOrientation" "DFP-1 LeftOf DFP-0"<br />
EndSection<br />
<br />
Section "Screen"<br />
Identifier "metaScreen"<br />
Device "Card0"<br />
Monitor "Monitor0"<br />
DefaultDepth 24<br />
Option "TwinView" "True"<br />
SubSection "Display"<br />
Modes "1920x1080"<br />
EndSubSection<br />
EndSection<br />
}}<br />
<br />
[ftp://download.nvidia.com/XFree86/Linux-x86/355.11/README/configtwinview.html Device option information].<br />
<br />
If you have multiple cards that are SLI capable, it is possible to run more than one monitor attached to separate cards (for example: two cards in SLI with one monitor attached to each). The "MetaModes" option in conjunction with SLI Mosaic mode enables this. Below is a configuration which works for the aforementioned example and runs [[GNOME]] flawlessly.<br />
{{hc|/etc/X11/xorg.conf.d/10-monitor.conf|<br />
Section "Device"<br />
Identifier "Card A"<br />
Driver "nvidia"<br />
BusID "PCI:1:00:0"<br />
EndSection<br />
<br />
Section "Device"<br />
Identifier "Card B"<br />
Driver "nvidia"<br />
BusID "PCI:2:00:0"<br />
EndSection<br />
<br />
Section "Monitor"<br />
Identifier "Right Monitor"<br />
EndSection<br />
<br />
Section "Monitor"<br />
Identifier "Left Monitor"<br />
EndSection<br />
<br />
Section "Screen"<br />
Identifier "Right Screen"<br />
Device "Card A"<br />
Monitor "Right Monitor"<br />
DefaultDepth 24<br />
Option "SLI" "Mosaic"<br />
Option "Stereo" "0"<br />
Option "BaseMosaic" "True"<br />
Option "MetaModes" "GPU-0.DFP-0: 1920x1200+4480+0, GPU-1.DFP-0:1920x1200+0+0"<br />
SubSection "Display"<br />
Depth 24<br />
EndSubSection<br />
EndSection<br />
<br />
Section "Screen"<br />
Identifier "Left Screen"<br />
Device "Card B"<br />
Monitor "Left Monitor"<br />
DefaultDepth 24<br />
Option "SLI" "Mosaic"<br />
Option "Stereo" "0"<br />
Option "BaseMosaic" "True"<br />
Option "MetaModes" "GPU-0.DFP-0: 1920x1200+4480+0, GPU-1.DFP-0:1920x1200+0+0"<br />
SubSection "Display"<br />
Depth 24<br />
EndSubSection<br />
EndSection<br />
<br />
Section "ServerLayout"<br />
Identifier "Default"<br />
Screen 0 "Right Screen" 0 0<br />
Option "Xinerama" "0"<br />
EndSection}}<br />
<br />
===== Manual CLI configuration with xrandr =====<br />
{{Accuracy|Do these commands set up the monitors in ''TwinView'' mode?}}<br />
<br />
If the latest solutions do not work for you, you can use your window manager's ''autostart'' implementation with {{Pkg|xorg-xrandr}}.<br />
<br />
Some {{ic|xrandr}} examples could be:<br />
<br />
xrandr --output DVI-I-0 --auto --primary --left-of DVI-I-1<br />
<br />
or:<br />
<br />
xrandr --output DVI-I-1 --pos 1440x0 --mode 1440x900 --rate 75.0<br />
<br />
When:<br />
<br />
* {{ic|--output}} is used to indicate the "monitor" to which the options are set.<br />
* {{ic|DVI-I-1}} is the name of the second monitor.<br />
* {{ic|--pos}} is the position of the second monitor relative to the first.<br />
* {{ic|--mode}} is the resolution of the second monitor.<br />
* {{ic|--rate}} is the refresh rate (in Hz).<br />
<br />
==== Mosaic mode ====<br />
<br />
Mosaic mode is the only way to use more than 2 monitors across multiple graphics cards with compositing. Your window manager may or may not recognize the distinction between each monitor.<br />
<br />
===== Base Mosaic =====<br />
<br />
Base Mosaic mode works on any set of Geforce 8000 series or higher GPUs. It cannot be enabled from within the nvidia-setting GUI. You must either use the {{ic|nvidia-xconfig}} command line program or edit {{ic|xorg.conf}} by hand. Metamodes must be specified. The following is an example for four DFPs in a 2x2 configuration, each running at 1920x1024, with two DFPs connected to two cards:<br />
$ nvidia-xconfig --base-mosaic --metamodes="GPU-0.DFP-0: 1920x1024+0+0, GPU-0.DFP-1: 1920x1024+1920+0, GPU-1.DFP-0: 1920x1024+0+1024, GPU-1.DFP-1: 1920x1024+1920+1024"<br />
<br />
{{Note|While the documentation lists a 2x2 configuration of monitors, Nvidia has reduced that ability to just 3 monitors in Base Mosaic mode as of driver version 304. More monitors are available with a Quadro card, but with standard consumer cards, it is limited to three. The explanation given for this reduction is "Feature parity with the Windows driver". As of September 2014, Windows has no restriction on the number of monitors, even on the same driver version. This is not a bug, this is entirely by design.}}<br />
<br />
===== SLI Mosaic =====<br />
<br />
If you have an SLI configuration and each GPU is a Quadro FX 5800, Quadro Fermi or newer then you can use SLI Mosaic mode. It can be enabled from within the nvidia-settings GUI or from the command line with:<br />
$ nvidia-xconfig --sli=Mosaic --metamodes="GPU-0.DFP-0: 1920x1024+0+0, GPU-0.DFP-1: 1920x1024+1920+0, GPU-1.DFP-0: 1920x1024+0+1024, GPU-1.DFP-1: 1920x1024+1920+1024"<br />
<br />
=== Driver Persistence ===<br />
<br />
Since version 319, Nvidia has changed the way driver persistence works, it now has a daemon that is to be run at boot. See the [http://docs.nvidia.com/deploy/driver-persistence/index.html Driver Persistence] section of the Nvidia documentation for more details.<br />
<br />
To start the persistence daemon at boot, [[enable]] the {{ic|nvidia-persistenced.service}}. For manual usage see the [http://docs.nvidia.com/deploy/driver-persistence/index.html#usage upstream documentation].<br />
<br />
== Tweaking ==<br />
<br />
=== GUI: nvidia-settings ===<br />
<br />
The NVIDIA package includes the {{ic|nvidia-settings}} program that allows adjustment of several additional settings.<br />
<br />
For the settings to be loaded on login, run this command from the terminal:<br />
$ nvidia-settings --load-config-only<br />
<br />
The desktop environment's auto-startup method 'may' not work for loading nvidia-settings properly (KDE). To be sure that settings are really loaded put the command in ~/.xinitrc file (create if not present).<br />
<br />
{{Tip|On rare occasions the {{ic|~/.nvidia-settings-rc}} may become corrupt. If this happens, the Xorg server may crash and the file will have to be deleted to fix the problem.}}<br />
<br />
=== Advanced: 20-nvidia.conf ===<br />
<br />
Edit {{ic|/etc/X11/xorg.conf.d/20-nvidia.conf}}, and add the option to the correct section. The Xorg server will need to be restarted before any changes are applied.<br />
<br />
See [ftp://download.nvidia.com/XFree86/Linux-x86/355.11/README/README.txt NVIDIA Accelerated Linux Graphics Driver README and Installation Guide] for additional details and options.<br />
<br />
==== Disabling the logo on startup ====<br />
<br />
Add the {{ic|"NoLogo"}} option under section {{ic|Device}}:<br />
Option "NoLogo" "1"<br />
<br />
==== Overriding monitor detection ====<br />
<br />
The {{ic|"ConnectedMonitor"}} option under section {{ic|Device}} allows to override monitor detection when X server starts, which may save a significant amount of time at start up. The available options are: {{ic|"CRT"}} for analog connections, {{ic|"DFP"}} for digital monitors and {{ic|"TV"}} for televisions.<br />
<br />
The following statement forces the NVIDIA driver to bypass startup checks and recognize the monitor as DFP:<br />
Option "ConnectedMonitor" "DFP"<br />
{{Note| Use "CRT" for all analog 15 pin VGA connections, even if the display is a flat panel. "DFP" is intended for DVI, HDMI, or DisplayPort digital connections only.}}<br />
<br />
==== Enabling brightness control ====<br />
<br />
Add under section {{ic|Device}}:<br />
Option "RegistryDwords" "EnableBrightnessControl=1"<br />
<br />
If brightness control still does not work with this option, try installing {{AUR|nvidia-bl}} or {{AUR|nvidiabl}}.<br />
<br />
==== Enabling SLI ====<br />
<br />
{{Warning|As of May 7, 2011, you may experience sluggish video performance in GNOME 3 after enabling SLI.}}<br />
<br />
Taken from the NVIDIA driver's [ftp://download.nvidia.com/XFree86/Linux-x86/355.11/README/xconfigoptions.html README] Appendix B: ''This option controls the configuration of SLI rendering in supported configurations.'' A "supported configuration" is a computer equipped with an SLI-Certified Motherboard and 2 or 3 SLI-Certified GeForce GPUs. See NVIDIA's [http://www.slizone.com/page/home.html SLI Zone] for more information.<br />
<br />
Find the first GPU's PCI Bus ID using {{ic|lspci}}:<br />
{{hc|<nowiki>$ lspci | grep VGA</nowiki>|<br />
03:00.0 VGA compatible controller: nVidia Corporation G92 [GeForce 8800 GTS 512] (rev a2)<br />
05:00.0 VGA compatible controller: nVidia Corporation G92 [GeForce 8800 GTS 512] (rev a2)<br />
}}<br />
<br />
Add the BusID (3 in the previous example) under section {{ic|Device}}:<br />
BusID "PCI:3:0:0"<br />
<br />
{{Note|The format is important. The BusID value must be specified as {{ic|"PCI:<BusID>:0:0"}}}}<br />
<br />
Add the desired SLI rendering mode value under section {{ic|Screen}}:<br />
Option "SLI" "AA"<br />
<br />
The following table presents the available rendering modes.<br />
<br />
{| class="wikitable"<br />
! Value !! Behavior<br />
|-<br />
| 0, no, off, false, Single || Use only a single GPU when rendering.<br />
|-<br />
| 1, yes, on, true, Auto || Enable SLI and allow the driver to automatically select the appropriate rendering mode.<br />
|-<br />
| AFR || Enable SLI and use the alternate frame rendering mode.<br />
|-<br />
| SFR || Enable SLI and use the split frame rendering mode.<br />
|-<br />
| AA || Enable SLI and use SLI antialiasing. Use this in conjunction with full scene antialiasing to improve visual quality.<br />
|}<br />
<br />
Alternatively, you can use the {{ic|nvidia-xconfig}} utility to insert these changes into {{ic|xorg.conf}} with a single command:<br />
# nvidia-xconfig --busid=PCI:3:0:0 --sli=AA<br />
<br />
To verify that SLI mode is enabled from a shell:<br />
{{hc|<nowiki>$ nvidia-settings -q all | grep SLIMode</nowiki>|<br />
Attribute 'SLIMode' (arch:0.0): AA <br />
'SLIMode' is a string attribute.<br />
'SLIMode' is a read-only attribute.<br />
'SLIMode' can use the following target types: X Screen.<br />
}}<br />
<br />
{{Warning| After enabling SLI, your system may become frozen/non-responsive upon starting xorg. It is advisable that you disable your display manager before restarting.}}<br />
<br />
==== Enabling overclocking ====<br />
<br />
{{Warning|Please note that overclocking may damage hardware and that no responsibility may be placed on the authors of this page due to any damage to any information technology equipment from operating products out of specifications set by the manufacturer.}}<br />
<br />
Overclocking is controlled via ''Coolbits'' option in the {{ic|Device}} section, which enables various unsupported features:<br />
Option "Coolbits" "''value''"<br />
<br />
{{Tip|The ''Coolbits'' option can be easily controlled with the ''nvidia-xconfig'', which manipulates the Xorg configuration files: {{bc|1=# nvidia-xconfig --cool-bits=''value''}}}}<br />
<br />
The ''Coolbits'' value is the sum of its component bits in the binary numeral system. The component bits are:<br />
<br />
* {{ic|1}} (bit 0) - Enables overclocking of older (pre-Fermi) cores on the ''Clock Frequencies'' page in ''nvidia-settings''.<br />
* {{ic|2}} (bit 1) - When this bit is set, the driver will "attempt to initialize SLI when using GPUs with different amounts of video memory".<br />
* {{ic|4}} (bit 2) - Enables manual configuration of GPU fan speed on the ''Thermal Monitor'' page in ''nvidia-settings''.<br />
* {{ic|8}} (bit 3) - Enables overclocking on the ''PowerMizer'' page in ''nvidia-settings''. Available since version 337.12 for the Fermi architecture and newer.[http://www.phoronix.com/scan.php?px=MTY1OTM&page=news_item]<br />
* {{ic|16}} (bit 4) - Enables overvoltage using ''nvidia-settings'' CLI options. Available since version 346.16 for the Fermi architecture and newer.[http://www.phoronix.com/scan.php?page=news_item&px=MTg0MDI]<br />
<br />
To enable multiple features, add the ''Coolbits'' values together. For example, to enable overclocking and overvoltage of Fermi cores, set {{ic|Option "Coolbits" "24"}}.<br />
<br />
The documentation of ''Coolbits'' can be found in {{ic|/usr/share/doc/nvidia/html/xconfigoptions.html}}. Driver version 346.16 documentation on ''Coolbits'' can be found online [ftp://download.nvidia.com/XFree86/Linux-x86/355.11/README/xconfigoptions.html here].<br />
<br />
{{Note|An alternative is to edit and reflash the GPU BIOS either under DOS (preferred), or within a Win32 environment by way of [http://www.mvktech.net/component/option,com_remository/Itemid,26/func,select/id,127/orderby,2/page,1/ nvflash]{{Dead link|2013|05|25}} and [http://www.mvktech.net/component/option,com_remository/Itemid,26/func,select/id,135/orderby,2/page,1/ NiBiTor 6.0]{{Dead link|2013|05|25}}. The advantage of BIOS flashing is that not only can voltage limits be raised, but stability is generally improved over software overclocking methods such as Coolbits. [http://ivanvojtko.blogspot.sk/2014/03/how-to-overclock-geforce-460gtx-fermi.html Fermi BIOS modification tutorial]}}<br />
<br />
===== Setting static 2D/3D clocks =====<br />
<br />
Set the following string in the {{ic|Device}} section to enable PowerMizer at its maximum performance level (VSync won't work without this line):<br />
Option "RegistryDwords" "PerfLevelSrc=0x2222"<br />
<br />
== Tips and tricks ==<br />
<br />
=== Fixing terminal resolution ===<br />
Transitioning from nouveau may cause your startup terminal to display at a lower resolution. For GRUB, see [[GRUB/Tips and tricks#Setting the framebuffer resolution]] for details.<br />
<br />
=== Enabling Pure Video HD (VDPAU/VAAPI) ===<br />
<br />
{{Merge|VDPAU|Keep here only the specifics and merge the general information into the main article.}}<br />
<br />
'''Hardware Required:''' <br />
<br />
At least a video card with second generation PureVideo HD [http://en.wikipedia.org/wiki/Nvidia_PureVideo#Table_of_PureVideo_.28HD.29_GPUs].<br />
<br />
'''Software Required:'''<br />
<br />
Nvidia video cards with the proprietary driver installed will provide video decoding capabilities with the VDPAU interface at different levels according to PureVideo generation.<br />
<br />
You can also add support for the VA-API interface with {{Pkg|libva-vdpau-driver}}.<br />
<br />
Check VA-API support with:<br />
$ vainfo<br />
<br />
To take full advantage of the hardware decoding capability of your video card you will need a media player that supports VDPAU or VA-API.<br />
<br />
To enable hardware acceleration in [[MPlayer]] edit {{ic|~/.mplayer/config}}<br />
<br />
vo=vdpau<br />
vc=ffmpeg12vdpau,ffwmv3vdpau,ffvc1vdpau,ffh264vdpau,ffodivxvdpau,<br />
<br />
{{Warning|The {{ic|ffodivxvdpau}} codec is only supported by the most recent series of NVIDIA hardware. Consider omitting it based on your specific hardware.}}<br />
<br />
To enable hardware acceleration in [[VLC]] go:<br />
<br />
{{ic|Tools > Preferences > Input & Codecs}}, then select {{ic|VDPAU}} as {{ic|'''Hardware-accelerated decoding'''}}<br />
<br />
To enable hardware acceleration in '''smplayer''' go:<br />
<br />
{{ic|Options > Preferences > General > Video Tab}}, then select {{ic|vdpau}} as {{ic|'''output driver'''}}<br />
<br />
To enable hardware acceleration in '''gnome-mplayer''' go:<br />
<br />
{{ic|Edit > Preference}}, then set {{ic|'''video output'''}} to {{ic|vdpau}}<br />
<br />
'''Playing HD movies on cards with low memory:'''<br />
<br />
If your graphic card does not have a lot of memory (>512MB?), you can experience glitches when watching 1080p or even 720p movies.<br />
To avoid that start simple window manager like TWM or MWM.<br />
<br />
Additionally increasing the MPlayer's cache size in {{ic|~/.mplayer/config}} can help, when your hard drive is spinning down when watching HD movies.<br />
<br />
=== Avoid screen tearing in KDE (KWin) ===<br />
<br />
{{hc|/etc/profile.d/kwin.sh|<nowiki><br />
export __GL_YIELD="USLEEP"<br />
</nowiki>}}<br />
<br />
Also if the above doesn't help, then try this:<br />
{{hc|/etc/profile.d/kwin.sh|<nowiki><br />
export KWIN_TRIPLE_BUFFER=1<br />
</nowiki>}}<br />
<br />
Do not have both of the above enabled at the same time.<br />
Also if you enable triple buffering make sure to enable TripleBuffering for the driver itself.<br />
Source: https://bugs.kde.org/show_bug.cgi?id=322060<br />
<br />
=== Hardware accelerated video decoding with XvMC ===<br />
<br />
Accelerated decoding of MPEG-1 and MPEG-2 videos via [[XvMC]] are supported on GeForce4, GeForce 5 FX, GeForce 6 and GeForce 7 series cards. To use it, create a new file {{ic|/etc/X11/XvMCConfig}} with the following content:<br />
libXvMCNVIDIA_dynamic.so.1<br />
<br />
See how to configure [[XvMC#Supported software|supported software]].<br />
<br />
=== Using TV-out ===<br />
<br />
A good article on the subject can be found [http://en.wikibooks.org/wiki/NVidia/TV-OUT here].<br />
<br />
=== X with a TV (DFP) as the only display ===<br />
<br />
The X server falls back to CRT-0 if no monitor is automatically detected. This can be a problem when using a DVI connected TV as the main display, and X is started while the TV is turned off or otherwise disconnected.<br />
<br />
To force NVIDIA to use DFP, store a copy of the EDID somewhere in the filesystem so that X can parse the file instead of reading EDID from the TV/DFP.<br />
<br />
To acquire the EDID, start nvidia-settings. It will show some information in tree format, ignore the rest of the settings for now and select the GPU (the corresponding entry should be titled "GPU-0" or similar), click the {{ic|DFP}} section (again, {{ic|DFP-0}} or similar), click on the {{ic|Acquire Edid}} Button and store it somewhere, for example, {{ic|/etc/X11/dfp0.edid}}.<br />
<br />
If in the front-end mouse and keyboard aren't attached, the EDID can be acquired using only the command line. Run an X server with enough verbosity to print out the EDID block:<br />
$ startx -- -logverbose 6<br />
After the X Server has finished initializing, close it and your log file will probably be in {{ic|/var/log/Xorg.0.log}}. Extract the EDID block using nvidia-xconfig:<br />
$ nvidia-xconfig --extract-edids-from-file=/var/log/Xorg.0.log --extract-edids-output-file=/etc/X11/dfp0.bin<br />
<br />
Edit {{ic|xorg.conf}} by adding to the {{ic|Device}} section:<br />
Option "ConnectedMonitor" "DFP"<br />
Option "CustomEDID" "DFP-0:/etc/X11/dfp0.edid"<br />
The {{ic|ConnectedMonitor}} option forces the driver to recognize the DFP as if it were connected. The {{ic|CustomEDID}} provides EDID data for the device, meaning that it will start up just as if the TV/DFP was connected during X the process.<br />
<br />
This way, one can automatically start a display manager at boot time and still have a working and properly configured X screen by the time the TV gets powered on.<br />
<br />
If the above changes didn't work, in the {{ic|xorg.conf}} under {{ic|Device}} section you can try to remove the {{ic|Option "ConnectedMonitor" "DFP"}} and add the following lines:<br />
Option "ModeValidation" "NoDFPNativeResolutionCheck"<br />
Option "ConnectedMonitor" "DFP-0"<br />
<br />
The {{ic|NoDFPNativeResolutionCheck}} prevents NVIDIA driver from disabling all the modes that do not fit in the native resolution.<br />
<br />
=== Check the power source ===<br />
<br />
The NVIDIA X.org driver can also be used to detect the GPU's current source of power. To see the current power source, check the 'GPUPowerSource' read-only parameter (0 - AC, 1 - battery):<br />
<br />
{{hc|$ nvidia-settings -q GPUPowerSource -t|1}}<br />
<br />
=== Listening to ACPI events ===<br />
<br />
NVIDIA drivers automatically try to connect to the [[acpid]] daemon and listen to ACPI events such as battery power, docking, some hotkeys, etc. If connection fails, X.org will output the following warning:<br />
<br />
{{hc|~/.local/share/xorg/Xorg.0.log|<br />
NVIDIA(0): ACPI: failed to connect to the ACPI event daemon; the daemon<br />
NVIDIA(0): may not be running or the "AcpidSocketPath" X<br />
NVIDIA(0): configuration option may not be set correctly. When the<br />
NVIDIA(0): ACPI event daemon is available, the NVIDIA X driver will<br />
NVIDIA(0): try to use it to receive ACPI event notifications. For<br />
NVIDIA(0): details, please see the "ConnectToAcpid" and<br />
NVIDIA(0): "AcpidSocketPath" X configuration options in Appendix B: X<br />
NVIDIA(0): Config Options in the README.<br />
}}<br />
<br />
While completely harmless, you may get rid of this message by disabling the {{ic|ConnectToAcpid}} option in your {{ic|/etc/X11/xorg.conf.d/20-nvidia.conf}}:<br />
<br />
Section "Device"<br />
...<br />
Driver "nvidia"<br />
Option "ConnectToAcpid" "0"<br />
...<br />
EndSection<br />
<br />
If you are on laptop, it might be a good idea to install and enable the [[acpid]] daemon instead.<br />
<br />
=== Displaying GPU temperature in the shell ===<br />
<br />
==== Method 1 - nvidia-settings ====<br />
<br />
{{Note|This method requires that you are using X. Use Method 2 or Method 3 if you are not. Also note that Method 3 currently does not not work with newer NVIDIA cards such as GeForce 200 series cards as well as embedded GPUs such as the Zotac IONITX's 8800GS.}}<br />
<br />
To display the GPU temp in the shell, use {{ic|nvidia-settings}} as follows:<br />
$ nvidia-settings -q gpucoretemp<br />
<br />
This will output something similar to the following:<br />
Attribute 'GPUCoreTemp' (hostname:0.0): 41.<br />
'GPUCoreTemp' is an integer attribute.<br />
'GPUCoreTemp' is a read-only attribute.<br />
'GPUCoreTemp' can use the following target types: X Screen, GPU.<br />
<br />
The GPU temps of this board is 41 C.<br />
<br />
In order to get just the temperature for use in utils such as {{ic|rrdtool}} or {{ic|conky}}, among others:<br />
{{hc|$ nvidia-settings -q gpucoretemp -t|41}}<br />
<br />
==== Method 2 - nvidia-smi ====<br />
<br />
Use nvidia-smi which can read temps directly from the GPU without the need to use X at all. This is important for a small group of users who do not have X running on their boxes, perhaps because the box is headless running server apps. <br />
To display the GPU temperature in the shell, use nvidia-smi as follows:<br />
<br />
$ nvidia-smi<br />
<br />
This should output something similar to the following:<br />
{{hc|$ nvidia-smi|<nowiki><br />
Fri Jan 6 18:53:54 2012 <br />
+------------------------------------------------------+ <br />
| NVIDIA-SMI 2.290.10 Driver Version: 290.10 | <br />
|-------------------------------+----------------------+----------------------+<br />
| Nb. Name | Bus Id Disp. | Volatile ECC SB / DB |<br />
| Fan Temp Power Usage /Cap | Memory Usage | GPU Util. Compute M. |<br />
|===============================+======================+======================|<br />
| 0. GeForce 8500 GT | 0000:01:00.0 N/A | N/A N/A |<br />
| 30% 62 C N/A N/A / N/A | 17% 42MB / 255MB | N/A Default |<br />
|-------------------------------+----------------------+----------------------|<br />
| Compute processes: GPU Memory |<br />
| GPU PID Process name Usage |<br />
|=============================================================================|<br />
| 0. ERROR: Not Supported |<br />
+-----------------------------------------------------------------------------+<br />
</nowiki>}}<br />
<br />
Only for temperature:<br />
{{hc|$ nvidia-smi -q -d TEMPERATURE|<nowiki><br />
<br />
==============NVSMI LOG==============<br />
<br />
Timestamp : Sun Apr 12 08:49:10 2015<br />
Driver Version : 346.59<br />
<br />
Attached GPUs : 1<br />
GPU 0000:01:00.0<br />
Temperature<br />
GPU Current Temp : 52 C<br />
GPU Shutdown Temp : N/A<br />
GPU Slowdown Temp : N/A<br />
<br />
</nowiki>}}<br />
<br />
In order to get just the temperature for use in utils such as rrdtool or conky, among others:<br />
<br />
{{hc|<nowiki>$ nvidia-smi --query-gpu=temperature.gpu --format=csv,noheader,nounits</nowiki>|52}}<br />
<br />
Reference: http://www.question-defense.com/2010/03/22/gpu-linux-shell-temp-get-nvidia-gpu-temperatures-via-linux-cli.<br />
<br />
==== Method 3 - nvclock ====<br />
<br />
Use {{AUR|nvclock}} which is available from the [[AUR]].<br />
{{Note|{{ic|nvclock}} cannot access thermal sensors on newer NVIDIA cards such as Geforce 200 series cards.}}<br />
<br />
There can be significant differences between the temperatures reported by nvclock and nvidia-settings/nv-control. According to [http://sourceforge.net/projects/nvclock/forums/forum/67426/topic/1906899 this post] by the author (thunderbird) of nvclock, the nvclock values should be more accurate.<br />
<br />
=== Set fan speed at login ===<br />
<br />
{{Poor writing|Refer to [[#Enabling overclocking]] for description of ''Coolbits''.}}<br />
<br />
You can adjust the fan speed on your graphics card with ''nvidia-settings''' console interface. First ensure that your Xorg configuration sets the Coolbits option to {{ic|4}}, {{ic|5}} or {{ic|12}} for fermi and above in your {{ic|Device}} section to enable fan control.<br />
<br />
Option "Coolbits" "4"<br />
<br />
{{Note|GeForce 400/500 series cards cannot currently set fan speeds at login using this method. This method only allows for the setting of fan speeds within the current X session by way of nvidia-settings.}}<br />
<br />
Place the following line in your [[xinitrc]] file to adjust the fan when you launch Xorg. Replace {{ic|''n''}} with the fan speed percentage you want to set.<br />
<br />
nvidia-settings -a "[gpu:0]/GPUFanControlState=1" -a "[fan:0]/GPUCurrentFanSpeed=''n''"<br />
<br />
You can also configure a second GPU by incrementing the GPU and fan number.<br />
<br />
nvidia-settings -a "[gpu:0]/GPUFanControlState=1" -a "[fan:0]/GPUCurrentFanSpeed=''n''" \<br />
-a "[gpu:1]/GPUFanControlState=1" -a [fan:1]/GPUCurrentFanSpeed=''n''" &<br />
<br />
If you use a login manager such as GDM or KDM, you can create a desktop entry file to process this setting. Create {{ic|~/.config/autostart/nvidia-fan-speed.desktop}} and place this text inside it. Again, change {{ic|''n''}} to the speed percentage you want.<br />
<br />
[Desktop Entry]<br />
Type=Application<br />
Exec=nvidia-settings -a "[gpu:0]/GPUFanControlState=1" -a "[fan:0]/GPUCurrentFanSpeed=''n''"<br />
X-GNOME-Autostart-enabled=true<br />
Name=nvidia-fan-speed<br />
<br />
{{Note|Since the drivers version 349.16, {{ic|GPUCurrentFanSpeed}} has to be replaced with {{ic|GPUTargetFanSpeed}}.[https://devtalk.nvidia.com/default/topic/821563/linux/can-t-control-fan-speed-with-beta-driver-349-12/post/4526208/#4526208]}}<br />
<br />
=== Order of install/deinstall for changing drivers ===<br />
<br />
{{Expansion|Not clear what this does}}<br />
<br />
Where the old driver is nvidiaO and the new driver is nvidiaN.<br />
<br />
*remove nvidiaO<br />
*install nvidia-libglN<br />
*install nvidiaN<br />
*install lib32-nvidia-libgl-N (if required)<br />
<br />
=== Switching between NVIDIA and nouveau drivers ===<br />
<br />
If you need to switch between drivers, you may use the following script, run as root (say yes to all confirmations):<br />
<br />
{{bc|1=<nowiki><br />
#!/bin/bash<br />
BRANCH= # Enter a branch if needed, i.e. -340xx or -304xx<br />
NVIDIA=nvidia${BRANCH} # If no branch entered above this would be "nvidia"<br />
NOUVEAU=xf86-video-nouveau<br />
<br />
# Replace -R with -Rs to if you want to remove the unneeded dependencies<br />
if [ $(pacman -Qqs ^mesa-libgl$) ]; then<br />
pacman -S $NVIDIA ${NVIDIA}-libgl # Add lib32-${NVIDIA}-libgl and ${NVIDIA}-lts if needed<br />
# pacman -R $NOUVEAU<br />
elif [ $(pacman -Qqs ^${NVIDIA}$) ]; then<br />
pacman -S --needed $NOUVEAU mesa-libgl # Add lib32-mesa-libgl if needed<br />
pacman -R $NVIDIA # Add ${NVIDIA}-lts if needed<br />
fi<br />
</nowiki>}}<br />
<br />
=== Avoid tearing with GeForce 500/600/700/900 series cards === <br />
<br />
Tearing can be avoided by forcing a full composition pipeline, regardless of the compositor you are using. To test whether this option will work, type<br />
nvidia-settings --assign CurrentMetaMode="nvidia-auto-select +0+0 { ForceFullCompositionPipeline = On }"<br />
It has been reported to reduce the performance of some OpenGL applications, though.<br />
<br />
In order to make the change permanent, you need to add the following line to the {{ic|"Screen"}} section of your Xorg configuration file, for example {{ic|/etc/X11/xorg.conf.d/20-nvidia.conf}}:<br />
Option "metamodes" "nvidia-auto-select +0+0 { ForceFullCompositionPipeline = On }"<br />
<br />
If you don't have an Xorg configuration file, you can create one for your present hardware using {{ic|nvidia-xconfig}} (see [[#Automatic configuration]]) and move it from {{ic|/etc/X11/xorg.conf}} to the preferred location {{ic|/etc/X11/xorg.conf.d/20-nvidia.conf}}.<br />
<br />
== Troubleshooting ==<br />
<br />
=== Gaming using TwinView ===<br />
<br />
In case you want to play fullscreen games when using TwinView, you will notice that games recognize the two screens as being one big screen. While this is technically correct (the virtual X screen really is the size of your screens combined), you probably do not want to play on both screens at the same time. <br />
<br />
To correct this behavior for SDL, try:<br />
export SDL_VIDEO_FULLSCREEN_HEAD=1<br />
<br />
For OpenGL, add the appropriate Metamodes to your xorg.conf in section {{ic|Device}} and restart X:<br />
Option "Metamodes" "1680x1050,1680x1050; 1280x1024,1280x1024; 1680x1050,NULL; 1280x1024,NULL;"<br />
<br />
Another method that may either work alone or in conjunction with those mentioned above is [[Gaming#Starting_games_in_a_separate_X_server|starting games in a separate X server]].<br />
<br />
=== Vertical sync using TwinView ===<br />
<br />
If you're using TwinView and vertical sync (the "Sync to VBlank" option in '''nvidia-settings'''), you will notice that only one screen is being properly synced, unless you have two identical monitors. Although '''nvidia-settings''' does offer an option to change which screen is being synced (the "Sync to this display device" option), this does not always work. A solution is to add the following environment variables at startup, for example append in {{ic|/etc/profile}}:<br />
<br />
export __GL_SYNC_TO_VBLANK=1<br />
export __GL_SYNC_DISPLAY_DEVICE=DFP-0<br />
export __VDPAU_NVIDIA_SYNC_DISPLAY_DEVICE=DFP-0<br />
<br />
You can change {{ic|DFP-0}} with your preferred screen ({{ic|DFP-0}} is the DVI port and {{ic|CRT-0}} is the VGA port). You can find the identifier for your display from '''nvidia-settings''' in the "X Server XVideoSettings" section.<br />
<br />
=== Wayland (gdm) crashes after nvidia-libgl installation ===<br />
<br />
On some Intel CPUs outdated microcode causes instability with Wayland when nvidia are installed, causing gdm to crash.<br />
<br />
[[Microcode#Updating Microcode|Updating the microcode]] should solve this problem.<br />
<br />
=== Corrupted screen: "Six screens" Problem ===<br />
<br />
For some users, using GeForce GT 100M's, the screen gets corrupted after X starts, divided into 6 sections with a resolution limited to 640x480.<br />
The same problem has been recently reported with Quadro 2000 and hi-res displays.<br />
<br />
To solve this problem, enable the Validation Mode {{ic|NoTotalSizeCheck}} in section {{ic|Device}}:<br />
Section "Device"<br />
...<br />
Option "ModeValidation" "NoTotalSizeCheck"<br />
...<br />
EndSection<br />
<br />
=== '/dev/nvidia0' input/output error ===<br />
<br />
{{Accuracy|Verify that the BIOS related suggestions work and are not coincidentally set while troubleshooting.|section='/dev/nvidia0' Input/Output error... suggested fixes}}<br />
This error can occur for several different reasons, and the most common solution given for this error is to check for group/file permissions, which in almost every case is ''not'' the problem. The NVIDIA documentation does not talk in detail on what you should<br />
do to correct this problem but there are a few things that have worked for some people. The problem can be a IRQ conflict with another device or bad routing by either the kernel or your BIOS.<br />
<br />
First thing to try is to remove other video devices such as video capture cards and see if the problem goes away. If there are too many video processors on the same system it can lead into the kernel being unable to start them because of memory allocation problems with the video controller. In particular on systems with low video memory this can occur even if there is only one video processor. In such case you should find out the amount of your system's video memory (e.g. with {{ic|lspci -v}}) and pass allocation parameters to the kernel, e.g. for a 32-bit kernel:<br />
vmalloc=384M<br />
<br />
If running a 64bit kernel, a driver defect can cause the NVIDIA module to fail initializing when IOMMU is on. Turning it off in the BIOS has been confirmed to work for some users. [http://www.nvnews.net/vbulletin/showthread.php?s=68bb2fabadcb53b10b286aa42d13c5bc&t=159335][[User:Clickthem#nvidia module]]<br />
<br />
Another thing to try is to change your BIOS IRQ routing from {{ic|Operating system controlled}} to {{ic|BIOS controlled}} or the other way around. The first one can be passed as a kernel parameter:<br />
PCI=biosirq<br />
<br />
The {{ic|noacpi}} kernel parameter has also been suggested as a solution but since it disables ACPI completely it should be used with caution. Some hardware are easily damaged by overheating.<br />
<br />
{{Note|The kernel parameters can be passed either through the kernel command line or the bootloader configuration file. See your bootloader Wiki page for more information.}}<br />
<br />
=== '/dev/nvidiactl' errors ===<br />
<br />
Trying to start an OpenGL application might result in errors such as:<br />
Error: Could not open /dev/nvidiactl because the permissions are too<br />
restrictive. Please see the {{ic|FREQUENTLY ASKED QUESTIONS}} <br />
section of {{ic|/usr/share/doc/NVIDIA_GLX-1.0/README}} <br />
for steps to correct.<br />
<br />
Solve by adding the appropriate user to the {{ic|video}} group and log in again:<br />
# gpasswd -a username video<br />
<br />
=== 32-bit applications do not start ===<br />
<br />
Under 64-bit systems, installing {{ic|lib32-nvidia-libgl}} that corresponds to the same version installed for the 64-bit driver fixes the problem.<br />
<br />
=== Errors after updating the kernel ===<br />
<br />
If a custom build of NVIDIA's module is used instead of the package from the ''extra'' repository, a recompile is required every time the kernel is updated. Rebooting is generally recommended after updating kernel and graphic drivers.<br />
<br />
=== Crashing in general ===<br />
<br />
* Try disabling {{ic|RenderAccel}} in xorg.conf.<br />
* If Xorg outputs an error about "conflicting memory type" or "failed to allocate primary buffer: out of memory", add {{ic|nopat}} at the end of the {{ic|kernel}} line in {{ic|/boot/grub/menu.lst}}.<br />
* If the NVIDIA compiler complains about different versions of GCC between the current one and the one used for compiling the kernel, add in {{ic|/etc/profile}}:<br />
export IGNORE_CC_MISMATCH=1<br />
* If Xorg is crashing with a "Signal 11" while using nvidia-96xx drivers, try disabling PAT. Pass the argument {{ic|nopat}} to [[kernel parameters]].<br />
More information about troubleshooting the driver can be found in the [https://forums.geforce.com/ NVIDIA forums.]<br />
<br />
=== Bad performance after installing a new driver version ===<br />
<br />
If FPS have dropped in comparison with older drivers, first check if direct rendering is turned on (glxinfo is included in {{Pkg|mesa-demos}}):<br />
$ glxinfo | grep direct<br />
If the command prints:<br />
direct rendering: No<br />
then that could be an indication for the sudden FPS drop.<br />
<br />
A possible solution could be to regress to the previously installed driver version and rebooting afterwards.<br />
<br />
=== CPU spikes with 400 series cards ===<br />
<br />
If you are experiencing intermittent CPU spikes with a 400 series card, it may be caused by PowerMizer constantly changing the GPU's clock frequency. Switching PowerMizer's setting from Adaptive to Performance, add the following to the {{ic|Device}} section of your Xorg configuration:<br />
<br />
Option "RegistryDwords" "PowerMizerEnable=0x1; PerfLevelSrc=0x3322; PowerMizerDefaultAC=0x1"<br />
<br />
=== Laptops: X hangs on login/out, worked around with Ctrl+Alt+Backspace ===<br />
<br />
If, while using the legacy NVIDIA drivers, Xorg hangs on login and logout (particularly with an odd screen split into two black and white/gray pieces), but logging in is still possible via {{ic|Ctrl+Alt+Backspace}} (or whatever the new "kill X" key binding is), try adding this in {{ic|/etc/modprobe.d/modprobe.conf}}:<br />
options nvidia NVreg_Mobile=1<br />
<br />
One user had luck with this instead, but it makes performance drop significantly for others:<br />
options nvidia NVreg_DeviceFileUID=0 NVreg_DeviceFileGID=33 NVreg_DeviceFileMode=0660 NVreg_SoftEDIDs=0 NVreg_Mobile=1<br />
<br />
Note that {{ic|NVreg_Mobile}} needs to be changed according to the laptop:<br />
* 1 for Dell laptops.<br />
* 2 for non-Compal Toshiba laptops.<br />
* 3 for other laptops.<br />
* 4 for Compal Toshiba laptops.<br />
* 5 for Gateway laptops.<br />
<br />
See [ftp://download.nvidia.com/XFree86/Linux-x86/355.11/README/README.txt NVIDIA Driver's README: Appendix K] for more information.<br />
<br />
=== No screens found on a laptop/NVIDIA Optimus ===<br />
<br />
On a laptop, if the NVIDIA driver cannot find any screens, you may have an NVIDIA Optimus setup : an Intel chipset connected to the screen and the video outputs, and a NVIDIA card that does all the hard work and writes to the chipset's video memory.<br />
<br />
Check if {{ic|<nowiki>$ lspci | grep VGA</nowiki>}}<br />
outputs something similar to:<br />
00:02.0 VGA compatible controller: Intel Corporation Core Processor Integrated Graphics Controller (rev 02)<br />
01:00.0 VGA compatible controller: nVidia Corporation Device 0df4 (rev a1)<br />
<br />
NVIDIA drivers now offer Optimus support since 319.12 Beta [[http://www.nvidia.com/object/linux-display-amd64-319.12-driver.html]] with kernels above and including 3.9.<br />
<br />
Another solution is to install the [[Intel]] driver to handle the screens, then if you want 3D software you should run them through [[Bumblebee]] to tell them to use the NVIDIA card.<br />
<br />
==== Possible Workaround ====<br />
<br />
Enter the BIOS and changed the default graphics setting from 'Optimus' to 'Discrete' and the install NVIDIA drivers (295.20-1 at time of writing) recognized the screens.<br />
<br />
Steps:<br />
# Enter BIOS.<br />
# Find Graphics Settings (should be in tab ''Config > Display'').<br />
# Change 'Graphics Device' to 'Discrete Graphics' (Disables Intel integrated graphics).<br />
# Change OS Detection for Nvidia Optimus to "Disabled".<br />
# Save and exit.<br />
<br />
Tested on a Lenovo W520 with a Quadro 1000M and Nvidia Optimus<br />
<br />
=== Screen(s) found, but none have a usable configuration ===<br />
<br />
Sometimes NVIDIA and X have trouble finding the active screen. If your graphics card has multiple outputs try plugging your monitor into the other ones. On a laptop it may be because your graphics card has vga/tv outs. Xorg.0.log will provide more info.<br />
<br />
Another thing to try is adding invalid {{ic|"ConnectedMonitor" Option}} to {{ic|Section "Device"}}<br />
to force Xorg throws error and shows you how correct it.<br />
[ftp://download.nvidia.com/XFree86/Linux-x86/355.11/README/xconfigoptions.html Here]<br />
more about ConnectedMonitor setting.<br />
<br />
After re-run X see Xorg.0.log to get valid CRT-x,DFP-x,TV-x values.<br />
<br />
{{ic|nvidia-xconfig --query-gpu-info}} could be helpful.<br />
<br />
=== Blackscreen at X startup with new driver ===<br />
<br />
If you have installed an update of Nvidia and you screen stay black after launching Xorg. You have to use the {{ic|<nowiki>rcutree.rcu_idle_gp_delay=1</nowiki>}} [[kernel parameter]].<br />
<br />
You can also try to add the {{ic|nvidia}} module directly to your [[mkinitcpio]] config file.<br />
<br />
If the screen still stays black with '''both''' the {{ic|<nowiki>rcutree.rcu_idle_gp_delay=1</nowiki>}} [[kernel parameter]] and the {{ic|nvidia}} module directly in the [[mkinitcpio]] config file, try re-installing {{Pkg|nvidia}} and {{Pkg|nvidia-libgl}} in that order, and finally reload the driver:<br />
<br />
# modprobe nvidia<br />
<br />
=== Backlight is not turning off in some occasions ===<br />
<br />
By default, DPMS should turn off backlight with the timeouts set or by running xset. However, probably due to a bug in the proprietary Nvidia drivers the result is a blank screen with no powersaving whatsoever. To workaround it, until the bug has been fixed you can use the {{ic|vbetool}} as root.<br />
<br />
Install the {{Pkg|vbetool}} package.<br />
<br />
Turn off your screen on demand and then by pressing a random key backlight turns on again:<br />
<br />
vbetool dpms off && read -n1; vbetool dpms on<br />
<br />
Alternatively, xrandr is able to disable and re-enable monitor outputs without requiring root.<br />
<br />
xrandr --output DP-1 --off; read -n1; xrandr --output DP-1 --auto<br />
<br />
=== Blue tint on videos with Flash ===<br />
<br />
A problem with {{Pkg|flashplugin}} versions 11.2.202.228-1 and 11.2.202.233-1 causes it to send the U/V panes in the incorrect order resulting in a blue tint on certain videos. There are a few potential fixes for this bug:<br />
<br />
# Install the latest {{Pkg|libvdpau}}.<br />
# Patch {{ic|vdpau_trace.so}} with [https://bbs.archlinux.org/viewtopic.php?pid=1078368#p1078368 this makepkg].<br />
# Right click on a video, select "Settings..." and uncheck "Enable hardware acceleration". Reload the page for it to take affect. Note that this disables GPU acceleration.<br />
# [[Downgrade]] the {{Pkg|flashplugin}} package to version 11.1.102.63-1 at most.<br />
# Use {{AUR|google-chrome}} with the new Pepper API {{AUR|chromium-pepper-flash}}.<br />
# Try one of the few Flash alternatives.<br />
<br />
The merits of each are discussed in [https://bbs.archlinux.org/viewtopic.php?id=137877 this thread].<br />
<br />
=== Bleeding overlay with Flash ===<br />
<br />
This bug is due to the incorrect colour key being used by the {{Pkg|flashplugin}} version 11.2.202.228-1 and causes the flash content to "leak" into other pages or solid black backgrounds. To avoid this problem simply install the latest {{Pkg|libvdpau}} or export {{ic|1=VDPAU_NVIDIA_NO_OVERLAY=1}} within either your shell profile (E.g. {{ic|~/.bash_profile}} or {{ic|~/.zprofile}}) or {{ic|~/.xinitrc}}<br />
<br />
=== Full system freeze using Flash ===<br />
<br />
If you experience occasional full system freezes (only the mouse is moving) using flashplugin<br />
and get:<br />
<br />
{{hc|/var/log/errors.log|<br />
NVRM: Xid (0000:01:00): 31, Ch 00000007, engmask 00000120, intr 10000000<br />
}}<br />
<br />
A possible workaround is to switch off Hardware Acceleration in Flash, setting<br />
<br />
{{hc|/etc/adobe/mms.cfg|2=<br />
EnableLinuxHWVideoDecode=0<br />
}}<br />
<br />
Or, if you want to keep Hardware acceleration enabled, you may try to::<br />
export VDPAU_NVIDIA_NO_OVERLAY=1<br />
<br />
...before starting the browser.<br />
Note that this may introduce tearing.<br />
<br />
=== Xorg fails to load or Red Screen of Death ===<br />
<br />
If you get a red screen and use GRUB disable the GRUB framebuffer by editing {{ic|/etc/default/grub}} and uncomment GRUB_TERMINAL_OUTPUT. For more information see [[GRUB#Disable_framebuffer|GRUB]].<br />
<br />
=== Black screen on systems with Intel integrated GPU ===<br />
<br />
If you have an Intel CPU with an integrated GPU (e.g. Intel HD 4000) and have installed the {{Pkg|nvidia}} package, you may experience a black screen on boot, when changing virtual terminal, or when exiting an X session. This may be caused by a conflict between the graphics modules. This is solved by blacklisting the Intel GPU modules. Create the file {{ic|/etc/modprobe.d/blacklist.conf}} and prevent the ''i915'' and ''intel_agp'' modules from loading on boot:<br />
<br />
{{hc|/etc/modprobe.d/blacklist.conf|<br />
install i915 /usr/bin/false<br />
install intel_agp /usr/bin/false<br />
}}<br />
<br />
=== Black screen on systems with VIA integrated GPU ===<br />
<br />
As above, blacklisting the ''viafb'' module may resolve conflicts with NVIDIA drivers:<br />
<br />
{{hc|/etc/modprobe.d/blacklist.conf|<br />
install viafb /usr/bin/false<br />
}}<br />
<br />
=== X fails with "no screens found" with Intel iGPU ===<br />
<br />
Like above, if you have an Intel CPU with an integrated GPU and X fails to start with <br />
<br />
[ 76.633] (EE) No devices detected.<br />
[ 76.633] Fatal server error:<br />
[ 76.633] no screens found<br />
<br />
then you need to add your discrete card's BusID to your X configuration. Find it:<br />
<br />
{{hc|<nowiki># lspci | grep VGA</nowiki>|<br />
00:02.0 VGA compatible controller: Intel Corporation Xeon E3-1200 v2/3rd Gen Core processor Graphics Controller (rev 09)<br />
01:00.0 VGA compatible controller: NVIDIA Corporation GK107 [GeForce GTX 650] (rev a1)<br />
}}<br />
<br />
then you fix it by adding it to the card's Device section in your X configuration. In my case:<br />
<br />
{{hc|/etc/X11/xorg.conf.d/10-nvidia.conf|<br />
Section "Device"<br />
Identifier "Device0"<br />
Driver "nvidia"<br />
VendorName "NVIDIA Corporation"<br />
BusID "PCI:1:0:0"<br />
EndSection<br />
}}<br />
<br />
Note how {{ic|01:00.0}} is written as {{ic|1:0:0}}.<br />
<br />
=== Xorg fails during boot, but otherwise starts fine ===<br />
<br />
On very fast booting systems, systemd may attempt to start the display manager before the NVIDIA driver has fully initialized. You will see a message like the following in your logs only when Xorg runs during boot.<br />
{{hc|/var/log/Xorg.0.log|output=<br />
[ 1.807] (EE) NVIDIA(0): Failed to initialize the NVIDIA kernel module. Please see the<br />
[ 1.807] (EE) NVIDIA(0): system's kernel log for additional error messages and<br />
[ 1.808] (EE) NVIDIA(0): consult the NVIDIA README for details.<br />
[ 1.808] (EE) NVIDIA(0): *** Aborting ***<br />
}}<br />
In this case you will need to establish an ordering dependency from the display manager to the DRI device. First create device units for DRI devices by creating a new udev rules file.<br />
{{hc|/etc/udev/rules.d/99-systemd-dri-devices.rules|output=<br />
ACTION=="add", KERNEL=="card*", SUBSYSTEM=="drm", TAG+="systemd"<br />
}}<br />
Then create dependencies from the display manager to the device(s).<br />
{{hc|/etc/systemd/system/display-manager.service.d/10-wait-for-dri-devices.conf|output=<br />
[Unit]<br />
Wants=dev-dri-card0.device<br />
After=dev-dri-card0.device<br />
}}<br />
If you have additional cards needed for the desktop then list them in Wants and After seperated by spaces.<br />
<br />
=== Flash video players crashes ===<br />
<br />
If you are getting frequent crashes of Flash video players, try to switch off Hardware Acceleration:<br />
<br />
{{hc|/etc/adobe/mms.cfg|2=<br />
EnableLinuxHWVideoDecode=0<br />
}}<br />
<br />
(This problem appeared after installing the proprietary nvidia driver, and was fixed by changing this setting.)<br />
<br />
=== Override EDID ===<br />
<br />
If your monitor is providing wrong EDID information, the nvidia-driver will pick a very small solution.<br />
Nvidia's driver options change, this guide refers to nvidia 346.47-11.<br />
<br />
Aside from manually setting modelines in the xorg config, you have to allow non-edid modes and disable edid in the device section:<br />
<br />
{{hc|/etc/X11/xorg.conf.d/10-monitor.conf|2=<br />
Section "Monitor"<br />
Identifier "Monitor0"<br />
VendorName "Unknown"<br />
ModelName "Unknown"<br />
HorizSync 30-94<br />
VertRefresh 56-76<br />
DisplaySize 518.4 324.0<br />
Option "DPMS"<br />
# 1920x1200 59.95 Hz (CVT 2.30MA-R) hsync: 74.04 kHz; pclk: 154.00 MHz<br />
Modeline "1920x1200R" 154.00 1920 1968 2000 2080 1200 1203 1209 1235 +hsync -vsync<br />
EndSection<br />
<br />
Section "Device"<br />
Identifier "Device0"<br />
Driver "nvidia"<br />
VendorName "NVIDIA Corporation"<br />
Option "UseEdidFreqs" "FALSE"<br />
Option "UseEDID" "FALSE"<br />
Option "ModeValidation" "AllowNonEdidModes"<br />
EndSection<br />
<br />
Section "Screen"<br />
Identifier "Screen0"<br />
Device "Device0"<br />
Monitor "Monitor0"<br />
DefaultDepth 24<br />
SubSection "Display"<br />
Depth 24<br />
Modes "1920x1200R"<br />
EndSubSection<br />
EndSection<br />
}}<br />
<br />
=== Fix rendering lag (firefox, gedit, vim, tmux …) ===<br />
nvidia-settings -a InitialPixmapPlacement=0<br />
<br />
https://bugzilla.gnome.org/show_bug.cgi?id=728464<br />
<br />
=== Screen Tearing with Multiple Monitor Orientations ===<br />
<br />
When running multiple monitors in different orientations (through [[Xrandr]] settings) such as portrait and landscape simultaneously, you may notice screen tearing in one of the orientations/monitors. Unfortunately, this issue is fixed by setting all monitors to the same orientation via [[Xrandr]] settings<br />
<br />
== See also ==<br />
<br />
* [https://forums.geforce.com/ NVIDIA User forums]<br />
* [ftp://download.nvidia.com/XFree86/Linux-x86/355.11/README/README.txt Official README for NVIDIA drivers, all on one text page. Most Recent Driver Version as of September 7, 2015: 355.11.]<br />
* [ftp://download.nvidia.com/XFree86/Linux-x86/355.11/README/xconfigoptions.html README Appendix B. X Config Options, 355.11 (direct link)]</div>Beta990