Hello.
I recently run into problems when updating the nvidia driver.
I use a script to do the job.
At some point, I verify if a package is installed (drm-kmp-default).
It seems that if the package is not installed, zypper want to delete the kernel.
I did not pay attention to the zypper message, and type return to continue. Then zypper removed the kernel.
Here is a screen copy :
.
.
zypper se -s drm-kmp-default
Loading repository data...
Reading installed packages...
S | Name | Type | Version | Arch | Repository
--+-----------------+---------+----------------------+--------+--------------------------
| drm-kmp-default | package | 4.9.33_k4.4.79_4-5.2 | x86_64 | openSUSE-Leap-42.3-Update
| drm-kmp-default | package | 4.9.33_k4.4.76_1-3.2 | x86_64 | openSUSE-Leap-42.3-Oss
.
.
.
.
zypper rm drm-kmp-default
Loading repository data...
Reading installed packages...
'drm-kmp-default' not found in package names. Trying capabilities.
Resolving package dependencies...
The following 2 packages are going to be REMOVED:
kernel-default-4.4.76-1.1 kernel-default-4.4.104-39.1
2 packages to remove.
After the operation, 470,7 MiB will be freed.
Continue? [y/n/...? shows all options] (y):
That’s because the kernel packages do provide drm-kmp-default as well, because they do of course contain the drm kernel modules (just in a different version):
What if I add --name ?
I have tested. Zypper don’t try to remove something else
zypper rm --name drm-kmp-default
When installing the proprietary nvidia driver one must uninstall the drm-kmp-default package.
In my big innocence, I found simpler (doubtless too simple) to use the same script. Whether it is for a first installation, a re-installation, or an update with a new driver.
So removing a package which is not installed would not be a problem (Only if the script is not buggy ;))
When installing the proprietary nvidia driver one must uninstall the drm-kmp-default package.
But only if it is installed.
You could also lock it to prevent accidental installation in the first place.
You could also use the rpm packages from the nvidia repo, they take care of this as well, and will even get updated automatically when you update your system.