Of the two alternatives that were given in the forum, the AUR one in my case does not work (it gives an error in line 32 of the PKGBUILD file when you want to install the DKMS kernel version and ends up canceling everything), instead using the terminal everything is installed correctly (but in pamac the AUR support must be disabled, because if it is enabled you will want to update the DKMS kernel and throw the error on line 32 of the PKGBUILD file).
For my part (I have kernel 5.4 and 5.10) using the terminal I did what they recommended here:
sudo pacman -S git base-devel
(accept everything you wanted to download)
sudo pacman -S $ (mhwd-kernel -li | grep ‘*’ | cut -d ‘’ -f5 | awk ‘{print $ 0, “- headers”}’ | sed s ‘/ //’ g)
git clone https://gitlab.manjaro.org/packages/extra/nvidia-340xx-utils.git
** git clone https://gitlab.manjaro.org/packages/multilib/lib32-nvidia-340xx-utils.git**
** git clone https://github.com/philmmanjaro/nvidia-340xx-dkms.git**
** cd nvidia-340xx-utils && makepkg -si**
** cd …/lib32-nvidia-340xx-utils && makepkg -si**
** cd …/nvidia-340xx-dkms && makepkg -si**
For now both kernel 5.4 and 5.10 work perfectly and the system has not crashed at any time, it remains to be seen what happens when there is a kernel update