From 21864ab563ca8ed1b189c60f3bd4e32edb919595 Mon Sep 17 00:00:00 2001 From: Artur Puzio Date: Tue, 25 Aug 2020 14:51:21 +0200 Subject: [PATCH] Skip IGD when unbinding device drivers on suspend --- qubes-rpc/prepare-suspend | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/qubes-rpc/prepare-suspend b/qubes-rpc/prepare-suspend index f96a2c0..611b58b 100755 --- a/qubes-rpc/prepare-suspend +++ b/qubes-rpc/prepare-suspend @@ -38,11 +38,17 @@ if [ x"$action" = x"suspend" ]; then # detach all drivers from PCI devices (the real ones, not emulated by qemu) echo -n > /var/run/qubes-suspend-pci-devs-detached for dev_path in /sys/bus/pci/devices/*; do - # skip qemu emulated devs subsystem_vendor=$(cat "$dev_path/subsystem_vendor") + vendor=$(cat "$dev_path/vendor") + class=$(cat "$dev_path/class") + # skip qemu emulated devs if [ "$subsystem_vendor" = "0x1af4" ] || [ "$subsystem_vendor" = "0x5853" ]; then continue fi + # skip Intel Graphics Device + if [ "$vendor" = "0x8086" ] && [ "$class" = "0x030000" ]; then + continue + fi if ! [ -e "$dev_path/driver" ]; then continue fi