Issue with System Tray and Audio Volume Widget probably because kded6 keeps crashing

tldr; kded6 keeps crashing with ASSERT: "!modes.isEmpty()" in file ./kded/generator.cpp, line 485

A few days ago I noticed that I no longer could change the volume using the media keys on my keyboard or by scrolling over the speaker icon of the Audio Volume widget in the System Tray. Furthermore the System Tray was missing the app icons (like Discover, Steam or Spotify).

Interestingly when I scroll over the Audio Volume widget icon, the missing app icons appear and vanish after a second or two.

scroll behavior demo

I found this seemingly related topic Applications icon missing in system tray and began following the outlined steps:

  1. delete ~/.cache
  2. check if Status Notifier Manager is checked in Background Services

Background Services greeted me with the message:

The background services manager (kded6) is currently not running. Make sure it is installed correctly.

kded6 was not installed and so I installed it and did a reboot.*

  • I don’t know if kf6-kded was installed but I would assume it was. I don’t know why kded6 was not installed. Maybe I apt autoremoved it. Maybe the package is not really needed.

When I logged back in I was greeted by the app icons that vanish after a few seconds.

I checked the logs with KSystemLog and filtered for kded:

19.08.24 22:56	dbus-daemon	[session uid=1000 pid=1586] Activating service name='org.kde.kded6' requested by ':1.30' (uid=1000 pid=1792 comm="/usr/bin/plasmashell --no-respawn " label="unconfined")
19.08.24 22:56	dbus-daemon	[session uid=1000 pid=1586] Successfully activated service 'org.kde.kded6'
19.08.24 22:56	kded6	QDBusObjectPath: invalid path "/modules/kded_plasma-welcome"
19.08.24 22:56	kded6	kf.dbusaddons: The kded module name "kded_plasma-welcome" is invalid!
19.08.24 22:56	kded6	QDBusObjectPath: invalid path "/modules/plasma-session-shortcuts"
19.08.24 22:56	kded6	kf.dbusaddons: The kded module name "plasma-session-shortcuts" is invalid!
19.08.24 22:56	kded6	org.kde.kameleon: found no RGB LED devices
19.08.24 22:56	kded6	kf.coreaddons: The plugin "/usr/lib/x86_64-linux-gnu/qt6/plugins/kaccounts/daemonplugins/gdrive.so" explicitly states an Id in the embedded metadata, which is different from the one derived from the filename The Id field from the KPlugin object in the metadata should be removed
19.08.24 22:56	kded6	kcm_touchpad: Using X11 backend
19.08.24 22:56	kded6	org.kde.colorcorrectlocationupdater: Geolocator stopped
19.08.24 22:56	kded6	Known activities: QList("24239ec2-c3f2-4f66-bdae-2b472e8e59a9")
19.08.24 22:56	kded6	
19.08.24 22:56	kded6	org.kde.plasma.dataengine.geolocation: gpsd not found
19.08.24 22:56	kded6	"location"
19.08.24 22:56	kded6	org.kde.colorcorrectlocationupdater: Geolocator started
19.08.24 22:56	org.kde.kded6	xsettingsd: Reloading configuration
19.08.24 22:56	org.kde.kded6	xsettingsd: Loaded 14 settings from /home/usr/.config/xsettingsd/xsettingsd.conf
19.08.24 22:56	dbus-daemon	[system] Activating service name='org.kde.kded.smart' requested by ':1.429' (uid=1000 pid=34828 comm="/usr/bin/kded6 " label="unconfined") (using servicehelper)
19.08.24 22:56	org.kde.kded.smart	Detected locale "C" with character encoding "ANSI_X3.4-1968", which is not UTF-8.
Qt depends on a UTF-8 locale, and has switched to "C.UTF-8" instead.
If this causes problems, reconfigure your locale. See the locale(1) manual
for more information.
19.08.24 22:56	dbus-daemon	[system] Successfully activated service 'org.kde.kded.smart'
19.08.24 22:56	kded6	Registering ":1.137/org/ayatana/NotificationItem/steam" to system tray
19.08.24 22:56	kded6	Registering ":1.90/StatusNotifierItem" to system tray
19.08.24 22:56	kded6	org.kde.pulseaudio: No object for name "alsa_output.pci-0000_41_00.4.analog-stereo.monitor"
19.08.24 22:56	kded6	ASSERT: "!modes.isEmpty()" in file ./kded/generator.cpp, line 485
19.08.24 22:56	org.kde.kded6	KCrash: appFilePath points to nullptr!
19.08.24 22:56	org.kde.kded6	KCrash: Application '<unknown>' crashing... crashRecursionCounter = 2
19.08.24 22:56	systemd-coredump	Process 34828 (kded6) of user 1000 dumped core.

# dump removed because it was too long

