Package Base Details: linux-xanmod

Git Clone URL: https://aur.archlinux.org/linux-xanmod.git (read-only, click to copy)
Submitter: Yoshi2889
Maintainer: figue (figuepluto, jfigueras)
Last Packager: figue
Votes: 128
Popularity: 2.64
First Submitted: 2017-02-14 09:40 (UTC)
Last Updated: 2024-04-18 00:32 (UTC)

Pinned Comments

figue commented on 2018-12-14 00:50 (UTC) (edited on 2023-02-27 20:00 (UTC) by figue)

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=98 use_numa=n use_tracers=n makepkg -sc
##
## Look inside 'choose-gcc-optimization.sh' to choose your microarchitecture
## Valid numbers between: 0 to 99
## Default is: 0 => generic
## Good option if your package is for one machine: 98 (Intel native) or 99 (AMD native)
if [ -z ${_microarchitecture+x} ]; then
  _microarchitecture=0
fi

## 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
  use_numa=y
fi

## Since upstream disabled CONFIG_STACK_TRACER (limits debugging and analyzing of the kernel)
## you can enable them setting this option. Caution, because they have an impact in performance.
## Stock Archlinux has this enabled. 
## Set variable "use_tracers" to: n to disable (possibly increase performance, XanMod default)
##                                y to enable  (Archlinux default)
if [ -z ${use_tracers+x} ]; then
  use_tracers=n
fi

# Unique compiler supported upstream is GCC
## Choose between GCC and CLANG config (default is GCC)
## Use the environment variable "_compiler=clang"
if [ "${_compiler}" = "clang" ]; then
  _compiler_flags="CC=clang HOSTCC=clang LLVM=1 LLVM_IAS=1"
fi

# Choose between the 4 main configs for stable branch. Default x86-64-v1 which use CONFIG_GENERIC_CPU2:
# Possible values: config_x86-64-v1 (default) / config_x86-64-v2 / config_x86-64-v3 / config_x86-64-v4
# This will be overwritten by selecting any option in microarchitecture script
# Source files: https://github.com/xanmod/linux/tree/5.17/CONFIGS/xanmod/gcc
if [ -z ${_config+x} ]; then
  _config=config_x86-64-v1
fi

# Compress modules with ZSTD (to save disk space)
if [ -z ${_compress_modules+x} ]; then
  _compress_modules=n
fi

# Compile ONLY used modules to VASTLY reduce 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: https://aur.archlinux.org/packages/modprobed-db
# This PKGBUILD read the database kept if it exists
#
# More at this wiki page ---> https://wiki.archlinux.org/index.php/Modprobed-db
if [ -z ${_localmodcfg} ]; then
  _localmodcfg=n
fi

# Tweak kernel options prior to a build via nconfig
if [ -z ${_makenconfig} ]; then
  _makenconfig=n
fi

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

env _microarchitecture=98 use_tracers=n use_numa=n _localmodcfg=y _compress_modules=y makepkg -sic

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 "${SRCDEST}/myconfig" "${HOME}/.config/linux-xanmod/myconfig" "${XDG_CONFIG_HOME}/linux-xanmod/myconfig" ; do
    if [ -f "${_myconfig}" ] && [ "$(wc -l <"${_myconfig}")" -gt "0" ]; then
      if grep -q 'scripts/config' "${_myconfig}"; then
        # myconfig is a partial file. Executing as a script
        msg2 "Applying myconfig..."
        bash -x "${_myconfig}"
      else
        # myconfig is a full config file. Replacing default .config
        msg2 "Using user CUSTOM config..."
        cp -f "${_myconfig}" .config
      fi
      echo
      break
    fi
  done

Latest Comments

« First ‹ Previous 1 2 3 4 5 6 7 8 9 10 11 12 .. 51 Next › Last »

RubenKelevra commented on 2023-01-20 15:16 (UTC)

I noticed that the msr and cpuinfo modules are missing, while they are part of the Arch Linux kernel. Is that intentional?

ayyash07 commented on 2023-01-19 22:14 (UTC)

@figue

"aperture.patch::https://bugzilla.kernel.org/attachment.cgi?id=303457&action=diff&collapsed=&headers=1&format=raw"

this patch is applied but didnt work either

ayyash07 commented on 2023-01-19 20:51 (UTC)

@figue

fixed patch: https://paste.ofcode.org/vc8fHpv5Fp3jcSZYCZ3z8g

applied and build, still same

figue commented on 2023-01-19 20:16 (UTC)

@ayyash07 try this:

