Skip to content

LiqXanMod hybrid kernel: CI fixes for XanMod 6.19 compatibility - #1

Merged
Interested-Deving-1896 merged 17 commits into
mainfrom
feature/liqxanmod-hybrid
Mar 30, 2026
Merged

LiqXanMod hybrid kernel: CI fixes for XanMod 6.19 compatibility#1
Interested-Deving-1896 merged 17 commits into
mainfrom
feature/liqxanmod-hybrid

Conversation

@Interested-Deving-1896

@Interested-Deving-1896 Interested-Deving-1896 commented Mar 30, 2026

Copy link
Copy Markdown
Owner

Summary

Fixes all CI failures on the feature/liqxanmod-hybrid branch. All 5 build matrix jobs (debian/hybrid, debian/liquorix, debian/xanmod, arch/hybrid, fedora/hybrid) now pass.

Changes

scripts/resolve-lqx-version.sh

  • Switch from GitHub Releases API to Tags API — Liquorix publishes tags only, the releases endpoint returns an empty array, causing fallback to the stale 6.12.1-1 version
  • Accept an optional KERNEL_MAJOR argument (e.g. 6.18) and return the latest Liquorix tag for that series, falling back to overall latest if no match
  • Update hardcoded fallback from 6.12.1-1 to 6.19-6

scripts/fetch-lqx-patches.sh

  • Refactor patch staging into a stage_patches helper to safely handle grep exit-1 when a patch series has no entries for a given prefix (e.g. 6.19-6 has no lqx/ patches)

scripts/apply-patches.sh

  • Skip Liquorix zen patches when the tree is already at the same major.minor series — XanMod always tracks stable, so the Liquorix zen patch (a stable backport, e.g. v6.18.16-lqx1.patch) will always conflict with an XanMod tree at the same series
  • Use a mktemp sentinel file to detect .rej files created by each specific patch attempt, replacing the unreliable -newer patch_file approach (cached patch files are old, causing false negatives)
  • Clean up .rej files after non-fatal skips to avoid false positives in subsequent patches

patches/hybrid/

  • 0001: Move CONFIG_LIQXANMOD_HYBRID from kernel/sched/Kconfig (removed in 6.19) to init/Kconfig after the Scheduler features menu
  • 0002: Rewrite liqxanmod_sysfs.c for the XanMod 6.19 scheduler API — replaces removed sysctl_sched_latency / sched_nr_latency / sysctl_sched_min_granularity with sysctl_sched_base_slice; update Makefile hunk context to match restructured kernel/sched/Makefile
  • 0003: Replace stale dedup patch with a no-op placeholder — sched_nr_latency no longer exists in XanMod 6.19

.github/workflows/build.yml

  • Move Resolve Liquorix version step after Fetch XanMod source so the kernel major is available; pass it to resolve-lqx-version.sh
  • Use absolute paths (via REPO_ROOT) for config fragments in the merge step — merge_config.sh runs from kernel/src/ so relative paths resolved against the wrong directory

kernel/fetch.sh

  • Update hardcoded branch fallbacks to current versions: MAIN/EDGE 6.19, LTS 6.12, RT 6.18-rt

Notes

The Liquorix zen patch is always skipped when building against XanMod because XanMod already incorporates the stable commits that the zen patch backports. The hybrid scheduler profile switching works via sysctl_sched_base_slice in liqxanmod_sysfs.c rather than the Liquorix zen patch directly.

Interested-Deving-1896 and others added 17 commits March 30, 2026 04:04
Merges XanMod (throughput) and Liquorix/Zen (low-latency) patch sets
into a single kernel image with runtime workload autodetection.

Key components:
- build.sh: unified build driver supporting hybrid/xanmod/liquorix/auto modes
- kernel/liqxanmod_autodetect.c: in-kernel kthread that samples RQ depth,
  wakeup rate, and IRQ rate every 100ms and switches the active CFS tunable
  set (throughput/balanced/latency) after 500ms of stable classification
