feat: pipewire fixes

fix: xinit hanging
This commit is contained in:
Patrick 2023-09-24 01:21:36 +02:00
parent 18172f83c1
commit b1943da1cc
Signed by: patrick
GPG key ID: 451F95EFB8BECD0F
4 changed files with 55 additions and 2 deletions

View file

@ -29,5 +29,6 @@
]; ];
stylix.fonts.sizes = { stylix.fonts.sizes = {
terminal = 10; terminal = 10;
applications = 10;
}; };
} }

View file

@ -14,6 +14,57 @@
jack.enable = true; jack.enable = true;
pulse.enable = true; pulse.enable = true;
}; };
environment.etc = {
# Allow pipewire to dynamically adjust the rate sent to the devices based on the playback stream
"pipewire/pipewire.conf.d/99-allowed-rates.conf".text = builtins.toJSON {
"context.properties"."default.clock.allowed-rates" = [
44100
48000
88200
96000
176400
192000
];
};
# Nixos wiki copied
"pipewire/pipewire.conf.d/92-low-latency.conf".text = ''
context.properties = {
default.clock.rate = 48000
default.clock.quantum = 32
default.clock.min-quantum = 32
default.clock.max-quantum = 32
}
'';
"pipewire/pipewire-pulse.d/91-low-latency.conf".text = builtins.toJSON {
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";
};
}
];
stream.properties = {
node.latency = "32/48000";
resample.quality = 1;
};
};
# If resampling is required, use a higher quality. 15 is overkill and too cpu expensive without any obvious audible advantage
"pipewire/pipewire-pulse.conf.d/99-resample.conf".text = builtins.toJSON {
"stream.properties"."resample.quality" = 10;
};
"pipewire/client.conf.d/99-resample.conf".text = builtins.toJSON {
"stream.properties"."resample.quality" = 10;
};
"pipewire/client-rt.conf.d/99-resample.conf".text = builtins.toJSON {
"stream.properties"."resample.quality" = 10;
};
};
sound.enable = false; sound.enable = false;
} }

View file

@ -21,6 +21,6 @@ if command -v dbus-update-activation-environment >/dev/null 2>&1; then
fi fi
autorandr -c autorandr -c
streamdeck --no-ui streamdeck --no-ui &
systemctl --user start set-wallpaper.service systemctl --user start set-wallpaper.timer &
exec i3 exec i3

View file

@ -15,6 +15,7 @@ in {
#bindkeysToCode = true; #bindkeysToCode = true;
window.titlebar = false; window.titlebar = false;
floating.titlebar = false; floating.titlebar = false;
workspaceLayout = "stacking";
workspaceOutputAssign = [ workspaceOutputAssign = [
{ {
workspace = "1"; workspace = "1";