3

I have a laptop running Lubuntu 21.04, but which was previously running 20.04 LTS. The system has an NVIDIA GeForce 9400M graphics processor.

Under 20.04 LTS, the "Software Sources" dialog was able to find the graphics card easily, and show me the option to toggle between either the Nouveau driver or the proprietary NVIDIA driver. I was able to choose the latter option and the driver was working just fine. The same also worked after I upgraded to Lubuntu 20.10: it was using that driver.

However, after I upgraded to Lubuntu 21.04, it switched to the Nouveau driver. The option to toggle to the NVIDIA driver is no longer present in the Software Sources dialog.

I tried using sudo apt-get install nvidia-driver-340, but it couldn't find the package. nvidia-340 showed up as a Nouveau package when I used apt-cache search, so I didn't try that. I also tried sudo add-apt-repository ppa:graphics-drivers/ppa, but the above first command still didn't work.

I also tried downloading the 340 driver from the Nvidia website and manually installing that, but the installation failed. (If necessary, I can post the log file.)

How can I use the proprietary NVIDIA driver for graphics under 21.04? Why did it stop working there?

1
  • The version you need is not available / doesn't work with newer kernels. If you insist in keeping that old card, Ubuntu 20.04 (supported until April 2025) with the generic kernel is your best option (the HWE kernel will result in the exact same problem, sooner than later). That's all, 340 is no longer supported. May 3 '21 at 17:27
3

As ChanganAuto commented, the NVIDIA driver 340 isn't officially supported on the kernel that 21.04 uses, 5.11. (The error log for the installation I mentioned actually doesn't contain anything other than what I was shown when installing.)

However, I was able to find a way to work around the issue and use the driver anyway, by following the instructions at https://launchpad.net/~kelebek333/+archive/ubuntu/nvidia-legacy. Basically, you have to enter the following three commands:

sudo add-apt-repository ppa:kelebek333/nvidia-legacy
sudo apt-get update
sudo apt-get install xorg-modulepath-fix

After executing these three commands and reopening the Software Sources settings, the option to select the NVIDIA driver was showing once again. I selected it, and it's working fine now.

Just a word of warning, though: after doing this, I noticed that the options for Important and Recommended Updates were deselected, so my system wasn't updating anymore. I selected those again and that solved that.

2
  • 1
    This works great. Why would one just throw away their old video card as previously suggested (or my whole laptop, in my case) when you can just fix some paths; isn't this the point of Linux?
    – Patrick F
    Aug 12 '21 at 6:58
  • I ran this on my (~2 year old) Dell Inspiron 7590 and was unable to boot back into Ubuntu. Was able to uninstall xorg-modulepath-fix and remove the ppa from recovery mode and get back into a bootable configuration. Considering downgrading back to LTS at this point.
    – Luke Bayes
    Dec 17 '21 at 4:21
0

I had to fix two more driver installation errors in my system (HP DV9000, xubuntu 21.04 upgraded from 20.10, nvidia-340, GeForce 8400M GS) with:

sudo rm /usr/lib/x86_64-linux-gnu/libGL.so.1.distrib

sudo rm /usr/lib/x86_64-linux-gnu/libEGL.so.1.distrib

and then all going fine.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.