- patches/hybrid/: three glue patches resolving XanMod<->Zen symbol conflicts
  and exposing scheduler tunables via /sys/kernel/liqxanmod/
- configs/features/{xanmod,liquorix,hybrid}.config: layered Kconfig fragments
  with hybrid.config resolving the preemption model conflict
- profiles/: desktop, gaming, server, rt, rog, arm64 named build profiles
- packaging/: distro installers for debian, arch, fedora, opensuse, gentoo, generic
- scripts/: patch fetcher, applier (with 3-way merge fallback), autodetect injector
- .github/workflows/: CI matrix across modes x distros x branches

Co-authored-by: Ona <no-reply@ona.com>
- profiles/*.sh: add SC2034 disable directive — vars are intentionally
  set without local use since they are sourced by build.sh
- build.sh: replace A && B || C pattern with explicit if/else to fix
  SC2015 (C may run when A is true)

Co-authored-by: Ona <no-reply@ona.com>
- SC2221/SC2222: reorder *archlinux*|*arch* so the more specific
  pattern comes first and is not shadowed
- SC2237: replace '! [[ -n VAR ]]' with '[[ -z VAR ]]'

Co-authored-by: Ona <no-reply@ona.com>
SC1091 (cannot follow sourced paths), SC2012 (ls in glob for kernel
package filenames), and SC2016 (literal $ in Makefile heredoc) are
info-level false positives that do not represent real bugs. Use -S warning
so only genuine warnings and errors fail the build.

Co-authored-by: Ona <no-reply@ona.com>
Liquorix publishes tags only, not GitHub Releases. The releases API
returns an empty array, causing fallback to the stale 6.12.1-1 version.
Switch to the tags API and update the fallback to 6.19-6.
grep exits 1 when no lines match; under set -e this killed the script
when the Liquorix release has no lqx/ patch series (e.g. 6.19-6 only
has zen/ patches). Refactor into a stage_patches helper that captures
grep output safely.
XanMod already incorporates the zen patches, so applying them again
produces "already applied" hunks. patch --merge treated these as
conflicts and left markers in the tree. Switch to patch --forward
which exits 0 for already-applied hunks; only fail on genuine
rejects (.rej files).
Liquorix zen patches are named v{KVER}-lqx{N}.patch where KVER is the
stable point release they target. XanMod already tracks that stable
version, so the patch is a no-op and conflicts everywhere. Detect this
case by comparing the patch filename version against the tree version
and skip rather than fail.
merge_config.sh runs from kernel/src/ so relative paths like
configs/base/x86-64-v2.config resolve against the wrong directory.
Capture REPO_ROOT before cd and prefix all fragment paths.
patch --forward creates .rej files for reversed/already-applied hunks
even when it exits non-zero. Using -newer patch_path was unreliable
because the cached patch file is old. Use a mktemp sentinel created
immediately before each patch attempt so only rejects from that
specific attempt are detected. Also clean up .rej files on skip to
avoid false positives in subsequent patches.
Fetching the latest Liquorix tag regardless of kernel version causes
patch failures when building against older XanMod branches (e.g. 6.18
RT). Accept an optional KERNEL_MAJOR argument and return the latest
Liquorix tag for that major, falling back to overall latest.
Move Resolve Liquorix version step after Fetch XanMod source so the
kernel major (e.g. 6.18) is available. Pass it to resolve-lqx-version.sh
so the correct Liquorix patch series is fetched for the branch.
XanMod always tracks stable, so the Liquorix zen patch (a stable
backport, e.g. v6.18.16-lqx1.patch) will always conflict with an
XanMod tree at the same series (e.g. 6.18.19). Match on major.minor
rather than exact version.
@Interested-Deving-1896 Interested-Deving-1896 changed the title feat: LiqXanMod hybrid kernel — XanMod + Liquorix/Zen with runtime autodetect LiqXanMod hybrid kernel: CI fixes for XanMod 6.19 compatibility Mar 30, 2026
@Interested-Deving-1896
Interested-Deving-1896 merged commit b4a64d3 into main Mar 30, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant