Snap: tegra-kernel — https://snapcraft.io/tegra-kernel
snap-id: Rjyoy6Zhe9mlkBQqmVzaUdPB2TblFSwV
Publisher: Canonical (verified)
Interface: hardware-observe, plug side, auto-connection
Type: kernel snap, strict confinement
Hi reviewers,
I would like to request auto-connection of hardware-observe for the tegra-kernel snap.
tegra-kernel is the Ubuntu Core kernel snap for NVIDIA Jetson (Tegra) boards. It ships the GPU driver stack as four optional components: a kernel-modules + userspace pair for each of the two mutually exclusive Tegra GPU driver variants:
nvgpu(Orin, SoCnvidia,tegra234)openrm(Thor, SoCnvidia,tegra264).
The two -ko components both provide a module named nvidia.ko, so only the variant matching the board may be installed; installing both yields a duplicated module and an ambiguous depmod. To ship a single image for both boards, the snap’s own install and post-refresh hooks (gpu-autoselect) identify the SoC by reading /proc/device-tree/compatible and then snapctl install +<component> only the matching pair. hardware-observe is what grants that read.
The hooks run as part of the kernel snap’s install and refresh, on a headless Ubuntu Core appliance. There is no point at which a user could run snap connect before the hook needs the access. A later manual snap connect only helps a subsequent hook run, so without auto-connection the device boots with no GPU driver until someone intervenes by hand on every unit.