How to Install XanMod Kernel on Ubuntu 26.04 and 24.04

Install XanMod Kernel on Ubuntu 26.04 and 24.04 for gaming and performance. Covers CPU builds and MAIN, EDGE, LTS, RT branches.

UpdatedPublished AuthorJoshua JamesRead time9 minGuide typeUbuntuDiscussion2 comments

Frame-time spikes, audio dropouts, and sluggish input can come from a kernel tuned for broad hardware coverage instead of desktop latency. You can install XanMod kernel on Ubuntu 26.04 and 24.04 from XanMod’s official APT repository when you want CPU-level builds, scheduler tuning, and a normal APT update path for a performance-focused kernel.

XanMod is not a Launchpad PPA and does not replace Ubuntu’s package manager. The repository publishes MAIN, EDGE, LTS, and RT kernel branches, while the install process keeps Ubuntu’s generic kernel available so you can boot back into the stock path if a custom kernel does not fit your hardware.

Install XanMod Kernel on Ubuntu

Ubuntu already offers several kernel paths, so choose the one that matches the problem you are solving before you add another boot option.

Kernel OptionPrimary FocusBest ForTrade-offs
Install HWE kernel on UbuntuHardware enablement and Ubuntu maintenanceDesktop systems that need newer drivers while staying on Ubuntu’s signed kernel trackConservative tuning and Ubuntu’s release cadence
XanMod KernelLow latency and desktop responsivenessGaming, audio, multimedia work, and workstations that benefit from CPU-level buildsUnsigned kernels, narrower hardware assumptions, and more responsibility for boot rollback
Install Liquorix kernel on UbuntuDesktop responsiveness and multimediaGeneral-purpose desktop tuning without XanMod’s CPU-specific package splitStill outside Ubuntu’s stock kernel track
Install Zabbly kernel on UbuntuMainline kernel trackingDevelopers and early adopters who want newer upstream kernels with fewer desktop-tuning patchesFaster upstream churn and less latency-focused tuning

Use XanMod when lower latency, frame pacing, or desktop responsiveness matters more than staying on Ubuntu’s default kernel cadence. Searches for the Zen kernel usually point to Arch and derivative packages; on Ubuntu, XanMod and Liquorix are the practical desktop-tuned APT paths.

These instructions are scoped to Ubuntu 26.04 LTS and 24.04 LTS. Ubuntu 22.04 (jammy) can read the XanMod repository metadata, but the current jammy amd64 package indexes do not publish linux-xanmod packages, so the repository setup uses a guard that stops before writing a broken source file.

XanMod targets x86_64 systems and does not ship Microsoft-signed kernels for Secure Boot. If Secure Boot must stay enabled, keep Ubuntu’s stock or HWE kernel instead.

Confirm the system architecture before adding the repository:

uname -m

A supported amd64 Ubuntu system returns:

x86_64

Update Ubuntu Before XanMod Installation

Start with a package index refresh so Ubuntu sees the newest dependency metadata before you add another kernel repository.

sudo apt update

These commands use sudo for system-wide changes. If your account does not have sudo access yet, follow the guide on how to add a new user to sudoers on Ubuntu or run the commands from a root shell.

Upgrade pending packages next so the new kernel lands on a current userland and driver base.

sudo apt upgrade

Install XanMod Repository Prerequisites on Ubuntu

Install the certificate, download, and keyring tools needed to add the official XanMod repository. The curl command downloads the signing key, while gpg converts it into the binary keyring format APT expects.

sudo apt install ca-certificates curl gpg lsb-release

Add the XanMod GPG Key and Repository on Ubuntu

Create the system keyring directory, then import XanMod’s archive key from the same project infrastructure linked by the XanMod website.

sudo install -m 0755 -d /etc/apt/keyrings
curl -fsSL https://dl.xanmod.org/archive.key | sudo gpg --dearmor --yes -o /etc/apt/keyrings/xanmod-archive-keyring.gpg

