KDE/Plasma 5 upgrade

From Gentoo Wiki
< KDE
Jump to: navigation, search

Plasma 5 is the current generation of KDE's desktop environment, based on Qt 5 and KDE Frameworks 5.

Preparations

Profile

It is highly recommended to use the Plasma desktop profile as it sets a number of important options to ensure things run smoothly.

In order to choose the most suitable profile, first list what's available:

root #eselect profile list
  [1]   default/linux/amd64/13.0
  [2]   default/linux/amd64/13.0/selinux
  [3]   default/linux/amd64/13.0/desktop
  [4]   default/linux/amd64/13.0/desktop/gnome
  [5]   default/linux/amd64/13.0/desktop/gnome/systemd
  [6]   default/linux/amd64/13.0/desktop/plasma
  [7]   default/linux/amd64/13.0/desktop/plasma/systemd
  ...

Then, select the right profile, substituting the appropriate profile number (which may vary between configurations):

root #eselect profile set 8

make.conf

The plasma profile now takes care of the right settings for a full-blown KDE Plasma/Applications installation. In the foreseeable future, this entails both Qt 4 as well as Qt 5 based packages. It also handles possible USE flag conflicts on a per-package basis. If there are any existing definitions of qt4, kde or plasma in /etc/portage/make.conf, make sure to remove them before proceeding, else conflicts may arise. Also, never set -minimal in /etc/portage/make.conf. In case of USE handbook, the recommendation is to either remove it as well, or disable it if the KDE documentation is not needed.

Check for these flags and if necessary alter the file using your favourite editor:

root #grep -e "qt[[:digit:]]" -e "handbook" -e "kde" -e "plasma" /etc/portage/make.conf
Note
Older setups might still use the deprecated /etc/make.conf instead.

You should now also revise your entries in /etc/portage/package.use:

root #grep -e "qt[[:digit:]]$" -e "qt[[:digit:]] " -e "handbook$" -e "handbook " -R /etc/portage/package.use
root #grep -e "kde$" -e "kde " -e "plasma$" -e "plasma " -R /etc/portage/package.use

Of course you can adjust these flags afterwards again.

Note
If you run into a new conflict related to those flags, please report that to the Gentoo KDE team.

Clean up @world

Now is a good time to clean up @world. If it contains packages either directly from or depending on KDE Workspaces 4, it will lead to emerge conflicts later on. The following command will probably take some time, but is not going to remove anything yet - examine the output.

root #for x in libkscreen kde-gtk-config ksshaskpass freespacenotifier kcheckpass kcminit kdebase-cursors kdebase-startkde kdm kephal khotkeys kinfocenter klipper kmenuedit krunner kscreensaver ksmserver ksplash kstartupconfig kstyles ksysguard ksystraycmd kwin kwrited libkgreeter libkworkspace liboxygenstyle libplasmaclock libplasmagenericshell libtaskmanager plasma-workspace powerdevil qguiplatformplugin_kde solid-actions-kcm systemsettings; do equery -q d ${x} | sed -e "s/-[0-9].*//"; done | sed -e "/kdebase-meta/g" -e "/kde-meta/g" | xargs emerge --deselect --pretend
Note
This requires app-portage/gentoolkit to be installed. See also: Gentoolkit

If you are sure to proceed, run the above command without --pretend again. Only the @world file is going to be changed - while the packages stay installed, they will not block a subsequent installation of Plasma 5.

Apply the changes

Any packages affected by the profile change need to be rebuilt:

root #emerge --ask --changed-use --newrepo --deep world

Installation

The kde-plasma/plasma-meta package provides the full Plasma 5 suite:

root #emerge --ask kde-plasma/plasma-meta

Alternatively, kde-plasma/plasma-desktop provides the basic desktop, leaving you free to install only the extra packages you require:

root #emerge --ask kde-plasma/plasma-desktop
Note
Please note that you will be missing important packages such as kde-plasma/powerdevil (power management, suspend and hibernate options) and kde-plasma/systemsettings if you go that way.

Display manager

Up to this point, KDM will have served as display manager on most KDE 4 systems. As development on it has stopped, SDDM (Simple Desktop Display Manager) is now the recommended login manager and already got installed via kde-plasma/plasma-meta. Alternatively, LightDM can be used and pulled in by setting USE flag -sddm for kde-plasma/plasma-meta. Change the setting accordingly in /etc/conf.d/xdm. Also, be sure to read through the SDDM page if further issues appear.

Applications

The previous steps have taken care of removing Plasma 4 and reverse dependencies from @world in order to be able to install Plasma 5. Consequentially, at this point there might be many dangling applications installed that would be removed by emerge --depclean. Check back with the list of applications that had been deselected in KDE/Plasma_5_upgrade#Clean_up_@world, there might be newer versions available, compatible with Plasma-5 (with or without adjusting USE flags). Also, installing KDE Applications will bring many of those dependencies back, so precious CPU time can be saved by promptly proceeding with KDE#Applications.

Migration

KWallet

KWallet 5 will have to open your wallet from KWallet 4 and import all the data into a new wallet. For that purpose, kde-apps/kwalletd needs to be present at least once in a session after upgrade, but is still required for any KDE4-based application that might be using it. Run kde-apps/kwalletmanager to check which applications have been accessing it in the past. If it is clear that no legacy package is using it anymore, it can be removed after migration.

root #echo "kde-apps/kdebase-runtime-meta -oldwallet" >> /etc/portage/package.use
root #emerge --ask --oneshot kde-apps/kdebase-runtime-meta && emerge -C kde-apps/kwalletd

