Which NVIDIA driver on newly upgraded Lenovo Laptop

Ubuntu Version:

24.04.1

Desktop Environment (if applicable):

Gnome

Problem Description:

After a lengthy and difficult but ultimately successful attempt to upgrade to 24.04.1 a new laptop that had been shipped with 22.04, a question in regard to graphics cards arose. I chose to move this further discussion from Lenovo Thinkpad P16 Gen2 laptop won't accept 24.04 - #58 by oldfred to this new topic.

Relevant System Information:

Lenovo ThinkPad P16 Gen 2
RTX 3500 Ada Generation Laptop GPU

Screenshots or Error Messages:

What I’ve Tried:


I would get the newest driver from graphic driver ppa

Installed the 565.77, works perfectly with my rtx4070 card and Ubuntu24.0.1

My 2 cents here:
My cards are

 NVIDIA GeForce RTX 3050 Ti Mobile [Discrete]
AMD Radeon Vega Series / Radeon Vega Mobile Series [Integrated]

On 24.04 and above I prefer Driver 550 and 560 mostly the later 560 seems smoother on a wayland session. YMMV
My machine specs are:

Type: Laptop System: LENOVO product: 82JW v: Legion 5 15ACH6

Also keep in mind 565 is a short term driver (Beta)
We are trying to keep things as stable as possible for the OP

This comment is in reply to Lenovo Thinkpad P16 Gen2 laptop won’t accept 24.04 - #58 by oldfred:

Thanks, @oldfred.
Reflecting on how it got to be the way it is now:

  1. Late yesterday, I gave up on the path I was on (trying to make a “vanilla” Ubuntu 24.04.1 work) and reimaged the disk back to its original factory configuration from a USB stick I made when first starting the brand new computer. I transferred a few files over from my old computer, none of which had anything to do with graphics.
  2. This morning with the help of Lenovo Tech Support Rep, did the steps listed above to get 24.04.1 installed: [quote=“stevecoh1, post:57, topic:53972”]
sudo apt update
sudo apt upgrade
sudo apt install update-manager-core <-- didn't do initially
reboot
sudo apt dist-upgrade <-- didn't do initially

This brought me up to 22.04.5 LTS
tried
sudo do-release-upgrade
This failed as before.
Edited /etc/upgrade-manager/release_upgrades changing never to normal. Then
sudo do-release-upgrade again
[/quote]

Which succeeded in completing the upgrade. Hooray!

image

  1. The screenshot above was what I saw immediately after, upon opening the Software & Updates app.

So there was no installation of proprietary drivers other than what the factory config and upgrade procedure provided. I’m a little confused. Did Lenovo manually install a proprietary driver in the factory?

@oldfred is recommending above, that I use the ubuntu driver and remove the proprietary driver. But @popey said on the other thread

He’s recommending the proprietary driver. So I am confused. I am going to leave things as they are until consensus can be achieved.

It’s hard for me to think @popey thinks this is a stable solution?

@oldfred has warned you already that kernel upgrades will break your driver.
Your Laptop Your choice.

I get that, but would like to see the apparent disagreement between @popey and @oldfred resolved before I do anything further.

I think both oldfred and popey recommend the proprietary driver (i.e. no nouveau)

oldfred is saying don’t install it from the .run file downloaded from Nvidia but get it from Ubuntu’s repo. It is the same driver (i.e. not noveau) but properly packaged for Ubuntu so you don’t have problems with updates etc.

2 Likes

Before I purchased the laptop I have read on reddit that the driver <=550 has some issues with the RTX4x card and 560 fixes most issues but not all and they all got fixed in the 565 so it is best for my card. For OP’s card it may be different.

Yep no disagreement there I run it as well, I just don’t want to push the OP’s choice for now. :wink:

Maybe I should clarify a bit.

There are two kinds of “nvidia drivers” on Linux OSes .1) The open source driver that comes preinstalled called noveau.2) The proprietary driver provided by Nvidia (of which there are the open kernel and closed kernel subvarieties which don’t concern us here)

The noveau driver is adequate for getting your system up and running and for basic desktop tasks. When you boot off a live usb on a machine with only a Nvidia card and see the desktop so you can “try Ubuntu”, that is noveau at work. Also, nouveau is the only way to run Linux on computers with very old Nvidia cards that the company no longer supports.

