Merge ~vanvugt/ubuntu/+source/mutter:fix-lp1832138 into ~ubuntu-desktop/ubuntu/+source/mutter:ubuntu/bionic

Proposed by Daniel van Vugt
Status: Rejected
Rejected by: Iain Lane
Proposed branch: ~vanvugt/ubuntu/+source/mutter:fix-lp1832138
Merge into: ~ubuntu-desktop/ubuntu/+source/mutter:ubuntu/bionic
Diff against target: 59 lines (+34/-0)
3 files modified
debian/changelog (+8/-0)
debian/patches/lp1832138-workaround-old-vmwgfx.patch (+25/-0)
debian/patches/series (+1/-0)
Reviewer Review Type Date Requested Status
Iain Lane Disapprove
Marco Trevisan (Treviño) Approve
Review via email: mp+369083@code.launchpad.net

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)

To post a comment you must log in.
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Hmm, in bug 1832138 it now sounds like we might get a kernel fix instead. If so then this workaround can be dropped.

Revision history for this message
Marco Trevisan (Treviño) (3v1n0) wrote :

The workaround works for me, even in disco.

So, if the kernel doesn't get updated earlier, we should land this in both disco and bionic

review: Approve
Revision history for this message
Marco Trevisan (Treviño) (3v1n0) wrote :

Ouch, I still had an old kernel in my vm, updating it to standard disco worked even without this patch.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

The fix is for bionic because the bug only exists in kernels older than 4.17.

Revision history for this message
Iain Lane (laney) wrote :

It's my understanding that this bug was fixed in the kernel, and so this patch for mutter isn't required. Let me know if that's not true.

review: Disapprove
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

"was fixed" is partially correct. The fix has been proposed to the bionic kernel but is not yet Fix Released. My plan was to delete this MP as soon as the kernel fix is released proper.

Revision history for this message
Iain Lane (laney) wrote :

On Wed, Jul 10, 2019 at 01:36:05AM -0000, Daniel van Vugt wrote:
> "was fixed" is partially correct.

Thanks for correcting me.

--
Iain Lane [ <email address hidden> ]
Debian Developer [ <email address hidden> ]
Ubuntu Developer [ <email address hidden> ]

Unmerged commits

d6bb181... by Daniel van Vugt

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)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
diff --git a/debian/changelog b/debian/changelog
index 62c0624..e850e64 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
1mutter (3.28.4-0ubuntu18.04.2) bionic; urgency=medium
2
3 * Add lp1832138-workaround-old-vmwgfx.patch to work around old versions
4 of the vmwgfx kernel driver that could result in the screen freezing
5 immediately on startup. (LP: #1832138)
6
7 -- Daniel van Vugt <daniel.van.vugt@canonical.com> Thu, 20 Jun 2019 17:32:53 +0800
8
1mutter (3.28.4-0ubuntu18.04.1) bionic; urgency=medium9mutter (3.28.4-0ubuntu18.04.1) bionic; urgency=medium
210
3 * New upstream release:11 * New upstream release:
diff --git a/debian/patches/lp1832138-workaround-old-vmwgfx.patch b/debian/patches/lp1832138-workaround-old-vmwgfx.patch
4new file mode 10064412new file mode 100644
index 0000000..0fde5c5
--- /dev/null
+++ b/debian/patches/lp1832138-workaround-old-vmwgfx.patch
@@ -0,0 +1,25 @@
1Description: renderer-native: Work around broken timing in old vmwgfx
2 The vmwgfx driver in kernels prior to 4.17 reported bogus timestamps using
3 the wrong clock. This would lead us to wait forever (or at least 49 years)
4 before rendering the next frame. There's no decisive way to know this kernel
5 bug is going to happen before it does so just detect timestamps which are
6 obviously going to cause freezes and ignore them.
7Author: Daniel van Vugt <daniel.van.vugt@canonical.com>
8Bug-Ubuntu: https://bugs.launchpad.net/bugs/1832138
9Forwarded: not-needed
10Last-Update: 2019-06-20
11
12--- a/src/backends/native/meta-renderer-native.c
13+++ b/src/backends/native/meta-renderer-native.c
14@@ -1185,6 +1185,11 @@ on_crtc_flipped (GClosure *closure,
15 */
16 if (refresh_rate >= frame_info->refresh_rate)
17 {
18+ int64_t drm_now = _meta_gpu_kms_get_current_time_ns (gpu_kms);
19+
20+ if (page_flip_time_ns > (drm_now + 1000000000L))
21+ page_flip_time_ns = 0;
22+
23 frame_info->presentation_time = page_flip_time_ns;
24 frame_info->refresh_rate = refresh_rate;
25 }
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
6monitor-manager-Don-t-use-switch-config-when-ensuring-con.patch6monitor-manager-Don-t-use-switch-config-when-ensuring-con.patch
7lp1763892-a-renderer-native-Add-hardware-presentation-timing.patch7lp1763892-a-renderer-native-Add-hardware-presentation-timing.patch
8lp1763892-b-renderer-native-Advertise-_FEATURE_SWAP_THROTTLE.patch8lp1763892-b-renderer-native-Advertise-_FEATURE_SWAP_THROTTLE.patch
9lp1832138-workaround-old-vmwgfx.patch
9debian/synaptics-support.patch10debian/synaptics-support.patch
10debian/skip-failing-tests.patch11debian/skip-failing-tests.patch
11debian/skip-failing-tests-325.patch12debian/skip-failing-tests-325.patch

Subscribers

People subscribed via source and target branches