mirror of
				https://github.com/NixOS/nixos-hardware.git
				synced 2025-11-04 17:27:14 +08:00 
			
		
		
		
	apple/macbookpro/11-5: Prevent intermittent xhci wakeup after suspend
This commit is contained in:
		@@ -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"'';
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user