Distributions/Packaging Recommendations

From KDE Community Wiki
Revision as of 04:03, 12 September 2024 by Ngraham (talk | contribs) (move qt-imageformats and libappindicator-gtk3 packages into 3rd-party packages section)

This page collects recommendations for how distro packagers can ship the highest-quality and most complete Plasma session to their users.

If you're a user reading this as a reference point for how to get a complete Plasma session, it's highly recommended that you seek out and use your distro's "plasma desktop" meta-package. If you opt not to, consider this page to be an instruction manual for how to proceed correctly.


General packaging recommendations

  • For every KDE package you pre-install, also pre-install its optional CMake dependencies; it's okay if the user can remove them later, but they should be installed by default.
  • Avoid patching out mandatory or optional dependencies, as this will lead to KDE software missing functionality in ways that will be mysterious for users.
  • Avoid splitting single KDE source repos into multiple packages--especially those which provide runtime dependencies like QML modules. This is a common cause of runtime user breakage.
  • Use the Libinput input drivers by default; don't use Synaptics on X11 as it is unmaintained and provides a subpar experience with modern large buttonless touchpads compared to Libinput.


Recommended packages to pre-install

These are packages that we recommend you pre-installed by default, or install when the user installs your "KDE Plasma Desktop" metapackage.

Plasma packages

Generally pre-install every package in https://download.kde.org/stable/plasma/[latest release], except for the following:

Optional packages:

  • oxygen5 (it's the old Oxygen Plasma theme; this doesn't need to be installed by default)

Do not pre-install these Plasma packages for Plasma Desktop:

  • aura-browser (not intended for the desktop)
  • plank-player (not intended for the desktop)
  • plasma-bigscreen (not needed for the desktop shell)
  • plasma-mobile (not needed for the desktop shell)
  • plasma-nano (not needed for the desktop shell)
  • plasma-remotecontrollers (not needed for the desktop shell)
  • plasma-sdk (developer apps for Plasma; not generally user-relevant)
  • plasma-tests (internal testing harness; not user-relevant)

Non-Plasma packages

