How to prevent Nvidia 535 driver from updating

When I updated to Ubuntu MATE 24.04.3 last November, I had one major issue: When waking up the PC from suspend, I had only a black screen and all I could do was briefly press the power button so that it shuts down after a minute. After a complete reboot, all would be fine, but suspend had become unusable.

I resolved that issue by switching to the proprietary driver v570 and I tried to freeze that version by

sudo apt-mark hold nvidia-driver-570

All went well until I updated Ubuntu recently. As far as I remember, there was some update not to the driver itself, but to some related configuration file. And after that, the issue was back. :slightly_frowning_face:

“Well, Nouveau will have fixed their driver in the meantime”, I thought. So I reverted to the Nouveau driver. But no, they have not. The issue was still there. :slightly_frowning_face:

So I tried the Nvidia driver v535, because it was the only one listed as “proprietary, tested” and because going back to 570 would bring me all the great updates back.
And voila - issue resolved. :smiley:

My question now: How do I freeze this driver v535 and all of its components so that something like this never happens again?

Seemingly, the one command that I used for v570 was not enough.

Update: Searching for "-535" in Synaptic, I found these 23 installed items and locked them all:

libnvidia-cfg1-535 libnvidia-common-535 libnvidia-compute-535 libnvidia-compute-535:i386 libnvidia-decode-535 libnvidia-decode-535:1386 libnvidia-encode-535 libnvidia-encode-535:1386 libnvidia-extra-535 libnvidia-Fbc1-535 libnvidia-Fbc1-535:i386 libnvidia-gl-535 libnvidia-gl-535:1386 linux-modules-nvidia-535-6.8.0-94-generic linux-modules-nvidia-535-generic linux-objects-nvidia-535-6.8.0-94-generic nvidia-compute-utils-535 nvidia-driver-535 nvidia-firmware-535-535.288.01 nvidia-kernel-common-535 nvidia-kernel-source-535 nvidia-utils-535 xserver-xorg-video-nvidia-535

Is that safe or will it lead to problems in future updates?

If you do a search, you will find a bunch of posts for either freeze, lock or reverse nvidia driver version install, which would give you a lot of insights and references to some nvidia specific sites/forums.

The issue of freezing version, especially for NVIDIA, is not a new one, especially withing the UM Community. :slight_smile:

2 Likes

Dear ericmarceau,
i did some reading already and what I tried first was a solution posted in another thread, wherein I corrected a typo, see here: Hold your NVIDIA drivers if they are stable - #19 by Oldie

Unfortunately, this does not cut it and neither does my extensive locking in Synaptic. These days, I do an Acronis backup before I update Ubuntu MATE 24.03 and today that proved wise. In spite of all locked packages, apt still offers the following upgrade:

