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: 0.82
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 .. 61 Next › Last »

papakilo commented on 2025-05-15 16:34 (UTC) (edited on 2025-05-15 18:36 (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 they seem 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!

Anakievs commented on 2025-05-15 14:43 (UTC) (edited on 2025-05-15 14:49 (UTC) by Anakievs)

I've completely forgotten about this one but you can easily recover the drm by restoring drm_legacy.h from the lts kernel. If you scroll back months or even an year you will find my instructions.
If I remember correctly (without verifying) you were the reason I've made those instructions. Then the people said bad things about me...
Remove the patch 0015-kernel-6.8.patch and recover drm_legacy.h from latest lts kernel with this file.

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.

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

@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.

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

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).

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

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

Unix-Like commented on 2025-05-14 13:01 (UTC) (edited on 2025-05-14 14:45 (UTC) by Unix-Like)

Thank you @Anakievs for this patch. -std=gnu17 may keep this package compile for a while. Thanks.

For me, I have clone the Github repo and I have updated there this package to compile with your patch (add 0018-gcc-15.patch) and it works fine (nvidia-340xx-340.108-38) with gcc-15 now.

If anyone needs it, https://github.com/MichelBoucey/nvidia-340xx.

If you want, @Anakievs, I can submit a PR to @JerryXiao.