summaryrefslogtreecommitdiff
path: root/kde-plasma/kscreenlocker/files/kscreenlocker-5.27.8-disable-qml-disk-cache.patch
diff options
context:
space:
mode:
Diffstat (limited to 'kde-plasma/kscreenlocker/files/kscreenlocker-5.27.8-disable-qml-disk-cache.patch')
-rw-r--r--kde-plasma/kscreenlocker/files/kscreenlocker-5.27.8-disable-qml-disk-cache.patch42
1 files changed, 42 insertions, 0 deletions
diff --git a/kde-plasma/kscreenlocker/files/kscreenlocker-5.27.8-disable-qml-disk-cache.patch b/kde-plasma/kscreenlocker/files/kscreenlocker-5.27.8-disable-qml-disk-cache.patch
new file mode 100644
index 000000000000..e177bb290f52
--- /dev/null
+++ b/kde-plasma/kscreenlocker/files/kscreenlocker-5.27.8-disable-qml-disk-cache.patch
@@ -0,0 +1,42 @@
+From f9b5596b2763e33319134cfd9e9fd5e6bd124a0b Mon Sep 17 00:00:00 2001
+From: Harald Sitter <sitter@kde.org>
+Date: Mon, 18 Sep 2023 10:56:47 +0200
+Subject: [PATCH] greeter: disable qml disk cache
+
+The cache currently runs risk of getting corrupted and breaking the lock
+screen until the cache hash changes or the cache file gets removed by
+the user. Since we don't necessarily need a cache here let's just
+disable it for the time being in the interest of greater fault
+tolerance.
+
+BUG: 471952
+(cherry picked from commit d1640daa360943f86196e323c4a76bde57566150)
+---
+ greeter/main.cpp | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/greeter/main.cpp b/greeter/main.cpp
+index f5c3c05c..6c2bff28 100644
+--- a/greeter/main.cpp
++++ b/greeter/main.cpp
+@@ -1,5 +1,6 @@
+ /*
+ SPDX-FileCopyrightText: 2011 Martin Gräßlin <mgraesslin@kde.org>
++SPDX-FileCopyrightText: 2023 Harald Sitter <sitter@kde.org>
+
+ SPDX-License-Identifier: GPL-2.0-or-later
+ */
+@@ -81,6 +82,10 @@ int main(int argc, char *argv[])
+
+ // Suppresses modal warnings about unwritable configuration files which may render the system inaccessible
+ qputenv("KDE_HOME_READONLY", "1");
++ // Disable QML caching to prevent cache corruption in full or near-full disk scenarios.
++ // https://bugs.kde.org/show_bug.cgi?id=471952
++ // https://bugreports.qt.io/browse/QTBUG-117130
++ qputenv("QML_DISABLE_DISK_CACHE", "1");
+
+ auto format = QSurfaceFormat::defaultFormat();
+ format.setOption(QSurfaceFormat::ResetNotification);
+--
+GitLab
+