Help me install the Nvidia 340 driver

The recent update broke my Nvidia driver and I’m trying to fix it. I have a GT218M that requires the 340xx driver. I am using the 4.19 kernel.

Mhwd is unable to find the proper driver so I’m trying to install nvidia-340xx from the AUR. But it seems to depend on a newer kernel, and then it fails to build because it can’t find /usr/src/kernel.

I think that downloading the kernel source could fix it but I don’t know how to do that. The Arch asp tool doesn’t seem to exist in Manjaro.

We dropped 340xx driver of Nvidia, as it is not supported by Nvidia anymore.

However you can get the sources from us and compile the needed drivers on your end:

sudo pacman -S git wget base-devel
git clone
cd nvidia-340xx-utils && makepkg -si && cd ..
git clone
cd lib32-nvidia-340xx-utils && makepkg -si && cd ..
git clone
cd nvidia-340xx

You may want to higher the PKGREL in the PKGBUILD as needed

makepkg -fsi

… then you should have the working driver again. If you have issues, post about them. nvidia-340xx needs to been rebuilt with every kernel update.

PS @philm … using the quote tags on your lines there creates odd formatting.
I edited it so that (besides your typo :wink:) it would not expand .. to ... for bad instructions. :beers:

Thanks for the advice. I successfully built those packages from git.

However there is still no graphical environment after restarting. I get a message that SDDM failed to load. Xorg.0.log indicates that the Nvidia module failed to initialize. I do not know how to troubleshoot from here.

what is the output of uname -a? did you install 2 utils packages and the nvidia driver for your 4.19 kernel? what does sudo modprobe nvidia say?

Wouldn’t nvidia-340xx-utils and nvidia-340xx-dkms from AUR be better as the kernel module is automatically rebuilt?

Might also work. @canuck needs to install the needed header files then.

sudo pacman -S linux419-headers
pamac build nvidia-340xx-utils nvidia-340xx-dkms

Uname -a
Linux canuck 4.19.163-1-MANJARO #1 SMP Fri Dec 11 17:00:14 UTC 2020 x86_64 GNU/Linux

Sudo modprobe nvidia
modprobe: ERROR: could not insert ‘nvidia’: No such device

I can confirm that I installed all three packages for the 4.19 kernel as you described. I also checked /etc/mkinitcpio.conf for any mention of nouveau, and there was not.

I cannot build from the AUR because /usr/src/linux is missing. The kernel headers are installed.

I also have the same issue. After trying for a few hours to get it to work, I ended up downgrading my 5.4 and 4.19 kernel/header by using the downgrade command to the previous version, to at least have a somewhat working system.

It looks like the aur nvidia-340xx-lts-dkms (can’t post a link) might be the better option for older lts since it probably won’t have patches to make later kernels work. But it also gets a /usr/src/linux-lts is missing error. I assume that linux-lts is supposed to be a symlink to the latest header files?

The last one, nvidia-340xx did not compile. I am in real trouble with my macbook that was broken by the update that did not include the legacy drivers any more.
==> Making package: linux54-nvidia-340xx 340.108-80 (pe 1. tammikuuta 2021 14.07.32)
==> Checking runtime dependencies…
==> Checking buildtime dependencies…
==> Retrieving sources…
-> Found
-> Found 340.108-build-fix.patch
==> Validating source files with sha256sums… … FAILED
340.108-build-fix.patch … Passed
==> ERROR: One or more files did not pass the validity check!

It is lot of extra time to maintain those outdated drivers. Why not try with the Nouveau drivers?

Based on the PKGBUILD the file of 340.108 drivers should have a sha256sums of 995d44fef587ff5284497a47a95d71adbee0c13020d615e940ac928f180f5b77

You can also get the DKMS driver file from here: Release 340.108-1 · philmmanjaro/nvidia-340xx-dkms · GitHub You also need to install the proper linux-headers like linux54-headers or linux419-headers, depending which kernel you are using.

