Skip to content

Commit acd1c83

Browse files
authored
Merge pull request #477 from Gaming-Linux-FR/omnislash-bfq
Passage à BFQ en ordonnanceur et configuration de pipewire 48khz + quantum 128 (idéal gaming et multimédia)
2 parents 6290be9 + a1d9ac4 commit acd1c83

File tree

2 files changed

+38
-9
lines changed

2 files changed

+38
-9
lines changed

modules/default/boot.nix

Lines changed: 29 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,37 @@ in
1414
type = lib.types.bool;
1515
default = true;
1616
};
17+
1718
config = lib.mkIf config.glf.boot.enable {
18-
#GLF wallpaper as grub splashscreen
19+
nixpkgs.overlays = [
20+
(self: super: {
21+
linuxPackages = super.linuxPackages // {
22+
kernel = super.linuxPackages.kernel.override {
23+
structuredExtraConfig = with lib.kernel; {
24+
HZ_1000 = yes;
25+
HZ = 1000;
26+
PREEMPT_FULL = yes;
27+
IOSCHED_BFQ = yes;
28+
DEFAULT_BFQ = yes;
29+
DEFAULT_IOSCHED = "bfq";
30+
V4L2_LOOPBACK = module;
31+
HID = yes;
32+
};
33+
};
34+
};
35+
})
36+
];
37+
38+
services.udev.extraRules = ''
39+
ACTION=="add|change", SUBSYSTEM=="block", ATTR{queue/scheduler}="bfq"
40+
'';
41+
1942
boot.loader.grub.splashImage = ../../assets/wallpaper/dark.jpg;
2043
boot.loader.grub.default = "saved";
2144
boot = {
22-
#kernelPackages = pkgs.linuxPackages_zen;
45+
kernelPackages = pkgs.linuxPackages;
2346
tmp.cleanOnBoot = true;
24-
supportedFilesystems.zfs = lib.mkForce false; # Force disable ZFS
47+
supportedFilesystems.zfs = lib.mkForce false;
2548
kernelParams =
2649
if builtins.elem "kvm-amd" config.boot.kernelModules then [ "amd_pstate=active" "nosplit_lock_mitigate" "clearcpuid=514" ] else [ "nosplit_lock_mitigate" ];
2750
plymouth = {
@@ -43,13 +66,12 @@ in
4366
kernel_kptr_restrict = 2;
4467
kernel_kexec_load_disabled = 1;
4568
};
46-
};
47-
48-
# Utiliser Mesa unstable directement depuis pkgs-unstable
69+
};
70+
4971
hardware.graphics = {
5072
enable = true;
5173
package = pkgs.mesa;
5274
package32 = pkgs.pkgsi686Linux.mesa;
5375
};
54-
};
76+
};
5577
}

modules/default/pipewire.nix

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
security.rtkit.enable = true;
1414
services.pipewire = {
1515
enable = true;
16-
1716
jack.enable = true;
1817
pulse.enable = true;
1918

@@ -22,6 +21,14 @@ extraConfig.pipewire."91-min-quantum" = {
2221
"default.clock.min-quantum" = 1024;
2322
};
2423
};
24+
extraConfig.pipewire."92-low-latency" = {
25+
"context.properties" = {
26+
"default.clock.rate" = 48000;
27+
"default.clock.quantum" = 128;
28+
"default.clock.min-quantum" = 128;
29+
"default.clock.max-quantum" = 128;
30+
};
31+
};
2532
alsa = {
2633
enable = true;
2734
support32Bit = true;
@@ -36,8 +43,8 @@ extraConfig.pipewire."91-min-quantum" = {
3643
};
3744
};
3845
};
39-
};
4046

47+
};
4148
};
4249

4350
}

0 commit comments

Comments
 (0)