Compare commits
8 commits
Author | SHA1 | Date | |
---|---|---|---|
2a013fdbb4 | |||
a8d42aad57 | |||
b48540690c | |||
55aaa1475d | |||
d5b5b08fd6 | |||
b6cae7e72f | |||
be0813a982 | |||
1f47464ac3 |
9 changed files with 182 additions and 16 deletions
38
debian/changelog
vendored
38
debian/changelog
vendored
|
@ -1,3 +1,41 @@
|
||||||
|
tileos-system-adjustments (1.6.1~tileos) unstable; urgency=medium
|
||||||
|
|
||||||
|
* Remove absolete 80-io-tweaks.rules
|
||||||
|
* Move Zram settings from udev to zram-generator.conf
|
||||||
|
|
||||||
|
-- Aleksey Samoilov <samoilov.lex@gmail.com> Mon, 28 Apr 2025 19:47:43 +0400
|
||||||
|
|
||||||
|
tileos-system-adjustments (1.6.0~tileos) unstable; urgency=medium
|
||||||
|
|
||||||
|
* Update polkit rules
|
||||||
|
|
||||||
|
-- Aleksey Samoilov <samoilov.lex@gmail.com> Tue, 09 Apr 2024 15:48:39 +0400
|
||||||
|
|
||||||
|
tileos-system-adjustments (1.5.1~tileos) unstable; urgency=medium
|
||||||
|
|
||||||
|
* Fix comments
|
||||||
|
|
||||||
|
-- Aleksey Samoilov <samoilov.lex@gmail.com> Thu, 07 Mar 2024 11:27:49 +0400
|
||||||
|
|
||||||
|
tileos-system-adjustments (1.5~tileos) unstable; urgency=medium
|
||||||
|
|
||||||
|
* Disable Kyber scheduler for SSD and set mq-deadline
|
||||||
|
* Disable scheduler for NVMe
|
||||||
|
|
||||||
|
-- Aleksey Samoilov <samoilov.lex@gmail.com> Fri, 16 Feb 2024 17:55:41 +0400
|
||||||
|
|
||||||
|
tileos-system-adjustments (1.4~tileos) unstable; urgency=medium
|
||||||
|
|
||||||
|
* Add Zram config
|
||||||
|
|
||||||
|
-- Aleksey Samoilov <samoilov.lex@gmail.com> Tue, 06 Feb 2024 17:25:28 +0400
|
||||||
|
|
||||||
|
tileos-system-adjustments (1.3~tileos) unstable; urgency=medium
|
||||||
|
|
||||||
|
* Fix polkit permissions
|
||||||
|
|
||||||
|
-- Aleksey Samoilov <samoilov.lex@gmail.com> Thu, 11 Jan 2024 00:05:04 +0400
|
||||||
|
|
||||||
tileos-system-adjustments (1.2~tileos) unstable; urgency=medium
|
tileos-system-adjustments (1.2~tileos) unstable; urgency=medium
|
||||||
|
|
||||||
* Add more tweaks (most of them from CachyOS)
|
* Add more tweaks (most of them from CachyOS)
|
||||||
|
|
1
debian/tileos-system-adjustments.install
vendored
1
debian/tileos-system-adjustments.install
vendored
|
@ -1,2 +1,3 @@
|
||||||
/etc
|
/etc
|
||||||
/var
|
/var
|
||||||
|
/usr
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
# Set the maximum watches on files
|
# Set the maximum watches on files
|
||||||
fs.inotify.max_user_watches = 600000
|
fs.inotify.max_user_watches = 600000
|
||||||
|
|
||||||
For efficiency run-time is transferred between the global pool and CPU local
|
# For efficiency run-time is transferred between the global pool and CPU local
|
||||||
"silos" in a batch fashion. This greatly reduces global accounting pressure
|
# "silos" in a batch fashion. This greatly reduces global accounting pressure
|
||||||
on large systems. The amount transferred each time such an update is required
|
# on large systems. The amount transferred each time such an update is required
|
||||||
is described as the "slice".
|
# is described as the "slice".
|
||||||
Larger slice values will reduce transfer overheads, while smaller values allow
|
# Larger slice values will reduce transfer overheads, while smaller values allow
|
||||||
for more fine-grained consumption.
|
# for more fine-grained consumption.
|
||||||
kernel.sched_cfs_bandwidth_slice_us = 3000
|
kernel.sched_cfs_bandwidth_slice_us = 3000
|
||||||
|
|
||||||
# This file contains the maximum number of memory map areas a process may have. Memory map areas are used as a side-effect of calling malloc, directly by mmap, mprotect, and madvise, and also when loading shared libraries.
|
# This file contains the maximum number of memory map areas a process may have. Memory map areas are used as a side-effect of calling malloc, directly by mmap, mprotect, and madvise, and also when loading shared libraries.
|
||||||
|
@ -68,3 +68,8 @@ vm.dirty_background_bytes = 134217728
|
||||||
# The kernel flusher threads will periodically wake up and write old data out to disk. This
|
# 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).
|
# tunable expresses the interval between those wakeups, in 100'ths of a second (Default is 500).
|
||||||
vm.dirty_writeback_centisecs = 1500
|
vm.dirty_writeback_centisecs = 1500
|
||||||
|
|
||||||
|
# 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
|
||||||
|
|
5
etc/systemd/zram-generator.conf.d/zram-generator.conf
Normal file
5
etc/systemd/zram-generator.conf.d/zram-generator.conf
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
[zram0]
|
||||||
|
compression-algorithm = zstd lz4 (type=huge)
|
||||||
|
zram-size = ram
|
||||||
|
swap-priority = 100
|
||||||
|
fs-type = swap
|
10
etc/udev/rules.d/30-zram.rules
Normal file
10
etc/udev/rules.d/30-zram.rules
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
TEST!="/dev/zram0", GOTO="zram_end"
|
||||||
|
|
||||||
|
# Since ZRAM stores all pages in compressed form in RAM, we should prefer
|
||||||
|
# preempting anonymous pages more than a page (file) cache. Preempting file
|
||||||
|
# pages may not be desirable because a process may want to access a file at any
|
||||||
|
# time, whereas if it is preempted, it will cause an additional read cycle from
|
||||||
|
# the disk.
|
||||||
|
SYSCTL{vm.swappiness}="150"
|
||||||
|
|
||||||
|
LABEL="zram_end"
|
|
@ -1,7 +1,6 @@
|
||||||
# set scheduler for NVMe
|
# disable scheduler for NVMe
|
||||||
ACTION=="add|change", KERNEL=="nvme[0-9]n[0-9]", ATTR{queue/scheduler}="kyber"
|
ACTION=="add|change", KERNEL=="nvme[0-9]*", ATTR{queue/rotational}=="0", ATTR{queue/scheduler}="none"
|
||||||
# set scheduler for SSD
|
# set scheduler for SSD
|
||||||
ACTION=="add|change", SUBSYSTEM=="block", ATTR{queue/rotational}=="0", KERNEL=="sd?", ATTR{queue/scheduler}="kyber"
|
ACTION=="add|change", KERNEL=="sd[a-z]*|mmcblk[0-9]*", ATTR{queue/rotational}=="0", ATTR{queue/scheduler}="mq-deadline"
|
||||||
# set scheduler for rotating disks and SD cards
|
# set scheduler for HDD
|
||||||
ACTION=="add|change", SUBSYSTEM=="block", ATTR{queue/rotational}=="1", ATTR{queue/scheduler}="bfq"
|
ACTION=="add|change", KERNEL=="sd[a-z]*", ATTR{queue/rotational}=="1", ATTR{queue/scheduler}="bfq"
|
||||||
ACTION=="add|change", SUBSYSTEM=="block", KERNEL=="mmcblk?", ATTR{queue/scheduler}="bfq"
|
|
||||||
|
|
|
@ -1,3 +0,0 @@
|
||||||
# Forced I/O multithreading
|
|
||||||
ACTION=="add|change", SUBSYSTEM=="block", ATTR{queue/rq_affinity}="1"
|
|
||||||
ACTION=="add|change", SUBSYSTEM=="block", ATTR{queue/iosched/fifo_batch}=="32"
|
|
76
usr/share/polkit-1/rules.d/com.tileos.desktop.rules
Normal file
76
usr/share/polkit-1/rules.d/com.tileos.desktop.rules
Normal file
|
@ -0,0 +1,76 @@
|
||||||
|
// Mounting, checking, etc. of internal drives
|
||||||
|
polkit.addRule(function(action, subject) {
|
||||||
|
if ((action.id == "org.freedesktop.udisks2.filesystem-mount-system" ||
|
||||||
|
action.id == "org.freedesktop.udisks2.encrypted-unlock-system" ||
|
||||||
|
action.id == "org.freedesktop.udisks2.filesystem-fstab") &&
|
||||||
|
subject.active == true && subject.local == true &&
|
||||||
|
subject.isInGroup("sudo")) {
|
||||||
|
return polkit.Result.YES;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// Change CPU Frequency scaling
|
||||||
|
polkit.addRule(function(action, subject) {
|
||||||
|
if ((action.id == "org.gnome.cpufreqselector" ||
|
||||||
|
action.id == "org.mate.cpufreqselector" ) &&
|
||||||
|
subject.active == true && subject.local == true &&
|
||||||
|
subject.isInGroup("sudo")) {
|
||||||
|
return polkit.Result.YES;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// Setting the clock
|
||||||
|
polkit.addRule(function(action, subject) {
|
||||||
|
if ((action.id == "org.gnome.controlcenter.datetime.configure" ||
|
||||||
|
action.id == "org.kde.kcontrol.kcmclock.save" ||
|
||||||
|
action.id == "org.freedesktop.timedate1.set-time" ||
|
||||||
|
action.id == "org.freedesktop.timedate1.set-timezone" ||
|
||||||
|
action.id == "org.freedesktop.timedate1.set-local-rtc" ||
|
||||||
|
action.id == "org.freedesktop.timedate1.set-ntp" ||
|
||||||
|
action.id == "com.canonical.controlcenter.datetime.configure" ||
|
||||||
|
action.id == "org.mate.settingsdaemon.datetimemechanism.settime") &&
|
||||||
|
subject.active == true && subject.local == true &&
|
||||||
|
subject.isInGroup("sudo")) {
|
||||||
|
return polkit.Result.YES;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// Update already installed software
|
||||||
|
polkit.addRule(function(action, subject) {
|
||||||
|
if (action.id == "org.debian.apt.upgrade-packages" &&
|
||||||
|
subject.active == true && subject.local == true &&
|
||||||
|
subject.isInGroup("sudo")) {
|
||||||
|
return polkit.Result.YES;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// Printer administration
|
||||||
|
polkit.addRule(function(action, subject) {
|
||||||
|
if (action.id.indexOf("org.opensuse.cupspkhelper.mechanism.") == 0 &&
|
||||||
|
subject.active == true && subject.local == true &&
|
||||||
|
(subject.isInGroup("sudo") || subject.isInGroup("lpadmin"))) {
|
||||||
|
return polkit.Result.YES;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// Disable hibernate by default in Ubuntu
|
||||||
|
polkit.addRule(function(action, subject) {
|
||||||
|
if (action.id == "org.freedesktop.upower.hibernate" ||
|
||||||
|
action.id == "org.freedesktop.login1.hibernate" ||
|
||||||
|
action.id == "org.freedesktop.login1.handle-hibernate-key" ||
|
||||||
|
action.id == "org.freedesktop.login1.hibernate-multiple-sessions") {
|
||||||
|
return polkit.Result.NO;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// Allow admins to set the hostname,locale,keyboard,date/time without prompting
|
||||||
|
polkit.addRule(function(action, subject) {
|
||||||
|
if ((action.id == "org.freedesktop.locale1.set-locale" ||
|
||||||
|
action.id == "org.freedesktop.locale1.set-keyboard" ||
|
||||||
|
action.id == "org.freedesktop.hostname1.set-static-hostname" ||
|
||||||
|
action.id == "org.freedesktop.hostname1.set-hostname") &&
|
||||||
|
subject.active == true && subject.local == true &&
|
||||||
|
subject.isInGroup("sudo")) {
|
||||||
|
return polkit.Result.YES;
|
||||||
|
}
|
||||||
|
});
|
|
@ -1,4 +1,39 @@
|
||||||
[Mounting, checking, etc. of internal drives]
|
[Mounting, checking, etc. of internal drives]
|
||||||
Identity=unix-group:admin;unix-group:sudo
|
Identity=unix-group:admin;unix-group:sudo
|
||||||
Action=org.freedesktop.udisks.filesystem-*;org.freedesktop.udisks.drive-ata-smart*;org.freedesktop.udisks2.filesystem-mount-system;org.freedesktop.udisks2.encrypted-unlock-system;org.freedesktop.udisks2.filesystem-fstab;
|
Action=org.freedesktop.udisks2.filesystem-mount-system;org.freedesktop.udisks2.encrypted-unlock-system;org.freedesktop.udisks2.filesystem-fstab;
|
||||||
|
ResultActive=yes
|
||||||
|
|
||||||
|
[Change CPU Frequency scaling]
|
||||||
|
Identity=unix-group:admin;unix-group:sudo
|
||||||
|
Action=org.gnome.cpufreqselector;org.mate.cpufreqselector
|
||||||
|
ResultActive=yes
|
||||||
|
|
||||||
|
[Setting the clock]
|
||||||
|
Identity=unix-group:admin;unix-group:sudo
|
||||||
|
Action=org.gnome.clockapplet.mechanism.*;org.gnome.controlcenter.datetime.configure;org.kde.kcontrol.kcmclock.save;org.freedesktop.timedate1.set-time;org.freedesktop.timedate1.set-timezone;org.freedesktop.timedate1.set-local-rtc;org.freedesktop.timedate1.set-ntp;com.canonical.controlcenter.datetime.configure;org.mate.settingsdaemon.datetimemechanism.settime
|
||||||
|
ResultActive=yes
|
||||||
|
|
||||||
|
[Update already installed software]
|
||||||
|
Identity=unix-group:admin;unix-group:sudo
|
||||||
|
Action=org.debian.apt.upgrade-packages
|
||||||
|
ResultActive=yes
|
||||||
|
|
||||||
|
[Printer administration]
|
||||||
|
Identity=unix-group:lpadmin;unix-group:admin;unix-group:sudo
|
||||||
|
Action=org.opensuse.cupspkhelper.mechanism.*
|
||||||
|
ResultActive=yes
|
||||||
|
|
||||||
|
[Disable hibernate by default in upower]
|
||||||
|
Identity=unix-user:*
|
||||||
|
Action=org.freedesktop.upower.hibernate
|
||||||
|
ResultActive=no
|
||||||
|
|
||||||
|
[Disable hibernate by default in logind]
|
||||||
|
Identity=unix-user:*
|
||||||
|
Action=org.freedesktop.login1.hibernate;org.freedesktop.login1.handle-hibernate-key;org.freedesktop.login1;org.freedesktop.login1.hibernate-multiple-sessions;org.freedesktop.login1.hibernate-ignore-inhibit
|
||||||
|
ResultActive=no
|
||||||
|
|
||||||
|
[Allow admins to set the hostname,locale,keyboard,date/time without prompting]
|
||||||
|
Identity=unix-group:admin;unix-group:sudo
|
||||||
|
Action=org.freedesktop.locale1.set-locale;org.freedesktop.locale1.set-keyboard;org.freedesktop.hostname1.set-static-hostname;org.freedesktop.hostname1.set-hostname
|
||||||
ResultActive=yes
|
ResultActive=yes
|
||||||
|
|
Loading…
Add table
Reference in a new issue