Package Details: nvidia-340xx 340.108-30

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: 59
Popularity: 1.20
First Submitted: 2019-06-07 10:29 (UTC)
Last Updated: 2022-05-29 14:28 (UTC)

Latest Comments

alexzk commented on 2022-07-02 14:21 (UTC)

@JerryXiao well, kernel says "PCI: Using host bridge windows from ACPI; if necessary, use "pci=nocrs" and report a bug" on boot, yes. It is laptop, so no cables - direct connection, triple checked, cleansed by alcohol etc. On heavy drive access like "pacman -Qs nvidia" it starts to print "broken inode" if nvidia driver installed.

JerryXiao commented on 2022-06-16 13:50 (UTC) (edited on 2022-06-16 13:54 (UTC) by JerryXiao)

@sebalis I believe user should have the freedom to choose their own C compiler in makepkg.conf. I wouldn't override their preference unless it has to be done. Fixing the warning is a good thing, but we should try fixing the compiler version comparison code instead.
Also structleak_plugin of gcc would have blocked the compilation in case of a compiler version mismatch, so that check seems redundant. Maybe we can remove it entirely.

sebalis commented on 2022-06-16 11:34 (UTC) (edited on 2022-06-16 11:37 (UTC) by sebalis)

@JerryXiao When I build the package, I get the following message twice:

warning: the compiler differs from the one used to build the kernel
The kernel was built by: gcc (GCC) 12.1.0
You are using: cc (GCC) 12.1.0

This occurs shortly after the lines

make[1]: Entering directory '/usr/lib/modules/5.18.3-arch1-1/build'

and

make[1]: Entering directory '/usr/lib/modules/5.18.3-arch1-1/build'

The only lines before the warning are echos of commands that are about to be executed.

At one point in the past there was a subsequent message during the installation process that a command had returned a non-zero exit status. I couldn’t reproduce that command when I tried just now.

However, it would still be a good thing in my view to remove this warning as it might cause uncertainty. Also I’m wondering if the issue could be more serious for users that might have an alternative C compilers installed.

JerryXiao commented on 2022-06-16 10:52 (UTC) (edited on 2022-06-16 10:53 (UTC) by JerryXiao)

@sebalis I don't see any issue with the current PKGBUILD. Tested on real hardware.
@dmanlfc no log, so no solution.
@alexzk ACPI bug? ACPI is working fine on my hardware. TBH how could an acpi bug corrupt your SSD? Do you have a bad sata cable or have you undervolted your CPU?

sebalis commented on 2022-06-15 09:33 (UTC)

I installed this package on 5.18.1 and haven’t had issues since. My kernel is now 5.18.3 and I have just successfully built the package again (but didn’t bother to install it). Conincidentally, I did find I still had to add CC=gcc to the two calls to “make” and would appreciate an opinion from the maintainers about their reasons not to include that change. Do they not see this issue?

dmanlfc commented on 2022-06-15 08:43 (UTC)

Doesn't build against the 5.18.2 kernel - is there a compilation patch by any chance?

alexzk commented on 2022-06-08 19:11 (UTC) (edited on 2022-06-15 13:00 (UTC) by alexzk)

I installed new SSD into old HP CQ 50 with GTX 8600M card. Installed fresh new arch. Once this driver 340xx boots (gui login) it breaks file system on SSD. Rolled back to nouveau and things work now.

sebalis commented on 2022-06-03 11:01 (UTC)

Works like a charm, yes! Including suspend and hibernate (when @Imh69 gave us the first report about a working solution I had this slight worry that ACPI would not be working but that was only the first approach I guess). Many thanks indeed from me too.

I did think that @JerryXiao or @taz-007 might want to use the change I suggested on 2022-05-20 to the two “make” lines in PKGBUILD. As this hasn’t happened I made these changes manually during my update. Therefore I can’t say if the unaltered version would still have warned about a compiler mismatch on my system.

auriculaire commented on 2022-05-29 16:51 (UTC)

nvidia-340xx-dkms 340.108-30 on 5.18.0-arch1-1 works fine. Thank you very much.

lmh69 commented on 2022-05-29 12:52 (UTC) (edited on 2022-05-29 13:09 (UTC) by lmh69)

@poluyan I was able to get a clean compilation using the @Viterzgir patch for 5.18 kernel, with 2 modifications. First one to "fix" the error in nv-vm.c


-    return pci_map_sg(dev, sg, 1, PCI_DMA_BIDIRECTIONAL);
+    return dma_map_sg(&dev->dev, sg, 1, DMA_BIDIRECTIONAL);
-    pci_unmap_sg(dev, sg, 1, PCI_DMA_BIDIRECTIONAL);
+    dma_unmap_sg(&dev->dev, sg, 1, DMA_BIDIRECTIONAL);
And the 2nd to ""solve"" the following error:
ERROR: modpost: GPL-incompatible module nvidia.ko uses GPL-only symbol 'acpi_fetch_acpi_dev'

that was replacing the @Viterzgir patch for nv-acpi.c, using this one that disable the acpi for the nvidia module: https://gist.github.com/joanbm/c00f9e19731d80269a4badc595f63b68

Subject: [PATCH] Buildfix NVIDIA 470.103.01 for Linux 5.18-rc2

acpi_bus_get_device was removed and its trivial replacement acpi_fetch_acpi_dev
is GPL-exported, so just disable ACPI support as I don't want to deal with it.

-#if defined(NV_LINUX_ACPI_EVENTS_SUPPORTED)
+#include <linux/version.h>
+#if defined(NV_LINUX_ACPI_EVENTS_SUPPORTED) && (LINUX_VERSION_CODE < KERNEL_VERSION(5, 18, 0))


I havent check if the module is properly working using this, yet.

poluyan commented on 2022-05-28 20:36 (UTC)

@calvinh, no. I have an error using this patch. Something is wrong with pci_map_sg, pci_unmap_sg and PCI_DMA_BIDIRECTIONAL. I can't find extra patch for this error fix. Please share if you find it.

calvinh commented on 2022-05-28 19:55 (UTC)

Anybody has success using Viterzgir's patch?

Zodigram commented on 2022-05-20 05:43 (UTC)

Thanks so much for maintaining this!

sebalis commented on 2022-05-20 03:13 (UTC)

I was able to avoid the message about a compiler mismatch and the subsequent non-zero exit status of the dkms install by changing PKGBUILD. I added a setting to the environment variable CC to the calls to make, turning

make ...

to

env CC=gcc make ...

for both lines. Maybe the maintainers would like to incorporate that change?

Viterzgir commented on 2022-05-14 17:39 (UTC)

Patch for 5.18 https://pastebin.com/WLLYJ6WR

bigjuck commented on 2022-05-13 06:53 (UTC)

@holyArch thanks a lto, works for me witk 5.15.38-1-lts

holyArch commented on 2022-05-11 12:18 (UTC) (edited on 2022-05-11 12:46 (UTC) by holyArch)

Build fails when upgrading to 5.17.5-arch1-2.

sudo env IGNORE_CC_MISMATCH=1 dkms install -m nvidia -v 340.108 -k 5.17.5-arch1-2 did the trick.

auriculaire commented on 2022-05-11 09:05 (UTC)

You have to reinstall the module nvidia-340xx-dkms 340.108-29 after updating the linux kernel 5.17.5-arch1-2.

hackins commented on 2022-04-17 13:59 (UTC) (edited on 2022-04-17 14:19 (UTC) by hackins)

I installed Linux 5.17.3 and the latest updates now the system has flashing underscore on left upper corner, the desktop won't boot up, anyone can suggest anything? As FiestaLake suggested IgnoreABI option solved the issue. Thanks!

NicolasV commented on 2022-04-02 19:25 (UTC) (edited on 2022-04-02 19:26 (UTC) by NicolasV)

I recommand to install core/linux-lts and nvidia-340xx-lts as this package seems not compatible with mainline kernel. Here's the output at the end of installation.

  ERROR: Kernel configuration is invalid.
         include/generated/autoconf.h or include/config/auto.conf are missing.
         Run 'make oldconfig && make prepare' on kernel src to fix it.

fvsc commented on 2022-04-01 18:36 (UTC)

I used the Viterzgir patch for kernel 17 and build succeeded and all is up and running

fvsc commented on 2022-04-01 15:09 (UTC)

@Imh69 I overlooked the "download Snapshot" possibility. Thanks for reminding me.

lmh69 commented on 2022-04-01 13:41 (UTC) (edited on 2022-04-01 13:49 (UTC) by lmh69)

@hias Please try the @Viterzgir one that's working 2 and it's more complete.