You can inspect the imported key before adding the repository. The current XanMod archive key uses fingerprint D38D 7D1D A134 9567 ADED 882D 86F7 D09E E734 E623.

gpg --show-keys --with-fingerprint /etc/apt/keyrings/xanmod-archive-keyring.gpg

Write the DEB822 source only on supported Ubuntu codenames. The Architectures: amd64 line keeps APT focused on the package architecture XanMod publishes for this Ubuntu path.

CODENAME=$(lsb_release -sc)

if [ "$CODENAME" = "resolute" ] || [ "$CODENAME" = "noble" ]; then
  printf '%s\n' \
    "Types: deb" \
    "URIs: https://deb.xanmod.org" \
    "Suites: $CODENAME" \
    "Components: main" \
    "Architectures: amd64" \
    "Signed-By: /etc/apt/keyrings/xanmod-archive-keyring.gpg" | sudo tee /etc/apt/sources.list.d/xanmod.sources > /dev/null
else
  printf 'XanMod does not currently publish linux-xanmod packages for %s.\n' "$CODENAME"
fi

If the unsupported-suite message appears, stop there. Use Ubuntu’s signed HWE kernel or another kernel guide that explicitly supports your release instead of forcing a stale source entry.

Refresh APT and Confirm XanMod Packages on Ubuntu

Refresh APT again so Ubuntu reads the new repository metadata, then confirm the MAIN x64v2 package is visible before you install anything.

sudo apt update

Confirm the package candidate after the refresh finishes:

apt-cache policy linux-xanmod-x64v2

A successful policy check on Ubuntu 26.04 looks like this, with Ubuntu 24.04 showing noble/main in the repository line instead.

linux-xanmod-x64v2:
  Installed: (none)
  Candidate: 7.0.4-xanmod1-0
  Version table:
     7.0.4-xanmod1-0 500
        500 https://deb.xanmod.org resolute/main amd64 Packages

Detect Your CPU Level for XanMod on Ubuntu

Download XanMod’s psABI helper and make it executable in your current directory. The script checks which x86-64 baseline your CPU supports.

curl -fsSLO https://dl.xanmod.org/check_x86-64_psabi.sh
chmod +x check_x86-64_psabi.sh

The chmod command adds execute permission so the downloaded helper can run directly.

./check_x86-64_psabi.sh
CPU supports x86-64-v2

If the output says x86-64-v2, use an x64v2 package. If it says x86-64-v3 or x86-64-v4, use x64v3 for MAIN, EDGE, or RT because the current repository does not publish a linux-xanmod-x64v4 package. The helper encodes the detected level in its exit status, so read the printed line; inside your own set -e script, run it as ./check_x86-64_psabi.sh || true.

Choose the XanMod Branch and Package on Ubuntu

MAIN is the default choice for most desktops. EDGE, LTS, and RT use the same repository but target different stability and latency trade-offs.

BranchPackagesBest ForCurrent line
MAINlinux-xanmod-x64v2, linux-xanmod-x64v3Default desktop, gaming, and low-latency workstation use7.0.x stable mainline
EDGElinux-xanmod-edge-x64v2, linux-xanmod-edge-x64v3Testing newer XanMod patches before they land in MAIN7.0.x fast-moving preview
LTSlinux-xanmod-lts-x64v1, linux-xanmod-lts-x64v2, linux-xanmod-lts-x64v3Longer-lived workstation installs, plus older CPUs that still need x64v16.18.x long-term support
RTlinux-xanmod-rt-x64v2, linux-xanmod-rt-x64v3Audio, control, and deterministic latency workloads6.18.x PREEMPT_RT

Install the XanMod Package on Ubuntu

Install the MAIN x64v2 package if the psABI helper reported x86-64-v2. Replace only the package name if you chose another branch or CPU level from the table.

sudo apt install linux-xanmod-x64v2

