Skip to content

Commit

Permalink
Merge pull request #306 from CachyOS/6.12/nvidia
Browse files Browse the repository at this point in the history
linux-cachyos-rc: Add fix for NVIDIA modules crashing the kernel
  • Loading branch information
ptr1337 authored Oct 2, 2024
2 parents 65abd18 + 3e6d54f commit 54b13ca
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
4 changes: 1 addition & 3 deletions linux-cachyos-rc/.SRCINFO
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
# Generated by makepkg 7.0.0
# Tue Oct 1 06:11:19 UTC 2024
pkgbase = linux-cachyos-rc
pkgdesc = Linux SCHED-EXT + Cachy Sauce Kernel by CachyOS with other patches and improvements
pkgver = 6.12.rc1
pkgrel = 1
pkgrel = 2
url = https://github.com/CachyOS/linux-cachyos
arch = x86_64
license = GPL-2.0-only
Expand Down
24 changes: 13 additions & 11 deletions linux-cachyos-rc/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ _stable=${_major}-${_rcver}
_srcname=linux-${_stable}
#_srcname=linux-${_major}
pkgdesc='Linux SCHED-EXT + Cachy Sauce Kernel by CachyOS with other patches and improvements'
pkgrel=1
pkgrel=2
_kernver="$pkgver-$pkgrel"
_kernuname="${pkgver}-${_pkgsuffix}"
arch=('x86_64')
Expand Down Expand Up @@ -219,7 +219,8 @@ if [ -n "$_build_nvidia" ]; then
source+=("https://us.download.nvidia.com/XFree86/Linux-x86_64/${_nv_ver}/${_nv_pkg}.run"
"${_patchsource}/misc/nvidia/0001-Make-modeset-and-fbdev-default-enabled.patch"
"${_patchsource}/misc/nvidia/0004-6.11-Add-fix-for-fbdev.patch"
"${_patchsource}/misc/nvidia/0005-6.12-drm_outpull_pill-changed-check.patch")
"${_patchsource}/misc/nvidia/0006-Fix-for-6.12.0-rc1-drm_mode_config_funcs.output_poll.patch"
"${_patchsource}/misc/nvidia/0007-6.12-replace-pageswapcache.patch")
fi

if [ -n "$_build_nvidia_open" ]; then
Expand All @@ -228,7 +229,8 @@ if [ -n "$_build_nvidia_open" ]; then
"${_patchsource}/misc/nvidia/0002-Do-not-error-on-unkown-CPU-Type-and-add-Zen5-support.patch"
"${_patchsource}/misc/nvidia/0003-Add-IBT-Support.patch"
"${_patchsource}/misc/nvidia/0004-6.11-Add-fix-for-fbdev.patch"
"${_patchsource}/misc/nvidia/0005-6.12-drm_outpull_pill-changed-check.patch")
"${_patchsource}/misc/nvidia/0006-Fix-for-6.12.0-rc1-drm_mode_config_funcs.output_poll.patch"
"${_patchsource}/misc/nvidia/0007-6.12-replace-pageswapcache.patch")
fi

## List of CachyOS schedulers
Expand Down Expand Up @@ -307,11 +309,11 @@ prepare() {
[ -z "$_cpusched" ] && _die "The value is empty. Choose the correct one again."

case "$_cpusched" in
cachyos|bore|hardened) scripts/config -e SCHED_BORE --set-val MIN_BASE_SLICE_NS 1000000;;
cachyos|bore|hardened) scripts/config -e SCHED_BORE;;
bmq) scripts/config -e SCHED_ALT -e SCHED_BMQ;;
eevdf) ;;
rt) scripts/config -e PREEMPT_COUNT -e PREEMPTION -d PREEMPT_VOLUNTARY -d PREEMPT -d PREEMPT_NONE -d PREEMPT_RT -d PREEMPT_DYNAMIC -e PREEMPT_BUILD -e PREEMPT_BUILD_AUTO -e PREEMPT_AUTO;;
rt-bore) scripts/config -e SCHED_BORE --set-val MIN_BASE_SLICE_NS 1000000 -e PREEMPT_COUNT -e PREEMPTION -d PREEMPT_VOLUNTARY -d PREEMPT -d PREEMPT_NONE -d PREEMPT_RT -d PREEMPT_DYNAMIC -e PREEMPT_BUILD -e PREEMPT_BUILD_AUTO -e PREEMPT_AUTO;;
rt-bore) scripts/config -e SCHED_BORE -e PREEMPT_COUNT -e PREEMPTION -d PREEMPT_VOLUNTARY -d PREEMPT -d PREEMPT_NONE -d PREEMPT_RT -d PREEMPT_DYNAMIC -e PREEMPT_BUILD -e PREEMPT_BUILD_AUTO -e PREEMPT_AUTO;;
sched-ext) ;;
*) _die "The value $_cpusched is invalid. Choose the correct one again.";;
esac
Expand Down Expand Up @@ -525,9 +527,9 @@ prepare() {
patch -Np1 -i "${srcdir}/0001-Make-modeset-and-fbdev-default-enabled.patch" -d "${srcdir}/${_nv_pkg}/kernel"
# Fix broken fbdev on 6.11
patch -Np2 -i "${srcdir}/0004-6.11-Add-fix-for-fbdev.patch" -d "${srcdir}/${_nv_pkg}/kernel"
# Fix 6.12 Kernel Compilation
patch -Np2 -i "${srcdir}/0005-6.12-drm_outpull_pill-changed-check.patch" -d "${srcdir}/${_nv_pkg}/kernel"
# patch -Np2 -i "${srcdir}/0006-6.12-drop-swappagecache.patch" -d "${srcdir}/${_nv_pkg}/kernel"
# Fix for 6.12
patch -Np2 -i "${srcdir}/0006-Fix-for-6.12.0-rc1-drm_mode_config_funcs.output_poll.patch" -d "${srcdir}/${_nv_pkg}/kernel"
patch -Np2 -i "${srcdir}/0007-6.12-replace-pageswapcache.patch" -d "${srcdir}/${_nv_pkg}/kernel"
fi

if [ -n "$_build_nvidia_open" ]; then
Expand All @@ -538,9 +540,9 @@ prepare() {
patch -Np1 --no-backup-if-mismatch -i "${srcdir}/0002-Do-not-error-on-unkown-CPU-Type-and-add-Zen5-support.patch" -d "${srcdir}/${_nv_open_pkg}"
# Fix broken fbdev on 6.11
patch -Np1 --no-backup-if-mismatch -i "${srcdir}/0004-6.11-Add-fix-for-fbdev.patch" -d "${srcdir}/${_nv_open_pkg}"
# Fix for 6.12 Module Compilation
patch -Np1 --no-backup-if-mismatch -i "${srcdir}/0005-6.12-drm_outpull_pill-changed-check.patch" -d "${srcdir}/${_nv_open_pkg}"
patch -Np1 --no-backup-if-mismatch -i "${srcdir}/0006-6.12-drop-swappagecache.patch" -d "${srcdir}/${_nv_open_pkg}"
# Fix for 6.12
patch -Np1 --no-backup-if-mismatch -i "${srcdir}/0006-Fix-for-6.12.0-rc1-drm_mode_config_funcs.output_poll.patch" -d "${srcdir}/${_nv_open_pkg}"
patch -Np1 --no-backup-if-mismatch -i "${srcdir}/0007-6.12-replace-pageswapcache.patch" -d "${srcdir}/${_nv_open_pkg}"
fi
}

Expand Down

0 comments on commit 54b13ca

Please sign in to comment.