KDE/Plasma 5 upgrade

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

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:

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

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,   or   in , make sure to remove them before proceeding, else conflicts may arise. Also, never set  in. In case of USE, 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:

You should now also revise your entries in :

Of course you can adjust these flags afterwards again.

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.

If you are sure to proceed, run the above command without  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:

Installation
The package provides the full Plasma 5 suite:

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

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. Alternatively, LightDM can be used and pulled in by setting USE flag  for. Change the setting accordingly in. 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  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. Check back with the list of applications that had been deselected in KDE/Plasma_5_upgrade, 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.

SSH/GPG Agent startup/shutdown scripts
Configuration moved from in KDE SC 4 to  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.

ck-list-sessions has wrong session information
Start plasma without or. Using was what I ended up using.

Missing shutdown/reboot/suspend/hibernate buttons (using OpenRC)
Please ensure that and  or  are installed. Also ensure that the user is in the group.

If 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 :

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

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

If all else fails, try instead.

Missing application menus (users of x11-misc/appmenu-qt)
If previously 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:

Change any lines containing  to , 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.

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

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.