19.08.24 22:56	drkonqi-coredump-processor	"/usr/bin/kded6" 34828 "/var/lib/systemd/coredump/core.kded6.1000.f564ee32d9f146ba919bcb39057aa390.34828.1724101004000000.zst"
19.08.24 22:56	drkonqi-coredump-launcher	Unable to find file for pid 34828 expected at "kcrash-metadata/kded6.f564ee32d9f146ba919bcb39057aa390.34828.ini"

After that kded6 gets restarted and crashes again with the same message.

19.08.24 23:06	kded6	ASSERT: "!modes.isEmpty()" in file ./kded/generator.cpp, line 485

The same happens everytime I scroll over the Audio Volume widget icon.

I’m stuck and don’t know where to go from here. Any help is appreciated!

Operating System: KDE neon 6.1
KDE Plasma Version: 6.1.4
Kernel Version: 6.8.0-40-generic (x86_64)
Graphics Platform: x11
Processors: AMD Ryzen 9 5900X 12-Core Processor
Graphics Processor: NVIDIA GeForce RTX 3080 Ti/PCIe/SSE2

Am I in the wrong category or forum for my problem? Is this considered a bug?

The problem persists. Help is still very much appreciated.

Any crash is a bug, a program not behaving as expected.

This isn’t a bug tracker here perse but we can discuss :slight_smile:

It seems kscreen is confronted with a screen that has no mode (that is resolution + frequency), that should be an invalid screen and state.

I would be curious to know what kscreen-doctor -o command returns.

So you might resolve the situation by trying in order: removing ~/.local/share/kscreen (you will need to reconfigure your screens afterwards), by logout back in, or turn off kscreen daemon.

Those lines seem to indicate you have different versions of frameworkd/plasma installed, make sure to have everything up to date with sudo pkcon refresh && sudo pkcon update as neon recommends, might want to reboot afterwards.
Make sure you have plasma-desktop package installed, it will make sure plasma has its required dependencies to run. kded6 is an essential part of it, the fact it wasn’t found reveals there is an error somewhere on your installation.

Thanks for your replies! I’ll reply to your second reply separately.

Any crash is a bug, a program not behaving as expected.

This isn’t a bug tracker here perse but we can discuss :slight_smile:

Does that mean I should have reported this directly at bugs.kde.org?

Back to the topic; I ran kscreen-doctor -o before removing ~/.local/share/kscreen and after a logout. The outputs are the same and the issue persists.

Might Output: 514 None-1-1 be the culprit here?

Output: 444 HDMI-0
        disabled
        disconnected
        priority 0
        HDMI
        Modes: 
        Geometry: 0,0 0x0
        Scale: 1
        Rotation: 1
        Overscan: 0
        Vrr: incapable
        RgbRange: unknown
        HDR: incapable
        Wide Color Gamut: incapable
        ICC profile: incapable
        Color profile source: incapable
Output: 445 DP-0
        disabled
        disconnected
        priority 0
        DisplayPort
        Modes: 
        Geometry: 0,0 0x0
        Scale: 1
        Rotation: 1
        Overscan: 0
        Vrr: incapable
        RgbRange: unknown
        HDR: incapable
        Wide Color Gamut: incapable
        ICC profile: incapable
        Color profile source: incapable
Output: 446 DP-1
        disabled
        disconnected
        priority 0
        DisplayPort
        Modes: 
        Geometry: 0,0 0x0
        Scale: 1
        Rotation: 1
        Overscan: 0
        Vrr: incapable
        RgbRange: unknown
        HDR: incapable
        Wide Color Gamut: incapable
        ICC profile: incapable
        Color profile source: incapable
Output: 447 DP-2
        disabled
        disconnected
        priority 0
        DisplayPort
        Modes: 
        Geometry: 0,0 0x0
        Scale: 1
        Rotation: 1
        Overscan: 0
        Vrr: incapable
        RgbRange: unknown
        HDR: incapable
        Wide Color Gamut: incapable
        ICC profile: incapable
        Color profile source: incapable
Output: 448 DP-3
        disabled
        disconnected
        priority 0
        DisplayPort
        Modes: 
        Geometry: 0,0 0x0
        Scale: 1
        Rotation: 1
        Overscan: 0
        Vrr: incapable
        RgbRange: unknown
        HDR: incapable
        Wide Color Gamut: incapable
        ICC profile: incapable
        Color profile source: incapable
