KDE

From ArchWiki
Revision as of 10:02, 14 August 2015 by Tino (talk | contribs) (Use Telegram with KDE Telepathy: typo)
Jump to: navigation, search

zh-CN:KDE zh-TW:KDE

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 UserBase wiki. Detailed information about most KDE applications can be found there.

Note: In 2014, the KDE project changed the way it names and organizes itself. The older term KDE Software Compilation was discontinued and the versioning and development cycles of the frameworks and applications were decoupled from the Plasma desktop itself.

Contents

Installation

Plasma Desktop

Note:
  • Plasma 5 is not co-installable with KDE 4 Workspace, provided by kdebase-workspace.
  • The KDE 4 Plasma Desktop is currently in maintenance mode, and is expected to reach EOL in August 2015. [Citation Needed: KDE has announced EOL of 4.11.x, KDE4 is currently at 4.14.x so this statement needs to be verified.]

Before installing Plasma, make sure you have a working Xorg installation on your system.

Install the plasma-meta meta-package or the plasma group. For differences between plasma-meta and plasma reference KDE Packages. Alternatively, for a more minimal Plasma installation, install the plasma-desktop package.

KDE applications and language packs

To install the full set of KDE Applications, install the kde-applications group or the 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.

If you need language files, install kde-l10n-yourlanguagehere (e.g. kde-l10n-de for the German language). For a full list of available languages see this link.

Starting Plasma

Tip:
  • KDM is not available in Plasma 5. KDE upstream recommends using the SDDM display manager as it provides integration with the Plasma 5 theme.
  • To better integrate SDDM with Plasma, it is recommended to edit /etc/sddm.conf to use the breeze theme. Refer to SDDM#Theme settings for instructions.

To launch a Plasma 5 session, choose Plasma in your display manager menu.

Alternatively, to start Plasma with startx, append exec startkde to your .xinitrc file. If you want to start Xorg at login, please see Start X at login.

Configuration

Most settings for KDE 4 applications are stored in the ~/.kde4 folder, otherwise ~/.config is used. However, configuring KDE is primarily done through the System Settings application. It can be started from a terminal by executing systemsettings.

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:

  • Konsole profiles from ~/.kde4/share/apps/konsole to ~/.local/share/konsole/
  • Application appearance from ~/.kde4/share/config/kdeglobals to ~/.config/kdeglobals

Personalization

Plasma desktop

Themes
Note: If the Plasma cursor theme is incorrect in some instances, see the following forum post for a workaround.

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 AUR.

The easiest way to install themes is by going through the Desktop Settings control panel:

 Workspace Theme > Desktop Theme > Get new Themes

This will present a nice frontend for kde-look.org that allows you to install, uninstall, or update third-party plasmoid scripts with literally just one click.

Splash and Lock screens are currently unavailable so to customize these screens you have to modify the original theme found in /usr/share/plasma/look-and-feel/. See this thread on the Kubuntu forums.

Note that the SDDM login screen is not part of this theme.

Qt and GTK+ Applications Appearance
Tip: For Qt and GTK theme consistency, see Uniform Look for Qt and GTK Applications.
Qt4

For Qt4 applications to have a consistent appearance, you need to install breeze-kde4 and then pick Breeze as GUI Style in qtconfig-qt4.

GTK+

The recommended theme for a pleasant appearance in GTK+ applications is gtk-theme-orion. Also see gnome-breeze-gitAUR, a GTK+ theme designed to mimic the appearance of Plasma 5 Breeze. Once you've installed a theme, choose it in System Settings > Application Style > GNOME Application Style. If you don't see those settings, install and run one of the GTK+ configuration tools such as lxappearance to change the theme.

Widgets

Plasmoids are little scripted (plasmoid scripts) or coded (plasmoid binaries) KDE applications designed to enhance the functionality of your desktop.

Plasmoid binaries can be installed using PKGBUILDs from AUR, or you can write your own PKGBUILD.

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.

This will present a nice frontend for kde-look.org that allows you to install, uninstall, or update third-party plasmoid scripts with literally just one click.

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.

