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

Proposed by Daniel van Vugt on 2019-06-20
Status: Rejected
Rejected by: Iain Lane on 2019-07-09
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 2019-06-20 Disapprove on 2019-07-09
Marco Trevisan (Treviño) (community) Approve on 2019-06-21
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.
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.

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
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.

Daniel van Vugt (vanvugt) wrote :

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

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
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.

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 on 2019-06-20

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
1diff --git a/debian/changelog b/debian/changelog
2index 62c0624..e850e64 100644
3--- a/debian/changelog
4+++ b/debian/changelog
5@@ -1,3 +1,11 @@
6+mutter (3.28.4-0ubuntu18.04.2) bionic; urgency=medium
7+
8+ * Add lp1832138-workaround-old-vmwgfx.patch to work around old versions
9+ of the vmwgfx kernel driver that could result in the screen freezing
10+ immediately on startup. (LP: #1832138)
11+
12+ -- Daniel van Vugt <daniel.van.vugt@canonical.com> Thu, 20 Jun 2019 17:32:53 +0800
13+
14 mutter (3.28.4-0ubuntu18.04.1) bionic; urgency=medium
15
16 * New upstream release:
17diff --git a/debian/patches/lp1832138-workaround-old-vmwgfx.patch b/debian/patches/lp1832138-workaround-old-vmwgfx.patch
18new file mode 100644
19index 0000000..0fde5c5
20--- /dev/null
21+++ b/debian/patches/lp1832138-workaround-old-vmwgfx.patch
22@@ -0,0 +1,25 @@
23+Description: renderer-native: Work around broken timing in old vmwgfx
24+ The vmwgfx driver in kernels prior to 4.17 reported bogus timestamps using
25+ the wrong clock. This would lead us to wait forever (or at least 49 years)
26+ before rendering the next frame. There's no decisive way to know this kernel
27+ bug is going to happen before it does so just detect timestamps which are
28+ obviously going to cause freezes and ignore them.
29+Author: Daniel van Vugt <daniel.van.vugt@canonical.com>
30+Bug-Ubuntu: https://bugs.launchpad.net/bugs/1832138
31+Forwarded: not-needed
32+Last-Update: 2019-06-20
33+
34+--- a/src/backends/native/meta-renderer-native.c
35++++ b/src/backends/native/meta-renderer-native.c
36+@@ -1185,6 +1185,11 @@ on_crtc_flipped (GClosure *closure,
37+ */
38+ if (refresh_rate >= frame_info->refresh_rate)
39+ {
40++ int64_t drm_now = _meta_gpu_kms_get_current_time_ns (gpu_kms);
41++
42++ if (page_flip_time_ns > (drm_now + 1000000000L))
43++ page_flip_time_ns = 0;
44++
45+ frame_info->presentation_time = page_flip_time_ns;
46+ frame_info->refresh_rate = refresh_rate;
47+ }
48diff --git a/debian/patches/series b/debian/patches/series
49index 5bf1aa6..6c4463e 100644
50--- a/debian/patches/series
51+++ b/debian/patches/series
52@@ -6,6 +6,7 @@ monitor-manager-use-MonitorsConfig-to-track-switch_config.patch
53 monitor-manager-Don-t-use-switch-config-when-ensuring-con.patch
54 lp1763892-a-renderer-native-Add-hardware-presentation-timing.patch
55 lp1763892-b-renderer-native-Advertise-_FEATURE_SWAP_THROTTLE.patch
56+lp1832138-workaround-old-vmwgfx.patch
57 debian/synaptics-support.patch
58 debian/skip-failing-tests.patch
59 debian/skip-failing-tests-325.patch

Subscribers

People subscribed via source and target branches