Bug 523805 - Notification results in writing Qt RHI qtpipelinecache to disk, every time
Summary: Notification results in writing Qt RHI qtpipelinecache to disk, every time
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Notifications (other bugs)
Version First Reported In: 6.7.3
Platform: Other Linux
: NOR normal
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords: efficiency-and-performance
Depends on:
Blocks:
 
Reported: 2026-08-03 07:04 UTC by valdikss
Modified: 2026-09-17 13:17 UTC (History)
6 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In: 6.8.0
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description valdikss 2026-08-03 07:04:26 UTC
DESCRIPTION

Each time pop-up notification disappears, it results in saving Qt RHI pipeline cache file, which results in 217 KB writes to the disk every time.

The file which is saved: ~/.cache/plasmashell/qtpipelinecache-x86_64-little_endian-lp64/qqpc_opengl
Saved by plasmashell process inside Qt:

    Thread 30 (Thread 0x7f400ec936c0 (LWP 187737) "QSGRenderThread"):
    #0  0x00007f406aad317e in QSaveFile::open(QFlags<QIODeviceBase::OpenModeFlag>) () at /lib64/libQt6Core.so.6
    #1  0x00007f406c85206e in QSGRhiSupport::finalizePipelineCache(QRhi*, QQuickGraphicsConfiguration const&) () at /lib64/libQt6Quick.so.6
    #2  0x00007f406c8524ee in QSGRhiSupport::destroyRhi(QRhi*, QQuickGraphicsConfiguration const&) () at /lib64/libQt6Quick.so.6
    #3  0x00007f406c9c0d48 in QSGRenderThread::invalidateGraphics(QQuickWindow*, bool) () at /lib64/libQt6Quick.so.6
    #4  0x00007f406c9c6051 in QSGRenderThread::event(QEvent*) () at /lib64/libQt6Quick.so.6
    #5  0x00007f406c9c22b9 in QSGRenderThread::processEventsAndWaitForMore() () at /lib64/libQt6Quick.so.6
    #6  0x00007f406c9c24c2 in QSGRenderThread::run() () at /lib64/libQt6Quick.so.6
    #7  0x00007f406acd406e in QThreadPrivate::start(void*) () at /lib64/libQt6Core.so.6


STEPS TO REPRODUCE
1. strace -y -fe trace=write -p `pidof plasmashell` 2>&1 | grep --line-buffered -F qtpipelinecache
2. notify-send -t 1000 test


OBSERVED RESULT

File is written when popup disappears, every time

[pid 175606] write(120</home/valdikss/.cache/plasmashell/qtpipelinecache-x86_64-little_endian-lp64/#90965445>(deleted), "\3\n\6\2\10\0\0\0\25\0\0\0QO\3\0Intel Mesa Intel"..., 217169) = 217169


EXPECTED RESULT

No file is written.


SOFTWARE/OS VERSIONS
Operating System: Fedora Linux 43
KDE Plasma Version: 6.7.3
KDE Frameworks Version: 6.28.0
Qt Version: 6.10.3
Kernel Version: 7.1.5-101.fc43.x86_64 (64-bit)
Graphics Platform: Wayland


ADDITIONAL INFORMATION

Similar bugs in kwin:
bug 487043
bug 465270

Kwin Patch:
https://invent.kde.org/plasma/kwin/-/commit/f700de56f8ae6c15c7fd7d18bdaf47bf1e21b219

Similar should be done in plasmashell.
Comment 1 valdikss 2026-08-03 07:20:06 UTC
https://doc.qt.io/qt-6/qquickgraphicsconfiguration.html#the-automatic-pipeline-cache

Setting QSG_RHI_DISABLE_SHADER_DISK_CACHE did not help, but setting QT_DISABLE_SHADER_DISK_CACHE helps.
Comment 2 valdikss 2026-08-03 07:39:19 UTC
Workaround:

mkdir -p ~/.config/systemd/user/plasma-plasmashell.service.d
cat > ~/.config/systemd/user/plasma-plasmashell.service.d/override.conf <<EOF
[Service]
Environment=QT_DISABLE_SHADER_DISK_CACHE=1
EOF
Comment 3 valdikss 2026-08-03 08:09:22 UTC
David, you previously contributed a patch to Qt to disable lockfile for cache saves: https://codereview.qt-project.org/c/qt/qtdeclarative/+/564411
Is there anything should be done in Qt this time?
Comment 4 David Edmundson 2026-08-03 11:41:14 UTC
>Similar should be done in plasmashell.

Caches are there for a reason. If things work properly and are only written once that's fine.

I do not get a pipeline being written every notification. (git latest of the 6.12 branch)
We need to do some debugging on why it's happening for you.
Comment 5 valdikss 2026-08-03 11:52:21 UTC
(In reply to David Edmundson from comment #4)
> I do not get a pipeline being written every notification. (git latest of the
> 6.12 branch)
> We need to do some debugging on why it's happening for you.

Just re-tested in a VM, Fedora 44 iso Fedora-KDE-Desktop-Live-44-1.7.x86_64.iso, Tuesday, April 28, 2026
Plasma 6.6.4, Qt 6.10.2

The same as in my first message. Cache is saved every time when the notification disappears.
Comment 6 valdikss 2026-08-03 12:08:58 UTC
Also tested on Fedora-KDE-Desktop-Live-Rawhide-20260803.n.0.x86_64.iso
Plasma 6.7.3, Qt 6.11.1, the same result: cache is saved every time.
Comment 8 Nate Graham 2026-09-16 18:52:47 UTC
*** Bug 525651 has been marked as a duplicate of this bug. ***
Comment 9 David Edmundson 2026-09-16 22:23:03 UTC
>David, you previously contributed a patch to Qt to disable lockfile for cache saves: https://codereview.qt-project.org/c/qt/qtdeclarative/+/564411
>Is there anything should be done in Qt this time?

What I did was avoid the lockfile, I would still expect a write on changes. In my head that meant we get it once till you upgrade Qt or Plasma. Maybe we're getting it here because of this multi-window issue

The one thing we can (and should) do in Qt is disable the fdatasync. The write is basically harmless, the sync is problematic.