NAME

Rex::GPU::NVIDIA::Setup::SUSE - NVIDIA driver setup for openSUSE Leap (experimental)

VERSION

version 0.002

DESCRIPTION

Experimental, like Rex::GPU::NVIDIA::Setup. The NVIDIA driver install for openSUSE Leap 15 and 16: the signed kmp meta package from NVIDIA's GFX repository, on the rpm layer Rex::GPU::NVIDIA::Setup::Rpm with zypper. openSUSE is not a verified deploy target of Rex::GPU.

There is no separate zypper packaging layer: besides the install command name ("package_manager") everything zypper-specific here -- the GFX repository, the stale-package purge, the library lock -- belongs to this one driver install.

package_manager

zypper.

zypper_lock_timeout

Seconds every zypper of this class waits for the zypp lock (ZYPP_LOCK_TIMEOUT). Default 120, like the apt layer's "apt_lock_timeout" in Rex::GPU::NVIDIA::Setup::Apt: on a fresh boot cloud-init can still hold it, and zypper otherwise fails at once with exit 7. A method, not an attribute, so it also answers on the class ("add_repo" is called on it); override it in a subclass.

zypper

$self->zypper            # "ZYPP_LOCK_TIMEOUT=120 zypper"

The zypper invocation every command of this class starts with, and its "package_manager_command" in Rex::GPU::NVIDIA::Setup::Rpm. A lock still held after "zypper_lock_timeout" fails the command with exit 7 as before.

sources

One kmp meta package from NVIDIA's GFX repository for the Leap release (key repo_url, see "leap_version"), in this order:

  • Leap 16: nvidia-gfx-G07-open -- nvidia-open-driver-G07-signed-kmp-meta, open kernel module, the newest G07 branch (at least 595). Leap 15: nvidia-gfx-G06-open -- nvidia-open-driver-G06-signed-kmp-meta, open, branch 580.

  • nvidia-gfx-G06 -- the proprietary nvidia-driver-G06-kmp-meta, branch 580 (G07 has no proprietary module), on Leap 15 and 16.

None names a Fabric Manager: NVIDIA's GFX repository has none (it is only in the CUDA repository), so a host with NVSwitches ("nvswitches" in Rex::GPU::NVIDIA::Setup) dies in "plan" in Rex::GPU::NVIDIA::Setup, before it is changed.

A meta package co-installs the kernel module and the userspace at one version, so nvidia-smi never sees a Driver/library version mismatch. Pre-signed kmp packages need no kernel headers.

Every source verifies two entries after the install ("verify_query"): the meta package, and the kernel module package it requires -- the capability nvidia-open-driver-G06-signed-kmp / nvidia-open-driver-G07-signed-kmp / nvidia-driver-G06-kmp, whichever kernel flavour (-default, -64kb, ...) provides it. Either missing dies with the rpm layer's ... not installed after zypper install message. That the module builds, loads and binds is left to "verify_nvidia" in Rex::GPU::NVIDIA.

verify_query

rpm -q --whatprovides NAME: a package provides its own name, so the meta package passes as before, and the kmp capability passes whichever flavour package carries it.

leap_version

16.0 on Leap 16 and later, the x.y of the raw release string (15.6) before -- never operating_system_version, which strips the dots (156, karr #6).

repo_url

my $url = $self->repo_url('15.6');

https://download.nvidia.com/opensuse/leap/15.6/.

plan

The base plan plus $plan->{repo_url}, the chosen source's repository.

prepare_host

Removes (rpm -e) every installed nvidia* / libnvidia* package except the container toolkit's: libnvidia-ml / libnvidia-cfg from the OSS non-free repository lag behind the GFX repository's kmp and split the driver from its libraries.

prepare_source

(Re-)adds NVIDIA's GFX repository as nvidia-gfx by its base URL (zypper cannot parse the yum .repo files) and refreshes it, importing its key -- see "add_repo", which dies before any driver package is installed if the repository cannot be added or refreshed.

add_repo

$setup->add_repo('nvidia-gfx', 'https://download.nvidia.com/opensuse/leap/15.6/');

Replaces the zypper repository ALIAS with one for URL: zypper rr ALIAS (a missing alias is fine), zypper addrepo --refresh URL ALIAS, then zypper --gpg-auto-import-keys refresh ALIAS. An existing entry is always replaced, never kept, so a re-run -- or a host upgraded to a Leap release with another URL -- ends up with this URL.

Each of them waits up to "zypper_lock_timeout" for the zypp lock. Dies if addrepo exits non-zero (after the rr that happens only for a real error, e.g. the zypp lock still held after that wait, exit 7), naming alias, URL, exit code and zypper's output. addrepo of a base URL does not contact the server, so an HTTP error or an unresolvable host shows only in the refresh (exit 4, "Repository ... is invalid"): then the entry just added is removed again -- an enabled, broken repository would make every later zypper command on the host exit 106 -- and it dies the same way. Used by "install_container_toolkit" in Rex::GPU::NVIDIA too.

install_packages

The rpm layer's zypper install -y, then zypper addlock libnvidia-ml libnvidia-cfg, so a later zypper update cannot pull the stale OSS non-free libraries back in and cause the version mismatch again.

SEE ALSO

Rex::GPU::NVIDIA::Setup, "install_driver" in Rex::GPU::NVIDIA

SUPPORT

Issues

Please report bugs and feature requests on GitHub at https://github.com/Getty/rex-gpu/issues.

CONTRIBUTING

Contributions are welcome! Please fork the repository and submit a pull request.

AUTHOR

Torsten Raudssus <getty@cpan.org>

COPYRIGHT AND LICENSE

This software is copyright (c) 2026 by Torsten Raudssus <torsten@raudssus.de> https://raudssus.de/.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.