Skip to content

Commit 3d2a8c6

Browse files
committedApr 27, 2025
Fix WebEngine crashes in some multi-GPU situations
1 parent 9e5b901 commit 3d2a8c6

File tree

3 files changed

+39
-48
lines changed

3 files changed

+39
-48
lines changed
 

‎03c7dcc.diff

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
From 03c7dcc3280530dacf58620d169ff9c540c04592 Mon Sep 17 00:00:00 2001
2+
From: Peter Varga <pvarga@inf.u-szeged.hu>
3+
Date: Tue, 11 Mar 2025 09:19:16 +0100
4+
Subject: [PATCH] [angle] Always use primary GPU
5+
6+
Since https://crrev.com/c/5320107, ANGLE may choose another GPU what Qt
7+
uses with an EGL configuration. This may lead to sporadic crashes when
8+
ANGLE uses the native EGL context.
9+
10+
It is reproducible with integrated Intel GPU and dedicated Nvidia GPU.
11+
If the primary GPU is Nvidia and the kernel mode setting (KMS) is not
12+
explicitly enabled for the driver, it will fail to access DRM and will
13+
fallback to Intel.
14+
15+
As a workaround, stop prioritizing EGL drivers with DRM support.
16+
17+
Change-Id: I5d346fdc0db59521e4a2d323c8b230a75f128eaa
18+
Reviewed-on: https://codereview.qt-project.org/c/qt/qtwebengine-chromium/+/630511
19+
Reviewed-by: Moss Heim <moss.heim@qt.io>
20+
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
21+
---
22+
23+
diff --git a/src/3rdparty/chromium/third_party/angle/src/libANGLE/renderer/gl/egl/FunctionsEGL.cpp b/src/3rdparty/chromium/third_party/angle/src/libANGLE/renderer/gl/egl/FunctionsEGL.cpp
24+
index f9bd8aa..aa68b72 100644
25+
--- a/src/3rdparty/chromium/third_party/angle/src/libANGLE/renderer/gl/egl/FunctionsEGL.cpp
26+
+++ b/src/3rdparty/chromium/third_party/angle/src/libANGLE/renderer/gl/egl/FunctionsEGL.cpp
27+
@@ -245,7 +245,7 @@
28+
// extensions once the display is created and initialized.
29+
queryExtensions();
30+
31+
-#if defined(ANGLE_HAS_LIBDRM)
32+
+#if defined(ANGLE_HAS_LIBDRM) && !defined(TOOLKIT_QT)
33+
mEGLDisplay = getPreferredDisplay(&majorVersion, &minorVersion);
34+
#endif // defined(ANGLE_HAS_LIBDRM)
35+

‎qt6-qtwebengine.spec

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
Name: qt6-qtwebengine
1515
Version: 6.9.0
16-
Release: %{?beta:0.%{beta}.}%{?snapshot:0.%{snapshot}.}2
16+
Release: %{?beta:0.%{beta}.}%{?snapshot:0.%{snapshot}.}3
1717
%if 0%{?snapshot:1}
1818
# Built with package-source.sh (Source1000)
1919
Source: qtwebengine-%{?snapshot:%{snapshot}}%{!?snapshot:%{version}}.tar.zst
@@ -29,7 +29,9 @@ Patch2: qt6-qtwebengine-6.2.2-workaround-for-__fp16-build-failure-aarch64.patch
2929
Patch3: a55ef9d.diff
3030
Patch4: qtwebengine-6.5.0-aarch64-compile.patch
3131
Patch5: qtwebengine-6.9.0-gperf-3.2+.patch
32-
#Patch6: qtwebengine-6.7.0-compile.patch
32+
# https://bugreports.qt.io/browse/QTBUG-136122
33+
# https://codereview.qt-project.org/c/qt/qtwebengine-chromium/+/630511
34+
Patch6: 03c7dcc.diff
3335
# Try to restore a sufficient amount of binary compatibility between the
3436
# internalized copy of absl (which can't be disabled yet) and the system
3537
# version (used, among others, by the system version of re2, which DOES

‎qtwebengine-6.7.0-compile.patch

Lines changed: 0 additions & 46 deletions
This file was deleted.

0 commit comments

Comments
 (0)
Please sign in to comment.