Skip to content

Commit

Permalink
Fix applying of NVIDIA-related patches (#205)
Browse files Browse the repository at this point in the history
* Ignore applying patches for NVIDIA module through the main loop

This fixes the patch applying behavior for kernel-manager

* Increase pkgrel

god, please let someone write a script to automate this in the new year
  • Loading branch information
ventureoo authored Dec 28, 2023
1 parent b76a274 commit 71541fd
Show file tree
Hide file tree
Showing 21 changed files with 64 additions and 53 deletions.
2 changes: 1 addition & 1 deletion linux-bore/.SRCINFO
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
pkgbase = linux-bore
pkgdesc = Linux BORE scheduler Kernel by CachyOS with other patches and improvements
pkgver = 6.6.8
pkgrel = 1
pkgrel = 2
url = https://github.com/CachyOS/linux-cachyos
arch = x86_64
arch = x86_64_v3
Expand Down
9 changes: 5 additions & 4 deletions linux-bore/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ _stable=${_major}.${_minor}
_srcname=linux-${_stable}
#_srcname=linux-${_major}
pkgdesc='Linux BORE scheduler Kernel by CachyOS with other patches and improvements'
pkgrel=2
pkgrel=3
_kernver=$pkgver-$pkgrel
arch=('x86_64' 'x86_64_v3')
url="https://github.com/CachyOS/linux-cachyos"
Expand Down Expand Up @@ -222,8 +222,8 @@ fi

# NVIDIA pre-build module support
if [ -n "$_build_nvidia" ]; then
source+=("https://us.download.nvidia.com/XFree86/Linux-x86_64/${_nv_ver}/${_nv_pkg}.run")
source+=("nvidia-drm-hotplug-workqueue.nvpatch::$_patchsource/misc/nvidia/nvidia-drm-hotplug-workqueue.patch")
source+=("https://us.download.nvidia.com/XFree86/Linux-x86_64/${_nv_ver}/${_nv_pkg}.run"
"$_patchsource/misc/nvidia/nvidia-drm-hotplug-workqueue.patch")
fi

## ToDo: Adjust for new Scheduler Changes
Expand Down Expand Up @@ -277,6 +277,7 @@ prepare() {
src="${src%%::*}"
src="${src##*/}"
src="${src%.zst}"
[[ $src = nvidia-drm-hotplug-workqueue.patch ]] && continue
[[ $src = *.patch ]] || continue
echo "Applying patch $src..."
patch -Np1 < "../$src"
Expand Down Expand Up @@ -644,7 +645,7 @@ prepare() {

# Temporary fix for fbdev=1
# https://forums.developer.nvidia.com/t/545-29-06-18-1-flip-event-timeout-error-on-startup-shutdown-and-sometimes-suspend-wayland-unusable/274788/21
patch -Np0 -i "${srcdir}/nvidia-drm-hotplug-workqueue.nvpatch" -d "${srcdir}/${_nv_pkg}"
patch -Np0 -i "${srcdir}/nvidia-drm-hotplug-workqueue.patch" -d "${srcdir}/${_nv_pkg}"
fi
}

Expand Down
2 changes: 1 addition & 1 deletion linux-cachyos-bore/.SRCINFO
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
pkgbase = linux-cachyos-bore
pkgdesc = Linux BORE scheduler Kernel by CachyOS with other patches and improvements
pkgver = 6.6.8
pkgrel = 2
pkgrel = 3
url = https://github.com/CachyOS/linux-cachyos
arch = x86_64
arch = x86_64_v3
Expand Down
9 changes: 5 additions & 4 deletions linux-cachyos-bore/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ _stable=${_major}.${_minor}
_srcname=linux-${_stable}
#_srcname=linux-${_major}
pkgdesc='Linux BORE scheduler Kernel by CachyOS with other patches and improvements'
pkgrel=2
pkgrel=3
_kernver=$pkgver-$pkgrel
arch=('x86_64' 'x86_64_v3')
url="https://github.com/CachyOS/linux-cachyos"
Expand Down Expand Up @@ -222,8 +222,8 @@ fi

# NVIDIA pre-build module support
if [ -n "$_build_nvidia" ]; then
source+=("https://us.download.nvidia.com/XFree86/Linux-x86_64/${_nv_ver}/${_nv_pkg}.run")
source+=("nvidia-drm-hotplug-workqueue.nvpatch::$_patchsource/misc/nvidia/nvidia-drm-hotplug-workqueue.patch")
source+=("https://us.download.nvidia.com/XFree86/Linux-x86_64/${_nv_ver}/${_nv_pkg}.run"
"$_patchsource/misc/nvidia/nvidia-drm-hotplug-workqueue.patch")
fi

## ToDo: Adjust for new Scheduler Changes
Expand Down Expand Up @@ -277,6 +277,7 @@ prepare() {
src="${src%%::*}"
src="${src##*/}"
src="${src%.zst}"
[[ $src = nvidia-drm-hotplug-workqueue.patch ]] && continue
[[ $src = *.patch ]] || continue
echo "Applying patch $src..."
patch -Np1 < "../$src"
Expand Down Expand Up @@ -644,7 +645,7 @@ prepare() {

# Temporary fix for fbdev=1
# https://forums.developer.nvidia.com/t/545-29-06-18-1-flip-event-timeout-error-on-startup-shutdown-and-sometimes-suspend-wayland-unusable/274788/21
patch -Np0 -i "${srcdir}/nvidia-drm-hotplug-workqueue.nvpatch" -d "${srcdir}/${_nv_pkg}"
patch -Np0 -i "${srcdir}/nvidia-drm-hotplug-workqueue.patch" -d "${srcdir}/${_nv_pkg}"
fi
}

Expand Down
2 changes: 1 addition & 1 deletion linux-cachyos-eevdf/.SRCINFO
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
pkgbase = linux-cachyos-eevdf
pkgdesc = Linux EEVDF scheduler Kernel by CachyOS with other patches and improvements
pkgver = 6.6.8
pkgrel = 2
pkgrel = 3
url = https://github.com/CachyOS/linux-cachyos
arch = x86_64
arch = x86_64_v3
Expand Down
9 changes: 5 additions & 4 deletions linux-cachyos-eevdf/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ _stable=${_major}.${_minor}
_srcname=linux-${_stable}
#_srcname=linux-${_major}
pkgdesc='Linux EEVDF scheduler Kernel by CachyOS with other patches and improvements'
pkgrel=2
pkgrel=3
_kernver=$pkgver-$pkgrel
arch=('x86_64' 'x86_64_v3')
url="https://github.com/CachyOS/linux-cachyos"
Expand Down Expand Up @@ -222,8 +222,8 @@ fi

# NVIDIA pre-build module support
if [ -n "$_build_nvidia" ]; then
source+=("https://us.download.nvidia.com/XFree86/Linux-x86_64/${_nv_ver}/${_nv_pkg}.run")
source+=("nvidia-drm-hotplug-workqueue.nvpatch::$_patchsource/misc/nvidia/nvidia-drm-hotplug-workqueue.patch")
source+=("https://us.download.nvidia.com/XFree86/Linux-x86_64/${_nv_ver}/${_nv_pkg}.run"
"$_patchsource/misc/nvidia/nvidia-drm-hotplug-workqueue.patch")
fi

## ToDo: Adjust for new Scheduler Changes
Expand Down Expand Up @@ -277,6 +277,7 @@ prepare() {
src="${src%%::*}"
src="${src##*/}"
src="${src%.zst}"
[[ $src = nvidia-drm-hotplug-workqueue.patch ]] && continue
[[ $src = *.patch ]] || continue
echo "Applying patch $src..."
patch -Np1 < "../$src"
Expand Down Expand Up @@ -644,7 +645,7 @@ prepare() {

# Temporary fix for fbdev=1
# https://forums.developer.nvidia.com/t/545-29-06-18-1-flip-event-timeout-error-on-startup-shutdown-and-sometimes-suspend-wayland-unusable/274788/21
patch -Np0 -i "${srcdir}/nvidia-drm-hotplug-workqueue.nvpatch" -d "${srcdir}/${_nv_pkg}"
patch -Np0 -i "${srcdir}/nvidia-drm-hotplug-workqueue.patch" -d "${srcdir}/${_nv_pkg}"
fi
}

Expand Down
2 changes: 1 addition & 1 deletion linux-cachyos-hardened/.SRCINFO
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
pkgbase = linux-cachyos-hardened
pkgdesc = Linux hardenened BORE scheduler Kernel by CachyOS with other patches and improvements
pkgver = 6.6.8
pkgrel = 3
pkgrel = 4
url = https://github.com/CachyOS/linux-cachyos
arch = x86_64
arch = x86_64_v3
Expand Down
9 changes: 5 additions & 4 deletions linux-cachyos-hardened/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ _stable=${_major}.${_minor}
_srcname=linux-${_stable}
#_srcname=linux-${_major}
pkgdesc='Linux hardenened BORE scheduler Kernel by CachyOS with other patches and improvements'
pkgrel=3
pkgrel=4
_kernver=$pkgver-$pkgrel
arch=('x86_64' 'x86_64_v3')
url="https://github.com/CachyOS/linux-cachyos"
Expand Down Expand Up @@ -218,8 +218,8 @@ fi

# NVIDIA pre-build module support
if [ -n "$_build_nvidia" ]; then
source+=("https://us.download.nvidia.com/XFree86/Linux-x86_64/${_nv_ver}/${_nv_pkg}.run")
source+=("nvidia-drm-hotplug-workqueue.nvpatch::$_patchsource/misc/nvidia/nvidia-drm-hotplug-workqueue.patch")
source+=("https://us.download.nvidia.com/XFree86/Linux-x86_64/${_nv_ver}/${_nv_pkg}.run"
"$_patchsource/misc/nvidia/nvidia-drm-hotplug-workqueue.patch")
fi

## ToDo: Adjust for new Scheduler Changes
Expand Down Expand Up @@ -273,6 +273,7 @@ prepare() {
src="${src%%::*}"
src="${src##*/}"
src="${src%.zst}"
[[ $src = nvidia-drm-hotplug-workqueue.patch ]] && continue
[[ $src = *.patch ]] || continue
echo "Applying patch $src..."
patch -Np1 < "../$src"
Expand Down Expand Up @@ -640,7 +641,7 @@ prepare() {

# Temporary fix for fbdev=1
# https://forums.developer.nvidia.com/t/545-29-06-18-1-flip-event-timeout-error-on-startup-shutdown-and-sometimes-suspend-wayland-unusable/274788/21
patch -Np0 -i "${srcdir}/nvidia-drm-hotplug-workqueue.nvpatch" -d "${srcdir}/${_nv_pkg}"
patch -Np0 -i "${srcdir}/nvidia-drm-hotplug-workqueue.patch" -d "${srcdir}/${_nv_pkg}"
fi
}

Expand Down
2 changes: 1 addition & 1 deletion linux-cachyos-lts/.SRCINFO
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
pkgbase = linux-cachyos-lts
pkgdesc = Linux BORE scheduler Kernel by CachyOS with other patches and improvements
pkgver = 6.1.69
pkgrel = 2
pkgrel = 3
url = https://github.com/CachyOS/linux-cachyos
arch = x86_64
arch = x86_64_v3
Expand Down
9 changes: 5 additions & 4 deletions linux-cachyos-lts/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ _stable=${_major}.${_minor}
_srcname=linux-${_stable}
#_srcname=linux-${_major}
pkgdesc='Linux BORE scheduler Kernel by CachyOS with other patches and improvements'
pkgrel=2
pkgrel=3
_kernver=$pkgver-$pkgrel
arch=('x86_64' 'x86_64_v3')
url="https://github.com/CachyOS/linux-cachyos"
Expand Down Expand Up @@ -237,8 +237,8 @@ fi

# NVIDIA pre-build module support
if [ -n "$_build_nvidia" ]; then
source+=("https://us.download.nvidia.com/XFree86/Linux-x86_64/${_nv_ver}/${_nv_pkg}.run")
source+=("nvidia-drm-hotplug-workqueue.nvpatch::$_patchsource/misc/nvidia/nvidia-drm-hotplug-workqueue.patch")
source+=("https://us.download.nvidia.com/XFree86/Linux-x86_64/${_nv_ver}/${_nv_pkg}.run"
"$_patchsource/misc/nvidia/nvidia-drm-hotplug-workqueue.patch")
fi

case "$_cpusched" in
Expand Down Expand Up @@ -293,6 +293,7 @@ prepare() {
for src in "${source[@]}"; do
src="${src%%::*}"
src="${src##*/}"
[[ $src = nvidia-drm-hotplug-workqueue.patch ]] && continue
[[ $src = *.patch ]] || continue
echo "Applying patch $src..."
patch -Np1 < "../$src"
Expand Down Expand Up @@ -667,7 +668,7 @@ prepare() {

# Temporary fix for fbdev=1
# https://forums.developer.nvidia.com/t/545-29-06-18-1-flip-event-timeout-error-on-startup-shutdown-and-sometimes-suspend-wayland-unusable/274788/21
patch -Np0 -i "${srcdir}/nvidia-drm-hotplug-workqueue.nvpatch" -d "${srcdir}/${_nv_pkg}"
patch -Np0 -i "${srcdir}/nvidia-drm-hotplug-workqueue.patch" -d "${srcdir}/${_nv_pkg}"
fi
}

Expand Down
7 changes: 4 additions & 3 deletions linux-cachyos-rc/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -219,8 +219,8 @@ fi

# NVIDIA pre-build module support
if [ -n "$_build_nvidia" ]; then
source+=("https://us.download.nvidia.com/XFree86/Linux-x86_64/${_nv_ver}/${_nv_pkg}.run")
source+=("nvidia-drm-hotplug-workqueue.nvpatch::$_patchsource/misc/nvidia/nvidia-drm-hotplug-workqueue.patch")
source+=("https://us.download.nvidia.com/XFree86/Linux-x86_64/${_nv_ver}/${_nv_pkg}.run"
"$_patchsource/misc/nvidia/nvidia-drm-hotplug-workqueue.patch")
fi

## ToDo: Adjust for new Scheduler Changes
Expand Down Expand Up @@ -270,6 +270,7 @@ prepare() {
src="${src%%::*}"
src="${src##*/}"
src="${src%.zst}"
[[ $src = nvidia-drm-hotplug-workqueue.patch ]] && continue
[[ $src = *.patch ]] || continue
echo "Applying patch $src..."
patch -Np1 < "../$src"
Expand Down Expand Up @@ -637,7 +638,7 @@ prepare() {

# Temporary fix for fbdev=1
# https://forums.developer.nvidia.com/t/545-29-06-18-1-flip-event-timeout-error-on-startup-shutdown-and-sometimes-suspend-wayland-unusable/274788/21
patch -Np0 -i "${srcdir}/nvidia-drm-hotplug-workqueue.nvpatch" -d "${srcdir}/${_nv_pkg}"
patch -Np0 -i "${srcdir}/nvidia-drm-hotplug-workqueue.patch" -d "${srcdir}/${_nv_pkg}"
fi
}

Expand Down
2 changes: 1 addition & 1 deletion linux-cachyos-rt-bore/.SRCINFO
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
pkgbase = linux-cachyos-rt-bore
pkgdesc = Linux kernel with BORE-RT patches by CachyOS with other patches and improvements
pkgver = 6.6.8
pkgrel = 6
pkgrel = 7
url = https://github.com/CachyOS/linux-cachyos
arch = x86_64
arch = x86_64_v3
Expand Down
9 changes: 5 additions & 4 deletions linux-cachyos-rt-bore/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ _stable=${_major}.${_minor}
_srcname=linux-${_stable}
#_srcname=linux-${_major}
pkgdesc='Linux kernel with BORE-RT patches by CachyOS with other patches and improvements'
pkgrel=6
pkgrel=7
_kernver=$pkgver-$pkgrel
arch=('x86_64' 'x86_64_v3')
url="https://github.com/CachyOS/linux-cachyos"
Expand Down Expand Up @@ -222,8 +222,8 @@ fi

# NVIDIA pre-build module support
if [ -n "$_build_nvidia" ]; then
source+=("https://us.download.nvidia.com/XFree86/Linux-x86_64/${_nv_ver}/${_nv_pkg}.run")
source+=("nvidia-drm-hotplug-workqueue.nvpatch::$_patchsource/misc/nvidia/nvidia-drm-hotplug-workqueue.patch")
source+=("https://us.download.nvidia.com/XFree86/Linux-x86_64/${_nv_ver}/${_nv_pkg}.run"
"$_patchsource/misc/nvidia/nvidia-drm-hotplug-workqueue.patch")
fi

## ToDo: Adjust for new Scheduler Changes
Expand Down Expand Up @@ -277,6 +277,7 @@ prepare() {
src="${src%%::*}"
src="${src##*/}"
src="${src%.zst}"
[[ $src = nvidia-drm-hotplug-workqueue.patch ]] && continue
[[ $src = *.patch ]] || continue
echo "Applying patch $src..."
patch -Np1 < "../$src"
Expand Down Expand Up @@ -644,7 +645,7 @@ prepare() {

# Temporary fix for fbdev=1
# https://forums.developer.nvidia.com/t/545-29-06-18-1-flip-event-timeout-error-on-startup-shutdown-and-sometimes-suspend-wayland-unusable/274788/21
patch -Np0 -i "${srcdir}/nvidia-drm-hotplug-workqueue.nvpatch" -d "${srcdir}/${_nv_pkg}"
patch -Np0 -i "${srcdir}/nvidia-drm-hotplug-workqueue.patch" -d "${srcdir}/${_nv_pkg}"
fi
}

Expand Down
2 changes: 1 addition & 1 deletion linux-cachyos-rt/.SRCINFO
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
pkgbase = linux-cachyos-rt
pkgdesc = Linux kernel with RT patches by CachyOS with other patches and improvements
pkgver = 6.6.8
pkgrel = 2
pkgrel = 3
url = https://github.com/CachyOS/linux-cachyos
arch = x86_64
arch = x86_64_v3
Expand Down
9 changes: 5 additions & 4 deletions linux-cachyos-rt/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ _stable=${_major}.${_minor}
_srcname=linux-${_stable}
#_srcname=linux-${_major}
pkgdesc='Linux kernel with RT patches by CachyOS with other patches and improvements'
pkgrel=2
pkgrel=3
_kernver=$pkgver-$pkgrel
arch=('x86_64' 'x86_64_v3')
url="https://github.com/CachyOS/linux-cachyos"
Expand Down Expand Up @@ -222,8 +222,8 @@ fi

# NVIDIA pre-build module support
if [ -n "$_build_nvidia" ]; then
source+=("https://us.download.nvidia.com/XFree86/Linux-x86_64/${_nv_ver}/${_nv_pkg}.run")
source+=("nvidia-drm-hotplug-workqueue.nvpatch::$_patchsource/misc/nvidia/nvidia-drm-hotplug-workqueue.patch")
source+=("https://us.download.nvidia.com/XFree86/Linux-x86_64/${_nv_ver}/${_nv_pkg}.run"
"$_patchsource/misc/nvidia/nvidia-drm-hotplug-workqueue.patch")
fi

## ToDo: Adjust for new Scheduler Changes
Expand Down Expand Up @@ -277,6 +277,7 @@ prepare() {
src="${src%%::*}"
src="${src##*/}"
src="${src%.zst}"
[[ $src = nvidia-drm-hotplug-workqueue.patch ]] && continue
[[ $src = *.patch ]] || continue
echo "Applying patch $src..."
patch -Np1 < "../$src"
Expand Down Expand Up @@ -644,7 +645,7 @@ prepare() {

# Temporary fix for fbdev=1
# https://forums.developer.nvidia.com/t/545-29-06-18-1-flip-event-timeout-error-on-startup-shutdown-and-sometimes-suspend-wayland-unusable/274788/21
patch -Np0 -i "${srcdir}/nvidia-drm-hotplug-workqueue.nvpatch" -d "${srcdir}/${_nv_pkg}"
patch -Np0 -i "${srcdir}/nvidia-drm-hotplug-workqueue.patch" -d "${srcdir}/${_nv_pkg}"
fi
}

Expand Down
2 changes: 1 addition & 1 deletion linux-cachyos-sched-ext/.SRCINFO
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
pkgbase = linux-cachyos-sched-ext
pkgdesc = Linux SCHED-EXT with BORE scheduler Kernel by CachyOS with other patches and improvements
pkgver = 6.6.8
pkgrel = 2
pkgrel = 3
url = https://github.com/CachyOS/linux-cachyos
arch = x86_64
arch = x86_64_v3
Expand Down
9 changes: 5 additions & 4 deletions linux-cachyos-sched-ext/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ _stable=${_major}.${_minor}
_srcname=linux-${_stable}
#_srcname=linux-${_major}
pkgdesc='Linux SCHED-EXT with BORE scheduler Kernel by CachyOS with other patches and improvements'
pkgrel=2
pkgrel=3
_kernver=$pkgver-$pkgrel
arch=('x86_64' 'x86_64_v3')
url="https://github.com/CachyOS/linux-cachyos"
Expand Down Expand Up @@ -222,8 +222,8 @@ fi

# NVIDIA pre-build module support
if [ -n "$_build_nvidia" ]; then
source+=("https://us.download.nvidia.com/XFree86/Linux-x86_64/${_nv_ver}/${_nv_pkg}.run")
source+=("nvidia-drm-hotplug-workqueue.nvpatch::$_patchsource/misc/nvidia/nvidia-drm-hotplug-workqueue.patch")
source+=("https://us.download.nvidia.com/XFree86/Linux-x86_64/${_nv_ver}/${_nv_pkg}.run"
"$_patchsource/misc/nvidia/nvidia-drm-hotplug-workqueue.patch")
fi

## ToDo: Adjust for new Scheduler Changes
Expand Down Expand Up @@ -277,6 +277,7 @@ prepare() {
src="${src%%::*}"
src="${src##*/}"
src="${src%.zst}"
[[ $src = nvidia-drm-hotplug-workqueue.patch ]] && continue
[[ $src = *.patch ]] || continue
echo "Applying patch $src..."
patch -Np1 < "../$src"
Expand Down Expand Up @@ -644,7 +645,7 @@ prepare() {

# Temporary fix for fbdev=1
# https://forums.developer.nvidia.com/t/545-29-06-18-1-flip-event-timeout-error-on-startup-shutdown-and-sometimes-suspend-wayland-unusable/274788/21
patch -Np0 -i "${srcdir}/nvidia-drm-hotplug-workqueue.nvpatch" -d "${srcdir}/${_nv_pkg}"
patch -Np0 -i "${srcdir}/nvidia-drm-hotplug-workqueue.patch" -d "${srcdir}/${_nv_pkg}"
fi
}

Expand Down
Loading

0 comments on commit 71541fd

Please sign in to comment.