KDE/Plasma 5 upgrade

Plasma 5 is the next generation of KDE's desktop environment, based on Qt 5 and KDE Frameworks 5. Upgrading is fairly simple, although it cannot be coinstalled with Plasma 4 due to upstream design decisions.

Note that while Plasma 5 is in a good state, it is still under heavy upstream development and is missing some features present in KDE 4.

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. 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 it 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:

Overlay (optional)
Be warned that you are entering development grounds. The KDE Overlay provides a means to access more recent versions of KDE Plasma, Applications and Frameworks and can be accessed using layman:

Unmasking and keywording for stable users
For stable users, it also provides package.keywords lists to unmask not-yet-stabilised versions. Please note that this can often require unmasking additional dependencies that are out of scope of these lists.

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 are many dangling applications installed that would be removed by. However, installing KDE Applications will bring many of those dependencies back, so precious CPU time can be saved by promptly proceeding with KDE.

KWallet
KWallet 5 will have to open your wallet from KWallet 4 and import all the data into a new wallet. For that purpose, 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 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.

SSH/GPG Agent startup/shutdown scripts
Configuration moved to for Plasma 5, you will need to 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. As not all applications have been ported to the new system, some workarounds exist, 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  and GUI-specific  USE flags for.

Alternatively, the required packages can be installed manually:

For Qt 4 applications:

For GTK+ 2 applications

For GTK+ 3 applications:

Pidgin
requires. After install, find the Ubuntu Indicator plugin under Tools | Plugins.

Skype
is a 32-bit binary, you need to enable  on.

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

Missing shutdown, reboot, suspend and hibernate buttons when using OpenRC
Please ensure that and  or  are installed. Also ensure that your user belongs to the group.

If you use, 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:

If all else fails, try instead.

SDDM display issues
Check that your user (and user) are in the  group.

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:

appmenu-qt
appmenu-qt5 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 :( If you had appmenu-qt installed, you may be missing your application menus (file, edit, view, help, etc). There is no way to restore this via a GUI. You have to edit kde rc files to restore your application menu in plasma 5. At least till appmenu-qt5 is ready and works.

Then edit/change any files containing  to. Then next time you start any of the related applications the rc files belong to, your menus should re-appear. Make sure you edit/change all instances of MenuBar in the rc files. Some have more than one like kmail2/kmmainwin.rc.