Custom optimized Linux kernel 7.2.x with the BORE scheduler, RSEQ abort latency observability, and performance/security tuning. Primary target is the Lenovo LOQ 15IRH8 laptop; hardware-specific variants live in separate branches and ship as separate GitHub releases.
| Variant | Branch | Target hardware | Release |
|---|---|---|---|
| Default (laptop) | master / linux-7.2 |
Intel Raptor Lake (Lenovo LOQ 15IRH8, 12th-14th gen) | v7.2.2 |
| workpc | workpc |
AMD FX-series Piledriver desktop (AM3+ with Radeon HD7000-class iGPU) | v7.1.0-workpc |
| Pixel Slate | pixel-slate |
Google Pixel Slate (codename nocturne, Skylake/Kaby Lake) |
v7.1.0-pixel-slate |
| Generic x86-64-v2 | generic-build |
Universal modern x86-64 (Intel Nehalem 2008+, AMD Bulldozer 2011+) | v7.1.1-generic |
Each variant uses the same core patch stack and feature set, but differs in CPU codegen target (-march=native / -march=bdver2 / -march=skylake / -march=x86-64-v2) and driver subset (Pixel Slate keeps ChromeOS EC drivers + AVS audio; workpc keeps Radeon built-in for early KMS; etc.). Pick the variant that matches your hardware.
- BORE Scheduler — Burst-Oriented Response Enhancer for desktop responsiveness (vanilla-compatible variant; CachyOS-required version intentionally not used).
CONFIG_RSEQ_SLICE_EXTENSION=y— RSEQ time slice extension. Graduated to mainline in Linux 7.0.- Runtime tunable:
/sys/kernel/debug/rseq/slice_ext_nsec(range 5000–50000 ns) - Observability via
/sys/kernel/debug/rseq/stats
- Runtime tunable:
- 9003-rseq-latency-histogram patch — 5-bucket abort latency histogram +
avg_ns, ported from 6.19. - 1000 Hz timer, dynamic preemption (
CONFIG_PREEMPT_DYNAMIC=y).
- LTO Clang Full (
CONFIG_LTO_CLANG_FULL=y) — whole-program link-time optimization via Clang. - Per-variant CPU codegen —
-march=native(laptop),-march=bdver2(workpc),-march=skylake(pixel-slate), or-march=x86-64-v2(generic). - Built with Clang/LLVM-19 + ccache.
- NVMe cluster-aware IRQ affinity — graduated to mainline in 7.0. Each NVMe queue pins 1:1 to a CPU.
- ZRAM (
CONFIG_ZRAM=y, zstd compression). - ZSWAP (
CONFIG_ZSWAP=y, zstd compression, enabled by default). - BBRv3 TCP congestion control (
CONFIG_DEFAULT_TCP_CONG="bbr").
- RANDSTRUCT Full (
CONFIG_RANDSTRUCT_FULL=y) — randomized layouts for sensitive kernel structures. Requires NVIDIA driver to be re-patched after each driver package update (handled byscripts/nvidia-randstruct-fix.sh; only relevant to variants that run NVIDIA).
- NVIDIA 610.43.02 — open kernel modules, with automatic RANDSTRUCT compatibility fixes.
- LenovoLegionLinux — pulled directly from upstream johnfanv2/LenovoLegionLinux master. The kernel patch
9100-platform-profile-accept-customlets userspace (TLP, etc.) writecustomto the aggregate/sys/firmware/acpi/platform_profile, replacing the need for an out-of-tree profile alias. - xpadneo — advanced Xbox controller driver (rumble, battery reporting, low-latency).
Other variants don't ship DKMS modules — workpc has an AMD Radeon iGPU, pixel-slate and generic-build are configured for their target hardware in-tree.
- Device: Lenovo LOQ 15IRH8
- CPU: Intel i5-13420H (13th Gen, 8 cores / 12 threads)
- GPU: NVIDIA GeForce RTX 3050 6GB (Optimus — i915 display, NVIDIA render)
- RAM: 8 GB
- OS: Debian GNU/Linux 13 (trixie)
The build pipeline is parameterized; the master branch defaults to march=native for the LOQ. Other variants on their respective branches override codegen and driver subset.
Pick the variant for your hardware:
git clone https://github.com/thewraith420/BobZKernel
cd BobZKernel
# Default (laptop, march=native) — master branch is already checked out
./scripts/update-and-build-7.2.shOther variants are on their own branches and build with whichever pipeline that
branch is currently on — check out the branch first and run the script that's
actually there (ls scripts/update-and-build-*.sh), since a variant branch may
still be one major version behind master at any given time:
git checkout workpc # AMD Piledriver
git checkout pixel-slate # Google Pixel Slate
git checkout generic-build # Universal x86-64-v2
./scripts/update-and-build-7.1.sh # or -7.2.sh, once that branch is migratedThe script handles 9 steps: detect latest v7.2.x tag → clean → apply patches → configure → build → install → NVIDIA DKMS check → LenovoLegionLinux DKMS update (upstream master) → summary.
First-time setup: if builds/linux-7.2/ doesn't exist, Step 1 auto-clones the stable kernel tree.
For unattended runs:
./scripts/update-and-build-7.2.sh --yesTo skip the kernel update check (use whatever's already checked out):
./scripts/update-and-build-7.2.sh --skip-updateWhen the build pipeline reaches Step 6, pick option 2 instead of installing locally:
./scripts/create-portable-installer-7.2.sh
# Or via the Step 6 prompt during update-and-build-7.2.shProduces a ~100-120 MB tarball. Copy to the target machine, then:
tar -xzf BobZKernel-*-installer.tar.gz
sudo ./install.shThe installer auto-detects your distro and bootloader (Debian/Ubuntu/Mint, Fedora/RHEL, Arch/Manjaro, openSUSE).
Pre-built tarballs for the variants above are attached to their respective releases — see the Hardware variants table.
After reboot, expected state on the laptop variant:
uname -r
# 7.2.2-BobZKernel (or current point release)
# LTO + native CPU
grep -E "^CONFIG_LTO_CLANG_FULL|^CONFIG_X86_NATIVE_CPU" /boot/config-$(uname -r)
# BORE active
sudo sysctl kernel.sched_bore
# kernel.sched_bore = 1
# RSEQ slice extension + histogram
sudo cat /sys/kernel/debug/rseq/stats
# NVMe cluster-aware (each queue pinned to its own CPU)
grep nvme0q /proc/interrupts
# Lenovo platform profile choices
cat /sys/firmware/acpi/platform_profile_choices
# low-power balanced performance max-power customIn patches/cachyos-7.2/:
0001-bore.patch— BORE scheduler (vanilla variant, noCONFIG_CACHYrequired).9003-rseq-latency-histogram.patch— abort latency histogram (5 bins + avg_ns).0001-acpi-call.patch,dkms-clang.patch— CachyOS support patches.9100-platform-profile-accept-custom.patch— lets the aggregate/sys/firmware/acpi/platform_profileaccept writes ofcustom(needed so TLP can drive the legion-laptop "custom" profile directly).
Going 7.1 → 7.2: nothing dropped, nothing refreshed. All five patches carried
forward byte-for-byte and dry-run verified exact (zero fuzz/offset) against
pristine v7.2.2 before this release — including 0001-bore.patch, which
needed a hand refresh at the 7.1.5 point release. Checked upstream first, as
always: neither CachyOS's kernel-patches repo nor firelzrd/bore-scheduler has
published anything for the 7.x line.
Dropped going 7.0 → 7.1:
0001-rt-i915.patch— PREEMPT_RT compatibility shim. CachyOS dropped it for 7.1; we don't build PREEMPT_RT, so the IS_ENABLED guards compile-time-evaluate to true. The patch was a no-op for our config.0001-cgroup-vram.patch— dmem cgroup VRAM controller. Already dropped in 7.0.11 (TTM stable backports broke it); CachyOS dropped it for 7.1 too. Not exercised on single-user laptop with no container GPU workloads.
Patches pending consideration:
- Per-thread RSEQ abort suppression (was 9004 on 6.19, exponential backoff 10ms → 320ms).
- Revocable Resource Management — pure infrastructure with no in-tree consumers; deliberately not ported forward past 6.18.
BobZKernel/
├── builds/
│ └── linux-7.2/ # Kernel source (gitignored — auto-cloned by build script)
├── scripts/
│ ├── update-and-build-7.2.sh # Main pipeline (9 steps)
│ ├── build-kernel-7.2.sh # Kernel build with LTO + ccache (per-branch KCFLAGS)
│ ├── install-kernel-7.2.sh # Install with DKMS, initramfs, GRUB
│ ├── create-portable-installer-7.2.sh
│ ├── nvidia-randstruct-fix.sh # Re-applies __no_randomize_layout post NVIDIA update
│ ├── configure-nvidia-suspend.sh
│ ├── monitor-rseq-stats.sh
│ └── ... # Plus assorted RSEQ/NVIDIA tooling
├── patches/
│ └── cachyos-7.2/ # 7.2 patch set
├── configs/
│ ├── config-7.2-march-native # Laptop (Intel Raptor Lake)
│ ├── config-7.2-workpc # AMD Piledriver + Radeon (on workpc branch, once migrated)
│ ├── config-7.2-pixel-slate # Google Pixel Slate (on pixel-slate branch, once migrated)
│ └── config-7.2-generic # Universal x86-64-v2 (on generic-build branch, once migrated)
├── CONTEXT/ # Project documentation
│ ├── PROJECT-OVERVIEW.md
│ ├── BUILD-STATUS.md
│ ├── BUILD-TROUBLESHOOTING.md
│ └── QUICK-START.md
└── tests/
└── rseq-slice-extension/ # RSEQ tests (carried over from 6.19)
Branch tags workpc-6.18-archive, generic-build-6.18-archive, pixel-slate-6.18-archive preserve each variant's pre-rebase tip from before the 7.1 migration. Historical branches linux-7.1, linux-7.0, linux-6.19, linux-6.18 remain available for reference — each frozen at its confirmed-working tip at the point master moved on to the next major version.
See CONTEXT/BUILD-TROUBLESHOOTING.md for detailed error solutions.
NVIDIA suspend crash after driver update — Run sudo scripts/nvidia-randstruct-fix.sh. RANDSTRUCT shuffles struct layouts each kernel build; the NVIDIA DKMS source needs __no_randomize_layout re-applied each time the driver package is updated.
LenovoLegionLinux platform_profile not showing up — On kernel 7.x the driver registers a virtual platform device. If /sys/class/platform-profile/ is empty, check dmesg | grep legion for probe errors; re-run the build script to pull the latest upstream LLL commit.
TLP config writes silently rejected — TLP doesn't validate, but the kernel does. Accepted profile names on Lenovo Legion/LOQ hardware: low-power, balanced, performance, max-power, custom. The custom profile (purple LED, AC power mode) requires patch 9100-platform-profile-accept-custom in the running kernel — without it the aggregate sysfs returns -EINVAL on any write of custom.
Step 7 NVIDIA DKMS failure after choosing portable installer — Expected and benign. Step 7 tries to verify NVIDIA DKMS against the kernel that was supposed to be installed locally; if you picked option 2 (portable installer) at Step 6, no kernel was actually installed on this machine, so Step 7 has nothing to find. The portable tarball is fine.
- Linux Kernel — Linus Torvalds and contributors.
- Thomas Gleixner — RSEQ time slice extension mechanism (graduated to mainline in 7.0).
- Masahito Suzuki — BORE CPU scheduler.
- Tzung-Bi Shih (Google) — Revocable resource management (6.18 backport).
- CachyOS Team — Performance patches.
- LLVM Project — Clang/LLVM compiler infrastructure.
- johnfanv2 and contributors — LenovoLegionLinux (upstream).
- atar-axis — xpadneo Xbox controller driver.
Linux kernel is licensed under GPLv2. Patches retain their respective upstream licenses.