Although the autoinstaller method of updating modules
(as described in the README) works for most modules installed
by DKMS, it is not run early enough in the boot sequence to
be completely effective for the nvidia binary module; the
system still requires a reboot for the new module to take effect
(nullifying the very reason to use the autoinstaller in the
first place).

For this reason this SlackBuild now contains a script intended
to be run immediately after a kernel update (before rebooting)
which will detect a DKMS-installed nvidia module, then build &
install a new version of it to suit the new kernel. Following
the reboot required to use the new kernel, any graphical
environment requiring the nvidia module will be available
immediately.

On Slackware versions later than 15.0, this script can be run
automatically without any human intervention by installing the
script at /usr/local/sbin/geninitrd-post-install and editing the
/etc/default/geninitrd file to uncomment the POST_INSTALL_SCRIPT
setting. Of course the location can be changed if so desired.
Now, when a new kernel is installed, geninitrd is run which in
turn will run the geninitrd-post-install script for dkms to
update the nvidia module.

For Slackware 15.0, which doesn't provide the same geninitrd
functionality, the script must be run manually. If it is
installed as /usr/local/sbin/geninitrd-post-install, then run
(as root) something like:
    KERNEL_VERSION=5.15.193 /usr/local/sbin/geninitrd-post-install

Remember, this method works only if the system already has the
nvidia binary module installed by DKMS. It has no effect on
nvidia modules installed without the DKMS option enabled.

