amdgpu: add custom fan control
This commit is contained in:
		
							parent
							
								
									7ccbca83bc
								
							
						
					
					
						commit
						ee22f17dbe
					
				
					 3 changed files with 59 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -1,4 +1,4 @@
 | 
			
		|||
{ pkgs, ... }:
 | 
			
		||||
{ pkgs, lib, ... }:
 | 
			
		||||
let
 | 
			
		||||
  undervoltGpu = pkgs.writeShellScript "undervolt-gpu" ''
 | 
			
		||||
    set -xe
 | 
			
		||||
| 
						 | 
				
			
			@ -18,6 +18,13 @@ in
 | 
			
		|||
    "amdgpu.ppfeaturemask=0xfffd7fff" # enable undervolting
 | 
			
		||||
  ];
 | 
			
		||||
 | 
			
		||||
  systemd.services.amd-fan-control = {
 | 
			
		||||
    script = ''
 | 
			
		||||
      ${lib.getExe pkgs.amd-fan-control} /sys/class/drm/card1/device 60 85
 | 
			
		||||
    '';
 | 
			
		||||
    wantedBy = [ "multi-user.target" ];
 | 
			
		||||
  };
 | 
			
		||||
 | 
			
		||||
  hardware.opengl.driSupport = true;
 | 
			
		||||
  # # For 32 bit applications
 | 
			
		||||
  hardware.opengl.driSupport32Bit = true;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue