Package Details: linux-xanmod-headers 5.11.4-1

Git Clone URL: (read-only, click to copy)
Package Base: linux-xanmod
Description: Headers and scripts for building modules for the Linux Xanmod kernel
Upstream URL:
Licenses: GPL2
Submitter: Yoshi2889
Maintainer: figue (figuepluto, jfigueras)
Last Packager: figue
Votes: 65
Popularity: 2.81
First Submitted: 2017-02-14 09:40
Last Updated: 2021-03-07 21:56

Pinned Comments

figue commented on 2018-12-14 00:50

This package have several variables to enable/disable features.

## The following variables can be customized at build time. Use env or export to change at your wish
##   Example: env _microarchitecture=99 use_numa=n use_tracers=n use_pds=n makepkg -sc
## Look inside '' to choose your microarchitecture
## Valid numbers between: 0 to 99
## Default is: 0 => generic
## Good option if your package is for one machine: 99 => native
if [ -z ${_microarchitecture+x} ]; then

## Disable NUMA since most users do not have multiple processors. Breaks CUDA/NvEnc.
## Archlinux and Xanmod enable it by default.
## Set variable "use_numa" to: n to disable (possibly increase performance)
##                             y to enable  (stock default)
if [ -z ${use_numa+x} ]; then

## For performance you can disable FUNCTION_TRACER/GRAPH_TRACER. Limits debugging and analyzing of the kernel.
## Stock Archlinux and Xanmod have this enabled. 
## Set variable "use_tracers" to: n to disable (possibly increase performance)
##                                y to enable  (stock default)
if [ -z ${use_tracers+x} ]; then

## Enable Cachy CPU scheduler by default
## Set variable "use_cachy" to: n to disable (stock Xanmod)
##                              y to enable
if [ -z ${use_cachy+x} ]; then

## Set variable "use_ns" to: n to disable (stock Xanmod)
##                           y to enable (stock Archlinux)
if [ -z ${use_ns+x} ]; then

# Compile ONLY used modules to VASTLYreduce the number of modules built
# and the build time.
# To keep track of which modules are needed for your specific system/hardware,
# give module_db script a try:
# This PKGBUILD read the database kept if it exists
# More at this wiki page --->
if [ -z ${_localmodcfg} ]; then

Personally I'm running now xanmod kernel compiled with this:

env _microarchitecture=99 use_numa=n use_tracers=n use_ns=y _localmodcfg=y makepkg -si

Also, you can now create the file myconfig in your local repo to build this package with a custom config or use ${XDG_CONFIG_HOME}/linux-xanmod/myconfig. This file can be a full kernel config or be a script with several entries to add/remove options (you have several examples in PKGBUILD by using scripts/config):

Code involved:

  for _myconfig in "${startdir}/myconfig" "${XDG_CONFIG_HOME}/linux-xanmod/myconfig" ; do
    if [ -f "${_myconfig}" ]; then
      if grep -q 'scripts/config' "${_myconfig}"; then
        # myconfig is a partial file. Executing as a script
        msg2 "Applying myconfig..."
        bash -x "${_myconfig}"
        # myconfig is a full config file. Replacing default .config
        msg2 "Using user CUSTOM config..."
        cp -f "${_myconfig}" .config

Latest Comments

1 2 3 4 5 6 ... Next › Last »

dmshimself commented on 2021-03-09 03:41

thanks @figue - I'm already using

env _microarchitecture=30 use_numa=n use_tracers=n use_ns=y _localmodcfg=y makepkg -sri

and the use of modprobe.db certainly did reduce my build times when I first started using it a while ago. I'll try out the .git version sometime.

In the meantime, it looks to me as though anyone using this kernel should be encouraged to use the -C option with their makepkg

Thanks everyone; the advice was appreciated

figue commented on 2021-03-08 22:17

@dmshimself yes, the problem is in this point because it merges all *.patch that you have in src/. So if you really don't want to build from scratch you should remove all patch files from src manually. makepkg will copy all of them again (only the necessary).

But if time compilation is really important for you, I recommend using modprobed.db and compile only the modules you need according to your system.

Another option is to use linux-xanmod-git package. That package uses the latest git master branch, but I usually don't merge any patch.

dmshimself commented on 2021-03-08 22:07

@figue - yes the -C option is the one I'm trying to avoid using as a complete build from scratch takes a long time on my slow machine. I have lots of other AUR packages installed and when they are updated, none (that I use!) need a -C.

Is there something special about building this package that 'requires' this? Other suggested makepkg flags in the comments for this AUR package don't make a comment on -C as being required, but suggest the 'usual' -sri and similar flags.

figue commented on 2021-03-08 08:31

@dmshimself as good practice, when a new release is up, use -C flag in makepkg to erase src folder.

dmshimself commented on 2021-03-07 22:19

thanks @figue that is what I have in myconfig already, so great minds think alike :-)

and thanks @Aethanjf - I'll try that on my next build if I get the same issue with error in prepare

Aethanjf commented on 2021-03-07 22:12

@dmshimself This error is because there is src in you folder, if you remove this before compiling it won't error.

figue commented on 2021-03-07 22:05

@dmshimself as you post, your myconfig is executing this:

scripts/config --enable CONFIG_SATA_AHCI

so the final .config should have it. I'm not an expert, but in my case I have CONFIG_SATA_AHCI as module, maybe this is the issue here, and you need to put in your myconfig scripts/config --module CONFIG_SATA_AHCI

dmshimself commented on 2021-03-07 20:45

It must be me then :-) In order to simpify, I've deleted the old directory as suggested (many thanks), done a fresh git clone and then moved a myconfig file into the folder. I need to have SATA_AHCI enabled.

I've then run:

env _microarchitecture=30 use_numa=n use_tracers=n use_ns=y _localmodcfg=y makepkg -sri

It's building now. I note that the first part shows the following if it's of any interest .....

patching file tools/testing/selftests/seccomp/seccomp_bpf.c patching file tools/testing/selftests/wireguard/ patching file virt/kvm/kvm_main.c -> Setting version... -> Applying patch sphinx-workaround.patch... patching file Documentation/ -> Disabling FUNCTION_TRACER/GRAPH_TRACER... -> Disabling NUMA... ==> Detected CPU architecture: silvermont

I then see ....

==> Building this package for microarchitecture: CONFIG_MSILVERMONT

-> Applying myconfig... + scripts/config --enable CONFIG_SATA_AHCI

HOSTCC scripts/basic/fixdep HOSTCC scripts/kconfig/conf.o HOSTCC scripts/kconfig/confdata.o

and it's off and running. As this is a clean build, I expect it to work. Perhaps when the next version of this kernel is issued, I'll revisit and report back.

figue commented on 2021-03-07 19:54

@dmshimself seems you are patching tools/testing/selftests/wireguard/ but I don't merge any patch right now. Are you sure you are compiling linux-xanmod package? Why don't you erase the entire local repo and download it again? This package is working fine.

dmshimself commented on 2021-03-07 19:41

Advice on building

For a while now I've failed to get a makepkg to work with the following:

env XDG_CONFIG_HOME=/mnt/data/AUR/linux-xanmod _microarchitecture=30 use_numa=n use_tracers=n use_ns=y _localmodcfg=y makepkg -sri

I get an error after the patches are applied:

patching file tools/testing/selftests/wireguard/ patching file virt/kvm/kvm_main.c ==> ERROR: A failure occurred in prepare(). Aborting...

I've tried many combinations of flags to makepkg, but the only one I've found tht works is to do a clean build with a makepkg -C

Now there sn't anything wrong with that, but it takes a long time on my machine to do the build from scratch and I wondered if there might be a way to avoid this failure in prepare?