[gdm/disable-hybrid-nvidia: 13/13] data: Disable wayland on guests with passthrough and virt graphics
- From: Ray Strode <halfline src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gdm/disable-hybrid-nvidia: 13/13] data: Disable wayland on guests with passthrough and virt graphics
- Date: Wed, 2 Mar 2022 22:03:08 +0000 (UTC)
commit 0b7f7349b47f9a9dee430a9ef824f14c56009e89
Author: Ray Strode <rstrode redhat com>
Date: Wed Mar 2 16:42:23 2022 -0500
data: Disable wayland on guests with passthrough and virt graphics
If a VM has both virtualized graphics and is passing through host
hardware graphics, then we should disable wayland
data/61-gdm.rules.in | 13 +++++++++++++
1 file changed, 13 insertions(+)
---
diff --git a/data/61-gdm.rules.in b/data/61-gdm.rules.in
index cf2e6c8f0..bcacdb5e0 100644
--- a/data/61-gdm.rules.in
+++ b/data/61-gdm.rules.in
@@ -2,6 +2,12 @@
SUBSYSTEM!="pci", GOTO="gdm_pci_device_end"
ACTION!="add", GOTO="gdm_pci_device_end"
+# identify virtual graphics cards to find passthrough setups
+ATTR{vendor}=="0x1013", ATTR{device}=="0x00b8", ATTR{subsystem_vendor}=="0x1af4",
ATTR{subsystem_device}=="0x1100", RUN+="/usr/bin/touch /run/udev/gdm-machine-has-virtual-gpu",
GOTO="gdm_pci_device_end"
+ATTR{vendor}=="0x1b36", ATTR{device}=="0x0100", RUN+="/usr/bin/touch /run/udev/gdm-machine-has-virtual-gpu",
GOTO="gdm_pci_device_end"
+ATTR{vendor}=="0x1234", ATTR{device}=="0x1111", RUN+="/usr/bin/touch /run/udev/gdm-machine-has-virtual-gpu",
GOTO="gdm_pci_device_end"
+ATTR{vendor}=="0x1af4", ATTR{device}=="0x0010", RUN+="/usr/bin/touch /run/udev/gdm-machine-has-virtual-gpu",
GOTO="gdm_pci_device_end"
+
# disable Wayland on Hi1710 chipsets
ATTR{vendor}=="0x19e5", ATTR{device}=="0x1711", GOTO="gdm_disable_wayland"
@@ -71,6 +77,13 @@ TEST!="/run/udev/gdm-machine-has-vendor-nvidia-driver", GOTO="gdm_hybrid_nvidia_
GOTO="gdm_disable_wayland"
LABEL="gdm_hybrid_nvidia_laptop_check_end"
+# Disable wayland in situation where we're in a guest with a vgpu and host passthrough gpu
+LABEL="gdm_virt_passthrough_check"
+TEST!="/run/udev/gdm-machine-has-hybrid-graphics", GOTO="gdm_virt_passthrough_check_end"
+TEST!="/run/udev/gdm-machine-has-virtual-gpu", GOTO="gdm_virt_passthrough_check_end"
+GOTO="gdm_disable_wayland"
+LABEL="gdm_virt_passthrough_check_end"
+
# Disable wayland when nvidia modeset is disabled or when drivers are a lower
# version than 470,
# For versions above 470 but lower than 510 prefer Xorg,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]