diff --git a/PKGBUILD b/PKGBUILD
index b5f9c0e..9a27402 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -92,7 +92,8 @@ _srcname="linux-${pkgver}-xanmod${xanmod}"

 source=("https://cdn.kernel.org/pub/linux/kernel/v${_branch}/linux-${_major}.tar."{xz,sign}
         "https://github.com/xanmod/linux/releases/download/${pkgver}-xanmod${xanmod}/patch-${pkgver}-xanmod${xanmod}.xz"
-        choose-gcc-optimization.sh)
+        choose-gcc-optimization.sh
+        "aperture.patch::https://bugzilla.kernel.org/attachment.cgi?id=303457&action=diff&collapsed=&headers=1&format=raw")
         #"patch-${pkgver}-xanmod${xanmod}.xz::https://sourceforge.net/projects/xanmod/files/releases/stable/${pkgver}-xanmod${xanmod}/patch-${pkgver}-xanmod${xanmod}.xz/download"
 validpgpkeys=(
     'ABAF11C65A2970B130ABE3C479BE3E4300411886' # Linux Torvalds
@@ -110,7 +111,8 @@ done
 sha256sums=('2ca1f17051a430f6fed1196e4952717507171acfd97d96577212502703b25deb'
             'SKIP'
             '48678483e6ae79e11ab5f3f5792e08d3016bf833047a3182315ce4132923b6cc'
-            '5c84bfe7c1971354cff3f6b3f52bf33e7bbeec22f85d5e7bfde383b54c679d30')
+            '5c84bfe7c1971354cff3f6b3f52bf33e7bbeec22f85d5e7bfde383b54c679d30'
+            'b571eb48b06a851afe1018649a1138f467fb6bf2d73485e474ffb1e14abe05aa')

 export KBUILD_BUILD_HOST=${KBUILD_BUILD_HOST:-archlinux}
 export KBUILD_BUILD_USER=${KBUILD_BUILD_USER:-makepkg}

ayyash07 commented on 2023-01-19 18:23 (UTC)

@habernir it fails with 6.1.7 too, I tried. Also there is Manjaro variant of xanmod in aur, it also fails. For now, we need to wait for a patch.

habernir commented on 2023-01-19 06:56 (UTC) (edited on 2023-01-19 07:30 (UTC) by habernir)

i install it in manjaro and also i can't get to the tty terminal. ayyash07 i have also this message . so Yoshi2889 can you update to 6.1.7? to see if its solve this problem?

if i want to change the name of the kernel (to prevent overwrite on the previous kernel to keep multiple kernel) how do i do it? i mean what do i need to change?

thanks nir

ayyash07 commented on 2023-01-19 02:46 (UTC)

@figue it fails:

https://paste.ofcode.org/6UqFdzG7bS32sj4dnsyXWS

figue commented on 2023-01-17 21:21 (UTC) (edited on 2023-01-17 21:23 (UTC) by figue)

@ayyash07 seems reported upstream:

https://github.com/xanmod/linux/issues/331

Try this:

add to sources array this line:

aperture.patch::https://patchwork.kernel.org/project/dri-devel/patch/20230111154112.90575-11-daniel.vetter@ffwll.ch/raw/

execute updpkgsums and build it again.

This is the diff of the test:

diff --git a/PKGBUILD b/PKGBUILD
index 4f70234..d7a2202 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -92,7 +92,8 @@ _srcname="linux-${pkgver}-xanmod${xanmod}"

 source=("https://cdn.kernel.org/pub/linux/kernel/v${_branch}/linux-${_major}.tar."{xz,sign}
         "https://github.com/xanmod/linux/releases/download/${pkgver}-xanmod${xanmod}/patch-${pkgver}-xanmod${xanmod}.xz"
-        choose-gcc-optimization.sh)
+        choose-gcc-optimization.sh
+        aperture.patch::https://patchwork.kernel.org/project/dri-devel/patch/20230111154112.90575-11-daniel.vetter@ffwll.ch/raw/)
         #"patch-${pkgver}-xanmod${xanmod}.xz::https://sourceforge.net/projects/xanmod/files/releases/stable/${pkgver}-xanmod${xanmod}/patch-${pkgver}-xanmod${xanmod}.xz/download"
 validpgpkeys=(
     'ABAF11C65A2970B130ABE3C479BE3E4300411886' # Linux Torvalds
@@ -110,7 +111,8 @@ done
 sha256sums=('2ca1f17051a430f6fed1196e4952717507171acfd97d96577212502703b25deb'
             'SKIP'
             '74fbe6537c02615f1e5f03b7c0e0472ad17f9b98a5416306d735ff3d9c406334'
-            '5c84bfe7c1971354cff3f6b3f52bf33e7bbeec22f85d5e7bfde383b54c679d30')
+            '5c84bfe7c1971354cff3f6b3f52bf33e7bbeec22f85d5e7bfde383b54c679d30'
+            '80a49650ffa3a9b3e99e4f6c80a8e321ac6566574872c4b3b6c16a158d49fa36')

 export KBUILD_BUILD_HOST=${KBUILD_BUILD_HOST:-archlinux}
 export KBUILD_BUILD_USER=${KBUILD_BUILD_USER:-makepkg}

ayyash07 commented on 2023-01-17 19:47 (UTC)

Building 6.1 series with same variables I was using for 6.0 series, which are

_microarchitecture=14 _config=config_x86-64-v3 _compress_modules=y

But I cannot boot it, it looks like this:

https://ibb.co/jv55VMZ

My CPU is Ryzen 9 3950x, by the way.

figue commented on 2023-01-17 09:40 (UTC)

@hydrocryo01 ok. No ETA. I try to push the updates ASAP when upstream is done.