From e18540fd3ecb067026ef4431197662f295a26d4b Mon Sep 17 00:00:00 2001 From: Oromis Foxtail Date: Thu, 23 Apr 2026 18:58:24 +0200 Subject: updated audio to proper values --- hosts/herra/audio.nix | 58 +++++++++++++++++++++++++-------------------------- 1 file changed, 29 insertions(+), 29 deletions(-) (limited to 'hosts/herra') diff --git a/hosts/herra/audio.nix b/hosts/herra/audio.nix index 17bdcbc..2805547 100644 --- a/hosts/herra/audio.nix +++ b/hosts/herra/audio.nix @@ -10,34 +10,34 @@ # Lower audio latency # TODO: Every setup is different, and a lot of factors determine your final latency, like CPU speed, RT/PREEMPTIVE kernels and soundcards supporting different audio formats. That's why 32/48000 isn't always a value that's going to work for everyone. The best way to get everything working is to keep increasing the quant value until you get no crackles (underruns) or until you get audio again (in case there wasn't any). This won't guarantee the lowest possible latency, but will provide a decent one paired with stable audio. - extraConfig = { - pipewire."92-low-latency" = { - "context.properties" = { - "default.clock.rate" = 48000; - "default.clock.quantum" = 32; - "default.clock.min-quantum" = 32; - "default.clock.max-quantum" = 32; # Maybe set this to a max of 128 or 256 (as advised by Jade) - }; - }; - - pipewire-pulse."92-low-latency" = { - context.modules = [ - { - name = "libpipewire-module-protocol-pulse"; - args = { - pulse.min.req = "32/48000"; - pulse.default.req = "32/48000"; - pulse.max.req = "32/48000"; - pulse.min.quantum = "32/48000"; - pulse.max.quantum = "32/48000"; # Maybe set this to a max of 128 or 256 (as advised by Jade) - }; - } - ]; - stream.properties = { - node.latency = "32/48000"; - resample.quality = 1; - }; - }; - }; + # extraConfig = { + # pipewire."92-low-latency" = { + # "context.properties" = { + # "default.clock.rate" = 48000; + # "default.clock.quantum" = 128; + # "default.clock.min-quantum" = 32; + # "default.clock.max-quantum" = 256; # Maybe set this to a max of 128 or 256 (as advised by Jade) + # }; + # }; + # + # pipewire-pulse."92-low-latency" = { + # context.modules = [ + # { + # name = "libpipewire-module-protocol-pulse"; + # args = { + # pulse.min.req = "32/48000"; + # pulse.default.req = "32/48000"; + # pulse.max.req = "32/48000"; + # pulse.min.quantum = "32/48000"; + # pulse.max.quantum = "256/48000"; # Maybe set this to a max of 128 or 256 (as advised by Jade) + # }; + # } + # ]; + # stream.properties = { + # node.latency = "32/48000"; + # resample.quality = 1; + # }; + # }; + # }; }; } -- cgit v1.2.3 From 26be8efc68b580e538f405aff75bea8bbe71d5bd Mon Sep 17 00:00:00 2001 From: Oromis Foxtail Date: Thu, 23 Apr 2026 18:58:54 +0200 Subject: Updated drivers for hewrra to preperly set the gpu to tis max --- hosts/herra/drivers.nix | 50 +++++++++++++++++++++++++++++-------------------- 1 file changed, 30 insertions(+), 20 deletions(-) (limited to 'hosts/herra') diff --git a/hosts/herra/drivers.nix b/hosts/herra/drivers.nix index e731695..27b75ae 100644 --- a/hosts/herra/drivers.nix +++ b/hosts/herra/drivers.nix @@ -2,27 +2,37 @@ services.xserver.videoDrivers = ["amdgpu"]; # AMD GPU drivers boot.kernel.sysctl."kernel.sched_rt_runtime_us" = -1; # Realtime audio - hardware = { + hardware = { graphics = { - enable = true; - enable32Bit = true; # CRITICAL for Steam/Proton - extraPackages = with pkgs; [ - rocmPackages.clr.icd # OpenCL - ]; - extraPackages32 = with pkgs; [ - ]; -}; + enable = true; + enable32Bit = true; # CRITICAL for Steam/Proton + extraPackages = with pkgs; [ + rocmPackages.clr.icd # OpenCL + ]; + extraPackages32 = with pkgs; [ + ]; + }; + + cpu.intel.updateMicrocode = true; -cpu.intel.updateMicrocode = true; + enableRedistributableFirmware = true; + }; + #TODO: FIX + #boot.extraModulePackages = with boot.kernelPackages; [ + # v4l2loopback + #]; + boot.kernelModules = ["v4l2loopback"]; + boot.extraModprobeConfig = '' + options v4l2loopback devices=1 video_nr=1 card_label="OBS Virtual Camera" exclusive_caps=1 + ''; + + systemd.tmpfiles.rules = [ + "w /sys/class/drm/card1/device/power_dpm_force_performance_level - - - - manual" + "w /sys/class/drm/card1/device/pp_dpm_sclk - - - - 7" + "w /sys/class/drm/card1/device/pp_dpm_mclk - - - - 1" + ]; -enableRedistributableFirmware = true; -}; -#TODO: FIX -#boot.extraModulePackages = with boot.kernelPackages; [ -# v4l2loopback -#]; -boot.kernelModules = [ "v4l2loopback" ]; -boot.extraModprobeConfig = '' - options v4l2loopback devices=1 video_nr=1 card_label="OBS Virtual Camera" exclusive_caps=1 -''; + services.udev.extraRules = '' + SUBSYSTEM=="hwmon", ATTRS{name}=="amdgpu", ATTR{power1_cap}="75000000" + ''; } -- cgit v1.2.3