Sound applet in the system tray

Install Kmix (kdemultimedia-kmix for KDE 4, or kmix for Plasma 5) and start it from the application launcher. Since KDE, by default, autostarts programs from the previous session, it does not need to be started manually upon every login.

Note: To adjust the step size of volume increments/decrements, add e.g. VolumePercentageStep=1 in the [Global] section of ~/.kde4/share/config/kmixrc
Adding a Global Menu to the desktop

Install the appmenu-qt package, as well as the appmenu-gtkAUR and appmenu-qt5AUR packages in order to complete the preliminaries for a Mac OS X style always-on global menu. To get Firefox and LibreOffice to use the global menu as well, install the firefox-extension-globalmenuAUR[broken link: package not found] and libreoffice-extension-menubarAUR packages.

Note:
  • appmenu-gtkAUR is orphaned and Canonical has abandoned appmenu-gtk in favor of unity-gtk-module that is depending on Unity desktop. As of October 2014 there is no way of exporting gtk2,3 menus in KDE.
  • Install the firefox-ubuntuAUR package, which has Canonical's patch for getting the global menu to work with the current version of Firefox (as of November 2013).

To actually get the global menu, install the kdeplasma-applets-menubarAUR package. Create a plasma-panel on top of your screen and add the window menubar applet to the panel. To export the menus to your global menu, go to System Settings > Application Appearance > Style.

Now click the fine-tuning tab and use the drop-down list to select only export as your menubar style.

Disable panel shadow

As the plasma panel is on top of other windows, its shadow is drawn over them. [1] To disable this behaviour without impacting other shadows, install xorg-xprop and run:

$ xprop -remove _KDE_NET_WM_SHADOW

then select the panel with the plus-sized cursor. [2] For automation, install xorg-xwininfo and create the following script:

/usr/local/bin/kde-no-shadow
#!/bin/bash
for WID in $(xwininfo -root -tree | sed '/"plasma-desktop": ("Plasma" "Plasma")/!d; s/^  *\([^ ]*\) .*/\1/g'); do
   xprop -id $WID -remove _KDE_NET_WM_SHADOW
done

The script can be run on login with Add Script in Autostart:

$ kcmshell4 autostart

Window decorations

Window decorations can be changed in System Settings > Workspace Appearance > Window Decorations.

There you can also directly download and install more themes with one click, and some are available in the AUR.

Icon themes

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 kde-look.org.

Official logos, icons, CD labels and other artwork for Arch Linux are provided in the archlinux-artworkAUR package. After installing you can find such artwork at /usr/share/archlinux/.

Qt 5 icons theme

If you are on Plasma 5, use System Settings > Icons, while if you are on KDE 4 use kcmshell5 icons to set the icons theme.

Fonts

Fonts in a Plasma session look poor

Try installing the ttf-dejavu and ttf-liberation packages.

After the installation, be sure to log out and back in. You should not have to modify anything in System Settings > Fonts.

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 (fonts.conf).

There is no way to prevent this, but, if you set the values to match your 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.

Fonts are huge or seem disproportional

Try to force font DPI to 96 in System Settings > Application Appearance > Fonts.

If that does not work, try setting the DPI directly in your Xorg configuration as documented here.

Space efficiency

The Plasma Netbook shell has been dropped from Plasma 5, see the following KDE forum post However, you can achieve something similar by editing the file ~/.config/kwinrc adding BorderlessMaximizedWindows=true in the [Windows] section.

Printing

Tip: Use the CUPS web interface for faster configuration. Printers configured in this way can be used in KDE applications.

You can also configure printers in System Settings > Printer Configuration. To use this method, you must first install print-manager and cups.

The avahi-daemon and cupsd daemons must be started first; otherwise, you will get the following error:

The service 'Printer Configuration' does not provide an interface 'KCModule'
with keyword 'system-config- printer-kde/system-config-printer-kde.py'
The factory does not support creating components of the specified type.

If you are getting the following error, you need to give your user the right to manage printers.

There was an error during CUPS operation: 'cups-authorization-canceled'

For CUPS, this is set in /etc/cups/cups-files.conf.

Adding lpadmin to /etc/group and then to the SystemGroup directive in /etc/cups/cups-files.conf allows anyone in the lpadmin group to configure printers. Do not add the lp group to the SystemGroup directive, or printing will fail.

# groupadd -g107 lpadmin
/etc/cups/cups-files.conf
# Administrator user group...
SystemGroup sys root lpadmin
Tip: Read CUPS#CUPS administration to get more details on how to configure CUPS.

Samba/Windows support

If you want to have access to Windows services, install Samba (package samba).

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.

KDE Desktop activities

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.

On your desktop, click the Cashew Plasmoid and, on the pop-up window, press "Activities".

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.

Power saving

KDE 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).

Since KDE 4.6, CPU frequency scaling is no longer managed by KDE. Instead it is assumed to be handled automatically by the the hardware and/or kernel. Arch has used ondemand as the default CPU frequency governor since kernel version 3.3, so no additional configuration is needed in most cases. For details on fine-tuning the governor, see CPU frequency scaling.

Monitoring changes on local files and directories

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 kdirwatchAUR from AUR which is a GUI frontend for kdirwatch.

Autostarting applications

Plasma can autostart applications and run scripts on startup and shutdown. To autostart an application, start 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 .desktop file will be created in the ~/.config/autostart directory. For shell scripts, a symlink will be created in one the following directories:

  • ~/.config/autostart - for starting at login.
  • ~/.config/plasma-workspace/shutdown - for starting on shutdown.
  • ~/.config/plasma-workspace/env - for starting prior to login.

System administration

Terminate Xorg server through KDE system settings

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.

KCM

KCM stands for KConfig Module. KCMs can help you configure your system by providing interfaces in System Settings.

Configuration for look and feel of GTK applications.

Configuration for the GRUB bootloader.

Configuration for Synaptics touchpads.

Configuration for the Uncomplicated Firewall (UFW)

Configuration for PolicyKit

Configuration for Wacom tablets

Configuration for systemd

More KCMs can be found at kde-apps.org.

Desktop search

KDE implements desktop search with a software called Baloo, a file indexing and searching solution.

Baloo

Using and configuring Baloo

In order to search using Baloo on the KDE Plasma Desktop, press ALT+F2 and type in your query. Within Dolphin press CTRL+F.

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.

Alternatively you can edit your ~/.kde4/share/config/baloofilerc (KDE4) or ~/.config/baloofilerc (KF5) file (info). Additionally the balooctl process can also be used. In order to disable Baloo run balooctl disable.

Once you added additional folders to the blacklist or disabled Baloo entirely, a process named baloo_file_cleaner removes all unneeded index files automatically. They are stored under ~/.local/share/baloo/.

More advanced configuration options are available through kcm_baloo_advancedAUR.

How do I index a removable device?

By default every removable device is blacklisted. You just have to remove your device from the blacklist in the KCM panel.

Web browsers

Konqueror and Rekonq