However, to get all functionalities out of your Nvidia graphic card you have to use the proprietary driver. It makes no sense to dish out a lot more money to buy a Nvidia machine and run noveau because you can buy one with an intel card a lot cheaper if you don’t use any of its gpu’s power.

Unlike nouveau that comes bundled you have to install the Nvidia proprietary driver yourself, there are two ways to install the proprietary driver in Ubuntu (during Ubuntu installation from liveusb there is an option to download and install proprietary driver, I recommend against it since it may not fetch the right version)

A) download a .run file from Nvidia and execute it. This is not recommended because you have to do a lot of manual stuffs like blacklisting nouveau and everytime when you upgrade your kernel you will break it so you have to reinstall the driver again (and no gui in the mean time)

B) the recommended way to install is from the Ubuntu repositories either the standard one or the graphic driver ppa if your card requires a driver too new to be in the stock Ubuntu repository. This way everything about upgrading kernel and/or driver is taken care of by apt. It is the same driver as A) but packaged for Ubuntu so users don’t have to do any manual intervention.

So oldfred was not recommending against the proprietary driver but against installing it with method A)

Hope that clears it up for OP.

1 Like

Thanks for the explanation!

Hmmm. The liveUSB install I did was to put back 22.04 (factory config). I think that put the nvidia driver on. I believe there was an option to do that at as I was installing.

Then I did the do-release-upgrade with Lenovo Tech’s help, that finally succeeded in upgrading. Would the nvidia driver have been upgraded as part of that process?

So how can I determine if I have the “right version”? And if I haven’t, will the normal update process take care of it or is there something else I need to do?

Thanks again.

If you reinstall 22.04 it shouldn’t install the Nvidia driver unless you checked the box “download and install proprietary driver…” during installation of 22.04.

You can find out by opening a terminal and type

glxinfo | grep OpenGL

and check the output.

I am not saying it would always install the wrong version of driver if you check the box, just that you have no control over which version it installs.

It is hard to say which is the right version, it depends on your card. Some old cards cannot take drivers that are too new and some new cards only work with the latest driver etc. Without going through the troubles of searching forums to find out potential issues etc my default is for reasonably new cards I always go for the latest driver. In your case probably 560 is the best as 1fallen explained, it is not the latest, but it is a long term support version and likely works just as well for you.

But of course if you already have a version of the proprietary driver installed (say you checked the box when you installed 22.04) and it works well then there is no need to upgrade to a newer version.

I have not used nVidia for years. Found with my new 2017 build that the older nVidia card I used, was much lower spec than the internal Intel video. If not a gamer that needs high end video, the cpu video of current chips is more than adequate.

Do not know if your Lenovo, is unique. But suspect Lenovo did just like Ubuntu does to modify the nVidia driver to work with Linux kernels without having to either re-install or run mkinitramfs to add driver to kernel or re-install nVidia driver.

The nouveau driver is totally open source, but since Linux engineers have to develop driver with limited support from nVidia, it really works for older cards/chips. And it then provides suppport for those systems that nVidia does not have updated drivers. Often drivers are updated, but newer versions may not be better as they are just to support newer features in very newest cards/chips that older hardware does not have.

Almost everyone with nVidia hardware should use nVidia proprietary driver, but from Ubuntu repository. It is regularly updated with newer drivers. But if changing drivers a total purge of older drivers is requires.

This should show what driver is installed into kernel.

dkms status

Thanks, Not a gamer but I have been told that a Graphics card is advised for astrophotography. This is the first graphics card I’ve owned.

OK, so here we are. After reading all the above, it seems that I want the Ubuntu version of the latest proprietary NVIDIA driver.

nvidia-settings tells me I am running version 535.183.01 of the driver.

It sounds like version 560 is the latest stable thing I want to be on.

How do I get it? Please explain in detail as I am somewhat of a noob when it comes to graphics cards and graphics card driver. Don’t just say “use the PPA” or such. Not enough detail for me.

Assuming I do this, whatever “this” is, will further updates be automatically pushed to me on the update cycle?

Suppose I don’t like the new driver, how would I revert?

Let me level-set a bit.

  1. I’m not a gamer. Too old to learn how now and don’t want to.
  2. I’ve never owned a graphics card before.
  3. I bought a graphics card because I want to do astrophotography with it and it was recommended I do so, albeit by folks who will never use Linux but are into astrophotography.

The “recommended” Nvidia driver should be indicated in the output of :
ubuntu-drivers devices
The word “recommended” will follow the driver description.
You can then use ubuntu-drivers to install that driver:
ubuntu-drivers install nvidia-driver-560
or try the (deprecated) autoinstall command:
ubuntu-drivers autoinstall

Alternatively, use the “Software & Updates” (blue icon, not the grey “Software Updater”). Click on the “Additional Drivers” tab, wait for the list to display, and select the 560 or 560 open (the “open” drivers work now that most scripts expecting the driver number to be last in the name have been fixed). Click on apply, and wait for the driver to rebuild (there is a progress bar). Change drivers simply by clicking on the new one.

Driver updates should occur automatically, and be utilized at the next reboot. Kernel updates should rebuild the driver automatically. Only once in 10 years has this failed, when some of the new Nvidia packages were held back for “phasing”. In such a rare case, use the old kernel until all the packages are available.

Let’s address that if or when that happens, and it’s nothing to fret over.

Thanks!

$ ubuntu-drivers devices
udevadm hwdb is deprecated. Use systemd-hwdb instead.
udevadm hwdb is deprecated. Use systemd-hwdb instead.
udevadm hwdb is deprecated. Use systemd-hwdb instead.
udevadm hwdb is deprecated. Use systemd-hwdb instead.
udevadm hwdb is deprecated. Use systemd-hwdb instead.
udevadm hwdb is deprecated. Use systemd-hwdb instead.
udevadm hwdb is deprecated. Use systemd-hwdb instead.
== /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0 ==
modalias : pci:v000010DEd000027BBsv000017AAsd00002306bc03sc00i00
vendor   : NVIDIA Corporation
model    : AD104GLM [RTX 3500 Ada Generation Laptop GPU]
manual_install: True
driver   : nvidia-driver-535-open - distro non-free
driver   : nvidia-driver-550 - distro non-free recommended
driver   : nvidia-driver-535-server - distro non-free
driver   : nvidia-driver-535 - distro non-free
driver   : nvidia-driver-535-server-open - distro non-free
driver   : nvidia-driver-550-open - distro non-free
driver   : xserver-xorg-video-nouveau - distro free builtin

== /sys/devices/virtual/dmi/id ==
modalias : dmi:bvnLENOVO:bvrN3TET57W(1.57):bd10/21/2024:br1.57:efr1.55:svnLENOVO:pn21FACTO1WW:pvrThinkPadP16Gen2:rvnLENOVO:rn21FACTO1WW:rvrNotDefined:cvnLENOVO:ct10:cvrNone:skuLENOVO_MT_21FA_BU_Think_FM_ThinkPadP16Gen2:
vendor   : Lenovo
model    : product_version
driver   : oem-sutton-barrett-meta - third-party free

Ok, so 560 doesn’t even make the list.
Recommended is nvidia-driver-550 - distro non-free
Is that what should be installed? or is it nvidia-driver-550-open

Using the GUI method, we have this.

"

“Continue using a manually installed driver” cannot be unclicked. What’s up with that?

It has no clue how it was installed since it did not come from any known packaging system it recognizes … so it doesn’t know how to remove it (which is what un-ticking the radiobutton would do in the end)

1 Like

Additional to @ogra’s reply above:

apt list --Installed | grep -e nvidia-driver* -e nvidia-dkms*

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

nvidia-dkms-565/noble,now 565.77-0ubuntu0~gpu24.04.1 amd64 [installed]
nvidia-driver-565/noble,now 565.77-0ubuntu0~gpu24.04.1 amd64 [installed]

I hope this is not intened as a bash but see the below

 ubuntu-drivers install nvidia-driver-565
All the available drivers are already installed.
┌───────────────────>
│~ 
└─> ubuntu-drivers list
nvidia-driver-560-open, (kernel modules provided by linux-modules-nvidia-560-open-generic)
nvidia-driver-560, (kernel modules provided by linux-modules-nvidia-560-generic)
nvidia-driver-535-server, (kernel modules provided by linux-modules-nvidia-535-server-generic)
nvidia-driver-535-server-open, (kernel modules provided by linux-modules-nvidia-535-server-open-generic)

I just prefer CLI

1 Like