These packages are add-ons, extensions, and system tools that are not released with Plasma itself, but make the overall Plasma session nicer to use. They should be pre-installed:

  • baloo-widgets (provides extra information for Dolphin's Information Panel when the Baloo file indexer is on)
  • dolphin-plugins (provides a variety of useful plugins for Dolphin, including ISO mounting)
  • ffmpegthumbs (provides video thumbnailing plugin)
  • kde-inotify-survey (warns when apps are using all inotify watches and prompts the user to raise it; this can help users understand why Baloo in particular isn't working properly, and offers them a way to fix it)
  • kdeconnect-kde (provides remote mobile phone control; also make sure to whitelist its system service in your firewall, if you ship one)
  • kdegraphics-thumbnailers (provides PDF thumbnailing plugin, among others)
  • kdenetwork-filesharing (provides the Samba file sharing setup wizard)
  • kdepim-addons (provides a variety of useful addons for the PIM suite; only needed if you pre-install the PIM suite!)
  • kimageformats (provides support for AVIF, JXL and other formats, letting Dolphin display previews and Gwenview open these files)
  • kio-admin (provides a safe way to edit files as root)
  • kio-extras (provides the thumbnailing engine and many thumbnailing plugins, among other things)
  • kio-fuse (provides transparent access to non-KDE apps for files on remote locations)
  • kio-gdrive (provides transparent KIO access to Google Drive)
  • phonon-vlc (this is the only maintained and supported Phonon backend for KDE apps that use Phonon for their multimedia needs; the alternative phonon-gstreamer has been unmaintained since 2013 and should not be shipped by default, or at all, ideally)
  • xwaylandvideobridge (exposes Wayland windows to XWayland-using screen sharing apps)

3rd-party packages

It is recommended to pre-install the following 3rd-party packages:

  • icoutils (needed for EXE file thumbnails)
  • iio-sensor-proxy (allows automatic screen rotation on Wayland)
  • libappindicator-gtk3 instead of the GTK2 variant for crisp status notifier systray icons. Note that this might break left click activation in the few apps that supported it in libappindicator, such as onboard.
  • noto-sans (provides the default font used for KDE software)
  • noto-color-emoji (provides color emojis)
  • maliit-keyboard (provides on-screen keyboard on Wayland)
  • power-profiles-daemon (enables the power profile functionality in Plasma. Make sure its systemd service is automatically started when the package is installed!)
  • switcheroo-control (provides proper hybrid/multi-GPU detection)
  • xdg-desktop-portal-gtk (syncs font settings to Flatpak apps when run in Plasma)
  • xsettingsd (GTK theme changes without restart; Flatpak GTK theming; and since 5.27, GTK/X11 HiDPI scaling)
  • orca (Screen reader for visually impaired users)
  • qt-imageformats (provides support for Webp and other formats, letting Dolphin display previews and Gwenview open these files)
  • systemd-coredumpd (Global crash handler for drkonqi. Alternative handlers such as ABRT or apport can be used instead of drkonqi+coredumpd)

Packages to avoid

There are certain packages that are known to cause issues with KDE software and should not be pre-installed. They are outlined below:

  • dunst (will take over Plasma notifications)
  • ibus 1.5.28 or earlier (while it can be useful for some users, it is confusing for most, as it ignores keyboard layout configuration from System Settings and displays an out-of-sync extra layout indicator. On X11, uninstalling IBus breaks keyboard input in apps until session restart. On Wayland, IBus only displays a notification about incompatibility with Plasma Wayland. These issues are resolved with IBus 1.5.29 and it is fine to use it with Plasma. Note that ibus-data, without the daemon, is used by Plasma's emoji input panel)
  • mako (will take over Plasma notifications)
  • qt5-qdbusviewer (clutters up launcher menus; safe to omit)
  • qt5ct (conflicts with plasma-integration and breaks the look and feel of Qt software when run on Plasma. Ideally this package would be marked in your packaging as conflicting with plasma-integration, so only one at a time can be installed!)
  • xdg-desktop-portal-gnome (conflicts with xdg-desktop-portal-kde and breaks various things)
  • xorg-x11-drv-wacom (breaks touch events on X11, not needed anyway because Libinput can handle tablets)

KWin package configuration

Make sure the kwin_wayland binary has CAP_SYS_NICE set; this is done by KWin's CMake code but may not be preserved in distro packages. This is necessary to make KWin more responsive by giving specific threads real time scheduling, and by allowing KWin to use a higher priority GPU context than other applications.

Kernel configuration

SimpleDRM should be enabled by default. To do this, all CONFIG_FB_* kernel build options for framebuffer drivers should be disabled in the Kernel config, and CONFIG_DRM_SIMPLEDRM=y and CONFIG_SYSFB_SIMPLEFB=y should be set.

Make sure to set up systemd-coredumpd correctly using a core_pattern handler https://man7.org/linux/man-pages/man5/core.5.html

Proprietary NVidia driver configuration

When your package manager installs the proprietary NVidia driver, do the following:

  • Set the nvidia_drm.modeset=1 kernel driver option, or else the Wayland session doesn't work.
  • Set the NVreg_PreserveVideoMemoryAllocations=1 kernel driver option to avoid issues with suspend and wakeup. IMPORTANT: also activate th the appropriate pre-suspend hooks, which are shipped with the NVidia installer as systemd unit files: nvidia-suspend.service, nvidia-hibernate.service, and nvidia-resume.service. NVidia doesn't set the kernel option by default because if those hooks are missing, it can break suspend, so be sure to verify that they're in place and afterwards test that suspend still works.

For more information, see https://wiki.archlinux.org/title/NVIDIA/Tips_and_tricks#Preserve_video_memory_after_suspend.

Systemd configuration

By default, stuck processes on logout are allowed to live to 120 seconds before being killed by systemd. This timeout is quite long, and in practice, 3-5 seconds is always long enough for processes to terminate normally; anything that takes longer is stuck and will need to be killed anyway, so you might as well do it sooner rather than later to avoid torturing users with long logout/shutdown/restart times.

So consider reducing the timeout to 5 seconds or less.

PulseAudio/PipeWire configuration

Enable the module-x11-bell module by default; this makes GTK apps run in a Plasma X11 session (i.e. without Mutter, which does this itself) play nice sounds instead of horrible jarring system bell beeps! This is not needed if you ship without the X11 session, as the issue it fixes only affects X11.


Samba sharing configuration

The aforementioned kdenetwork-filesharing package provides a wizard for setting up Samba shares. It's capable of fixing various omissions and misconfigurations, but it cannot edit the /etc/samba/smb.conf file, as such changes would be overwritten by package updates. So the /etc/samba/smb.conf file installed by your distro or its relevant Samba package should include the following lines in its [globals] section:

  usershare path = /var/lib/samba/sambashares
  usershare max shares = 100
  usershare allow guests = yes # optional line
  usershare owner only = yes

It's also helpful if the path specified at usershare path exists on disk, has a group owner named something like "sambashares", and if all user accounts are members of that group. But these are optional steps as kdenetwork-filesharing is capable of doing these things itself.


Firefox configuration

You can offer your users a better touchpad scrolling experience on X11 by setting the MOZ_USE_XINPUT2=1 environment variable in the environment. Note that this will introduce the bug described in https://gitlab.gnome.org/GNOME/gtk/-/issues/558, but it's fairly minor. On Wayland, this environment variable has no effect and is not needed.

Set widget.use-xdg-desktop-portal.file-picker=1 in about:config to make Firefox always use XDG portals for file pickers, which will make it use KDE's file picker instead of the GTK one.

Install the Plasma Integration addon, and turn off Firefox's built-in media controls (which conflict with the ones offered by PBI) by setting media.hardwaremediakeys.enabled to false in about:config.

Qt Virtual Keyboard

Don't compile with FEATURE_vkb_arrow_keynavigation=ON, a feature that is off by default. It interferes with the return key on X11 during SDDM and lock screen login when using the breeze theme. See comment on bugzilla.