Package Base Details: nvidia-340xx

Git Clone URL: https://aur.archlinux.org/nvidia-340xx.git (read-only, click to copy)
Submitter: simonsmh
Maintainer: JerryXiao (graysky)
Last Packager: JerryXiao
Votes: 50
Popularity: 1.52
First Submitted: 2019-06-07 10:29
Last Updated: 2021-06-06 02:31

Pinned Comments

graysky commented on 2021-05-10 15:03

OK, I honestly forgot that I included an example config file. Since I don't have the hardware for testing, and since I still don't have a sense from users that it is a requirement, I will leave it in the post_install and depend on the user's ability to read pacman's output and manually copy the example over.

Latest Comments

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

AlexJ commented on 2021-06-11 09:11

@NSLW I suspected so. But now there is another problem. Every time I start a level in "Yamagi Quake II 5.34pre" the game freezes the laptop at certain points in the levels. I mean no input or output and a blank screen (USB, screen, keyboard everything freezes and the screen turns off). I have tried to run it with Tails to test if the drivers are the problem and there is no such problem with Tails (it is slower and there are some strange textures in water but no freeze) it runs fine.

NSLW commented on 2021-06-11 06:54

@AlexJ it's not an error. Please look at https://www.linuxquestions.org/questions/gentoo-87/error-kernel-configuration-is-invalad-running-genkernel-all-does-not-help-779946/

AlexJ commented on 2021-06-08 15:56

@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

@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

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

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

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

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

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?

Filkolev commented on 2021-05-17 20:12

Back when 5.11 came out I was unable to make it work after a bit of fiddling and I downgraded back to 5.10. Now I decided I would look into it more closely and it turned out I had to do 2 things to fix it:

  1. After putting 20-nvidia.conf in the xorg config directory, I also had to delete the (empty) Files section from /etc/X11/xorg.conf.
  2. I had to set IGNORE_CC_MISMATCH=1 in /etc/profile. The first time I actually ran sudo -E dkms install ...