arch-linux-cachyos
Skill1 starsChanged 2 months agoMITView on GitHub
Arch Linux / CachyOS administration. Pacman, mkinitcpio, Limine, Btrfs, amdgpu, gamescope, Sunshine/Moonlight, kernel management. Verified against official man pages, CachyOS wiki, and actual binaries on disk — not from memory.
In this repository30 other files it gives its agents.
- arch-linux-triageSkill
- bash-defensive-patternsSkill
- bash-linuxSkill
- bash-scriptingSkill
- beansSkill
- context7Skill
- docker-compose-setupSkill
- audioSkill
- deploymentSkill
- ecsSkill
- game-loopSkill
- inputSkill
- physicsSkill
- renderingSkill
- resourcesSkill
- ebitenSkill
- geminiSkill
- go-browser-testsSkill
- go-devSkill
- go-fluent-testingSkill
- go-htmx-frontendSkill
- go-setupSkill
- interactive-browser-testingSkill
- keep-on-goingSkill
- mcpcSkill
- minimaxSkill
- pixellabSkill
- playwright-mcpSkill
- public-repo-maturitySkill
- searxngSkill
The file
We split this skill into the rules it gives an agent
5 rules. About 0 are common, 0 are distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 63
No need to edit /etc/default/limine, /boot/limine.conf, or write hooks
- Very specific: line 69
Use the CachyOS Kernel Manager GUI (cachyos-kernel-manager) or:
- Very specific: line 127
Add to mkinitcpio: FILES=(/lib/firmware/edid/monitor.bin) in /etc/mkinitcpio.conf
- Very specific: line 128
Add kernel params: drm.edid_firmware=HDMI-A-1:edid/monitor.bin video=HDMI-A-1:e
- Very specific: line 234
signal-cli is a JVM app: If Java is missing, the daemon cannot start and loops in activating (auto-restart) — Hermes gateway then shows …
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Arch Linux / CachyOS Administration
This file is intentionally machine-agnostic. Machine-specific data (hostname, hardware specs, kernel versions) lives in per-host files (e.g.
./vecna.md) at the project root.Always verify against the listed source before relying on anything. Training data goes stale; the docs do not. Use
context7andsearxngskills for online verification.
Hard constraints (from user feedback)
- AI agent must not invoke
sudodirectly. Scripts that need root usesudointernally. - All fix scripts must be idempotent (safe to re-run).
- User wants 300% certainty on kernel/bootloader changes. Investigate online; check the actual binary; verify the fix ran.
- Avoid kernel panic risk. Kernel cmdline and initramfs changes are the highest-risk surface.
- Read existing skills before acting.
ls .agents/skills/and usefind_skillsfrom the global set.
Pacman / pacman.conf
IgnorePkg placement (the #1 recurring bug)
IgnorePkg MUST be in the [options] section. Anywhere else (end of file, [multilib], etc.) → pacman prints directive 'IgnorePkg' in section '<name>' not recognized and silently ignores it.
- Source:
pacman.conf(5)— https://man.archlinux.org/man/pacman.conf.5.en - Separator: space, not comma
- Validation:
pacman-conf IgnorePkg(same parser pacman uses) - The CachyOS default
pacman.confhas a commented#IgnorePkg =in[options]— uncomment and populate that line
Removing the running kernel is safe
Per ArchWiki/Reddit: "It is safe to remove either [kernel] as long as you have another kernel installed that you can boot into." The running kernel stays in memory; only disk files are removed.
IgnorePkg does not block removal
Per pacman.conf(5): IgnorePkg only affects --sysupgrade (upgrades), not --remove. So pacman -Rns works even on IgnorePkg'd packages.
Kernel switching (the SIMPLE way)
To switch default kernel: just remove the one you don't want.
# Verify the kernel you want to keep has boot files:
sudo ls /boot/vmlinuz-linux-cachyos-lts /boot/initramfs-linux-cachyos-lts.img
# Remove the other kernel — pacman hooks auto-regenerate /boot/limine.conf
sudo pacman -Rns linux-cachyos linux-cachyos-headers
# Reboot into the remaining kernel
sudo rebootWhy this works:
- Pacman hooks (
60-limine-mkinitcpio-remove-pre.hook+90-limine-mkinitcpio-remove-post.hook) fire on kernel package removal and calllimine-mkinitcpio-removewhich regenerates/boot/limine.confwith only the remaining kernel - The
limine-entry-tooltemplate hardcodesdefault_entry: 2— after removing the non-LTS kernel, the limine.conf structure is/+CachyOS(entry 1 = directory) →//linux-cachyos-lts(entry 2 = the only kernel). Sodefault_entry: 2naturally points to LTS - No need to edit
/etc/default/limine,/boot/limine.conf, or write hooks
Do NOT overcomplicate this with: BOOT_ORDER changes, default_entry hooks, custom post-install scripts, /etc/boot/hooks/post.d/ entries. All of those were tried and failed. The pacman hooks are designed for exactly this use case.
Installing a new kernel
Use the CachyOS Kernel Manager GUI (cachyos-kernel-manager) or:
sudo pacman -S linux-cachyos-lts linux-cachyos-lts-headers
sudo mkinitcpio -P # regenerate all initramfsLimine bootloader
Architecture
/etc/default/limine → user-editable source (KERNEL_CMDLINE, BOOT_ORDER, ESP_PATH)
│
sudo limine-update
│
▼
/boot/limine.conf (vfat) → regenerated from /etc/default/limine + limine-entry-tool template
│
/etc/boot/hooks/post.d/* (run after regeneration)Key facts
| Fact | Source |
/etc/default/limine is the user-editable source | CachyOS wiki: wiki.cachyos.org/configuration/boot_manager_configuration/ |
/boot/limine.conf is regenerated by sudo limine-update | Local limine-update binary |
limine-entry-tool template hardcodes default_entry: 2 | strings /usr/lib/limine/limine-entry-tool |
default_entry accepts numeric (1) or path (CachyOS/linux-cachyos-lts) | Limine CONFIG.md: codeberg.org/Limine/Limine/raw/branch/trunk/CONFIG.md |
/etc/boot/hooks/post.d/ scripts run after limine regen | limine-common-functions → run_boot_hooks post |
Hooks must be executable and not end in .disabled | run_boot_hooks() in limine-common-functions |
default_entry: 2 explained
The CachyOS limine.conf structure is:
/+CachyOS # Entry 1 (OS directory)
//linux-cachyos # Entry 2 (kernel under the OS dir)
//linux-cachyos-lts # Entry 3 (another kernel, if installed)default_entry: 2 always points to the FIRST kernel entry (under the OS directory). If you remove the non-LTS kernel, entry 2 becomes linux-cachyos-lts. So default_entry: 2 naturally works.
BOOT_ORDER in /etc/default/limine
Controls the ORDER of kernel entries written to /boot/limine.conf. Glob patterns: *lts, *fallback, *, Snapshots. Does NOT control which entry is the default — that's default_entry in /boot/limine.conf.
/boot is vfat with restrictive permissions
/boot is mounted with fmask=0077,dmask=0077 — only root can read/write. All scripts that touch /boot/limine.conf need sudo.
mkinitcpio
EDID firmware injection pattern
To make a connector always report "connected" (for headless/Sunshine use):
- Extract EDID from a real monitor:
/sys/class/drm/card1-HDMI-A-1/edid→/lib/firmware/edid/monitor.bin - Add to mkinitcpio:
FILES=(/lib/firmware/edid/monitor.bin)in/etc/mkinitcpio.conf - Add kernel params:
drm.edid_firmware=HDMI-A-1:edid/monitor.bin video=HDMI-A-1:e sudo mkinitcpio -P && sudo limine-update- Verify:
lsinitcpio /boot/initramfs-linux-cachyos-lts.img | grep edid
amdgpu in MODULES=()
Early-loads amdgpu in initramfs so KMS + EDID injection work at mode-set time, before userspace starts.
CachyOS kernels
| Kernel | Base | Stability | Use case |
linux-cachyos | latest stable (7.0.x) | Bleeding edge | Default if unsure; has AutoFDO |
linux-cachyos-lts | longterm (6.18.x) | "Minimally patched for maximum stability" | Stable fallback; fewer regressions |
linux-cachyos-deckify | latest stable | Handheld-specific patches | CachyOS Handheld ISO default |
Source: wiki.cachyos.org/features/kernel
LTS vs main: what you lose
- AutoFDO + Propeller (main only): 1-5% on kernel-heavy benchmarks; negligible for GPU-bound gaming
- Newest BORE patches (main only): marginal scheduler tuning
- Color Pipeline API for HW HDR (6.19+): only if using HDR over HDMI
- New amdgpu features: sometimes new features, sometimes new regressions
What you keep on LTS: BORE scheduler, CachyOS base patchset, full 890M/Zen 5/NPU support (all in tree since 6.8/6.6).
Display / compositor issues
KWin doesn't re-enable display after gamescope teardown
On kernel 7.0.12, KWin may leave HDMI-A-1 in enabled: disabled, dpms: Off after gamescope exits. Symptoms: black screen after "Switch to Desktop" in Steam Big Picture.
Workaround: qdbus6 org.kde.KWin /KWin org.kde.KWin.replace (restarts KWin, re-detects outputs)
Fix: switch to linux-cachyos-lts (older amdgpu display-handoff code is more stable)
Steam "Switch to Desktop" in Big Picture
Steam's legacy path calls steamos-session-select plasma which:
- Sets autologin to
plasma.desktopviapkexec - Shuts down Steam
- Stops
gamescope-session.target
The cachyos-gamescope-autologin.service then reverts autologin to gamescope-session.desktop on every desktop login. Use steamos-session-select persistent to mask this behavior.
Sunshine autostart
Sunshine's systemd user service (app-dev.lizardbyte.app.Sunshine.service) must be enabled to autostart:
systemctl --user enable app-dev.lizardbyte.app.Sunshine.serviceThe service has ExecStartPre=/bin/sleep 5 to avoid racing with KWin.
Canonical validation commands
pacman-conf IgnorePkg # what pacman will actually respect
uname -r # running kernel
pacman -Q | grep ^linux-cachyos # installed kernels
sudo ls /boot/vmlinuz-* /boot/initramfs-* # boot files present?
lsinitcpio /boot/initramfs-linux-cachyos-lts.img | grep edid # EDID in initramfs?
sudo grep default_entry /boot/limine.conf # what will limine boot?
cat /sys/class/drm/card1-HDMI-A-1/enabled # display output active?
cat /sys/class/drm/card1-HDMI-A-1/dpms # display powered?References
references/electron-gamescope-fix.md— Electron apps (Discord, Heroic) in gamescope-session: root causes (Electron-Wayland, shortcuts.vdf not repointed, CompatToolMapping force-pin to proton), automated fix flow, restart requirement, verification commands, pitfalls (binary VDF needs python-vdf, userdata placeholder0/, grep -q too broad), rollback.
Fix-script index (in /home/blaze/scripts/)
| Issue | Script | Notes |
| Gamescope crashes on monitor disconnect | build-gamescope-patched.sh → install-gamescope-patched.sh | Run build as blaze (not root); install with sudo |
IgnorePkg in wrong section | fix-pacman-ignorepkg.sh | Moves to [options], validates with pacman-conf |
| Monitor off → gamescope sees no display | fix-virtual-display-edid.sh | Saves EDID to initramfs + kernel cmdline |
| Install both kernels + Strix boot params | fix-boot-safe.sh | Idempotent: amdgpu MODULES, dcdebugmask=0x412, PCIe AER |
| Electron apps (Discord, Heroic, …) silently fail in gamescope-session | fix-electron-gamescope.sh | Per-app --ozone-platform=x11 wrapper + repoints Steam shortcut + clears CompatToolMapping force-pin. Rolls back with rollback-electron-gamescope.sh. Details: references/electron-gamescope-fix.md |
| Rollback everything to stock | revert-all-changes.sh | Destructive, no confirmation |
| Rollback gamescope patch only | rollback-gamescope-patch.sh | Reinstalls repo gamescope |
| Rollback EDID injection only | rollback-virtual-display-edid.sh | Removes EDID from initramfs + cmdline |
| Disk cleanup | clean-all.sh | pacman, cargo, docker, flatpak, etc. |
| signal-cli daemon dead (hermes Signal gateway) | (no script — manual) | Java missing → see "signal-cli / Java" below |
Top pitfalls (learned the hard way)
| # | Pitfall | Detection | Fix |
| 1 | IgnorePkg in wrong section → silently ignored | pacman-conf IgnorePkg returns empty | fix-pacman-ignorepkg.sh |
| 2 | Overcomplicating kernel switch with BOOT_ORDER/default_entry hooks | System boots wrong kernel despite config changes | Just pacman -Rns the unwanted kernel; hooks auto-regen limine.conf |
| 3 | Can't remove running kernel (pacman -Rns refuses) | pacman error message | It doesn't refuse — it's safe. The running kernel stays in memory. |
| 4 | KWin doesn't re-enable display after gamescope teardown | cat /sys/class/drm/card1-HDMI-A-1/enabled = disabled | qdbus6 org.kde.KWin /KWin org.kde.KWin.replace or switch to LTS |
| 5 | Building gamescope as root | makepkg error | Run as blaze, not root |
| 6 | Writing scripts from memory without verifying online | Script has subtle bugs (wrong sed patterns, wrong bash conditions) | Use context7 + searxng skills; read actual man pages and binaries |
| 7 | cachyos-gamescope-autologin.service reverts desktop autologin | Desktop reverts to gamescope after reboot | steamos-session-select persistent |
| 8 | Electron app (Discord, Heroic, …) silent no-window in gamescope-session | THREE layered causes: (a) gamescope doesn't expose Wayland socket → Electron 27+ needs --ozone-platform=x11; (b) Steam shortcut still points at raw binary / is force-pinned to proton (can't run ELF); (c) Steam's overlay LD_PRELOAD=gameoverlayrenderer.so crashes Electron 42+ zygote (FATAL zygote_host_impl_linux.cc:207). Manual terminal tests never reproduce (c) — your shell lacks the injected preload. | fix-electron-gamescope.sh handles all three; verify with exact Steam env (see references/electron-gamescope-fix.md Failure D) |
| 9 | signal-cli-daemon.service loops in activating (auto-restart) forever, Hermes Signal gateway shows "cannot reach signal-cli at http://127.0.0.1:41511" | journalctl --user -u signal-cli-daemon → JAVA_HOME is not set and no 'java' command could be found in your PATH | Install jre-openjdk-headless, then sudo archlinux-java status → patch service with Environment=JAVA_HOME=<path> |
| 10 | Steam shortcut pointing at Linux-native ELF (e.g. Heroic) still goes through proton-cachyos-slr — proton can't run an ELF, exits in ~4 s, Steam shows "Preparing launch" forever, user sees black screen + spinner. Force-pin lives in ~/.steam/steam/config/config.vdf → CompatToolMapping keyed by appid (Heroic = 2385805048) | grep -B1 'proton-cachyos-slr' ~/.steam/steam/config/config.vdf | fix-electron-gamescope.sh strips the bad CompatToolMapping entry, AND repoints the shortcut in userdata/<id>/config/shortcuts.vdf to call the wrapper directly. Steam restart required to apply. |
| 11 | Steam userdata/ has a placeholder 0/ dir with no real shortcuts; iterating userdata/*/config naively picks the placeholder first and patches a non-existent file | First for cfg in /home/blaze/.steam/steam/userdata/*/config picks 0/ | Require dirname >= 1 AND shortcuts.vdf must exist before patching |
| 12 | Trying to pkill -9 -f 'gamescope|steam' from a non-root terminal to force Steam reload takes out the user's own shell with no recovery (Operation not permitted on plasmalogin-helper, but SIGKILL propagates via signal mask). | pkill returns Operation not permitted for root PIDs AND the calling shell exits with -9 | Use systemctl --user restart gamescope-session.target — plasmalogin-autologin respawns gamescope + Steam cleanly with new PIDs reading fresh config |
signal-cli / Java (Hermes Signal gateway)
signal-cli is a JVM app. If Java is missing, the daemon cannot start and loops in
activating (auto-restart) — Hermes gateway then shows
cannot reach signal-cli at http://127.0.0.1:41511.
Diagnosis
systemctl --user status signal-cli-daemon
journalctl --user -u signal-cli-daemon --no-pager -n 20
# look for: ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATHFix
sudo pacman -S jre-openjdk-headless
sudo archlinux-java status # discover installed JVM path
# → typically /usr/lib/jvm/java-21-openjdk
# Patch the user service to set JAVA_HOME
sed -i '/Environment=SIGNAL_CLI_DATA_DIR=/i Environment=JAVA_HOME=/usr/lib/jvm/java-21-openjdk' \
~/.config/systemd/user/signal-cli-daemon.service
systemctl --user daemon-reload
systemctl --user restart signal-cli-daemon
systemctl --user status signal-cli-daemonHermes gateway reconnects automatically every ~300s on retry. To force it now, restart the gateway container.
Reference URLs
- CachyOS wiki (boot manager): https://wiki.cachyos.org/configuration/boot_manager_configuration/
- CachyOS wiki (kernel): https://wiki.cachyos.org/features/kernel
- CachyOS wiki (kernel manager): https://wiki.cachyos.org/features/kernel_manager
- Upstream Limine CONFIG.md: https://codeberg.org/Limine/Limine/raw/branch/trunk/CONFIG.md
- ArchWiki (Limine): https://wiki.archlinux.org/title/Limine
- ArchWiki (Kernel): https://wiki.archlinux.org/title/Kernel
- ArchWiki (Java): https://wiki.archlinux.org/title/Java
pacman.conf(5): https://man.archlinux.org/man/pacman.conf.5.en- Bazzite gamescope patch: https://github.com/bazzite-org/gamescope/commit/af9196ce
- kernel.org: https://kernel.org/
- signal-cli: https://github.com/AsamK/signal-cli
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

