Alternatively one can remove the proprietary driver (sudo apt-get autoremove --purge nvidia-340) and use the built-in driver of the kernel instead (nouveau). My experience is that the 3D and even the 2D acceleration suffer a lot after switching from the proprietary driver to the open source driver. This would be fine with a more powerful GPU but since my GPU is very old and slow I decided to retire it and to replace it with a newer model which comes with recent drivers.
The latest Ubuntu kernel 5.15.0-46 works great with the custom nvidia-340 driver package developed by kelebek333. So in order to get the old drivers running, the following worked for me. Run as root:
I have nvidia FX4700 X2 (dual gpu) with 4 dvi ports that I connect to one monitor with 4 dvi inputs, i.e., one monitor can be divided into two Xscreens with 2 displays per Xscreen. I enabled Xinerama. I have tested many distributions including ubuntu 20.04.1. For the later nvidia-340 works for two displays, unable to make it work for 4 displays. Kaosx 9/2020 works perfectly with 4 displays. Oracle Linux 8.2 works too with 4 displays using nvidia-340xx driver packaged by rpmfusion.org, but not completely working as I don't get video acceleration, still testing this (also no hardware acceleration in vlc and smplayer). Elementary 5.1.7 works with 2 displays and partially on 4 displays (for 4, vlc crashes). Thus far only Kaosx works completely for me and needless to say Windows 10.
I ended up booting with an older kernel (5.4.x.x) and installing the 340.108 driver (downloaded it from nvidia's website). During the installation, the install script will blacklist the open-source nouveau driver. In my case, the nvidiafb driver was also previously blacklisted (found in /etc/modprobe.d/blacklist-framebuffer.conf). Commenting out the line with nvidiafb did the trick for me.
I am using an old ThinkPad T410 with a really old NVS 3100M graphics card, so I guess unless I upgrade, I'm gonna have to stick with the older kernel.
First you should know that NVIDIA supports different graphic driver packages for different GPUs.
NVIDA ended the support of their Linux legacy drivers earlier this year; specifically with the NVIDIA display driver 340 the last supported Linux kernel is 5.4; newer kernels are not supported.
Kubuntu 20.10 ships with Linux 5.8, which is not supported by the latest NVIDIA display driver 340.108. On the other hand Kubuntu 20.04 has long term support until April 2023 and will continue to work with the NVIDIA display driver (provided you don't make use of the newer kernel which comes as part of the LTS Enablement Stacks).
Some third parties are trying to patch the NVIDIA display driver 340 to make it work with newer versions of Linux according to this Launchpad ticket. But keeping up with the new Linux version is not trivial (other distributions already decided against it) and the maintenance of a proprietary driver in a GPL context raises some legal issues.
Alternatively one can remove the proprietary driver (
sudo apt-get autoremove --purge nvidia-340
) and use the built-in driver of the kernel instead (nouveau). My experience is that the 3D and even the 2D acceleration suffer a lot after switching from the proprietary driver to the open source driver. This would be fine with a more powerful GPU but since my GPU is very old and slow I decided to retire it and to replace it with a newer model which comes with recent drivers.I am using Ubuntu 20.04 with a NVIDIA GT216. It looks like the nvidia-340 driver is only working with kernel 5.4., so check your devices:
Install the missing kernel:
Check wich kernels are installed:
Remove the actual kernel:
Reboot ;-):
and install the nvidia-driver:
Update August 2022:
The latest Ubuntu kernel 5.15.0-46 works great with the custom nvidia-340 driver package developed by kelebek333. So in order to get the old drivers running, the following worked for me. Run as root:
Most useful discussion on this matter see here: https://bugs.launchpad.net/ubuntu/+source/nvidia-graphics-drivers-340/+bug/1910709
I have nvidia FX4700 X2 (dual gpu) with 4 dvi ports that I connect to one monitor with 4 dvi inputs, i.e., one monitor can be divided into two Xscreens with 2 displays per Xscreen. I enabled Xinerama. I have tested many distributions including ubuntu 20.04.1. For the later nvidia-340 works for two displays, unable to make it work for 4 displays. Kaosx 9/2020 works perfectly with 4 displays. Oracle Linux 8.2 works too with 4 displays using nvidia-340xx driver packaged by rpmfusion.org, but not completely working as I don't get video acceleration, still testing this (also no hardware acceleration in vlc and smplayer). Elementary 5.1.7 works with 2 displays and partially on 4 displays (for 4, vlc crashes). Thus far only Kaosx works completely for me and needless to say Windows 10.
I ended up booting with an older kernel (5.4.x.x) and installing the 340.108 driver (downloaded it from nvidia's website). During the installation, the install script will blacklist the open-source
nouveau
driver. In my case, thenvidiafb
driver was also previously blacklisted (found in/etc/modprobe.d/blacklist-framebuffer.conf
). Commenting out the line withnvidiafb
did the trick for me.I am using an old ThinkPad T410 with a really old NVS 3100M graphics card, so I guess unless I upgrade, I'm gonna have to stick with the older kernel.