First Commit

This commit is contained in:
2025-11-17 07:19:53 -07:00
parent 93c1ee71ba
commit b3b8177a74
44 changed files with 560 additions and 0 deletions

View File

@@ -0,0 +1,2 @@
[main]
dns=systemd-resolved

View File

@@ -0,0 +1,4 @@
# Force using of the amdgpu driver for Southern Islands (GCN 1.0+) and Sea
# Islands (GCN 2.x) generations.
options amdgpu si_support=1 cik_support=1
options radeon si_support=0 cik_support=0

View File

@@ -0,0 +1,5 @@
# Blacklist the Intel TCO Watchdog/Timer module
blacklist iTCO_wdt
# Blacklist the AMD SP5100 TCO Watchdog/Timer module (Required for Ryzen cpus)
blacklist sp5100_tco

View File

@@ -0,0 +1,21 @@
#
# NVreg_UsePageAttributeTable=1 (Default 0) - Activating the better memory
# management method (PAT). The PAT method creates a partition type table at a
# specific address mapped inside the register and utilizes the memory
# architecture and instruction set more efficiently and faster. If your system
# can support this feature, it should improve CPU performance.
#
# NVreg_InitializeSystemMemoryAllocations=0 (Default 1) - Disables clearing
# system memory allocation before using it for the GPU. Potentially improves
# performance, but at the cost of increased security risks. Write "options
# nvidia NVreg_InitializeSystemMemoryAllocations=1" in
# /etc/modprobe.d/nvidia.conf, if you want to return the default value. Note:
# It is possible to use more memory (?)
#
# NVreg_DynamicPowerManagement=0x02 - Enables the use of dynamic power
# management for Turing generation mobile cards, allowing the dGPU to be
# powered down during idle time.
#
options nvidia NVreg_UsePageAttributeTable=1 \
NVreg_InitializeSystemMemoryAllocations=0 \
NVreg_DynamicPowerManagement=0x02

View File

@@ -0,0 +1,2 @@
# Load i2c-dev.ko at boot
i2c-dev

View File

@@ -0,0 +1,2 @@
# Load i2c-piix4.ko at boot
i2c-piix4

View File

@@ -0,0 +1 @@
ntsync

View File

@@ -0,0 +1,26 @@
### Use only if you want to change the default values!
### For more information look here: https://github.com/firelzrd/bore-scheduler#readme
### Additional settings for BORE Scheduler (Work only if the BORE scheduler is enabled!)
### So make sure that kernel.sched_bore has a value of 1
# sched_burst_cache_lifetime (range: 0 - 4294967295, default: 75000000)
#kernel.sched_burst_cache_lifetime = 75000000
# sched_burst_fork_atavistic (range: 0 - 3, default: 2)
#kernel.sched_burst_fork_atavistic = 2
# sched_burst_penalty_offset (range: 0 - 64, default: 22)
#kernel.sched_burst_penalty_offset = 22
# sched_burst_penalty_scale (range: 0 - 4095, default: 1280)
#kernel.sched_burst_penalty_scale = 1280
# sched_burst_smoothness (range: 1 - 255, default: 20)
#kernel.sched_burst_smoothness = 20
# sched_burst_exclude_kthreads (range: 0 - 1, default: 1)
#kernel.sched_burst_exclude_kthreads = 1
# sched_burst_parity_threshold (range: u8, default: 2)
#kernel.sched_burst_parity_threshold = 2

View File

