diff --git a/comps.xml b/comps.xml index f3635e2..4ce435a 100644 --- a/comps.xml +++ b/comps.xml @@ -32,6 +32,7 @@ ultramarine-shell-config ultramarine-release ultramarine-fun + ultramarine-system-configs-core ultramarine-phony-bookmarks git golang-github-ultramarine-linux-um @@ -50,6 +51,7 @@ ultramarine-repos-extras ultramarine-backgrounds-common ultramarine-backgrounds-compat + ultramarine-system-configs-desktop system76-scheduler orca speech-dispatcher-espeak-ng diff --git a/ultramarine/release/ultramarine-release.spec b/ultramarine/release/ultramarine-release.spec index 4b6f4a3..56c1cbd 100644 --- a/ultramarine/release/ultramarine-release.spec +++ b/ultramarine/release/ultramarine-release.spec @@ -85,7 +85,6 @@ Source28: longer-default-shutdown-timeout.conf Source31: enable-kwin-system76-scheduler-integration.service Source32: org.projectatomic.rpmostree1.rules -Source33: 50-ultramarine-networking.conf Source34: ultramarine.urls Source40: https://github.com/Ultramarine-Linux/xfce-config/archive/%{xfce_conf_commit}.tar.gz @@ -769,7 +768,6 @@ cp -pr %{SOURCE54} %{buildroot}%{_sysconfdir}/anaconda/profile.d/ultramarine-xfc # sysctls mkdir -p %{buildroot}%{_prefix}/lib/sysctl.d/ -cp -pr %{SOURCE33} %{buildroot}%{_prefix}/lib/sysctl.d/50-ultramarine-networking.conf ######################### @@ -897,7 +895,6 @@ install -Dm0644 %{SOURCE32} -t %{buildroot}%{_datadir}/polkit-1/rules.d/ %{_sysconfdir}/anaconda/profile.d/ultramarine-gnome.conf %{_sysconfdir}/anaconda/profile.d/ultramarine-plasma.conf %{_sysconfdir}/anaconda/profile.d/ultramarine-xfce.conf -%{_prefix}/lib/sysctl.d/50-ultramarine-networking.conf %license licenses/LICENSE licenses/README.license %{_prefix}/lib/ultramarine-release %{_prefix}/lib/systemd/user.conf.d/* diff --git a/ultramarine/ultramarine-system-configs/50-mtu-probing.conf b/ultramarine/ultramarine-system-configs/50-mtu-probing.conf new file mode 100644 index 0000000..ce99fca --- /dev/null +++ b/ultramarine/ultramarine-system-configs/50-mtu-probing.conf @@ -0,0 +1,7 @@ +# Enables MTU Probing for IPv4 +# Fixes a quirk with some home network setups and +# some applications/games that have QoS issues with large packets +# e.g. Minecraft, Ubisoft Connect, etc. +# https://blog.cloudflare.com/path-mtu-discovery-in-practice/ +# https://www.reddit.com/r/linux_gaming/comments/10oc0dq/comment/j6e0ds2 +net.ipv4.tcp_mtu_probing=1 diff --git a/ultramarine/ultramarine-system-configs/anda.hcl b/ultramarine/ultramarine-system-configs/anda.hcl new file mode 100644 index 0000000..9f131d9 --- /dev/null +++ b/ultramarine/ultramarine-system-configs/anda.hcl @@ -0,0 +1,6 @@ +project "pkg" { + rpm { + spec = "ultramarine-system-configs.spec" + sources = "." + } +} diff --git a/ultramarine/ultramarine-system-configs/bbr.conf b/ultramarine/ultramarine-system-configs/bbr.conf new file mode 100644 index 0000000..fc3e52c --- /dev/null +++ b/ultramarine/ultramarine-system-configs/bbr.conf @@ -0,0 +1,4 @@ +# Enables the tcp_bbr kernel module +# to enable the BBR congestion control algorithm by Google +# https://cloud.google.com/blog/products/gcp/tcp-bbr-congestion-control-comes-to-gcp-your-internet-just-got-faster +tcp_bbr diff --git a/ultramarine/ultramarine-system-configs/networking-tweaks.conf b/ultramarine/ultramarine-system-configs/networking-tweaks.conf new file mode 100644 index 0000000..d8a2eb9 --- /dev/null +++ b/ultramarine/ultramarine-system-configs/networking-tweaks.conf @@ -0,0 +1,9 @@ +# Enable BBR Congestion Control +# Requires the tcp_bbr module to be loaded, defined in /etc/modules-load.d/bbr.conf +net.core.default_qdisc = cake +net.ipv4.tcp_congestion_control = bbr + + +# Filter TCP reverse paths +# Validate the source address of the packets, this will prevent some spoofing attacks +net.ipv4.conf.all.rp_filter = 1 diff --git a/ultramarine/ultramarine-system-configs/tmpfiles-cleanup.conf b/ultramarine/ultramarine-system-configs/tmpfiles-cleanup.conf new file mode 100644 index 0000000..cc07819 --- /dev/null +++ b/ultramarine/ultramarine-system-configs/tmpfiles-cleanup.conf @@ -0,0 +1,2 @@ +# remove files in /var/tmp older than 10 days +D /var/tmp 1777 root root 10d diff --git a/ultramarine/ultramarine-system-configs/ultramarine-logrotate.conf b/ultramarine/ultramarine-system-configs/ultramarine-logrotate.conf new file mode 100644 index 0000000..4ae0fbf --- /dev/null +++ b/ultramarine/ultramarine-system-configs/ultramarine-logrotate.conf @@ -0,0 +1,21 @@ +# /etc/logrotate.d/ultramarine-logrotate.conf + +# see "man logrotate" for details + +# global options do not affect preceding include directives + +# rotate log files daily +daily + +# keep 3 weeks worth of backlogs +rotate 3 + +# create new (empty) log files after rotating old ones +create + +# use date as a suffix of the rotated file +dateext + +compress + +# system-specific logs may also be configured here. diff --git a/ultramarine/ultramarine-system-configs/ultramarine-system-configs.spec b/ultramarine/ultramarine-system-configs/ultramarine-system-configs.spec new file mode 100644 index 0000000..04783d2 --- /dev/null +++ b/ultramarine/ultramarine-system-configs/ultramarine-system-configs.spec @@ -0,0 +1,67 @@ +Name: ultramarine-system-configs +Version: 1 +Release: 1%{?dist} +Summary: Various configuration files for a more comfortable Ultramarine desktop experience +BuildArch: noarch +License: MIT +URL: https://ultramarine-linux.org +Source1: tmpfiles-cleanup.conf +Source2: ultramarine-logrotate.conf +Source3: networking-tweaks.conf +Source4: bbr.conf +Source5: 50-mtu-probing.conf + +BuildRequires: /usr/bin/install + +%package core +Summary: Core system tweaks for Ultramarine Linux + +%description core +This package provides various systemd configurations that improve system performance +and resource usage on Ultramarine Linux. + +%package desktop +Summary: Desktop-specific tweaks for Ultramarine Linux + +%description desktop +This package provides various systemd configurations that optimize desktop resource usage +and performance on Ultramarine Linux. + + +%description +This package provides various systemd configurations +to optimize desktop resource usage and performance on Ultramarine Linux. + +The configs attempt to reduce disk usage for journaling and logging, and +cleaning up of unused temporary files periodically. + +%prep + +%build + + + +%install +install -Dm644 %{SOURCE1} %{buildroot}/etc/tmpfiles.d/tmpfiles-cleanup.conf +install -Dm644 %{SOURCE2} %{buildroot}/etc/logrotate.d/ultramarine-logrotate.conf +install -Dm644 %{SOURCE3} %{buildroot}/etc/sysctl.d/50-networking-tweaks.conf +install -Dm644 %{SOURCE4} %{buildroot}/etc/modules-load.d/bbr.conf +install -Dm644 %{SOURCE5} %{buildroot}/etc/sysctl.d/50-mtu-probing.conf + +%files + + +%files core +%defattr(-,root,root,-) +%config /etc/sysctl.d/50-networking-tweaks.conf +%config /etc/modules-load.d/bbr.conf + +%files desktop +%defattr(-,root,root,-) +%config /etc/tmpfiles.d/tmpfiles-cleanup.conf +%config /etc/logrotate.d/ultramarine-logrotate.conf +%config /etc/sysctl.d/50-mtu-probing.conf + +%changelog +* Sat Aug 03 2024 Cappy Ishihara +- Initial release