@fvsc Download the snapshot package, extract it, patch the sources in that directory with the @Viterzgir patch ( https://pastebin.com/raw/QqKwAbSy ), you should modify the PKGBUILD and add the patch and the b2sum of it, then just compile/make the package and installed it with: makepkg -si You should be running the 5.17 kernel that you want to use with this nvidia driver when you execute the makepkg command. (You can make a function() in bashrc or an .sh file to semi-automatic execute it when you upgrade your kernel version 5.17.* as long as this aur package isn't updated)

Regards.

fvsc commented on 2022-04-01 12:04 (UTC)

Can someone tell me where I can download the kernel patches? Thanks in advance.

hias commented on 2022-03-31 21:41 (UTC) (edited on 2022-03-31 21:43 (UTC) by hias)

I tried lmh69´s Patch and X starts again. tnx.

PKGBUILD I used for linux:


# Maintainer: graysky <graysky AT archlinux DOT us>
# Maintainer: Jerry Xiao <aur@mail.jerryxiao.cc>
# Contributor: Giancarlo Razzolini <grazzolini@archlinux.org>
# Contributor: Eric Bélanger <eric@archlinux.org>

pkgbase=nvidia-340xx
pkgname=(nvidia-340xx nvidia-340xx-dkms); [ -n "$NVIDIA_340XX_DKMS_ONLY" ] && pkgname=(nvidia-340xx-dkms)
pkgver=340.108
pkgrel=29
pkgdesc="NVIDIA drivers for linux, 340xx legacy branch"
arch=('x86_64')
url="https://www.nvidia.com/"
makedepends=("nvidia-340xx-utils=${pkgver}" 'linux>=5.5' 'linux-headers>=5.5')
conflicts=('nvidia')
license=('custom')
options=(!strip)
# https://github.com/warpme/minimyth2/tree/master/script/nvidia/nvidia-340.108/files
source=("https://us.download.nvidia.com/XFree86/Linux-x86_64/${pkgver}/NVIDIA-Linux-x86_64-${pkgver}-no-compat32.run"
  20-nvidia.conf
  0001-kernel-5.7.patch
  0002-kernel-5.8.patch
  0003-kernel-5.9.patch
  0004-kernel-5.10.patch
  0005-kernel-5.11.patch
  0006-kernel-5.14.patch
  0007-kernel-5.15.patch
  0008-kernel-5.16.patch
  0009-kernel-5.17.patch
)
b2sums=('6538bbec53b10f8d20977f9b462052625742e9709ef06e24cf2e55de5d0c55f1620a4bb21396cfd89ebc54c32f921ea17e3e47eaa95abcbc24ecbd144fb89028'
        '49d99f612e8eee3ab5e34083c25348bfd14ed5fc8a7984dafc0dad7c0ae0df2c0b2a63a1bb993da440eb0a60293d7c753ca3889bd2f51991b8ddc51bce2fe4a8'
        '7150233df867a55f57aa5e798b9c7618329d98459fecc35c4acfad2e9772236cb229703c4fa072381c509279d0588173d65f46297231f4d3bfc65a1ef52e65b1'
        'b436095b89d6e294995651a3680ff18b5af5e91582c3f1ec9b7b63be9282497f54f9bf9be3997a5af30eec9b8548f25ec5235d969ac00a667a9cddece63d8896'
        '947cb1f149b2db9c3c4f973f285d389790f73fc8c8a6865fc5b78d6a782f49513aa565de5c82a81c07515f1164e0e222d26c8212a14cf016e387bcc523e3fcb1'
        '665bf0e1fa22119592e7c75ff40f265e919955f228a3e3e3ebd76e9dffa5226bece5eb032922eb2c009572b31b28e80cd89656f5d0a4ad592277edd98967e68f'
        '344cd3a9888a9a61941906c198d3a480ce230119c96c72c72a74b711d23face2a7b1e53b9b4639465809b84762cdc53f38210e740318866705241bc4216e4f35'
        '31a4047ab84d13e32fd7fdbf9f69c696d3fab6666c541d2acf0a189c1d17c876970985167fd389a4adc0f786021172bdec1aa6d690736e3cf9fcd8ceabe5fd32'
        'b3b7bbd597252b25ccb68f431f83707a10d464996f6c74bb67143795df96054da719faf09c1ad2e1c215261356833ad3fa0d9e60552151f827f9d7be7ae44605'
        'caedc5651bfd14c02fb677f9c5e87adef298d871c6281b78ce184108310e4243ded82210873014be7fedee0dd6251305fa9bbce0c872b76438e0895ef76109d9'
        '8b4a7de6d13d9fa5c5569117a371ba615a967b7a1eb40db81e28433a9775a60a4d665a2e141209c8a62f81ea0c1f9156260686188a2e1de11537d923f2fa97f7')
_pkg="NVIDIA-Linux-x86_64-${pkgver}-no-compat32"

# default is 'linux' substitute custom name here
_kernelname=linux
_kernver="$(</usr/src/$_kernelname/version)"
_extradir="/usr/lib/modules/$_kernver/extramodules"

prepare() {
  sh "${_pkg}.run" --extract-only

  cd "${_pkg}"

  local src
  for src in "${source[@]}"; do
    src="${src%%::*}"
    src="${src##*/}"
    [[ $src = 0*.patch ]] || continue
    echo "Applying patch $src..."
    patch -Np1 < "../$src"
  done

  cp -a kernel kernel-dkms
}

build() {
  [ -n "$NVIDIA_340XX_DKMS_ONLY" ] && return 0
  cd "${_pkg}/kernel"
  make SYSSRC="/usr/src/$_kernelname" module

  cd uvm
  make SYSSRC="/usr/src/$_kernelname" module
}

package_nvidia-340xx() {
  pkgdesc="NVIDIA drivers for linux, 340xx legacy branch"
  depends=('linux>=5.3.6' "nvidia-340xx-utils=$pkgver" 'libgl')
  install=nvidia-340xx.install

  install -Dt "${pkgdir}${_extradir}" -m644 \
    "${srcdir}/${_pkg}/kernel"/{nvidia,uvm/nvidia-uvm}.ko

  find "${pkgdir}" -name '*.ko' -exec gzip -n {} +

  echo "blacklist nouveau" |
    install -Dm644 /dev/stdin "${pkgdir}/usr/lib/modprobe.d/nvidia-340xx.conf"

  install -Dm644 "$srcdir/20-nvidia.conf" "$pkgdir/usr/share/nvidia-340xx/20-nvidia.conf"
}

package_nvidia-340xx-dkms() {
  pkgdesc="NVIDIA driver sources for linux, 340xx legacy branch"
  depends=('dkms' "nvidia-340xx-utils=$pkgver" 'libgl')
  optdepends=('linux-headers: Build the module for Arch kernel')
  provides=("nvidia-340xx=$pkgver")
  conflicts+=('nvidia-340xx')
  install=nvidia-340xx.install

  cd "${_pkg}"

  install -dm 755 "${pkgdir}"/usr/src
  cp -dr --no-preserve='ownership' kernel-dkms "${pkgdir}/usr/src/nvidia-${pkgver}"
  cat "${pkgdir}"/usr/src/nvidia-${pkgver}/uvm/dkms.conf.fragment >> "${pkgdir}"/usr/src/nvidia-${pkgver}/dkms.conf

  echo "blacklist nouveau" |
    install -Dm644 /dev/stdin "${pkgdir}/usr/lib/modprobe.d/${pkgname}.conf"

  install -Dm644 "$srcdir/20-nvidia.conf" "$pkgdir/usr/share/nvidia-340xx/20-nvidia.conf"
}

# vim:set ts=2 sw=2 et:

c0mmand0x72 commented on 2022-03-30 17:37 (UTC)

thx again @Viterzgir .Im too had no problems and Mate is running fine again

calvinh commented on 2022-03-30 13:36 (UTC)

Can confirm @Viterzgir's patch works fine. Thanks.

Viterzgir commented on 2022-03-30 12:17 (UTC)

Patch for kernel 5.17 https://pastebin.com/QqKwAbSy

lmh69 commented on 2022-03-30 06:05 (UTC) (edited on 2022-04-01 13:18 (UTC) by lmh69)

i'm using since yesterday the following patch for kernel 5.17 (Tentative fix for NVIDIA 470.94 driver for Linux 5.17-rc1): https://gist.github.com/joanbm/6c7b027b9436bf31ce979927e544e9d5

That I adapted to nvidia-340xx and linux-zen:
0009-kernel-5.17.patch:


--- a/kernel/nv-linux.h 2022-03-23 13:48:06.185784509 +0000
+++ b/kernel/nv-linux.h 2022-03-29 13:30:58.733584062 +0000
@@ -12,6 +12,7 @@
 #define _NV_LINUX_H_

 #include "nv.h"
+#include <linux/version.h>
 #include "conftest.h"

 #if !defined(NV_VMWARE)
@@ -2053,6 +2054,8 @@

 #if defined(NV_PDE_DATA_PRESENT)
 # define NV_PDE_DATA(inode) PDE_DATA(inode)
+#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 17, 0))
+# define NV_PDE_DATA(inode) pde_data(inode)
 #else
 # define NV_PDE_DATA(inode) PDE(inode)->data
 #endif


PKGBUILD for linux-zen:


# Maintainer: graysky <graysky AT archlinux DOT us>
# Maintainer: Jerry Xiao <aur@mail.jerryxiao.cc>
# Contributor: Giancarlo Razzolini <grazzolini@archlinux.org>
# Contributor: Eric Bélanger <eric@archlinux.org>

pkgbase=nvidia-340xx-zen
pkgname=(nvidia-340xx-zen);
pkgver=340.108
pkgrel=28
pkgdesc="NVIDIA drivers for linux-zen, 340xx legacy branch"
arch=('x86_64')
url="https://www.nvidia.com/"
makedepends=("nvidia-340xx-utils=${pkgver}" 'linux-zen>=5.5' 'linux-zen-headers>=5.5')
conflicts=('nvidia')
license=('custom')
options=(!strip)
# https://github.com/warpme/minimyth2/tree/master/script/nvidia/nvidia-340.108/files
source=("https://us.download.nvidia.com/XFree86/Linux-x86_64/${pkgver}/NVIDIA-Linux-x86_64-${pkgver}-no-compat32.run"
  20-nvidia.conf
  0001-kernel-5.7.patch
  0002-kernel-5.8.patch
  0003-kernel-5.9.patch
  0004-kernel-5.10.patch
  0005-kernel-5.11.patch
  0006-kernel-5.14.patch
  0007-kernel-5.15.patch
  0008-kernel-5.16.patch
  0009-kernel-5.17.patch
)
b2sums=('6538bbec53b10f8d20977f9b462052625742e9709ef06e24cf2e55de5d0c55f1620a4bb21396cfd89ebc54c32f921ea17e3e47eaa95abcbc24ecbd144fb89028'
        '49d99f612e8eee3ab5e34083c25348bfd14ed5fc8a7984dafc0dad7c0ae0df2c0b2a63a1bb993da440eb0a60293d7c753ca3889bd2f51991b8ddc51bce2fe4a8'
        '7150233df867a55f57aa5e798b9c7618329d98459fecc35c4acfad2e9772236cb229703c4fa072381c509279d0588173d65f46297231f4d3bfc65a1ef52e65b1'
        'b436095b89d6e294995651a3680ff18b5af5e91582c3f1ec9b7b63be9282497f54f9bf9be3997a5af30eec9b8548f25ec5235d969ac00a667a9cddece63d8896'
        '947cb1f149b2db9c3c4f973f285d389790f73fc8c8a6865fc5b78d6a782f49513aa565de5c82a81c07515f1164e0e222d26c8212a14cf016e387bcc523e3fcb1'
        '665bf0e1fa22119592e7c75ff40f265e919955f228a3e3e3ebd76e9dffa5226bece5eb032922eb2c009572b31b28e80cd89656f5d0a4ad592277edd98967e68f'
        '344cd3a9888a9a61941906c198d3a480ce230119c96c72c72a74b711d23face2a7b1e53b9b4639465809b84762cdc53f38210e740318866705241bc4216e4f35'
        '31a4047ab84d13e32fd7fdbf9f69c696d3fab6666c541d2acf0a189c1d17c876970985167fd389a4adc0f786021172bdec1aa6d690736e3cf9fcd8ceabe5fd32'
        'b3b7bbd597252b25ccb68f431f83707a10d464996f6c74bb67143795df96054da719faf09c1ad2e1c215261356833ad3fa0d9e60552151f827f9d7be7ae44605'
        'caedc5651bfd14c02fb677f9c5e87adef298d871c6281b78ce184108310e4243ded82210873014be7fedee0dd6251305fa9bbce0c872b76438e0895ef76109d9'
        '19e41d3d33cf838f30eb085d9d991a55a6dd06fb5435aa3f52740517fc567883eec6446857cde8545be1eca3fac04ddad55bbfd4c9c7449ae37c15c828d9823d')
_pkg="NVIDIA-Linux-x86_64-${pkgver}-no-compat32"

# default is 'linux' substitute custom name here
_kernelname=linux-zen
_kernver="$(</usr/src/$_kernelname/version)"
_extradir="/usr/lib/modules/$_kernver/extramodules"

prepare() {
  sh "${_pkg}.run" --extract-only

  cd "${_pkg}"

  local src
  for src in "${source[@]}"; do
    src="${src%%::*}"
    src="${src##*/}"
    [[ $src = 0*.patch ]] || continue
    echo "Applying patch $src..."
    patch -Np1 < "../$src"
  done

  cp -a kernel kernel-dkms
}

build() {
  [ -n "$NVIDIA_340XX_DKMS_ONLY" ] && return 0
  cd "${_pkg}/kernel"
  make SYSSRC="/usr/src/$_kernelname" module

  cd uvm
  make SYSSRC="/usr/src/$_kernelname" module
}

package_nvidia-340xx-zen() {
  pkgdesc="NVIDIA drivers for linux-zen, 340xx legacy branch"
  depends=('linux-zen>=5.3.6' "nvidia-340xx-utils=$pkgver" 'libgl')
  install=nvidia-340xx-zen.install

  install -Dt "${pkgdir}${_extradir}" -m644 \
    "${srcdir}/${_pkg}/kernel"/{nvidia,uvm/nvidia-uvm}.ko

  find "${pkgdir}" -name '*.ko' -exec gzip -n {} +

  echo "blacklist nouveau" |
    install -Dm644 /dev/stdin "${pkgdir}/usr/lib/modprobe.d/nvidia-340xx-zen.conf"

  install -Dm644 "$srcdir/20-nvidia.conf" "$pkgdir/usr/share/nvidia-340xx-zen/20-nvidia.conf"
}

# vim:set ts=2 sw=2 et:

Regards.

PS: I have to say that i didn't try the module compilation without the patch... I don't know if is strictly necessary or not...

calvinh commented on 2022-03-29 20:01 (UTC)

Need a patch for 5.17 kernel.

mauzil commented on 2022-02-18 17:48 (UTC) (edited on 2022-02-20 08:39 (UTC) by mauzil)

[Solved with kernel 5.16.10-artix1-1]

Hi all. In Artix with latest update I get this error

warning: the compiler differs from the one used to build the kernel
  The kernel was built by: gcc (GCC) 11.2.0
  You are using:           cc (GCC) 11.2.0
make -f ./scripts/Makefile.build obj=/home/mauro/Scaricati/Artix/nvidia-340xx/src/NVIDIA-Linux-x86_64-340.108-no-compat32/kernel \
single-build= \
need-builtin=1 need-modorder=1
  cc -Wp,-MMD,/home/mauro/Scaricati/Artix/nvidia-340xx/src/NVIDIA-Linux-x86_64-340.108-no-compat32/kernel/.nv.o.d -nostdinc -I./arch/x86/include -I./arch/x86/include/generated  -I./include -I./arch/x86/include/uapi -I./arch/x86/include/generated/uapi -I./include/uapi -I./include/generated/uapi -include ./include/linux/compiler-version.h -include ./include/linux/kconfig.h -include ./include/linux/compiler_types.h -D__KERNEL__ -fmacro-prefix-map=./= -Wall -Wundef -Werror=strict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -fshort-wchar -fno-PIE -Werror=implicit-function-declaration -Werror=implicit-int -Werror=return-type -Wno-format-security -std=gnu89 -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -mno-avx -fcf-protection=none -m64 -falign-jumps=1 -falign-loops=1 -mno-80387 -mno-fp-ret-in-387 -mpreferred-stack-boundary=3 -mskip-rax-setup -mtune=generic -mno-red-zone -mcmodel=kernel -Wno-sign-compare -fno-asynchronous-unwind-tables -mindirect-branch=thunk-extern -mindirect-branch-register -fno-jump-tables -fno-delete-null-pointer-checks -Wno-frame-address -Wno-format-truncation -Wno-format-overflow -Wno-address-of-packed-member -O2 -fno-allow-store-data-races -Wframe-larger-than=2048 -fstack-protector-strong -Wimplicit-fallthrough=5 -Wno-main -Wno-unused-but-set-variable -Wno-unused-const-variable -fno-stack-clash-protection -pg -mrecord-mcount -mfentry -DCC_USING_FENTRY -Wdeclaration-after-statement -Wvla -Wno-pointer-sign -Wno-stringop-truncation -Wno-zero-length-bounds -Wno-array-bounds -Wno-stringop-overflow -Wno-restrict -Wno-maybe-uninitialized -Wno-alloc-size-larger-than -fno-strict-overflow -fno-stack-check -fconserve-stack -Werror=date-time -Werror=incompatible-pointer-types -Werror=designated-init -Wno-packed-not-aligned -g -gdwarf-4 -fplugin=./scripts/gcc-plugins/structleak_plugin.so -fplugin-arg-structleak_plugin-byref-all -DSTRUCTLEAK_PLUGIN -DNV_MODULE_INSTANCE=0 -DNV_BUILD_MODULE_INSTANCES=0 -UDEBUG -U_DEBUG -DNDEBUG -I/home/mauro/Scaricati/Artix/nvidia-340xx/src/NVIDIA-Linux-x86_64-340.108-no-compat32/kernel -Wall -MD -Wsign-compare -Wno-cast-qual -Wno-error -D__KERNEL__ -DMODULE -DNVRM -DNV_VERSION_STRING=\"340.108\" -Wno-unused-function -Wuninitialized -fno-strict-aliasing -mno-red-zone -mcmodel=kernel -DNV_UVM_ENABLE -D__linux__ -DNV_DEV_NAME=\"nvidia\"  -DMODULE  -DKBUILD_BASENAME='"nv"' -DKBUILD_MODNAME='"nvidia"' -D__KBUILD_MODNAME=kmod_nvidia -c -o /home/mauro/Scaricati/Artix/nvidia-340xx/src/NVIDIA-Linux-x86_64-340.108-no-compat32/kernel/nv.o /home/mauro/Scaricati/Artix/nvidia-340xx/src/NVIDIA-Linux-x86_64-340.108-no-compat32/kernel/nv.c  ; ./tools/objtool/objtool orc generate  --module  --no-fp   --retpoline  --uaccess  /home/mauro/Scaricati/Artix/nvidia-340xx/src/NVIDIA-Linux-x86_64-340.108-no-compat32/kernel/nv.o
cc1: error: incompatible gcc/plugin versions
cc1: error: failed to initialize plugin ./scripts/gcc-plugins/structleak_plugin.so
make[2]: *** [scripts/Makefile.build:287: /home/mauro/Scaricati/Artix/nvidia-340xx/src/NVIDIA-Linux-x86_64-340.108-no-compat32/kernel/nv.o] Errore 1
make[1]: *** [Makefile:1846: /home/mauro/Scaricati/Artix/nvidia-340xx/src/NVIDIA-Linux-x86_64-340.108-no-compat32/kernel] Errore 2
make[1]: uscita dalla directory «/usr/lib/modules/5.16.8-artix1-2/build»
NVIDIA: left KBUILD.
nvidia.ko failed to build!
make: *** [Makefile:202: nvidia.ko] Errore 1

DAC324 commented on 2022-02-18 08:22 (UTC) (edited on 2022-02-18 09:53 (UTC) by DAC324)

@norambna: Manjaro is different from Arch (as you already have encountered). For Manjaro, use this PKGBUILD (you will have to edit the _linuxprefix and _extramodules variables to match the kernel version you are using):

# Based on the Arch file by:
# Maintainer: graysky <graysky AT archlinux DOT us>
# Maintainer: Jerry Xiao <aur@mail.jerryxiao.cc>
# Contributor: Giancarlo Razzolini <grazzolini@archlinux.org>
# Contributor: Eric Bélanger <eric@archlinux.org>

# Maintainer: Philip Müller <philm@manjaro.org>
# Maintainer: Roland Singer <roland@manjaro.org>

_linuxprefix=linux516
_extramodules=extramodules-5.16-MANJARO
pkgname=(nvidia-340xx-dkms)
_pkgname=nvidia
pkgver=340.108
pkgrel=29
provides=("$_pkgname=$pkgver")
groups=("$_linuxprefix-extramodules")
pkgdesc="NVIDIA drivers for linux, 340xx legacy branch"
arch=('i686' 'x86_64')
url="http://www.nvidia.com/"
depends=(
         "$_linuxprefix"
         "nvidia-340xx-utils=${pkgver}"
         )
makedepends=("$_linuxprefix-headers")
conflicts=('nvidia-96xx' 'nvidia-183xx' "$_linuxprefix-nvidia" "$_linuxprefix-nvidia-304xx")
license=('custom')
options=(!strip)
# https://github.com/warpme/minimyth2/tree/master/script/nvidia/nvidia-340.108/files
source=("https://us.download.nvidia.com/XFree86/Linux-x86_64/${pkgver}/NVIDIA-Linux-x86_64-${pkgver}-no-compat32.run"
  20-nvidia.conf
  0001-kernel-5.7.patch
  0002-kernel-5.8.patch
  0003-kernel-5.9.patch
  0004-kernel-5.10.patch
  0005-kernel-5.11.patch
  0006-kernel-5.14.patch
  0007-kernel-5.15.patch
  0008-kernel-5.16.patch
)
b2sums=('6538bbec53b10f8d20977f9b462052625742e9709ef06e24cf2e55de5d0c55f1620a4bb21396cfd89ebc54c32f921ea17e3e47eaa95abcbc24ecbd144fb89028'
        '49d99f612e8eee3ab5e34083c25348bfd14ed5fc8a7984dafc0dad7c0ae0df2c0b2a63a1bb993da440eb0a60293d7c753ca3889bd2f51991b8ddc51bce2fe4a8'
        '7150233df867a55f57aa5e798b9c7618329d98459fecc35c4acfad2e9772236cb229703c4fa072381c509279d0588173d65f46297231f4d3bfc65a1ef52e65b1'
        'b436095b89d6e294995651a3680ff18b5af5e91582c3f1ec9b7b63be9282497f54f9bf9be3997a5af30eec9b8548f25ec5235d969ac00a667a9cddece63d8896'
        '947cb1f149b2db9c3c4f973f285d389790f73fc8c8a6865fc5b78d6a782f49513aa565de5c82a81c07515f1164e0e222d26c8212a14cf016e387bcc523e3fcb1'
        '665bf0e1fa22119592e7c75ff40f265e919955f228a3e3e3ebd76e9dffa5226bece5eb032922eb2c009572b31b28e80cd89656f5d0a4ad592277edd98967e68f'
        '344cd3a9888a9a61941906c198d3a480ce230119c96c72c72a74b711d23face2a7b1e53b9b4639465809b84762cdc53f38210e740318866705241bc4216e4f35'
        '31a4047ab84d13e32fd7fdbf9f69c696d3fab6666c541d2acf0a189c1d17c876970985167fd389a4adc0f786021172bdec1aa6d690736e3cf9fcd8ceabe5fd32'
        'b3b7bbd597252b25ccb68f431f83707a10d464996f6c74bb67143795df96054da719faf09c1ad2e1c215261356833ad3fa0d9e60552151f827f9d7be7ae44605'
        'caedc5651bfd14c02fb677f9c5e87adef298d871c6281b78ce184108310e4243ded82210873014be7fedee0dd6251305fa9bbce0c872b76438e0895ef76109d9')
_pkg="NVIDIA-Linux-x86_64-${pkgver}-no-compat32"

[[ "$CARCH" = "i686" ]] && _pkg="NVIDIA-Linux-x86-${pkgver}"
[[ "$CARCH" = "x86_64" ]] && _pkg="NVIDIA-Linux-x86_64-${pkgver}-no-compat32"

prepare() {
    # Remove previous builds
    [ -d "$_pkg" ] && rm -rf "$_pkg"
    sh "${_pkg}.run" --extract-only
    cd "${_pkg}"
    # patches here

  local src
  for src in "${source[@]}"; do
    src="${src%%::*}"
    src="${src##*/}"
    [[ $src = 0*.patch ]] || continue
    echo "Applying patch $src..."
    patch -Np1 < "../$src"
  done

    cd kernel
    sed -i "s/__VERSION_STRING/${pkgver}/" dkms.conf
    sed -i 's/__JOBS/`nproc`/' dkms.conf
    sed -i 's/__DKMS_MODULES//' dkms.conf
    sed -i '$iBUILT_MODULE_NAME[0]="nvidia"\
DEST_MODULE_LOCATION[0]="/kernel/drivers/video"\
BUILT_MODULE_NAME[1]="nvidia-uvm"\
DEST_MODULE_LOCATION[1]="/kernel/drivers/video"\
BUILT_MODULE_NAME[2]="nvidia-modeset"\
DEST_MODULE_LOCATION[2]="/kernel/drivers/video"\
BUILT_MODULE_NAME[3]="nvidia-drm"\
DEST_MODULE_LOCATION[3]="/kernel/drivers/video"' dkms.conf

    # Gift for linux-rt guys
    sed -i 's/NV_EXCLUDE_BUILD_MODULES/IGNORE_PREEMPT_RT_PRESENCE=1 NV_EXCLUDE_BUILD_MODULES/' dkms.conf

    cd ..
    cp -a kernel kernel-dkms
}

build() {
    _kernver="$(cat /usr/lib/modules/${_extramodules}/version)"

    cd "${_pkg}"/kernel
    make SYSSRC=/usr/lib/modules/"${_kernver}/build" module

    cd uvm
    make SYSSRC=/usr/lib/modules/"${_kernver}/build" module
}

package_nvidia-340xx-dkms() {
    pkgdesc="NVIDIA driver sources for linux, 340xx legacy branch"
    depends=('dkms' "nvidia-340xx-utils=$pkgver" 'libgl')
    optdepends=('linux-headers: Build the module for Manjaro kernel')
    provides=("nvidia-340xx=$pkgver")
    conflicts+=('nvidia-340xx')
    install=nvidia-340xx.install

    cd "${_pkg}"

    install -dm 755 "${pkgdir}"/usr/src
    cp -dr --no-preserve='ownership' kernel-dkms "${pkgdir}/usr/src/nvidia-${pkgver}"

    echo "blacklist nouveau" |
        install -Dm644 /dev/stdin "${pkgdir}/usr/lib/modprobe.d/${pkgname}.conf"

  install -Dm644 "$srcdir/20-nvidia.conf" "$pkgdir/usr/share/nvidia-340xx/20-nvidia.conf"
}

# vim:set ts=2 sw=2 et:

norambna commented on 2022-02-17 13:42 (UTC) (edited on 2022-02-17 15:02 (UTC) by norambna)

I'm running a fresh install of Manjaro KDE, Kernel 5.10, Plasma 5.23.5 on a late 2008 Macbook that comes with a GeForce 9400M. When trying to install this package it stops with this error:

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

Any hints how to solve this? Thanks in advance.

edit: It seems this comment has the solution to this problem!

pissbrain commented on 2022-02-16 03:04 (UTC)

Can confirm, you do need to reinstall the drivers after the recent gcc update

airgap97 commented on 2022-02-15 21:16 (UTC) (edited on 2022-02-16 00:31 (UTC) by airgap97)

it does not work after update [gcc] [toolchain]

upd : you need to reinstall all the drivers (nvidia-utils, opencl-nvidia), so they pick up the new version of gcc.

bigjuck commented on 2022-01-15 11:28 (UTC)

Thanks to all keeping the package working with new kernels

Viterzgir commented on 2022-01-12 23:23 (UTC)

Patch for kernel 5.16 https://pastebin.com/8bhF3kcj or full archive with PKGBUILD https://www.upload.ee/files/13789758/nvidia-340xx.tar.gz.html

DAC324 commented on 2022-01-04 13:28 (UTC) (edited on 2022-01-04 13:49 (UTC) by DAC324)

0007-kernel-5.15.patch seems to contain DOS instead of Unix line breaks, causing patch to spit out the following:

(Stripping trailing CRs from patch; use --binary to disable.)
patching file kernel/nv-drm.c
patch unexpectedly ends in middle of line

For everybody who prefers avoiding such issues, a command like

sed -i.bak 's/\r$//' 0007-kernel-5.15.patch 

or, alternatively,

echo "$(tr -d '\r' < 0007-kernel-5.15.patch)" > 0007-kernel-5.15.patch

might help. Of course, the checksum in PKGBUILD has to be corrected accordingly.

soylent commented on 2022-01-02 08:32 (UTC)

Thanks for keeping the package up to date! I appreciate it a lot!

nahno commented on 2021-11-26 21:22 (UTC)

Thanks for doing the good work and all the comments. Really appreciated! Everything works just fine.

pissbrain commented on 2021-11-15 03:10 (UTC)

Can confirm, the 5.15 patch also works fine on my end.

c0mmand0x72 commented on 2021-11-14 14:19 (UTC)

thx for the new patch . everthings works fine :)

Viterzgir commented on 2021-11-13 20:10 (UTC)

Patch for kernel 5.15 https://pastebin.com/uYP9J2Cw Found here https://github.com/warpme/minimyth2/issues/15

holyArch commented on 2021-11-11 14:45 (UTC)

calvinh, one should edit /etc/X11/xorg.conf.d/20-nvidia.conf.

calvinh commented on 2021-11-11 13:19 (UTC)

Adding the option suggested by @FiestaLake in /usr/share/X11/xorg.conf.d/20-nvidia.conf fixed the issue.

poluyan commented on 2021-11-11 08:54 (UTC)

FiestaLake, it's very useful, thank you. I have similar problem with 340xx after xorg-server update 1.20.13-3 -> 21.1.1-2 on linux 5.14.16. I didn't have the file xorg.conf at my system, so I created it manually with given section. This fixed the issue.

FiestaLake commented on 2021-11-11 07:55 (UTC) (edited on 2021-11-11 07:56 (UTC) by FiestaLake)

May be useful for someone. As now Xorg's version of ABI is 25.2 after updating Xorg to 21.1.1 I had to add these lines to xorg.conf to start graphics successfully.

Section "ServerFlags" Option "IgnoreABI" "1" EndSection

From nvidia-390xx-dkms, but it should work on 340xx too.

calvinh commented on 2021-11-10 17:57 (UTC)

libevdev 1.12.0-1 works fine in my system. Had to downgrade xf86-input-libinput (1.2.0-1) xorg-server (1.20.13-3) and xorg-server-common (1.20.13-3)

holyArch commented on 2021-11-10 17:54 (UTC) (edited on 2021-11-11 14:37 (UTC) by holyArch)

After upgrades, Xorg wasn't loading, and mouse and keyboard weren't responding. So I had to boot in single mode and downgrade the following packages: xf86-input-libinput (1.2.0-1) xorg-server (1.20.13-3) xorg-server-common (1.20.13-3) xorg-server-xephyr (1.20.13-3).

Edit: no need to downgrade libevdev.

Viterzgir commented on 2021-11-10 16:44 (UTC)

Driver fails to load with latest xorg-server

taz-007 commented on 2021-11-10 15:56 (UTC)

Users of this package should block automatic update of their kernel. There is not enough man power to update it as fast as newer kernels are released.

auriculaire commented on 2021-11-10 14:27 (UTC)

No graphic connection on arch linux-linux and linux-lts. I tried to reinstall the module nvidia-340xx-dkms 340.108-24: no result with lightdm, gdm or sddm.

no_like commented on 2021-11-09 07:54 (UTC)

Seems the package faced an issue with the patch for linux 5.15

Bang1 commented on 2021-10-06 17:44 (UTC) (edited on 2021-10-06 17:58 (UTC) by Bang1)

What xorg-server version is compatible with this driver? I have been trying to install it but I aways get a black screen when starting X server.

tioguda commented on 2021-10-03 19:28 (UTC)

That's why Manjaro users struggle to get some support here, guys see this laziness to read by some and end up thinking that everyone is like that.

AlexJ commented on 2021-10-03 15:29 (UTC)

Meganium97, you need to create link with named linux to /lib/modules/5.14.7-2-MANJARO/build (or whatever your kernel version is). That is because Arch and Manjaro have differences.

You need to have installed headers first (sudo pamac install linux514-headers).

If you have linux file link to an old kernel version then removed it (sudo rm /usr/src/linux).

Then run:

cd /lib/modules/$(uname -r)/build/ | echo $(uname -r) | sudo tee /lib/modules/$(uname -r)/build/version > /dev/null | sudo ln -s /lib/modules/$(uname -r)/build /usr/src/linux

(This will create the link file linux with your current version of the kernel)

You need to remove the link file /lib/modules/5.14.7-2-MANJARO/extramodules (sudo rm /lib/modules/5.14.7-2-MANJARO/extramodules), because it will give you an error while installing the nvidia drivers

Create a new dir for the extramodules (sudo mkdir /lib/modules/5.14.7-2-MANJARO/extramodules)

