summaryrefslogtreecommitdiff
path: root/kde-plasma/kscreenlocker/files/kscreenlocker-5.27.8-disable-qml-disk-cache.patch
blob: e177bb290f52294b338a4d67cadf04bd14065fa8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
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