nVidia 1050Ti: 2 drivers loaded at boot time?

I have been using the nVidia driver version 410.93 for the nVidia 1050Ti
quite some time on my MSI laptop with Ubuntu 18.04 .

Installation according to
[url]https://linuxconfig.org/how-to-install-the-nvidia-drivers-on-ubuntu-18-04-bionic-beaver-linux[/url]
“Manual Install using the Official Nvidia.com driver”.

I have already installed nVidia drivers on SuSE machines, where it always was ok.

On the MSI Laptop there were some strange things after some recent update from
Ubuntu, according to kern.log (nvidia-bug-report.log):
Feb 17 20:09:12 m kernel: [ 4.677720] NVRM: API mismatch: the client has the version 390.87, but
Feb 17 20:09:12 m kernel: [ 4.677720] NVRM: this kernel module has the version 410.93. Please
Feb 17 20:09:12 m kernel: [ 4.677720] NVRM: make sure that this kernel module and all NVIDIA driver
Feb 17 20:09:12 m kernel: [ 4.677720] NVRM: components have the same version.

390.87 was the old Ubuntu default installation from beginning.

Now after update to NVIDIA-Linux-x86_64-418.43.run I also get strange messages
in kern.log (nvidia-bug-report.log):
Feb 24 01:02:46 m kernel: NVRM: API mismatch: the client has the version 418.43, but
NVRM: this kernel module has the version 410.93. Please
NVRM: make sure that this kernel module and all NVIDIA driver
NVRM: components have the same version.

Did the uninstallation procedure of the official driver versions fail?
Shall I purge all nVidia stuff and retry with the Ubuntu version?
Currently all is running ok, I have XFCE on the screen, running 410.93 although there are mismatches.

Thanks in advance

Looks like you didn’t properly uninstall the initial Ubuntu driver package before using the .run installer so you now have leftovers breaking the graphics stack. Especially on notebooks which often use hybrid graphics (Optimus) it is not advisable to use the .run installer. Please uninstall it using the --uninstall option, then add the Ubuntu graphics ppa and use the driver from there.

Is there some different install package for the newest nVidia drivers for Ubuntu?

Do I always have to uninstall the previous driver with the corresponding --uninstall before installing
the new nVidia driver?

This was not necessary on the older PC with SuSE and two graphic cards (no Optimus).

Thanks in advance

If you’re updating from .run to .run, uninstall is called automatically. You’ll have to use uninstall manually when you’re changing from .run to repo package or the other way around in which case you’ll have to use the package manager to remove any nvidia packages.
SuSE doesn’t provide any packages or infrastructure around nvidia gpus so you don’t run into collisions when using the .run installers. This (mostly) also applies to desktop systems which only have one gpu running any distro.
Ubuntu provides nvidia drivers and infrastructure for hybrid graphics, to switch between gpus so on notebooks it is most likely you somehow break things by using the .run installers.
The Ubuntu graphics ppa always provides the latest non-beta driver with a delay of some days (for testing things) so the 418 driver which came out of beta just two days ago will probably show up there during next week.
Graphics drivers ppa: [url]https://launchpad.net/~graphics-drivers/+archive/ubuntu/ppa[/url]

Did a sudo telinit 3
and then sudo nvidia-uninstall

The sudo nvidia-uninstall showed a few errors when trying to uninstall.
My fault: I did not copy those errors.

Installed
sudo apt-get install nvidia-390
since according to https://launchpad.net/~graphics-drivers/+archive/ubuntu/ppa
this seems to be the current driver for GeForce GTX 1050 Ti Mobile,
at least I could not install a 415 as
sudo ubuntu-drivers devices
== /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0 ==
modalias : pci:v000010DEd00001C8Csv00001462sd0000120Bbc03sc02i00
vendor : NVIDIA Corporation
model : GP107M [GeForce GTX 1050 Ti Mobile]
driver : nvidia-driver-396 - third-party free
driver : nvidia-driver-415 - third-party free recommended
driver : nvidia-driver-390 - third-party free
driver : nvidia-driver-410 - third-party free
driver : xserver-xorg-video-nouveau - distro free builtin
suggested.

Did the install like described on
https://www.mvps.net/docs/install-nvidia-drivers-ubuntu-18-04-lts-bionic-beaver-linux/?PageSpeed=noscript

rebootet but I still get
…nvidia-modeset: Loading NVIDIA Kernel Mode Setting Driver for UNIX platforms 410.93
and still
/usr/bin/nvidia-smi --version
Failed to initialize NVML: Driver/library version mismatch

The bad thing is: nvidia-uninstall is not there anymore so I cannot retry to get the error
messages.

I never had these strange problems with installing nVidia drivers on SuSE.
:-(

I was able to install 415.27 via Synaptic now.
This uninstalled the faulty 410.93 stuff and according to Synaptic also the previous 390.87 installation.

vidia-smi works now:
Wed Feb 27 01:53:44 2019
±----------------------------------------------------------------------------+
| NVIDIA-SMI 415.27 Driver Version: 415.27 CUDA Version: 10.0 |
|-------------------------------±---------------------±---------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
|===============================+======================+======================|
| 0 GeForce GTX 105… Off | 00000000:01:00.0 Off | N/A |
| N/A 36C P8 N/A / N/A | 0MiB / 4042MiB | 0% Default |
±------------------------------±---------------------±---------------------+

±----------------------------------------------------------------------------+
| Processes: GPU Memory |
| GPU PID Type Process name Usage |
|=============================================================================|
| No running processes found |
±----------------------------------------------------------------------------+