Output: 449 DP-4
        enabled
        connected
        priority 1
        DisplayPort
        Modes:  450:3840x1080@144*!  451:3840x1080@120  452:3840x1080@100  453:3840x1080@60  454:2560x1080@60  455:1920x1080@120  456:1920x1080@100  457:1920x1080@60  458:1920x1080@60  459:1920x1080@50  460:1680x1050@60  461:1600x900@60  462:1440x900@60  463:1280x1024@75  464:1280x1024@60  465:1280x800@60  466:1280x720@60  467:1280x720@60  468:1280x720@50  469:1152x864@75  470:1024x768@75  471:1024x768@70  472:1024x768@60  473:800x600@75  474:800x600@72  475:800x600@60  476:800x600@56  477:720x576@50  478:720x480@60  479:640x480@75  480:640x480@73  481:640x480@60 
        Geometry: 0,0 3840x1080
        Scale: 1
        Rotation: 1
        Overscan: 0
        Vrr: incapable
        RgbRange: unknown
        HDR: incapable
        Wide Color Gamut: incapable
        ICC profile: incapable
        Color profile source: incapable
Output: 482 DP-5
        disabled
        disconnected
        priority 0
        DisplayPort
        Modes: 
        Geometry: 0,0 0x0
        Scale: 1
        Rotation: 1
        Overscan: 0
        Vrr: incapable
        RgbRange: unknown
        HDR: incapable
        Wide Color Gamut: incapable
        ICC profile: incapable
        Color profile source: incapable
Output: 514 None-1-1
        disabled
        connected
        priority 0
        Unknown
        Modes: 
        Geometry: 0,0 0x0
        Scale: 1
        Rotation: 1
        Overscan: 0
        Vrr: incapable
        RgbRange: unknown
        HDR: incapable
        Wide Color Gamut: incapable
        ICC profile: incapable
        Color profile source: incapable

I ran sudo pkcon refresh && sudo pkcon update, confirmed the following changes and did a reboot but the issue persists.

The following packages have to be installed:
 linux-headers-5.15.0-119-5.15.0-119.129.all    Header files related to Linux kernel version 5.15.0
 linux-headers-5.15.0-119-generic-5.15.0-119.129.amd64  Linux kernel headers for version 5.15.0 on 64 bit x86 SMP
 linux-image-5.15.0-119-generic-5.15.0-119.129.amd64    Signed kernel image generic
 linux-modules-5.15.0-119-generic-5.15.0-119.129.amd64  Linux kernel extra modules for version 5.15.0 on 64 bit x86 SMP
 linux-modules-extra-5.15.0-119-generic-5.15.0-119.129.amd64    Linux kernel extra modules for version 5.15.0 on 64 bit x86 SMP
 python3-proton-vpn-local-agent-0.10.0.amd64    Local Agent Python Module
The following packages have to be updated:
 comerr-dev-2.1-1.46.5-2ubuntu1.2.amd64 common error description library - headers and static libraries
 e2fsprogs-1.46.5-2ubuntu1.2.amd64      ext2/ext3/ext4 file system utilities
 exfatprogs-1.1.3-1ubuntu0.1.amd64      tools to create, check and label exFAT filesystems
 intel-microcode-3.20240813.0ubuntu0.22.04.2.amd64      Processor microcode firmware for Intel CPUs
 libcom-err2-1.46.5-2ubuntu1.2.amd64    common error description library
 libcom-err2-1.46.5-2ubuntu1.2.i386     common error description library
 libext2fs2-1.46.5-2ubuntu1.2.amd64     ext2/ext3/ext4 file system libraries
 libpq-dev-14.13-0ubuntu0.22.04.1.amd64 header files for libpq5 (PostgreSQL library)
 libpq5-14.13-0ubuntu0.22.04.1.amd64    PostgreSQL C client library
 libpython3-dev-3.10.6-1~22.04.1.amd64  header files and a static library for Python (default)
 libpython3-stdlib-3.10.6-1~22.04.1.amd64       interactive high-level object-oriented language (default python3 version)
 librewolf-129.0.1-1.all        The Librewolf Browser
 libss2-1.46.5-2ubuntu1.2.amd64 command-line interface parsing library
 linux-generic-5.15.0.119.119.amd64     Complete Generic Linux kernel and headers
 linux-headers-generic-5.15.0.119.119.amd64     Generic Linux kernel headers
 linux-image-generic-5.15.0.119.119.amd64       Generic Linux kernel image
 linux-libc-dev-5.15.0-119.129.amd64    Linux Kernel Headers for development
 linux-tools-common-5.15.0-119.129.all  Linux kernel version specific tools for version 5.15.0
 logsave-1.46.5-2ubuntu1.2.amd64        save the output of a command in a log file
 python3-3.10.6-1~22.04.1.amd64 interactive high-level object-oriented language (default python3 version)
 python3-dev-3.10.6-1~22.04.1.amd64     header files and a static library for Python (default)
 python3-minimal-3.10.6-1~22.04.1.amd64 minimal subset of the Python language (default python3 version)
 swtpm-0.6.3-0ubuntu3.3.amd64   Libtpms-based TPM emulator
 swtpm-tools-0.6.3-0ubuntu3.3.amd64     Tools for the TPM emulator

I checked and plasma-desktop is installed.

