KDE/Troubleshooting

From Gentoo Wiki
< KDE
Jump to:navigation Jump to:search

This article contains various sections to help users of KDE software troubleshoot their systems.

Rebuilding the application database

If the KMenu lacks any application or the whole application list, the KDE application database probably needs to be rebuilt. This is also a possible fix for any KMenu related issues, like missing icons.

user $kbuildsycoca6 --noincremental

Akonadi complains about the MySQL config

Start by checking the permissions in /usr/share/config. If they're 700, update them to 755 recursively.

root #chmod -R 755 /usr/share/config

If that doesn't solve the error, open the akonadi configuration in ~/.config/akonadi/akonadiserverrc and change the default MySQL config. To use a MySQL server and not the local mysqld executable, make sure that MySQL is running.

Black screen after login

Make sure ~/.bash_profile does not have any interactive components like keychain. Check ~/.xsession-errors for the prompt for input.

Screen tearing or flickering when using Radeon graphics drivers

If there is severe flickering or "tearing" when using Radeon based graphics cards, it may be necessary to change the compositor sync settings to something other than the default "Automatic":

CODE Modifying compositor sync settings
System Settings --> Display Monitor --> Compositor --> VSync

Delayed response of KMenu, krunner, etc.

Packages from the dev-qt category provide a gles2-only USE flag which in the past has caused this effect. It is not advised to enable it. If for no good reason this flag is found to be enabled for dev-qt, kde-frameworks/plasma or kde-plasma/kwin , then remove all occurrences of this flag and rebuild affected packages.

Missing shutdown, reboot, suspend, or hibernate buttons

Note
Missing features like these are often symptoms of not using kde-plasma/plasma-meta . It only provides the desktop and is highly configurable with USE flags. Use it.

Make sure that kde-plasma/powerdevil and sys-power/upower are installed. Also check that the user is in the users group.

KDE Plasma high CPU usage

If you are noticing relatively high CPU usage (normally the dbus-daemon or kwin_x11 processes) when running KDE Plasma make sure to check the syslog for errors that look like the following. Normally just tailing the log will enable you to see this right away since the error is thrown at such a high rate.

FILE /var/log/syslog
...
Oct1700:30:26localhostobexd[32399]:obex_server_initfailed
Oct1700:30:26localhostobexd[32401]:OBEXdaemon5.39
Oct1700:30:26localhostobexd[32401]:obex_server_initfailed
Oct1700:30:26localhostobexd[32403]:OBEXdaemon5.39


This occurs due to being unable to connect to the bluetooth service, you can ensure this is started by running /etc/init.d/bluetooth start on OpenRC systems. To ensure this does not happen on any other start run the following.

root #rc-update add bluetooth

Alternatively bluetooth can be disabled via the GUI.

CODE Modifying Bluetooth settings
System Settings --> Bluetooth --> Advanced Settings --> Enable Bluetooth integration

Compilation failure

dev-qt/qtwebkit is one of the few packages known to consistently fail when the -j value on MAKEOPTS is set too high.

If you see mysterious build failure, try lowering your -j value. The safe value would be the number of processor times thread (not that plus one).

Similar case has been found when compiling with -j option while KDE Plasma is running (observed with dev-qt/qtwebkit and dev-qt/qtwebengine ). The build failure would be accompanied with desktop program lagging (or crashing). If this happen, you might want to consider compiling under TTY.

In other case when you see out-of-memory failure, you may want to get rid of pipe on CFLAGS.

Plasma Browser Integration not working in Firefox

For the Plasma Browser Integration to work, not only must kde-plasma/plasma-browser-integration and the browser extension be installed, but also the browser history has to be enabled.

Device permissions issues and missing shutdown/reboot options

When experiencing authorization or permissions issues in an OpenRC profile make sure that sys-auth/elogind is present, properly configured and elogind USE flag is globally enabled.

Missing suspend or hibernate options

Beyond that, suspend and hibernate options depend on that support being enabled in the kernel, see also: Suspend and hibernate.

Can't unmount /home

If an error like this appears:

* Unmounting /home ...
* in use but fuser finds nothing [ !! ]

Reinstalling kde-plasma/plasma-meta without kde-plasma/plasma-vault may help.

FILE /etc/portage/package.use
kde-plasma/plasma-meta -crypt

Pinentry GPG dialogue for KDE Plasma isn't working

For example when using KMail to sign emails with PGP, the private key needs to be decrypted. If this key has a password, a Pinentry dialogue tries to open. To enable the Qt version, these configuration files need to be edited.

FILE ~/.gnupg/gpg.conf
use-agent
# !! Remove this line from file if it exists:
# pinentry-mode loopback
FILE ~/.gnupg/gpg-agent.conf
pinentry-program/usr/bin/pinentry-qt

zkde_screencast_unstable_v1 does not seem to be available when trying to screencast on Wayland

Make sure to install kde-plasma/kwin with the screencast USE flag.

Wrong theme applied to KDE apps outside Plasma