Use x64v3 instead when the helper reports x86-64-v3 or newer:

sudo apt install linux-xanmod-x64v3

Ubuntu 26.04 uses APT 3 style output. Ubuntu 24.04 shows older APT wording but installs the same branch meta package, versioned image, and matching headers.

Installing:
  linux-xanmod-x64v2

Installing dependencies:
  linux-headers-7.0.4-x64v2-xanmod1  linux-image-7.0.4-x64v2-xanmod1

Suggested packages:
  clang  libelf-dev  lld  llvm  scx-scheds

Summary:
  Upgrading: 0, Installing: 3, Removing: 0, Not Upgrading: 0

Reboot Ubuntu After XanMod Installation

Reboot after the package install finishes. Keep at least one Ubuntu generic kernel installed so the GRUB Advanced options menu can get you back to a signed stock kernel if the XanMod boot fails.

sudo reboot

If you no longer need the psABI helper afterward, remove it from your working directory:

rm -f check_x86-64_psabi.sh

Verify XanMod Kernel on Ubuntu

Verify the Running XanMod Kernel on Ubuntu

Check the active kernel after the reboot instead of assuming GRUB picked the new entry.

uname -r
7.0.4-x64v2-xanmod1

A XanMod boot shows the upstream kernel version, CPU-level suffix, and xanmod tag. If you still see a *-generic kernel, use the GRUB checks in the troubleshooting section before you tune the new kernel.

Verify Matching XanMod Headers on Ubuntu

Kernel headers need to match the running XanMod image, especially when DKMS modules compile against the active kernel.

dpkg-query -W -f='${binary:Package} ${Version}\n' "linux-headers-$(uname -r)"
test -d "/usr/src/linux-headers-$(uname -r)" && echo "headers tree present"
linux-headers-7.0.4-x64v2-xanmod1 7.0.4-x64v2-xanmod1-0~20260507.g32309ec
headers tree present

Check XanMod TCP Congestion Control on Ubuntu

XanMod exposes BBR through the normal Linux TCP congestion control settings. Current packages report the algorithm as bbr, not as a separate bbrv3 sysctl name.

sysctl net.ipv4.tcp_congestion_control net.ipv4.tcp_available_congestion_control
net.ipv4.tcp_congestion_control = bbr
net.ipv4.tcp_available_congestion_control = reno bbr

Install CPU Microcode for XanMod on Ubuntu

Install only the vendor package that matches your processor. Microcode updates load before the kernel and fix CPU errata that can affect stability, scheduling, and security.

Install Intel Microcode on Ubuntu

Use Intel’s microcode package if your system runs on Intel hardware:

sudo apt install intel-microcode iucode-tool

Install AMD Microcode on Ubuntu

Use AMD’s package instead on Ryzen, Threadripper, EPYC, or older AMD platforms:

sudo apt install amd64-microcode

Reboot after a microcode update so the firmware change loads before XanMod starts.

Update or Remove XanMod Kernel on Ubuntu

Update XanMod Kernel on Ubuntu

XanMod updates through normal APT maintenance. The branch meta package pulls the newer versioned image and headers when upstream publishes a new build.

sudo apt update
sudo apt upgrade

Remove XanMod Kernel on Ubuntu

Removal is safest after Ubuntu is already running a generic kernel. Check the current kernel first:

uname -r

If the output ends in xanmod1, reboot and choose a generic entry from GRUB’s Advanced options for Ubuntu menu. On headless systems, list the generic menu titles first, then use grub-reboot for a one-time generic boot.

sudo grep "menuentry 'Ubuntu, with Linux" /boot/grub/grub.cfg | grep generic

Replace the version in this example with the generic menu title from your own system:

sudo grub-reboot "Advanced options for Ubuntu>Ubuntu, with Linux 7.0.0-15-generic"
sudo reboot