Copy all files to the new dir from /lib/modules/extramodules-5.14-MANJARO/ (sudo cp /lib/modules/extramodules-5.14-MANJARO/* /lib/modules/5.14.7-2-MANJARO/extramodules/)

Then you should run the installer (sudo pamac install nvidia-340xx).

After it is done you must copu 20-nvidia.conf to /etc/X11/xorg.conf.d/ (sudo cp /usr/share/nvidia-340xx/20-nvidia.conf /etc/X11/xorg.conf.d/)

Then reboot (sudo reboot)

That's it

(You may have to do this again after a kernel update from a terminal because it may not start in Desktop mode (Ctrl+Alt+F2 to enter terminal). Don't forget to change the kernel version in the path names. (uname -r)

Meganium97 commented on 2021-10-02 19:30 (UTC)

I've been getting the error that /usr/src/linux doesn't exist. What can I do? Using manjaro with kernel 5.14.7-2

arch4ngel commented on 2021-09-25 09:35 (UTC) (edited on 2021-09-25 09:35 (UTC) by arch4ngel)

So, it now works in 5.14.7-arch1-1, but no longer boots (just a blank screen and _ in the top left corner) in 5.10.68-1 (linux lts)

I have linux lts installed as stable mainline often breaks (until there's a fix to this package). Given 5.10 will now be supported for many years, it was my mitigation against the instability of mainline non-lts.

It's nice 5.14 works but if it breaks in 5.15 at some point, I won't be able to use 5.10 in the interim. Any ideas?

vicpt commented on 2021-09-24 08:53 (UTC)

Sorry guys for not reply (special in gitlab) but I have been busy in rl. About the b2sum, it was correct to my local revision. Probably during the clone/merge process something escaped to my tired eyes.

I'm glad it helped.

auriculaire commented on 2021-09-24 07:55 (UTC)

Everything works very well. Thanks. However, I never found on the web the answer to this question about Nvidia:

why /dev/dri/renderD128 isn't in /dev/dri ?

Galard commented on 2021-09-21 10:55 (UTC)

Thank you very much! The driver is working.

MegaDeKay commented on 2021-09-21 01:14 (UTC)

Latest -24 version works great for me on 5.14.6.arch1-1. /dev/drm is present and SDDM works too. My hats off to the devs that are keeping my old laptop going with the latest and greatest!

tuxsavvy commented on 2021-09-16 12:41 (UTC) (edited on 2021-09-20 15:39 (UTC) by tuxsavvy)

@alou-S You need to manually create the /etc/X11/xorg.conf.d/20-nvidia.conf. The filename 20-nvidia.conf is totally optional here, I personally named it because:

  • It is easier to know exactly what sort of contents would be expected within that file, at a glance; it is pertaining to nvidia of course, and,

  • The prefixing of the numbers indicates that it has a higher priority/preference when Xorg starts.

Have a look at Arch Linux wiki, troubleshooting nvidia page. It gives you an idea of why I chose to use that filename, and to have that file there, even though that linked issue does not specifically apply to me.

alou-S commented on 2021-09-15 16:19 (UTC) (edited on 2021-09-15 16:29 (UTC) by alou-S)

@tuxsavvy Nvm, I figured it out. Just had to add this to my xorg.conf

Section "Files"
        ModulePath "/usr/lib/nvidia/xorg"
        ModulePath "/usr/lib/xorg/modules"
EndSection

Also realized that /etc/X11/xorg.conf.d/20-nvidia.conf doesn't exist for me, coping it over from /usr/share/nvidia-340xx doesn't seem to fix the issue so had to add it to xorg.conf

tuxsavvy commented on 2021-09-15 15:17 (UTC)

@alou-S There's not enough information with regards to your issue. I have found a workaround to ensure that glxinfo -B does show my card. If this does not work, then I do not know how to solve your issue.

In my /etc/X11/xorg.conf.d/20-nvidia.conf,

# (EE) NVIDIA(0): Failed to initialize the GLX module; please check in your X
# (EE) NVIDIA(0):     log file that the GLX module has been loaded in your X
# (EE) NVIDIA(0):     server, and that the module is the NVIDIA GLX module.  If
# (EE) NVIDIA(0):     you continue to encounter problems, Please try
# (EE) NVIDIA(0):     reinstalling the NVIDIA driver.
# https://bbs.archlinux.org/viewtopic.php?pid=1702290#p1702290
# https://bugs.archlinux.org/task/53090#comment164782
Section "Files"
        ModulePath "/usr/lib/nvidia/xorg"
        ModulePath "/usr/lib/xorg/modules"
EndSection

Section "Device"
        Identifier "Nvidia Card"
        Driver "nvidia"
        VendorName "NVIDIA Corporation"
        Option "NoLogo" "1"
        BoardName "GeForce <censored>"
EndSection

Perhaps try referring to the links in lines prepended with # character.

alou-S commented on 2021-09-15 12:25 (UTC)

@tuxsavvy Hmm other than the /dev/dri listing issue and sddm issue. The other problem is that OpenGL doesn't seem to work anymore. glxinfo gives some sort of (NV-GLX) error.

tuxsavvy commented on 2021-09-14 15:26 (UTC)

@alou-S You might want to check the merge comment by package maintainer. It looks like the required /dev/dri listing may not be implemented due to security risks. Presently the only viable way is to compile a custom kernel with that CONFIG_DRM_LEGACY set.

As for sddm, the long story short is that it probably could be avoided if lightdm for instance was used instead (look for the comment by thelinuxfan).

alou-S commented on 2021-09-14 14:58 (UTC)

The latest version 340.108-23 seem to compile the kernel module right. But the old issue of sddm not able to start has come back.Card not visible in /dev/dri. Problem occurs on kernel 5.14.2 but not on 5.13.13 with the latest nvidia-340xx 340.108-23. Does anybody else have a similar issue?

ismaail commented on 2021-09-12 19:43 (UTC)

The latest upgrade nvidia-340xx (340.108-22 -> 340.108-23) works fine with Linux 5.14.2-arch1-2

Thank you.

c0mmand0x72 commented on 2021-09-12 11:14 (UTC)

@vicpt thx for the patch. I change the b2sum too in my pkgbuild and everything works fine. KUDOS to you

KrisKorn commented on 2021-09-11 15:35 (UTC) (edited on 2021-09-12 01:35 (UTC) by KrisKorn)

can't compile for kernel 5.14, it worked on previous kernels.

I leave the output of /var/lib/dkms/nvidia/340.108/build/make.log on this pastebin page https://pastebin.com/xaz1506h hopefully it will work. Thanks!!

Loy commented on 2021-09-11 10:52 (UTC) (edited on 2021-09-11 10:52 (UTC) by Loy)

@vicpt : Thanks for the last patch (kernel 5.14). But problem with b2sum on it, new sum is : a48a216dc36b104e2703372dc894c310cf6fc1eae99e6c015de1f04b61046d2d70c761531ad5b0acf9f678570688d5237db58711371ada0aed3ce0c776974f9f

Maybe the download from gitlab but sum in PKGBUILD was wrong. After that, install works perfectly :)

vicpt commented on 2021-09-11 03:36 (UTC)

@JerryXiao I tried a resend for another address. If you for some reason don't receive, I will try later link it here directly or open a merge request on gitlab repo.

vicpt commented on 2021-09-11 02:18 (UTC)

@JerryXiao Sent through email, but apparently email got returned. No idea why. (was sent to the e-mail address in your profile)

JerryXiao commented on 2021-09-11 02:03 (UTC)

@vicpt I have not received anything yet. The better way would be to send a patch here or to open a merge request at https://gitlab.com/taz007/nvidia-340xx.

vicpt commented on 2021-09-11 01:44 (UTC)

@JerryXiao I'm not sure if you are interested, but I sent you a patch for the new 5.14 Kernel.

Viterzgir commented on 2021-09-10 13:38 (UTC)

With kernel 5.14 i have an error while building /home/serge/Downloads/nvidia-340xx/src/NVIDIA-Linux-x86_64-340.108-no-compat32/kernel/nv-drm.c:60:10: fatal error: drm/drm_agpsupport.h: No such file or directory 60 | #include <drm/drm_agpsupport.h> | ^~~~~~~~~~~~~~~~~~~~~~ compilation terminated

piquer commented on 2021-08-07 11:03 (UTC)

Thanks for keeping this package alive! Very much appreciated.

MegaDeKay commented on 2021-08-06 01:55 (UTC)

@taz-007 Your repo worked perfectly on my laptop running 5.13, including SDDM. This lazy person thanks you :-)

taz-007 commented on 2021-07-25 08:30 (UTC)

dup line should be fixed now

ismaail commented on 2021-07-24 16:35 (UTC)

in PKGBUILD, the line 32 is duplicated.

b2sums=('6538bbec53b10f8d20977f9b462052625742e9709ef06e24cf2e55de5d0c55f1620a4bb21396cfd89ebc54c32f921ea17e3e47eaa95abcbc24ecbd144fb89028'
        'a0266d62a742f8ecd96be767b66af169c09428ba3f718efa1e36f2c69303e35b6437503381b041dd3a88fa86eb82909f8cbf209dbba4a5658fd7bb220a852000'
        '7150233df867a55f57aa5e798b9c7618329d98459fecc35c4acfad2e9772236cb229703c4fa072381c509279d0588173d65f46297231f4d3bfc65a1ef52e65b1'
        'b436095b89d6e294995651a3680ff18b5af5e91582c3f1ec9b7b63be9282497f54f9bf9be3997a5af30eec9b8548f25ec5235d969ac00a667a9cddece63d8896'
        '947cb1f149b2db9c3c4f973f285d389790f73fc8c8a6865fc5b78d6a782f49513aa565de5c82a81c07515f1164e0e222d26c8212a14cf016e387bcc523e3fcb1'
        '665bf0e1fa22119592e7c75ff40f265e919955f228a3e3e3ebd76e9dffa5226bece5eb032922eb2c009572b31b28e80cd89656f5d0a4ad592277edd98967e68f'
        '344cd3a9888a9a61941906c198d3a480ce230119c96c72c72a74b711d23face2a7b1e53b9b4639465809b84762cdc53f38210e740318866705241bc4216e4f35')
        '344cd3a9888a9a61941906c198d3a480ce230119c96c72c72a74b711d23face2a7b1e53b9b4639465809b84762cdc53f38210e740318866705241bc4216e4f35')
_pkg="NVIDIA-Linux-x86_64-${pkgver}-no-compat32"

removing the line 33 fixes the issue.

bigbruno commented on 2021-07-24 16:15 (UTC)

I tested it at that time:

Building nvidia-340xx... /var/tmp/pamac-build-bruno/nvidia-340xx/PKGBUILD: line 33: syntax error near unexpected token )' /var/tmp/pamac-build-bruno/nvidia-340xx/PKGBUILD: line 33: '344cd3a9888a9a61941906c198d3a480ce230119c96c72c72a74b711d23face2a7b1e53b9b4639465809b84762cdc53f38210e740318866705241bc4216e4f35')' ==> ERROR: Failed to source /var/tmp/pamac-build-bruno/nvidia-340xx/PKGBUILD

RottenSchnitzel commented on 2021-07-24 15:52 (UTC) (edited on 2021-07-24 16:59 (UTC) by RottenSchnitzel)

There is a Syntax Error in the PKGBUILD (line 32 duplicate)

taz-007 commented on 2021-07-24 10:08 (UTC)

for the lazy people who cant wait (like me), I've updated the repo with the mentioned patch from the comments and pushed it to a temp branch on https://gitlab.com/taz007/nvidia-340xx . Tested the dkms package on 5.13.4 kernel, sddm is working.

NSLW commented on 2021-07-18 19:26 (UTC)

@piquer Please look at the official repo at https://github.com/rpmfusion/nvidia-340xx-kmod and particulary at https://github.com/rpmfusion/nvidia-340xx-kmod/blob/master/kernel-5.11.patch The maintainer of this repo decided to reformat my two patches into a single patch, but other than that it should be the same content. The patch is already merged and public to all Fedora users, so it works.

alou-S commented on 2021-07-18 10:18 (UTC)

Okay the patch from the particular nuked commit you gave worked perfectly. Somebody needs to update the AUR package now.

piquer commented on 2021-07-18 07:49 (UTC)

There seems to have been a force push on https://github.com/wojnilowicz/nvidia-340xx-kmod master a couple of days after I pulled it. I'm using

commit 621934ffcc439c9873e2ebe8acda7ad440813981 (HEAD -> master)
Author: Łukasz Wojniłowicz <lukasz.wojnilowicz@gmail.com>
Date:   Mon May 24 21:00:11 2021 +0200

    Initialize nvidia-drm on kernel-5.11

    Makes /dev/dri/card0 appear again and enables sddm to show greeter.

which is the file posted below, except editing the diff headers as mentioned in https://aur.archlinux.org/pkgbase/nvidia-340xx/?O=10&PP=10#comment-809967.

The current head of master is

commit 148afb60f2bc4850b50cb8c2cc9455885dff1ac9 (origin/master, origin/HEAD)                                                                                                                                 
Author: Łukasz Wojniłowicz <lukasz.wojnilowicz@gmail.com>
Date:   Mon May 24 21:00:11 2021 +0200

    Initialize nvidia-drm on kernel-5.11

    Makes /dev/dri/card0 appear again and enables sddm to show greeter.

    Code in import-files-from-390.143.patch and conftest.Kbuild comes from
    NVIDIA-Linux-x86_64-390.143.run.

About this change one would have to ask Łukasz I guess.

└─>  git --no-pager diff --stat 148afb6 621934f                                                                                                                                                        129 <
 import-files-from-390.143.patch | 7221 --------------------------------------------------------------------------------------------------------------------------------------------------------------------
 kernel-5.11.patch               | 1490 +++-------------------------------
 nvidia-340xx-kmod.spec          |   11 +-
 3 files changed, 122 insertions(+), 8600 deletions(-)

alou-S commented on 2021-07-18 05:58 (UTC)

@piquer The patch you have mentioned is different from the one found in https://github.com/wojnilowicz/nvidia-340xx-kmod

I also checked the original repo by rpmfusion but even that is not similar to the patch you used.

Is it possible for you to give the source you got yours from or just give your particular patch since the one on rpmfusion doesn't work neither does the fork by wojnilowicz.

piquer commented on 2021-07-17 14:47 (UTC) (edited on 2021-07-17 14:49 (UTC) by piquer)

No, I didn't see rejected hunks. For reference, I used this patch as 0005-kernel-5.11.patch:

diff -Naur ./a/kernel/conftest.sh ./b/kernel/conftest.sh
--- NVIDIA-Linux-x86_64-340.108-old/kernel/conftest.sh  2021-05-24 20:08:18.743742335 +0200
+++ NVIDIA-Linux-x86_64-340.108-new/kernel/conftest.sh  2021-05-24 20:13:18.019314390 +0200
@@ -1578,21 +1578,21 @@
             #include <drm/drm_drv.h>
             #endif

-            #if defined(NV_DRM_DRM_PRIME_H_PRESENT)
-            #include <drm/drm_prime.h>
-            #endif
-
             #if !defined(CONFIG_DRM) && !defined(CONFIG_DRM_MODULE)
             #error DRM not enabled
             #endif
+
             void conftest_drm_available(void) {
                 struct drm_driver drv;
-                drv.gem_prime_pin = 0;
-                drv.gem_prime_get_sg_table = 0;
-                drv.gem_prime_vmap = 0;
-                drv.gem_prime_vunmap = 0;
-                (void)drm_gem_prime_import;
-                (void)drm_gem_prime_export;
+
+                /* 2013-10-02 1bb72532ac260a2d3982b40bdd4c936d779d0d16 */
+                (void)drm_dev_alloc;
+
+                /* 2013-10-02 c22f0ace1926da399d9a16dfaf09174c1b03594c */
+                (void)drm_dev_register;
+
+                /* 2013-10-02 c3a49737ef7db0bdd4fcf6cf0b7140a883e32b2a */
+                (void)drm_dev_unregister;
             }"

             compile_check_conftest "$CODE" "NV_DRM_AVAILABLE" "" "generic"
diff -Naur ./a/kernel/nv-drm.c ./b/kernel/nv-drm.c
--- NVIDIA-Linux-x86_64-340.108-old/kernel/nv-drm.c 2021-05-24 20:08:18.779739237 +0200
+++ NVIDIA-Linux-x86_64-340.108-new/kernel/nv-drm.c 2021-05-24 20:42:13.443288819 +0200
@@ -60,6 +60,8 @@
 #else
 #include <drm/drm_agpsupport.h>

+#include "linux/dma-buf.h"
+
 struct nv_drm_agp_head {
     struct agp_kern_info agp_info;
     struct list_head memory;
@@ -210,8 +212,10 @@

     /* No locking needed since shadow-attach is single-threaded since it may
      * only be called from the per-driver module init hook. */
+#if LINUX_VERSION_CODE <= KERNEL_VERSION(5, 10, 0)
     if (drm_core_check_feature(dev, DRIVER_LEGACY))
         list_add_tail(&dev->legacy_dev_list, &driver->legacy_dev_list);
+#endif

     return 0;

@@ -239,8 +243,10 @@
     if (WARN_ON(!(driver->driver_features & DRIVER_LEGACY)))
         return -EINVAL;

+#if LINUX_VERSION_CODE <= KERNEL_VERSION(5, 10, 0)
     /* If not using KMS, fall back to stealth mode manual scanning. */
     INIT_LIST_HEAD(&driver->legacy_dev_list);
+#endif
     for (i = 0; pdriver->id_table[i].vendor != 0; i++) {
         pid = &pdriver->id_table[i];

@@ -273,11 +279,13 @@
     if (!(driver->driver_features & DRIVER_LEGACY)) {
         WARN_ON(1);
     } else {
+#if LINUX_VERSION_CODE <= KERNEL_VERSION(5, 10, 0)
         list_for_each_entry_safe(dev, tmp, &driver->legacy_dev_list,
                      legacy_dev_list) {
             list_del(&dev->legacy_dev_list);
             drm_put_dev(dev);
         }
+#endif
     }
     DRM_INFO("Module unloaded\n");
 }
@@ -402,6 +410,39 @@
     .llseek = noop_llseek,
 };

+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 11, 0)
+struct sg_table *nv_drm_gem_prime_get_sg_table(struct drm_gem_object *gem)
+{
+    return nv_gem_prime_get_sg_table(gem);
+}
+
+static int nv_drm_gem_vmap(struct drm_gem_object *gem,
+                           struct dma_buf_map *map)
+{
+    map->vaddr = nv_gem_prime_vmap(gem);
+    if (map->vaddr == NULL) {
+        return -ENOMEM;
+    }
+    map->is_iomem = true;
+    return 0;
+}
+
+static void nv_drm_gem_vunmap(struct drm_gem_object *gem,
+                              struct dma_buf_map *map)
+{
+    nv_gem_prime_vunmap(gem, map->vaddr);
+    map->vaddr = NULL;
+}
+
+static struct drm_gem_object_funcs nv_drm_gem_object_funcs = {
+  .free = nv_gem_free,
+  .export = drm_gem_prime_export,
+  .get_sg_table = nv_drm_gem_prime_get_sg_table,
+  .vmap = nv_drm_gem_vmap,
+  .vunmap = nv_drm_gem_vunmap,
+};
+#endif
+
 static struct drm_driver nv_drm_driver = {

     .driver_features = DRIVER_GEM
@@ -420,17 +461,19 @@
     .set_busid = drm_pci_set_busid,
 #endif

-#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 9, 0)
-    .gem_free_object_unlocked = nv_gem_free,
-#else
+#if LINUX_VERSION_CODE <= KERNEL_VERSION(5, 8, 0)
     .gem_free_object = nv_gem_free,
+#elif LINUX_VERSION_CODE <= KERNEL_VERSION(5, 10, 0)
+    .gem_free_object_unlocked = nv_gem_free,
 #endif

     .prime_handle_to_fd = drm_gem_prime_handle_to_fd,
+#if LINUX_VERSION_CODE <= KERNEL_VERSION(5, 10, 0)
     .gem_prime_export = drm_gem_prime_export,
     .gem_prime_get_sg_table = nv_gem_prime_get_sg_table,
     .gem_prime_vmap = nv_gem_prime_vmap,
     .gem_prime_vunmap = nv_gem_prime_vunmap,
+#endif

     .name = "nvidia-drm",
     .desc = "NVIDIA DRM driver",
diff -Naur ./a/kernel/nv-linux.h ./b/kernel/nv-linux.h
--- NVIDIA-Linux-x86_64-340.108-old/kernel/nv-linux.h   2021-05-24 20:08:18.775739581 +0200
+++ NVIDIA-Linux-x86_64-340.108-new/kernel/nv-linux.h   2021-05-24 20:09:18.748287771 +0200
@@ -119,7 +119,9 @@
 #include <asm/tlbflush.h>           /* flush_tlb(), flush_tlb_all()     */
 #include <linux/cpu.h>              /* CPU hotplug support              */
 #endif
-#include <asm/kmap_types.h>         /* page table entry lookup          */
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 11, 0)
+   #include <asm/kmap_types.h>         /* page table entry lookup          */
+#endif

 #include <linux/pci.h>              /* pci_find_class, etc              */
 #include <linux/interrupt.h>        /* tasklets, interrupt helpers      */
diff -Naur ./a/kernel/uvm/nvidia_uvm_linux.h ./b/kernel/uvm/nvidia_uvm_linux.h
--- NVIDIA-Linux-x86_64-340.108-old/kernel/uvm/nvidia_uvm_linux.h   2021-05-24 20:08:18.775739581 +0200
+++ NVIDIA-Linux-x86_64-340.108-new/kernel/uvm/nvidia_uvm_linux.h   2021-05-24 20:09:18.749287739 +0200
@@ -141,7 +141,9 @@
 #if !defined(NV_VMWARE)
 #include <asm/tlbflush.h>           /* flush_tlb(), flush_tlb_all()     */
 #endif
-#include <asm/kmap_types.h>         /* page table entry lookup          */
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 11, 0)
+   #include <asm/kmap_types.h>         /* page table entry lookup          */
+#endif

 #include <linux/interrupt.h>        /* tasklets, interrupt helpers      */
 #include <linux/timer.h>

graysky commented on 2021-07-16 17:19 (UTC)

I don't have the hardware nor extra time for this anymore. Someone else can step up to bat.

alou-S commented on 2021-07-16 15:21 (UTC) (edited on 2021-07-16 15:51 (UTC) by alou-S)

@piquer @NSLW Did you get any errors during the build?

During patching I get the following error:

Hunk #3 FAILED at 139.
1 out of 9 hunks FAILED -- saving rejects to file kernel/nv-drm.c.rej

Ignoring the error and further continuing ends up with it erroring while building the kernel module.

johnstef commented on 2021-06-20 03:57 (UTC) (edited on 2021-06-21 13:33 (UTC) by johnstef)

I am trying to run a program and I get this

Check failed: gl_version_string. The GL proc resolver's glGetString(GL_VERSION) failed

But if I switch to nouveau driver the program runs just fine. So I has to be this driver that causing the problem.. Any idea?

JerryXiao commented on 2021-06-17 01:23 (UTC)

It's sad that the simplest and cleanest solution is written out there and nobody listens.

AlexJ commented on 2021-06-16 20:12 (UTC)

@tioguda OK. I have removed 2 of my comments and I have found a solution.

MANJARO error: " ==> Starting build()... NVIDIA: calling KBUILD... make[1]: Entering directory '/usr/src/linux' make[1]: No rule to make target 'modules'. Stop. make[1]: Leaving directory '/usr/src/linux' NVIDIA: left KBUILD. nvidia.ko failed to build! make: [Makefile:202: nvidia.ko] Error 1 ==> ERROR: A failure occurred in build(). Aborting... "

FIX: "cd /lib/modules/$(uname -r)/build/ | echo $(uname -r) | sudo tee version > /dev/null | sudo ln -s /lib/modules/$(uname -r)/build /usr/src/linux"

tioguda commented on 2021-06-16 11:47 (UTC)

@AlexJ if you read the comments, you'll get to mine where I mention what I change to compile for Manjaro.

And remember, AUR is not a forum, so avoid spamming your build errors.

Greetings.

AlexJ commented on 2021-06-11 09:11 (UTC)

@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 (UTC)

