mirror of
				https://github.com/NixOS/nixos-hardware.git
				synced 2025-11-04 17:27:14 +08:00 
			
		
		
		
	Merge #580
580: Improve the configuration of asus ga401 r=Mic92 a=LostAttractor Co-authored-by: ChaosAttractor <46527539+LostAttractor@users.noreply.github.com> Co-authored-by: ChaosAttractor <lostattractor@gmail.com>
This commit is contained in:
		@@ -1,21 +1,35 @@
 | 
			
		||||
{ ... }:
 | 
			
		||||
{ lib, ... }:
 | 
			
		||||
 | 
			
		||||
{
 | 
			
		||||
  imports = [
 | 
			
		||||
    ../../../common/cpu/amd
 | 
			
		||||
    ../../../common/cpu/amd/pstate.nix
 | 
			
		||||
    ../../../common/gpu/amd
 | 
			
		||||
    ../../../common/gpu/nvidia/prime.nix
 | 
			
		||||
    ../../../common/pc/laptop
 | 
			
		||||
    ../../../common/pc/ssd
 | 
			
		||||
    ../../../common/pc/laptop/ssd
 | 
			
		||||
  ];
 | 
			
		||||
 | 
			
		||||
  hardware.nvidia.prime = {
 | 
			
		||||
    amdgpuBusId = "PCI:4:0:0";
 | 
			
		||||
    nvidiaBusId = "PCI:1:0:0";
 | 
			
		||||
  hardware.nvidia = {
 | 
			
		||||
    # PCI-Express Runtime D3 Power Management is enabled by default on this laptop
 | 
			
		||||
    # But it can fix screen tearing & suspend/resume screen corruption in sync mode
 | 
			
		||||
    modesetting.enable = lib.mkDefault true;
 | 
			
		||||
    # Enable DRM kernel mode setting
 | 
			
		||||
    powerManagement.enable = lib.mkDefault true;
 | 
			
		||||
    
 | 
			
		||||
    prime = {
 | 
			
		||||
      amdgpuBusId = "PCI:4:0:0";
 | 
			
		||||
      nvidiaBusId = "PCI:1:0:0";
 | 
			
		||||
    };
 | 
			
		||||
  };
 | 
			
		||||
 | 
			
		||||
  # fixes mic mute button
 | 
			
		||||
  services.udev.extraHwdb = ''
 | 
			
		||||
    evdev:name:*:dmi:bvn*:bvr*:bd*:svnASUS*:pn*:*
 | 
			
		||||
     KEYBOARD_KEY_ff31007c=f20
 | 
			
		||||
  '';
 | 
			
		||||
  services = {
 | 
			
		||||
    asusd.enable = lib.mkDefault true;
 | 
			
		||||
 | 
			
		||||
    # fixes mic mute button
 | 
			
		||||
    udev.extraHwdb = ''
 | 
			
		||||
      evdev:name:*:dmi:bvn*:bvr*:bd*:svnASUS*:pn*:*
 | 
			
		||||
       KEYBOARD_KEY_ff31007c=f20
 | 
			
		||||
    '';
 | 
			
		||||
  };
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user