Package Details: nvidia-340xx 340.108-37

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.72
First Submitted: 2019-06-07 10:29 (UTC)
Last Updated: 2024-05-10 16:52 (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 .. 20 21 22 23 24 25 26 27 28 29 30 .. 58 Next › Last »

AlexJ commented on 2021-06-08 15:56 (UTC)

@JerryXiao I have tried a LOT of things and I have found a solution for the Manjaro. I was not able to try "NVIDIA_340XX_DKMS_ONLY=1 makepkg or, probably NVIDIA_340XX_DKMS_ONLY=1 pamac" because I just saw that.

The first error: "Building nvidia-340xx... /var/tmp/pamac-build-alex/nvidia-340xx/PKGBUILD: line 37: /usr/src/linux/version: No such file or directory"

Fix that I've found: You have to copy the output of "$ uname -r" inside a file "version" inside /usr/src/linux/ (I've created it with "$sudo touch version", selected with a mouse, copy and the opened the file with "$ sudo vi /usr/src/linux/version" and "i", paste", ":wq!")

The second error: "NVIDIA: calling KBUILD... make[1]: *** /usr/src/linux: No such file or directory. Stop."

Fix that I've found: "$ sudo ln -s /usr/lib/modules/X.X.XX-X-MANJARO/build/ /usr/src/linux" (X.X.XX-X must be replaced with the version from the output of the "$ uname -r" in my case it was "$ sudo ln -s /usr/lib/modules/5.10.41-1-MANJARO/build/ /usr/src/linux"

After that the installation works.

There is something new that showed that I am not sure if it is an error:

" ==> Starting build()... NVIDIA: calling KBUILD... make[1]: Entering directory '/usr/lib/modules/5.10.41-1-MANJARO/build' test -e include/generated/autoconf.h -a -e include/config/auto.conf || ( \ echo >&2; \ echo >&2 " ERROR: Kernel configuration is invalid."; \ echo >&2 " include/generated/autoconf.h or include/config/auto.conf are missing.";\ echo >&2 " Run 'make oldconfig && make prepare' on kernel src to fix it."; \ echo >&2 ; \ /bin/false) make -f ./scripts/Makefile.build obj=/var/tmp/pamac-build-alex/nvidia-340xx/src/NVIDIA-Linux-x86_64-340.108-no-compat32/kernel \

DNV_UVM_ENABLE -D__linux__ -DNV_DEV_NAME="nvidia-uvm" NVIDIA: calling KBUILD... make[1]: Entering directory '/usr/lib/modules/5.10.41-1-MANJARO/build' test -e include/generated/autoconf.h -a -e include/config/auto.conf || ( \ echo >&2; \ echo >&2 " ERROR: Kernel configuration is invalid."; \ echo >&2 " include/generated/autoconf.h or include/config/auto.conf are missing.";\ echo >&2 " Run 'make oldconfig && make prepare' on kernel src to fix it."; \ echo >&2 ; \ /bin/false) make -f ./scripts/Makefile.build obj=/var/tmp/pamac-build-alex/nvidia-340xx/src/NVIDIA-Linux-x86_64-340.108-no-compat32/kernel/uvm \ "

JerryXiao commented on 2021-06-06 02:32 (UTC) (edited on 2021-06-06 02:40 (UTC) by JerryXiao)

@AlexJ please run NVIDIA_340XX_DKMS_ONLY=1 makepkg or, probably NVIDIA_340XX_DKMS_ONLY=1 pamac

AlexJ commented on 2021-06-05 13:22 (UTC)

Hello. I have a problem installing this package on a Manjaro GNU/Linux distribution:

"
Preparing...
Cloning nvidia-340xx build files...
Checking nvidia-340xx-dkms dependencies...
Synchronizing package databases...
Resolving dependencies...
Checking inter-conflicts...

Building nvidia-340xx...
/var/tmp/pamac-build-alex/nvidia-340xx/PKGBUILD: line 37: /usr/src/linux/version: No such file or directory
==> Making package: nvidia-340xx 340.108-19 ( 5.06.2021 (сб) 10:47:33)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
  -> Downloading NVIDIA-Linux-x86_64-340.108-no-compat32.run...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  0 36.9M    0  224k    0     0   421k      0  0:01:29 --:--:--  0:01:29  421k
  3 36.9M    3 1328k    0     0   845k      0  0:00:44  0:00:01  0:00:43  844k
  8 36.9M    8 3104k    0     0  1226k      0  0:00:30  0:00:02  0:00:28 1226k
 11 36.9M   11 4464k    0     0  1264k      0  0:00:29  0:00:03  0:00:26 1264k
 15 36.9M   15 5984k    0     0  1319k      0  0:00:28  0:00:04  0:00:24 1319k
 19 36.9M   19 7296k    0     0  1316k      0  0:00:28  0:00:05  0:00:23 1411k
 22 36.9M   22 8656k    0     0  1325k      0  0:00:28  0:00:06  0:00:22 1477k
 26 36.9M   26  9.7M    0     0  1328k      0  0:00:28  0:00:07  0:00:21 1379k
 30 36.9M   30 11.1M    0     0  1332k      0  0:00:28  0:00:08  0:00:20 1380k
 34 36.9M   34 12.5M    0     0  1344k      0  0:00:28  0:00:09  0:00:19 1367k
 37 36.9M   37 13.7M    0     0  1337k      0  0:00:28  0:00:10  0:00:18 1360k
 41 36.9M   41 15.2M    0     0  1354k      0  0:00:27  0:00:11  0:00:16 1391k
 44 36.9M   44 16.5M    0     0  1350k      0  0:00:28  0:00:12  0:00:16 1385k
 48 36.9M   48 17.8M    0     0  1345k      0  0:00:28  0:00:13  0:00:15 1368k
 51 36.9M   51 19.0M    0     0  1336k      0  0:00:28  0:00:14  0:00:14 1322k
 54 36.9M   54 20.0M    0     0  1320k      0  0:00:28  0:00:15  0:00:13 1285k
 57 36.9M   57 21.3M    0     0  1323k      0  0:00:28  0:00:16  0:00:12 1253k
 61 36.9M   61 22.6M    0     0  1322k      0  0:00:28  0:00:17  0:00:11 1251k
 65 36.9M   65 24.3M    0     0  1344k      0  0:00:28  0:00:18  0:00:10 1341k
 70 36.9M   70 25.9M    0     0  1361k      0  0:00:27  0:00:19  0:00:08 1434k
 73 36.9M   73 27.2M    0     0  1359k      0  0:00:27  0:00:20  0:00:07 1480k
 77 36.9M   77 28.5M    0     0  1356k      0  0:00:27  0:00:21  0:00:06 1468k
 81 36.9M   81 29.9M    0     0  1358k      0  0:00:27  0:00:22  0:00:05 1485k
 85 36.9M   85 31.5M    0     0  1374k      0  0:00:27  0:00:23  0:00:04 1486k
 89 36.9M   89 32.9M    0     0  1375k      0  0:00:27  0:00:24  0:00:03 1430k
 92 36.9M   92 34.0M    0     0  1361k      0  0:00:27  0:00:25  0:00:02 1370k
 94 36.9M   94 34.8M    0     0  1345k      0  0:00:28  0:00:26  0:00:02 1296k
 96 36.9M   96 35.7M    0     0  1327k      0  0:00:28  0:00:27  0:00:01 1184k
 99 36.9M   99 36.8M    0     0  1319k      0  0:00:28  0:00:28 --:--:-- 1063k
100 36.9M  100 36.9M    0     0  1322k      0  0:00:28  0:00:28 --:--:-- 1002k
  -> Found 20-nvidia.conf
  -> Found 0001-kernel-5.7.patch
  -> Found 0002-kernel-5.8.patch
  -> Found 0003-kernel-5.9.patch
  -> Found 0004-kernel-5.10.patch
  -> Found 0005-kernel-5.11.patch
==> Validating source files with b2sums...
    NVIDIA-Linux-x86_64-340.108-no-compat32.run ... Passed
    20-nvidia.conf ... Passed
    0001-kernel-5.7.patch ... Passed
    0002-kernel-5.8.patch ... Passed
    0003-kernel-5.9.patch ... Passed
    0004-kernel-5.10.patch ... Passed
    0005-kernel-5.11.patch ... Passed
==> Removing existing $srcdir/ directory...
==> Extracting sources...
==> Starting prepare()...
Creating directory NVIDIA-Linux-x86_64-340.108-no-compat32
Verifying archive integrity... OK
Uncompressing NVIDIA Accelerated Graphics Driver for Linux-x86_64 340.108...........................................................................................................................................................................................................
Applying patch 0001-kernel-5.7.patch...
patching file kernel/Makefile
patching file kernel/conftest.sh
patching file kernel/dkms.conf
patching file kernel/nv-drm.c
patching file kernel/nv-linux.h
patching file kernel/nv-procfs.c
patching file kernel/nv-time.h
patching file kernel/nv.c
patching file kernel/os-interface.c
patching file kernel/uvm/Makefile
patching file kernel/uvm/conftest.sh
patching file kernel/uvm/nvidia_uvm_lite.c
Applying patch 0002-kernel-5.8.patch...
patching file kernel/nv-linux.h
patching file kernel/nvidia-modules-common.mk
patching file kernel/os-mlock.c
patching file kernel/uvm/nvidia_uvm_lite_api.c
Applying patch 0003-kernel-5.9.patch...
patching file kernel/nv-drm.c
patching file kernel/nv-linux.h
patching file kernel/nv.c
patching file kernel/uvm/nvidia_uvm_linux.h
Applying patch 0004-kernel-5.10.patch...
patching file kernel/nv-drm.c
Hunk #1 succeeded at 364 (offset 42 lines).
Applying patch 0005-kernel-5.11.patch...
patching file kernel/nv-linux.h
patching file kernel/uvm/nvidia_uvm_linux.h
==> 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...
"

I've got an answer from JerryXiao that it is because there is no kernel headers installed on my system, which is a prerequisite for ANY dkms packages but I have installed the headers before that error, according to the instructions:

" $ uname -r 5.10.36-2-MANJARO

$ sudo pacman -S $(mhwd-kernel -li | grep '*' | cut -d ' ' -f5 | awk '{print $0,"-headers"}' | sed s'/ //'g) warning: linux510-headers-5.10.36-2 is up to date -- reinstalling resolving dependencies... looking for conflicting packages...

Packages (1) linux510-headers-5.10.36-2

Total Installed Size:  47,74 MiB Net Upgrade Size:       0,00 MiB ...

$ pacman -Qkk linux-headers linux510-headers: 20906 total files, 0 altered files"

What should I do to install this package without errors?

piquer commented on 2021-05-28 11:55 (UTC) (edited on 2021-05-28 11:57 (UTC) by piquer)

The patch mentioned by @NSLW works for me as well, thank you very much. Without the patch sddm does not start. Any chance to include it into the PKGBUILD?

Here are the steps to test the patch.

  1. clone https://aur.archlinux.org/nvidia-340xx.git/
  2. clone https://github.com/wojnilowicz/nvidia-340xx-kmod
  3. copy kernel-5.11.patch to the AUR repository over file 0005-kernel-5.11.patch
  4. replace every occurrence of ./a with NVIDIA-Linux-x86_64-340.108-old and every occurrence of ./b with NVIDIA-Linux-x86_64-340.108-new in the patch
  5. calculate the hash of the patch with b2sum 0005-kernel-5.11.patch
  6. update the hash in the last entry of the b2sums array in the PKGBUILD
  7. run makepkg and install the resulting package with sudo pacman -U nvidia-340xx-dkms-340.108-19-x86_64.pkg.tar.zst

tioguda commented on 2021-05-24 20:42 (UTC)

Thank @NSLW, finally i managed to start my Manjaro Plasma (kernel 5.12.5) after your information.

Greetings.

NSLW commented on 2021-05-24 19:11 (UTC)

I improved the patch to work with sddm again and made it available at https://github.com/rpmfusion/nvidia-340xx-kmod/pull/3

NSLW commented on 2021-05-23 17:03 (UTC)

On 5.11 there is no "kernel: [drm] Initialized nvidia-drm 0.0.0 20150116 for 0000:01:00.0 on minor 0" (drm_drv.c file in kernel) in journalctl, so no "/dev/dri/card0" is created.

udev from systemd doesn't see "/dev/dri/card0", so it returns false for the following command "qdbus --system org.freedesktop.login1 /org/freedesktop/login1/seat/seat0 org.freedesktop.DBus.Properties.Get org.freedesktop.login1.Seat CanGraphical"

sddm disables the greeter because it receives "false" from the above command. Hardcoding it to "true" shows the greeter.

I have already tried to modify "nv-drm.c", but the kernel doesn't even visit that file. Would it be possible to initialize nvidia-drm somehow?