@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 (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?

Filkolev commented on 2021-05-17 20:12 (UTC)

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

M4rty commented on 2021-05-17 15:02 (UTC)

@auriculaire Thanks, it works !

auriculaire commented on 2021-05-17 13:54 (UTC)

M4rty@ Same observation.: ==> Warning, dkms install --no-depmod -m nvidia -v 340.108 -k 5.12.4-arch1-2' returned 10 ==> Warning,dkms install --no-depmod -m nvidia -v 340.108 -k 5.10.37-1-lts' returned 10


You just have to reinstall the module nvidia-340xx-dkms 340.108-19, by ssh for example.

M4rty commented on 2021-05-17 13:07 (UTC)

Hi ! The driver don't work for me with 5.10.37-1-lts (arch, lightdm). It works perfect with 5.10.36

holyArch commented on 2021-05-16 10:28 (UTC)

340.108-19 seems to be working fine with 5.12.3.arch1-1 (e.g. VDPAU works).

I didn't have to change anything in /etc/X11/xorg.conf.d/20-nvidia.conf (I have no /etc/X11/xorg.conf).

Section "Files"
    ModulePath "/usr/lib/nvidia/xorg,/usr/lib/xorg/modules"
EndSection

also works in 20-nvidia.conf.

johnstef commented on 2021-05-14 22:16 (UTC) (edited on 2021-05-14 22:17 (UTC) by johnstef)

PROBLEM SOLVED The thing is that it was working perfectly on 5.11 and broke on 5.12 so my xorg.conf couldn't be the reason. The problem is that I ran nvidia-xconfig which ruined my xorg.conf that I had created back when I updated to 5.11.

The 20-nvidia.conf is not working, all I had to do is to use this minimal config or just add this

Section "Files"
  ModulePath   "/usr/lib64/nvidia/xorg"
  ModulePath   "/usr/lib64/xorg/modules"
EndSection

at the top of xorg.conf. So I can confirm that it's working perfectly on kernel 5.12

jayache80 commented on 2021-05-14 20:50 (UTC) (edited on 2021-05-14 20:51 (UTC) by jayache80)

@johnstef 5.11 would have the same issues as 5.12. If you want to go back to an old kernel, go to 5.10 using linux-lts and point your bootloader at that kernel. However, I'll bet you just have a bad X11 config like I did.

I can't tell- are you using Wayland and getting these errors via an Xwayland session? Or just regular X11? I only ask because it seems Wayland and nvidia will never get along.

I had essentially identical errors as you, and I was able to fix it by correcting a bad xorg.conf configuration. The nvidia ModulePath needs to be above the default xorg one. Something like:

Section "Files"
  ModulePath   "/usr/lib64/nvidia/xorg"
  ModulePath   "/usr/lib64/xorg/modules"
EndSection

I can't say for sure whether or not you should accomplish this by directly modifying /etc/X11/xorg.conf (like I do) or by placing an "overlay" config file (like the /usr/share/nvidia-340xx/20-nvidia.conf provided in this package) into the /etc/X11/xorg.conf.d directory. It depends on your existing configuration and how any existing ModulePath entries may be stepping on each other.

The goal is for X11 to have nvidia-specific hardware acceleration libraries (libEGL, libGL, etc.) available at runtime otherwise you'll get those errors.

(It is probably an upstream bug that allows a double free to occur when a library is missing instead of gracefully failing, but I digress).

johnstef commented on 2021-05-14 19:45 (UTC) (edited on 2021-05-14 19:47 (UTC) by johnstef)

I installed kernel 5.12 and I get the message that EGL could not be initialized on mpv and other apps.

[vo/gpu] Probing for best GPU context.
[vo/gpu/opengl] Initializing GPU context 'wayland'
[vo/gpu/opengl] Initializing GPU context 'x11egl'
[vo/gpu/x11] X11 opening display: :0
[vo/gpu/x11] Display 0 (HDMI-0): [0, 0, 1920, 1080] @ 60.000000 FPS
[vo/gpu/x11] Current display FPS: 60.000000
[vo/gpu/opengl] Could not initialize EGL.
free(): double free detected in tcache 2

I tried downgrading back to 5.11 but that error still exist! Do I have to do anything special to go back to the old kernel?

deimon commented on 2021-05-11 01:21 (UTC)

It works perfect, I had kernel 5.11 with driver 340.108-18 I did not have to modify anything.

graysky commented on 2021-05-10 15:03 (UTC)

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.

auriculaire commented on 2021-05-10 14:22 (UTC)

@graysky I noted the advice that was given after installing the module on kernel 5.11: "-> You must tell Xorg to use the nvidia driver with kernels >=5.11.0. -> Minimal xorg config example: /usr/share/nvidia-340xx/20-nvidia.conf -> To place in /etc/X11/xorg.conf.d/ " In fact, as @jayache80 pointed out, it is in /etc/X11/xorg.conf (and not in xorg.conf.d/) that the "Files" section must be filled in. However, I am not able to conclude whether 20-nvidia.conf is mandatory or not. I don't remember to create it myself... Thanks to you. Sincerely.

Translated with www.DeepL.com/Translator (free version)

lucasrizzini commented on 2021-05-10 14:11 (UTC)

Not specifically.

graysky commented on 2021-05-10 13:45 (UTC)

I have not been following this closely. Is 20-nvidia.conf a requirement for all setups of this driver with 5.12? Should the package provide an equivalent?

auriculaire commented on 2021-05-10 13:07 (UTC)

@jayache80 Thank you so much! ...I just added to my xorg.conf the two lines you mention, and archlinux with the latest kernel (uname -mr = 5.12.2-arch1 x86_64) boots well on lightdm and gdm for xfce, gnome and kde. Only sddm doesn't want to show up... Sincerely

jayache80 commented on 2021-05-09 10:09 (UTC) (edited on 2021-05-09 23:36 (UTC) by jayache80)

I'm an idiot. The order of ModulePath entries was somehow incorrect in my xorg.conf:

As in the provided 20-nvidia.conf, and is nicely called out to the user upon installing this driver, it absolutely needs to be:

Section "Files"
  ModulePath   "/usr/lib64/nvidia/xorg"
  ModulePath   "/usr/lib64/xorg/modules"
EndSection

However, somehow I had it reversed. The following is WRONG:

Section "Files"
  ModulePath   "/usr/lib64/xorg/modules"
  ModulePath   "/usr/lib64/nvidia/xorg"
EndSection

Sorry for all the noise.

The following can be ignored as it was totally a red herring. DRM is just different now and you can expect that it will be initialized differently and you won't see the same system log output in 5.11+ as 5.10.

I think I know why I'm having problems on 5.11/5.12 but not 5.10. I noticed in the system log on 5.10 that DRM is getting initialized properly:

[drm] Initialized nvidia-drm 0.0.0 20150116 for 0000:02:00.0 on minor 0

However, no such output in 5.11/5.12 when using this kernel module. That stuff is taken care of in nv-drm.c starting essentially with the call to nv_drm_pci_init from nv_drm_init but only #if defined(NV_DRM_AVAILABLE). I proved it wasn't being called with some printk's.

Something seems a little strange with the build system as that is defined in 5.10 but is not defined when building 5.11/5.12. I even added

#define NV_DRM_AVAILABLE

to the top of nv-drm.c to no avail. It's probably something really simple and I'll bet this will fix my issues (but I don't know about anyone else's).

Anyone know what's up with that define?

MegaDeKay commented on 2021-05-08 15:03 (UTC)

Back in March on 5.11, people were having luck with GTK based greeters but Qt based ones weren't working (e.g. SDDM). So Googling around the error that @jayache80 reported, I found some references to people having weird problems with Qt that were fixed with setting QT_X11_NO_MITSHM=1 in someplace like /etc/environment. Maybe this explains why some people have luck and some don't? I'll admit that this is far-fetched, but it might be worth a shot given that it is low effort to try. The rabbit hole I went down are in the links below. Disabling the nvidia splash screen with Option "NoLogo" "1" in xorg.conf might not help, but it wouldn't hurt either.

https://forum.mxlinux.org/viewtopic.php?t=53653

https://forum.mxlinux.org/viewtopic.php?f=108&t=53603&start=10

https://ubuntuforums.org/showthread.php?t=2423870

auriculaire commented on 2021-05-08 13:46 (UTC)

I think that linux arch users who use this module have been running on linux-lts since the arrival of the latest 5.11.x and 5.12.x kernels with which for me this module has never been operational ..... I read the comments every day while waiting for the miracle solution. Have a good day and good luck everyone.

tioguda commented on 2021-05-08 11:55 (UTC)

This is the change I make to compile for Manjaro, I believe that there is no significant change that I have not reported here before.

graysky commented on 2021-05-08 10:56 (UTC)

I'm not sure what I can do with your reply. You're modifying the PKGBUILD I provide to build without dkms on a foreign distro and you're reporting that it works. You're not sharing the code you're using to do this so it's impossible to make a comparison back to help users of Arch build via dkms.

What if you uninstall your non-dkms tweaked package and try building with this unmodified. Does that build? If so do it give a functional module?

tioguda commented on 2021-05-08 10:53 (UTC) (edited on 2021-05-08 10:54 (UTC) by tioguda)

Yes, they abandoned it, but I am using this package as a base to build one for Manjaro.

This driver is starting/working with the Manjaro (Gnome) 5.12 kernel and the Zen kernel (compiled locally).

As I mentioned before, I use this package as a base, since small changes are needed to compile the non-dkms module in Manjaro.

Greetings.

graysky commented on 2021-05-08 10:28 (UTC)

I am unfamiliar with manjaro but I thought they dropped this driver a while ago. Are you using the 5.12 kernel there where you report a functional driver? Is it this package you're using to build the kernel module?

tioguda commented on 2021-05-08 01:17 (UTC)

@graysky could you tell me a test to make sure everything is fine with the 5.12 kernel?

In Manjaro Gnome the system starts and I don't have the problems reported by @jayache80. In Plasma I can only start via startx on tty2, I haven't tested it with Xfce.

Greetings.

graysky commented on 2021-05-07 12:39 (UTC)

OK, if this doesn't give a functional module for the 5.12 series of kernels, we need to either 1) identify someone else's work to fix it (ie a patch from another distro or person), or 2) we need someone with expertise to fix it for us. I am not that someone nor do I have any hardware for testing.

nahno commented on 2021-05-07 03:59 (UTC)

I can confirm 2). Tested yesterday. My machine (xfce4) stills runs on Linux 5.11.7 without any issues though.

graysky commented on 2021-05-06 18:33 (UTC)

So there are two independent issues:

1) The patch shared by @qileilu is for the 460 series of drivers and not applicable to this version. 2) The package is-as does not work under 5.12.

Can someone else confirm point #2 is valid? If so, we will need to identify the reason why and see if a known fix is out there.

m31aur commented on 2021-05-06 16:09 (UTC)

Whilst it builds without errors on 5.12, the system is unusable. At least with xfce4 that I am using. (xfwm fails to start). It works brilliantly on 5.10

lucasrizzini commented on 2021-05-06 12:50 (UTC)

The patch below is for 460 version..

graysky commented on 2021-05-06 11:00 (UTC)

I thought this worked with 5.12 without patches. It certainly builds which is all I can do testing-wise.

qileilu commented on 2021-05-06 04:42 (UTC) (edited on 2021-05-06 04:43 (UTC) by qileilu)

Tested,the patch for 5.12 is available. http://rglinuxtech.com/?p=2896 https://gist.githubusercontent.com/joanbm/7a034ac4b79396c3841040e410ef7e91/raw/b21e792dc0b6f891a4a83d182e0ba9b24b36bd80/nvidia-fix-linux-5.12.patch

jayache80 commented on 2021-05-02 23:31 (UTC)

I tried the 5.12 kernel from testing repo and have the same results. X11 starts fine, however graphics acceleration doesn't work properly. I still get the same libEGL-related double free coredump when using mpv (as seen in my previous comment). Some other datapoints: screen tearing exists (where it didn't before) and I cannot start gears, receiving the following error output:

X Error of failed request:  BadWindow (invalid Window parameter)
  Major opcode of failed request:  155 (NV-GLX)
  Minor opcode of failed request:  4 ()
  Resource id in failed request:  0x2400002
  Serial number of failed request:  56
  Current serial number in output stream:  56

nikola_cz commented on 2021-04-28 10:10 (UTC)

The same result in arch with dkms driver. Works without 5.12 patch.

tioguda commented on 2021-04-27 13:20 (UTC) (edited on 2021-04-27 17:26 (UTC) by tioguda)

I use Manjaro Gnome, and the driver (not dkms) compiled and started at 5.12 as it was starting at 5.11 (there was no need for a patch for 5.12).

Greetings.

MegaDeKay commented on 2021-04-20 14:18 (UTC)

I have not tried this myself, but it seems some Ubuntu users are having success using graysky's patches that I assume are the same as those here.

https://bugs.launchpad.net/ubuntu/+source/nvidia-graphics-drivers-340/+bug/1916640

That thread points to this link on editing xorg.conf https://launchpad.net/~kelebek333/+archive/ubuntu/nvidia-legacy

There also seems to be a patch ready to go for 5.12 http://rglinuxtech.com/?p=2896

Any brave folks want to give this a shot?

jayache80 commented on 2021-04-19 00:34 (UTC) (edited on 2021-04-19 04:31 (UTC) by jayache80)

Confirming that none of the 5.11.x kernels work well for me with this driver on my machine (mid-2009 macbook pro with 9400M). I moved back to a 5.10 kernel (I had 5.10.16 handy) and that fixed my issue. To be clear, with this driver and a 5.11 kernel, I can start X11 just fine, however I'm having issues with libEGL. mpv can't play movies because a double free crash occurs:

free(): double free detected in tcache 2
Aborted (core dumped)

With this backtrace:

#0  0x00007ff290e62ef5 in raise () from /usr/lib/libc.so.6
#1  0x00007ff290e4c862 in abort () from /usr/lib/libc.so.6
#2  0x00007ff290ea4f38 in __libc_message () from /usr/lib/libc.so.6
#3  0x00007ff290eacbea in malloc_printerr () from /usr/lib/libc.so.6
#4  0x00007ff290eae6c8 in _int_free () from /usr/lib/libc.so.6
#5  0x00007ff290eb1ca8 in free () from /usr/lib/libc.so.6
#6  0x00007ff293b90719 in ?? () from /usr/lib/nvidia/libEGL.so.1
#7  0x00007ff293b90f15 in ?? () from /usr/lib/nvidia/libEGL.so.1
#8  0x00007ff293b98fd6 in ?? () from /usr/lib/nvidia/libEGL.so.1
#9  0x00005561599fd7fc in ?? ()
#10 0x00005561599db014 in ?? ()
#11 0x0000556159a077a3 in ?? ()
#12 0x0000556159a043e1 in ?? ()
#13 0x00007ff293ea0299 in start_thread () from /usr/lib/libpthread.so.0
#14 0x00007ff290f25053 in clone () from /usr/lib/libc.so.6

lucasrizzini commented on 2021-04-17 17:52 (UTC)

Doesn't work on 5.11 here too.

JackFrost commented on 2021-04-16 05:52 (UTC)

linux-5.11.14.arch1-1-x86_64 with nvidia-340xx 340.108-18 does not work for me (ga-p35-ds3, gtx260, sddm, plasma)

mischa commented on 2021-04-13 21:47 (UTC)

The driver works with kernel 5.11.13 on my ThinkPad T61p (gdm and plasma), not on my AMD desktop

susanne commented on 2021-04-13 08:18 (UTC)

"Anyone please can confirm are there troubles or not with this driver and linux 5.11.13.arch1-1" - yes, me, my Thinkpad R61 only works with this driver on lts-kernel

hackins commented on 2021-04-12 19:41 (UTC) (edited on 2021-04-12 19:42 (UTC) by hackins)

Anyone please can confirm are there troubles or not with this driver and linux 5.11.13.arch1-1

jester commented on 2021-03-27 21:58 (UTC)

Today I have updated the system with pacman and I have Graphic mode again. I use XFCE and LXDM, now I can write the password and everything seems Ok, but when I open an application, window manager is not working and I don't have the windows controls.

I tried to execute xfwm4 or xfwm4 --replace but I get the error gtk-warning cannot open display:

With a ps xfwm4 process does not appear.

leopseft commented on 2021-03-27 20:06 (UTC)

@tioguda you gave me such a great idea man!!

I completely disabled the DM, I changed the default target to multiuser.target (instead of graphical target) then configured a minimal .xinitrc to start properly the KDE and in the end I automatized startx to autostart after login and finally automatized login user with systemd.service!! Got rid off DMS for good!!

You Rule man! Keep it simple brothers!!

ansgoati commented on 2021-03-27 19:59 (UTC)

@leopseft @auriculaire I just trying to get the nvidia package work, on kernel 5.11.8 i was able to switch to nouveau maintaining the nvidia but after the upgrade and installing the lts kernel xinit can't start, i have sddm.

auriculaire commented on 2021-03-27 16:13 (UTC)

@ansgoati Personally, I didn't try to reinstall "nouveau" because my graphics card (GeForce 9400/integrated/SSE2) is too old, and I know that my pc (mac) often crashed when I first installed archlinux with "nouveau" by default. However, @leopseft gives you a good direction that you can refine by searching the internet. Sorry about that.

leopseft commented on 2021-03-27 04:45 (UTC) (edited on 2021-03-27 04:49 (UTC) by leopseft)

@ansgoati If you want to use nouveau I assume you have already deleted any nvidia.conf in xorg.d, right?

Just tried with the sddm update and the 5.11.10 kernel and still nothing.

Should we report a bug in upstream? Or it will be ignored because it is Nvidia related??!!

tioguda commented on 2021-03-27 01:56 (UTC)

I have been using it without problems since the 5.11.2 kernel, but it is in Manjaro Gnome, another user reported that Manjaro Xfce is starting well too.

I also had to make the change mentioned in my other comment here.

In KDE I can start with startx from tty2.

Greetings.

ansgoati commented on 2021-03-27 01:39 (UTC)

@auriculaire i've installed the lts kernel, recompile the nvidia package and now i can't even use nouveau. What could happen ? What i need to put on Xorg ?? Thanks

auriculaire commented on 2021-03-25 16:25 (UTC)

@leopseft : Yes of course. In fact, with lightdm, only xfce can connect but crashes. Maybe because of the background... But the problem is not due to the kernel nor to the cross-desktop but to the package: nvidia-340xx-dkms 340.108-18 on kernel 5.11....Good day.

leopseft commented on 2021-03-25 14:48 (UTC)

@auriculaire did you add a greeter for Lightdm as well?

auriculaire commented on 2021-03-25 14:43 (UTC)

Lightdm works...(kernel 5.11...) yes, but then no connection is made for desktops like XFCE, Gnome, Cinnamon, KDE plasma ... (same with gdm or sddm)...... But fortunately on Linux-lts (kernel 5.10....) : everything works. Thanks.

thelinuxfan commented on 2021-03-24 05:16 (UTC)

@mischa : I switched to lightdm and it worked!

There's definitely some bug somewhere with SDDM or maybe some configuration changes that are needed and are missing.

mischa commented on 2021-03-23 18:31 (UTC)

Just tested kernel 5.11.8 on my two machines that had issues with 5.11.2: One (Intel notebook) worked with gdm, the other (AMD desktop) not, but none of them work with sddm.

leopseft commented on 2021-03-23 15:34 (UTC) (edited on 2021-03-23 15:54 (UTC) by leopseft)

@thelinuxfan Yes

Just tested with lightdm (with gtk-greeter) and it worked!! So indeed it is SDDM guys...

thelinuxfan commented on 2021-03-23 03:59 (UTC)

@leopseft : Are you using SDDM?

leopseft commented on 2021-03-21 16:45 (UTC)

@thelinuxfan the thing is that we don't have trace the exact problem.

thelinuxfan commented on 2021-03-21 04:59 (UTC)

@leopseft : No luck on my setup either.

Guess we will have to wait for 5.12?

leopseft commented on 2021-03-20 21:17 (UTC)

Still nothing with 5.11.7

I tried both with lib64 and with lib path with no luck.

Does anyone has any updates for the issue?

thelinuxfan commented on 2021-03-15 05:58 (UTC)

Anyone got a chance to try this with 5.11.6?

leopseft commented on 2021-03-09 13:18 (UTC) (edited on 2021-03-09 14:12 (UTC) by leopseft)

While we are waiting for the fix, does anyone knows if DRM works with this driver?? (nvidia-drm.modeset=1 kernel parameter)

Also I wanted to ask you guys, do you "lose" memory with this driver? I 've noticed that if you change from Nouveau to proprietary Nvidia I "lose" about 300mb which goes to shared memory!

thelinuxfan commented on 2021-03-09 04:50 (UTC) (edited on 2021-03-09 09:03 (UTC) by thelinuxfan)

Gonna try with 5.11.4

Will update on this thread.

EDIT: No luck with 5.11.4 either

mischa commented on 2021-03-06 13:11 (UTC) (edited on 2021-03-06 13:12 (UTC) by mischa)

@thelinuxfan: the same issues here: the driver does not work with kernel 5.11.2 on two very different machines of mine (AMD desktop and Intel notebook), but it works fine with the lts-kernel (5.10.19-1 and 5.10.20-1) on both.

M4rty commented on 2021-03-04 23:59 (UTC)

@graysky Thank you very much for this package ! Everything works perfect with 5.11.2

thelinuxfan commented on 2021-03-04 12:34 (UTC) (edited on 2021-03-04 13:28 (UTC) by thelinuxfan)

Does anybody know if we still have the same set of issues with 5.11.2?

twobooks commented on 2021-03-03 05:22 (UTC)

@graysky Thank you very much for your work. my SDDM process works, but found GPU0 stopped ==> /var/log/Xorg.0.log stopped SDDM, and started XDM, everything back to normal

thelinuxfan commented on 2021-03-01 04:40 (UTC) (edited on 2021-03-09 04:51 (UTC) by thelinuxfan)

@graysky : Thanks a lot for maintaining this and spending time on this.

Update : I have tried lxdm, sddm & lightdm.

None of them 'work properly' with 5.11.

With sddm & lxdm, DMs don't come up. LightDM comes up, lets me log in, but doesn't load the driver, resulting in a broken GUI.

I have also tried adding the ModulePath directly to xorg.conf, adding 20-nvidia.conf file to xorg.conf.d in both locations, /etc & /usr. None of them help.

With 5.10-lts, things work fine with all three DMs.

@tigouda : I tried that too, but didn't help.

tioguda commented on 2021-02-28 15:08 (UTC)

On my Manjaro Gnome it only worked after i used /usr/lib/ instead of /usr/lib64/

m31aur commented on 2021-02-28 10:22 (UTC)

@graysky Thank you very much for your work. Much appreciated.

There are a number of reported issues with the driver and 5.11 ie login managers window managers, xfwm4 and possibly other I am not aware of. The driver works fine on lts. Could it be the 5.11 patch?

esturiano commented on 2021-02-28 01:47 (UTC)

(5.11 + 20-nvidia.conf) I replaced SDDM with lightdm, lightdm started, but after that the plasma session (X11-plasma) did not start - dark screen. Downgraded to linux-lts (5.10).

bieel1503 commented on 2021-02-27 20:51 (UTC) (edited on 2021-02-27 20:51 (UTC) by bieel1503)

@leopseft SDDM does not work, for some reason. i tried lightdm, just for the sack of it and it worked. try: 'sddm --test-mode' for some output.

Like @vicpt said, let's keep this space for the NVIDIA driver, but do share if you find a way to make it work.

leopseft commented on 2021-02-27 19:51 (UTC) (edited on 2021-02-27 19:54 (UTC) by leopseft)

Downgraded to 5.10 Kernel.

With Kernel 5.11 I tried both adding the

{{ Section "Files" ModulePath "/usr/lib64/nvidia/xorg" ModulePath "/usr/lib64/xorg/modules" EndSection }}

and renaming the identifier in device section as mentioned (from Device0 to Nvidia Card) with no luck at all!

Also tried keeping only the minimal config in case that something else on the previous working config breaks but with no luck either.

I don't know if it's SDDM problem or Xorgs (I do use SDDM too) but I know for sure that previous kernel works!!

vicpt commented on 2021-02-27 05:29 (UTC)

Good to know you guys figured it out.

But lets remember this thread is not for discussing display managers or window managers. The best would be a wiki entry explaining all your specific DM and WM configs and tweaks.

Let's keep this space to talk about the NVIDIA driver.

CourteousGeek commented on 2021-02-27 04:59 (UTC)

Alright is seems that sddm might be the culprit with 5.11 kernel not showing. I went and disabled sddm login manager and installed lightdm-gtk-greeter and enabled it with systemctl and rebooted to linux 5.11 and works just fine.

