Hello community,

here is the log from the commit of package kwin5 for openSUSE:Factory checked 
in at 2019-04-17 11:21:08
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/kwin5 (Old)
 and      /work/SRC/openSUSE:Factory/.kwin5.new.17052 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "kwin5"

Wed Apr 17 11:21:08 2019 rev:96 rq:694136 version:5.15.4

Changes:
--------
--- /work/SRC/openSUSE:Factory/kwin5/kwin5.changes      2019-04-04 
15:24:24.130829862 +0200
+++ /work/SRC/openSUSE:Factory/.kwin5.new.17052/kwin5.changes   2019-04-17 
11:21:11.790266482 +0200
@@ -1,0 +2,6 @@
+Mon Apr 15 06:54:01 UTC 2019 - Fabian Vogt <fab...@ritter-vogt.de>
+
+- Revert upstream commit to avoid issues with NVIDIA optimus (kde#406180):
+  * 0001-Revert-platforms-x11-Force-glXSwapBuffers-to-block-w.patch
+
+-------------------------------------------------------------------

New:
----
  0001-Revert-platforms-x11-Force-glXSwapBuffers-to-block-w.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ kwin5.spec ++++++
--- /var/tmp/diff_new_pack.uDzpgA/_old  2019-04-17 11:21:12.902267791 +0200
+++ /var/tmp/diff_new_pack.uDzpgA/_new  2019-04-17 11:21:12.906267795 +0200
@@ -40,6 +40,8 @@
 Patch100:       0001-Revert-Make-WindowSwitching-Alt-Tab-the-default-left.patch
 # PATCH-FEATURE-OPENSUSE
 Patch101:       0001-Use-Xauthority-for-Xwayland.patch
+# PATCH-FIX-OPENSUSE
+Patch102:       0001-Revert-platforms-x11-Force-glXSwapBuffers-to-block-w.patch
 BuildRequires:  extra-cmake-modules >= 0.0.11
 BuildRequires:  fdupes
 BuildRequires:  kf5-filesystem
@@ -162,8 +164,7 @@
 %lang_package
 
 %prep
-%setup -q -n kwin-%{version}
-%autopatch -p1
+%autosetup -p1 -n kwin-%{version}
 
 %build
   %if 0%{?suse_version} < 1330

++++++ 0001-Revert-platforms-x11-Force-glXSwapBuffers-to-block-w.patch ++++++
>From 412016f1b3acc9e5acc994627f9177b1cf6b32ea Mon Sep 17 00:00:00 2001
From: Fabian Vogt <fab...@ritter-vogt.de>
Date: Mon, 15 Apr 2019 08:52:34 +0200
Subject: [PATCH] Revert "[platforms/x11] Force glXSwapBuffers to block with
 NVIDIA driver"

This reverts commit 3ce5af5c21fd80e3da231b50c39c3ae357e9f15c.
---
 .../platforms/x11/standalone/glxbackend.cpp   | 22 ++++++++++++++-----
 1 file changed, 17 insertions(+), 5 deletions(-)

diff --git a/plugins/platforms/x11/standalone/glxbackend.cpp 
b/plugins/platforms/x11/standalone/glxbackend.cpp
index 70dba6000..eb2d46414 100644
--- a/plugins/platforms/x11/standalone/glxbackend.cpp
+++ b/plugins/platforms/x11/standalone/glxbackend.cpp
@@ -115,11 +115,6 @@ GlxBackend::GlxBackend(Display *display)
     , haveSwapInterval(false)
     , m_x11Display(display)
 {
-     // Ensures calls to glXSwapBuffers will always block until the next
-     // retrace when using the proprietary NVIDIA driver. This must be
-     // set before libGL.so is loaded.
-     setenv("__GL_MaxFramesAllowed", "1", true);
-
      // Force initialization of GLX integration in the Qt's xcb backend
      // to make it call XESetWireToEvent callbacks, which is required
      // by Mesa when using DRI2.
@@ -701,8 +696,25 @@ void GlxBackend::present()
                 glXWaitGL();
                 if (char result = m_swapProfiler.end()) {
                     gs_tripleBufferUndetected = gs_tripleBufferNeedsDetection 
= false;
+                    if (result == 'd' && GLPlatform::instance()->driver() == 
Driver_NVidia) {
+                        // TODO this is a workaround, we should get __GL_YIELD 
set before libGL checks it
+                        if (qstrcmp(qgetenv("__GL_YIELD"), "USLEEP")) {
+                            options->setGlPreferBufferSwap(0);
+                            setSwapInterval(0);
+                            result = 0; // hint proper behavior
+                            qCWarning(KWIN_X11STANDALONE) << "\nIt seems you 
are using the nvidia driver without triple buffering\n"
+                                              "You must export 
__GL_YIELD=\"USLEEP\" to prevent large CPU overhead on synced swaps\n"
+                                              "Preferably, enable the 
TripleBuffer Option in the xorg.conf Device\n"
+                                              "For this reason, the tearing 
prevention has been disabled.\n"
+                                              "See 
https://bugs.kde.org/show_bug.cgi?id=322060\n";;
+                        }
+                    }
                     setBlocksForRetrace(result == 'd');
                 }
+            } else if (blocksForRetrace()) {
+                // at least the nvidia blob manages to swap async, ie. return 
immediately on double
+                // buffering - what messes our timing calculation and leads to 
laggy behavior #346275
+                glXWaitGL();
             }
         } else {
             waitSync();
-- 
2.20.1




Reply via email to