Konqueror supports two rendering engines – KHTML and QtWebKit (via the 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 deprecated by the Qt Project and replaced by Chromium-based Qt WebEngine which is currently not supported by either Konqueror or Rekonq.

A successor named Fiber is currently in development, which will use Chromium's engine.

Firefox

Firefox can be configured to better integrate with Plasma. See Firefox KDE integration for details.

Qupzilla

Qupzilla (qupzilla) is a Qt web browser with Plasma integration features. Qupzilla 2.0 will use Qt WebEngine intead of WebKit. A snaphot version is available via the AUR package qupzilla-gitAUR.

PIM

KDE offers its own stack for personal information management. This includes emails, contacts, calendar, etc.

Akonadi

Akonadi is a system meant to act as a local cache for PIM data, regardless of its origin, which can be then used by other applications. This includes the user's emails, contacts, calendars, events, journals, alarms, notes, and so on.

Akonadi does not store any data by itself: the storage format depends on the nature of the data (for example, contacts may be stored in vCard format).

Disabling Akonadi

See this section in the KDE userbase. Alternatively, install akonadi-fakeAUR.

Database configuration

Start akonaditray from package kdepim-runtime. Right click on it and select configure. In the Akonadi server configure tab, you can:

  • Configuring Akonadi to use MySQL/MariaDB Server
    • If your home directory is on a ZFS pool, you will need to create ~/.config/akonadi/mysql-local.conf with the following contents:
[mysqld]
innodb_use_native_aio = 0

Otherwise you will get the OS error 22

  • Configuring Akonadi to use PostgreSQL Server
  • Configuring Akonadi to use SQLite
    • Edit ~/.config/akonadi/akonadiserverrc to match the below
[General]
Driver=QSQLITE3

[QSQLITE3]
Name=/home/username/.local/akonadi/akonadi.db

Phonon

From Wikipedia:

"Phonon is the multimedia API for KDE 4. Phonon was created to allow KDE 4 to be independent of any single multimedia framework such as GStreamer or xine and to provide a stable API for KDE 4's lifetime. It was done for various reasons: to create a simple KDE/Qt style multimedia API, to better support native multimedia frameworks on Windows and Mac OS X, and to fix problems of frameworks becoming unmaintained or having API or ABI instability."

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).

Which backend should I choose?

You can choose between backends based on GStreamer and VLC – each available in versions for Qt4 applications and Qt5 applications (phonon-qt4-gstreamer, phonon-qt5-gstreamerphonon-qt4-vlc, phonon-qt5-vlc).

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 features set.

In the past other backends were developed as well but are no longer maintained and their AUR packages have been deleted.

Note:
  • 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.
  • According to the KDE forums, the VLC backend lacks support for ReplayGain.

Useful applications

The official set of KDE applications may be found here.

Yakuake

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 yakuake.

KDE Telepathy

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.

To install all Telepathy protocols, install the telepathy group. To use the KDE Telepathy client, install the telepathy-kde-meta package that includes all the packages contained in the telepathy-kde group.

Use Telegram with KDE Telepathy