@@ -0,0 +1,49 @@
# The sysctl swappiness parameter determines the kernel's preference for pushing anonymous pages or page cache to disk in memory-starved situations.
# A low value causes the kernel to prefer freeing up open files (page cache), a high value causes the kernel to try to use swap space,
# and a value of 100 means IO cost is assumed to be equal.
vm.swappiness = 100
# The value controls the tendency of the kernel to reclaim the memory which is used for caching of directory and inode objects (VFS cache).
# Lowering it from the default value of 100 makes the kernel less inclined to reclaim VFS cache (do not set it to 0, this may produce out-of-memory conditions)
vm.vfs_cache_pressure = 50
# Contains, as bytes, the number of pages at which a process which is
# generating disk writes will itself start writing out dirty data.
vm.dirty_bytes = 268435456
# page-cluster controls the number of pages up to which consecutive pages are read in from swap in a single attempt.
# This is the swap counterpart to page cache readahead. The mentioned consecutivity is not in terms of virtual/physical addresses,
# but consecutive on swap space - that means they were swapped out together. (Default is 3)
# increase this value to 1 or 2 if you are using physical swap (1 if ssd, 2 if hdd)
vm.page-cluster = 0
# Contains, as bytes, the number of pages at which the background kernel
# flusher threads will start writing out dirty data.
vm.dirty_background_bytes = 67108864
# The kernel flusher threads will periodically wake up and write old data out to disk. This
# tunable expresses the interval between those wakeups, in 100'ths of a second (Default is 500).
vm.dirty_writeback_centisecs = 1500
# This action will speed up your boot and shutdown, because one less module is loaded. Additionally disabling watchdog timers increases performance and lowers power consumption
# Disable NMI watchdog
kernel.nmi_watchdog = 0
# Enable the sysctl setting kernel.unprivileged_userns_clone to allow normal users to run unprivileged containers.
kernel.unprivileged_userns_clone = 1
# To hide any kernel messages from the console
kernel.printk = 3 3 3 3
# Restricting access to kernel pointers in the proc filesystem
kernel.kptr_restrict = 2
# Disable Kexec, which allows replacing the current running kernel.
kernel.kexec_load_disabled = 1
# Increase netdev receive queue
# May help prevent losing packets
net.core.netdev_max_backlog = 4096
# Set size of file handles and inode cache
fs.file-max = 2097152

View File

@@ -0,0 +1,2 @@
[Journal]
SystemMaxUse=50M

View File

@@ -0,0 +1,3 @@
[Manager]
DefaultTimeoutStartSec=15s
DefaultTimeoutStopSec=10s

View File

@@ -0,0 +1,2 @@
[Manager]
DefaultLimitNOFILE=2048:2097152

View File

@@ -0,0 +1,9 @@
[Unit]
Description=Adjust latency timers for PCI peripherals
[Service]
Type=oneshot
ExecStart=/usr/bin/pci-latency
[Install]
WantedBy=multi-user.target

View File

@@ -0,0 +1,2 @@
[Service]
LogLevelMax=info

View File

@@ -0,0 +1,2 @@
[Service]
Delegate=cpu cpuset io memory pids

View File

@@ -0,0 +1,8 @@
[Time]
NTP=time.cloudflare.com
FallbackNTP=time.google.com 0.arch.pool.ntp.org 1.arch.pool.ntp.org 2.arch.pool.ntp.org 3.arch.pool.ntp.org
#RootDistanceMaxSec=5
#PollIntervalMinSec=32
#PollIntervalMaxSec=2048
#ConnectionRetrySec=30
#SaveIntervalSec=60

View File

@@ -0,0 +1,2 @@
[Manager]
DefaultLimitNOFILE=1024:1048576

View File

@@ -0,0 +1,5 @@
[zram0]
compression-algorithm = zstd
zram-size = ram
swap-priority = 100
fs-type = swap

View File

@@ -0,0 +1,2 @@
# Clear all coredumps that were created more than 3 days ago
d /var/lib/systemd/coredump 0755 root root 3d

View File

@@ -0,0 +1,6 @@
# THP Shrinker has been added in the 6.12 Kernel
# Default Value is 511
# THP=always policy vastly overprovisions THPs in sparsely accessed memory areas, resulting in excessive memory pressure and premature OOM killing
# 409 means that any THP that has more than 409 out of 512 (80%) zero filled filled pages will be split.
# This reduces the memory usage, when THP=always used and the memory usage goes down to around the same usage as when madvise is used, while still providing an equal performance improvement
w! /sys/kernel/mm/transparent_hugepage/khugepaged/max_ptes_none - - - - 409

View File

@@ -0,0 +1,3 @@
# Improve performance for applications that use tcmalloc
# https://github.com/google/tcmalloc/blob/master/docs/tuning.md#system-level-optimizations
w! /sys/kernel/mm/transparent_hugepage/defrag - - - - defer+madvise

View File

