Browse Source

Unload USB controllers drivers in USB VM before going to sleep

Many USB controllers doesn't play nice with suspend when attached to PV
domain, so unload those drivers by default. This is just a configuration
file, so user is free to change this setting if his/shes particular
controller doesn't have such problem.

Fixes QubesOS/qubes-issues#1565
Marek Marczykowski-Górecki 8 years ago
parent
commit
d4c238c45e
3 changed files with 8 additions and 0 deletions
  1. 1 0
      Makefile
  2. 6 0
      misc/qubes-suspend-module-blacklist
  3. 1 0
      rpm_spec/core-vm.spec

+ 1 - 0
Makefile

@@ -216,6 +216,7 @@ install-common:
 	install qubes-rpc/qrun-in-vm $(DESTDIR)$(LIBDIR)/qubes
 	install qubes-rpc/sync-ntp-clock $(DESTDIR)$(LIBDIR)/qubes
 	install qubes-rpc/prepare-suspend $(DESTDIR)$(LIBDIR)/qubes
+	install -m 0644 misc/qubes-suspend-module-blacklist $(DESTDIR)/etc/qubes-suspend-module-blacklist
 	install -d $(DESTDIR)/$(KDESERVICEDIR)
 	install -m 0644 qubes-rpc/{qvm-copy.desktop,qvm-move.desktop,qvm-dvm.desktop} $(DESTDIR)/$(KDESERVICEDIR)
 	install -d $(DESTDIR)/etc/qubes-rpc

+ 6 - 0
misc/qubes-suspend-module-blacklist

@@ -0,0 +1,6 @@
+# You can list here modules you want to be unloaded before going to sleep. This
+# file is used only if the VM has any PCI device assigned. Modules will be
+# automatically loaded after resume.
+
+ehci_pci
+xhci_pci

+ 1 - 0
rpm_spec/core-vm.spec

@@ -359,6 +359,7 @@ rm -f %{name}-%{version}
 %config(noreplace) /etc/tinyproxy/updates-blacklist
 %config(noreplace) /etc/udev/rules.d/50-qubes-misc.rules
 %config(noreplace) /etc/udev/rules.d/99-qubes-network.rules
+%config(noreplace) /etc/qubes-suspend-module-blacklist
 /etc/xdg/autostart/00-qubes-show-hide-nm-applet.desktop
 /etc/xen/scripts/vif-route-qubes
 %config(noreplace) /etc/yum.conf.d/qubes-proxy.conf