> gs@Blacky-u16:~$ sudo apt upgrade
> Reading package lists... Done
> Building dependency tree... Done
> Reading state information... Done
> Calculating upgrade... Done
> The following NEW packages will be installed:
>   linux-headers-6.8.0-100 linux-headers-6.8.0-100-generic
>   linux-image-6.8.0-100-generic linux-modules-6.8.0-100-generic
>   linux-modules-extra-6.8.0-100-generic
>   linux-modules-**nvidia-535**-6.8.0-100-generic
>   linux-objects-**nvidia-535**-6.8.0-100-generic
>   linux-signatures-nvidia-6.8.0-100-generic linux-tools-6.8.0-100
>   linux-tools-6.8.0-100-generic
> The following upgrades have been deferred due to phasing:
>   language-pack-de language-pack-de-base language-pack-en-base
>   language-pack-gnome-de-base language-pack-gnome-en
> The following packages have been kept back:
>   language-pack-en language-pack-gnome-de language-pack-gnome-en-base
> The following packages will be upgraded:
>   alsa-ucm-conf gir1.2-glib-2.0 libboost-iostreams1.83.0 libboost-locale1.83.0
>   libboost-thread1.83.0 libglib2.0-0t64 libglib2.0-bin libglib2.0-data
>   libldap-common libldap2 libpython3.12-minimal libpython3.12-stdlib
>   libpython3.12t64 linux-generic linux-headers-generic linux-image-generic
>   linux-libc-dev linux-modules-**nvidia-535**-generic linux-tools-common nordvpn
>   nordvpn-gui python3.12 python3.12-minimal
> 23 upgraded, 10 newly installed, 0 to remove and 8 not upgraded.
> 9 standard LTS security updates
> Need to get 320 MB of archives.
> After this operation, 443 MB of additional disk space will be used.
> N: Some packages may have been kept back due to phasing.
> Do you want to continue? [Y/n

And when I do that upgrade, the "Suspend-Bug" is back, plus delays during shutdown and reboot, which previously went very fast. Restore of backup. :expressionless:

Next, I tried something radical:

sudo apt-mark hold *535*

(Found here: https://forums.linuxmint.com/viewtopic.php?t=421442 )

Same result - restore. :expressionless:

I guess all the holding of packages does not protect against NEW packages.

For the time being, I just do not upgrade anything and wait for a while.

I am getting tired of this. I am with Ubuntu MATE since v14.04 and since November, this v24.03 has given me more issues than all the previous versions together. Previous versions just worked with this Nvidia card for years. They generally just worked instead of costing my time working on things like this. Its reliability and stability was why I chose Ubuntu MATE and that's why I stayed with it for so long...

1 Like

I may be wrong, but I think the use of '*' in that command may not give you the result you want.

I would personally use the list previously generated, then run the command on each item individually. That way you know it will get done.

Just a thought.

2 Likes

I had no plans to leave the OS like that. It marks as "hold" anything with a "535" in it. The resulting list was so long that it did not fit in the terminal window. :slight_smile: I just wanted to see whether this produces an update that does not worsen anything - it did not.

After that I restored the backup. It was one of these experiments which you make either in a VM, or before a restore. :wink:

But if even this does not stop unwanted updates, then I don't think a carefully chosen list of "held" packages will. To me it looks like the OS "sees" a closed-source Nvidia driver and then "wants" to install certain Kernel-Components. The system is fine right now, but it's messed up afer that.

1 Like

You can use apt-mark showhold to see what is held.

In my post I noticed issues with new packages in spite of holding 550 - including very similar packages to what you are seeing.

You'll need to go deeper and "pin" linux-objects-nvidia-like packages; e.g. create a file /var/lib/apt/preferences.d/99-block-objects-nvidia:

Package: linux-objects-nvidia-*
Pin: release *
Pin-Priority: -1

You might also need to do the same for modules (although I believe pinning objects will be enough).

4 Likes

Thank you, @stephematician!

I did what you suggested, but it still gives me this list of available updates:

gs@Blacky-u16:~$ sudo apt upgrade
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
The following NEW packages will be installed:
  linux-headers-6.8.0-100 linux-headers-6.8.0-100-generic
  linux-image-6.8.0-100-generic linux-modules-6.8.0-100-generic
  linux-modules-extra-6.8.0-100-generic
  linux-modules-**nvidia**-535-6.8.0-100-generic
  linux-objects-**nvidia**-535-6.8.0-100-generic
  linux-signatures-**nvidia**-6.8.0-100-generic linux-tools-6.8.0-100
  linux-tools-6.8.0-100-generic
The following packages will be upgraded:
  alsa-ucm-conf gir1.2-glib-2.0 language-pack-de language-pack-de-base
  language-pack-en language-pack-en-base language-pack-gnome-de
  language-pack-gnome-de-base language-pack-gnome-en
  language-pack-gnome-en-base libboost-iostreams1.83.0 libboost-locale1.83.0
  libboost-thread1.83.0 libglib2.0-0t64 libglib2.0-bin libglib2.0-data
  libldap-common libldap2 libpython3.12-minimal libpython3.12-stdlib
  libpython3.12t64 linux-generic linux-headers-generic linux-image-generic
  linux-libc-dev linux-modules-**nvidia-535**-generic linux-tools-common nordvpn
  nordvpn-gui python3.12 python3.12-minimal
31 upgraded, 10 newly installed, 0 to remove and 0 not upgraded.
9 standard LTS security updates
Need to get 326 MB of archives.
After this operation, 441 MB of additional disk space will be used.
Do you want to continue? [Y/n] 

I am afraid that I would have to freeze the kernel too (and exclude myself from any security-updates to it) to really stop this...

New kernel versions might depend on the corresponding driver version to work properly. And something in them or the driver is toxic to what is now a well-running system.

1 Like

Besides, the Ubuntu updater does not show me items with "535" or "nvidia", just a "Complete generic linux kernel". But I guess it is just a graphical frontend for apt (like Synaptic) and it will install exactly the list of updates which I posted above - correct?

1 Like

You wont be able to upgrade past a certain version of the kernel anyway. As I am stuck with the NVIDIA 550 driver I cant go past kernel 6.14.

Pinning should be able to accomplish what you need. Look up the command and see if you can figure out what I have missed.

3 Likes

Good news!
This morning, I applied all updates that clearly have nothing to do with Nvidia using Synaptic. (The Ubuntu-updater kind of froze when I wanted to select only specific packages.) After an incremental backup, I updated the kernel, which seemingly means all or nothing of the following:

gs@Blacky-u16:~$ sudo apt upgrade
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
The following NEW packages will be installed:
  linux-headers-6.8.0-100 linux-headers-6.8.0-100-generic
  linux-image-6.8.0-100-generic linux-modules-6.8.0-100-generic
  linux-modules-extra-6.8.0-100-generic
  linux-modules-**nvidia-535**-6.8.0-100-generic
  linux-objects-**nvidia-535**-6.8.0-100-generic
  linux-signatures-**nvidia**-6.8.0-100-generic linux-tools-6.8.0-100
  linux-tools-6.8.0-100-generic
The following upgrades have been deferred due to phasing:
  initramfs-tools initramfs-tools-bin initramfs-tools-core
The following packages will be upgraded:
  linux-generic linux-headers-generic linux-image-generic linux-libc-dev
  linux-modules-**nvidia-535**-generic linux-tools-common
6 upgraded, 10 newly installed, 0 to remove and 3 not upgraded.
6 standard LTS security updates
Need to get 252 MB of archives.
After this operation, 442 MB of additional disk space will be used.
Do you want to continue? [Y/n]   

And voila - it works without any issues. Maybe something was fixed in the meantime?

I was getting ready to file a bug report where I had narrowed it down to as few packages as possible, but that's not necessary by now.

I will keep the holds and the "pin" described above and I hope that will last for a while.

4 Likes