Blame SOURCES/0001-data-only-disable-wayland-on-passthrough-virt-setups.patch

f83012
From ab9510df0b5f7bc29662804991729c6d6ee38b70 Mon Sep 17 00:00:00 2001
f83012
From: Ray Strode <rstrode@redhat.com>
f83012
Date: Thu, 12 Dec 2019 16:56:16 -0500
f83012
Subject: [PATCH] data: only disable wayland on passthrough virt setups
f83012
f83012
at the moment we disable wayland on all hybrid graphics setups,
f83012
but most hybrid graphics setups work fine.
f83012
f83012
The case we really care about is passthrough virt. in that case,
f83012
wayland is a bad idea because:
f83012
1) kernel crashes
f83012
2) mutter provides no way to disable one of the cards, and will
f83012
always use one as a secondary gpu
f83012
f83012
This commit forces xorg in passthrough setups so the user can use
f83012
an xorg.conf to turn one of the cards off.
f83012
---
f83012
 data/61-gdm.rules.in | 9 +++++++--
f83012
 1 file changed, 7 insertions(+), 2 deletions(-)
f83012
f83012
diff --git a/data/61-gdm.rules.in b/data/61-gdm.rules.in
f83012
index fc2e3315c..f971224cf 100644
f83012
--- a/data/61-gdm.rules.in
f83012
+++ b/data/61-gdm.rules.in
f83012
@@ -1,20 +1,25 @@
f83012
 # disable Wayland on Matrox chipsets
f83012
 ATTR{vendor}=="0x102b", ATTR{device}=="0x0522", RUN+="@libexecdir@/gdm-disable-wayland"
f83012
 ATTR{vendor}=="0x102b", ATTR{device}=="0x0524", RUN+="@libexecdir@/gdm-disable-wayland"
f83012
 ATTR{vendor}=="0x102b", ATTR{device}=="0x0530", RUN+="@libexecdir@/gdm-disable-wayland"
f83012
 ATTR{vendor}=="0x102b", ATTR{device}=="0x0532", RUN+="@libexecdir@/gdm-disable-wayland"
f83012
 ATTR{vendor}=="0x102b", ATTR{device}=="0x0533", RUN+="@libexecdir@/gdm-disable-wayland"
f83012
 ATTR{vendor}=="0x102b", ATTR{device}=="0x0534", RUN+="@libexecdir@/gdm-disable-wayland"
f83012
 ATTR{vendor}=="0x102b", ATTR{device}=="0x0536", RUN+="@libexecdir@/gdm-disable-wayland"
f83012
 ATTR{vendor}=="0x102b", ATTR{device}=="0x0538", RUN+="@libexecdir@/gdm-disable-wayland"
f83012
 
f83012
 # disable Wayland on aspeed chipsets
f83012
 ATTR{vendor}=="0x1a03", ATTR{device}=="0x2010", RUN+="@libexecdir@/gdm-disable-wayland"
f83012
 ATTR{vendor}=="0x1a03", ATTR{device}=="0x2000", RUN+="@libexecdir@/gdm-disable-wayland"
f83012
 
f83012
 # disable Wayland when using the proprietary nvidia driver
f83012
 DRIVER=="nvidia", RUN+="@libexecdir@/gdm-disable-wayland"
f83012
 
f83012
-# disable Wayland on hybrid graphics setups for now
f83012
-SUBSYSTEM=="drm", KERNEL=="card[1-9]*", RUN+="@libexecdir@/gdm-disable-wayland"
f83012
+# disable Wayland on passthrough graphics setups for now (assumes passthrough if
f83012
+# there is more than one card, and one of the cards is virt: cirrus, bochs, qxl)
f83012
+ATTR{vendor}=="0x1013", ATTR{device}=="0x00b8", ATTR{subsystem_vendor}=="0x1af4", ATTR{subsystem_device}=="0x1100", ENV{GDM_HAS_VIRTUAL_GPU}="1"
f83012
+ATTR{vendor}=="0x1b36", ATTR{device}=="0x0100", ENV{GDM_HAS_VIRTUAL_GPU}="1"
f83012
+ATTR{vendor}=="0x1234", ATTR{device}=="0x1111", ENV{GDM_HAS_VIRTUAL_GPU}="1"
f83012
+
f83012
+SUBSYSTEM=="drm", KERNEL=="card[1-9]*", ENV{GDM_HAS_VIRTUAL_GPU}=="1", RUN+="@libexecdir@/gdm-disable-wayland"
f83012
 
f83012
-- 
f83012
2.21.0
f83012