Patch for kernel 5.17 https://pastebin.com/QqKwAbSy
Search Criteria
Package Details: nvidia-340xx 340.108-37
Package Actions
Git Clone URL: | https://aur.archlinux.org/nvidia-340xx.git (read-only, click to copy) |
---|---|
Package Base: | nvidia-340xx |
Description: | NVIDIA drivers for linux, 340xx legacy branch |
Upstream URL: | https://www.nvidia.com/ |
Licenses: | custom |
Conflicts: | nvidia |
Submitter: | simonsmh |
Maintainer: | JerryXiao |
Last Packager: | JerryXiao |
Votes: | 72 |
Popularity: | 0.68 |
First Submitted: | 2019-06-07 10:29 (UTC) |
Last Updated: | 2024-05-10 16:52 (UTC) |
Dependencies (6)
- libgl (nvidia-340xx-utilsAUR, libglvnd-gitAUR, amdgpu-pro-oglpAUR, amdgpu-pro-oglp-legacyAUR, libglvnd)
- linux
- nvidia-340xx-utilsAUR
- linux (make)
- linux-headers (make)
- nvidia-340xx-utilsAUR (make)
Required by (5)
- bumblebee-forceunload (optional)
- bumblebee-git (optional)
- bumblebee-picasso-git (optional)
- nvfancontrol (optional)
- nvfancontrol-git (optional)
Sources (19)
- 0001-kernel-5.7.patch
- 0002-kernel-5.8.patch
- 0003-kernel-5.9.patch
- 0004-kernel-5.10.patch
- 0005-kernel-5.11.patch
- 0006-kernel-5.14.patch
- 0007-kernel-5.15.patch
- 0008-kernel-5.16.patch
- 0009-kernel-5.17.patch
- 0010-kernel-5.18.patch
- 0011-kernel-6.0.patch
- 0012-kernel-6.2.patch
- 0013-kernel-6.3.patch
- 0014-kernel-6.5.patch
- 0015-kernel-6.6.patch
- 0016-kernel-6.8.patch
- 0017-gcc-14.patch
- 20-nvidia.conf
- https://us.download.nvidia.com/XFree86/Linux-x86_64/340.108/NVIDIA-Linux-x86_64-340.108-no-compat32.run
Latest Comments
« First ‹ Previous 1 .. 12 13 14 15 16 17 18 19 20 21 22 .. 58 Next › Last »
Viterzgir commented on 2022-03-30 12:17 (UTC)
lmh69 commented on 2022-03-30 06:05 (UTC) (edited on 2022-04-01 13:18 (UTC) by lmh69)
i'm using since yesterday the following patch for kernel 5.17 (Tentative fix for NVIDIA 470.94 driver for Linux 5.17-rc1): https://gist.github.com/joanbm/6c7b027b9436bf31ce979927e544e9d5
That I adapted to nvidia-340xx and linux-zen:
0009-kernel-5.17.patch:
--- a/kernel/nv-linux.h 2022-03-23 13:48:06.185784509 +0000
+++ b/kernel/nv-linux.h 2022-03-29 13:30:58.733584062 +0000
@@ -12,6 +12,7 @@
#define _NV_LINUX_H_
#include "nv.h"
+#include <linux/version.h>
#include "conftest.h"
#if !defined(NV_VMWARE)
@@ -2053,6 +2054,8 @@
#if defined(NV_PDE_DATA_PRESENT)
# define NV_PDE_DATA(inode) PDE_DATA(inode)
+#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 17, 0))
+# define NV_PDE_DATA(inode) pde_data(inode)
#else
# define NV_PDE_DATA(inode) PDE(inode)->data
#endif
PKGBUILD for linux-zen:
# Maintainer: graysky <graysky AT archlinux DOT us>
# Maintainer: Jerry Xiao <aur@mail.jerryxiao.cc>
# Contributor: Giancarlo Razzolini <grazzolini@archlinux.org>
# Contributor: Eric Bélanger <eric@archlinux.org>
pkgbase=nvidia-340xx-zen
pkgname=(nvidia-340xx-zen);
pkgver=340.108
pkgrel=28
pkgdesc="NVIDIA drivers for linux-zen, 340xx legacy branch"
arch=('x86_64')
url="https://www.nvidia.com/"
makedepends=("nvidia-340xx-utils=${pkgver}" 'linux-zen>=5.5' 'linux-zen-headers>=5.5')
conflicts=('nvidia')
license=('custom')
options=(!strip)
# https://github.com/warpme/minimyth2/tree/master/script/nvidia/nvidia-340.108/files
source=("https://us.download.nvidia.com/XFree86/Linux-x86_64/${pkgver}/NVIDIA-Linux-x86_64-${pkgver}-no-compat32.run"
20-nvidia.conf
0001-kernel-5.7.patch
0002-kernel-5.8.patch
0003-kernel-5.9.patch
0004-kernel-5.10.patch
0005-kernel-5.11.patch
0006-kernel-5.14.patch
0007-kernel-5.15.patch
0008-kernel-5.16.patch
0009-kernel-5.17.patch
)
b2sums=('6538bbec53b10f8d20977f9b462052625742e9709ef06e24cf2e55de5d0c55f1620a4bb21396cfd89ebc54c32f921ea17e3e47eaa95abcbc24ecbd144fb89028'
'49d99f612e8eee3ab5e34083c25348bfd14ed5fc8a7984dafc0dad7c0ae0df2c0b2a63a1bb993da440eb0a60293d7c753ca3889bd2f51991b8ddc51bce2fe4a8'
'7150233df867a55f57aa5e798b9c7618329d98459fecc35c4acfad2e9772236cb229703c4fa072381c509279d0588173d65f46297231f4d3bfc65a1ef52e65b1'
'b436095b89d6e294995651a3680ff18b5af5e91582c3f1ec9b7b63be9282497f54f9bf9be3997a5af30eec9b8548f25ec5235d969ac00a667a9cddece63d8896'
'947cb1f149b2db9c3c4f973f285d389790f73fc8c8a6865fc5b78d6a782f49513aa565de5c82a81c07515f1164e0e222d26c8212a14cf016e387bcc523e3fcb1'
'665bf0e1fa22119592e7c75ff40f265e919955f228a3e3e3ebd76e9dffa5226bece5eb032922eb2c009572b31b28e80cd89656f5d0a4ad592277edd98967e68f'
'344cd3a9888a9a61941906c198d3a480ce230119c96c72c72a74b711d23face2a7b1e53b9b4639465809b84762cdc53f38210e740318866705241bc4216e4f35'
'31a4047ab84d13e32fd7fdbf9f69c696d3fab6666c541d2acf0a189c1d17c876970985167fd389a4adc0f786021172bdec1aa6d690736e3cf9fcd8ceabe5fd32'
'b3b7bbd597252b25ccb68f431f83707a10d464996f6c74bb67143795df96054da719faf09c1ad2e1c215261356833ad3fa0d9e60552151f827f9d7be7ae44605'
'caedc5651bfd14c02fb677f9c5e87adef298d871c6281b78ce184108310e4243ded82210873014be7fedee0dd6251305fa9bbce0c872b76438e0895ef76109d9'
'19e41d3d33cf838f30eb085d9d991a55a6dd06fb5435aa3f52740517fc567883eec6446857cde8545be1eca3fac04ddad55bbfd4c9c7449ae37c15c828d9823d')
_pkg="NVIDIA-Linux-x86_64-${pkgver}-no-compat32"
# default is 'linux' substitute custom name here
_kernelname=linux-zen
_kernver="$(</usr/src/$_kernelname/version)"
_extradir="/usr/lib/modules/$_kernver/extramodules"
prepare() {
sh "${_pkg}.run" --extract-only
cd "${_pkg}"
local src
for src in "${source[@]}"; do
src="${src%%::*}"
src="${src##*/}"
[[ $src = 0*.patch ]] || continue
echo "Applying patch $src..."
patch -Np1 < "../$src"
done
cp -a kernel kernel-dkms
}
build() {
[ -n "$NVIDIA_340XX_DKMS_ONLY" ] && return 0
cd "${_pkg}/kernel"
make SYSSRC="/usr/src/$_kernelname" module
cd uvm
make SYSSRC="/usr/src/$_kernelname" module
}
package_nvidia-340xx-zen() {
pkgdesc="NVIDIA drivers for linux-zen, 340xx legacy branch"
depends=('linux-zen>=5.3.6' "nvidia-340xx-utils=$pkgver" 'libgl')
install=nvidia-340xx-zen.install
install -Dt "${pkgdir}${_extradir}" -m644 \
"${srcdir}/${_pkg}/kernel"/{nvidia,uvm/nvidia-uvm}.ko
find "${pkgdir}" -name '*.ko' -exec gzip -n {} +
echo "blacklist nouveau" |
install -Dm644 /dev/stdin "${pkgdir}/usr/lib/modprobe.d/nvidia-340xx-zen.conf"
install -Dm644 "$srcdir/20-nvidia.conf" "$pkgdir/usr/share/nvidia-340xx-zen/20-nvidia.conf"
}
# vim:set ts=2 sw=2 et:
Regards.
PS: I have to say that i didn't try the module compilation without the patch... I don't know if is strictly necessary or not...
calvinh commented on 2022-03-29 20:01 (UTC)
Need a patch for 5.17 kernel.
mauzil commented on 2022-02-18 17:48 (UTC) (edited on 2022-02-20 08:39 (UTC) by mauzil)
[Solved with kernel 5.16.10-artix1-1]
Hi all. In Artix with latest update I get this error
warning: the compiler differs from the one used to build the kernel
The kernel was built by: gcc (GCC) 11.2.0
You are using: cc (GCC) 11.2.0
make -f ./scripts/Makefile.build obj=/home/mauro/Scaricati/Artix/nvidia-340xx/src/NVIDIA-Linux-x86_64-340.108-no-compat32/kernel \
single-build= \
need-builtin=1 need-modorder=1
cc -Wp,-MMD,/home/mauro/Scaricati/Artix/nvidia-340xx/src/NVIDIA-Linux-x86_64-340.108-no-compat32/kernel/.nv.o.d -nostdinc -I./arch/x86/include -I./arch/x86/include/generated -I./include -I./arch/x86/include/uapi -I./arch/x86/include/generated/uapi -I./include/uapi -I./include/generated/uapi -include ./include/linux/compiler-version.h -include ./include/linux/kconfig.h -include ./include/linux/compiler_types.h -D__KERNEL__ -fmacro-prefix-map=./= -Wall -Wundef -Werror=strict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -fshort-wchar -fno-PIE -Werror=implicit-function-declaration -Werror=implicit-int -Werror=return-type -Wno-format-security -std=gnu89 -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -mno-avx -fcf-protection=none -m64 -falign-jumps=1 -falign-loops=1 -mno-80387 -mno-fp-ret-in-387 -mpreferred-stack-boundary=3 -mskip-rax-setup -mtune=generic -mno-red-zone -mcmodel=kernel -Wno-sign-compare -fno-asynchronous-unwind-tables -mindirect-branch=thunk-extern -mindirect-branch-register -fno-jump-tables -fno-delete-null-pointer-checks -Wno-frame-address -Wno-format-truncation -Wno-format-overflow -Wno-address-of-packed-member -O2 -fno-allow-store-data-races -Wframe-larger-than=2048 -fstack-protector-strong -Wimplicit-fallthrough=5 -Wno-main -Wno-unused-but-set-variable -Wno-unused-const-variable -fno-stack-clash-protection -pg -mrecord-mcount -mfentry -DCC_USING_FENTRY -Wdeclaration-after-statement -Wvla -Wno-pointer-sign -Wno-stringop-truncation -Wno-zero-length-bounds -Wno-array-bounds -Wno-stringop-overflow -Wno-restrict -Wno-maybe-uninitialized -Wno-alloc-size-larger-than -fno-strict-overflow -fno-stack-check -fconserve-stack -Werror=date-time -Werror=incompatible-pointer-types -Werror=designated-init -Wno-packed-not-aligned -g -gdwarf-4 -fplugin=./scripts/gcc-plugins/structleak_plugin.so -fplugin-arg-structleak_plugin-byref-all -DSTRUCTLEAK_PLUGIN -DNV_MODULE_INSTANCE=0 -DNV_BUILD_MODULE_INSTANCES=0 -UDEBUG -U_DEBUG -DNDEBUG -I/home/mauro/Scaricati/Artix/nvidia-340xx/src/NVIDIA-Linux-x86_64-340.108-no-compat32/kernel -Wall -MD -Wsign-compare -Wno-cast-qual -Wno-error -D__KERNEL__ -DMODULE -DNVRM -DNV_VERSION_STRING=\"340.108\" -Wno-unused-function -Wuninitialized -fno-strict-aliasing -mno-red-zone -mcmodel=kernel -DNV_UVM_ENABLE -D__linux__ -DNV_DEV_NAME=\"nvidia\" -DMODULE -DKBUILD_BASENAME='"nv"' -DKBUILD_MODNAME='"nvidia"' -D__KBUILD_MODNAME=kmod_nvidia -c -o /home/mauro/Scaricati/Artix/nvidia-340xx/src/NVIDIA-Linux-x86_64-340.108-no-compat32/kernel/nv.o /home/mauro/Scaricati/Artix/nvidia-340xx/src/NVIDIA-Linux-x86_64-340.108-no-compat32/kernel/nv.c ; ./tools/objtool/objtool orc generate --module --no-fp --retpoline --uaccess /home/mauro/Scaricati/Artix/nvidia-340xx/src/NVIDIA-Linux-x86_64-340.108-no-compat32/kernel/nv.o
cc1: error: incompatible gcc/plugin versions
cc1: error: failed to initialize plugin ./scripts/gcc-plugins/structleak_plugin.so
make[2]: *** [scripts/Makefile.build:287: /home/mauro/Scaricati/Artix/nvidia-340xx/src/NVIDIA-Linux-x86_64-340.108-no-compat32/kernel/nv.o] Errore 1
make[1]: *** [Makefile:1846: /home/mauro/Scaricati/Artix/nvidia-340xx/src/NVIDIA-Linux-x86_64-340.108-no-compat32/kernel] Errore 2
make[1]: uscita dalla directory «/usr/lib/modules/5.16.8-artix1-2/build»
NVIDIA: left KBUILD.
nvidia.ko failed to build!
make: *** [Makefile:202: nvidia.ko] Errore 1
DAC324 commented on 2022-02-18 08:22 (UTC) (edited on 2022-02-18 09:53 (UTC) by DAC324)
@norambna:
Manjaro is different from Arch (as you already have encountered).
For Manjaro, use this PKGBUILD
(you will have to edit the _linuxprefix
and _extramodules
variables to match the kernel version you are using):
# Based on the Arch file by:
# Maintainer: graysky <graysky AT archlinux DOT us>
# Maintainer: Jerry Xiao <aur@mail.jerryxiao.cc>
# Contributor: Giancarlo Razzolini <grazzolini@archlinux.org>
# Contributor: Eric Bélanger <eric@archlinux.org>
# Maintainer: Philip Müller <philm@manjaro.org>
# Maintainer: Roland Singer <roland@manjaro.org>
_linuxprefix=linux516
_extramodules=extramodules-5.16-MANJARO
pkgname=(nvidia-340xx-dkms)
_pkgname=nvidia
pkgver=340.108
pkgrel=29
provides=("$_pkgname=$pkgver")
groups=("$_linuxprefix-extramodules")
pkgdesc="NVIDIA drivers for linux, 340xx legacy branch"
arch=('i686' 'x86_64')
url="http://www.nvidia.com/"
depends=(
"$_linuxprefix"
"nvidia-340xx-utils=${pkgver}"
)
makedepends=("$_linuxprefix-headers")
conflicts=('nvidia-96xx' 'nvidia-183xx' "$_linuxprefix-nvidia" "$_linuxprefix-nvidia-304xx")
license=('custom')
options=(!strip)
# https://github.com/warpme/minimyth2/tree/master/script/nvidia/nvidia-340.108/files
source=("https://us.download.nvidia.com/XFree86/Linux-x86_64/${pkgver}/NVIDIA-Linux-x86_64-${pkgver}-no-compat32.run"
20-nvidia.conf
0001-kernel-5.7.patch
0002-kernel-5.8.patch
0003-kernel-5.9.patch
0004-kernel-5.10.patch
0005-kernel-5.11.patch
0006-kernel-5.14.patch
0007-kernel-5.15.patch
0008-kernel-5.16.patch
)
b2sums=('6538bbec53b10f8d20977f9b462052625742e9709ef06e24cf2e55de5d0c55f1620a4bb21396cfd89ebc54c32f921ea17e3e47eaa95abcbc24ecbd144fb89028'
'49d99f612e8eee3ab5e34083c25348bfd14ed5fc8a7984dafc0dad7c0ae0df2c0b2a63a1bb993da440eb0a60293d7c753ca3889bd2f51991b8ddc51bce2fe4a8'
'7150233df867a55f57aa5e798b9c7618329d98459fecc35c4acfad2e9772236cb229703c4fa072381c509279d0588173d65f46297231f4d3bfc65a1ef52e65b1'
'b436095b89d6e294995651a3680ff18b5af5e91582c3f1ec9b7b63be9282497f54f9bf9be3997a5af30eec9b8548f25ec5235d969ac00a667a9cddece63d8896'
'947cb1f149b2db9c3c4f973f285d389790f73fc8c8a6865fc5b78d6a782f49513aa565de5c82a81c07515f1164e0e222d26c8212a14cf016e387bcc523e3fcb1'
'665bf0e1fa22119592e7c75ff40f265e919955f228a3e3e3ebd76e9dffa5226bece5eb032922eb2c009572b31b28e80cd89656f5d0a4ad592277edd98967e68f'
'344cd3a9888a9a61941906c198d3a480ce230119c96c72c72a74b711d23face2a7b1e53b9b4639465809b84762cdc53f38210e740318866705241bc4216e4f35'
'31a4047ab84d13e32fd7fdbf9f69c696d3fab6666c541d2acf0a189c1d17c876970985167fd389a4adc0f786021172bdec1aa6d690736e3cf9fcd8ceabe5fd32'
'b3b7bbd597252b25ccb68f431f83707a10d464996f6c74bb67143795df96054da719faf09c1ad2e1c215261356833ad3fa0d9e60552151f827f9d7be7ae44605'
'caedc5651bfd14c02fb677f9c5e87adef298d871c6281b78ce184108310e4243ded82210873014be7fedee0dd6251305fa9bbce0c872b76438e0895ef76109d9')
_pkg="NVIDIA-Linux-x86_64-${pkgver}-no-compat32"
[[ "$CARCH" = "i686" ]] && _pkg="NVIDIA-Linux-x86-${pkgver}"
[[ "$CARCH" = "x86_64" ]] && _pkg="NVIDIA-Linux-x86_64-${pkgver}-no-compat32"
prepare() {
# Remove previous builds
[ -d "$_pkg" ] && rm -rf "$_pkg"
sh "${_pkg}.run" --extract-only
cd "${_pkg}"
# patches here
local src
for src in "${source[@]}"; do
src="${src%%::*}"
src="${src##*/}"
[[ $src = 0*.patch ]] || continue
echo "Applying patch $src..."
patch -Np1 < "../$src"
done
cd kernel
sed -i "s/__VERSION_STRING/${pkgver}/" dkms.conf
sed -i 's/__JOBS/`nproc`/' dkms.conf
sed -i 's/__DKMS_MODULES//' dkms.conf
sed -i '$iBUILT_MODULE_NAME[0]="nvidia"\
DEST_MODULE_LOCATION[0]="/kernel/drivers/video"\
BUILT_MODULE_NAME[1]="nvidia-uvm"\
DEST_MODULE_LOCATION[1]="/kernel/drivers/video"\
BUILT_MODULE_NAME[2]="nvidia-modeset"\
DEST_MODULE_LOCATION[2]="/kernel/drivers/video"\
BUILT_MODULE_NAME[3]="nvidia-drm"\
DEST_MODULE_LOCATION[3]="/kernel/drivers/video"' dkms.conf
# Gift for linux-rt guys
sed -i 's/NV_EXCLUDE_BUILD_MODULES/IGNORE_PREEMPT_RT_PRESENCE=1 NV_EXCLUDE_BUILD_MODULES/' dkms.conf
cd ..
cp -a kernel kernel-dkms
}
build() {
_kernver="$(cat /usr/lib/modules/${_extramodules}/version)"
cd "${_pkg}"/kernel
make SYSSRC=/usr/lib/modules/"${_kernver}/build" module
cd uvm
make SYSSRC=/usr/lib/modules/"${_kernver}/build" module
}
package_nvidia-340xx-dkms() {
pkgdesc="NVIDIA driver sources for linux, 340xx legacy branch"
depends=('dkms' "nvidia-340xx-utils=$pkgver" 'libgl')
optdepends=('linux-headers: Build the module for Manjaro kernel')
provides=("nvidia-340xx=$pkgver")
conflicts+=('nvidia-340xx')
install=nvidia-340xx.install
cd "${_pkg}"
install -dm 755 "${pkgdir}"/usr/src
cp -dr --no-preserve='ownership' kernel-dkms "${pkgdir}/usr/src/nvidia-${pkgver}"
echo "blacklist nouveau" |
install -Dm644 /dev/stdin "${pkgdir}/usr/lib/modprobe.d/${pkgname}.conf"
install -Dm644 "$srcdir/20-nvidia.conf" "$pkgdir/usr/share/nvidia-340xx/20-nvidia.conf"
}
# vim:set ts=2 sw=2 et:
norambna commented on 2022-02-17 13:42 (UTC) (edited on 2022-02-17 15:02 (UTC) by norambna)
I'm running a fresh install of Manjaro KDE, Kernel 5.10, Plasma 5.23.5 on a late 2008 Macbook that comes with a GeForce 9400M. When trying to install this package it stops with this error:
==> Starting build()...
NVIDIA: calling KBUILD...
make[1]: *** /usr/src/linux: No such file or directory. Stop.
NVIDIA: left KBUILD.
nvidia.ko failed to build!
make: *** [Makefile:202: nvidia.ko] Error 1
==> ERROR: A failure occurred in build().
Aborting...
Any hints how to solve this? Thanks in advance.
edit: It seems this comment has the solution to this problem!
pissbrain commented on 2022-02-16 03:04 (UTC)
Can confirm, you do need to reinstall the drivers after the recent gcc update
airgap97 commented on 2022-02-15 21:16 (UTC) (edited on 2022-02-16 00:31 (UTC) by airgap97)
it does not work after update [gcc] [toolchain]
upd : you need to reinstall all the drivers (nvidia-utils, opencl-nvidia), so they pick up the new version of gcc.
bigjuck commented on 2022-01-15 11:28 (UTC)
Thanks to all keeping the package working with new kernels
Pinned Comments
JerryXiao commented on 2022-10-13 03:51 (UTC) (edited on 2022-10-14 02:44 (UTC) by JerryXiao)
For testing users, contributors: check out https://github.com/archlinux-jerry/nvidia-340xx
Warning: force push may happen to match the aur tree