340 nvidia driver installation problem

Hello.
gf9800 g92
I know its legacy. But still supported via AUR and worked for me at Arch.
But here at Manjaro i cant install this drivers.
Can you help?

[home src]# mhwd-kernel -li
Currently running: 6.1.12-1-MANJARO (linux61)
The following kernels are installed in your system:
   * linux61
[home src]#

following this instructions
h***s://forum.manjaro.org/t/howto-get-legacy-340xx-nvidia-drivers-back/46969/22

sudo pacman -S git base-devel
sudo pacman -S $(mhwd-kernel -li | grep '*' | cut -d ' ' -f5 | awk '{print $0,"-headers"}' | sed s'/ //'g)
git clone h***s://aur.archlinux.org/nvidia-340xx-utils.git
cd nvidia-340xx-utils && makepkg -si && cd ..
git clone https://aur.archlinux.org/nvidia-340xx.git
cd nvidia-340xx && NVIDIA_340XX_DKMS_ONLY=1 makepkg -si && cd ..
sudo cp /usr/share/nvidia-340xx/20-nvidia.conf /etc/X11/xorg.cond.d/.

install stuck at
==> Installing nvidia-340xx package group with pacman -U...
and never ending

PS

i made custom PKGBUILD
from
git clone https://github.com/philmmanjaro/nvidia-340xx-dkms/releases/tag/340.108-1

but its same stuck at
==> Installing nvidia-340xx package group with pacman -U...

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

pkgbase=nvidia-340xx
pkgname=(nvidia-340xx-dkms)
pkgver=340.108
pkgrel=1
pkgdesc="NVIDIA drivers for linux, 340xx legacy branch"
arch=('x86_64')
url="h***s://www.nvidia.com/"
makedepends=("nvidia-340xx-utils=${pkgver}" 'linux>=5.4' 'linux-headers>=5.4')
conflicts=('nvidia')
license=('custom')
options=(!strip)
source=("https://us.download.nvidia.com/XFree86/Linux-x86_64/${pkgver}/NVIDIA-Linux-x86_64-${pkgver}-no-compat32.run"
  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
  0010-kernel-5.18.patch
  0011-kernel-6.0.patch
  0012-kernel-6.2.patch
)
b2sums=('6538bbec53b10f8d20977f9b462052625742e9709ef06e24cf2e55de5d0c55f1620a4bb21396cfd89ebc54c32f921ea17e3e47eaa95abcbc24ecbd144fb89028'
        '7150233df867a55f57aa5e798b9c7618329d98459fecc35c4acfad2e9772236cb229703c4fa072381c509279d0588173d65f46297231f4d3bfc65a1ef52e65b1'
        'b436095b89d6e294995651a3680ff18b5af5e91582c3f1ec9b7b63be9282497f54f9bf9be3997a5af30eec9b8548f25ec5235d969ac00a667a9cddece63d8896'
        '947cb1f149b2db9c3c4f973f285d389790f73fc8c8a6865fc5b78d6a782f49513aa565de5c82a81c07515f1164e0e222d26c8212a14cf016e387bcc523e3fcb1'
        '665bf0e1fa22119592e7c75ff40f265e919955f228a3e3e3ebd76e9dffa5226bece5eb032922eb2c009572b31b28e80cd89656f5d0a4ad592277edd98967e68f'
        '344cd3a9888a9a61941906c198d3a480ce230119c96c72c72a74b711d23face2a7b1e53b9b4639465809b84762cdc53f38210e740318866705241bc4216e4f35'
        '31a4047ab84d13e32fd7fdbf9f69c696d3fab6666c541d2acf0a189c1d17c876970985167fd389a4adc0f786021172bdec1aa6d690736e3cf9fcd8ceabe5fd32'
        'b3b7bbd597252b25ccb68f431f83707a10d464996f6c74bb67143795df96054da719faf09c1ad2e1c215261356833ad3fa0d9e60552151f827f9d7be7ae44605'
        'caedc5651bfd14c02fb677f9c5e87adef298d871c6281b78ce184108310e4243ded82210873014be7fedee0dd6251305fa9bbce0c872b76438e0895ef76109d9'
        '0266e1baaac9ffbb94d9e916a693b1663d8686b15e970bfc30f7c51f051a0af9267aa5f6a12b68586c69d2e9796a1124488b3997ba4b26db1a5ac10a892f0df2'
        'd69c9acbe550d5fccca68ca6a0d5095cbcaf887d2bc43704a8eb85533896692f16701eef07ead297881f596f5502c3105bb5bea77b2dcaf6c4dc2b49941f9f19'
        '682a7b8e58d2a008531b7e5179e32c0c71adad673891a1057acd1aa26e410d9d93ff607e46257c6701619621cee1a27e613ec9ae19a580acdd6f68f1c1fdedea'
        '47681d1e4b16f0b50775120b0a02bc6d279de692cde6086b895eef80bb4598e914ffe1fae81707a771d00f23df60ee4df591dfe042f5b764856d2e07306f3821')
_pkg="NVIDIA-Linux-x86_64-${pkgver}-no-compat32"

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

  cd "${_pkg}"
  patch -Np1 -i ../0001-kernel-5.7.patch
  patch -Np1 -i ../0002-kernel-5.8.patch
  patch -Np1 -i ../0003-kernel-5.9.patch
  patch -Np1 -i ../0004-kernel-5.10.patch
  patch -Np1 -i ../0005-kernel-5.11.patch
  patch -Np1 -i ../0006-kernel-5.14.patch
  patch -Np1 -i ../0007-kernel-5.15.patch
  patch -Np1 -i ../0008-kernel-5.16.patch
  patch -Np1 -i ../0009-kernel-5.17.patch
  patch -Np1 -i ../0010-kernel-5.18.patch
  patch -Np1 -i ../0011-kernel-6.0.patch
  patch -Np1 -i ../0012-kernel-6.2.patch
  
  cp -a kernel kernel-dkms
}

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

    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"
}

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

UPD
native AUR PKGBUILD also not work
headers and 340utils is installed

[freeartist-manjaro@home nvidia-340xx]$ makepkg -si
/home/freeartist-manjaro/Downloads/nvidia-340xx/PKGBUILD: line 51: /usr/src/linux/version: No such file or directory
==> Making package: nvidia-340xx 340.108-32 (вт, 07-бер-2023 03:49:40 +0200)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
  -> Found NVIDIA-Linux-x86_64-340.108-no-compat32.run
  -> 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
  -> Found 0006-kernel-5.14.patch
  -> Found 0007-kernel-5.15.patch
  -> Found 0008-kernel-5.16.patch
  -> Found 0009-kernel-5.17.patch
  -> Found 0010-kernel-5.18.patch
  -> Found 0011-kernel-6.0.patch
  -> Found 0012-kernel-6.2.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
    0006-kernel-5.14.patch ... Passed
    0007-kernel-5.15.patch ... Passed
    0008-kernel-5.16.patch ... Passed
    0009-kernel-5.17.patch ... Passed
    0010-kernel-5.18.patch ... Passed
    0011-kernel-6.0.patch ... Passed
    0012-kernel-6.2.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...........................................................................................................................................................................................................
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/conftest.sh
patching file kernel/nv-drm.c
Hunk #1 succeeded at 59 (offset -1 lines).
Hunk #2 succeeded at 211 (offset -1 lines).
Hunk #3 succeeded at 242 (offset -1 lines).
Hunk #4 succeeded at 278 (offset -1 lines).
Hunk #5 succeeded at 408 (offset -2 lines).
Hunk #6 succeeded at 459 (offset -2 lines).
patching file kernel/nv-linux.h
patching file kernel/uvm/nvidia_uvm_linux.h
Applying patch 0006-kernel-5.14.patch...
patching file kernel/nv-drm.c
patching file kernel/os-interface.c
Applying patch 0007-kernel-5.15.patch...
patching file kernel/nv-drm.c
Hunk #1 succeeded at 606 (offset 77 lines).
Applying patch 0008-kernel-5.16.patch...
patching file kernel/os-interface.h
patching file kernel/nv.h
Applying patch 0009-kernel-5.17.patch...
patching file kernel/conftest.sh
patching file kernel/nv-linux.h
patching file kernel/uvm/conftest.sh
Applying patch 0010-kernel-5.18.patch...
patching file kernel/nv-acpi.c
patching file kernel/nv-dma.c
patching file kernel/nv-drm.c
patching file kernel/nv-vm.c
patching file kernel/nv-frontend.c
Applying patch 0011-kernel-6.0.patch...
patching file kernel/nv-acpi.c
Applying patch 0012-kernel-6.2.patch...
patching file kernel/conftest.sh
patching file kernel/nv-acpi.c
Hunk #2 succeeded at 302 (offset -58 lines).
Hunk #3 succeeded at 357 (offset -58 lines).
==> Removing existing $pkgdir/ directory...
==> Starting build()...
NVIDIA: calling KBUILD...
make[1]: Entering directory '/home/freeartist-manjaro/Downloads/nvidia-340xx/src/NVIDIA-Linux-x86_64-340.108-no-compat32/kernel'
make[1]: *** /usr/src/linux: No such file or directory.  Stop.
make[1]: Leaving directory '/home/freeartist-manjaro/Downloads/nvidia-340xx/src/NVIDIA-Linux-x86_64-340.108-no-compat32/kernel'
NVIDIA: left KBUILD.
nvidia.ko failed to build!
make: *** [Makefile:202: nvidia.ko] Error 1
==> ERROR: A failure occurred in build().
    Aborting...
