diff --git a/mkosi.extra/usr/lib/modprobe.d/98-kde-linux-watchdog.conf b/mkosi.extra/usr/lib/modprobe.d/98-kde-linux-watchdog.conf new file mode 100644 index 0000000..f088323 --- /dev/null +++ b/mkosi.extra/usr/lib/modprobe.d/98-kde-linux-watchdog.conf @@ -0,0 +1,15 @@ +# SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL +# SPDX-FileCopyrightText: none + +# We disable watchdogs by default in KDE Linux using the "nowatchdog" kernel parameter, +# as they aren't relevant to normal desktop use cases. So also disable their unused +# kernel modules to reduce power usage and shave milliseconds off boot/shutdown times: + +# Intel +blacklist iTCO_wdt + +# AMD +blacklist sp5100_tco + +# Miscellaneous +blacklist wdat_wdt diff --git a/mkosi.extra/usr/lib/rebuild-efi b/mkosi.extra/usr/lib/rebuild-efi index d205ba7..16df8d0 100755 --- a/mkosi.extra/usr/lib/rebuild-efi +++ b/mkosi.extra/usr/lib/rebuild-efi @@ -34,6 +34,7 @@ echo "rw \ nohz=on nohz_full=all \ rcu_nocbs=all rcutree.enable_rcu_lazy=1 \ amdgpu.dcdebugmask=0x10 \ + nowatchdog \ vt.global_cursor_default=0 quiet splash plymouth.ignore-serial-consoles loglevel=3" > cmdline mkinitcpio --config mkinitcpio.conf --generate initrd --kernel "$kernel_version" ukify build \ @@ -55,6 +56,8 @@ ukify build \ # automatically by nohz_full=all, but we manually specify it here anyway because # rcutree.enable_rcu_lazy=1 needs it and we don't want that to break. +# "nowatchdog" turns off all watchdog functionality. + # amdgpu.dcdebugmask=0x10 works around https://gitlab.freedesktop.org/drm/amd/-/issues/4831 echo "rw rootflags=subvol=@system,compress=zstd:-4,lazytime \ lsm=landlock,lockdown,yama,integrity,bpf \ @@ -64,6 +67,7 @@ echo "rw rootflags=subvol=@system,compress=zstd:-4,lazytime \ rcu_nocbs=all rcutree.enable_rcu_lazy=1 \ amdgpu.dcdebugmask=0x10 \ systemd.hostname=kde-linux \ + nowatchdog \ vt.global_cursor_default=0 quiet splash plymouth.ignore-serial-consoles loglevel=3" > cmdline mkinitcpio --config mkinitcpio.conf --generate initrd --kernel "$kernel_version" ukify build \ diff --git a/mkosi.extra/usr/lib/sysctl.d/11-kde-linux-default.conf b/mkosi.extra/usr/lib/sysctl.d/11-kde-linux-default.conf index 90954bb..8a96a7a 100644 --- a/mkosi.extra/usr/lib/sysctl.d/11-kde-linux-default.conf +++ b/mkosi.extra/usr/lib/sysctl.d/11-kde-linux-default.conf @@ -15,8 +15,6 @@ vm.watermark_boost_factor = 0 vm.watermark_scale_factor = 125 # Many Windows games need this disabled to run with proper performance; they abuse split locks kernel.split_lock_mitigate = 0 -# Not needed for us; disabling it increases speed and reduces power consumption -kernel.nmi_watchdog = 0 # Use 'bbr' to achieve higher throughput when sending to high-latency destinations. # Also 'fq' to prevent one greedy app from causing lag (bufferbloat) for everything else. # `bbr` relies on pacing, and thus performs better with the `fq` qdisc.