Created attachment 268274 [details] Test program While debugging a bug in KDE Plasma I managed to come up with a minified example that looks strange to me. The test program creates a timer fd and arms it so that it ticks once per minute. However, right after start the program is busy-looping in the poll loop, because reads from timer fd keep returning nonsensical values. After a while the problem goes away and the poll loop starts ticking once per minute. Running the same program on Linux gives the garbage value only on first read, so no busy-looping there. The test program is attached to the bug.
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=a9f8378e37f45046ee91f0f9ad660d8fb2b77663 commit a9f8378e37f45046ee91f0f9ad660d8fb2b77663 Author: Max Brazhnikov <makc@FreeBSD.org> AuthorDate: 2026-03-05 12:15:04 +0000 Commit: Max Brazhnikov <makc@FreeBSD.org> CommitDate: 2026-03-05 12:15:04 +0000 KDE: Update KDE Plasma to 6.6.0 Announcement: https://kde.org/announcements/plasma/6/6.6.0/ The Digital Clock applet now uses timerfd(2) which may cause high CPU usage on FreeBSD due to bug [1]. As a workaround tweak Clock settings to not show seconds. Ports changes: graphics/plasma6-spectacle: - Require KQuickImageEditor security/plasma6-ksshaskpass: - Switch from KWallet to QtKeychain sysutils/plasma6-kinfocenter: - Add dependence on aha - pactl comes from pulseaudio, not pipewire - Replace ip with ifconfig [2] sysutils/plasma6-ksystemstats: - Backport upstream patch to enable network info on FreeBSD x11-themes/plasma6-aurorae: - Fix patch - Renew USE_KDE x11-toolkits/plasma6-kdeplasma-addons: - Drop stale dependencies x11-wm/plasma6-kwin: - Drop stale dependencies x11/plasma6-libkscreen: - Clean up Makefile x11/plasma6-plasma-workspace: - Drop stale dependencies - Drop stale cmake args PR: 293368 [1] PR: 285230 [2] Mk/Uses/kde.mk | 2 +- audio/plasma6-kpipewire/distinfo | 6 +- audio/plasma6-ocean-sound-theme/distinfo | 6 +- audio/plasma6-oxygen-sounds/distinfo | 6 +- audio/plasma6-plasma-pa/distinfo | 6 +- deskutils/plasma6-milou/distinfo | 6 +- deskutils/plasma6-milou/pkg-plist | 7 +- deskutils/plasma6-sddm-kcm/Makefile | 1 - deskutils/plasma6-sddm-kcm/distinfo | 6 +- deskutils/plasma6-xdg-desktop-portal-kde/Makefile | 1 - deskutils/plasma6-xdg-desktop-portal-kde/distinfo | 6 +- devel/plasma6-kwrited/distinfo | 6 +- devel/plasma6-plasma-sdk/Makefile | 1 - devel/plasma6-plasma-sdk/distinfo | 6 +- devel/plasma6-plasma-sdk/pkg-plist | 1 + devel/plasma6-plasma5support/Makefile | 1 - devel/plasma6-plasma5support/distinfo | 6 +- devel/plasma6-plasma5support/pkg-plist | 63 +++ graphics/plasma6-spectacle/Makefile | 4 +- graphics/plasma6-spectacle/distinfo | 6 +- print/plasma6-print-manager/Makefile | 1 - print/plasma6-print-manager/distinfo | 6 +- print/plasma6-print-manager/pkg-plist | 1 + security/plasma6-kscreenlocker/Makefile | 1 - security/plasma6-kscreenlocker/distinfo | 6 +- security/plasma6-kscreenlocker/pkg-plist | 2 + security/plasma6-ksshaskpass/Makefile | 6 +- security/plasma6-ksshaskpass/distinfo | 6 +- security/plasma6-kwallet-pam/distinfo | 6 +- sysutils/plasma6-discover/Makefile | 1 - sysutils/plasma6-discover/distinfo | 6 +- sysutils/plasma6-discover/pkg-plist | 4 + sysutils/plasma6-kde-cli-tools/Makefile | 1 - sysutils/plasma6-kde-cli-tools/distinfo | 6 +- sysutils/plasma6-kde-cli-tools/pkg-plist | 3 - sysutils/plasma6-kinfocenter/Makefile | 6 +- sysutils/plasma6-kinfocenter/distinfo | 6 +- .../plasma6-kinfocenter/files/patch-kcms_cpu (new) | 11 + .../files/patch-kcms_network (new) | 21 + sysutils/plasma6-kinfocenter/pkg-plist | 2 + sysutils/plasma6-kmenuedit/Makefile | 1 - sysutils/plasma6-kmenuedit/distinfo | 6 +- sysutils/plasma6-knighttime/distinfo | 6 +- sysutils/plasma6-ksystemstats/Makefile | 1 - sysutils/plasma6-ksystemstats/distinfo | 6 +- .../plasma6-ksystemstats/files/patch-network (new) | 245 ++++++++++++ sysutils/plasma6-libksysguard/Makefile | 1 - sysutils/plasma6-libksysguard/distinfo | 6 +- sysutils/plasma6-libksysguard/pkg-plist | 2 + sysutils/plasma6-plasma-disks/Makefile | 1 - sysutils/plasma6-plasma-disks/distinfo | 6 +- sysutils/plasma6-plasma-systemmonitor/Makefile | 1 - sysutils/plasma6-plasma-systemmonitor/distinfo | 6 +- sysutils/plasma6-plasma-systemmonitor/pkg-plist | 1 + sysutils/plasma6-polkit-kde-agent-1/distinfo | 6 +- sysutils/plasma6-powerdevil/Makefile | 1 - sysutils/plasma6-powerdevil/distinfo | 6 +- sysutils/plasma6-systemsettings/Makefile | 1 - sysutils/plasma6-systemsettings/distinfo | 6 +- www/plasma6-plasma-browser-integration/Makefile | 1 - www/plasma6-plasma-browser-integration/distinfo | 6 +- www/plasma6-plasma-browser-integration/pkg-plist | 3 + x11-themes/plasma6-aurorae/Makefile | 7 +- x11-themes/plasma6-aurorae/distinfo | 6 +- x11-themes/plasma6-aurorae/pkg-plist | 1 + x11-themes/plasma6-breeze-gtk/Makefile | 1 - x11-themes/plasma6-breeze-gtk/distinfo | 6 +- x11-themes/plasma6-breeze/distinfo | 6 +- x11-themes/plasma6-kde-gtk-config/distinfo | 6 +- x11-themes/plasma6-oxygen/distinfo | 6 +- x11-themes/plasma6-oxygen/pkg-plist | 2 - .../plasma6-plasma-workspace-wallpapers/distinfo | 6 +- .../plasma6-plasma-workspace-wallpapers/pkg-plist | 7 + x11-themes/plasma6-qqc2-breeze-style/distinfo | 6 +- x11-toolkits/plasma6-kdeplasma-addons/Makefile | 5 +- x11-toolkits/plasma6-kdeplasma-addons/distinfo | 6 +- x11-toolkits/plasma6-kdeplasma-addons/pkg-plist | 137 ++----- x11-wm/plasma6-kdecoration/distinfo | 6 +- x11-wm/plasma6-kwin-x11/Makefile | 1 - x11-wm/plasma6-kwin-x11/distinfo | 6 +- x11-wm/plasma6-kwin-x11/pkg-plist | 31 +- x11-wm/plasma6-kwin/Makefile | 5 - x11-wm/plasma6-kwin/distinfo | 8 +- x11-wm/plasma6-kwin/pkg-plist | 7 + x11/plasma6-kactivitymanagerd/Makefile | 1 - x11/plasma6-kactivitymanagerd/distinfo | 6 +- x11/plasma6-kgamma/distinfo | 6 +- x11/plasma6-kglobalacceld/Makefile | 1 - x11/plasma6-kglobalacceld/distinfo | 6 +- x11/plasma6-kscreen/distinfo | 6 +- x11/plasma6-kscreen/pkg-plist | 24 +- x11/plasma6-kwayland/distinfo | 6 +- x11/plasma6-layer-shell-qt/distinfo | 6 +- x11/plasma6-libkscreen/Makefile | 7 +- x11/plasma6-libkscreen/distinfo | 6 +- x11/plasma6-libkscreen/pkg-plist | 1 - x11/plasma6-libplasma/Makefile | 1 - x11/plasma6-libplasma/distinfo | 6 +- x11/plasma6-plasma-activities-stats/distinfo | 6 +- x11/plasma6-plasma-activities/distinfo | 6 +- x11/plasma6-plasma-desktop/Makefile | 1 - x11/plasma6-plasma-desktop/distinfo | 6 +- x11/plasma6-plasma-desktop/pkg-plist | 116 +----- x11/plasma6-plasma-integration/Makefile | 1 - x11/plasma6-plasma-integration/distinfo | 6 +- x11/plasma6-plasma-workspace/Makefile | 8 +- x11/plasma6-plasma-workspace/distinfo | 6 +- x11/plasma6-plasma-workspace/pkg-plist | 445 +++------------------ 108 files changed, 702 insertions(+), 822 deletions(-)
Created attachment 268564 [details] timerfd patch
Hey Gleb, Thanks for reporting this. I've attached a patch that I think should solve this issue. I'll do some testing and post a review tomorrow morning. Thanks, Jake
(In reply to Jake Freeland from comment #2) Thank you! This patch fixes the problem with Plasma clock. Tested on 15-stable.
(In reply to Jake Freeland from comment #2) Test program works fine on -CURRENT/amd64 here as well.
I also confirm that the patch fixes the problem. Jake, do you need someone with src commit bit to review and merge this into main?
My problem is also solved. https://mail.kde.org/pipermail/kde-freebsd/2026-March/045916.html
stable/14 and stable/15 are affected too.
Hi Gleb, I have a commit bit (I was accidentally logged into my personal Bugzilla account), so I can commit when ready. I apologize for getting this out late. I started working on this simple patch and got pulled into the many other todos I had related to timerfd. I posted a series of reviews and tagged you as a reviewer. The review targeting this specific bug is here: https://reviews.freebsd.org/D55791 Thanks
Oops, accidentally linked the wrong review in the last comment. The review for this fix is here: https://reviews.freebsd.org/D55790
*** Bug 293709 has been marked as a duplicate of this bug. ***
*** Bug 293804 has been marked as a duplicate of this bug. ***
This has been fixed in https://reviews.freebsd.org/rG85c0f1a87da1fd1eb3e646e86f70e630c48da91a
(In reply to Jake Freeland from comment #13) Thank you, but I think these commits need to be MFCed to stable/15 too?
(In reply to Mark Johnston from comment #14) Ideally, we need an EN for that, because it severely affects the desktop usage.
(In reply to Gleb Popov from comment #15) This could be done, but in any case the first step will be an MFC.
To stable/14 too.
Will re-comment here once they've been MFC'd. Thanks.
Re: bug 293804 comment 2 from Denis Shaposhnikov The workaround suggested at <https://forums.freebsd.org/posts/749200> is not, or no longer, effective for me on bugged systesms. Excessive use of CPU by plasmashell is not reproducible, by me, with FreeBSD 16.0-CURRENT as a VirtualBox guest following a pkgbase update to main-n284672-e6a77f81d1eb GENERIC-NODEBUG amd64, which includes base 85c0f1a87da1. ---- jfree@ would you like to close bug 293820 as a duplicate? The coincidental power management issue is spun of, away from Bugzilla for FreeBSD, at <https://mail.kde.org/pipermail/kde-freebsd/2026-March/046035.html>.
Graham Perrin, Have you confirmed this patch fixes that issue? If so, I think it can be marked as a duplicate of this report. Thanks, Jake
I use pkgbase for updates (didn't need to build from source, with the patch). Bug 293820 comment 12 has a little more detail.
Upgrading my laptop to 16-CURRENT main-n284700-9b98c4b05391 fixed the plasmashell problem reported in PR 293709.
Hi there, MFC to stable/15 and stable/14 has been done. stable/15: https://cgit.freebsd.org/src/commit/?h=stable/15&id=9b785380f307e772eae0df017c982acd81d5879e stable/14: https://cgit.freebsd.org/src/commit/?h=stable/14&id=3c00f603a2801fd780666f9e94a26f264a887c90 Closing this. Feel free to re-open if anything else is needed. Thanks.
We need Errata Notices too for 15.0, 14.4 and 14.3: https://www.freebsd.org/security/notices/
(In reply to Vladimir Druzenko from comment #24) Can you or anyone else please provide some background on the impact of the bug, so we can fill out an errata template? How does the bug manifest?
(In reply to Mark Johnston from comment #25) The only impact I'm aware of is 100% CPU usage by plasmashell process when running Plasma Desktop 6.6.0 and greater, which makes KDE user experience unpleasant to say at least: https://cgit.freebsd.org/ports/commit/?id=a9f8378e37f45046ee91f0f9ad660d8fb2b77663
(In reply to Mark Johnston from comment #25) I wrote this post on FreeBSD Forums, don't know if could be useful: https://forums.freebsd.org/threads/trying-to-run-kde-6-plasma-with-wayland.93951/post-748570
Thanks, I am drafting an EN. Is anyone able to confirm that commit 85c0f1a87da1 on its own is enough to fix the problems reported here?
(In reply to Mark Johnston from comment #28) I can confirm: I'm running 15-stable of git commit 6a1ebd14aa96 (a week before the fix has been MFCed to stable) with the only 85c0f1a87da1 merged and it solves the problem for me.