[HowTo] get legacy 340xx NVIDIA drivers back


That one also has additional info/tips for older kernels 4.14 and 4.19 .

1 Like

Is it possible to have these packages already compiled and downloadable vie palace, or somewhere else. To be honest I don’t get the point of having each user with 340xx drivers doing the same work, if it need to be done only once and presented by all.
Maybe I am missing out something, but I am a New Linux user and non-techie and would have to teach myselv how to compile in the first place.

2 Likes

You can also switch to Nouveau drivers.

I did. Even simple games are freezing. At least Firefox is reliable.

1 Like

@ratatosk in fact you just install it and forget… it is a dkms. The nvidia drivers are already precompiled (it is proprietary ), it is just some minor patching and recompiling (some adjustment) every time you update the kernel and that will be done automatically…

@codesardine

Could you also add the configurations which mhwd made? Because without it, all systems will not boot and if the user removed the driver with mhwd, then the file mhwd-gpu.conf is empty anyway.

This creates a default xorg.conf file:

sudo nvidia-xconfig

That adds nouveau to the blacklist:

sudo echo -e "blacklist nouveau\nblacklist ttm\nblacklist drm_kms_helper\nblacklist drm" > /etc/modprobe.d/nvidia.conf

This loads the nvidia driver on boot:

sudo echo -e "nvidia\nnvidia-drm" > /etc/modules-load.d/nvida.conf
2 Likes

@philm is the right person to tell you those.

Please, how do I uninstall these drivers to go back to nouveau?

Same as always - remove the package.

Just removing the package will not break kernel (headers)?

Removing the package will remove the driver. You need another driver installed for graphics to work if the nvidia card is your only graphics adapter or else you’ll probably fall back to text mode (where you could reinstall the removed package from cache).

1 Like

A post was split to a new topic: Problems with installing nvidia 340xx

I think this should be updated to add the ignoreABI trick in a config file to bypass the xorg incompatibility.

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

@codesardine

Also the AUR package nvidia-340xx-dkms has many patches for many kernels.

Just a suggestion to make this guide working for current state of packages (especially because of xorg update breaking compatibility).

@codesardine your post is not wiki editable so please have a look at this KDE plasma freezes all the time - #9 by omano and please add the needed missing parts:

  • the config file for the xorg ABI issue

But you will also need to manually add a configuration file to bypass incompatibility with the current xorg in Manjaro, following these instruction, before rebooting:

Create the file /etc/X11/xorg.conf.d/30-nvidia-ignoreabi.conf from terminal

sudo nano /etc/X11/xorg.conf.d/30-nvidia-ignoreabi.conf

Copy and paste the following to this file

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

Save the file and exit nano text editor by pressing CTRL+X then Y (you can follow at the bottom what it does). It should bring you back to the terminal.

  • the ignorepackage addition because of the AUR trying to install/update/replace the installed packages and failing (adding all Nvidia packages to ignore list), resulting in being unable to install/update any package from Pamac when AUR is enabled.

  • the blacklisting of nouveau in modprobe even if not required this may be good to do it

1 Like

I have made it wiki editable.

1 Like

Thanks. I assume I’ll have to add it then, that’s OK.

A post was split to a new topic: Nvidia dkms module fail after recent update

After some fiddling, I’ve managed to use the standard AUR for Arch Linux for legacy NVidia 340xx drivers, which is still maintained, with this commands:

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 https://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/.

For reference, I have a Macbook Pro mid-2009 with Manjaro Linux XFCE with kernel 5.15 LTS

1 Like

That is right: Even if Manjaro officially dropped it, you will still make use of your hardware investment!

I have it working on [Kernel-6.1.1-1-Manjaro], thanks to the tip from jlourenco27, for the steps I did after following the excellent instructions above – thank you codesardine!

  1. Install kernel-6.1 (or 6.0 for that matter), and follow every step that codesardine has outlined above, with one exception. Get the source [nvidia-340xx.git] from AUR instead of Manjaro. Since the above instruction entailed cloning as shown below, there will be a conflict in the directory location. You can clone to a new director in your local drive and then copy the file over to the originally cloned Manjaro file or simply delete the Manjaro nvidia-340xx-utils directory as I have shown with the rm command (trying type out basics for someone who is new to all of this)
git clone https://gitlab.manjaro.org/packages/extra/nvidia-340xx-utils.git

However you can simply delete the directory named [nvidia-340xx-utils].

rm -Rf nvidia-340xx-utils

and do this instead:

git clone https://aur.archlinux.org/nvidia-340xx-utils.git
sudo nano /etc/default/grub

In [/etc/default/grub] file you opened above, locate the line GRUB_CMDLINE_LINUX_DEFAULT= and insert ibt=off. If you have other items on this line make sure you insert ibt=off before end quote mark"

sudo update-grub
sudo grub-mkconfig

Moderator edit: Fixed formatting.

It’s the bactick `. See [HowTo] Post command output and file content as formatted text