If you haven't ever used KWallet in KDE4, you also installed alternative kde-plasma/plasma-desktop package (so, you do not have kcmshell5's kwalletconfig5 module to configure it) and do not want to see KWallet popups at all then you should add the following strings into ~/.config/kwalletrc to disable the KWallet subsystem:

FILE ~/.config/kwalletrc
[Wallet]
Enabled=false

Relogin, and all KWallet popups will disappear.

Note
It is currently (at least up to 5.7.5) not possible to use kwallet-pam extension. Migration of the old wallet fails if it is already active when you start you new Plasma 5 environment the first time. If you activate it afterwards, all kdelibs:4-based applications report a broken 'file' protocol e.g. Konqueror cannot open HTML pages from local file system and the FileOpen dialog reports an error message i.e. KMail cannot save or load attachments.

SSH/GPG Agent startup/shutdown scripts

Configuration moved from /etc/kde/{startup,shutdown} in KDE SC 4 to /etc/plasma/{startup,shutdown} for Plasma 5, you will need to edit the scripts there (or copy your scripts from the old location).

Troubleshooting

The most common issue with upgrading is running into blockers. Unfortunately, some packages just can't be co-installed so they'll need to be removed. Feel free to drop by #gentoo or #gentoo-kde for assistance with resolving any blockers.

Missing systray icons

Plasma 5 uses the StatusNotifier specification for systray icons [1]. As not all applications have been ported to the new system, some workarounds exist [2], and Plasma 5.5 has a means to convert old xembed-based system tray icons to StatusNotifier icons.

The workaround can be enabled by activating the legacy-systray and GUI-specific (gtk2, gtk3, qt4) USE flags for kde-plasma/plasma-desktop.

root #echo "kde-plasma/plasma-desktop legacy-systray gtk2 gtk3 qt4" >> /etc/portage/package.use

Alternatively, the required packages can be installed manually:

For Qt 4 applications:

root #emerge --ask dev-libs/sni-qt

For GTK+ 2 applications

root #emerge --ask dev-libs/libappindicator:2

For GTK+ 3 applications:

root #emerge --ask dev-libs/libappindicator:3

Pidgin

net-im/pidgin requires x11-plugins/pidgin-indicator. After install, find the Ubuntu Indicator plugin under Tools | Plugins.

Skype

net-im/skype is a 32-bit binary, you need to enable abi_x86_32 on dev-libs/sni-qt.

ck-list-sessions has wrong session information

Start plasma without exec or ck-launch-session. Using dbus-launch --sh-syntax --exit-with-session "/usr/bin/startkde" was what I ended up using.

Missing shutdown/reboot/suspend/hibernate buttons (using OpenRC)

Please ensure that kde-plasma/powerdevil and sys-power/upower-pm-utils or sys-power/upower are installed. Also ensure that the user is in the users group.

If x11-misc/sddm is used, make sure it is version 0.12.0-r1 or later. Please run the following command and make sure it matches the output including nox11:

user $grep pam_ck_connector /etc/pam.d/system-login
session         optional        pam_ck_connector.so nox11

Another option is to create the following polkit rule for suspend[3]:

FILE /etc/polkit-1/rules.d/10-suspend.rules
polkit.addRule(function(action, subject) {
    if (action.id == "org.freedesktop.upower.suspend") {
        return polkit.Result.YES;
    }
});

Also ensure dbus is added to the default runlevel so that it is started before logging in with sddm:

root #rc-update add dbus default

If all else fails, try x11-misc/lightdm instead.

SDDM display issues

Check that your user (and sddm user) are in the video and audio groups.

If VT7 starts but stays black, make sure your ~/.bash_profile does not have any interactive components like keychain. Check ~/.xsession-errors for the prompt for input.

SDDM does not yet support multi seat - lightdm does.

SDDM: KCM unable to change themes

SDDM needs a configuration file so that the KCM module can change themes. This file is not created during the SDDM installation, so it needs to be created manually afterwards:

root #sddm --example-config > /etc/sddm.conf

Missing application menus (users of x11-misc/appmenu-qt)

If previously x11-misc/appmenu-qt was installed, application menus (file, edit, view, help, etc) in kdelibs4-based packages might be missing. There is no way to fix this via a GUI, kde rc files will need to be edited to restore the application menu in Plasma 5. Find out which files were modified using the following command:

user $grep -iR menubar ~/.kde4

Change any lines containing MenuBar=Disabled to MenuBar=true, and the next time related applications are started, the menus should re-appear. Make sure all instances of MenuBar in the rc files are changed - some have more than one, like kmail2.

x11-misc/appmenu-qt is not ready for prime time yet. It was tried with an initial ebuild and even with access violations, it does not work (despite it being available on some other distros).

Screen Tearing/Flicker when using Radeon graphics drivers

If you experience severe flickering or "tearing", when using Radeon based graphics cards, it may be necessary to change the Compositor sync settings found in:

System Settings --> Display Monitor --> Compositor --> VSync

to something other than the default "Automatic".

Delayed response of K Menu, krunner etc. after upgrade to Qt 5.6

Remove gles2 USE flag and rebuild affected packages, most importantly in dev-qt/*, kde-frameworks/plasma and kde-plasma/kwin.

Missing users

If the login screen does not given you any user to login with, this might be due to /etc/sddm.conf --> MinimumUid is set to 1000 and your users have lower Uids. SDDM does not seem to have an option to type a user id.

References

  1. http://blog.martin-graesslin.com/blog/2014/03/system-tray-in-plasma-next/
  2. http://blog.martin-graesslin.com/blog/2014/06/where-are-my-systray-icons/
  3. https://bugs.kde.org/show_bug.cgi?id=344456#c38