After the generic boot, remove the installed XanMod packages by querying dpkg for the exact package names and passing only those names to APT. The grep command keeps the pipeline restricted to package names that begin with linux-, and xargs -r skips APT when no matching package exists.

dpkg-query -W -f='${binary:Package}\n' 'linux-*xanmod*' 2>/dev/null | grep -E '^linux-' | xargs -r sudo apt remove --purge -y

The removal should name the branch meta package plus the matching versioned image and headers, similar to this APT 3 output:

REMOVING:
  linux-headers-7.0.4-x64v2-xanmod1*  linux-xanmod-x64v2*
  linux-image-7.0.4-x64v2-xanmod1*

Do not use apt autoremove as the primary XanMod removal command. It can also target older Ubuntu generic kernels, which is a separate cleanup decision after you confirm the system boots normally.

Remove the repository file and keyring after the package cleanup, then refresh APT:

sudo rm -f /etc/apt/sources.list.d/xanmod.sources
sudo rm -f /etc/apt/keyrings/xanmod-archive-keyring.gpg
sudo apt update

These checks should return no output once the installed XanMod packages and repository files are gone:

dpkg-query -W -f='${binary:Package}\n' 'linux-*xanmod*' 2>/dev/null
find /etc/apt/sources.list.d /etc/apt/keyrings -maxdepth 1 -iname '*xanmod*' -print

Troubleshoot XanMod Kernel on Ubuntu

Most XanMod issues on Ubuntu come down to Secure Boot, GRUB entry selection, CPU package mismatch, or DKMS modules rebuilding against the wrong kernel. Work through those checks before you switch branches.

Fix Secure Boot Problems with XanMod on Ubuntu

Secure Boot blocks XanMod on UEFI systems because the project does not ship Microsoft-signed kernels. Install mokutil if needed:

sudo apt install mokutil

Then check the current firmware state:

mokutil --sb-state

Possible outputs include:

SecureBoot enabled
SecureBoot disabled
EFI variables are not supported on this system

If you see SecureBoot enabled, disable Secure Boot in your firmware settings before you try to boot XanMod again, or stay on Ubuntu’s signed stock or HWE kernel. If you see EFI variables are not supported on this system, the machine booted in legacy BIOS mode and Secure Boot is not the blocker.

Fix the Wrong Default Boot Entry for XanMod on Ubuntu

Current XanMod MAIN packages sort ahead of Ubuntu’s generic kernels on fresh Ubuntu 26.04 and 24.04 installs with GRUB_DEFAULT=0. If your system still lands on a generic kernel, inspect the default mode and confirm GRUB created XanMod menu entries.

grep '^GRUB_DEFAULT' /etc/default/grub
sudo grep menuentry /boot/grub/grub.cfg | grep xanmod

For a persistent XanMod default, switch GRUB to saved-entry mode and set the exact XanMod title from your grub.cfg output. Replace the kernel title in this example if your package branch or CPU level differs.

sudo sed -i 's/^GRUB_DEFAULT=.*/GRUB_DEFAULT=saved/' /etc/default/grub
sudo update-grub
sudo grub-set-default "Advanced options for Ubuntu>Ubuntu, with Linux 7.0.4-x64v2-xanmod1"
sudo reboot

If you prefer a graphical boot-entry manager, install GRUB Customizer on Ubuntu and select the XanMod entry there instead.

Fix XanMod CPU Detection Mismatches on Ubuntu

If package selection looks wrong for your hardware, rerun the psABI helper and use its full baseline result as the decision point. Single CPU flags such as avx2 or sse4_2 are useful clues, but they do not replace the helper’s complete check.

./check_x86-64_psabi.sh || true
CPU supports x86-64-v2

If the helper reports x86-64-v2, install an x64v2 package. If it reports x86-64-v3 or x86-64-v4, use x64v3 for MAIN, EDGE, or RT. If you deleted the helper, download it again with the same curl -fsSLO and chmod +x commands used for CPU detection.

