apple/macbookpro/11-5: Prevent intermittent xhci wakeup after suspend

This commit is contained in:
Rehno Lindeque
2018-07-28 13:41:15 -04:00
parent e31b175128
commit 694fd85397
2 changed files with 34 additions and 1 deletions

View File

@@ -1,4 +1,10 @@
{ lib, pkgs, ... }:
{ lib, config, pkgs, ... }:
let
kernelPackages = config.boot.kernelPackages;
in
{
imports = [
@@ -14,4 +20,11 @@
hardware.opengl.driSupport32Bit = false;
services.xserver.videoDrivers = [ "ati" ];
services.udev.extraRules =
# Disable XHC1 wakeup signal to avoid resume getting triggered some time
# after suspend. Reboot required for this to take effect.
lib.optionalString
(lib.versionAtLeast kernelPackages.kernel.version "3.13")
''SUBSYSTEM=="pci", KERNEL=="0000:00:14.0", ATTR{power/wakeup}="disabled"'';
}