@@ -0,0 +1,17 @@
# Disables power saving capabilities for snd-hda-intel when device is not
# running on battery power. This is needed because it prevents audio cracks on
# some hardware.
ACTION=="add", SUBSYSTEM=="sound", KERNEL=="card*", DRIVERS=="snd_hda_intel", TEST!="/run/udev/snd-hda-intel-powersave", \
RUN+="/usr/bin/bash -c 'touch /run/udev/snd-hda-intel-powersave; \
[[ $$(cat /sys/class/power_supply/BAT0/status 2>/dev/null) != \"Discharging\" ]] && \
echo $$(cat /sys/module/snd_hda_intel/parameters/power_save) > /run/udev/snd-hda-intel-powersave && \
echo 0 > /sys/module/snd_hda_intel/parameters/power_save'"
SUBSYSTEM=="power_supply", ENV{POWER_SUPPLY_ONLINE}=="0", TEST=="/sys/module/snd_hda_intel", \
RUN+="/usr/bin/bash -c 'echo $$(cat /run/udev/snd-hda-intel-powersave 2>/dev/null || \
echo 10) > /sys/module/snd_hda_intel/parameters/power_save'"
SUBSYSTEM=="power_supply", ENV{POWER_SUPPLY_ONLINE}=="1", TEST=="/sys/module/snd_hda_intel", \
RUN+="/usr/bin/bash -c '[[ $$(cat /sys/module/snd_hda_intel/parameters/power_save) != 0 ]] && \
echo $$(cat /sys/module/snd_hda_intel/parameters/power_save) > /run/udev/snd-hda-intel-powersave; \
echo 0 > /sys/module/snd_hda_intel/parameters/power_save'"

View File

@@ -0,0 +1,14 @@
# When used with ZRAM, it is better to prefer page out only anonymous pages,
# because it ensures that they do not go out of memory, but will be just
# compressed. If we do frequent flushing of file pages, that increases the
# percentage of page cache misses, which in the long term gives additional
# cycles to re-read the same data from disk that was previously in page cache.
# This is the reason why it is recommended to use high values from 100 to keep
# the page cache as hermetic as possible, because otherwise it is "expensive"
# to read data from disk again. At the same time, uncompressing pages from ZRAM
# is not as expensive and is usually very fast on modern CPUs.
#
# Also it's better to disable Zswap, as this may prevent ZRAM from working
# properly or keeping a proper count of compressed pages via zramctl.
ACTION=="change", KERNEL=="zram0", ATTR{initstate}=="1", SYSCTL{vm.swappiness}="150", \
RUN+="/bin/sh -c 'echo N > /sys/module/zswap/parameters/enabled'"

View File

@@ -0,0 +1,2 @@
KERNEL=="rtc0", GROUP="audio"
KERNEL=="hpet", GROUP="audio"

View File

@@ -0,0 +1,4 @@
# SATA Active Link Power Management
ACTION=="add", SUBSYSTEM=="scsi_host", KERNEL=="host*", \
ATTR{link_power_management_policy}=="*", \
ATTR{link_power_management_policy}="max_performance"

View File

@@ -0,0 +1,11 @@
# HDD
ACTION=="add|change", KERNEL=="sd[a-z]*", ATTR{queue/rotational}=="1", \
ATTR{queue/scheduler}="bfq"
# SSD
ACTION=="add|change", KERNEL=="sd[a-z]*|mmcblk[0-9]*", ATTR{queue/rotational}=="0", \
ATTR{queue/scheduler}="mq-deadline"
# NVMe SSD
ACTION=="add|change", KERNEL=="nvme[0-9]*", ATTR{queue/rotational}=="0", \
ATTR{queue/scheduler}="none"

View File

@@ -0,0 +1,2 @@
ACTION=="add|change", KERNEL=="sd[a-z]", ATTR{queue/rotational}=="1", \
ATTRS{id/bus}=="ata", RUN+="/usr/bin/hdparm -B 254 -S 0 /dev/%k"

View File

@@ -0,0 +1,9 @@
# Enable runtime PM for NVIDIA VGA/3D controller devices on driver bind
ACTION=="add|bind", SUBSYSTEM=="pci", DRIVERS=="nvidia", \
ATTR{vendor}=="0x10de", ATTR{class}=="0x03[0-9]*", \
TEST=="power/control", ATTR{power/control}="auto"
# Disable runtime PM for NVIDIA VGA/3D controller devices on driver unbind
ACTION=="remove|unbind", SUBSYSTEM=="pci", DRIVERS=="nvidia", \
ATTR{vendor}=="0x10de", ATTR{class}=="0x03[0-9]*", \
TEST=="power/control", ATTR{power/control}="on"

View File

@@ -0,0 +1 @@
DEVPATH=="/devices/virtual/misc/cpu_dma_latency", OWNER="root", GROUP="audio", MODE="0660"