CourteousGeek commented on 2021-02-27 04:51 (UTC) (edited on 2021-02-27 04:52 (UTC) by CourteousGeek)

Update - It seems that sddm desktop manager does want to show up on 5.11 but on 5.10 it works fine. So my idea is what if i just launch plasma desktop without a desktop manager. I stopped sddm with systemctl. I made my ~/.xinitrc i type in "exec startplasma-x11" for xorg and saved and exit. I typed in "startx startplasma-x11" and boom plasma DE worked so i might have a feeling that sddm or something is the cause of the issue. I gonna have to test other login managers or desktop manager to see what up. But i finally managed to get to the desktop with 5.11 kernel.

vicpt commented on 2021-02-27 03:04 (UTC)

@CourteousGeek without providing dmesg logs or Xorg logs I can't help you. @esturiano I don't use SDDM.

I don't want to spam the thread with useless messages. If you guys want I can try help. I'm on Freenode and matrix.org

esturiano commented on 2021-02-27 02:52 (UTC)

@vicpt I saw your сcomments in step 15 and did everything as you suggested. But the SDDM does not start. Yours starts, but several users report that it does not.

CourteousGeek commented on 2021-02-27 01:41 (UTC)

@vicpt I've tried but can't to get passed the tty,i have added the xorg config in /etc/X11/xorg.conf.d/20-nvidia.conf correct with syntax and permissions seems normal, i can't get an Xorg log because sddm needs to be started. 5.10 works normal but 5.11 don't.

vicpt commented on 2021-02-26 23:52 (UTC)

@Zappo-II for older kernels the best approach is building yourself. For 5.4 you have all you need here: https://aur.archlinux.org/cgit/aur.git/tree/?h=nvidia-340xx&id=3a9e967aea20f3d3ab5e551b90bad8155a34d248

vicpt commented on 2021-02-26 23:42 (UTC)

@ansgoati it should work, check your config file ownership and permissions (and syntax if you wrote by yourself). If all good and still not work, check your Xorg logs to see whats going on.

vicpt commented on 2021-02-26 23:28 (UTC)

@esturiano not a driver problem, driver works as expected on 5.11.

vicpt commented on 2021-02-26 23:17 (UTC)

@graysky -18 works as expected. Message informing the user about the need of config file and a respective minimal (template) config file is the best approach in my opinion. Otherwise if installed automatically can break user specific configurations. So in sum, its all ok and working on kernel 5.11.

esturiano commented on 2021-02-26 14:28 (UTC)

I temporarily switched to 5.10.18-1-lts. Everything works fine with the nvidia-340xx-lts-dkms. I hope that the driver will start working on 5.11. I'm really looking forward to it. @graysky thanks for your time and work.

Zappo-II commented on 2021-02-26 11:09 (UTC)

Sorry for dumb asking, will these and later versions continue to work with linux 5.10 or doesn't anybody care for earlier kernels...??? ...as far as I can see it won't work with 5.4 LTS anymore, does it...??? By the way @graysky: Mate, thanx for all your dedication for maintaining this package that I am using for ages with my Lenovo Laptop, you're my hero...

graysky commented on 2021-02-26 10:53 (UTC)

@esturiano - Yes, only change. Use the 'view changes' to see: https://aur.archlinux.org/cgit/aur.git/commit/?h=nvidia-340xx&id=5a1d96c9bb7362b6262a4a90624c8ce74c29f996

fvsc commented on 2021-02-26 10:30 (UTC)

I had the same problem sddm not starting. I downgraded to kernel 5.10.16-arch1-1 together with nvidia-340xx-dkms 340.108-18 and sddm is OK now.

So maybe the problem is in the kernel patch.

esturiano commented on 2021-02-26 02:59 (UTC)

Dear @graysky. First thank you for Your work. 17 and 18 differ only in fixing a typo in 'post install'? Now I tried 18. The result is negative - sddm does not start. (I noticed a typo on 'post install' earlier and experienced 17 with the 20-nvidia.conf file in /etc/X11/xorg.conf.d/).

graysky commented on 2021-02-25 19:40 (UTC)

@bieel1503 - Corrected in -18. Let me know if the example config needs to be tweaked.

bieel1503 commented on 2021-02-25 19:31 (UTC)

@graysky yep, -17 works just fine. but you mistyped on 'post install', the path should be "/etc/X11/xorg.conf.d/".

@holyArch that happened to me as well, i just uninstalled the nvidia packages, rebooted, rebuild it and it worked.

ansgoati commented on 2021-02-25 15:27 (UTC)

Hi. on 5.10 patch all was working flawless, now with 5.11 i suppose is the config file but the gui does not work well. xinit cannot initialize.

CourteousGeek commented on 2021-02-25 14:47 (UTC)

Using version 17 and manually typing the config on 20-nvidia.conf on kernel 5.11, not successful. GeForce 9500GT.

esturiano commented on 2021-02-25 04:25 (UTC) (edited on 2021-02-25 12:38 (UTC) by esturiano)

I have tried different versions (from 14 to 17), with config 20-nvidia.conf, but sddm not started (not further starting systemd). Kernel 5.10 worked well for me earlier. (old iMac - GF 9400 MCP7A)

jeroni commented on 2021-02-25 03:14 (UTC) (edited on 2021-02-25 03:15 (UTC) by jeroni)

Has anyone had issues with systemd message "a start job is running for /dev/dri/card0"? it ends with a crash and gdm won't start. I already had the 20-nvidia.conf file. I'm trying to boot on an old macbook with a geforce 9400M card and I'm stuck with 5.10 kernel.

graysky commented on 2021-02-25 02:35 (UTC)

See -17 and let me know if it needs to be tweaked.

holyArch commented on 2021-02-25 02:34 (UTC)

==> dkms install --no-depmod -m nvidia -v 340.108 -k 5.11.1-arch1-1 Error! Bad return status for module build on kernel: 5.11.1-arch1-1 (x86_64) Consult /var/lib/dkms/nvidia/340.108/build/make.log for more information. ==> Warning, `dkms install --no-depmod -m nvidia -v 340.108 -k 5.11.1-arch1-1' returned 10

https://0bin.net/paste/P0tarHrt#+JKStEmvHe3pCodMuY7JEkvbWRcT45-a+90TyigBCGZ

vicpt commented on 2021-02-24 22:43 (UTC)

@bieel1503 thank for reporting.

@graysky the package is working as it is, now it's up to you how to deal with required config files. If I can help in anything else, please say.

Thank you very much for your time maintaining this package.

bieel1503 commented on 2021-02-24 22:34 (UTC)

@vicpt that's it, it worked. i wonder why tho, all of a sudden. but anyway thanks for this.

vicpt commented on 2021-02-24 22:08 (UTC)

@bieel1503 please test with that xorg conf and report back just for @graysky confirmation.

vicpt commented on 2021-02-24 22:06 (UTC)

The minimal xorg config file needed to work with opengl:

Section "Files"
    ModulePath   "/usr/lib64/nvidia/xorg"
    ModulePath   "/usr/lib64/xorg/modules"
EndSection

Section "Device"
        Identifier "Nvidia Card"
        Driver "nvidia"
        VendorName "NVIDIA Corporation"
EndSection

vicpt commented on 2021-02-24 22:03 (UTC)

@graysky as I thought it is indeed a xorg server related problem. The patches in -16 are good, keep the historical patches.

So, in sum the package is ok. But a mention to alert users for the need of xorg config file would be good.

A post_install message or even a script to install a minimal config file on demand should be the best solution in my opinion.

graysky commented on 2021-02-24 21:07 (UTC)

OK... I'll leave it to you guys to figure it out. If it is a config option, I will add a post-install and provide an example. Keep me updated.

vicpt commented on 2021-02-24 21:07 (UTC)

@graysky let the package in -16 with historical patches for now. We need to test different xorg configs just to be sure.

vicpt commented on 2021-02-24 21:05 (UTC)

Same thing with -16 no OpenGL. It can be xorg server related configs...

graysky commented on 2021-02-24 20:59 (UTC)

Let me know if the original patches or new patches give different results. I can add a post_install that directs users to create the needed config once you guys tell me which patches to use.

vicpt commented on 2021-02-24 20:38 (UTC) (edited on 2021-02-24 20:42 (UTC) by vicpt)

@bieel1503 at first I didn't. Now after trying few games that used to work I noticed they stop working. What package are you using, -14 or -15? @graysky reverted the patches he used in -15 to the original ones used in -14 to build the new one -16.

I'm gonna test -16 (with historical patches plus the new one for 5.11) and report back.

bieel1503 commented on 2021-02-24 19:49 (UTC)

@vicpt It worked, thank you very much. But have you noticed a problem with OpenGL? It just won't work, somehow.

vicpt commented on 2021-02-24 19:35 (UTC)

@graysky having that minimal config file included in the package must cause problems for users that have specific configurations, so maybe informing users they need that file in order to have xorg server loading the correct legacy driver should be useful. Maybe a pinned post?

graysky commented on 2021-02-24 19:22 (UTC)

@vicpt - OK, I will push -16 which is just -14 (my patches + the new one).

Recommend that you share your results on the appropriate wiki page.

vicpt commented on 2021-02-24 18:01 (UTC)

If anyone want a minimal Xorg configuration file to specify the "nvidia" driver instead "nv" one here it is, in /etc/X11/xorg.conf.d/20-nvidia.conf :

Section "Device"
        Identifier "Nvidia Card"
        Driver "nvidia"
        VendorName "NVIDIA Corporation"
EndSection

vicpt commented on 2021-02-24 17:56 (UTC)

Apparently the problem has nothing to do with the driver. After some debugging I noticed the driver is indeed working, the problem is xorg related.

After a manual configuration of xorg, specifying the driver to use (nvidia) instead of (nv) my graphics are back again.

@graysky the package is ok (probably since -14). Thank you for your time and attention on this package.

vicpt commented on 2021-02-24 16:21 (UTC)

@graysky as you can see dmesg doesn't report any errors and still the driver doesn't work.

@taro_kun do you have the driver working on your setup with the patch you have mentioned in your last comment?

esturiano commented on 2021-02-24 16:03 (UTC)

does not work for me too

graysky commented on 2021-02-24 16:01 (UTC)

OK.. at this point I am a glorified packager since I have no hardware for testing. Others out there with 5.11 and legacy hardware confirm that -14 or -15 does not work as @vicpt reports?

vicpt commented on 2021-02-24 15:26 (UTC)

Relevant dmesg bits after module loading:


nvidia 0000:01:00.0: vgaarb: changed VGA decodes: olddecodes=none,decodes=none:owns=io+mem
NVRM: loading NVIDIA UNIX x86_64 Kernel Module  340.108  Wed Dec 11 11:06:58 PST 2019

vicpt commented on 2021-02-24 15:07 (UTC)

@graysky about 'lsmod | grep nvidia' (in 5.11) as I told you the module is loaded but doesn't work. I can't test in 5.10 (I can't downgrade, my last kernel before 5.11 is much older). About the patches in warpme/minimyth2 repo a quick look reveals they don't seem the same we used to use here, only 5.10 and 5.11 seems the same. So I think more work is needed to get it work here.

Meanwhile I will try to load the module again and check dmesg for some clues.

graysky commented on 2021-02-24 14:51 (UTC) (edited on 2021-02-24 14:53 (UTC) by graysky)

@vicpt - thanks for confirming.

1) What is the output of lsmod | grep nvidia under 5.11? 2) What is the output of lsmod | grep nvidia under 5.10?

Any errors in dmesg/journalctl to explain why under 5.11? What about after you try manually loading it, ie modprobe nvidia?

vicpt commented on 2021-02-24 14:43 (UTC)

Tested -15 and it still doesn't work.

graysky commented on 2021-02-24 13:35 (UTC)

@vicpt - Alternatively, I can apply all of the patches from that repo rather than the ones we historically shipped. I don't have time to review to see if they are identical. Please try -15 and report back.

vicpt commented on 2021-02-24 13:22 (UTC)

The package builds fine, module loads, but it doesn't work. Apparently this patch is not enough, I think we need more work to get it work on 5.11.

graysky commented on 2021-02-24 11:36 (UTC)

@taro_kun - thanks, updated. Please try and report back. Builds find for me in a clean buildroot.

taro_kun commented on 2021-02-23 23:53 (UTC)

@graysky The source for the most recent patches now has a new one for 5.11: https://github.com/warpme/minimyth2/blob/master/script/nvidia/nvidia-340.108/files/nvidia-340.108-fix-5.11-kernel-compile.patch

graysky commented on 2021-02-21 12:44 (UTC)

Anyone got a patch for 5.11?

hackins commented on 2021-02-13 20:17 (UTC) (edited on 2021-02-13 21:14 (UTC) by hackins)

during the boot up i should see nvidia logo and then gnome logon screen, but instead my system shows flashing underscore forever until i switch to AltF2 and then switch back to AltF1 the system loads instantly. Can anyone please help me out to make my systeam load automatically. my telegram is hackins

Update: found a workaround on reddit https://www.reddit.com/r/archlinux/comments/l9xt3n/i_have_to_press_altf2_altf1_to_get_gdm_to_start/

If anyone knows better way to solve the problem please contact me

wurbelgrumpff commented on 2021-01-21 22:17 (UTC)

great work! I've upgraded successfully from 5.9.14-arch to 5.10.9-arch1-1 with xfce 4.16 (with the help of trizen as AUR-helper) and it works stable. Thanks a lot for the patch. Stay healthy and have a happy new year!

M4rty commented on 2021-01-13 22:35 (UTC) (edited on 2021-01-13 22:37 (UTC) by M4rty)

Thanks for this package, it works perfect ! I just have a small issue with MPV player (celluloid) which does not start (kernel 5.9 & 5.10, arch i3wm) : "free (): double free detected in tcache 2". Does anyone have a solution ?

modin5 commented on 2021-01-10 02:55 (UTC)

@graysky @JerryXiao i have problem on installing the driver and their patches.

i tried building your AUR version but it always fails on first error.

https://gist.github.com/graysky2/04bd0eb58459dd720eccc8baad4bf0fa

and i tried the manjaro forum ( https://forum.manjaro.org/t/support-how-to-compile-old-legacy-nvidia-proprietary-drivers-2020-12-30-update-issue/46071) version it did the same error but if continued on but it thinks that i,m using manjaro kernel while i,m not so it fails to apply the patches because it searching for manjaro headers only (as i understood from the installation process). however it installed the driver but it freezes every time i open an normal application (like web browser, games ,etc but not system/preinstalled apps) because the patches aren,t applied.

so now i,m stuck with the opensource driver that is slower and sometimes crashes some apps.

so please someone help me!

modin5 commented on 2021-01-09 03:57 (UTC)

sorry for all the comment spaming i was doing

i deleted some of my useless comments

pls someone help me

modin5 commented on 2021-01-09 03:18 (UTC) (edited on 2021-01-09 03:20 (UTC) by modin5)

for a reason or another this function can,t find auto.conf even if it exits

build() { cd "${_pkg}/kernel" make SYSSRC="/usr/lib/modules/$_kernelname/build" module

cd uvm make SYSSRC="/usr/lib/modules/$_kernelname/build" module }

jtag commented on 2021-01-05 21:07 (UTC) (edited on 2021-01-05 21:07 (UTC) by jtag)

Just updated to nvidia-340.108-13 on Arch with kernel 5.10.4-arch2-1 using makepkg -risc and everything was smooth and no problems so far.

SvenX commented on 2021-01-05 20:29 (UTC)

@modin5 Just replace each line with "-" with the "+" lines. No need to change anything :-)

modin5 commented on 2021-01-05 20:27 (UTC)

something really quick

in the second part of SvenX patch ⟱

build() { cd "${_pkg}/kernel" - make SYSSRC="/usr/src/$_kernelname" module + make SYSSRC="/usr/lib/modules/$_kernelname/build" module

should i change the $_kernelname" to my kernel name or it just represent it in the code?

parsal commented on 2021-01-05 17:13 (UTC) (edited on 2021-01-05 17:14 (UTC) by parsal)

@damonh I used pamac. After downloading I changed PKGBUILD and ran pamac again. This time it didn't download again and used my modified PKGBUILD file. I'm not sure about yay; Maybe you have to use makepkg.
@modin5 Obviously if you want to have this driver while you run kernel 5.10, you have to install it on 5.10!
You don't have to be running 5.10 when you're building the driver, but you need to have the kernel-headers for 5.10.

graysky commented on 2021-01-05 12:01 (UTC)

@damonh - 340.108-13 is not broken. It builds successfully in a clean chroot[1]. Please stop using unsupported AUR helpers like yay. Build with makepkg and report back. If the issue is that you're trying to build this for Manjaro, I do not run that. Manjaro != Arch.

  1. https://gist.github.com/graysky2/04bd0eb58459dd720eccc8baad4bf0fa

damonh commented on 2021-01-05 02:21 (UTC) (edited on 2021-01-05 02:21 (UTC) by damonh)

@parsal yay and pamac, both take care of all dependencies, but the PKGBUILD of this package is broken, that's why it doesn't work. We need a mantainer to fix and push it again to AUR.

@modin5 I've followed the guide here https://forum.manjaro.org/t/support-how-to-compile-old-legacy-nvidia-proprietary-drivers-2020-12-30-update-issue/46071 and it worked with kernel 5.10.2-2

parsal commented on 2021-01-04 15:01 (UTC) (edited on 2021-01-04 15:02 (UTC) by parsal)

@damonh Do you install with pamac install nvidia-340xx? Because it takes care of all dependencies.
@modin5 It does need kernel >= 5.5 because support for the driver has been dropped since 5.5 (if you want to build for 5.4 or earlier read here.
I, personally, updated to 5.10 (I mean why not). BTW, as I said, running `pamac install nvidia-340xx' takes care of all dependencies (asks you which kernel to install).

damonh commented on 2021-01-04 14:03 (UTC)

Thank you, @parsal. I've already did it, but now yay is trying to update the nvidia-340xx-dkms package. I've got nvidia-340xx-dkms version 340.108-1 and AUR has version 340.108-13

parsal commented on 2021-01-04 13:01 (UTC) (edited on 2021-01-04 13:16 (UTC) by parsal)

@damonh @modin5 Apply the patches SvenX mentioned in his post (here). Location of PGKBUILD is visible in the error.
That should fix this error (and clear the path for more errors xD).

SvenX commented on 2021-01-04 09:27 (UTC)

@parsal @damonh @modin5 The Manjaro team published a How-To if you don't want to apply my patches by hand. Link: https://forum.manjaro.org/t/support-how-to-compile-old-legacy-nvidia-proprietary-drivers-2020-12-30-update-issue/46071

modin5 commented on 2021-01-03 23:18 (UTC) (edited on 2021-01-04 03:56 (UTC) by modin5)

@parsal @damonh @modin5 (see my comment below)

Same error on pacman/pamac

damonh commented on 2021-01-03 21:57 (UTC) (edited on 2021-01-03 21:57 (UTC) by damonh)

This is the error I'm getting using yay:

==> Sources are ready.
~/.cache/yay/nvidia-340xx/PKGBUILD: line 32: /usr/src/linux/version: No such file or directory
==> Making package: nvidia-340xx 340.108-13 (dom 03 ene 2021 18:52:56)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> WARNING: Using existing $srcdir/ tree
==> Removing existing $pkgdir/ directory...
==> 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...
error making: nvidia-340xx (nvidia-340xx-dkms)

modin5 commented on 2021-01-03 19:07 (UTC) (edited on 2021-01-03 19:09 (UTC) by modin5)

@parsal ok i was so lazy that i did make pamac install it for me

first it told me it needed >5.5 kernel and >5.5 headers. i thought the patches will do the job so i ignored it the nividia driver failed to install for some reason and the open source graphics driver was disabled and so Xorg so i had no choice other than reinstall arch distro (i tried deleting the disable file module through nano but failed)

i think i have to build it through terminal. but how?

i,m so new to that "package building" so i think as you could build it it will be easy for you to explain it

start with me from 0 to 100 my installation was so wrong i think

SvenX commented on 2021-01-03 13:45 (UTC) (edited on 2021-01-03 13:47 (UTC) by SvenX)

I was able to build for Manjaro 20.2 with the 5.10.2 kernel with the following changes to the PKGBUILD file. First adapt the kernel variables:

 # default is 'linux' substitute custom name here
-_kernelname=linux
-_kernver="$(</usr/src/$_kernelname/version)"
-_extradir="/usr/lib/modules/$_kernver/extramodules"
+_kernelname=`uname -r`
+_kernver="$(</usr/lib/modules/$_kernelname/extramodules/version)"
+_extradir="/usr/lib/modules/$_kernelname/extramodules"

And after that, change the paths in the build() function:

 build() {
   cd "${_pkg}/kernel"
-  make SYSSRC="/usr/src/$_kernelname" module
+  make SYSSRC="/usr/lib/modules/$_kernelname/build" module

   cd uvm
-  make SYSSRC="/usr/src/$_kernelname" module
+  make SYSSRC="/usr/lib/modules/$_kernelname/build" module
 }

After these changes, build it with: makepkg -s

parsal commented on 2021-01-03 08:37 (UTC) (edited on 2021-01-03 08:39 (UTC) by parsal)

@damonh As I said, I would fix it and give a link to a fixed version If I had the technical knowledge of make and install procedure.
@modin5 I can but it would be incomplete since I only installed it on my laptop; I'm kind of a newbie myself. So I think it's easier if you tell me exactly where you're having trouble.
For starters, exactly what command are you running and what does the error say?

modin5 commented on 2021-01-02 22:51 (UTC) (edited on 2021-01-02 23:11 (UTC) by modin5)

@parsal can you make a step by step installation guide for newbies like me ?

sorry if i,m not patient enough or noisy i,m just worried about it.

thanks @parsal for the information anyway.

damonh commented on 2021-01-02 20:37 (UTC)

Thank you @parsal, but can you please explain how to fix this package? Thank you.

parsal commented on 2021-01-02 17:02 (UTC) (edited on 2021-01-02 17:04 (UTC) by parsal)

Thank you very much for maintaining this driver. Saved me!
I successfully installed it on Manjaro 20.2 kernel 5.10.2-2-Manjaro. However I think some minor changes could be very useful for everyone:
- On my linux, /usr/src folder is empty (no linux link to kernel headers) so I had to manually create that. I think replacing that with $(uname -r) would solve this issue.
- On my linux, extramodules is not actually in kernel headers folder but in a parent directory (both of them in /usr/lib/modules) and extramodules in kernel headers is symlink to it. After installation on "Cleaning Up" step, I got an error: "/usr/lib/modules/5.10.2-2-MANJARO/extramodules already exists (owned by linux 5.10)" (something like that) and I had to rename the symlink temporarily to be able to install and then copied the files back to the real extramodules folder and created symlink again.
I would change the files and give you a link if I had the technical knowledge.
Thanks again :)

