Skip to content

Archlinux Kernel based on different schedulers and some other performance improvements.

PKGBUILD: Add nvidia-580xx module packaging (#1109)

Peter Jungd7157d9d5b60
diff --git a/linux-cachyos-bmq/PKGBUILD b/linux-cachyos-bmq/PKGBUILD
index b4b69a43..555f6db5 100644
--- a/linux-cachyos-bmq/PKGBUILD
+++ b/linux-cachyos-bmq/PKGBUILD
@@ -123,6 +123,11 @@
# Use this only if you have Turing+ GPU
: "${_build_nvidia_open:=no}"
+# Builds the closed nvidia module of the 580xx legacy driver and package it into a own base
+# This does replace the requirement of nvidia-580xx-dkms
+# Use this for Maxwell, Pascal and Volta GPUs
+: "${_build_nvidia_580xx:=no}"
+
# Builds the r8125 module and package it into its own package
# Replaces requirement for r8125-dkms
: "${_build_r8125:=no}"
@@ -191,6 +196,8 @@ _patchsource="https://raw.githubusercontent.com/cachyos/kernel-patches/master/${
_nv_ver=615.78.08
_nv_pkg="NVIDIA-Linux-x86_64-${_nv_ver}"
_nv_open_pkg="NVIDIA-kernel-module-source-${_nv_ver}"
+_nv_580xx_ver=580.196.07
+_nv_580xx_pkg="NVIDIA-Linux-x86_64-${_nv_580xx_ver}"
source=(
"https://github.com/CachyOS/linux/releases/download/${_srcname}/${_srcname}.tar.gz"{,.asc}
"config"
@@ -231,6 +238,12 @@ if [ "$_build_nvidia_open" = "yes" ]; then
"${_patchsource}/misc/nvidia/0004-Open-sysfs-config-from-the-userspace-root-on-7.3.patch")
fi
+if [ "$_build_nvidia_580xx" = "yes" ]; then
+ source+=("https://us.download.nvidia.com/XFree86/Linux-x86_64/${_nv_580xx_ver}/${_nv_580xx_pkg}.run"
+ "${_patchsource}/misc/nvidia-580xx/0001-Enable-atomic-kernel-modesetting-by-default.patch"
+ "${_patchsource}/misc/nvidia-580xx/0002-fix-hw-cursor-kde.patch")
+fi
+
if [ "$_build_r8125" = "yes" ]; then
source+=("git+https://github.com/aravance/r8125.git")
fi
@@ -254,6 +267,10 @@ export KBUILD_BUILD_TIMESTAMP="$(date -Ru${SOURCE_DATE_EPOCH:+d @$SOURCE_DATE_EP
_die() { error "$@" ; exit 1; }
prepare() {
+ if [ "$_build_nvidia_580xx" = "yes" ]; then
+ sh "${_nv_580xx_pkg}.run" --extract-only
+ fi
+
cd "$_srcname"
echo "Setting version..."
@@ -269,6 +286,8 @@ prepare() {
echo "Applying patch $src..."
if [[ "$patch" == "${_patchsource}"/misc/nvidia/* ]]; then
patch -Np1 < "../$src" -d "${srcdir}/${_nv_open_pkg}"
+ elif [[ "$patch" == "${_patchsource}"/misc/nvidia-580xx/* ]]; then
+ patch -Np1 < "../$src" -d "${srcdir}/${_nv_580xx_pkg}/kernel"
else
patch -Np1 < "../$src"
fi
@@ -506,6 +525,11 @@ build() {
CFLAGS= CXXFLAGS= LDFLAGS= make "${BUILD_FLAGS[@]}" "${MODULE_FLAGS[@]}" -j"$(nproc)" modules
fi
+ if [ "$_build_nvidia_580xx" = "yes" ]; then
+ cd "${srcdir}/${_nv_580xx_pkg}/kernel"
+ CFLAGS= CXXFLAGS= LDFLAGS= make "${BUILD_FLAGS[@]}" "${MODULE_FLAGS[@]}" -j"$(nproc)" modules
+ fi
+
if [ "$_build_zfs" = "yes" ]; then
cd ${srcdir}/"zfs"
@@ -709,7 +733,7 @@ _package-nvidia-open(){
pkgdesc="nvidia open modules of ${_nv_ver} driver for the ${pkgbase} kernel"
depends=("$pkgbase=$_kernver" "nvidia-utils=${_nv_ver}" "libglvnd")
provides=('NVIDIA-MODULE')
- conflicts=("$pkgbase-nvidia")
+ conflicts=("$pkgbase-nvidia" "$pkgbase-nvidia-580xx")
license=('MIT AND GPL-2.0-only')
cd "$_srcname"
@@ -724,6 +748,25 @@ _package-nvidia-open(){
find "$pkgdir" -name '*.ko' -exec zstd --rm -19 -T0 {} +
}
+_package-nvidia-580xx(){
+ pkgdesc="nvidia module of ${_nv_580xx_ver} driver for the ${pkgbase} kernel"
+ depends=("$pkgbase=$_kernver" "nvidia-580xx-utils=${_nv_580xx_ver}" "libglvnd")
+ provides=('NVIDIA-MODULE')
+ conflicts=("$pkgbase-nvidia-open")
+ license=('custom')
+
+ cd "$_srcname"
+ local modulesdir="$pkgdir/usr/lib/modules/$(<version)/extramodules"
+
+ cd "${srcdir}/${_nv_580xx_pkg}"
+ install -dm755 "${modulesdir}"
+ install -m644 kernel/*.ko "${modulesdir}"
+ install -Dt "$pkgdir/usr/share/licenses/${pkgname}" -m644 LICENSE
+
+ _sign_modules "${modulesdir}"
+ find "$pkgdir" -name '*.ko' -exec zstd --rm -19 -T0 {} +
+}
+
_package-r8125() {
pkgdesc="r8125 modules for the $pkgbase kernel"
depends=("$pkgbase=$_kernver")
@@ -749,6 +792,7 @@ pkgname=("$pkgbase")
pkgname+=("$pkgbase-headers")
[ "$_build_zfs" = "yes" ] && pkgname+=("$pkgbase-zfs")
[ "$_build_nvidia_open" = "yes" ] && pkgname+=("$pkgbase-nvidia-open")
+[ "$_build_nvidia_580xx" = "yes" ] && pkgname+=("$pkgbase-nvidia-580xx")
[ "$_build_r8125" = "yes" ] && pkgname+=("$pkgbase-r8125")
for _p in "${pkgname[@]}"; do
eval "package_$_p() {
diff --git a/linux-cachyos-bore/PKGBUILD b/linux-cachyos-bore/PKGBUILD
index fa9e2bf7..e776175e 100644
--- a/linux-cachyos-bore/PKGBUILD
+++ b/linux-cachyos-bore/PKGBUILD
@@ -123,6 +123,11 @@
# Use this only if you have Turing+ GPU
: "${_build_nvidia_open:=no}"
+# Builds the closed nvidia module of the 580xx legacy driver and package it into a own base
+# This does replace the requirement of nvidia-580xx-dkms
+# Use this for Maxwell, Pascal and Volta GPUs
+: "${_build_nvidia_580xx:=no}"
+
# Builds the r8125 module and package it into its own package
# Replaces requirement for r8125-dkms
: "${_build_r8125:=no}"
@@ -191,6 +196,8 @@ _patchsource="https://raw.githubusercontent.com/cachyos/kernel-patches/master/${
_nv_ver=615.78.08
_nv_pkg="NVIDIA-Linux-x86_64-${_nv_ver}"
_nv_open_pkg="NVIDIA-kernel-module-source-${_nv_ver}"
+_nv_580xx_ver=580.196.07
+_nv_580xx_pkg="NVIDIA-Linux-x86_64-${_nv_580xx_ver}"
source=(
"https://github.com/CachyOS/linux/releases/download/${_srcname}/${_srcname}.tar.gz"{,.asc}
"config"
@@ -231,6 +238,12 @@ if [ "$_build_nvidia_open" = "yes" ]; then
"${_patchsource}/misc/nvidia/0004-Open-sysfs-config-from-the-userspace-root-on-7.3.patch")
fi
+if [ "$_build_nvidia_580xx" = "yes" ]; then
+ source+=("https://us.download.nvidia.com/XFree86/Linux-x86_64/${_nv_580xx_ver}/${_nv_580xx_pkg}.run"
+ "${_patchsource}/misc/nvidia-580xx/0001-Enable-atomic-kernel-modesetting-by-default.patch"
+ "${_patchsource}/misc/nvidia-580xx/0002-fix-hw-cursor-kde.patch")
+fi
+
if [ "$_build_r8125" = "yes" ]; then
source+=("git+https://github.com/aravance/r8125.git")
fi
@@ -254,6 +267,10 @@ export KBUILD_BUILD_TIMESTAMP="$(date -Ru${SOURCE_DATE_EPOCH:+d @$SOURCE_DATE_EP
_die() { error "$@" ; exit 1; }
prepare() {
+ if [ "$_build_nvidia_580xx" = "yes" ]; then
+ sh "${_nv_580xx_pkg}.run" --extract-only
+ fi
+
cd "$_srcname"
echo "Setting version..."
@@ -269,6 +286,8 @@ prepare() {
echo "Applying patch $src..."
if [[ "$patch" == "${_patchsource}"/misc/nvidia/* ]]; then
patch -Np1 < "../$src" -d "${srcdir}/${_nv_open_pkg}"
+ elif [[ "$patch" == "${_patchsource}"/misc/nvidia-580xx/* ]]; then
+ patch -Np1 < "../$src" -d "${srcdir}/${_nv_580xx_pkg}/kernel"
else
patch -Np1 < "../$src"
fi
@@ -506,6 +525,11 @@ build() {
CFLAGS= CXXFLAGS= LDFLAGS= make "${BUILD_FLAGS[@]}" "${MODULE_FLAGS[@]}" -j"$(nproc)" modules
fi
+ if [ "$_build_nvidia_580xx" = "yes" ]; then
+ cd "${srcdir}/${_nv_580xx_pkg}/kernel"
+ CFLAGS= CXXFLAGS= LDFLAGS= make "${BUILD_FLAGS[@]}" "${MODULE_FLAGS[@]}" -j"$(nproc)" modules
+ fi
+
if [ "$_build_zfs" = "yes" ]; then
cd ${srcdir}/"zfs"
@@ -709,7 +733,7 @@ _package-nvidia-open(){
pkgdesc="nvidia open modules of ${_nv_ver} driver for the ${pkgbase} kernel"
depends=("$pkgbase=$_kernver" "nvidia-utils=${_nv_ver}" "libglvnd")
provides=('NVIDIA-MODULE')
- conflicts=("$pkgbase-nvidia")
+ conflicts=("$pkgbase-nvidia" "$pkgbase-nvidia-580xx")
license=('MIT AND GPL-2.0-only')
cd "$_srcname"
@@ -724,6 +748,25 @@ _package-nvidia-open(){
find "$pkgdir" -name '*.ko' -exec zstd --rm -19 -T0 {} +
}
+_package-nvidia-580xx(){
+ pkgdesc="nvidia module of ${_nv_580xx_ver} driver for the ${pkgbase} kernel"
+ depends=("$pkgbase=$_kernver" "nvidia-580xx-utils=${_nv_580xx_ver}" "libglvnd")
+ provides=('NVIDIA-MODULE')
+ conflicts=("$pkgbase-nvidia-open")
+ license=('custom')
+
+ cd "$_srcname"
+ local modulesdir="$pkgdir/usr/lib/modules/$(<version)/extramodules"
+
+ cd "${srcdir}/${_nv_580xx_pkg}"
+ install -dm755 "${modulesdir}"
+ install -m644 kernel/*.ko "${modulesdir}"
+ install -Dt "$pkgdir/usr/share/licenses/${pkgname}" -m644 LICENSE
+
+ _sign_modules "${modulesdir}"
+ find "$pkgdir" -name '*.ko' -exec zstd --rm -19 -T0 {} +
+}
+
_package-r8125() {
pkgdesc="r8125 modules for the $pkgbase kernel"
depends=("$pkgbase=$_kernver")
@@ -749,6 +792,7 @@ pkgname=("$pkgbase")
pkgname+=("$pkgbase-headers")
[ "$_build_zfs" = "yes" ] && pkgname+=("$pkgbase-zfs")
[ "$_build_nvidia_open" = "yes" ] && pkgname+=("$pkgbase-nvidia-open")
+[ "$_build_nvidia_580xx" = "yes" ] && pkgname+=("$pkgbase-nvidia-580xx")
[ "$_build_r8125" = "yes" ] && pkgname+=("$pkgbase-r8125")
for _p in "${pkgname[@]}"; do
eval "package_$_p() {
diff --git a/linux-cachyos-deckify/PKGBUILD b/linux-cachyos-deckify/PKGBUILD
index f770e7f2..e2e9e804 100644
--- a/linux-cachyos-deckify/PKGBUILD
+++ b/linux-cachyos-deckify/PKGBUILD
@@ -122,6 +122,11 @@
# Use this only if you have Turing+ GPU
: "${_build_nvidia_open:=no}"
+# Builds the closed nvidia module of the 580xx legacy driver and package it into a own base
+# This does replace the requirement of nvidia-580xx-dkms
+# Use this for Maxwell, Pascal and Volta GPUs
+: "${_build_nvidia_580xx:=no}"
+
# Builds the r8125 module and package it into its own package
# Replaces requirement for r8125-dkms
: "${_build_r8125:=no}"
@@ -190,6 +195,8 @@ _patchsource="https://raw.githubusercontent.com/cachyos/kernel-patches/master/${
_nv_ver=615.78.08
_nv_pkg="NVIDIA-Linux-x86_64-${_nv_ver}"
_nv_open_pkg="NVIDIA-kernel-module-source-${_nv_ver}"
+_nv_580xx_ver=580.196.07
+_nv_580xx_pkg="NVIDIA-Linux-x86_64-${_nv_580xx_ver}"
source=(
"https://github.com/CachyOS/linux/releases/download/${_srcname}/${_srcname}.tar.gz"{,.asc}
"config"
@@ -231,6 +238,12 @@ if [ "$_build_nvidia_open" = "yes" ]; then
"${_patchsource}/misc/nvidia/0004-Open-sysfs-config-from-the-userspace-root-on-7.3.patch")
fi
+if [ "$_build_nvidia_580xx" = "yes" ]; then
+ source+=("https://us.download.nvidia.com/XFree86/Linux-x86_64/${_nv_580xx_ver}/${_nv_580xx_pkg}.run"
+ "${_patchsource}/misc/nvidia-580xx/0001-Enable-atomic-kernel-modesetting-by-default.patch"
+ "${_patchsource}/misc/nvidia-580xx/0002-fix-hw-cursor-kde.patch")
+fi
+
if [ "$_build_r8125" = "yes" ]; then
source+=("git+https://github.com/aravance/r8125.git")
fi
@@ -254,6 +267,10 @@ export KBUILD_BUILD_TIMESTAMP="$(date -Ru${SOURCE_DATE_EPOCH:+d @$SOURCE_DATE_EP
_die() { error "$@" ; exit 1; }
prepare() {
+ if [ "$_build_nvidia_580xx" = "yes" ]; then
+ sh "${_nv_580xx_pkg}.run" --extract-only
+ fi
+
cd "$_srcname"
echo "Setting version..."
@@ -269,6 +286,8 @@ prepare() {
echo "Applying patch $src..."
if [[ "$patch" == "${_patchsource}"/misc/nvidia/* ]]; then
patch -Np1 < "../$src" -d "${srcdir}/${_nv_open_pkg}"
+ elif [[ "$patch" == "${_patchsource}"/misc/nvidia-580xx/* ]]; then
+ patch -Np1 < "../$src" -d "${srcdir}/${_nv_580xx_pkg}/kernel"
else
patch -Np1 < "../$src"
fi
@@ -525,6 +544,11 @@ build() {
CFLAGS= CXXFLAGS= LDFLAGS= make "${BUILD_FLAGS[@]}" "${MODULE_FLAGS[@]}" -j"$(nproc)" modules
fi
+ if [ "$_build_nvidia_580xx" = "yes" ]; then
+ cd "${srcdir}/${_nv_580xx_pkg}/kernel"
+ CFLAGS= CXXFLAGS= LDFLAGS= make "${BUILD_FLAGS[@]}" "${MODULE_FLAGS[@]}" -j"$(nproc)" modules
+ fi
+
if [ "$_build_zfs" = "yes" ]; then
cd ${srcdir}/"zfs"
@@ -728,7 +752,7 @@ _package-nvidia-open(){
pkgdesc="nvidia open modules of ${_nv_ver} driver for the ${pkgbase} kernel"
depends=("$pkgbase=$_kernver" "nvidia-utils=${_nv_ver}" "libglvnd")
provides=('NVIDIA-MODULE')
- conflicts=("$pkgbase-nvidia")
+ conflicts=("$pkgbase-nvidia" "$pkgbase-nvidia-580xx")
license=('MIT AND GPL-2.0-only')
cd "$_srcname"
@@ -743,6 +767,25 @@ _package-nvidia-open(){
find "$pkgdir" -name '*.ko' -exec zstd --rm -19 -T0 {} +
}
+_package-nvidia-580xx(){
+ pkgdesc="nvidia module of ${_nv_580xx_ver} driver for the ${pkgbase} kernel"
+ depends=("$pkgbase=$_kernver" "nvidia-580xx-utils=${_nv_580xx_ver}" "libglvnd")
+ provides=('NVIDIA-MODULE')
+ conflicts=("$pkgbase-nvidia-open")
+ license=('custom')
+
+ cd "$_srcname"
+ local modulesdir="$pkgdir/usr/lib/modules/$(<version)/extramodules"
+
+ cd "${srcdir}/${_nv_580xx_pkg}"
+ install -dm755 "${modulesdir}"
+ install -m644 kernel/*.ko "${modulesdir}"
+ install -Dt "$pkgdir/usr/share/licenses/${pkgname}" -m644 LICENSE
+
+ _sign_modules "${modulesdir}"
+ find "$pkgdir" -name '*.ko' -exec zstd --rm -19 -T0 {} +
+}
+
_package-r8125() {
pkgdesc="r8125 modules for the $pkgbase kernel"
depends=("$pkgbase=$_kernver")
@@ -768,6 +811,7 @@ pkgname=("$pkgbase")
pkgname+=("$pkgbase-headers")
[ "$_build_zfs" = "yes" ] && pkgname+=("$pkgbase-zfs")
[ "$_build_nvidia_open" = "yes" ] && pkgname+=("$pkgbase-nvidia-open")
+[ "$_build_nvidia_580xx" = "yes" ] && pkgname+=("$pkgbase-nvidia-580xx")
[ "$_build_r8125" = "yes" ] && pkgname+=("$pkgbase-r8125")
for _p in "${pkgname[@]}"; do
eval "package_$_p() {
diff --git a/linux-cachyos-eevdf/PKGBUILD b/linux-cachyos-eevdf/PKGBUILD
index 1a550e9e..63e0b2ee 100644
--- a/linux-cachyos-eevdf/PKGBUILD
+++ b/linux-cachyos-eevdf/PKGBUILD
@@ -123,6 +123,11 @@
# Use this only if you have Turing+ GPU
: "${_build_nvidia_open:=no}"
+# Builds the closed nvidia module of the 580xx legacy driver and package it into a own base
+# This does replace the requirement of nvidia-580xx-dkms
+# Use this for Maxwell, Pascal and Volta GPUs
+: "${_build_nvidia_580xx:=no}"
+
# Builds the r8125 module and package it into its own package
# Replaces requirement for r8125-dkms
: "${_build_r8125:=no}"
@@ -194,6 +199,8 @@ _patchsource="https://raw.githubusercontent.com/cachyos/kernel-patches/master/${
_nv_ver=615.78.08
_nv_pkg="NVIDIA-Linux-x86_64-${_nv_ver}"
_nv_open_pkg="NVIDIA-kernel-module-source-${_nv_ver}"
+_nv_580xx_ver=580.196.07
+_nv_580xx_pkg="NVIDIA-Linux-x86_64-${_nv_580xx_ver}"
source=(
"https://github.com/CachyOS/linux/releases/download/${_srcname}/${_srcname}.tar.gz"{,.asc}
"config"
@@ -234,6 +241,12 @@ if [ "$_build_nvidia_open" = "yes" ]; then
"${_patchsource}/misc/nvidia/0004-Open-sysfs-config-from-the-userspace-root-on-7.3.patch")
fi
+if [ "$_build_nvidia_580xx" = "yes" ]; then
+ source+=("https://us.download.nvidia.com/XFree86/Linux-x86_64/${_nv_580xx_ver}/${_nv_580xx_pkg}.run"
+ "${_patchsource}/misc/nvidia-580xx/0001-Enable-atomic-kernel-modesetting-by-default.patch"
+ "${_patchsource}/misc/nvidia-580xx/0002-fix-hw-cursor-kde.patch")
+fi
+
if [ "$_build_r8125" = "yes" ]; then
source+=("git+https://github.com/aravance/r8125.git")
fi
@@ -257,6 +270,10 @@ export KBUILD_BUILD_TIMESTAMP="$(date -Ru${SOURCE_DATE_EPOCH:+d @$SOURCE_DATE_EP
_die() { error "$@" ; exit 1; }
prepare() {
+ if [ "$_build_nvidia_580xx" = "yes" ]; then
+ sh "${_nv_580xx_pkg}.run" --extract-only
+ fi
+
cd "$_srcname"
echo "Setting version..."
@@ -272,6 +289,8 @@ prepare() {
echo "Applying patch $src..."
if [[ "$patch" == "${_patchsource}"/misc/nvidia/* ]]; then
patch -Np1 < "../$src" -d "${srcdir}/${_nv_open_pkg}"
+ elif [[ "$patch" == "${_patchsource}"/misc/nvidia-580xx/* ]]; then
+ patch -Np1 < "../$src" -d "${srcdir}/${_nv_580xx_pkg}/kernel"
else
patch -Np1 < "../$src"
fi
@@ -509,6 +528,11 @@ build() {
CFLAGS= CXXFLAGS= LDFLAGS= make "${BUILD_FLAGS[@]}" "${MODULE_FLAGS[@]}" -j"$(nproc)" modules
fi
+ if [ "$_build_nvidia_580xx" = "yes" ]; then
+ cd "${srcdir}/${_nv_580xx_pkg}/kernel"
+ CFLAGS= CXXFLAGS= LDFLAGS= make "${BUILD_FLAGS[@]}" "${MODULE_FLAGS[@]}" -j"$(nproc)" modules
+ fi
+
if [ "$_build_zfs" = "yes" ]; then
cd ${srcdir}/"zfs"
@@ -712,7 +736,7 @@ _package-nvidia-open(){
pkgdesc="nvidia open modules of ${_nv_ver} driver for the ${pkgbase} kernel"
depends=("$pkgbase=$_kernver" "nvidia-utils=${_nv_ver}" "libglvnd")
provides=('NVIDIA-MODULE')
- conflicts=("$pkgbase-nvidia")
+ conflicts=("$pkgbase-nvidia" "$pkgbase-nvidia-580xx")
license=('MIT AND GPL-2.0-only')
cd "$_srcname"
@@ -727,6 +751,25 @@ _package-nvidia-open(){
find "$pkgdir" -name '*.ko' -exec zstd --rm -19 -T0 {} +
}
+_package-nvidia-580xx(){
+ pkgdesc="nvidia module of ${_nv_580xx_ver} driver for the ${pkgbase} kernel"
+ depends=("$pkgbase=$_kernver" "nvidia-580xx-utils=${_nv_580xx_ver}" "libglvnd")
+ provides=('NVIDIA-MODULE')
+ conflicts=("$pkgbase-nvidia-open")
+ license=('custom')
+
+ cd "$_srcname"
+ local modulesdir="$pkgdir/usr/lib/modules/$(<version)/extramodules"
+
+ cd "${srcdir}/${_nv_580xx_pkg}"
+ install -dm755 "${modulesdir}"
+ install -m644 kernel/*.ko "${modulesdir}"
+ install -Dt "$pkgdir/usr/share/licenses/${pkgname}" -m644 LICENSE
+
+ _sign_modules "${modulesdir}"
+ find "$pkgdir" -name '*.ko' -exec zstd --rm -19 -T0 {} +
+}
+
_package-r8125() {
pkgdesc="r8125 modules for the $pkgbase kernel"
depends=("$pkgbase=$_kernver")
@@ -752,6 +795,7 @@ pkgname=("$pkgbase")
pkgname+=("$pkgbase-headers")
[ "$_build_zfs" = "yes" ] && pkgname+=("$pkgbase-zfs")
[ "$_build_nvidia_open" = "yes" ] && pkgname+=("$pkgbase-nvidia-open")
+[ "$_build_nvidia_580xx" = "yes" ] && pkgname+=("$pkgbase-nvidia-580xx")
[ "$_build_r8125" = "yes" ] && pkgname+=("$pkgbase-r8125")
for _p in "${pkgname[@]}"; do
eval "package_$_p() {
diff --git a/linux-cachyos-hardened/PKGBUILD b/linux-cachyos-hardened/PKGBUILD
index 159e0103..0ea228cf 100644
--- a/linux-cachyos-hardened/PKGBUILD
+++ b/linux-cachyos-hardened/PKGBUILD
@@ -123,6 +123,11 @@
# Use this only if you have Turing+ GPU
: "${_build_nvidia_open:=no}"
+# Builds the closed nvidia module of the 580xx legacy driver and package it into a own base
+# This does replace the requirement of nvidia-580xx-dkms
+# Use this for Maxwell, Pascal and Volta GPUs
+: "${_build_nvidia_580xx:=no}"
+
# Builds the r8125 module and package it into its own package
# Replaces requirement for r8125-dkms
: "${_build_r8125:=no}"
@@ -191,6 +196,8 @@ _patchsource="https://raw.githubusercontent.com/cachyos/kernel-patches/master/${
_nv_ver=615.78.08
_nv_pkg="NVIDIA-Linux-x86_64-${_nv_ver}"
_nv_open_pkg="NVIDIA-kernel-module-source-${_nv_ver}"
+_nv_580xx_ver=580.196.07
+_nv_580xx_pkg="NVIDIA-Linux-x86_64-${_nv_580xx_ver}"
source=(
"https://github.com/CachyOS/linux/releases/download/${_srcname}/${_srcname}.tar.gz"{,.asc}
"config"
@@ -230,6 +237,12 @@ if [ "$_build_nvidia_open" = "yes" ]; then
"${_patchsource}/misc/nvidia/0003-fix-dp-add-Bigscreen-Beyond-VR-headset-to-WAR-databa.patch")
fi
+if [ "$_build_nvidia_580xx" = "yes" ]; then
+ source+=("https://us.download.nvidia.com/XFree86/Linux-x86_64/${_nv_580xx_ver}/${_nv_580xx_pkg}.run"
+ "${_patchsource}/misc/nvidia-580xx/0001-Enable-atomic-kernel-modesetting-by-default.patch"
+ "${_patchsource}/misc/nvidia-580xx/0002-fix-hw-cursor-kde.patch")
+fi
+
if [ "$_build_r8125" = "yes" ]; then
source+=("git+https://github.com/aravance/r8125.git")
fi
@@ -253,6 +266,10 @@ export KBUILD_BUILD_TIMESTAMP="$(date -Ru${SOURCE_DATE_EPOCH:+d @$SOURCE_DATE_EP
_die() { error "$@" ; exit 1; }
prepare() {
+ if [ "$_build_nvidia_580xx" = "yes" ]; then
+ sh "${_nv_580xx_pkg}.run" --extract-only
+ fi
+
cd "$_srcname"
echo "Setting version..."
@@ -268,6 +285,8 @@ prepare() {
echo "Applying patch $src..."
if [[ "$patch" == "${_patchsource}"/misc/nvidia/* ]]; then
patch -Np1 < "../$src" -d "${srcdir}/${_nv_open_pkg}"
+ elif [[ "$patch" == "${_patchsource}"/misc/nvidia-580xx/* ]]; then
+ patch -Np1 < "../$src" -d "${srcdir}/${_nv_580xx_pkg}/kernel"
else
patch -Np1 < "../$src"
fi
@@ -505,6 +524,11 @@ build() {
CFLAGS= CXXFLAGS= LDFLAGS= make "${BUILD_FLAGS[@]}" "${MODULE_FLAGS[@]}" -j"$(nproc)" modules
fi
+ if [ "$_build_nvidia_580xx" = "yes" ]; then
+ cd "${srcdir}/${_nv_580xx_pkg}/kernel"
+ CFLAGS= CXXFLAGS= LDFLAGS= make "${BUILD_FLAGS[@]}" "${MODULE_FLAGS[@]}" -j"$(nproc)" modules
+ fi
+
if [ "$_build_zfs" = "yes" ]; then
cd ${srcdir}/"zfs"
@@ -704,7 +728,7 @@ _package-nvidia-open(){
pkgdesc="nvidia open modules of ${_nv_ver} driver for the ${pkgbase} kernel"
depends=("$pkgbase=$_kernver" "nvidia-utils=${_nv_ver}" "libglvnd")
provides=('NVIDIA-MODULE')
- conflicts=("$pkgbase-nvidia")
+ conflicts=("$pkgbase-nvidia" "$pkgbase-nvidia-580xx")
license=('MIT AND GPL-2.0-only')
cd "$_srcname"
@@ -719,6 +743,25 @@ _package-nvidia-open(){
find "$pkgdir" -name '*.ko' -exec zstd --rm -19 -T0 {} +
}
+_package-nvidia-580xx(){
+ pkgdesc="nvidia module of ${_nv_580xx_ver} driver for the ${pkgbase} kernel"
+ depends=("$pkgbase=$_kernver" "nvidia-580xx-utils=${_nv_580xx_ver}" "libglvnd")
+ provides=('NVIDIA-MODULE')
+ conflicts=("$pkgbase-nvidia-open")
+ license=('custom')
+
+ cd "$_srcname"
+ local modulesdir="$pkgdir/usr/lib/modules/$(<version)/extramodules"
+
+ cd "${srcdir}/${_nv_580xx_pkg}"
+ install -dm755 "${modulesdir}"
+ install -m644 kernel/*.ko "${modulesdir}"
+ install -Dt "$pkgdir/usr/share/licenses/${pkgname}" -m644 LICENSE
+
+ _sign_modules "${modulesdir}"
+ find "$pkgdir" -name '*.ko' -exec zstd --rm -19 -T0 {} +
+}
+
_package-r8125() {
pkgdesc="r8125 modules for the $pkgbase kernel"
depends=("$pkgbase=$_kernver")
@@ -744,6 +787,7 @@ pkgname=("$pkgbase")
pkgname+=("$pkgbase-headers")
[ "$_build_zfs" = "yes" ] && pkgname+=("$pkgbase-zfs")
[ "$_build_nvidia_open" = "yes" ] && pkgname+=("$pkgbase-nvidia-open")
+[ "$_build_nvidia_580xx" = "yes" ] && pkgname+=("$pkgbase-nvidia-580xx")
[ "$_build_r8125" = "yes" ] && pkgname+=("$pkgbase-r8125")
for _p in "${pkgname[@]}"; do
eval "package_$_p() {
diff --git a/linux-cachyos-lts/PKGBUILD b/linux-cachyos-lts/PKGBUILD
index 23e9e56f..b3c947b6 100644
--- a/linux-cachyos-lts/PKGBUILD
+++ b/linux-cachyos-lts/PKGBUILD
@@ -118,6 +118,11 @@
# Use this only if you have Turing+ GPU
: "${_build_nvidia_open:=no}"
+# Builds the closed nvidia module of the 580xx legacy driver and package it into a own base
+# This does replace the requirement of nvidia-580xx-dkms
+# Use this for Maxwell, Pascal and Volta GPUs
+: "${_build_nvidia_580xx:=no}"
+
# Builds the r8125 module and package it into its own package
# Replaces requirement for r8125-dkms
: "${_build_r8125:=no}"
@@ -190,6 +195,8 @@ _patchsource="https://raw.githubusercontent.com/cachyos/kernel-patches/master/${
_nv_ver=615.78.08
_nv_pkg="NVIDIA-Linux-x86_64-${_nv_ver}"
_nv_open_pkg="NVIDIA-kernel-module-source-${_nv_ver}"
+_nv_580xx_ver=580.196.07
+_nv_580xx_pkg="NVIDIA-Linux-x86_64-${_nv_580xx_ver}"
source=(
"https://github.com/CachyOS/linux/releases/download/${_srctag}/${_srctag}.tar.gz"{,.asc}
"config"
@@ -227,6 +234,12 @@ if [ "$_build_nvidia_open" = "yes" ]; then
source+=("https://download.nvidia.com/XFree86/${_nv_open_pkg%"-$_nv_ver"}/${_nv_open_pkg}.tar.xz")
fi
+if [ "$_build_nvidia_580xx" = "yes" ]; then
+ source+=("https://us.download.nvidia.com/XFree86/Linux-x86_64/${_nv_580xx_ver}/${_nv_580xx_pkg}.run"
+ "${_patchsource}/misc/nvidia-580xx/0001-Enable-atomic-kernel-modesetting-by-default.patch"
+ "${_patchsource}/misc/nvidia-580xx/0002-fix-hw-cursor-kde.patch")
+fi
+
if [ "$_build_r8125" = "yes" ]; then
source+=("git+https://github.com/aravance/r8125.git")
fi
@@ -250,6 +263,10 @@ export KBUILD_BUILD_TIMESTAMP="$(date -Ru${SOURCE_DATE_EPOCH:+d @$SOURCE_DATE_EP
_die() { error "$@" ; exit 1; }
prepare() {
+ if [ "$_build_nvidia_580xx" = "yes" ]; then
+ sh "${_nv_580xx_pkg}.run" --extract-only
+ fi
+
cd "$_srcname"
echo "Setting version..."
@@ -265,6 +282,8 @@ prepare() {
echo "Applying patch $src..."
if [[ "$patch" == "${_patchsource}"/misc/nvidia/* ]]; then
patch -Np1 < "../$src" -d "${srcdir}/${_nv_open_pkg}"
+ elif [[ "$patch" == "${_patchsource}"/misc/nvidia-580xx/* ]]; then
+ patch -Np1 < "../$src" -d "${srcdir}/${_nv_580xx_pkg}/kernel"
else
patch -Np1 < "../$src"
fi
@@ -507,6 +526,11 @@ build() {
CFLAGS= CXXFLAGS= LDFLAGS= make "${BUILD_FLAGS[@]}" "${MODULE_FLAGS[@]}" -j"$(nproc)" modules
fi
+ if [ "$_build_nvidia_580xx" = "yes" ]; then
+ cd "${srcdir}/${_nv_580xx_pkg}/kernel"
+ CFLAGS= CXXFLAGS= LDFLAGS= make "${BUILD_FLAGS[@]}" "${MODULE_FLAGS[@]}" -j"$(nproc)" modules
+ fi
+
if [ "$_build_zfs" = "yes" ]; then
cd ${srcdir}/"zfs"
@@ -710,7 +734,7 @@ _package-nvidia-open(){
pkgdesc="nvidia open modules of ${_nv_ver} driver for the ${pkgbase} kernel"
depends=("$pkgbase=$_kernver" "nvidia-utils=${_nv_ver}" "libglvnd")
provides=('NVIDIA-MODULE')
- conflicts=("$pkgbase-nvidia")
+ conflicts=("$pkgbase-nvidia" "$pkgbase-nvidia-580xx")
license=('MIT AND GPL-2.0-only')
cd "$_srcname"
@@ -725,6 +749,25 @@ _package-nvidia-open(){
find "$pkgdir" -name '*.ko' -exec zstd --rm -19 -T0 {} +
}
+_package-nvidia-580xx(){
+ pkgdesc="nvidia module of ${_nv_580xx_ver} driver for the ${pkgbase} kernel"
+ depends=("$pkgbase=$_kernver" "nvidia-580xx-utils=${_nv_580xx_ver}" "libglvnd")
+ provides=('NVIDIA-MODULE')
+ conflicts=("$pkgbase-nvidia-open")
+ license=('custom')
+
+ cd "$_srcname"
+ local modulesdir="$pkgdir/usr/lib/modules/$(<version)/extramodules"
+
+ cd "${srcdir}/${_nv_580xx_pkg}"
+ install -dm755 "${modulesdir}"
+ install -m644 kernel/*.ko "${modulesdir}"
+ install -Dt "$pkgdir/usr/share/licenses/${pkgname}" -m644 LICENSE
+
+ _sign_modules "${modulesdir}"
+ find "$pkgdir" -name '*.ko' -exec zstd --rm -19 -T0 {} +
+}
+
_package-r8125() {
pkgdesc="r8125 modules for the $pkgbase kernel"
depends=("$pkgbase=$_kernver")
@@ -750,6 +793,7 @@ pkgname=("$pkgbase")
pkgname+=("$pkgbase-headers")
[ "$_build_zfs" = "yes" ] && pkgname+=("$pkgbase-zfs")
[ "$_build_nvidia_open" = "yes" ] && pkgname+=("$pkgbase-nvidia-open")
+[ "$_build_nvidia_580xx" = "yes" ] && pkgname+=("$pkgbase-nvidia-580xx")
[ "$_build_r8125" = "yes" ] && pkgname+=("$pkgbase-r8125")
for _p in "${pkgname[@]}"; do
eval "package_$_p() {
diff --git a/linux-cachyos-rc/.SRCINFO b/linux-cachyos-rc/.SRCINFO
index 5221637c..69fdd316 100644
--- a/linux-cachyos-rc/.SRCINFO
+++ b/linux-cachyos-rc/.SRCINFO
@@ -38,7 +38,7 @@ pkgbase = linux-cachyos-rc
validpgpkeys = E8B9AA39F054E30E8290D492C3C4820857F654FE
b2sums = 177537fa8a8a7c36eb1ce495d7acd30e8a6b494c4eed50d2afc1bd14358d335bb5fa57a9d83226d044a41a56abbc321bc7863d3ad05dde0f7c2ae5c150532f09
b2sums = SKIP
- b2sums = 63a34e61c50d9a914f9b95089b48db4c394d908cc3dd33f2c2addc818268e478c810c8a7406181dbf6be6af54c0d04d6cccdfd4e2faf3314a4f542e97cbb4d85
+ b2sums = e21485bd3d917be15837eb51ddb9aeb4a0df5fb7b18ccbf1d520aff2340833935e441f634e4ae8482a21ff38a9dec9f320bec3459aedf15087909b6eb2cff7db
b2sums = c992567bd7dd8553432be496ffa1c17e2f5ebe9c7edb51945cf977e1b742dd6517c210d8843bb82744ca705efd07f8027cd7dde41b50215ebd707a34aa81462e
pkgname = linux-cachyos-rc
diff --git a/linux-cachyos-rc/PKGBUILD b/linux-cachyos-rc/PKGBUILD
index d27e516c..04d0ae59 100644
--- a/linux-cachyos-rc/PKGBUILD
+++ b/linux-cachyos-rc/PKGBUILD
@@ -122,6 +122,11 @@
# Use this only if you have Turing+ GPU
: "${_build_nvidia_open:=no}"
+# Builds the closed nvidia module of the 580xx legacy driver and package it into a own base
+# This does replace the requirement of nvidia-580xx-dkms
+# Use this for Maxwell, Pascal and Volta GPUs
+: "${_build_nvidia_580xx:=no}"
+
# Builds the r8125 module and package it into its own package
# Replaces requirement for r8125-dkms
: "${_build_r8125:=no}"
@@ -220,6 +225,8 @@ _patchsource="https://raw.githubusercontent.com/cachyos/kernel-patches/master/${
_nv_ver=615.78.08
_nv_pkg="NVIDIA-Linux-x86_64-${_nv_ver}"
_nv_open_pkg="NVIDIA-kernel-module-source-${_nv_ver}"
+_nv_580xx_ver=580.196.07
+_nv_580xx_pkg="NVIDIA-Linux-x86_64-${_nv_580xx_ver}"
source=(
"https://github.com/CachyOS/linux/releases/download/${_srctag}/${_srctag}.tar.gz"{,.asc}
"config"
@@ -276,6 +283,12 @@ if [ "$_propeller" = "yes" ] && [ "$_propeller_profiles" = "yes" ]; then
propeller_ld_profile.txt)
fi
+if [ "$_build_nvidia_580xx" = "yes" ]; then
+ source+=("https://us.download.nvidia.com/XFree86/Linux-x86_64/${_nv_580xx_ver}/${_nv_580xx_pkg}.run"
+ "${_patchsource}/misc/nvidia-580xx/0001-Enable-atomic-kernel-modesetting-by-default.patch"
+ "${_patchsource}/misc/nvidia-580xx/0002-fix-hw-cursor-kde.patch")
+fi
+
if [ "$_build_r8125" = "yes" ]; then
source+=("git+https://github.com/aravance/r8125.git")
fi
@@ -299,6 +312,10 @@ export KBUILD_BUILD_TIMESTAMP="$(date -Ru${SOURCE_DATE_EPOCH:+d @$SOURCE_DATE_EP
_die() { error "$@" ; exit 1; }
prepare() {
+ if [ "$_build_nvidia_580xx" = "yes" ]; then
+ sh "${_nv_580xx_pkg}.run" --extract-only
+ fi
+
cd "$_srcname"
echo "Setting version..."
@@ -314,6 +331,8 @@ prepare() {
echo "Applying patch $src..."
if [[ "$patch" == "${_patchsource}"/misc/nvidia/* ]]; then
patch -Np1 < "../$src" -d "${srcdir}/${_nv_open_pkg}"
+ elif [[ "$patch" == "${_patchsource}"/misc/nvidia-580xx/* ]]; then
+ patch -Np1 < "../$src" -d "${srcdir}/${_nv_580xx_pkg}/kernel"
else
patch -Np1 < "../$src"
fi
@@ -572,6 +591,11 @@ build() {
CFLAGS= CXXFLAGS= LDFLAGS= make "${BUILD_FLAGS[@]}" "${MODULE_FLAGS[@]}" -j"$(nproc)" modules
fi
+ if [ "$_build_nvidia_580xx" = "yes" ]; then
+ cd "${srcdir}/${_nv_580xx_pkg}/kernel"
+ CFLAGS= CXXFLAGS= LDFLAGS= make "${BUILD_FLAGS[@]}" "${MODULE_FLAGS[@]}" -j"$(nproc)" modules
+ fi
+
if [ "$_build_zfs" = "yes" ]; then
cd ${srcdir}/"zfs"
@@ -779,7 +803,7 @@ _package-nvidia-open(){
pkgdesc="nvidia open modules of ${_nv_ver} driver for the ${pkgbase} kernel"
depends=("$pkgbase=$_kernver" "nvidia-utils=${_nv_ver}" "libglvnd")
provides=('NVIDIA-MODULE')
- conflicts=("$pkgbase-nvidia")
+ conflicts=("$pkgbase-nvidia" "$pkgbase-nvidia-580xx")
license=('MIT AND GPL-2.0-only')
cd "$_srcname"
@@ -794,6 +818,25 @@ _package-nvidia-open(){
find "$pkgdir" -name '*.ko' -exec zstd --rm -19 -T0 {} +
}
+_package-nvidia-580xx(){
+ pkgdesc="nvidia module of ${_nv_580xx_ver} driver for the ${pkgbase} kernel"
+ depends=("$pkgbase=$_kernver" "nvidia-580xx-utils=${_nv_580xx_ver}" "libglvnd")
+ provides=('NVIDIA-MODULE')
+ conflicts=("$pkgbase-nvidia-open")
+ license=('custom')
+
+ cd "$_srcname"
+ local modulesdir="$pkgdir/usr/lib/modules/$(<version)/extramodules"
+
+ cd "${srcdir}/${_nv_580xx_pkg}"
+ install -dm755 "${modulesdir}"
+ install -m644 kernel/*.ko "${modulesdir}"
+ install -Dt "$pkgdir/usr/share/licenses/${pkgname}" -m644 LICENSE
+
+ _sign_modules "${modulesdir}"
+ find "$pkgdir" -name '*.ko' -exec zstd --rm -19 -T0 {} +
+}
+
_package-r8125() {
pkgdesc="r8125 modules for the $pkgbase kernel"
depends=("$pkgbase=$_kernver")
@@ -819,6 +862,7 @@ pkgname=("$pkgbase")
pkgname+=("$pkgbase-headers")
[ "$_build_zfs" = "yes" ] && pkgname+=("$pkgbase-zfs")
[ "$_build_nvidia_open" = "yes" ] && pkgname+=("$pkgbase-nvidia-open")
+[ "$_build_nvidia_580xx" = "yes" ] && pkgname+=("$pkgbase-nvidia-580xx")
[ "$_build_r8125" = "yes" ] && pkgname+=("$pkgbase-r8125")
for _p in "${pkgname[@]}"; do
eval "package_$_p() {
@@ -829,5 +873,5 @@ done
b2sums=('177537fa8a8a7c36eb1ce495d7acd30e8a6b494c4eed50d2afc1bd14358d335bb5fa57a9d83226d044a41a56abbc321bc7863d3ad05dde0f7c2ae5c150532f09'
'SKIP'
- '63a34e61c50d9a914f9b95089b48db4c394d908cc3dd33f2c2addc818268e478c810c8a7406181dbf6be6af54c0d04d6cccdfd4e2faf3314a4f542e97cbb4d85'
+ 'e21485bd3d917be15837eb51ddb9aeb4a0df5fb7b18ccbf1d520aff2340833935e441f634e4ae8482a21ff38a9dec9f320bec3459aedf15087909b6eb2cff7db'
'c992567bd7dd8553432be496ffa1c17e2f5ebe9c7edb51945cf977e1b742dd6517c210d8843bb82744ca705efd07f8027cd7dde41b50215ebd707a34aa81462e')
diff --git a/linux-cachyos-rt-bore/PKGBUILD b/linux-cachyos-rt-bore/PKGBUILD
index 80910baf..b64716c8 100644
--- a/linux-cachyos-rt-bore/PKGBUILD
+++ b/linux-cachyos-rt-bore/PKGBUILD
@@ -123,6 +123,11 @@
# Use this only if you have Turing+ GPU
: "${_build_nvidia_open:=no}"
+# Builds the closed nvidia module of the 580xx legacy driver and package it into a own base
+# This does replace the requirement of nvidia-580xx-dkms
+# Use this for Maxwell, Pascal and Volta GPUs
+: "${_build_nvidia_580xx:=no}"
+
# Builds the r8125 module and package it into its own package
# Replaces requirement for r8125-dkms
: "${_build_r8125:=no}"
@@ -194,6 +199,8 @@ _patchsource="https://raw.githubusercontent.com/cachyos/kernel-patches/master/${
_nv_ver=615.78.08
_nv_pkg="NVIDIA-Linux-x86_64-${_nv_ver}"
_nv_open_pkg="NVIDIA-kernel-module-source-${_nv_ver}"
+_nv_580xx_ver=580.196.07
+_nv_580xx_pkg="NVIDIA-Linux-x86_64-${_nv_580xx_ver}"
source=(
"https://github.com/CachyOS/linux/releases/download/${_srcname}/${_srcname}.tar.gz"{,.asc}
"config"
@@ -234,6 +241,12 @@ if [ "$_build_nvidia_open" = "yes" ]; then
"${_patchsource}/misc/nvidia/0004-Open-sysfs-config-from-the-userspace-root-on-7.3.patch")
fi
+if [ "$_build_nvidia_580xx" = "yes" ]; then
+ source+=("https://us.download.nvidia.com/XFree86/Linux-x86_64/${_nv_580xx_ver}/${_nv_580xx_pkg}.run"
+ "${_patchsource}/misc/nvidia-580xx/0001-Enable-atomic-kernel-modesetting-by-default.patch"
+ "${_patchsource}/misc/nvidia-580xx/0002-fix-hw-cursor-kde.patch")
+fi
+
if [ "$_build_r8125" = "yes" ]; then
source+=("git+https://github.com/aravance/r8125.git")
fi
@@ -257,6 +270,10 @@ export KBUILD_BUILD_TIMESTAMP="$(date -Ru${SOURCE_DATE_EPOCH:+d @$SOURCE_DATE_EP
_die() { error "$@" ; exit 1; }
prepare() {
+ if [ "$_build_nvidia_580xx" = "yes" ]; then
+ sh "${_nv_580xx_pkg}.run" --extract-only
+ fi
+
cd "$_srcname"
echo "Setting version..."
@@ -272,6 +289,8 @@ prepare() {
echo "Applying patch $src..."
if [[ "$patch" == "${_patchsource}"/misc/nvidia/* ]]; then
patch -Np1 < "../$src" -d "${srcdir}/${_nv_open_pkg}"
+ elif [[ "$patch" == "${_patchsource}"/misc/nvidia-580xx/* ]]; then
+ patch -Np1 < "../$src" -d "${srcdir}/${_nv_580xx_pkg}/kernel"
else
patch -Np1 < "../$src"
fi
@@ -509,6 +528,11 @@ build() {
CFLAGS= CXXFLAGS= LDFLAGS= make "${BUILD_FLAGS[@]}" "${MODULE_FLAGS[@]}" -j"$(nproc)" modules
fi
+ if [ "$_build_nvidia_580xx" = "yes" ]; then
+ cd "${srcdir}/${_nv_580xx_pkg}/kernel"
+ CFLAGS= CXXFLAGS= LDFLAGS= make "${BUILD_FLAGS[@]}" "${MODULE_FLAGS[@]}" -j"$(nproc)" modules
+ fi
+
if [ "$_build_zfs" = "yes" ]; then
cd ${srcdir}/"zfs"
@@ -712,7 +736,7 @@ _package-nvidia-open(){
pkgdesc="nvidia open modules of ${_nv_ver} driver for the ${pkgbase} kernel"
depends=("$pkgbase=$_kernver" "nvidia-utils=${_nv_ver}" "libglvnd")
provides=('NVIDIA-MODULE')
- conflicts=("$pkgbase-nvidia")
+ conflicts=("$pkgbase-nvidia" "$pkgbase-nvidia-580xx")
license=('MIT AND GPL-2.0-only')
cd "$_srcname"
@@ -727,6 +751,25 @@ _package-nvidia-open(){
find "$pkgdir" -name '*.ko' -exec zstd --rm -19 -T0 {} +
}
+_package-nvidia-580xx(){
+ pkgdesc="nvidia module of ${_nv_580xx_ver} driver for the ${pkgbase} kernel"
+ depends=("$pkgbase=$_kernver" "nvidia-580xx-utils=${_nv_580xx_ver}" "libglvnd")
+ provides=('NVIDIA-MODULE')
+ conflicts=("$pkgbase-nvidia-open")
+ license=('custom')
+
+ cd "$_srcname"
+ local modulesdir="$pkgdir/usr/lib/modules/$(<version)/extramodules"
+
+ cd "${srcdir}/${_nv_580xx_pkg}"
+ install -dm755 "${modulesdir}"
+ install -m644 kernel/*.ko "${modulesdir}"
+ install -Dt "$pkgdir/usr/share/licenses/${pkgname}" -m644 LICENSE
+
+ _sign_modules "${modulesdir}"
+ find "$pkgdir" -name '*.ko' -exec zstd --rm -19 -T0 {} +
+}
+
_package-r8125() {
pkgdesc="r8125 modules for the $pkgbase kernel"
depends=("$pkgbase=$_kernver")
@@ -752,6 +795,7 @@ pkgname=("$pkgbase")
pkgname+=("$pkgbase-headers")
[ "$_build_zfs" = "yes" ] && pkgname+=("$pkgbase-zfs")
[ "$_build_nvidia_open" = "yes" ] && pkgname+=("$pkgbase-nvidia-open")
+[ "$_build_nvidia_580xx" = "yes" ] && pkgname+=("$pkgbase-nvidia-580xx")
[ "$_build_r8125" = "yes" ] && pkgname+=("$pkgbase-r8125")
for _p in "${pkgname[@]}"; do
eval "package_$_p() {
diff --git a/linux-cachyos-server/PKGBUILD b/linux-cachyos-server/PKGBUILD
index a1e6bc34..dd49f515 100644
--- a/linux-cachyos-server/PKGBUILD
+++ b/linux-cachyos-server/PKGBUILD
@@ -123,6 +123,11 @@
# Use this only if you have Turing+ GPU
: "${_build_nvidia_open:=no}"
+# Builds the closed nvidia module of the 580xx legacy driver and package it into a own base
+# This does replace the requirement of nvidia-580xx-dkms
+# Use this for Maxwell, Pascal and Volta GPUs
+: "${_build_nvidia_580xx:=no}"
+
# Builds the r8125 module and package it into its own package
# Replaces requirement for r8125-dkms
: "${_build_r8125:=no}"
@@ -191,6 +196,8 @@ _patchsource="https://raw.githubusercontent.com/cachyos/kernel-patches/master/${
_nv_ver=615.78.08
_nv_pkg="NVIDIA-Linux-x86_64-${_nv_ver}"
_nv_open_pkg="NVIDIA-kernel-module-source-${_nv_ver}"
+_nv_580xx_ver=580.196.07
+_nv_580xx_pkg="NVIDIA-Linux-x86_64-${_nv_580xx_ver}"
source=(
"https://github.com/CachyOS/linux/releases/download/${_srcname}/${_srcname}.tar.gz"{,.asc}
"config"
@@ -231,6 +238,12 @@ if [ "$_build_nvidia_open" = "yes" ]; then
"${_patchsource}/misc/nvidia/0004-Open-sysfs-config-from-the-userspace-root-on-7.3.patch")
fi
+if [ "$_build_nvidia_580xx" = "yes" ]; then
+ source+=("https://us.download.nvidia.com/XFree86/Linux-x86_64/${_nv_580xx_ver}/${_nv_580xx_pkg}.run"
+ "${_patchsource}/misc/nvidia-580xx/0001-Enable-atomic-kernel-modesetting-by-default.patch"
+ "${_patchsource}/misc/nvidia-580xx/0002-fix-hw-cursor-kde.patch")
+fi
+
if [ "$_build_r8125" = "yes" ]; then
source+=("git+https://github.com/aravance/r8125.git")
fi
@@ -254,6 +267,10 @@ export KBUILD_BUILD_TIMESTAMP="$(date -Ru${SOURCE_DATE_EPOCH:+d @$SOURCE_DATE_EP
_die() { error "$@" ; exit 1; }
prepare() {
+ if [ "$_build_nvidia_580xx" = "yes" ]; then
+ sh "${_nv_580xx_pkg}.run" --extract-only
+ fi
+
cd "$_srcname"
echo "Setting version..."
@@ -269,6 +286,8 @@ prepare() {
echo "Applying patch $src..."
if [[ "$patch" == "${_patchsource}"/misc/nvidia/* ]]; then
patch -Np1 < "../$src" -d "${srcdir}/${_nv_open_pkg}"
+ elif [[ "$patch" == "${_patchsource}"/misc/nvidia-580xx/* ]]; then
+ patch -Np1 < "../$src" -d "${srcdir}/${_nv_580xx_pkg}/kernel"
else
patch -Np1 < "../$src"
fi
@@ -506,6 +525,11 @@ build() {
CFLAGS= CXXFLAGS= LDFLAGS= make "${BUILD_FLAGS[@]}" "${MODULE_FLAGS[@]}" -j"$(nproc)" modules
fi
+ if [ "$_build_nvidia_580xx" = "yes" ]; then
+ cd "${srcdir}/${_nv_580xx_pkg}/kernel"
+ CFLAGS= CXXFLAGS= LDFLAGS= make "${BUILD_FLAGS[@]}" "${MODULE_FLAGS[@]}" -j"$(nproc)" modules
+ fi
+
if [ "$_build_zfs" = "yes" ]; then
cd ${srcdir}/"zfs"
@@ -709,7 +733,7 @@ _package-nvidia-open(){
pkgdesc="nvidia open modules of ${_nv_ver} driver for the ${pkgbase} kernel"
depends=("$pkgbase=$_kernver" "nvidia-utils=${_nv_ver}" "libglvnd")
provides=('NVIDIA-MODULE')
- conflicts=("$pkgbase-nvidia")
+ conflicts=("$pkgbase-nvidia" "$pkgbase-nvidia-580xx")
license=('MIT AND GPL-2.0-only')
cd "$_srcname"
@@ -724,6 +748,25 @@ _package-nvidia-open(){
find "$pkgdir" -name '*.ko' -exec zstd --rm -19 -T0 {} +
}
+_package-nvidia-580xx(){
+ pkgdesc="nvidia module of ${_nv_580xx_ver} driver for the ${pkgbase} kernel"
+ depends=("$pkgbase=$_kernver" "nvidia-580xx-utils=${_nv_580xx_ver}" "libglvnd")
+ provides=('NVIDIA-MODULE')
+ conflicts=("$pkgbase-nvidia-open")
+ license=('custom')
+
+ cd "$_srcname"
+ local modulesdir="$pkgdir/usr/lib/modules/$(<version)/extramodules"
+
+ cd "${srcdir}/${_nv_580xx_pkg}"
+ install -dm755 "${modulesdir}"
+ install -m644 kernel/*.ko "${modulesdir}"
+ install -Dt "$pkgdir/usr/share/licenses/${pkgname}" -m644 LICENSE
+
+ _sign_modules "${modulesdir}"
+ find "$pkgdir" -name '*.ko' -exec zstd --rm -19 -T0 {} +
+}
+
_package-r8125() {
pkgdesc="r8125 modules for the $pkgbase kernel"
depends=("$pkgbase=$_kernver")
@@ -749,6 +792,7 @@ pkgname=("$pkgbase")
pkgname+=("$pkgbase-headers")
[ "$_build_zfs" = "yes" ] && pkgname+=("$pkgbase-zfs")
[ "$_build_nvidia_open" = "yes" ] && pkgname+=("$pkgbase-nvidia-open")
+[ "$_build_nvidia_580xx" = "yes" ] && pkgname+=("$pkgbase-nvidia-580xx")
[ "$_build_r8125" = "yes" ] && pkgname+=("$pkgbase-r8125")
for _p in "${pkgname[@]}"; do
eval "package_$_p() {
diff --git a/linux-cachyos/PKGBUILD b/linux-cachyos/PKGBUILD
index 65321661..a7afd10e 100644
--- a/linux-cachyos/PKGBUILD
+++ b/linux-cachyos/PKGBUILD
@@ -122,6 +122,11 @@
# Use this only if you have Turing+ GPU
: "${_build_nvidia_open:=no}"
+# Builds the closed nvidia module of the 580xx legacy driver and package it into a own base
+# This does replace the requirement of nvidia-580xx-dkms
+# Use this for Maxwell, Pascal and Volta GPUs
+: "${_build_nvidia_580xx:=no}"
+
# Builds the r8125 module and package it into its own package
# Replaces requirement for r8125-dkms
: "${_build_r8125:=no}"
@@ -216,6 +221,8 @@ _patchsource="https://raw.githubusercontent.com/cachyos/kernel-patches/master/${
_nv_ver=615.78.08
_nv_pkg="NVIDIA-Linux-x86_64-${_nv_ver}"
_nv_open_pkg="NVIDIA-kernel-module-source-${_nv_ver}"
+_nv_580xx_ver=580.196.07
+_nv_580xx_pkg="NVIDIA-Linux-x86_64-${_nv_580xx_ver}"
source=(
"https://github.com/CachyOS/linux/releases/download/${_srcname}/${_srcname}.tar.gz"{,.asc}
"config"
@@ -256,6 +263,12 @@ if [ "$_build_nvidia_open" = "yes" ]; then
"${_patchsource}/misc/nvidia/0004-Open-sysfs-config-from-the-userspace-root-on-7.3.patch")
fi
+if [ "$_build_nvidia_580xx" = "yes" ]; then
+ source+=("https://us.download.nvidia.com/XFree86/Linux-x86_64/${_nv_580xx_ver}/${_nv_580xx_pkg}.run"
+ "${_patchsource}/misc/nvidia-580xx/0001-Enable-atomic-kernel-modesetting-by-default.patch"
+ "${_patchsource}/misc/nvidia-580xx/0002-fix-hw-cursor-kde.patch")
+fi
+
# Use generated AutoFDO Profile
if [ "$_autofdo" = "yes" ] && [ -n "$_autofdo_profile_name" ]; then
if [ -e "$_autofdo_profile_name" ]; then
@@ -294,6 +307,10 @@ export KBUILD_BUILD_TIMESTAMP="$(date -Ru${SOURCE_DATE_EPOCH:+d @$SOURCE_DATE_EP
_die() { error "$@" ; exit 1; }
prepare() {
+ if [ "$_build_nvidia_580xx" = "yes" ]; then
+ sh "${_nv_580xx_pkg}.run" --extract-only
+ fi
+
cd "$_srcname"
echo "Setting version..."
@@ -309,6 +326,8 @@ prepare() {
echo "Applying patch $src..."
if [[ "$patch" == "${_patchsource}"/misc/nvidia/* ]]; then
patch -Np1 < "../$src" -d "${srcdir}/${_nv_open_pkg}"
+ elif [[ "$patch" == "${_patchsource}"/misc/nvidia-580xx/* ]]; then
+ patch -Np1 < "../$src" -d "${srcdir}/${_nv_580xx_pkg}/kernel"
else
patch -Np1 < "../$src"
fi
@@ -567,6 +586,11 @@ build() {
CFLAGS= CXXFLAGS= LDFLAGS= make "${BUILD_FLAGS[@]}" "${MODULE_FLAGS[@]}" -j"$(nproc)" modules
fi
+ if [ "$_build_nvidia_580xx" = "yes" ]; then
+ cd "${srcdir}/${_nv_580xx_pkg}/kernel"
+ CFLAGS= CXXFLAGS= LDFLAGS= make "${BUILD_FLAGS[@]}" "${MODULE_FLAGS[@]}" -j"$(nproc)" modules
+ fi
+
if [ "$_build_zfs" = "yes" ]; then
cd ${srcdir}/"zfs"
@@ -781,7 +805,7 @@ _package-nvidia-open(){
pkgdesc="nvidia open modules of ${_nv_ver} driver for the ${pkgbase} kernel"
depends=("$pkgbase=$_kernver" "nvidia-utils=${_nv_ver}" "libglvnd")
provides=('NVIDIA-MODULE')
- conflicts=("$pkgbase-nvidia")
+ conflicts=("$pkgbase-nvidia" "$pkgbase-nvidia-580xx")
license=('MIT AND GPL-2.0-only')
cd "$_srcname"
@@ -796,6 +820,25 @@ _package-nvidia-open(){
find "$pkgdir" -name '*.ko' -exec zstd --rm -19 -T0 {} +
}
+_package-nvidia-580xx(){
+ pkgdesc="nvidia module of ${_nv_580xx_ver} driver for the ${pkgbase} kernel"
+ depends=("$pkgbase=$_kernver" "nvidia-580xx-utils=${_nv_580xx_ver}" "libglvnd")
+ provides=('NVIDIA-MODULE')
+ conflicts=("$pkgbase-nvidia-open")
+ license=('custom')
+
+ cd "$_srcname"
+ local modulesdir="$pkgdir/usr/lib/modules/$(<version)/extramodules"
+
+ cd "${srcdir}/${_nv_580xx_pkg}"
+ install -dm755 "${modulesdir}"
+ install -m644 kernel/*.ko "${modulesdir}"
+ install -Dt "$pkgdir/usr/share/licenses/${pkgname}" -m644 LICENSE
+
+ _sign_modules "${modulesdir}"
+ find "$pkgdir" -name '*.ko' -exec zstd --rm -19 -T0 {} +
+}
+
_package-r8125() {
pkgdesc="r8125 modules for the $pkgbase kernel"
depends=("$pkgbase=$_kernver")
@@ -821,6 +864,7 @@ pkgname=("$pkgbase")
pkgname+=("$pkgbase-headers")
[ "$_build_zfs" = "yes" ] && pkgname+=("$pkgbase-zfs")
[ "$_build_nvidia_open" = "yes" ] && pkgname+=("$pkgbase-nvidia-open")
+[ "$_build_nvidia_580xx" = "yes" ] && pkgname+=("$pkgbase-nvidia-580xx")
[ "$_build_r8125" = "yes" ] && pkgname+=("$pkgbase-r8125")
for _p in "${pkgname[@]}"; do
eval "package_$_p() {