Telegram protocol is available using telepathy-haze, installing telegram-purpleAUR or telegram-purple-gitAUR. 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 (~/.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.

Tips and tricks

Using an alternative window manager

There may be reasons you want to use another window manager than KWin, for example to work around the DRI bug that causes black screen with PRIME.

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.

KDE/Openbox Session

The openbox package provides a session for using KDE with Openbox. To make use of this session, select KDE/Openbox from the display manager menu.

For those starting the session manually, add the following line to your .xinitrc file:

exec openbox-kde-session

Compiz custom

If you need to run Compiz with custom options and switches select Compiz custom and then create a script called compiz-kde-launcher and add to it the commands you wish to use to start Compiz. See the example below:

/usr/local/bin/compiz-kde-launcher
#!/bin/bash
LIBGL_ALWAYS_INDIRECT=1
compiz --replace &
wait

Then make it executable:

$ chmod +x /usr/local/bin/compiz-kde-launcher

Re-enabling compositing effects

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.

Integrate Android with the KDE Desktop

KDE connect provides several features for you:

  • Share files and URLs to/from KDE from/to any app, without wires.
  • Touchpad emulation: Use your phone screen as your computer's touchpad.
  • Notifications sync (4.3+): Read your Android notifications from the desktop.
  • Shared clipboard: copy and paste between your phone and your computer.
  • Multimedia remote control: Use your phone as a remote for Linux media players.
  • WiFi connection: no usb wire or bluetooth needed.
  • RSA Encryption: your information is safe.

You will need to install KDE Connect both on your computer and on your Android. For PC side, install kdeconnect if you are using KDE4 or if you are using Plasma 5, then you should install kdeconnect-gitAUR instead. For Android side, install KDE Connect from the Google Play Store or from F-Droid.

Configure KWin to use OpenGL ES

Plasma 4

Beginning with KWin version 4.8 it is possible to use the separately built binary kwin_gles as a replacement for kwin. It behaves almost the same as the kwin executable in OpenGL2 mode with the slight difference that it uses egl instead of glx as the native platform interface. To test kwin_gles you just have to run kwin_gles --replace in Konsole. If you want to make this change permanent you have to create a script in $(kde4-config --localprefix)/env/ which exports KDEWM=kwin_gles.

Plasma 5

Due to QtQuick2, both the Qt OpenGL module and KWin have to be compiled against OpenGL ES.

Speed up application startup

User Rob described a "magic trick" on his blog to improve application start-up time by 50-150ms. To enable it, create this folder in your home:

$ mkdir ~/.compose-cache/

It can produce freezes under heavy io. To avoid this, also do:

$ ln -sfv /run/user/$UID/ /home/$USER/.compose-cache
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 /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 ~/.compose-cache if the directory already exists.

Setting the background for lock screen

In Plasma 5, you can set a custom wallpaper for the lock screen. This is not possible in KDE 4, but here a workaround from OpenSUSE mailing lists: http://lists.opensuse.org/opensuse-kde/2013-02/msg00082.html

For this you should modify the file /usr/share/kde4/apps/ksmserver/screenlocker/org.kde.passworddialog/contents/ui/main.qml, replacing a line

source: theme.wallpaperPathForSize(parent.width, parent.height)

with something like

source: "1920x1080.jpg"

Now you simply put a wallpaper image 1920x1080.jpg to the /usr/share/kde4/apps/ksmserver/screenlocker/org.kde.passworddialog/contents/ui directory.

Note: You have to redo this for each update of the package kdebase-workspace.

Setting lockscreen wallpaper to arbitrary image

Copy an existing wallpaper profile as a template:

$ cp -r /usr/share/wallpapers/ExistingWallpaper ~/.kde4/share/wallpapers/

Change the name of the directory, and edit metadata.desktop:

~/.kde4/share/wallpapers/MyWallpaper/metadata.desktop
[Desktop Entry]
Name=MyWallpaper
X-KDE-PluginInfo-Name=MyWallpaper

Remove existing images (contents/screenshot.png and images/*):

$ rm ~/.kde4/share/wallpapers/MyWallpaper/contents/screenshot.png
$ rm ~/.kde4/share/wallpapers/MyWallpaper/contents/images/*

Copy new image in:

$ cp path/to/MyWallpaper.png MyWallpaper/contents/images/1920x1080.png

Edit the metadata profile for the current theme:

~/.kde4/share/apps/desktoptheme/MyTheme/metadata.desktop
[Wallpaper]
defaultWallpaperTheme=MyWallpaper
defaultFileSuffix=.png
defaultWidth=1920
defaultHeight=1080

Lock the screen to check that it worked.

Note: This method sets the lockscreen background without changing any system-wide settings. For a system-wide change, create the new wallpaper profile in /usr/share/wallpapers.

Configuring monitor resolution / multiple monitors

To enable display resolution management and multiple monitors in Plasma 5, install kscreen. This adds the additional options to System Settings/Display and Monitor.

Troubleshooting

Graphics card related

Plasma keeps crashing with Intel

As described on kde-distro-packagers, there's a serious bug with Intel graphics cards and Plasma when SNA acceleration method is used. In this case, switching to UXA acceleration method helps. See Intel_graphics#SNA_issues for detailed info.

Plasma keeps crashing with legacy Nvidia

There is a bug in Plasma with using the Nvidia-304xx driver described here. Rather than disabling compositing, try creating a file kwin.sh in ~/.config/plasma-workspace/env/ with the following content

#!/bin/sh
export KWIN_EXPLICIT_SYNC=0

Then go to the system-settings -> Startup and Shutdown -> Autostart and Check/Add the script as a pre-kde startup file

Configuration related

Many problems in KDE are related to configuration. One way to resolve upgrade problems is to start over with a fresh KDE config.

Reset all KDE configuration

To test whether your config is the problem try quitting your KDE session by logging out and, in a tty, run

$ cp -r ~/.kde4 ~/.kde4.safekeeping
$ rm .kde4/{cache,socket,tmp}-$(hostname)

The rm command just removes symbolic links which will be recreated by KDE automatically. Now start a new KDE session to see the results.

If the problem is resolved, you will have a fresh, problem-free ~/.kde4/. You can gradually move parts of your saved configuration back, restarting your session regularly to test, to identify the problematic parts of your config. Some files here are named after applications so you will probably be able to test these without needing to restart KDE.

Plasma desktop behaves strangely

Plasma problems are usually caused by unstable plasmoids or plasma themes. First, find which was the last plasmoid or plasma theme you had installed and disable it or uninstall it.

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).

If you cannot find the problem, but you do not want all the KDE settings to be lost, do:

$ rm -r ~/.kde4/share/config/plasma*

This command will delete all plasma related configs of your user and when you will relogin into KDE, you will have the default settings back. You should know that this action cannot be undone. You should create a backup folder and copy all the plasma related configs in it.

Clean cache to resolve upgrade problems

The 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.

Rebuild your cache with the following commands:

$ rm ~/.config/Trolltech.conf
$ kbuildsycoca4 --noincremental

Hopefully, your problems are now fixed.

Clean akonadi configuration to fix KMail

First, make sure that KMail is not running. Then backup configuration:

$ mv ~/.local/share/akonadi ~/.local/share/akonadi-old
$ mv ~/.config/akonadi ~/.config/akonadi-old

Start SystemSettings > Personal and remove all the resources. Go back to Dolphin and remove the original ~/.local/share/akonadi and ~/.config/akonadi - the copies you made ensure that you can back-track if necessary.

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.

Getting current state of KWin for support and debug purposes

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 Martin's blog.

$ qdbus org.kde.kwin /KWin supportInformation

KDE4 does not finish loading

There might be a situation in which the graphic driver might create a conflict when starting KDE4. This situation happens after the login but before finishing loading the desktop, making the user wait indefinitely at the loading screen. Until now the only users confirmed to be affected by this are the ones that use Nvidia drivers and KDE4.

A solution for Nvidia users:

~/.kde4/share/config/kwinrc
[Compositing]
Enabled=false

For more information, see this thread.

If a minimal install was done, make sure you installed the required font by your phonon backend listed in #Minimal install[dead link 2015-07-26].

KDE and Qt programs look bad when in a different window manager

If you are using KDE or Qt programs but not in a full KDE session (specifically, you did not run startkde), then as of KDE 4.6.1 you will need to tell Qt how to find KDE's styles (Oxygen, QtCurve etc.)

You just need to set the environment variable QT_PLUGIN_PATH. E.g. put:

export QT_PLUGIN_PATH=$HOME/.kde4/lib/kde4/plugins/:/usr/lib/kde4/plugins/

into your /etc/profile (or ~/.profile if you do not have root access). qtconfig-qt4should then be able to find your KDE styles and everything should look nice again!

Alternatively, you can symlink the Qt styles directory to the KDE styles one:

# ln -s /usr/lib/kde4/plugins/styles/ /usr/lib/qt4/pluginlib32-libdbusmenu-glibs/styles

Under Gnome you can try to install the package libgnomeui.

Graphical related problems

Low 2D desktop performance (or) artifacts appear when on 2D

GPU driver problem

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. The open-source ATI and Intel drivers and the proprietary (binary) Nvidia driver should theoretically provide the best 2D and 3D acceleration.

The Raster engine workaround

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.

You can change the painter engine to software based only by invoking the application with the -graphicssystem raster command line. This rendering engine can be set as the default one by recompiling Qt with the same as configure option, -graphicssystem raster.

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.

Since Qt 4.7+, recompiling Qt is not needed. Simply export QT_GRAPHICSSYSTEM=raster, or opengl, or 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).

The best and automatic way to do that is to install kcm-qt-graphicssystemAUR from AUR and configure this particular Qt setting through System Settings > Qt Graphics System.

For more information, consult this KDE Developer blog entry and/or this Qt Developer blog entry.

Low 3D desktop performance

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 Alt+Shift+F12.

Note: You may encounter such problems with 3D desktop performance even when using a more powerful graphics card, especially the catalyst proprietary driver (fglrx). This driver is known for having problems with 3D acceleration. Visit the ATI Wiki page for more troubleshooting.

Desktop compositing is disabled on my system with a modern Nvidia GPU

Sometimes, KWin may have settings in its configuration file (kwinrc) that may cause a problem on re-activating the 3D desktop 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 ~/.kde4/share/config/kwinrc file and relogin. The KWin settings will turn to the KDE default ones and the problem should be probably gone.

Flickering in fullscreen when compositing is enabled

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.

Screen Tearing with desktop compositing enabled

KWin may suffer from screen tearing while desktop effects are enabled. Uncheck the VSync option under System Settings > Desktop Effects > Advanced > Use Vsync.

Note: With the release of KDE 4.11, several new Vsync options have been added, which may help with screen tearing.

For proprietary driver users, ensure that the driver's VSync option is enabled (amdccle for Catalyst users, and nvidia-settings for NVIDIA users).

Display settings lost on reboot (multiple monitors)

There is a bug in kscreen that makes it forget dual screen settings after reboot with certain displays. A possible workaround is to delete kscreen and make sure that your screen resolution is specified in a xorg.conf file:

  • For Nouveau you can use the template at Nouveau#Dual Head, just edit it to suit your setup.
  • For the proprietary nvidia driver you can use the nvidia-settings utility as root to write the config file.

Other suggestion

Installing 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 here.

Sound problems under KDE

ALSA related problems

Note: First make sure you have alsa-lib and alsa-utils installed.
"Falling back to default" messages when trying to listen to any sound in KDE

When you encounter such messages:

The audio playback device name_of_the_sound_device does not work.
Falling back to default

Go to System Settings > Multimedia > Phonon and set the device named default above all the other devices in each box you see.

MP3 files cannot be played when using the GStreamer Phonon backend

This can be solved by installing the GStreamer libav plugin (package gst-libav). If you still encounter problems, you can try changing the Phonon backend used by installing another such as phonon-qt4-vlc or phonon-qt5-vlc. Then, make sure the backend is preferred via System Settings > Multimedia > Phonon > Backend (tab).

Konsole does not save commands' history

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. To enable autosaving after every command execution:

~/.bashrc
shopt -s histappend
[[ "${PROMPT_COMMAND}" ]] && PROMPT_COMMAND="$PROMPT_COMMAND;history -a" || PROMPT_COMMAND="history -a"

Inotify folder watch limit

If you get the following error:

KDE Baloo Filewatch service reached the inotify folder watch limit. File changes may be ignored.

Then you will need to increase the inotify folder watch limit:

# echo 10000 > /proc/sys/fs/inotify/max_user_watches

To make changes permanent, create /etc/sysctl.d/90-inotify.conf with

#increase inotify watch limit
fs.inotify.max_user_watches = 10000

No system tray icons in Plasma 5

Plasma 5 uses a new specification to display items in the 'system tray' area called Status Notifier. To allow applications using the old xembed specification to display items the packages (GTK2) libappindicator-gtk2AUR, (GTK3) libappindicator-gtk3AUR, (Qt4) sni-qt, or (For 32-bit Qt applications like Skype) lib32-sni-qt may be required. See "Where are my systray icons?" for more information.

Unstable releases

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.

You can add kde-unstable with:

/etc/pacman.conf
[kde-unstable]
Include = /etc/pacman.d/mirrorlist
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. 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!
  1. 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.
  2. To update from a previous KDE installation, run: # pacman -Syu or # pacman -S kde-unstable/kde
  3. If you do not have KDE installed, you might have difficulties to install it by using groups (limitation of pacman)
  4. Subscribe and read the arch-dev-public mailing list
  5. Make sure you make bug reports if you find any problems.

Bugs

It is preferrable that if you find a minor or serious bug, you should visit the Arch Bug Tracker or/and KDE Bug Tracker in order to report that. Make sure that you are clear about what you want to report.

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 here) or try Reflector.

See also