[freeartist-manjaro@home nvidia-340xx]$

Take a look here:

It looks like it is for 5.4 and 5.10 kernels. Maybe something there will be helpful. I apologize if I do not fully understand the issue.

It is odd that some commenters on the AUR page say that the 6.2 patch works.

Patched for kernel 6.2, 340 driver from AUR working for me at Arch but not at Manjaro

Welcome to the forum! :wave:

What NVIDIA card do you have? Have you tried the 390xx drivers?

Please post your system info as outlined here:

Hello! Thanks for quick reply!)
For that gf9800(g92) 340 is last eol legacy working driver

[home src]# inxi -v7azy
System:
  Kernel: 6.1.12-1-MANJARO arch: x86_64 bits: 64 compiler: gcc v: 12.2.1
    parameters: BOOT_IMAGE=/boot/vmlinuz-6.1-x86_64
    root=UUID=a944c689-6c00-4cde-acd6-73097a4ea9cb rw quiet splash
    udev.log_priority=3
  Desktop: Xfce v: 4.18.1 tk: Gtk v: 3.24.36 info: xfce4-panel wm: xfwm
    v: 4.18.0 dm: LightDM v: 1.32.0 Distro: Manjaro Linux base: Arch Linux
Machine:
  Type: Desktop Mobo: Gigabyte model: P31-DS3L v: x.x serial: N/A BIOS: Award
    v: F10A date: 07/30/2008
Battery:
  Message: No system battery data found. Is one present?
Memory:
  RAM: total: 3.83 GiB used: 2.61 GiB (68.1%)
  Array-1: capacity: 4 GiB slots: 4 EC: None max-module-size: 1024 MiB
  Device-1: A0 info: single-bank type: N/A size: 1024 MiB speed: 667 MT/s
    volts: N/A width (bits): data: 64 total: 64 manufacturer: N/A part-no: N/A
    serial: N/A
  Device-2: A1 info: single-bank type: N/A size: 1024 MiB speed: 667 MT/s
    volts: N/A width (bits): data: 64 total: 64 manufacturer: N/A part-no: N/A
    serial: N/A
  Device-3: A2 info: single-bank type: N/A size: 1024 MiB speed: 800 MT/s
    volts: N/A width (bits): data: 64 total: 64 manufacturer: N/A part-no: N/A
    serial: N/A
  Device-4: A3 info: single-bank type: N/A size: 1024 MiB speed: 667 MT/s
    volts: N/A width (bits): data: 64 total: 64 manufacturer: N/A part-no: N/A
    serial: N/A
