Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 0 additions & 36 deletions .github/iso-check/inspect.sh

This file was deleted.

130 changes: 0 additions & 130 deletions .github/iso-check/qemu_check.py

This file was deleted.

17 changes: 13 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,17 @@ jobs:
# Without the test cfg, where unwrap and expect are compile errors.
- run: cargo clippy --locked -- -D warnings
- run: cargo test --locked
- name: Dependencies stay minimal (seg and lexopt only)
- name: Dependencies stay minimal (seg, lexopt and libc only)
run: |
cargo tree --locked -e normal --prefix none | sort -u
test "$(cargo tree --locked -e normal --prefix none | sort -u | wc -l)" -le 2
test "$(cargo tree --locked -e normal --prefix none | sort -u | wc -l)" -le 3
# The only unsafe code is the few libc calls of src/game/proc.rs.
- name: unsafe stays in one file
run: |
test "$(grep -rEl '\bunsafe[[:space:]]*(\{|fn|impl|extern)' segctl/src)" = "segctl/src/game/proc.rs"
- name: sudoers rule is valid
run: |
sudo visudo -cf dist/sudoers-seg-game
- name: Release binary size
run: |
cargo build --locked --release
Expand All @@ -106,7 +113,7 @@ jobs:
data/desktop/labwc/autostart data/system/seglinux-terminal data/system/restore-trimmed-files \
data/system/profile-gaming.sh data/greeter/seglinux-greeter-session data/system/zram-setup \
tools/seg/dist/fstrim-weekly tools/seg/dist/runit/*/run tools/seg/dist/runit/seg-zram/finish \
tools/seg/dist/openrc/seg-tune tools/seg/dist/openrc/seg-zram
tools/seg/dist/openrc/seg-tune tools/seg/dist/openrc/seg-zram tools/seg/dist/openrc/seg-game
shellcheck -s bash pkg/segctl/segctl.install
shellcheck -s bash iso/iso-profiles/seglinux-lite/live-overlay/etc/skel/.bash_profile
- name: YAML, JSON and XML syntax
Expand Down Expand Up @@ -200,7 +207,9 @@ jobs:
pacman-key --populate artix
pacman -Sy --noconfirm --needed go-yq
iso/scripts/chaotic-aur.sh
- run: iso/scripts/check-packages.sh -p ${{ matrix.profile }} -i ${{ matrix.init }} -k linux-zen
# -x: the packages `seg game setup` can choose (NVIDIA's driver, the
# Vulkan drivers, the games stack) must exist and resolve on top of the image.
- run: iso/scripts/check-packages.sh -p ${{ matrix.profile }} -i ${{ matrix.init }} -k linux-zen -x tools/seg/segctl/tests/setup-packages.txt
- name: Packages the Lite edition downloads during Setup
if: matrix.profile == 'seglinux-lite'
run: iso/scripts/online-packages.sh -i openrc -k linux-zen
Expand Down
51 changes: 0 additions & 51 deletions .github/workflows/iso-check.yml

This file was deleted.

88 changes: 88 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
# Changelog

Notable changes to SegLinux. The project has no version numbers yet, so this
lists what changed since the last ISO build of 19 October 2026 (`4ca2f45`).
Measurements and the reasons behind each removal are in
[docs/lean-audit.md](docs/lean-audit.md).

## Unreleased

### Added

- **`seg game`**, a small gaming layer in the `seg` tool, the same on OpenRC,
runit, dinit and s6 ([docs/gaming.md](docs/gaming.md#seg-game)):
- `seg game run -- CMD` (Steam: `seg game run -- %command%`) raises the CPU
governor and energy preference and an AMD GPU's power level while a game
runs, gives the game a little more CPU and the best I/O priority, holds
off the screen saver, can pin it to the V-Cache chiplet of a two-chiplet
X3D CPU, and restores everything when the game ends, on Ctrl+C, SIGTERM,
SIGHUP or a crash of `seg`.
- `seg game check`: PASS/WARN/FAIL/SKIP for Vulkan, the GPU driver, 32-bit
drivers, NTSYNC, `vm.max_map_count`, open files, kernel, fallback kernel,
CPU governor and driver, boost permission, hugepages, split lock,
compaction and mitigations, each with the exact fix.
- `seg game setup [--yes]`: the driver packages for the GPUs found in the
computer, and only those.
- `seg game profiles`, per-game profiles in `~/.config/seg/games.toml`
(governor, CPU pinning, MangoHud, gamescope arguments, nice).
- `seg game apply` and the **`seg-game` service** (OpenRC, runit, dinit,
s6): the gaming sysctls and `/dev/ntsync` permissions at boot.
- `seg game audio on|off`: low-latency PipeWire, off by default.
- `seg game unsafe-boost on|off`: `mitigations=off`, the only way to get
it, behind a warning and `--i-understand`.
- `seg tune gaming`: low swappiness, warm caches, short write-back, CPU
left dynamic.
- A sudoers rule for the `gamemode` group (two commands, nothing else), a
MangoHud preset and PipeWire drop-ins under `/usr/share/seg` (all off
until asked for).
- Setup installs the **other kernel** (`linux` beside `linux-zen`, or the
reverse) as a boot menu entry to fall back on when online
(`[performance] fallback_kernel`); the installed kernel is never removed.
- Kernel command line: `transparent_hugepage=madvise` everywhere and
`amd_pstate=active` on AMD processors (an answer file's parameter of the
same name replaces the default).
- `vm.compaction_proactiveness = 0` with the other gaming sysctls.
- NVIDIA: `nvidia_drm modeset=1 fbdev=1` (Wayland compositors, VT switch).
- `seg` (`tools/seg`, package `segctl`): `info`, `svc`, `clean`, `tune`,
`zram`, `doctor` for OpenRC, runit, dinit and s6, with the `seg-zram` and
`seg-tune` services and a weekly `fstrim` cron job.
- `ripgrep`, `fd`, `eza` and `zoxide` in the full edition.
- `docs/lean-audit.md`: what the images weigh before and after, the bloat
table, the bugs found, what was not verified.
- CI: a job for `seg` (fmt, clippy, tests, release size, dependency and
`unsafe` guards, `visudo -cf` of the sudoers rule), `udevadm verify` for
the udev rules, a check for repeated packages, more `shellcheck` targets.

### Changed

- `wine` -> `wine-staging` (the Staging patches: esync/fsync/NTSYNC, game
fixes) in the full edition. `lib32-mangohud` was tried and is not in the
Artix repositories, so 32-bit games get no MangoHud overlay.
- Open-file hard limit 524288 -> 1048576 (the kernel's maximum); the
`gamemode` group may use `nice -10`.
- Shader caches: Mesa 4 GB -> 10 GB; NVIDIA's shader cache set to 10 GB and
no longer deleted when full (`/etc/profile.d`, so on every init).
- `makepkg` builds with every thread; the I/O scheduler rule skips partitions
and covers virtual disks.

### Removed

- From the full image: `linux-headers` (325 MiB; Setup downloads the running
kernel's headers together with the NVIDIA DKMS driver), `spectacle` and
`opencv`, the X server and its drivers (`xorg-xwayland` stays), `inxi`,
and five packages that were listed twice. The full ISO is 4.7 % smaller and
475 MiB less is installed.
- `cupsd` is no longer started by default (the packages stay; `seg svc enable
cupsd`).

### Fixed

- The NVIDIA DKMS driver could only build because the headers were on every
image: Setup now installs them in that step.
- The artools patch that reads the kernel version without headers applies to
every kernel, not only the non-stock ones.
- The I/O scheduler udev rule matched partitions (errors in the log) and
missed virtual disks.
- `data/system/zram-setup` and the udev rules were not checked by CI.
- `seg doctor` called OpenRC services of the `shutdown` runlevel (`killprocs`,
`mount-ro`, `savecache`) failed; found by booting the Lite image.
22 changes: 14 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,11 +90,15 @@ published.
kitty as the terminal (File Explorer → Dolphin, Store → Discover, ...).
The terminal opens with system information under the SegLinux logo
(fastfetch).
* **Built for gaming.** linux-zen kernel, Steam with Proton, Lutris,
GameMode, MangoHud and gamescope; a Steam "Gaming Mode" session; variable
refresh rate and tearing for fullscreen games; zram swap, NTSYNC, I/O
scheduler and sysctl tuning; NVIDIA's driver installed automatically on
GeForce GTX 16/RTX cards. See [docs/gaming.md](docs/gaming.md).
* **Built for gaming.** linux-zen kernel (with the stock kernel beside it to
fall back on), Steam with Proton, Lutris, Wine Staging, GameMode, MangoHud
and gamescope; a Steam "Gaming Mode" session; variable refresh rate and
tearing for fullscreen games; zram swap, NTSYNC, I/O scheduler and sysctl
tuning; NVIDIA's driver installed automatically on GeForce GTX 16/RTX
cards, and only for hardware that is there. `seg game run -- %command%` in
Steam's launch options boosts the CPU and GPU while a game runs and puts
everything back after; `seg game check` says what is missing, with the
fix. See [docs/gaming.md](docs/gaming.md).
* **Runs Windows programs.** Double-click an `.exe`, `.msi`, `.lnk` or
`.bat`, or type `./setup.exe`: `segrun` inspects the program, prepares a
Wine prefix (with DXVK/VKD3D-Proton when the program uses Direct3D) and
Expand All @@ -103,10 +107,12 @@ published.
or dinit; rolling release.
* **`seg`, one small tool for the system.** `seg info`, `seg svc` (the same
commands on OpenRC, runit, dinit and s6), `seg clean`, `seg tune`
(light, balanced or performance), `seg zram` and `seg doctor`, which finds
problems and prints their fixes. A single Rust binary of about 550 KiB; see
(light, balanced, gaming or performance), `seg zram`, `seg game` (see
above) and `seg doctor`, which finds problems and prints their fixes. A
single Rust binary of about 700 KiB; see
[tools/seg](tools/seg/README.md). What the images weigh and what was taken
off them: [docs/lean-audit.md](docs/lean-audit.md).
off them: [docs/lean-audit.md](docs/lean-audit.md). What changed:
[CHANGELOG.md](CHANGELOG.md).

## Website

Expand Down
1 change: 1 addition & 0 deletions crates/seglinux-installer/src/model.rs
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,7 @@ pub fn demo_facts() -> Facts {
memory: 8 * GIB,
gpus: vec![],
kernel: Some("linux-zen".into()),
cpu_vendor: None,
timezones: Some(set(&[
"UTC",
"Africa/Tunis",
Expand Down
Loading
Loading