Fix XanMod DKMS Module Build Failures on Ubuntu

DKMS errors mean an out-of-tree module did not rebuild against the new XanMod headers. Install DKMS if the system does not already have it, list registered modules, then rerun the autoinstall against the active kernel.

sudo apt install dkms
sudo dkms status
sudo dkms autoinstall -k "$(uname -r)"

If the rebuild still fails, reinstall the current driver branch and inspect the DKMS build log. NVIDIA users should start with install NVIDIA drivers on Ubuntu so the driver stack matches the new kernel headers. The find exec command option in the log command prints each matching log path before tail shows the last 40 lines.

sudo find /var/lib/dkms -path '*/build/make.log' -print -exec tail -n 40 {} \;

Fix XanMod Repository GPG Errors on Ubuntu

If apt update reports a missing or invalid XanMod signature, reimport the keyring in place and confirm the file is readable by APT.

curl -fsSL https://dl.xanmod.org/archive.key | sudo gpg --dearmor --yes -o /etc/apt/keyrings/xanmod-archive-keyring.gpg
ls -lh /etc/apt/keyrings/xanmod-archive-keyring.gpg
sudo apt update

A readable keyring usually shows -rw-r--r-- permissions on /etc/apt/keyrings/xanmod-archive-keyring.gpg. If the permissions are tighter, run sudo chmod 644 /etc/apt/keyrings/xanmod-archive-keyring.gpg and refresh APT again.

Recover from a Failed XanMod Boot on Ubuntu

If Ubuntu stops booting after a XanMod install, go back through GRUB’s Advanced options for Ubuntu menu and choose the previous generic kernel first. Once the system is stable again, remove the XanMod packages and read the previous boot log before you try another branch.

sudo journalctl -xb -1

Look for kernel panics, storage-driver failures, GPU module errors, or other hardware initialization problems that stopped the XanMod boot early.

Conclusion

XanMod is running on Ubuntu when uname -r ends in xanmod1 and the matching header package is installed. Keep a generic Ubuntu kernel available for rollback, use normal APT maintenance for future XanMod updates, and return to Ubuntu’s HWE kernel if signed-kernel support matters more than custom desktop tuning.

Share this guide

Help another Linux user troubleshoot faster

Share this guide with someone troubleshooting Linux systems or saving it for later.

Follow LinuxCapable

Want more LinuxCapable guides in Google?

Add LinuxCapable as a preferred source so Google can show more of our fresh Linux tutorials in Top Stories and From your sources when relevant.

Add LinuxCapable as a preferred source on Google
Search LinuxCapable

Need another guide?

Search LinuxCapable for package installs, commands, troubleshooting, and follow-up guides related to what you just read.

Found this guide useful?

Support LinuxCapable to keep tutorials free and up to date.

Buy me a coffeeBuy me a coffee

2 thoughts on “How to Install XanMod Kernel on Ubuntu 26.04 and 24.04”

    • Thanks for reporting this, kto. You’re absolutely right: the XanMod repository does not provide any linux-xanmod-x64v4 packages, and that reference was added by mistake.

      XanMod only ships v2 and v3 builds for the MAIN and EDGE branches, and v1, v2, and v3 for the LTS branch. The x86-64-v4 level is listed only as a CPU reference for AVX-512 systems and is noted upstream as offering no practical kernel benefit, so there is no v4 package.

      The guide has been corrected to match the official XanMod packages. Thanks again for catching this.

      Reply
Before commenting, please review our Comments Policy.
Formatting tips for your comment

You can use basic HTML to format your comment. Useful tags currently allowed in published comments:

You type Result
<code>command</code> command
<strong>bold</strong> bold
<em>italic</em> italic
<blockquote>quote</blockquote> quote block

Got a Question or Feedback?

We read and reply to every comment - let us know how we can help or improve this guide.

Let us know you are human: