From 31ac1037788cb2a65b058993c97d674fa781f60e Mon Sep 17 00:00:00 2001 From: Tulili Date: Sun, 17 Mar 2024 02:38:15 -0300 Subject: [PATCH] feat: CachyOS audio-related configurations --- config/files/shared/etc/modprobe.d/nvidia.conf | 2 ++ config/files/shared/etc/security/limits.d/99-audio.conf | 2 ++ config/files/shared/etc/security/limits.d/99-esync.conf | 1 + config/files/shared/etc/security/limits.d/99-realtime.conf | 2 ++ .../etc/systemd/system/rtkit-daemon.service.d/override.conf | 2 ++ .../files/shared/etc/tmpfiles.d/optimize-interruptfreq.conf | 4 ++++ .../files/shared/etc/udev/rules.d/40-hpet-permissions.rules | 2 ++ 7 files changed, 15 insertions(+) create mode 100644 config/files/shared/etc/modprobe.d/nvidia.conf create mode 100644 config/files/shared/etc/security/limits.d/99-audio.conf create mode 100644 config/files/shared/etc/security/limits.d/99-esync.conf create mode 100644 config/files/shared/etc/security/limits.d/99-realtime.conf create mode 100644 config/files/shared/etc/systemd/system/rtkit-daemon.service.d/override.conf create mode 100644 config/files/shared/etc/tmpfiles.d/optimize-interruptfreq.conf create mode 100644 config/files/shared/etc/udev/rules.d/40-hpet-permissions.rules diff --git a/config/files/shared/etc/modprobe.d/nvidia.conf b/config/files/shared/etc/modprobe.d/nvidia.conf new file mode 100644 index 0000000..f489275 --- /dev/null +++ b/config/files/shared/etc/modprobe.d/nvidia.conf @@ -0,0 +1,2 @@ +options nvidia NVreg_UsePageAttributeTable=1 NVreg_InitializeSystemMemoryAllocations=0 NVreg_DynamicPowerManagement=0x02 +options nvidia_drm modeset=1 fbdev=1 diff --git a/config/files/shared/etc/security/limits.d/99-audio.conf b/config/files/shared/etc/security/limits.d/99-audio.conf new file mode 100644 index 0000000..48d19ba --- /dev/null +++ b/config/files/shared/etc/security/limits.d/99-audio.conf @@ -0,0 +1,2 @@ +@audio - rtprio 99 +@audio - memlock unlimited diff --git a/config/files/shared/etc/security/limits.d/99-esync.conf b/config/files/shared/etc/security/limits.d/99-esync.conf new file mode 100644 index 0000000..886983a --- /dev/null +++ b/config/files/shared/etc/security/limits.d/99-esync.conf @@ -0,0 +1 @@ +* hard nofile 2097152 diff --git a/config/files/shared/etc/security/limits.d/99-realtime.conf b/config/files/shared/etc/security/limits.d/99-realtime.conf new file mode 100644 index 0000000..619b516 --- /dev/null +++ b/config/files/shared/etc/security/limits.d/99-realtime.conf @@ -0,0 +1,2 @@ +@realtime - rtprio 99 +@realtime - memlock unlimited diff --git a/config/files/shared/etc/systemd/system/rtkit-daemon.service.d/override.conf b/config/files/shared/etc/systemd/system/rtkit-daemon.service.d/override.conf new file mode 100644 index 0000000..01e6116 --- /dev/null +++ b/config/files/shared/etc/systemd/system/rtkit-daemon.service.d/override.conf @@ -0,0 +1,2 @@ +[Service] +LogLevelMax=info diff --git a/config/files/shared/etc/tmpfiles.d/optimize-interruptfreq.conf b/config/files/shared/etc/tmpfiles.d/optimize-interruptfreq.conf new file mode 100644 index 0000000..cdc349d --- /dev/null +++ b/config/files/shared/etc/tmpfiles.d/optimize-interruptfreq.conf @@ -0,0 +1,4 @@ +# Increase the highest requested RTC interrupt frequency +# https://wiki.archlinux.org/title/Professional_audio#System_configuration +w! /sys/class/rtc/rtc0/max_user_freq - - - - 3072 +w! /proc/sys/dev/hpet/max-user-freq - - - - 3072 diff --git a/config/files/shared/etc/udev/rules.d/40-hpet-permissions.rules b/config/files/shared/etc/udev/rules.d/40-hpet-permissions.rules new file mode 100644 index 0000000..7af3780 --- /dev/null +++ b/config/files/shared/etc/udev/rules.d/40-hpet-permissions.rules @@ -0,0 +1,2 @@ +KERNEL=="rtc0", GROUP="audio" +KERNEL=="hpet", GROUP="audio"