modin5 commented on 2021-01-01 20:55 (UTC) (edited on 2021-01-01 21:03 (UTC) by modin5)

i tried installing this on pamac but it failed and i had to reinstall my arch-based distro (now i,m using endeavour os).

i,m not saying this isn,t working but i,m having a problem installing it.

i maybe a newbie but i have no problem using the terminal if i know what i,m doing / a tutorial.

so can someone please make a step by step installation introduction ?

i,m using zen kernel 5.9 on endeavour os with lxqt DE.

gksudo commented on 2020-12-31 10:20 (UTC)

This does not build on kernel 5.10.x, I have updated the PKGBUILD and added the required patch here: https://gitlab.com/gksudolol/nvidia-340xx

graysky commented on 2020-12-16 01:56 (UTC)

@papakilo - Thanks for point me to the patch. Not out-of-date until 5.10.x goes into [core].

ansgoati commented on 2020-12-08 18:32 (UTC)

Works well to me on Kernel 5.9.12.

poluyan commented on 2020-11-23 13:02 (UTC) (edited on 2020-11-23 13:02 (UTC) by poluyan)

@MegaDeKay Yes, I'm on 1.20

# Xorg -version
X.Org X Server 1.20.9
X Protocol Version 11, Revision 0
Build Operating System: Linux Arch Linux
Current Operating System: Linux cursedsun 5.9.9-arch1-1

What do you mean by something newer? According to Nvidia site with gts 250 I must stick with 340xx drivers.

MegaDeKay commented on 2020-11-22 22:05 (UTC)

@poluyan "Everything works fine" but are you still on xorg-server 1.20 or are you able to use something newer?

poluyan commented on 2020-11-22 14:34 (UTC)

@wurbelgrumpff, I'm with GeForce GTS 250 and Xfce 4.14. Just updated with nvidia-340xx 340.108-12 and nvidia-340xx-utils 340.108-1 at linux-5.9.9 kernel. Everything works fine.

wurbelgrumpff commented on 2020-11-19 23:44 (UTC)

Sorry for asking, but I'm a little confused about the situation. So, NVidia told about incompatibility issue with 5.9.x but here is still a driver's patch for 5.9.x. I'm working on a Core2 Duo with an Asus EN210 (Geforce 210) with kernel 5.8.14 and Xfce 4.14 and driver nvidia-340xx-dkms 340.108-9 which is really doing fine. But now I don't know, if it works after upgrading on actual kernel and driver. Anyone who has made experiences with that? Thanks!

lgomesf commented on 2020-11-10 14:26 (UTC)

Solve , change , .config to :
CONFIG_AGP=m
CONFIG_AGP_INTEL=m
CONFIG_AGP_VIA=m

lgomesf commented on 2020-11-10 10:18 (UTC) (edited on 2020-11-10 10:20 (UTC) by lgomesf)

Same problem ERROR: modpost: "agp_backend_release" [/home/luiz/git-Download/nvidia-340xx/src/NVIDIA-Linux-x86_64-340.108-no-compat32/kernel/nvidia.ko] undefined!
ERROR: modpost: "agp_copy_info" [/home/luiz/git-Download/nvidia-340xx/src/NVIDIA-Linux-x86_64-340.108-no-compat32/kernel/nvidia.ko] undefined!
ERROR: modpost: "agp_unbind_memory" [/home/luiz/git-Download/nvidia-340xx/src/NVIDIA-Linux-x86_64-340.108-no-compat32/kernel/nvidia.ko] undefined!
ERROR: modpost: "agp_free_memory" [/home/luiz/git-Download/nvidia-340xx/src/NVIDIA-Linux-x86_64-340.108-no-compat32/kernel/nvidia.ko] undefined!
ERROR: modpost: "agp_backend_acquire" [/home/luiz/git-Download/nvidia-340xx/src/NVIDIA-Linux-x86_64-340.108-no-compat32/kernel/nvidia.ko] undefined!
ERROR: modpost: "agp_find_bridge" [/home/luiz/git-Download/nvidia-340xx/src/NVIDIA-Linux-x86_64-340.108-no-compat32/kernel/nvidia.ko] undefined!
make[2]: *** [scripts/Makefile.modpost:111: /home/luiz/git-Download/nvidia-340xx/src/NVIDIA-Linux-x86_64-340.108-no-compat32/kernel/Module.symvers]

ansgoati commented on 2020-10-25 14:35 (UTC) (edited on 2020-11-11 22:28 (UTC) by ansgoati)

Any of you can change the brightness ?? I've tried adding the line: Option "RegistryDwords" "EnableBrightnessControl=1" to /usr/share/X11/xorg.conf.d/10-nvidia-brightness.conf and /etc/X11/xorg.conf without any effect. Solution: Add the follow line: GRUB_CMDLINE_LINUX_DEFAULT="quiet splash acpi_osi=Linux" to /etc/default/grub and reboot.

pfzim commented on 2020-10-23 20:20 (UTC)

Hello!

Sound via HDMI stops working after installing this driver on Nvidia MCP7A-ION. Can anyone help me fix the problem?

For more details: https://www.mail-archive.com/alsa-user@lists.sourceforge.net/msg32765.html

Missed diff: https://pastebin.com/fDcS1543

lpga commented on 2020-10-22 11:29 (UTC)

@graysky Everything fine here with the new release (and my old 8800GT), thank you very much

graysky commented on 2020-10-22 11:07 (UTC)

OK, 340.108-12 builds for me and simplifies things a bit.

eugene commented on 2020-10-22 02:17 (UTC)

it looks like patches for 5.8 are mandatory, @graysky

eugene commented on 2020-10-22 01:39 (UTC) (edited on 2020-10-22 01:41 (UTC) by eugene)

Does not work for me still. Fails with drm_pci_init function declaration error

graysky commented on 2020-10-22 00:22 (UTC)

I just pushed 340.108-11 but it still does not build for me in a buildroot. Can someone confirm that it is working?

nmapper commented on 2020-10-21 22:16 (UTC)

NVIDIA Corporation G96C [GeForce 9400 GT] (rev a1) here.

Can confirm, the patch cb2521375317a368d7a5b4766071d0dfb09f359f7521f769e581b083540bfcbaab18f2d1b308d4e668841ef15dbeebcf0495b3cbaa2c9ee1a8b6a35308206e6e works for me

lpga commented on 2020-10-21 20:46 (UTC) (edited on 2020-10-21 20:48 (UTC) by lpga)

first, thank you @speps for the patch; second, I used all the patches that were in the previous version of nvidia-340xx-dkms (for kernel 5.7 and 5.8) together to the new patch for kernel 5.9.

obviously I don't make use of OpenCL or CUDA.

the b2sum code for the new patch is

 $ cat nvidia-340.108-fix-5.9-kernel-compile.patch | b2sum
cb2521375317a368d7a5b4766071d0dfb09f359f7521f769e581b083540bfcbaab18f2d1b308d4e668841ef15dbeebcf0495b3cbaa2c9ee1a8b6a35308206e6e

and this is the prepare() function in "my PKGBUILD"

prepare() {
  sh "${_pkg}.run" --extract-only
  cd "${_pkg}"

# seems manjaro is keeping this current # https://gitlab.manjaro.org/packages?utf8=%E2%9C%93&filter=nvidia-340xx (patch -p1 --no-backup-if-mismatch -i "$srcdir"/kernel-5.7.patch)

# https://launchpad.net/~kelebek333/+archive/ubuntu/nvidia-legacy/+packages # the following was extracted from # https://launchpadlibrarian.net/492468557/nvidia-graphics-drivers-340_340.108-1lmtrfocal3_340.108-2lmtrfocal.diff.gz (cd kernel && patch -p1 --no-backup-if-mismatch -i "$srcdir"/buildfix_kernel_5.8.patch)

# patch kernel 5.9 (patch -p1 --no-backup-if-mismatch -i "$srcdir"/kernel-5.9.patch)

cp -a kernel kernel-dkms }

Filkolev commented on 2020-10-21 20:16 (UTC) (edited on 2020-10-21 20:18 (UTC) by Filkolev)

Could someone confirm the new b2sum for the patch?

cb2521375317a368d7a5b4766071d0dfb09f359f7521f769e581b083540bfcbaab18f2d1b308d4e668841ef15dbeebcf0495b3cbaa2c9ee1a8b6a35308206e6e

That's the one I used. Now I get implicit declaration of drm_pci_init/drm_pci_exit, if anyone has a fix for this please share.

holyArch commented on 2020-10-21 20:00 (UTC) (edited on 2020-10-21 20:03 (UTC) by holyArch)

Could someone confirm the new b2sum for the patch?

cb2521375317a368d7a5b4766071d0dfb09f359f7521f769e581b083540bfcbaab18f2d1b308d4e668841ef15dbeebcf0495b3cbaa2c9ee1a8b6a35308206e6e

Filkolev commented on 2020-10-21 19:55 (UTC)

Patch file was modified on Github on Oct 20, so currently the checksum does not match. The one provided in PKGBUILD corresponds to the previous commit pushed on Aug 26.

lgomesf commented on 2020-10-21 19:22 (UTC) (edited on 2020-10-21 19:23 (UTC) by lgomesf)

I added the patch and the build errors

ERROR: modpost: "agp_backend_release" [/home/luiz/git-Download/nvidia-340xx/src/NVIDIA-Linux-x86_64-340.108-no-compat32/kernel/nvidia.ko] undefined!

ERROR: modpost: "agp_copy_info" [/home/luiz/git-Download/nvidia-340xx/src/NVIDIA-Linux-x86_64-340.108-no-compat32/kernel/nvidia.ko] undefined!

ERROR: modpost: "agp_unbind_memory" [/home/luiz/git-Download/nvidia-340xx/src/NVIDIA-Linux-x86_64-340.108-no-compat32/kernel/nvidia.ko] undefined!

ERROR: modpost: "agp_free_memory" [/home/luiz/git-Download/nvidia-340xx/src/NVIDIA-Linux-x86_64-340.108-no-compat32/kernel/nvidia.ko] undefined!

ERROR: modpost: "agp_backend_acquire" [/home/luiz/git-Download/nvidia-340xx/src/NVIDIA-Linux-x86_64-340.108-no-compat32/kernel/nvidia.ko] undefined!

ERROR: modpost: "agp_find_bridge" [/home/luiz/git-Download/nvidia-340xx/src/NVIDIA-Linux-x86_64-340.108-no-compat32/kernel/nvidia.ko] undefined!

aurobe commented on 2020-10-21 17:13 (UTC)

@speps THX! works for me! (5.9.1-2-ck)

piotro commented on 2020-10-19 18:19 (UTC)

@speps: nice catch! Thx!

graysky commented on 2020-10-19 16:23 (UTC)

@speps - Here is the contents of that file:

#define NV_REMAP_PFN_RANGE_PRESENT
#define NV_VMAP_PRESENT
#define NV_VMAP_ARGUMENT_COUNT 4
#define NV_SET_PAGES_UC_PRESENT
#define NV_SET_MEMORY_UC_PRESENT
#define NV_SET_MEMORY_ARRAY_UC_PRESENT
#undef NV_CHANGE_PAGE_ATTR_PRESENT
#define NV_PCI_GET_CLASS_PRESENT
#define NV_PCI_CHOOSE_STATE_PRESENT
#define NV_VM_INSERT_PAGE_PRESENT
#undef NV_ACQUIRE_CONSOLE_SEM_PRESENT
#define NV_CONSOLE_LOCK_PRESENT
#define NV_KMEM_CACHE_CREATE_PRESENT
#define NV_KMEM_CACHE_CREATE_ARGUMENT_COUNT 5
#define NV_ON_EACH_CPU_PRESENT
#define NV_ON_EACH_CPU_ARGUMENT_COUNT 3
#define NV_SMP_CALL_FUNCTION_PRESENT
#define NV_SMP_CALL_FUNCTION_ARGUMENT_COUNT 3
#define NV_ACPI_EVALUATE_INTEGER_PRESENT
typedef unsigned long long nv_acpi_integer_t;
#define NV_IOREMAP_CACHE_PRESENT
#define NV_IOREMAP_WC_PRESENT
#define NV_ACPI_WALK_NAMESPACE_PRESENT
#define NV_ACPI_WALK_NAMESPACE_ARGUMENT_COUNT 7
#define NV_PCI_DOMAIN_NR_PRESENT
#define NV_PCI_DMA_MAPPING_ERROR_PRESENT
#define NV_PCI_DMA_MAPPING_ERROR_ARGUMENT_COUNT 2
#define NV_SG_ALLOC_TABLE_PRESENT
#define NV_SG_ALLOC_TABLE_FROM_PAGES_PRESENT
#define NV_SG_INIT_TABLE_PRESENT
#define NV_PCI_GET_DOMAIN_BUS_AND_SLOT_PRESENT
#define NV_GET_NUM_PHYSPAGES_PRESENT
#define NV_EFI_ENABLED_PRESENT
#define NV_EFI_ENABLED_ARGUMENT_COUNT 1
#define NV_PROC_CREATE_DATA_PRESENT
#define NV_PDE_DATA_PRESENT
#define NV_PROC_REMOVE_PRESENT
#define NV_PM_VT_SWITCH_REQUIRED_PRESENT
#define NV_PCI_SAVE_STATE_ARGUMENT_COUNT 1
#undef NV_DRM_PCI_SET_BUSID_PRESENT
#undef NV_WRITE_CR4_PRESENT
#define NV_FOR_EACH_ONLINE_NODE_PRESENT
#define NV_NODE_END_PFN_PRESENT
#undef NV_GET_USER_PAGES_HAS_WRITE_AND_FORCE_ARGS
#undef NV_GET_USER_PAGES_HAS_TASK_STRUCT
#define NV_GET_USER_PAGES_REMOTE_PRESENT
#undef NV_GET_USER_PAGES_REMOTE_HAS_LOCKED_ARG
#undef NV_GET_USER_PAGES_REMOTE_HAS_WRITE_AND_FORCE_ARGS
#undef NV_REGISTER_CPU_NOTIFIER_PRESENT
#define NV_CPUHP_SETUP_STATE_PRESENT
#undef NV_DRM_LEGACY_PCI_INIT_PRESENT
#define NV_TIMER_SETUP_PRESENT
#undef NV_DO_GETTIMEOFDAY_PRESENT
#undef NV_DRM_GEM_OBJECT_PUT_UNLOCKED_PRESENT

canolucas commented on 2020-10-19 16:10 (UTC)

nvidia-340xx-dkms is working fine here using linux 5.9.1-arch1-1 and newly added kernel-5.9.patch

lpga commented on 2020-10-19 13:02 (UTC)

I'm a owner of a GT 8800 512MB graphic card, and I applied the patch that speps posted and successfully build the module for the kernel 5.9. For now it seems that there's no problem (no OpenCL or CUDA).

speps commented on 2020-10-18 21:54 (UTC)

@graysky: working and building fine here, in a clean chroot.

Seems like, in your setup, the NV_SET_MEMORY_ARRAY_UC_PRESENT is defined, while it should be undef.

Can you please check what you get in kernel/conftest/function.h after build?

graysky commented on 2020-10-18 20:35 (UTC)

@speps - I added the patch and the build errors out (building in a buildroot).

...
/build/nvidia-340xx/src/NVIDIA-Linux-x86_64-340.108-no-compat32/kernel/nv-vm.c: In function ‘nv_set_memory_array_type’:
/build/nvidia-340xx/src/NVIDIA-Linux-x86_64-340.108-no-compat32/kernel/nv-vm.c:86:13: error: implicit declaration of function ‘set_memory_array_uc’; did you mean ‘set_pages_array_uc’? [-Werror=implicit-function-declaration]
   86 |             set_memory_array_uc(pages, num_pages);
      |             ^~~~~~~~~~~~~~~~~~~
      |             set_pages_array_uc
   ./tools/objtool/objtool orc generate  --module --no-fp --retpoline --uaccess /build/nvidia-340xx/src/NVIDIA-Linux-x86_64-340.108-no-compat32/kernel/nv-vtophys.o
/build/nvidia-340xx/src/NVIDIA-Linux-x86_64-340.108-no-compat32/kernel/nv-vm.c:89:13: error: implicit declaration of function ‘set_memory_array_wb’; did you mean ‘set_pages_array_wb’? [-Werror=implicit-function-declaration]
   89 |             set_memory_array_wb(pages, num_pages);
      |             ^~~~~~~~~~~~~~~~~~~
      |             set_pages_array_wb
cc1: some warnings being treated as errors
make[2]: *** [scripts/Makefile.build:283: /build/nvidia-340xx/src/NVIDIA-Linux-x86_64-340.108-no-compat32/kernel/nv-procfs.o] Error 1
cc1: some warnings being treated as errors
make[2]: *** [scripts/Makefile.build:283: /build/nvidia-340xx/src/NVIDIA-Linux-x86_64-340.108-no-compat32/kernel/nv-vm.o] Error 1
make[1]: *** [Makefile:1784: /build/nvidia-340xx/src/NVIDIA-Linux-x86_64-340.108-no-compat32/kernel] Error 2
make[1]: Leaving directory '/usr/lib/modules/5.9.1-arch1-1/build'
NVIDIA: left KBUILD.
nvidia.ko failed to build!
make: *** [Makefile:197: nvidia.ko] Error 1

speps commented on 2020-10-18 20:01 (UTC)

@graysky: piotro patch is fine but incomplete, the uvm part is missing.

Here is a working patch for kernel 5.9: http://ix.io/2Bbp

You can use it by adding (patch -p1 --no-backup-if-mismatch -i "$srcdir"/kernel-5.9.patch) to the PKGBUILD and the relative checksum.

graysky commented on 2020-10-18 16:38 (UTC)

@piorto - Tried applying just your patch and the two I am currently shipping (3 totally) but ran into build errors. How are you recommending usage?

piotro commented on 2020-10-18 13:02 (UTC)

Hi, You may be interested in 340.108 support on 5.9 kernel I developed for my distro.... https://github.com/warpme/minimyth2/blob/master/script/nvidia/nvidia-340.108/files/nvidia-340.108-fix-5.9-kernel-compile.patch

graysky commented on 2020-10-18 11:09 (UTC)

https://forums.developer.nvidia.com/t/nvidia-driver-not-yet-supported-for-linux-kernel-5-9/157263

papakilo commented on 2020-09-15 14:12 (UTC) (edited on 2020-10-03 21:46 (UTC) by papakilo)

EDITED several days later

Come on boys, I gave you the tip about the patch for kernel 5.8 and where to find it... and now nobody willing to help me?

2020-09-15 14:12

NOT working in Manjaro with kernel 5.8.9 showing these errors:

... patching file xxxxxx (lots of files) ...

and ending with:

patching file uvm/nvidia_uvm_lite_api.c ==> Removing existing $ pkgdir / directory ... ==> Starting build () ... NVIDIA: calling KBUILD ... make [1]: / usr / src / linux: File or directory does not exist. Stop. NVIDIA: left KBUILD. nvidia.ko failed to build! make: [Makefile: 202: nvidia.ko] Error 1 ==> ERROR: An error occurred in build (). The operation is about to be stopped ...

leopseft commented on 2020-09-12 17:18 (UTC)

Update: After full system update and using nouveu in meanwhile, I reinstalled the driver with clenbuild the package and the module built successfully for the 5.8.8 kernel!!

jwmartnet commented on 2020-09-07 21:05 (UTC) (edited on 2020-09-07 21:05 (UTC) by jwmartnet)

Same error here, running LTS kernel & nvidia LTS drivers. After much headscratching I just: pacman -S linux-lts linux-lts-headers Seemed to fix it.

leopseft commented on 2020-09-06 17:31 (UTC)

@holyArch Yes, just tried it, the module build successfully with no errors but the driver doesn't work.

holyArch commented on 2020-09-05 23:32 (UTC)

Have you tried

env IGNORE_CC_MISMATCH=1 dkms install -m nvidia -v 340.108 -k 5.8.6-arch1-1

leopseft commented on 2020-09-04 17:46 (UTC)

Today I updated with the latest toolchain first, then reboot (just in case), then installed the latest kernel (5.8.5 and tested with 5.8.6 too) and the headers and still nothing. Gave a try to the 5.8.3 too and still nothing. The only combination that works for me as well is linux 5.8.1.arch1-1 with linux-headers 5.8.1.arch1-1 and gcc 10.1.0-2 with gcc-libs 10.1.0-2 and lib32-gcc-libs 10.1.0-2 as mentioned before.

fvsc commented on 2020-08-22 19:10 (UTC)

@graysky also cat /proc/version gives the info for the installed kernel. Linux version 5.8.2-arch1-1 (linux@archlinux) (gcc (GCC) 10.2.0, GNU ld (GNU Binutils) 2.35) #1 SMP PREEMPT Thu, 20 Aug 2020 20:45:00 +0000

But I want to know the toolchain of a new kernel before I install it. Downgrading, insert [testing] in pacman.conf, upgrading and so on is a little too time consuming for me. I will see if I find some info and let you know.

graysky commented on 2020-08-22 15:23 (UTC)

@fvsc - It's rare that the kernel build with an outdated toolchain is offered.

I guess you can look in [testing] if you know they updated gcc and see what's there. You can grep dmesg for it on your current kernel and then just see what is in [testing]:

% dmesg| grep gcc
[  +0.000000] Linux version 5.4.60-1-lts (linux-lts@archlinux) (gcc version 10.2.0 (GCC)) #1 SMP Fri, 21 Aug 2020 16:53:54 +0000

Maybe there's an easier way.

fvsc commented on 2020-08-22 14:40 (UTC)

@graysky I followed your solution and it is OK now. Many thanks.

Do you know how I can check which toolchain was used to build the kernel before upgrading my system. Thanks in advance.

graysky commented on 2020-08-22 09:05 (UTC) (edited on 2020-08-22 10:46 (UTC) by graysky)

Again, the problem is that 5.8.2 was build with gcc 10.1.0. At that time, gcc 10.2.0 was in [staging] not [testing]. 5.8.2 went into [core] before gcc 10.2.0 went into [testing]. 5.8.3 was build with gcc 10.2.0 and they moved gcc 10.2.0 to [core] before 5.8.3 came out of [testing].

Solution: update your system so you get the new toolchain then pull 5.8.3 and (headers) from [testing] so dkms builds for you.

fvsc commented on 2020-08-22 07:52 (UTC) (edited on 2020-08-22 07:54 (UTC) by fvsc)

I had the same problem. Version 5.8.3 of the kernel was not working for me. Downgraden the kernel and gcc solved the problem.

Combination that works: linux 5.8.1.arch1-1 linux-headers 5.8.1.arch1-1

gcc 10.1.0-2 gcc-libs 10.1.0-2 lib32-gcc-libs 10.1.0-2

wurbelgrumpff commented on 2020-08-21 23:34 (UTC)

