Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Correct way to pin testing from stable (with backports) for nvida-driver?

Linux Kernel, Network, and Services configuration.
Post Reply
Message
Author
User avatar
thatguychuck
Posts: 52
Joined: 2013-03-25 00:49
Been thanked: 2 times

Correct way to pin testing from stable (with backports) for nvida-driver?

#1 Post by thatguychuck »

The current nvidia-driver in Bullseye (460) fails to build against the bullseye-backports kernel (5.14). I've experienced this before, and think this is pretty much expected behavior when mixing new/old kernels and nvidia-drivers. Anyway I thought I'd give pinning a go as I haven't dabbled in that before. With a timeshift backup in place, I added bookworm to my sources, and placed the following in /etc/apt/preferences.d/bookworm:

Code: Select all

Package: *
Pin: release n=bookworm
Pin-Priority: 99
I initially had a priority of 400, however this caused an issue with some of my back-ported packages as they have a default priority of 100. I was then able to install the nvidia-driver with dependencies form bookworm using

Code: Select all

sudo apt install -t bookworm nvidia-driver
This appeared to do exactly as I wanted, keeping priority for bullseye, bullseye-updates, and bullseye-backports, unless I explicitly specify -t bookworm during install. Looking at the man page for apt_preferences however, has made me wonder how a priority of 99 will handle any updates.

Code: Select all

  
  100 <= P < 500
           causes a version to be installed unless there is a version
           available belonging to some other distribution or the installed
           version is more recent

  0 < P < 100
           causes a version to be installed only if there is no installed
           version of the package
If I'm reading things right with this setup, apt will still upgrade nvidia-driver if a newer version becomes available in either bullseye-backports or bookworm? Or does the priority of 99 mean once its installed it will not update that version again, even if it's newer, without calling it specifically from apt install? Guides on the web seem to vary from pinning distributions to pinning specific packages (which I would like to avoid.)

Post Reply