CPU:
  Info: model: Intel Core2 Quad Q6600 socket: 478 (775) note: check bits: 64
    type: MCP arch: Core2 Merom level: v1 built: 2006-09 process: Intel 65nm
    family: 6 model-id: 0xF (15) stepping: 0xB (11) microcode: 0xBA
  Topology: cpus: 1x cores: 4 smt: <unsupported> cache: L1: 256 KiB
    desc: d-4x32 KiB; i-4x32 KiB L2: 8 MiB desc: 2x4 MiB
  Speed (MHz): avg: 1600 min/max: 1600/2400 base/boost: 2400/4000 scaling:
    driver: acpi-cpufreq governor: schedutil volts: 1.3 V ext-clock: 266 MHz
    cores: 1: 1600 2: 1600 3: 1600 4: 1600 bogomips: 19207
  Flags: acpi aperfmperf apic arch_perfmon bts clflush cmov constant_tsc
    cpuid cx16 cx8 de ds_cpl dtes64 dtherm dts est flexpriority fpu fxsr ht
    lahf_lm lm mca mce mmx monitor msr mtrr nopl nx pae pat pbe pdcm pebs pge
    pni pse pse36 pti rep_good sep sse sse2 ssse3 syscall tm tm2 tpr_shadow
    tsc vme vmx vnmi vpid xtpr
  Vulnerabilities:
  Type: itlb_multihit status: KVM: VMX disabled
  Type: l1tf mitigation: PTE Inversion; VMX: EPT disabled
  Type: mds status: Vulnerable: Clear CPU buffers attempted, no microcode;
    SMT disabled
  Type: meltdown mitigation: PTI
  Type: mmio_stale_data status: Unknown: No mitigations
  Type: retbleed status: Not affected
  Type: spec_store_bypass status: Vulnerable
  Type: spectre_v1 mitigation: usercopy/swapgs barriers and __user pointer
    sanitization
  Type: spectre_v2 mitigation: Retpolines, STIBP: disabled, RSB filling,
    PBRSB-eIBRS: Not affected
  Type: srbds status: Not affected
  Type: tsx_async_abort status: Not affected