@graysky: Thanks a lot for your fast response, it works with 5.8.3 from [testing]. Normally I ignore [testing], so I will see, what happens when I comment out testing-repo again and wait for coming of 5.8.3 in [core]. Wouldn't it not also be okay to downgrade gcc to former version while installing 5.8.2? Maybe it would be a better solution for people who don't like [testing]? We'll see.... At least a dkms-issue remains: ==> Unable to remove module nvidia/340.108 for kernel 5.8.2-arch1-1: Not found in dkms status output. Do you know something about it? Despite this, system is working.... oups(!): That was former kernel, maybe a dkms-issue....

@graysky and all others working on this nvidia-patches: I really want to say 'Thank you!' to you for spending so much time and energy on this project. It makes it possible to users like me to run old hardware a little longer time - thanks a lot!! best regards!

graysky commented on 2020-08-21 22:42 (UTC)

It's because your kernel was build with the earlier version of gcc and 5.8.3 is not yet in [core]. Grab it and the headers from [testing] and it should work.

wurbelgrumpff commented on 2020-08-21 21:26 (UTC) (edited on 2020-08-21 21:30 (UTC) by wurbelgrumpff)

Hello, I'm sorry, but with updating on Kernel 5.8.2 I encounter some real problems: Together with the kernel also gcc and gcc-libs were updated from 10.1.0-2 to 10.2.0-1, I don't know if this is important....

Messages from pacman.log:

==> dkms install --no-depmod -m nvidia -v 340.108 -k 5.8.2-arch1-1 Error! Bad return status for module build on kernel: 5.8.2-arch1-1 (x86_64) Consult /var/lib/dkms/nvidia/340.108/build/make.log for more information. ==> Warning, `dkms install --no-depmod -m nvidia -v 340.108 -k 5.8.2-arch1-1´ returned 10 ==> depmod 5.8.2-arch1-1

[....]

I tried to reinstall nvidia but:

==> Unable to remove module nvidia/340.108 for kernel 5.8.2-arch1-1: Not found in dkms status output.

In make.log gcc-version-check failed. (I mentioned gcc was upgraded):

DKMS make.log for nvidia-340.108 for kernel 5.8.2-arch1-1 (x86_64)

Fr 21. Aug 21:54:01 CEST 2020

gcc-version-check failed:

The compiler used to compile the kernel (gcc 10.1) does not exactly match the current compiler (gcc 10.2). The Linux 2.6 kernel module loader rejects kernel modules built with a version of gcc that does not exactly match that of the compiler used to build the running kernel.

If you know what you are doing and want to override the gcc version check, you can do so by setting the IGNORE_CC_MISMATCH environment variable to "1".

In any other case, set the CC environment variable to the name of the compiler that was used to compile the kernel.

Failed CC version check. Bailing out!

make: *** [nvidia-modules-common.mk:201: build-sanity-checks] Fehler 1 [Error 1]

make: Verzeichnis „/var/lib/dkms/nvidia/340.108/build/uvm“ wird betreten [directory ... is entered]

cd ./..; make module SYSSRC=/lib/modules/5.8.2-arch1-1/build SYSOUT=/lib/modules/5.8.2-arch1-1/build KBUILD_EXTMOD=./..

make[1]: Verzeichnis „/var/lib/dkms/nvidia/340.108/build“ wird betreten [directory ... is entered]

NVIDIA: calling KBUILD...

make[2]: Verzeichnis „/usr/lib/modules/5.8.2-arch1-1/build“ wird betreten [directory ... is entered]

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=.. \

single-build= \

need-builtin=1 need-modorder=1

scripts/Makefile.build:44: ../Makefile: Datei oder Verzeichnis nicht gefunden [:file or directory not found]

make[3]: *** Keine Regel, um „../Makefile“ zu erstellen. Schluss. [no rule to build ../Makefile. Exit.]

make[2]: *** [Makefile:1756: ..] Fehler 2 [error 2]

make[2]: Verzeichnis „/usr/lib/modules/5.8.2-arch1-1/build“ wird verlassen [directory ... is exited]

NVIDIA: left KBUILD.

nvidia.ko failed to build!

make[1]: *** [Makefile:202: nvidia.ko] Fehler 1 [error 1]

make[1]: Verzeichnis „/var/lib/dkms/nvidia/340.108/build“ wird verlassen [directory ... is exited]

make: *** [Makefile:222: ../Module.symvers] Fehler 2 [error 2]

make: Verzeichnis „/var/lib/dkms/nvidia/340.108/build/uvm“ wird verlassen [directory ... is exited]

(Translation is appended within []); pls, ignore my english......

Well, I'm badly surprised, because all formerly updates worked without any problems. Patch 5.7 worked really well and also upgrading to 5.8.1 was without any errors. I use an over ten years old machine (core2duo) with Nvidia gt210 and running xfce4 on it.

Please, can anyone help with this? Best regards!

johnvranos commented on 2020-08-18 03:15 (UTC) (edited on 2020-08-18 03:15 (UTC) by johnvranos)

You can try installing flatpak or snapd.

They have the latest version of Spotify:

https://paste.pics/9UL4W

graysky commented on 2020-08-15 10:36 (UTC)

@fvsc - Thanks for testing. Now that 5.8.1 has moved to [core] I pushed this formally a few min ago.

fvsc commented on 2020-08-15 09:05 (UTC)

For me is the combination PKGBUILD and PATCH working with kernel linux 5.8.1.arch1-1. NVIDIA Corporation G98 [GeForce 8400 GS Rev. 2] (rev a1) Thanks.

graysky commented on 2020-08-12 10:02 (UTC) (edited on 2020-08-12 10:17 (UTC) by graysky)

@papakilo - It seems they have a patch for 5.8. Does anyone know how the navigate launchpad? I need to find their source patches to see how to adapt to our package.

https://launchpadlibrarian.net/492473168/buildlog_ubuntu-bionic-amd64.nvidia-graphics-drivers-340_340.108-2lmtrbionic_BUILDING.txt.gz

Towards the end:

-rw-r--r-- root/root      2373 2020-08-08 12:55 ./usr/src/nvidia-340-340.108/patches/buildfix_kernel_5.8.patch

EDIT: I got it, needed to look at the "available diffs" for example: https://launchpad.net/~kelebek333/+archive/ubuntu/nvidia-legacy/+files/nvidia-graphics-drivers-340_340.108-1lmtrfocal3_340.108-2lmtrfocal.diff.gz

I now have a package that builds against 5.8. Can someone with supported hardware try it? I don't want to push to AUR until linux-5.8 goes into [core]:

papakilo commented on 2020-08-11 22:29 (UTC)

Just for info, Ubuntu and derivatives have Nvidia 340 drivers for kernel 5.8 here: https://launchpad.net/~kelebek333/+archive/ubuntu/nvidia-legacy

graysky commented on 2020-08-10 16:38 (UTC)

@papakilo - They aren't ... I cannot build this package against 5.8.0

papakilo commented on 2020-08-10 15:05 (UTC)

@graysky - Hi, patches for kernel 5.7 have been around and worked good for some time, as I'm using kernel 5.7.14 and Nvidia 340.108 in Manjaro. So I suppose those patches could be the same for kernel 5.8...

graysky commented on 2020-08-09 13:05 (UTC)

@papakilo - Thank you for the link, but unless the new patche(s) are also backwards compatible with 5.7 which is currently offered in [core], and until the 5.8 kernel package moves from [testing] to [core], the package is not out-of-date.

Also, the link you posted only shows a 1-month-old patch for 5.7. I did not see a modification for 5.8. Perhaps I missed it?

papakilo commented on 2020-08-09 12:46 (UTC)

Hi, new patches for kernel 5.8 here: https://gitlab.manjaro.org/packages/extra/linux58-extramodules/nvidia-340xx/

piquer commented on 2020-07-12 12:49 (UTC)

https://forums.developer.nvidia.com/t/patches-for-340-108-and-5-6-rc-need-help-with-driver-init/111760/12

This looks promising for 5.7 kernels.

pgoetz commented on 2020-07-08 18:28 (UTC)

I can't get this or the nvidia-340xx-dkms to work with the newest kernel, 5.7.7.arch1-1.

Xezlec commented on 2020-06-28 20:06 (UTC)

Never mind. Just noticed the GPU fan is not spinning. Guess it's getting to be time to buy a new card.

Xezlec commented on 2020-06-27 16:19 (UTC)

I'm having lots of bad screen tearing with this driver now. I didn't use to have that problem. I can't even watch videos now, it's so bad.

jayache80 commented on 2020-06-26 22:13 (UTC) (edited on 2020-06-26 22:15 (UTC) by jayache80)

Does anyone else have a problem with this module coexisting with forcedeth? If I install this module, every time I plug in an Ethernet cable I get a "watchdog: soft lockup" and have to restart my computer.

However, if I blacklist forcedeth, and simply modprobe forcedeth whenever I need to use Ethernet, it works and doesn't cause a lockup (though I still sense the computer "stumble" a little bit, but only for a split second).

This is with the 9400M chipset on a mid-2009 Macbook Pro (5,5).

wurbelgrumpff commented on 2020-06-19 21:14 (UTC)

@leopseft: same as for me, but also without any problems. Some days before there was a dkms update, today a new kernel (5.7.4) was in core. Since today this strange error-message vanished and everything is okay. I think, it has nothing to do with nvidia driver or its patches, maybe it has been a dkms issue... Nvidia driver works really well and stable.

leopseft commented on 2020-06-16 18:22 (UTC)

Hello folks, I receive the following strange error:

"Unable to install module nvidia/340.108 for kernel 5.4.3-arch1-1: Missing kernel headers"

While I'm using the latest kernel (5.7.2). It has happened again with another kernel versions. I 've tried clean build but I get the same error. The driver works normally though.

Any ideas?

Nebulosa commented on 2020-06-12 22:03 (UTC) (edited on 2020-06-12 22:03 (UTC) by Nebulosa)

Thanks for quick respond!

I've changed the lines: makedepends=("nvidia-340xx-utils=${pkgver}" 'linux-ck-atom>=5.5' 'linux-ck-atom-headers>=5.5')

and

_kernelname=linux-ck-atom

and it updated without errors.

IsaakAleksandrov commented on 2020-06-12 16:16 (UTC) (edited on 2020-06-12 18:48 (UTC) by IsaakAleksandrov)

@Nebulosa Just change the _kernelname=linux line to: _kernelname=linux-ck-atom That should do the trick.

Edit: I really should think before I write... Remove 'linux>=5.5' 'linux-headers>=5.5' in makedepends as well, or change to linux-ck-atom.

Nebulosa commented on 2020-06-12 13:57 (UTC)

I use linux-ck-atom package, not the linux package. Unfortunately it want the linux package for installing or update.

How can I change PKBUILD?

Ref: https://wiki.archlinux.org/index.php/Unofficial_user_repositories/Repo-ck

Tech1 commented on 2020-05-30 01:05 (UTC)

Ok. Thanks! Will give it a try.

IsaakAleksandrov commented on 2020-05-30 00:42 (UTC)

@Tech1 First, note that if you're going to use this package and not the nvidia-340xx-lts package, then you'll need to use the resulting -dkms package, and will also need to have the linux-lts-headers system package installed. For the error, upgrade your GCC package. The kernel's been built by a different GCC version. Run pacman -Syyu, then try and build the package again.

Tech1 commented on 2020-05-30 00:18 (UTC)

Appreciate your hard work in producing these packages. I have extremely slow performance with my older NVIDIA card - GeForce 8200M G. Have great hopes that this might really speed things up!

Unfortunately I got an error during the makepkg for nvidia-340xx 340.108-7

This is the error message:

cc1: error: incompatible gcc/plugin versions cc1: error: fail to initialize plugin ./scripts/gcc-plugins/structleak_plugin.so make[2]: [scripts/Makefile.build:268: /home/paul/nvidia-340xx/src/NVIDIA-Linux-x86_64-340.108-no-compat32/kernel/nv.o] Error 1 make[1]: [Makefile:1695: /home/paul/nvidia-340xx/src/NVIDIA-Linux-x86_64-340.108-no-compat32/kernel] Error 2 make[1]: Leaving directory '/usr/lib/modules/5.6.15-arch1-1/build' NVIDIA: left KBUILD. nvidia.ko failed to build! make: *** [Makefile:201: nvidia.ko] Error 1 ==> ERROR: A failure occurred in build(). Aborting... [me@hplaptop nvidia-340xx]$

I am using the most current linux-lts kernel (just released yesterday 5/28).

uname -a

Linux hplaptop 5.4.43-1-lts #1 SMP Wed, 27 May 2020 23:42:34 +0000 x86_64 GNU/Linux

I successfully installed these:

nvidia-340xx-utils (a dependency to building nvidia-340xx)

linux-headers Version 5.6.15.arch1-1 (Required dependency for the makepkg of nvidia- 340xx)

More detailed makepkg output:

<textarea rows="5 cols="78"> [tech1@hplaptop nvidia-340xx]$ makepkg ==> Making package: nvidia-340xx 340.108-7 (Fri 29 May 2020 02:44:27 PM EDT) ==> 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 100 36.9M 100 36.9M 0 0 3570k 0 0:00:10 0:00:10 --:--:-- 3652k -> Found 01-fix_multi_core_build.patch -> Found 02-unfuck-for-340.108-build-fix.patch -> Found 03-unfuck-for-5.5.x.patch -> Found 04-fix_message_in_dmesg.patch -> Found 05-unfuck-for-kernel-5.6.x.patch ==> Validating source files with sha256sums... NVIDIA-Linux-x86_64-340.108-no-compat32.run ... Passed 01-fix_multi_core_build.patch ... Passed 02-unfuck-for-340.108-build-fix.patch ... Passed 03-unfuck-for-5.5.x.patch ... Passed 04-fix_message_in_dmesg.patch ... Passed 05-unfuck-for-kernel-5.6.x.patch ... Passed ==> 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........................................................................................................................................................................................................... patching file dkms.conf patching file uvm/nvidia_uvm_lite.c patching file uvm/Makefile patching file nv.c patching file nv-linux.h patching file Makefile patching file conftest.sh patching file nv-drm.c patching file nv-linux.h patching file nv-procfs.c patching file nv-time.h ==> Starting build()... NVIDIA: calling KBUILD... make[1]: Entering directory '/usr/lib/modules/5.6.15-arch1-1/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=/home/paul/nvidia-340xx/src/NVIDIA-Linux-x86_64-340.108-no-compat32/kernel \ single-build= \ need-builtin=1 need-modorder=1 cc -Wp,-MD,/home/paul/nvidia-340xx/src/NVIDIA-Linux-x86_64-340.108-no-compat32/kernel/.nv.o.d -nostdinc -isystem /usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/include -I./arch/x86/include -I./arch/x86/include/generated -I./include -I./arch/x86/include/uapi -I./arch/x86/include/generated/uapi -I./include/uapi -I./include/generated/uapi -include ./include/linux/kconfig.h -include ./include/linux/compiler_types.h -D__KERNEL__ -Wall -Wundef -Werror=strict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -fshort-wchar -fno-PIE -Werror=implicit-function-declaration -Werror=implicit-int -Wno-format-security -std=gnu89 -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -mno-avx -m64 -falign-jumps=1 -falign-loops=1 -mno-80387 -mno-fp-ret-in-387 -mpreferred-stack-boundary=3 -mskip-rax-setup -mtune=generic -mno-red-zone -mcmodel=kernel -DCONFIG_AS_CFI=1 -DCONFIG_AS_CFI_SIGNAL_FRAME=1 -DCONFIG_AS_CFI_SECTIONS=1 -DCONFIG_AS_SSSE3=1 -DCONFIG_AS_AVX=1 -DCONFIG_AS_AVX2=1 -DCONFIG_AS_AVX512=1 -DCONFIG_AS_SHA1_NI=1 -DCONFIG_AS_SHA256_NI=1 -DCONFIG_AS_ADX=1 -Wno-sign-compare -fno-asynchronous-unwind-tables -mindirect-branch=thunk-extern -mindirect-branch-register -fno-jump-tables -fno-delete-null-pointer-checks -Wno-frame-address -Wno-format-truncation -Wno-format-overflow -Wno-address-of-packed-member -O2 --param=allow-store-data-races=0 -fplugin=./scripts/gcc-plugins/structleak_plugin.so -fplugin-arg-structleak_plugin-byref-all -DSTRUCTLEAK_PLUGIN -Wframe-larger-than=2048 -fstack-protector-strong -Wno-unused-but-set-variable -Wimplicit-fallthrough -Wno-unused-const-variable -fno-var-tracking-assignments -pg -mrecord-mcount -mfentry -DCC_USING_FENTRY -Wdeclaration-after-statement -Wvla -Wno-pointer-sign -Wno-stringop-truncation -Wno-array-bounds -Wno-stringop-overflow -Wno-restrict -Wno-maybe-uninitialized -fno-strict-overflow -fno-merge-all-constants -fmerge-constants -fno-stack-check -fconserve-stack -Werror=date-time -Werror=incompatible-pointer-types -Werror=designated-init -fmacro-prefix-map=./= -fcf-protection=none -Wno-packed-not-aligned -DNV_MODULE_INSTANCE=0 -DNV_BUILD_MODULE_INSTANCES=0 -UDEBUG -U_DEBUG -DNDEBUG -I/home/tech1/nvidia-340xx/src/NVIDIA-Linux-x86_64-340.108-no-compat32/kernel -Wall -MD -Wsign-compare -Wno-cast-qual -Wno-error -D__KERNEL__ -DMODULE -DNVRM -DNV_VERSION_STRING=\"340.108\" -Wno-unused-function -Wuninitialized -fno-strict-aliasing -mno-red-zone -mcmodel=kernel -DNV_UVM_ENABLE -D__linux__ -DNV_DEV_NAME=\"nvidia\" -DMODULE -DKBUILD_BASENAME='"nv"' -DKBUILD_MODNAME='"nvidia"' -c -o /home/paul/nvidia-340xx/src/NVIDIA-Linux-x86_64-340.108-no-compat32/kernel/nv.o /home/paul/nvidia-340xx/src/NVIDIA-Linux-x86_64-340.108-no-compat32/kernel/nv.c cc1: error: incompatible gcc/plugin versions cc1: error: fail to initialize plugin ./scripts/gcc-plugins/structleak_plugin.so make[2]: [scripts/Makefile.build:268: /home/paul/nvidia-340xx/src/NVIDIA-Linux-x86_64-340.108-no-compat32/kernel/nv.o] Error 1 make[1]: [Makefile:1695: /home/paul/nvidia-340xx/src/NVIDIA-Linux-x86_64-340.108-no-compat32/kernel] Error 2 make[1]: Leaving directory '/usr/lib/modules/5.6.15-arch1-1/build' NVIDIA: left KBUILD. nvidia.ko failed to build! make: *** [Makefile:201: nvidia.ko] Error 1 ==> ERROR: A failure occurred in build(). Aborting... [tech1@hplaptop nvidia-340xx]$ </textarea>

I noticed there were AUR builds for nvidia-340xx-lts and nvidia-340xx-lts-dkms and others with 'lts' included in the package name. Would any of these be useful here? In the comments I noticed references to broken builds and waiting on patches for nvidia-340xx-lts 340.108-2.

Another thought was the linux-headers. Wondering if version 5.6.15 might be too new.

Any ideas?

Thank you!

laggykiller commented on 2020-04-12 04:11 (UTC)

@osvxos Problem solved! The directory that contains 'nvidia-340xx' has blank space, this explains why the directory looks funny. Solved by renaming directories such that they don't contain blank space. Thank you!

osvcos commented on 2020-04-11 21:31 (UTC) (edited on 2020-04-11 21:32 (UTC) by osvcos)

@laggykiller - How are you building the package? (makepkg/chroot/aur helper) According to the logs you provided, you seem to be building in the "nvidia-340xx" directory inside your home directory, but this line

make[1]: *** No rule to make target 'Nvidia/nvidia-340xx/src/NVIDIA-Linux-x86_64-340.108-no-compat32/kernel'.  Stop.

indicates that there is a "Nvidia" directory preceding "nvidia-340xx". The error is because the Makefile in the kernel sources cannot switch back to 'Nvidia/nvidia-340xx/src/NVIDIA-Linux-x86_64-340.108-no-compat32/kernel' because it is a relative directory. It should be something like '/home/user/nvidia-340xx/src/NVIDIA-Linux-x86_64-340.108-no-compat32/kernel'.

laggykiller commented on 2020-04-11 18:21 (UTC) (edited on 2020-04-11 19:07 (UTC) by laggykiller)

~/nvidia-340xx/nvidia-340xx-340.108-7-x86_64-build.log https://pastebin.com/MecDxwV8

~/nvidia-340xx/nvidia-340xx-340.108-7-x86_64-prepare.log https://pastebin.com/LqVbeyhJ

Also, not sure if related, but installing driver from nvidia (https://www.nvidia.com/Download/driverResults.aspx/156163/en-us) does not work in linux kernel 5.6.3.arch1-1 as well. The driver installed and ran without any problem in linux kernel 5.5.13-arch2-1. Here is the log file from /var/log/nvidia-installer.log https://pastebin.com/QUt1bXPL

osvcos commented on 2020-04-10 21:43 (UTC)

@laggykiller - Builds well here. What is the error?

laggykiller commented on 2020-04-10 20:40 (UTC)

Does not work on linux 5.6.3.arch1-1 kernel even with the latest patch provided.

graysky commented on 2020-04-07 13:21 (UTC)

@osvcos - Thanks for the patch!

osvcos commented on 2020-04-07 05:30 (UTC)

@VijayPleo - Place the patch in the same directory than the PKGBUILD. Then with a text editor edit the PKGBUILD source array:

source=("https://us.download.nvidia.com/XFree86/Linux-x86_64/${pkgver}/NVIDIA-Linux-x86_64-${pkgver}-no-compat32.run"
  01-fix_multi_core_build.patch
  02-unfuck-for-340.108-build-fix.patch
  03-unfuck-for-5.5.x.patch
  04-fix_message_in_dmesg.patch
  kernel-5.6.patch
)

and then in the sha256sum array:

sha256sums=('995d44fef587ff5284497a47a95d71adbee0c13020d615e940ac928f180f5b77'
            '82d14e9e6ec47c345d225d9f398238b7254cd5ae581c70e8521b9157ec747890'
            '2b7e3ef24846a40f4492e749be946e4f7f70ebed054bc2c9079f6cbdcbfabe57'
            'c28d65854dd03e6a9e00d79fa0ca3521c11b2c198882bbd50870c8e71d18d765'
            '7f90e80be6338f6fc902d257d8ceb09e89b40d008f7a3ad9fe82833cd5b89316'
            'SKIP')

then save the file and run makepkg

VijayPleo commented on 2020-04-07 05:01 (UTC) (edited on 2020-04-07 05:10 (UTC) by VijayPleo)

@osvcos - How to apply the fix specified in this https://pastebin.com/3zaKNyDV ? Sorry I am a newbie to arch

I am also getting the error in kernel 5.6.2 arch 1-2

osvcos commented on 2020-04-07 00:14 (UTC)

Hello everyone, here is a patch: https://pastebin.com/3zaKNyDV

Manjaro was the first one as far as I know (https://gitlab.manjaro.org/packages/extra/linux56-extramodules/nvidia-340xx/-/blob/master/340.108-build-fix.patch) to release a patch, but:

  • It fixes things we fixed before
  • It modifies more files than this patch
  • This patch uses tests (conftest) instead of relying on kernel version

hackins commented on 2020-04-06 21:53 (UTC) (edited on 2020-04-06 21:59 (UTC) by hackins)

Can’t make to work this package on linux 5.6.2-arch1-2

anyone know what to fix?

Makepkg finishes with

“****

error: implicit declaration of function •drm_pci_exit•;

did you mean •drm_dev_exit•? [-Werror=implicit-function-declaration]


Some warnings being treated as errors

****”

wurbelgrumpff commented on 2020-03-22 22:41 (UTC)

with upgrading to kernel 5.5.10-arch1-1 dkms also failed due to the gcc version mismatch. With the altered command from @osvcos sudo env IGNORE_CC_MISMATCH=1 dkms install -m nvidia -v 340.108 -k 5.5.10-arch1-1 the upgrade of kernel and nvidia worked fine again.

graysky commented on 2020-03-19 13:20 (UTC)

OK, added in 340.108-6

https://aur.archlinux.org/cgit/aur.git/commit/?h=nvidia-340xx&id=9ae3a28fa19b416e5e8cc972c1da824bcc00893a

vova7890 commented on 2020-03-19 10:34 (UTC) (edited on 2020-03-19 10:36 (UTC) by vova7890)

That simply adds SLAB_USERCOPY flag to kmem_cache_create, that come from some kernel version. You can see that in 390xx kernel module

` nv_memdbg_init();

