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: 73
Popularity: 1.04
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

« First ‹ Previous 1 2 3 4 5 6 7 8 .. 63 Next › Last »

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.

TheExplorer commented on 2025-05-15 16:19 (UTC) (edited on 2025-05-15 16:19 (UTC) by TheExplorer)

@Anakievs

you were the reason I've made those instructions

Actually not but it doesn't matter.

Then the people said bad things about me

Haven't noticed. I feel sorry for you. People can be bad or just idiots.

recover drm_legacy.h from latest lts kernel

Thanks, will try it when I have some spare time!

TheExplorer commented on 2025-05-15 13:13 (UTC) (edited on 2025-05-15 13:14 (UTC) by TheExplorer)

@Anakievs

I've found the problem: it is 0015-kernel-6.8.patch which disables DRM:

         drm_available)
+            return
             #
             # Determine if the DRM subsystem is usable
             #

Probably this is a specific case for exactly my video card (9500 GT). And yes, I don't have any blacklisted stuff and nvidia-xconfig has nothing to do here. I clearly remember that it stopped working for me exactly at 6.7.9 -> 6.8.x kernel version change and a patch for DRM.

The only thing left to do was to identify the culprit. And here we are. As I've already said this before, stuff would break eventually for people like us (now me). The way out is to stay with the 6.7.9 kernel.

I'm just too tired already testing things, installing/uninstalling kernels and recompiling the driver, so I won't test this against newer kernels for now (without the culprit 0015-kernel-6.8.patch in order to see if this DRM stuff works at all for my card).

You can scroll back the comments to see it yourself, somewhere on page 6 and earlier.

Anakiev commented on 2025-05-14 19:05 (UTC) (edited on 2025-05-15 14:44 (UTC) by Anakiev)

@TheExplorer Here are my final thoughts about the no screens found(EE) problem.
In addition to /etc/X11/xorg.conf you might have multiple config files which conflict (located in /etc/X11/xorg.conf.d/).
I also use the linux-lts kernel but the driver doesn't compile (makepkg fails) if I don't have the linux kernel. So I have both but use the lts one. Without modifying the PKGBUILD.
You might have some kernel parameters or files like /usr/lib/modprobe.d/nvidia-340xx-dkms.conf which blacklist something.
Some people say nvidia-xconfig fixed this issue.
If you have the nouveau driver installed (not sure about this one at all).

If nothing helps I would recommend fresh OS install. This issue was discussed here but without much success (read about the NVIDIA Optimus configuration if this is your case):
https://gist.github.com/Anakiev2/b828ed2972c04359d52a44e9e5cf2c63

Edit: Looking closely your problem is actually different (EE) NVIDIA: Failed to initialize the NVIDIA kernel module..

TheExplorer commented on 2025-05-14 17:28 (UTC)

I give up, guys :( The driver compiles OK and I do everything that is needed, including xorg.conf etc. but I still get this:

[  3971.767] (EE) NVIDIA: Failed to initialize the NVIDIA kernel module. Please see the
[  3971.767] (EE) NVIDIA:     system's kernel log for additional error messages and
[  3971.767] (EE) NVIDIA:     consult the NVIDIA README for details.
[  3971.767] (EE) No devices detected.
[  3971.767] (EE) 
Fatal server error:
[  3971.767] (EE) no screens found(EE) 
[  3971.767] (EE) 
Please consult the The X.Org Foundation support 
     at http://wiki.x.org
 for help. 
[  3971.767] (EE) Please also check the log file at "/var/log/Xorg.0.log" for additional information.
[  3971.767] (EE) 
[  3971.776] (EE) Server terminated with error (1). Closing log file.

It started happening to me after Arch switched LTS kernels from 6.6.72 to 6.12.x

P.S. I'm running linux-lts only kernel and changed the PKGBUILD accordingly.

Anakiev commented on 2025-05-14 16:45 (UTC) (edited on 2025-05-14 16:50 (UTC) by Anakiev)

I've figured out the "problem" with nvidia-settings. It was recently removed by @D3vil0p3r from the nvidia-340xx-utils package.
https://aur.archlinux.org/cgit/aur.git/commit/?h=nvidia-340xx-utils&id=297ada356e92ee99fa6566a3a59d3bcb36f5fd2a
In favor of https://aur.archlinux.org/packages/nvidia-340xx-settings

Unix-Like commented on 2025-05-14 14:32 (UTC) (edited on 2025-05-14 14:34 (UTC) by Unix-Like)

@Anakievs, it is done (https://github.com/archlinux-jerry/nvidia-340xx/pull/13).

Anakiev commented on 2025-05-14 13:37 (UTC)

@Unix-Like A pull request is good idea to notify @JerryXiao to update the aur package.