Package Details: nvidia-340xx-dkms 340.108-38

Git Clone URL: https://aur.archlinux.org/nvidia-340xx.git (read-only, click to copy)
Package Base: nvidia-340xx
Description: NVIDIA driver sources for linux, 340xx legacy branch
Upstream URL: https://www.nvidia.com/
Licenses: custom
Conflicts: nvidia, nvidia-340xx
Provides: nvidia-340xx
Submitter: simonsmh
Maintainer: JerryXiao
Last Packager: JerryXiao
Votes: 72
Popularity: 0.83
First Submitted: 2019-06-07 10:29 (UTC)
Last Updated: 2025-05-15 00:39 (UTC)

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

Latest Comments

1 2 3 4 5 6 .. 62 Next › Last »

aitzkora commented on 2025-06-11 17:08 (UTC) (edited on 2025-06-11 17:09 (UTC) by aitzkora)

Hi,
this is the first time, I did not manage to compile that package. Sadly my quadro fx 37000 is a little bit old

   cc -Wp,-MMD,./.nv.o.d -nostdinc -I/usr/lib/modules/6.15.1-arch1-2/build/arch/x86/include -I/usr/lib/modules/6.15.1-arch1-2/build/arch/x86/include/generated -I/usr/lib/modules/6.15.1-arch1-2/build/include -I/usr/lib/modules/6.15.1-arch1-2/build/include -I/usr/lib/modules/6.15.1-arch1-2/build/arch/x86/include/uapi -I/usr/lib/modules/6.15.1-arch1-2/build/arch/x86/include/generated/uapi -I/usr/lib/modules/6.15.1-arch1-2/build/include/uapi -I/usr/lib/modules/6.15.1-arch1-2/build/include/generated/uapi -include /usr/lib/modules/6.15.1-arch1-2/build/include/linux/compiler-version.h -include /usr/lib/modules/6.15.1-arch1-2/build/include/linux/kconfig.h -include /usr/lib/modules/6.15.1-arch1-2/build/include/linux/compiler_types.h -D__KERNEL__ -std=gnu11 -fshort-wchar -funsigned-char -fno-common -fno-PIE -fno-strict-aliasing -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -mno-avx -fcf-protection=branch -fno-jump-tables -m64 -falign-jumps=1 -falign-loops=1 -mno-80387 -mno-fp-ret-in-387 -mpreferred-stack-boundary=3 -mskip-rax-setup -march=x86-64 -mtune=generic -mno-red-zone -mcmodel=kernel -mstack-protector-guard-reg=gs -mstack-protector-guard-symbol=__ref_stack_chk_guard -Wno-sign-compare -fno-asynchronous-unwind-tables -mindirect-branch=thunk-extern -mindirect-branch-register -mindirect-branch-cs-prefix -mfunction-return=thunk-extern -fno-jump-tables -mharden-sls=all -fpatchable-function-entry=16,16 -fno-delete-null-pointer-checks -O2 -fno-allow-store-data-races -fstack-protector-strong -ftrivial-auto-var-init=zero -fzero-init-padding-bits=all -fno-stack-clash-protection -pg -mrecord-mcount -mfentry -DCC_USING_FENTRY -fmin-function-alignment=16 -fstrict-flex-arrays=3 -fno-strict-overflow -fno-stack-check -fconserve-stack -fno-builtin-wcslen -Wall -Wextra -Wundef -Werror=implicit-function-declaration -Werror=implicit-int -Werror=return-type -Werror=strict-prototypes -Wno-format-security -Wno-trigraphs -Wno-frame-address -Wno-address-of-packed-member -Wmissing-declarations -Wmissing-prototypes -Wframe-larger-than=2048 -Wno-main -Wno-dangling-pointer -Wvla -Wno-pointer-sign -Wcast-function-type -Wno-unterminated-string-initialization -Wno-array-bounds -Wno-stringop-overflow -Wno-alloc-size-larger-than -Wimplicit-fallthrough=5 -Werror=date-time -Werror=incompatible-pointer-types -Werror=designated-init -Wenum-conversion -Wunused -Wno-unused-but-set-variable -Wno-unused-const-variable -Wno-packed-not-aligned -Wno-format-overflow -Wno-format-truncation -Wno-stringop-truncation -Wno-override-init -Wno-missing-field-initializers -Wno-type-limits -Wno-shift-negative-value -Wno-maybe-uninitialized -Wno-sign-compare -Wno-unused-parameter -g -gdwarf-5  -DMODULE  -DKBUILD_BASENAME='"nv"' -DKBUILD_MODNAME='"nvidia"' -D__KBUILD_MODNAME=kmod_nvidia -c -o nv.o nv.c
    In file included from nv-linux.h:14,
             from nv.c:13:
  nv.h:15:10: fatal error: nvtypes.h: No such file or directory
     15 | #include <nvtypes.h>
        |          ^~~~~~~~~~~
  compilation terminated.
  make[4]: *** [/usr/lib/modules/6.15.1-arch1-2/build/scripts/Makefile.build:203: nv.o] Error 1
  make[3]: *** [/usr/lib/modules/6.15.1-arch1-2/build/Makefile:2003: .] Error 2
  make[2]: *** [/usr/lib/modules/6.15.1-arch1-2/build/Makefile:248: __sub-make] Error 2
  make[2]: Leaving directory '/home/fux/sources/build_packages/nvidia-340xx/src/NVIDIA-Linux-x86_64-340.108-no-compat32/kernel'
  make[1]: *** [Makefile:248: __sub-make] Error 2
  make[1]: Leaving directory '/usr/lib/modules/6.15.1-arch1-2/build'
  NVIDIA: left KBUILD.