/* Allocated memory that is used for copying to/from userspace should be
 * tagged as such, on kernels that support this feature.
 */
nvidia_stack_t_cache = NV_KMEM_CACHE_CREATE_USERCOPY(nvidia_stack_cache_name,
                                                     nvidia_stack_t);
if (nvidia_stack_t_cache == NULL)
{
    nv_printf(NV_DBG_ERRORS, "NVRM: stack cache allocation failed!\n");
    rc = -ENOMEM;
    goto failed6;
}

rc = nv_kmem_cache_alloc_stack(&sp);

`

And i had tested this on nvidia 210 gpu, work fine.

graysky commented on 2020-03-19 08:50 (UTC) (edited on 2020-03-19 08:56 (UTC) by graysky)

I have no hardware myself for testing. Does the error in dmesg also cause breakage or is it just a harmless line in dmesg? Can you post a link or two from your searching? Can you verify there are no ill-effects of that patch?

vova7890 commented on 2020-03-19 01:01 (UTC)

I'm facing this message in dmesg: Bad or missing usercopy whitelist? Kernel memory exposure attempt detected from SLUB object 'nvidia_stack_t'

A little search and I had portback this patch to 340xx. Can you please add this? https://zvova7890.com.ua/s/ed9JJG8KyQKQQBx

osvcos commented on 2020-03-16 20:51 (UTC)

@holyArch As graysky wrote, this is probaly due to the gcc version mismatch. Try with: sudo env IGNORE_CC_MISMATCH=1 dkms install -m nvidia -v 340.108 -k 5.5.9-arch1-2

holyArch commented on 2020-03-16 20:40 (UTC) (edited on 2020-03-17 17:00 (UTC) by holyArch)

@graysky The mirrors I use are all listed under Successfully Syncing Mirrors, so that's not the issue.

Edit: Thank you, osvcos, the command words (after upgrading kernel).

graysky commented on 2020-03-16 19:57 (UTC)

Is your mirror out of sync? You need the new toolkit that was used to build the kernel.

holyArch commented on 2020-03-16 19:01 (UTC)

@graysky

DKMS make.log for nvidia-340.108 for kernel 5.5.9-arch1-2 (x86_64)

gcc-version-check failed:

The compiler used to compile the kernel (gcc 9.2) does not exactly match the current compiler (gcc 9.3). The Linux 2.6 kernel module loader rejects kernel modules built with a version of gcc that does not exactly match that of the compiler used to build the running kernel.

If you know what you are doing and want to override the gcc version check, you can do so by setting the IGNORE_CC_MISMATCH environment variable to "1".

In any other case, set the CC environment variable to the name of the compiler that was used to compile the kernel.

Failed CC version check. Bailing out!

make: [nvidia-modules-common.mk:201: build-sanity-checks] Error 1 make: Entering directory '/var/lib/dkms/nvidia/340.108/build/uvm' cd ./..; make module SYSSRC=/lib/modules/5.5.9-arch1-2/build SYSOUT=/lib/modules/5.5.9-arch1-2/build KBUILD_EXTMOD=./.. make[1]: Entering directory '/var/lib/dkms/nvidia/340.108/build' NVIDIA: calling KBUILD... make[2]: Entering directory '/usr/lib/modules/5.5.9-arch1-2/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=.. \ single-build= \ need-builtin=1 need-modorder=1 scripts/Makefile.build:42: ../Makefile: No such file or directory make[3]: No rule to make target '../Makefile'. Stop. make[2]: [Makefile:1693: ..] Error 2 make[2]: Leaving directory '/usr/lib/modules/5.5.9-arch1-2/build' NVIDIA: left KBUILD. nvidia.ko failed to build! make[1]: [Makefile:197: nvidia.ko] Error 1 make[1]: Leaving directory '/var/lib/dkms/nvidia/340.108/build' make: *** [Makefile:222: ../Module.symvers] Error 2 make: Leaving directory '/var/lib/dkms/nvidia/340.108/build/uvm'

graysky commented on 2020-03-14 22:23 (UTC) (edited on 2020-03-14 22:25 (UTC) by graysky)

@holyArch - Builds fine for me in a clean chroot. Not sure what to tell you.https://gist.github.com/graysky2/55b9912ce90a82d7a7714f9b6f0854c2

And please do not flag out of date because you ran into a build error. It's out of date when upstream releases something new.

holyArch commented on 2020-03-14 21:36 (UTC) (edited on 2020-03-14 21:41 (UTC) by holyArch)

==> dkms install nvidia/340.108 -k 5.5.9-arch1-2 Error! Bad return status for module build on kernel: 5.5.9-arch1-2 (x86_64) Consult /var/lib/dkms/nvidia/340.108/build/make.log for more information.

After that, I downgraded gcc, gcc-libs, linux, linux-headers.

nmruser commented on 2020-03-11 22:34 (UTC)

Thanks everyone, after upgrading to kernel 5.5.8 and the drivers work again without any change, I believe xfce4 etc were also upgraded meanwhile.

pissbrain commented on 2020-03-07 21:46 (UTC)

@wurbelgrumpff I use xfce4 and it doesn't freeze.

sint commented on 2020-03-07 16:20 (UTC)

I upgraded to current 5.5.8. With kde all work fine.

wurbelgrumpff commented on 2020-03-07 00:22 (UTC)

Sorry for this question, but is it meanwhile sure to update to actual kernel with xfce4 as desktop or does it freeze again, like @nmruser described? Any experiences about it?

pissbrain commented on 2020-03-06 20:47 (UTC)

I just upgraded to kernel 5.5.8 and the drivers still work =P.

graysky commented on 2020-03-06 20:44 (UTC)

@nmruser - I do not have hardware that uses these drivers for testing. I can only confirm that I am able to build the module against 5.5.8 in a build root.

pissbrain commented on 2020-03-06 17:50 (UTC)

@Viterzgir Nah, nouveau is slow and unreliable. Kernel patches are all the support these drivers need.

Viterzgir commented on 2020-03-06 14:02 (UTC)

Nvidia drop support nvidia-340xx. Just replace with nouveau driver.

nmruser commented on 2020-03-04 04:22 (UTC)

After the latest upgrade today to kernel 5.5.7, I could not startxfce4. The system freezes completely. A clean rebuild does not seem to solve the problem. Everything seems fine but X-server. Any comment?

johnhamelink commented on 2020-02-06 10:03 (UTC)

NB: I had to cleanbuild to ensure that the correctly compiled module was being installed by DKMS, otherwise I was getting the same error as before. All working now :)

graysky commented on 2020-02-05 00:10 (UTC)

Got it, thanks.

osvcos commented on 2020-02-04 22:12 (UTC)

The first patch for 340.108 is missing. This is the file: https://aur.archlinux.org/cgit/aur.git/tree/unfuck-340.108-build-fix.patch?h=nvidia-340xx&id=b03543e5eb49b77ff2b23af0485a72e69ee32f6a

graysky commented on 2020-02-04 21:37 (UTC)

Oops, I bumped too soon: https://gist.github.com/graysky2/ab7ee9dc5194051e3bab32211d86a9c7

graysky commented on 2020-02-04 21:36 (UTC)

@osvcos - Thanks as usual!

osvcos commented on 2020-02-04 16:10 (UTC)

Hi, this fixes the build: https://pastebin.com/s6y0qNCL

johnhamelink commented on 2020-02-04 10:42 (UTC) (edited on 2020-02-04 11:21 (UTC) by johnhamelink)

While trying to upgrade this package after upgrading to 5.5.1-arch-1, the build fails as follows: https://gist.github.com/johnhamelink/127d54f07eb70247ad5ac40e89c67d2f

I have also been receiving a conflicted dependencies error between nvidia-340xx-utils and nvidia-340xx-dkms (yay wants to upgrade them both at once). I removed nvidia-340xx-utils to try and unstick this, resulting in my current problem.

I was able to get a working machine again by:

  • Disabling the nvidia modules from initcpio.conf
  • Downgrading the linux and linux-headers packages to 5.4.15-arch1-1:
sudo pacman -U /var/cache/pacman/pkg/linux-headers-5.4.15.arch1-1-x86_64.pkg.tar.zst
sudo pacman -U /var/cache/pacman/pkg/linux-5.4.15.arch1-1-x86_64.pkg.tar.zst
  • Adding linux and linux-headers to /etc/pacman.conf’s ignored packages list
  • Upgrade all dependencies
  • Reboot
  • Re-enabling the nvidia modules in initcpio.conf
  • Re-installing nvidia-340xx-dkms and nvidia-340xx-utils
  • Reboot

I hope this is useful/helpful!

graysky commented on 2020-02-03 21:44 (UTC)

It is ... my mirror was out-of-sync. Need to identify a patch for 5.5.x ... Osvaldo is working on one but if you know of one out there from another distro please share it.

wurbelgrumpff commented on 2020-02-03 21:30 (UTC)

Thanks for the answer, but as far as I never use any [testing] I'm sure that 5.5.x is in [core] now.

graysky commented on 2020-02-03 21:04 (UTC) (edited on 2020-02-03 21:04 (UTC) by graysky)

When 5.5.x goes into [core] as there is no [testing] for the AUR... also, someone will need to point me to a patch for 5.5.x if I cannot find one myself.

wurbelgrumpff commented on 2020-02-03 20:42 (UTC)

Hi, I've updated to arch Linux 5.5.1, but my graphical Interface will not start yet. Is there any chance to get a 5.5.-patch soon? Thanks a lot in advance!

taz-007 commented on 2020-01-28 19:06 (UTC)

fwiw, it doesn't build anymore with the 5.5.arch1 kernel. (I haven't had time to try to fix it).

willianholtz commented on 2020-01-19 00:12 (UTC)

Sorry for the ignorance, but even with the update my 9300M card, it does not accept the drive, it goes out as soon as I enter the system. Is there anything to do?

pissbrain commented on 2020-01-17 13:58 (UTC)

@Zappo-II the linux package is on version 5.4.12, try updating that first.

Zappo-II commented on 2020-01-17 12:27 (UTC)

For me latest linux-5.4.3 breaks with 340.108-3 (won't switch to gfx in boot anymore, even after rebuilding and stuff), had to revert to linux-5.4.2... Stupid me or anybody else...???

graysky commented on 2020-01-10 23:37 (UTC)

Fixed, thanks.

wurbelgrumpff commented on 2020-01-10 22:55 (UTC) (edited on 2020-01-10 23:45 (UTC) by wurbelgrumpff)

Ok, now it works fine!

Thank you very much for your fast response!

Hello, I can't update, I think, the checksum (sha256sums) is invalid.

-> NVIDIA-Linux-x86_64-340.108-no-compat32.run gefunden -> unfuck-340.108-build-fix.patch gefunden -> fix_multi_core_build.patch gefunden ==> FEHLER: Integritäts-Prüfungen (sha256) unterscheiden sich in der Größe vom Array der Quelle. :: Unable to build nvidia-340xx-dkms - makepkg exited with code: 1

Can you help please? (I think, the "Fehler" means: Integrity-Check differs in size of the Array of the source).

So I have uninstalled the former Driver version and now.....

pissbrain commented on 2019-12-26 15:34 (UTC)

For those who can't update due to broken dependency complaints, just remove the currently installed versions and then update.

graysky commented on 2019-12-25 11:30 (UTC)

@osvcos - Thanks, just what we needed. All 3 packages bumped.

osvcos commented on 2019-12-25 05:21 (UTC)

Hi, with this patch 340.108 builds on kernels 5.4.6 and 4.19.91 https://pastebin.com/yWxMEkuj

graysky commented on 2019-12-24 12:27 (UTC)

Cannot update until someone identifies a patch/patches to fix broken builds.

leejnk commented on 2019-12-24 02:55 (UTC) (edited on 2019-12-24 02:56 (UTC) by leejnk)

Nvidia released 340.108

https://us.download.nvidia.com/XFree86/Linux-x86_64/340.108/NVIDIA-Linux-x86_64-340.108.run

https://us.download.nvidia.com/XFree86/Linux-x86_64/340.108/NVIDIA-Linux-x86_64-340.108-no-compat32.run

poluyan commented on 2019-12-03 13:30 (UTC)

piotro, thank you! It worked for me. I only removed any '....-old or -new/' prefix from it.

piotro commented on 2019-12-03 09:55 (UTC)

If anybody is interested: patch for 5.4 kernel. All kudos to Alberto Milone pls! https://github.com/warpme/minimyth2/blob/master/script/nvidia/nvidia-340.107/files/kernel-5.4.patch

newbthenewbd commented on 2019-12-03 01:15 (UTC)

Linux 5.4 just hit the core, patch much pl0x?

With that release, I think that it might also be a good idea to limit the maximum linux version supported by the package, as it seems that a new major kernel revision is much more likely to break it than not, and that'd provide some notice to the poor nightly updaters.

Per https://wiki.archlinux.org/index.php/PKGBUILD#depends, it seems that it is possible like this:

makedepends=("nvidia-340xx-utils=${pkgver}" 'linux>=5.3.6' 'linux<5.4.0' 'linux-headers>=5.3.6' 'linux-headers<5.4.0')

Except, of course, for the version ought to support 5.4 the values will have to be different. :)

Thank You!

leejnk commented on 2019-11-27 01:50 (UTC)

@graysky

thanks fro the update.

will wait.

graysky commented on 2019-11-26 18:53 (UTC)

@leejnk - When linux-5.4 hits [core]... currently 5.3.x is in [core].

leejnk commented on 2019-11-26 10:22 (UTC)

Please add support for 5.4 kernel

linuxyz commented on 2019-11-19 22:20 (UTC)

I can't build this: "NVIDIA: calling KBUILD... make[1]: /usr/src/linux: No such file or directory. Stop. NVIDIA: left KBUILD. nvidia.ko failed to build! make: [Makefile:192: nvidia.ko] Error 1 ==> ERROR: A failure occurred in build(). Aborting... " (I'm on kernel 5.3.11 by the way)

piotro commented on 2019-10-28 17:30 (UTC)

Guys - is anybody working on 340 compilation on 5.4 kernel?

graysky commented on 2019-10-13 11:14 (UTC) (edited on 2019-10-13 11:15 (UTC) by graysky)

I have a working PKGBUILD. I will push it once linux-5.3.6-1 comes out of [testing] due to the obvious incompatibility with previous versions.

JerryXiao commented on 2019-10-13 02:45 (UTC)

@graysky Use dkms or rebuild the package every time you upgrade your kernel.
If you would like to bump pkgrel every time kernel updates, I can give you co-maintainer.

graysky commented on 2019-10-12 10:49 (UTC)

@JerryXiao - You'll need to modify this per kernel package changes.

Changes to kernel: https://git.archlinux.org/svntogit/packages.git/commit/trunk?h=packages/linux&id=07576ee7d30942d05d3a0ed7038ad62f00c21e30

See nvidia-390xx as a model: https://git.archlinux.org/svntogit/packages.git/commit/trunk?h=packages/nvidia-390xx&id=cfcd464b1e580399429e055e1dbd39b5b9958fc9

kiffmet commented on 2019-10-08 20:18 (UTC) (edited on 2019-10-08 20:22 (UTC) by kiffmet)

Hey can you please add this patch? It fixes the usercopy error in dmesg. https://pastebin.com/7ERSX7D0

Original source: https://bugs.launchpad.net/ubuntu/+source/nvidia-graphics-drivers-340/+bug/1802622

yigitdnz commented on 2019-10-07 15:34 (UTC)

@osvcos Thank you. It worked.

osvcos commented on 2019-10-07 11:55 (UTC)

@yigitdnz Try with sudo env IGNORE_CC_MISMATCH=1 dkms install -m nvidia -v 340.107 -k 4.19.77-1-lts

yigitdnz commented on 2019-10-06 21:20 (UTC) (edited on 2019-10-06 21:20 (UTC) by yigitdnz)

And upgrading to kernel 4.19.77-1-lts broke my nvidia. I timeshifted back to kernel 4.19.76-1-lts.

I get this when I try to upgrade: "Error! Bad return status for module build on kernel: 4.19.77-1-lts (x86_64) Consult /var/lib/dkms/nvidia/340.107/build/make.log for more information."

make.log file: https://pastebin.com/bu5dgTYQ

leopseft commented on 2019-10-06 12:43 (UTC)

Upgrading to the latest kernel 5.3.4 broke my nvidia and I had no graphics. Downgrading to the previous one 5.3.1 got error for gcc-version-check failed. Intalling the latest kernel again and removing the nvidia package and reinstalling it again triggerd the dkms hook with no error that time. Really strange.

JerryXiao commented on 2019-10-06 05:38 (UTC)

@taro_kun You currently have nvidia-340xx-dkms 340.107-90 installed, upgrade to 340.107-91

taro_kun commented on 2019-10-06 02:10 (UTC) (edited on 2019-10-06 02:19 (UTC) by taro_kun)

Package won't build for me on 5.3.1 kernel. Not sure if it just needs an update or if the problem is on my end. Here's the log: https://pastebin.com/trPMeCSB

DavidK commented on 2019-09-19 21:22 (UTC)

Needs updated patches for 5.3 kernel, won't compile as is.

willianholtz commented on 2019-08-24 15:36 (UTC)

https://pastebin.com/XvJQ3fDn if it helps, i have my dmesg with errors.

leopseft commented on 2019-08-09 17:35 (UTC)

Hello to everyone, im getting this error while compiling:

"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."; \ "

Should I deal with it, or just ignore it? Thanks!!

JerryXiao commented on 2019-07-17 16:25 (UTC)

@papakilo You should always rebuild the package on kernel upgrade including minor updates if you're not using dkms.

papakilo commented on 2019-07-17 16:08 (UTC)

Hi, is there a kernel-5.2.patch? Because driver does NOT work with kernel 5.2 or 5.2.1 causing my computer to stuck on boot message "Started TLP system startup/shutdown"...

sacarde commented on 2019-07-01 18:34 (UTC)

@JerryXiao , if I use xf86-video-nouveaux some time it freezes system, so I am forced to disinstall xf86-video-nouveaux and use nouveau kernel module (without acceleration)

thanks

JerryXiao commented on 2019-07-01 17:27 (UTC) (edited on 2019-07-01 17:28 (UTC) by JerryXiao)

@sacarde no, use nouveau instead.

sacarde commented on 2019-07-01 14:32 (UTC)

is this module right for an old: [GeForce 6150SE nForce 430] ?

Xezlec commented on 2019-06-23 16:05 (UTC) (edited on 2019-06-23 16:08 (UTC) by Xezlec)

I had to do this to get OpenGL to work:

sudo mv /usr/lib/xorg/modules/extensions/libglx.so{,.old}
sudo ln -s /usr/lib/nvidia/xorg/libglx.so.340.107 /usr/lib/xorg/modules/extensions/libglx.so

For more details, see https://bbs.archlinux.org/viewtopic.php?pid=1851223#p1851223

JerryXiao commented on 2019-06-20 05:24 (UTC)

It seems that you are using some sort of script to keep old modules during kernel upgrade. Reboot the system and you should be fine.

tombusby commented on 2019-06-19 20:44 (UTC) (edited on 2019-06-19 20:44 (UTC) by tombusby)

Getting the following error:

==> Making package: nvidia-340xx 340.107-90 (Wed 19 Jun 2019 22:40:54 CEST)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
  -> Downloading NVIDIA-Linux-x86_64-340.107-no-compat32.run...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 36.9M  100 36.9M    0     0  75.6M      0 --:--:-- --:--:-- --:--:-- 75.4M
  -> Found kernel-4.11.patch
  -> Found kernel-5.0.patch
  -> Found kernel-5.1.patch
==> Validating source files with sha512sums...
    NVIDIA-Linux-x86_64-340.107-no-compat32.run ... Passed
    kernel-4.11.patch ... Passed
    kernel-5.0.patch ... Passed
    kernel-5.1.patch ... Passed
==> Extracting sources...
==> Starting prepare()...
Creating directory NVIDIA-Linux-x86_64-340.107-no-compat32
Verifying archive integrity... OK
Uncompressing NVIDIA Accelerated Graphics Driver for Linux-x86_64 340.107............................................>
patching file kernel/uvm/nvidia_uvm_lite.c
patching file kernel/nv-drm.c
patching file kernel/os-interface.c
patching file kernel/uvm/nvidia_uvm_lite.c
patching file kernel/uvm/nvidia_uvm_lite.c
patching file kernel/nv-drm.c
==> Starting build()...
NVIDIA: calling KBUILD...
make[1]: Entering directory '/usr/lib/modules/5.1.9-arch1-1-ARCH/build'
make[1]: *** No rule to make target 'modules'.  Stop.
make[1]: Leaving directory '/usr/lib/modules/5.1.9-arch1-1-ARCH/build'
NVIDIA: left KBUILD.
nvidia.ko failed to build!
make: *** [Makefile:192: nvidia.ko] Error 1
==> ERROR: A failure occurred in build().
    Aborting...