[kernel-snaps-u24.04][pc][RFC PATCH 0/1] add nvidia-550 driver components

Aaron Jauregui aaron.jauregui at canonical.com
Tue Nov 19 23:58:34 UTC 2024


BugLink: https://bugs.launchpad.net/bugs/2088970

[Impact]
Snap components are a way to have optional content for snaps available
for install without resorting to building a completely new snap. It's
useful to think of them as lazy loading for snaps. Concretely, components
are themselves snaps with locked-down functionality that are mounted
within their parent snap's filesystem. Component revisions are tied 1 to
1 with their parent snap revision at upload time, meaning that any refresh
also refreshes the components tied to the snap. This also means that
components MUST be uploaded alongside the parent snap, or the store will
reject the upload.

We use components here with the aim of providing a way for nvidia
drivers to be selected for the pc-kernel without having to rebuild,
targetting the nvidia-550 driver as a starting point with the aim of
supporting more driver versions in the future. Since nouveau, currently
included in the pc-kernel, conflicts with nvidia, we replace the nouveau
.ko with a component compatible with the nvidia component scheme.

The implemented components rely on install, refresh, and remove hooks
for the respective functionality. These are intended to be placed in
canonical-kernel-snaps.

Nvidia components are mostly self-contained, but a few changes to the pc-kernel
snap were required. files/meta/kernel.yaml is required to enable kernel
module support in snapd. The kernel-gpu-2404 content interface is
declared for exposing nvidia userspace libraries, and is not intended to
be accessed directly by users.

[Test case]
Nvidia components can be installed as follows:

 $ snap install pc-kernel+nvidia-550-ko pc-kernel+nvidia-550-user

The components install their files in $SNAP_DATA/modules/$(uname -r)/graphics

[Regression potential] 
The components are not downloaded or installed unless requested, so the
potential for regressions to be introduced by them is small.

Removing nouveau from the pc-kernel snap is a regression in
functionality, but the UC22 pc-kernel does not package it and there is
work in progress to autoinstall the nouveau component when required.

Aaron Jauregui (1):
  snapcraft.yaml: Add nvidia-550 and nouveau component support

 files/meta/kernel.yaml |   1 +
 snapcraft.yaml         | 121 +++++++++++++++++++++++++++++++++++++++++
 2 files changed, 122 insertions(+)
 create mode 100644 files/meta/kernel.yaml

-- 
2.43.0




More information about the kernel-team mailing list