TheExplorer commented on 2025-05-22 08:25 (UTC)

@Anakiev No, I'm staying with the 5.15 and 6.6 LTS kernels on my machines at the moment and I'm happy. Do not plan to move right now. But thank you for your efforts. The community needs you.

Linus Torvalds is the creator and the developer of the Linux Kernel

Nice one :) You made my day.

Cheers!

Anakiev commented on 2025-05-22 07:33 (UTC) (edited on 2025-05-22 15:09 (UTC) by Anakiev)

@TheExplorer Did you try it? I use the DRM enabled driver the last 6 days without any problems. FYI the patch I've added already exists in the nvidia-390xx version here and here. The drm_legacy.h is directly downloaded from the Linus Torvalds's GitHub page. Linus Torvalds is the creator and the developer of the Linux Kernel. So there is nothing to be scared of.

TheExplorer commented on 2025-05-16 16:03 (UTC)

@Anakiev I can see that the 0006-kernel-5.14.patch in your repo still has +#include <drm/drm_legacy.h> and not +#include /drm_legacy.h

TheExplorer commented on 2025-05-16 15:59 (UTC)

@Anakiev What does the line date = "20150116"do to the code and why it should be removed?

TheExplorer commented on 2025-05-16 09:41 (UTC)

@Anakievs Thank you for your efforts. I think I'll stay with a working kernel and driver, that's just too much for me :) Though I've saved your guide for the future. Thanks again!

Anakiev commented on 2025-05-16 07:55 (UTC) (edited on 2025-05-23 14:39 (UTC) by Anakiev)

UPDATE: I've put all changes from below in this git repository - https://codeberg.org/Anakiev/nvidia-340xx-drm.git

The steps bellow are for some rare cases where the driver doesn't load with DRM disabled (or if for some reason you want to enable DRM).

I've successfully compiled the driver with DRM enabled:

  • Download drm_legacy.h from here to a fixed location like /drm_legacy.h
  • Delete 0016-kernel-6.8.patch
  • Modify +#include <drm/drm_legacy.h> in 0006-kernel-5.14.patch to the fixed location +#include "/drm_legacy.h"
  • Create a new .patch file
--- a/kernel/nv-drm.c   2025-05-16 23:20:39.336830599 +0300
+++ b/kernel/nv-drm.c   2025-05-16 23:22:14.651702661 +0300
@@ -450,6 +450,11 @@
     .poll = drm_poll,
     .read = drm_read,
     .llseek = noop_llseek,
+    
+#if defined(FOP_UNSIGNED_OFFSET)
+    // Fix a kernel warning after linux 6.12 (https://github.com/Binary-Eater/open-gpu-kernel-modules/commit/8ac26d3c66ea88b0f80504bdd1e907658b41609d.patch)
+    .fop_flags   = FOP_UNSIGNED_OFFSET,
+#endif
 };

 #if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 11, 0)
@@ -532,7 +532,10 @@

     .name = "nvidia-drm",
     .desc = "NVIDIA DRM driver",
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 14, 0)
+    // Rel. commit. "drm: remove driver date from struct drm_driver and all drivers" (Jani Nikula, 4 Dec 2024)
     .date = "20150116",
+#endif
     .major = 0,
     .minor = 0,
     .patchlevel = 0,
  • Fix the PKGBUILD

papakilo commented on 2025-05-15 16:34 (UTC) (edited on 2025-05-15 22:25 (UTC) by papakilo)

Good morning everyone.

I tried every possible installation and configuration with the following results:

  • nvidia-340xx-dkms 340.108-38: driver requires the installation of obsolete headers even though updated headers are already installed. Apparently it seems to work but there are artifacts, black outlines or windows without content so I had to disable the KDE plasma compositor with X11 losing functionality and graphic effects.

  • nvidia-340xx 340.108-38: same as above without the request for extra linux-headers.

  • Wayland at first glance seems to work fine until you try to move the mouse over the icons in the menu or the system tray: everything slows down and the mouse moves stutteringly.