Currently on a working laptop with Nvidia Optimus; installed drivers by following this:
It once happened that, when running system updates, there were Nvidia updates as well, so installed them.
However there was a detail I had forgot: I had booted the system with UEFI secure boot disabled. This caused that no public key was generated in /var/lib/nvidia-pubkeys, thus no prompt for enrolling new key at reboot.
This had no consequence when booting with secure boot disabled; but when enabling it, either X server did not start at all and just direct to tty, or it did start but perhaps with several “errors” such as Nvidia offloading with the __NV* variables not working.
What I had to do is boot with secure boot enabled and force reinstallation of all Nvidia packages with “zypper in -f”. Fortunately this seemed to fix the whole issue.
But now my doubt is, which specific Nvidia package(s) is/are responsible of actually generating the public key at /var/lib/nvidia-pubkeys ?