Graphics:
  Device-1: NVIDIA G92 [GeForce 9800 GTX+] vendor: Micro-Star MSI
    driver: nouveau v: kernel non-free: series: 340.xx status: legacy (EOL) last:
    release: 340.108 kernel: 5.4 xorg: 1.20 arch: Tesla process: 40-80nm
    built: 2006-13 pcie: gen: 1 speed: 2.5 GT/s lanes: 16 ports:
    active: DVI-I-1 empty: DVI-I-2 bus-ID: 01:00.0 chip-ID: 10de:0613
    class-ID: 0300 temp: 48.0 C
  Display: x11 server: X.Org v: 21.1.7 compositor: xfwm v: 4.18.0 driver: X:
    loaded: modesetting alternate: fbdev,vesa dri: nouveau gpu: nouveau
    display-ID: :0.0 screens: 1
  Screen-1: 0 s-res: 1920x1080 s-dpi: 96 s-size: 508x285mm (20.00x11.22")
    s-diag: 582mm (22.93")
  Monitor-1: DVI-I-1 model: Dell S2421HGF serial: <filter> built: 2020
    res: 1920x1080 hz: 60 dpi: 93 gamma: 1.2 size: 527x296mm (20.75x11.65")
    diag: 604mm (23.8") ratio: 16:9 modes: max: 1920x1080 min: 720x400
  API: OpenGL Message: Unable to show GL data. Required tool glxinfo missing.
Audio:
  Device-1: Intel NM10/ICH7 Family High Definition Audio
    vendor: Gigabyte GA-D525TUD driver: snd_hda_intel v: kernel bus-ID: 00:1b.0
    chip-ID: 8086:27d8 class-ID: 0403
  Sound API: ALSA v: k6.1.12-1-MANJARO running: yes
  Sound Server-1: JACK v: 1.9.22 running: no
  Sound Server-2: PulseAudio v: 16.1 running: yes
  Sound Server-3: PipeWire v: 0.3.65 running: no
Network:
  Device-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet
    vendor: Gigabyte driver: r8169 v: kernel pcie: gen: 1 speed: 2.5 GT/s
    lanes: 1 port: d000 bus-ID: 03:00.0 chip-ID: 10ec:8168 class-ID: 0200
  IF: enp3s0 state: up speed: 100 Mbps duplex: full mac: <filter>
  IP v4: <filter> type: dynamic noprefixroute scope: global
    broadcast: <filter>
  IP v6: <filter> type: noprefixroute scope: link
  WAN IP: <filter>
Bluetooth:
  Message: No bluetooth data found.
Logical:
  Message: No logical block device data found.
RAID:
  Message: No RAID data found.
Drives:
  Local Storage: total: 1.44 TiB used: 139.77 GiB (9.5%)
  SMART Message: Required tool smartctl not installed. Check --recommends
  ID-1: /dev/sda maj-min: 8:0 vendor: Samsung model: SP2014N size: 186.31 GiB
    block-size: physical: 512 B logical: 512 B speed: <unknown> type: N/A
    serial: <filter> rev: 0-33 scheme: MBR
  ID-2: /dev/sdb maj-min: 8:16 vendor: Seagate model: ST3160310CS
    size: 149.05 GiB block-size: physical: 512 B logical: 512 B speed: <unknown>
    type: HDD rpm: 5900 serial: <filter> rev: SC14 scheme: MBR
  ID-3: /dev/sdc maj-min: 8:32 vendor: Seagate model: ST3160310CS
    size: 149.05 GiB block-size: physical: 512 B logical: 512 B speed: <unknown>
    type: HDD rpm: 5900 serial: <filter> rev: SC14 scheme: MBR
  ID-4: /dev/sdd maj-min: 8:48 vendor: Seagate model: ST1000DM010-2EP102
    size: 931.51 GiB block-size: physical: 4096 B logical: 512 B speed: <unknown>
    type: HDD rpm: 7200 serial: <filter> rev: CC46 scheme: MBR
  ID-5: /dev/sde maj-min: 8:64 type: USB vendor: Kingston
    model: DataTraveler 3.0 size: 57.75 GiB block-size: physical: 512 B
    logical: 512 B type: N/A serial: <filter> rev: PMAP scheme: MBR
  Message: No optical or floppy data found.
Partition:
  ID-1: / raw-size: 74.73 GiB size: 73.01 GiB (97.69%) used: 7.63 GiB (10.4%)
    fs: ext4 block-size: 4096 B dev: /dev/sdb3 maj-min: 8:19 label: N/A
    uuid: a944c689-6c00-4cde-acd6-73097a4ea9cb
  ID-2: /home raw-size: 345.7 GiB size: 339.21 GiB (98.12%)
    used: 132.14 GiB (39.0%) fs: ext4 block-size: 4096 B dev: /dev/sdd3
    maj-min: 8:51 label: N/A uuid: 24c316e7-38e1-4db4-a0aa-ade09eea7782
Swap:
  Alert: No swap data was found.
Unmounted:
  ID-1: /dev/sda1 maj-min: 8:1 size: 10.52 GiB fs: ntfs
    label: \xd0\x9d\xd0\xbe\xd0\xb2\xd1\x8b\xd0\xb9 \xd1\x82\xd0\xbe\xd0\xbc
    uuid: 064C49404C492BAD
  ID-2: /dev/sda2 maj-min: 8:2 size: 1 KiB fs: N/A label: N/A uuid: N/A
  ID-3: /dev/sda5 maj-min: 8:5 size: 29.3 GiB fs: ntfs label: NEW
    uuid: E498D01C98CFEADE
  ID-4: /dev/sda6 maj-min: 8:6 size: 48.83 GiB fs: ntfs label: NEW
    uuid: E8802A87802A5C76
  ID-5: /dev/sda7 maj-min: 8:7 size: 48.83 GiB fs: ntfs label: NEW_7
    uuid: 0EAC29DEAC29C157
  ID-6: /dev/sda8 maj-min: 8:8 size: 48.83 GiB fs: ntfs label: NEW
    uuid: B8E45713E456D2EC
  ID-7: /dev/sdb1 maj-min: 8:17 size: 70.31 GiB fs: ext4 label: N/A
    uuid: 5bd977d3-53c4-4147-964d-49cb662f8818
  ID-8: /dev/sdb2 maj-min: 8:18 size: 4 GiB fs: swap label: N/A
    uuid: 8f4faff9-db8c-457e-9e39-111e2a262fcf
  ID-9: /dev/sdc1 maj-min: 8:33 size: 70.31 GiB fs: ntfs
    label: \xd0\x9d\xd0\xbe\xd0\xb2\xd1\x8b\xd0\xb9 \xd1\x82\xd0\xbe\xd0\xbc
    uuid: 4E9E2ABD9E2A9E09
  ID-10: /dev/sdc2 maj-min: 8:34 size: 4.52 GiB fs: swap label: N/A
    uuid: b6b16d67-2aab-43c1-bfc4-d948e4a270b5
  ID-11: /dev/sdc3 maj-min: 8:35 size: 50 MiB fs: ntfs label: System Reserved
    uuid: A0D6B4C7D6B49ECA
  ID-12: /dev/sdc4 maj-min: 8:36 size: 74.17 GiB fs: ntfs label: N/A
    uuid: A414D1AC14D1822A
  ID-13: /dev/sdd1 maj-min: 8:49 size: 75.74 GiB fs: ext4 label: N/A
    uuid: 5720e815-c048-427f-b2f8-c5bd6d68665b
  ID-14: /dev/sdd2 maj-min: 8:50 size: 4 GiB fs: swap label: N/A
    uuid: 34d1ae4c-5d37-4bb7-bdd4-ae5a95060504
  ID-15: /dev/sdd4 maj-min: 8:52 size: 1 KiB fs: N/A label: N/A uuid: N/A
  ID-16: /dev/sdd5 maj-min: 8:53 size: 506.07 GiB fs: ntfs
    label: \xd0\x9d\xd0\xbe\xd0\xb2\xd1\x8b\xd0\xb9 \xd1\x82\xd0\xbe\xd0\xbc
    uuid: 3232708532704FB9
  ID-17: /dev/sde1 maj-min: 8:65 size: 57.74 GiB fs: ntfs label: E2B
    uuid: 68BE271CBE26E1F4
  ID-18: /dev/sde2 maj-min: 8:66 size: 31 KiB fs: vfat label: PTN2
    uuid: 62A7-9B7C
  ID-19: /dev/sde4 maj-min: 8:68 size: 3 GiB fs: iso9660
USB:
  Hub-1: 1-0:1 info: Full speed or root hub ports: 8 rev: 2.0 speed: 480 Mb/s
    chip-ID: 1d6b:0002 class-ID: 0900
  Device-1: 1-8:3 info: Kingston DataTraveler 100 G3/G4/SE9 G2/50
    type: Mass Storage driver: usb-storage interfaces: 1 rev: 2.1 speed: 480 Mb/s
    power: 300mA chip-ID: 0951:1666 class-ID: 0806 serial: <filter>
  Hub-2: 2-0:1 info: Full speed or root hub ports: 2 rev: 1.1 speed: 12 Mb/s
    chip-ID: 1d6b:0001 class-ID: 0900
  Hub-3: 3-0:1 info: Full speed or root hub ports: 2 rev: 1.1 speed: 12 Mb/s
    chip-ID: 1d6b:0001 class-ID: 0900
  Hub-4: 4-0:1 info: Full speed or root hub ports: 2 rev: 1.1 speed: 12 Mb/s
    chip-ID: 1d6b:0001 class-ID: 0900
  Device-1: 4-1:2 info: Microsoft Wheel Mouse Optical type: Mouse
    driver: hid-generic,usbhid interfaces: 1 rev: 1.1 speed: 1.5 Mb/s
    power: 100mA chip-ID: 045e:0040 class-ID: 0301
  Hub-5: 5-0:1 info: Full speed or root hub ports: 2 rev: 1.1 speed: 12 Mb/s
    chip-ID: 1d6b:0001 class-ID: 0900
Sensors:
  System Temperatures: cpu: 49.0 C mobo: N/A gpu: nouveau temp: 48.0 C
  Fan Speeds (RPM): N/A
Info:
  Processes: 210 Uptime: 2h 56m wakeups: 0 Init: systemd v: 252
  default: graphical tool: systemctl Compilers: gcc: 12.2.1 clang: 15.0.7
  Packages: pm: pacman pkgs: 943 libs: 287 tools: pamac Shell: Bash (sudo)
  v: 5.1.16 running-in: mc inxi: 3.3.25
[home src]#

Yes, unfortunately the 340xx series was the last supported proprietary driver for that card. Neither NVIDIA supports it nor does Manjaro, unfortunately.

The old Manjaro PKGBUILD should in theory be working with the kernel patches. :man_shrugging:

1 Like

Ok, I’ve got that working on my GT9400. A little confusingly there are two sets of instructions on this forum. The ‘official one’ is [HowTo] get legacy 340xx NVIDIA drivers back where you use the pkgbuild from nvidia-340xx-dkms/PKGBUILD at master · philmmanjaro/nvidia-340xx-dkms · GitHub.

As you can see from the pkgbuild it only has patches

but should be ok since 5.10LTS is supported until Dec26. If you use this ‘official method’ you’ll have to stay with those kernels.

At an upgrade to nvidia-340-dkms replace the pkgbuild with this one nvidia-340xx-dkms/PKGBUILD at master · philmmanjaro/nvidia-340xx-dkms · GitHub and edit line 9 replacing pkgrel=1 with the version you want to upgrade to (at the moment 32, I believe, so change to pkgrel=32) and save.

I know there is a newer set of instructions on this forum where ppl had success for all kernels but I’ve never tried that, just search ‘340.108 5.15LTS’.

1 Like

I always use this guide when creating a driver for a specific kernel

https://www.if-not-true-then-false.com/2020/inttf-nvidia-patcher/

1 Like

Hello,

In package build you have patch 6.0 and 6.2 so if you switch to kernel 6.0 or 6.2 and try it might work.

1 Like

Could be but needs to edit line 9:

pkgrel=1

to the current version.

1 Like

6.0+ patch means support kernels up to 6.2

and why aur pkgbuild not work on manjaro?

Because, the way Manjaro installs the kernel and modules. Its dir path differences I think.
I am at work now, so I don’t have the file with me, but you can find fix for the install on the forum.
Its not that difficult. Anyhow pls try same patch same kernel.

1 Like

Thanks, installed and worked at kernel 6.1
Here fixed PKGBUILD for up to 6.2 kernels
I am new user and cant post links yet

  1. from here take only patches
    h**ps://aur.archlinux.org/cgit/aur.git/snapshot/nvidia-340xx.tar.gz
  2. Make PKGBUILD and copy to it code below
  3. Put all patches and PKGBUILD in one folder and do makepkg -si
  4. blacklist nouveau /etc/modprobe.d/blacklist.conf
blacklist nouveau
options nouveau modeset=0
  1. copy xorg conf to
    /etc/X11/xorg.conf.d/20-nvidia.conf
  2. reboot
# Maintainer: Jerry Xiao <aur@mail.jerryxiao.cc>
# Maintainer: graysky <graysky AT archlinux DOT us>
# Contributor: Giancarlo Razzolini <grazzolini@archlinux.org>
# Contributor: Eric Bélanger <eric@archlinux.org>

pkgbase=nvidia-340xx
pkgname=(nvidia-340xx-dkms)
pkgver=340.108
pkgrel=32
pkgdesc="NVIDIA drivers for linux, 340xx legacy branch"
arch=('x86_64')
url="https://www.nvidia.com/"
makedepends=("nvidia-340xx-utils=${pkgver}" 'linux>=5.4' 'linux-headers>=5.4')
conflicts=('nvidia')
license=('custom')
options=(!strip)
source=("https://us.download.nvidia.com/XFree86/Linux-x86_64/${pkgver}/NVIDIA-Linux-x86_64-${pkgver}-no-compat32.run"
  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
  0010-kernel-5.18.patch
  0011-kernel-6.0.patch
  0012-kernel-6.2.patch
)
b2sums=('6538bbec53b10f8d20977f9b462052625742e9709ef06e24cf2e55de5d0c55f1620a4bb21396cfd89ebc54c32f921ea17e3e47eaa95abcbc24ecbd144fb89028'
        '7150233df867a55f57aa5e798b9c7618329d98459fecc35c4acfad2e9772236cb229703c4fa072381c509279d0588173d65f46297231f4d3bfc65a1ef52e65b1'
        'b436095b89d6e294995651a3680ff18b5af5e91582c3f1ec9b7b63be9282497f54f9bf9be3997a5af30eec9b8548f25ec5235d969ac00a667a9cddece63d8896'
        '947cb1f149b2db9c3c4f973f285d389790f73fc8c8a6865fc5b78d6a782f49513aa565de5c82a81c07515f1164e0e222d26c8212a14cf016e387bcc523e3fcb1'
        '665bf0e1fa22119592e7c75ff40f265e919955f228a3e3e3ebd76e9dffa5226bece5eb032922eb2c009572b31b28e80cd89656f5d0a4ad592277edd98967e68f'
        '344cd3a9888a9a61941906c198d3a480ce230119c96c72c72a74b711d23face2a7b1e53b9b4639465809b84762cdc53f38210e740318866705241bc4216e4f35'
        '31a4047ab84d13e32fd7fdbf9f69c696d3fab6666c541d2acf0a189c1d17c876970985167fd389a4adc0f786021172bdec1aa6d690736e3cf9fcd8ceabe5fd32'
        'b3b7bbd597252b25ccb68f431f83707a10d464996f6c74bb67143795df96054da719faf09c1ad2e1c215261356833ad3fa0d9e60552151f827f9d7be7ae44605'
        'caedc5651bfd14c02fb677f9c5e87adef298d871c6281b78ce184108310e4243ded82210873014be7fedee0dd6251305fa9bbce0c872b76438e0895ef76109d9'
        '0266e1baaac9ffbb94d9e916a693b1663d8686b15e970bfc30f7c51f051a0af9267aa5f6a12b68586c69d2e9796a1124488b3997ba4b26db1a5ac10a892f0df2'
        'd69c9acbe550d5fccca68ca6a0d5095cbcaf887d2bc43704a8eb85533896692f16701eef07ead297881f596f5502c3105bb5bea77b2dcaf6c4dc2b49941f9f19'
        '682a7b8e58d2a008531b7e5179e32c0c71adad673891a1057acd1aa26e410d9d93ff607e46257c6701619621cee1a27e613ec9ae19a580acdd6f68f1c1fdedea'
        '47681d1e4b16f0b50775120b0a02bc6d279de692cde6086b895eef80bb4598e914ffe1fae81707a771d00f23df60ee4df591dfe042f5b764856d2e07306f3821')
_pkg="NVIDIA-Linux-x86_64-${pkgver}-no-compat32"

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

  cd "${_pkg}"
  patch -Np1 -i ../0001-kernel-5.7.patch
  patch -Np1 -i ../0002-kernel-5.8.patch
  patch -Np1 -i ../0003-kernel-5.9.patch
  patch -Np1 -i ../0004-kernel-5.10.patch
  patch -Np1 -i ../0005-kernel-5.11.patch
  patch -Np1 -i ../0006-kernel-5.14.patch
  patch -Np1 -i ../0007-kernel-5.15.patch
  patch -Np1 -i ../0008-kernel-5.16.patch
  patch -Np1 -i ../0009-kernel-5.17.patch
  patch -Np1 -i ../0010-kernel-5.18.patch
  patch -Np1 -i ../0011-kernel-6.0.patch
  patch -Np1 -i ../0012-kernel-6.2.patch
  
  cp -a kernel kernel-dkms
}

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

    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"
}

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

20-nvidia.conf

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

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

Section "ServerFlags"
  Option "IgnoreABI" "1"
EndSection
3 Likes

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.