Daniel van Vugt has proposed merging 
~vanvugt/ubuntu/+source/mutter:fix-lp1832138 into 
~ubuntu-desktop/ubuntu/+source/mutter:ubuntu/bionic.

Commit message:
Add lp1832138-workaround-old-vmwgfx.patch

To work around old versions of the vmwgfx kernel driver that could
result in the screen freezing immediately on startup. (LP: #1832138)

Requested reviews:
  Ubuntu Desktop (ubuntu-desktop)
Related bugs:
  Bug #1832138 in linux (Ubuntu): "Login screen never appears on vmwgfx using 
bionic kernel 4.15"
  https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1832138

For more details, see:
https://code.launchpad.net/~vanvugt/ubuntu/+source/mutter/+git/mutter/+merge/369083
-- 
Your team Ubuntu Desktop is requested to review the proposed merge of 
~vanvugt/ubuntu/+source/mutter:fix-lp1832138 into 
~ubuntu-desktop/ubuntu/+source/mutter:ubuntu/bionic.
diff --git a/debian/changelog b/debian/changelog
index 62c0624..e850e64 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+mutter (3.28.4-0ubuntu18.04.2) bionic; urgency=medium
+
+  * Add lp1832138-workaround-old-vmwgfx.patch to work around old versions
+    of the vmwgfx kernel driver that could result in the screen freezing
+    immediately on startup. (LP: #1832138)
+
+ -- Daniel van Vugt <daniel.van.v...@canonical.com>  Thu, 20 Jun 2019 17:32:53 +0800
+
 mutter (3.28.4-0ubuntu18.04.1) bionic; urgency=medium
 
   * New upstream release:
diff --git a/debian/patches/lp1832138-workaround-old-vmwgfx.patch b/debian/patches/lp1832138-workaround-old-vmwgfx.patch
new file mode 100644
index 0000000..0fde5c5
--- /dev/null
+++ b/debian/patches/lp1832138-workaround-old-vmwgfx.patch
@@ -0,0 +1,25 @@
+Description: renderer-native: Work around broken timing in old vmwgfx
+ The vmwgfx driver in kernels prior to 4.17 reported bogus timestamps using
+ the wrong clock. This would lead us to wait forever (or at least 49 years)
+ before rendering the next frame. There's no decisive way to know this kernel
+ bug is going to happen before it does so just detect timestamps which are
+ obviously going to cause freezes and ignore them.
+Author: Daniel van Vugt <daniel.van.v...@canonical.com>
+Bug-Ubuntu: https://bugs.launchpad.net/bugs/1832138
+Forwarded: not-needed
+Last-Update: 2019-06-20
+
+--- a/src/backends/native/meta-renderer-native.c
++++ b/src/backends/native/meta-renderer-native.c
+@@ -1185,6 +1185,11 @@ on_crtc_flipped (GClosure         *closure,
+    */
+   if (refresh_rate >= frame_info->refresh_rate)
+     {
++      int64_t drm_now = _meta_gpu_kms_get_current_time_ns (gpu_kms);
++
++      if (page_flip_time_ns > (drm_now + 1000000000L))
++        page_flip_time_ns = 0;
++
+       frame_info->presentation_time = page_flip_time_ns;
+       frame_info->refresh_rate = refresh_rate;
+     }
diff --git a/debian/patches/series b/debian/patches/series
index 5bf1aa6..6c4463e 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -6,6 +6,7 @@ monitor-manager-use-MonitorsConfig-to-track-switch_config.patch
 monitor-manager-Don-t-use-switch-config-when-ensuring-con.patch
 lp1763892-a-renderer-native-Add-hardware-presentation-timing.patch
 lp1763892-b-renderer-native-Advertise-_FEATURE_SWAP_THROTTLE.patch
+lp1832138-workaround-old-vmwgfx.patch
 debian/synaptics-support.patch
 debian/skip-failing-tests.patch
 debian/skip-failing-tests-325.patch
-- 
ubuntu-desktop mailing list
ubuntu-desktop@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-desktop

Reply via email to