different versions of frameworkd/plasma installed

For some reason kded5 and some libkf5 prefixed packages are installed. Is that bad?

No, that for Qt5 apps you might still have.

Does that mean I should have reported this directly at bugs.kde.org?

I’d have a couple more questions/ideas, then I would recommend you to report the bug (with the command output you got and your software/hardware info).

Could you post the result of the command drm_info. You might need to install the said commandline tool. This will allow us to know if it is a bug in kscreen/KWin or lower the stack.

Might be a Nvidia driver issue, reporting bad data, if you can try installing the latest 560 one, they fixed a couple of bugs affecting KDE Plasma. Might not be easy on Neon/Ubuntu LTS.

The issue could be simply fixed to skip erroneous screen but there is still something wrong somewhere that could bite us later if left unfixed.

No, that for Qt5 apps you might still have.

Would you know of a way of finding them? For example, is there a Qt5 library or package that all apps depend on?

I would recommend you to report the bug

Just tell me what info is needed I’ll gladly do it.

Alright, so here’s the output of drm_info: drm_info output

I’m hesitant playing around with nvidia drivers. The latest version that I can get with ubuntu-drivers is 545. I’ll try that… maybe it helps without breaking…

ubuntu-drivers install nvidia:545 got an error at the end:

Error! Bad return status for module build on kernel: 6.8.0-40-generic (x86_64)
Consult /var/lib/dkms/nvidia/545.29.06/build/make.log for more information.
dpkg: error processing package nvidia-dkms-545 (--configure):
 installed nvidia-dkms-545 package post-installation script subprocess returned error exit status 10
dpkg: dependency problems prevent configuration of nvidia-driver-545:
 nvidia-driver-545 depends on nvidia-dkms-545 (<= 545.29.06-1); however:
  Package nvidia-dkms-545 is not configured yet.
 nvidia-driver-545 depends on nvidia-dkms-545 (>= 545.29.06); however:
  Package nvidia-dkms-545 is not configured yet.

dpkg: error processing package nvidia-driver-545 (--configure):
 dependency problems - leaving unconfigured
Processing triggers for libc-bin (2.35-0ubuntu3.8) ...
Processing triggers for man-db (2.10.2-1) ...
Processing triggers for initramfs-tools (0.140ubuntu13.4) ...
update-initramfs: Generating /boot/initrd.img-6.8.0-40-generic
I: The initramfs will attempt to resume from /dev/nvme0n1p3
I: (UUID=e62eecd3-8a20-4aba-8451-60a65b0d82a8)
I: Set the RESUME variable to override this.
Errors were encountered while processing:
 nvidia-dkms-545
 nvidia-driver-545
E: Sub-process /usr/bin/dpkg returned an error code (1)

So, after that I logged out and back in (because, why not) and things looked off (like a semi transparent Application Launcher widget) BUT the System Tray showed the apps and scrolling on the Audio Volume widget worked too. However, after a reboot I couldn’t get a GUI so I went back to 535 and everything is exactly like before.

Well thanks to the assert, we know we hit kded/generator.cpp · master · Plasma / KScreen · GitLab

The question then is how is it possible then.

This may be a driver issue. Latest Nvidia driver did fix some issue with Plasma.
Still we might be able to skip trying to use such screens with no modes.

It’d be great to report a bug report to https://bugs.kde.org for kwin.

You need to add the ubuntu driver repo (sudo add-apt-repository ppa:graphics-drivers/ppa) to get newer drivers like 550, and 555. From my testing 545 is broken, and 535 is buggy. Just like windows, you should never install a driver package over an existing one; you need to purge them first. Here is how:

  1. Switch to nouveau
  2. reboot
  3. purge existing drivers (sudo apt purge nvidia*)
  4. run apt clean and apt autoremove to clean caches and unused headers
  5. reboot again
  6. install newer driver

The easiest way to switch to nouveau and install the newer driver is to use software-proerties-qt, the GUI from Kubuntu. It is in the apt repo.

If nouveau does not work for you, then I suggest that you have more problems than just the proprietary driver, as it should always work.

If the Software Properties GUI gives you grief, (like greyed out boxes which means your install is broken and its seeing modules it did not install even after the purge - likely because the module was running during a bad install) then you can manually install the driver meta package again with

sudo apt install nvidia-driver-xxx

If the kernel complains about a module, then make sure you are installing the one the kernel is complaining about, and then do the whole upgrade purge process again.

At this point, the gui should become unbroken.

I have found lately that installing a new Nvidia driver (not just update) may require a couple of reboots before the autoconfig figures things out. If it looks like it is logging into the desktop, but then sits with a black screen and cursor, then reboot and try logging in again. This happens almost every time with me, but a reboot or two solves it and the problem goes away until the next driver install.

These steps work for me even when the machine is completely bricked and I have to go into the recovery console or whatever its called.