Accepting request 564047 from KDE:Qt5

- Also work around crashes on wayland by disabling the GPU by default (boo#1060990):
  * disable-gpu-when-using-nouveau-boo-1005323.diff

OBS-URL: https://build.opensuse.org/request/show/564047
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/libqt5-qtwebengine?expand=0&rev=29
This commit is contained in:
Dominique Leuenberger 2018-01-16 08:38:51 +00:00 committed by Git OBS Bridge
parent 9bce4b8c38
commit c1765aba79
3 changed files with 30 additions and 5 deletions

View File

@ -1,3 +1,12 @@
From: Antonio Larrosa <alarrosa@suse.com>
Subject: Disable GPU when using nouveau or running on wayland
References: boo#1005323, boo#1060990
Qt WebEngine uses multi-threaded OpenGL, which nouveau does not support.
It also crashes when running on wayland, the cause is not yet known.
Work around these issues by not doing GPU-accelerated rendering in such
cases.
Index: qtwebengine-everywhere-src-5.10.0/src/core/web_engine_context.cpp
===================================================================
--- qtwebengine-everywhere-src-5.10.0.orig/src/core/web_engine_context.cpp
@ -50,12 +59,21 @@ Index: qtwebengine-everywhere-src-5.10.0/src/core/web_engine_context.cpp
} // namespace
namespace QtWebEngineCore {
@@ -378,6 +412,17 @@ WebEngineContext::WebEngineContext()
@@ -379,6 +413,27 @@ WebEngineContext::WebEngineContext()
const char *glType = 0;
#ifndef QT_NO_OPENGL
+ bool disableGpu = qEnvironmentVariableIsSet("QT_WEBENGINE_DISABLE_GPU");
+
+ if (!qEnvironmentVariableIsSet("QT_WEBENGINE_DISABLE_WAYLAND_WORKAROUND") && platform.startsWith("wayland", Qt::CaseInsensitive))
+ {
+ qWarning() << "Running on wayland. Qt WebEngine will disable usage of the GPU.\n"
+ "Note: you can set the QT_WEBENGINE_DISABLE_WAYLAND_WORKAROUND\n"
+ "environment variable before running this application, but this is \n"
+ "not recommended since this usually causes applications to crash.";
+ disableGpu = true;
+ }
+
+ if (!qEnvironmentVariableIsSet("QT_WEBENGINE_DISABLE_NOUVEAU_WORKAROUND") && openGLVendor() == QStringLiteral("nouveau"))
+ {
+ qWarning() << "Nouveau openGL driver detected. Qt WebEngine will disable usage of the GPU.\n"
@ -65,10 +83,11 @@ Index: qtwebengine-everywhere-src-5.10.0/src/core/web_engine_context.cpp
+ "Nouveau openGL drivers don't support multithreaded rendering";
+ disableGpu = true;
+ }
+
bool tryGL =
!usingANGLE()
@@ -389,7 +434,7 @@ WebEngineContext::WebEngineContext()
&& (!usingSoftwareDynamicGL()
@@ -389,7 +444,7 @@ WebEngineContext::WebEngineContext()
|| enableWebGLSoftwareRendering
#endif
)

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Fri Jan 12 19:10:53 UTC 2018 - fabian@ritter-vogt.de
- Also work around crashes on wayland by disabling the GPU by default (boo#1060990):
* disable-gpu-when-using-nouveau-boo-1005323.diff
-------------------------------------------------------------------
Fri Dec 8 23:14:38 UTC 2017 - christophe@krop.fr

View File

@ -64,7 +64,7 @@ Source: https://download.qt.io/official_releases/qt/5.10/%{real_version}
Source1: baselibs.conf
# PATCH-FIX-UPSTREAM armv6-ffmpeg-no-thumb.patch - Fix ffmpeg configuration for armv6
Patch1: armv6-ffmpeg-no-thumb.patch
# PATCH-FIX-UPSTREAM disable-gpu-when-using-nouveau-boo-1005323.diff -- Detect nouveau opengl drivers and disable gpu usage to work around nouveau crashing
# PATCH-FIX-UPSTREAM disable-gpu-when-using-nouveau-boo-1005323.diff
Patch2: disable-gpu-when-using-nouveau-boo-1005323.diff
# PATCH-FIX-UPSTREAM harmony-fix.diff -- Show the patent-free LCD rendering. Without this patch, only grayscale rendering is used. (for freetype-2.8.1) boo#1061344
Patch5: harmony-fix.diff