Skip to content

Commit

Permalink
Try making pipewire more stable
Browse files Browse the repository at this point in the history
  • Loading branch information
joinemm committed Aug 25, 2024
1 parent 42fe346 commit 8b1dd47
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 10 deletions.
14 changes: 13 additions & 1 deletion home-modules/easyeffects/default.nix
Original file line number Diff line number Diff line change
@@ -1,11 +1,23 @@
{
{pkgs, ...}: {
imports = [
./preset.nix
];

services.easyeffects = {
enable = true;

# temp fix: https://github.com/NixOS/nixpkgs/issues/335551
# waiting for: https://github.com/NixOS/nixpkgs/pull/335759
package = pkgs.easyeffects.overrideAttrs (_: {
version = "v7.1.8";
src = pkgs.fetchFromGitHub {
owner = "wwmm";
repo = "easyeffects";
rev = "v7.1.8";
hash = "sha256-eDjtmr100WOCd0k0p3rUEtu6O9LlSGs43oaIXT07ikI=";
};
});

presets = [
{
# Antlion Modmic Wireless
Expand Down
34 changes: 25 additions & 9 deletions modules/desktop/sound.nix
Original file line number Diff line number Diff line change
@@ -1,24 +1,40 @@
{pkgs, ...}: {
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;

# https://www.reddit.com/r/linux/comments/1em8biv/psa_pipewire_has_been_halving_your_battery_life/
wireplumber.extraConfig."10-disable-camera.conf" = {
"wireplumber.profiles".main."monitor.libcamera" = "disabled";
wireplumber = {
enable = true;
extraConfig."10-disable-camera.conf" = {
"wireplumber.profiles".main."monitor.libcamera" = "disabled";
};
};

extraConfig.pipewire-pulse."92-low-latency" = {
"context.properties" = [
{
name = "libpipewire-module-protocol-pulse";
args = {};
}
];
"pulse.properties" = {
"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";
};
"stream.properties" = {
"node.latency" = "32/48000";
"resample.quality" = 1;
};
};
};

security.rtkit.enable = true;

hardware.pulseaudio.daemon.config = {
default-sample-format = "float32le";
};

environment.systemPackages = with pkgs; [
alsa-utils
pulseaudio
playerctl
];
Expand Down

0 comments on commit 8b1dd47

Please sign in to comment.