If kde-plasma/plasma-meta is installed, the environment variable QT_QPA_PLATFORMTHEME should be set to kde. If it is not, gui-apps/qt6ct should be installed and QT_QPA_PLATFORMTHEME set to qt6ct.

Blurry fonts on Plasma 6.x with Wayland and Nvidia

Many users are reporting blurry fonts with Plasma 6.x in Wayland with Nvidia drivers. The issue has more implications regarding how Plasma KDE is rendering fonts via the graphical acceleration, and certain other conditions. For example nouveau users do not report this issue. The solution for blurry fonts with Wayland and nvidia drivers are editing /etc/environment or any other *profile, and add the line:

FREETYPE_PROPERTIES="cff:no-stem-darkening=0 autofitter:no-stem-darkening=0"
Warning
This is a functional workaround, it's not the right solution on the long term. KDE Plasma should be able to fix this solution in time, as long as more and more users report it!

Plasma: Cursor "works", but black screen

One cause could be that KWin is installed, but other Plasma packages forming the desktop, wallpaper, etc. are not. This can occur if the KDE global USE flag is set in make.conf, but one is not using a KDE desktop profile and has mistakenly not yet emerged plasma-meta, in which case KWin can be installed standalone and will seemingly log in without error leading to a black screen with a cursor.

By pressing Alt + F2 from the black screen, one should be able to access KRunner and launch a working terminal emulator if one is emerged, even with minimal KDE packages installed. Then further diagnosis can be done.

Start by confirming Plasma is emerged:

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

If using OpenRC, also confirm that elogind is emerged and set to runlevel boot:

root #emerge --ask --noreplace elogind
root #rc-update add elogind boot

If there are still issues, check if BASH is the default shell for the current user encountering this issue. Remove from the file ~/.bashrc the following lines if found:

exec fish
exec zsh

If not caused by the above system configuration issues, the remaining culprit is probably xwayland segfaulting related to NVIDIA hardware and Plasma Wayland. It is recommended to confirm that the xwayland package is built with sane CFLAGS. Possible culprits (until someone make a regression and report it to https://bugs.gentoo.org ) : -fdevirtualize-at-ltrans -fno-semantic-interposition -fipa-pta.

Running this command from a terminal emulator may provide a fix for the issue:

user $kstart5 plasmashell

Plasma Wayland AMDGPU: Fullscreen 3D gameplay under Proton freezes unless a window or panel overlaps the screen

This behaviour can be caused by direct scanout. If the game works in a window, or with another window layered over the top. Adding KWIN_DRM_NO_DIRECT_SCANOUT=1 to the environment before the Plasma session starts may resolve this issue.

This can be done in the /etc/environment file.

FILE /etc/environment
KWIN_DRM_NO_DIRECT_SCANOUT=1

Glitchy/unresponsive TTY2 after emerging Plasma

If using NVIDIA graphics and no display manager (observed on Optimus configuration with NVIDIA RTX 3060 Laptop/Intel 12th gen), it is possible after emerging Plasma that TTY2 will become unresponsive (dropping key presses, freezing, showing loading screens over the tty, etc.). This is most likely caused by Plymouth incompatibility with NVIDIA proprietary drivers; if Plymouth is pulled in as a dependency, it takes over display during boot on TTY2 without any further configuration from the user simply by being emerged.

To fix, first disable the Plymouth USE flag on plasma-meta:

FILE /etc/portage/package.use/plasma
kde-plasma/plasma-meta -plymouth

Alternatively, one can apply the -plymouth USE flag globally through make.conf:

FILE /etc/portage/make.conf
USE="-plymouth"

Also ensure that Plymouth is not selected in the world set:

root #emerge --ask --deselect sys-boot/plymouth

To be safe, one can add Plymouth to package.mask to avoid accidental future installs. This will give an error when trying to emerge packages if sys-boot/plymouth would be pulled in:

FILE /etc/portage/package.mask/plymouth
sys-boot/plymouth

Then, do a full system update to prepare for a depclean:

root #emerge --ask --verbose --update --deep --newuse @world

If sys-boot/plymouth was added to package.mask and emerge complains about sys-boot/plymouth being masked, one will have to find what other installed programs depend on Plymouth and modify their corresponding USE flags, then reattempt an update until it succeeds.

Then, depclean to remove sys-boot/plymouth.

root #emerge --ask --depclean

Once Plymouth is uninstalled and the new USE flags are applied, reboot the system and TTY2 should work again.

Plasmashell crashed with "Too many open files" error

On Wayland systems with nvidia-drivers plasmashell keeps periodically crashing with "Too many open files" error. lsof indicates growing open file descriptors for plasmashell on hovering cursor on widgets:

user $lsof -p $(pidof plasmashell) | grep sync_file | wc -l
1012

There issue with NVIDIA's drivers and gui-libs/egl-wayland . Update x11-drivers/nvidia-drivers to >=590.48.01 which uses new gui-libs/egl-wayland2 where issue is fixed[1] .

See also

References