Thanks for packaging up the dkms driver. I tried using the nouveau driver, but I couldn’t get video hardware acceleration, and couldn’t play any HD videos using mpv correctly. Not only that it crashed after about 20 minutes.

As to the DKMS driver. It looks like it’s working for 5.4, I just installed the latest 5.4 kernel updates with it and it works. It seems to have issues with 4.19. The make.log shows an error.

make[1]: *** [Makefile:1553: module/var/lib/dkms/nvidia/340.108/build] Error 2
make[1]: Leaving directory ‘/usr/lib/modules/4.19.164-1-MANJARO/build’
nvidia.ko failed to build!
make: *** [Makefile:202: nvidia.ko] Error 1
make: Entering directory ‘/var/lib/dkms/nvidia/340.108/build/uvm’
cd ./…; make module SYSSRC=/lib/modules/4.19.164-1-MANJARO/build SYSOUT=/lib/modules/4.19.164-1-MANJARO/build KBUILD_EXTMOD=./…
make[1]: Entering directory ‘/var/lib/dkms/nvidia/340.108/build’
make[2]: Entering directory ‘/usr/lib/modules/4.19.164-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 ;
mkdir -p ./…/.tmp_versions ; rm -f ./…/.tmp_versions/*
make -f ./scripts/ obj=./…
scripts/ …/Makefile: No such file or directory
make[3]: *** No rule to make target ‘…/Makefile’. Stop.
make[2]: *** [Makefile:1553: module./…] Error 2
make[2]: Leaving directory ‘/usr/lib/modules/4.19.164-1-MANJARO/build’
nvidia.ko failed to build!
make[1]: *** [Makefile:202: 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’

Thanks again for the driver through, since I normally use kernel 5.4 anyways.

You may compile it for 4.19 kernel manually. For dkms you also need linux419-headers.

git clone
cd nvidia-340xx && makepkg -sif

I will give nouveau a try.

Did my last post have all the info you need?

Update: the nouveau driver is basically unusable for gaming. It is essential that I get the Nvidia driver working.

It looks like it has no problems creating a zst package if I compile it manually, although I didn’t install it, because it conflicts with the dkms package. I do have linux419-headers, so not sure why I’m getting an error with dkms. Hmm. I wonder if others are having the same issue with 4.19 as opposed to 5.4.

I have solved the problem. A close look at dmesg showed that nouveau was somehow preventing the nvidia driver from accessing the GPU. Blacklisting nouveau allowed Nvidia to work properly.

Thanks for the help everyone.

Sorry to jump in here. I honestly tried on my Dell Latitude e6510. I got it to boot to the graphical environment but after a few minutes the screen starts flickering unbearably. Besides the laptop does not go into sleep mode, it just switches to a black screen from which it is not possible to recover. For my daughter that relies on it for school in a remote setup this is a serious problem.

I looked into troubleshooting tips but nothing helped. Based on my experience the nouveau driver is unusable on this laptop.

I timeshifted back to my last working configuration (prior to the stable update deprecating the older nvidia driver) and I am now struggling to install the 390xx driver from source so that I can apply all the other updates. Specifically, before I have the time to make modifications to the graphical driver setup, mhwd gets forcibly updated, removes the 390xx driver and forces the installation of nouveau :rage:. That clearly does not help!

I have been very happy with Manjaro for years but this is the first serious confidence-breaking situation. I hope that I will manage to find a solution for this laptop that I have no intention of retiring just because of nvidia.

The 390xx driver has not been removed from the Manjaro repositories, so I don’t fully understand why you’d want to build it yourself.

I meant 340, not 390. However, this brings up a good point: I will check if my adapter is supported by the 390 driver and try to install it.

Could you please tell me if philm’s command for installing the drivers is one long command line or if it should be broken into parts?
If the second could you please point me the separators.

Thank you very much!