Installation problem with cuda

Hello everyone,

I have an nvidia GetForce GTX 1060 graphics card and I would like to develop with CUDA.

I tried to install the driver nvidia-driver-440:

$ ubuntu-drivers devices
== /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0 ==
modalias : pci:v000010DEd00001C20sv00001025sd00001263bc03sc00i00
vendor   : NVIDIA Corporation
model    : GP106M [GeForce GTX 1060 Mobile]
driver   : nvidia-driver-415 - third-party free
driver   : nvidia-driver-440 - distro non-free recommended
driver   : nvidia-driver-390 - distro non-free
driver   : nvidia-driver-435 - distro non-free
driver   : nvidia-driver-410 - third-party free
driver   : xserver-xorg-video-nouveau - distro free builtin

== /sys/devices/pci0000:00/0000:00:14.3 ==
modalias : pci:v00008086d0000A370sv00008086sd00000034bc02sc80i00
vendor   : Intel Corporation
manual_install: True
driver   : backport-iwlwifi-dkms - distro free

$ sudo apt install nvidia-driver-440

But when I restart my computer, nothing goes well, and the graphical interface no longer starts.
I have to go into recovery mode from GRUB and launch a root shell to execute these commands:

apt purge nvidia-driver-440 && apt autoremove && apt auto-clean && reboot

Following these commands, the graphical interface is launched when I restart my machine.

Here is the error I have in /var/log/syslog when the GUI does not launch:

systemd-udevd[2389]: Process '/usr/sbin/alsactl -E HOME=/run/alsa restore 0' failed with exit code 99.

So I modified the file: /lib/udev/rules.d/90-alsa-restore.rules
To comment on the two test lines:

ACTION=="add", SUBSYSTEM=="sound", KERNEL=="controlC*", KERNELS!="card*", TEST=="/usr/sbin", TEST=="/usr/share/alsa", GOTO="alsa_restore_go"
GOTO="alsa_restore_end"

LABEL="alsa_restore_go"
#TEST!="/etc/alsa/state-daemon.conf", TEST=="/usr/sbin/alsactl", RUN+="/usr/sbin/alsactl -E HOME=/run/alsa restore $attr{device/number}"
#TEST=="/etc/alsa/state-daemon.conf", TEST=="/usr/sbin/alsactl", RUN+="/usr/sbin/alsactl -E HOME=/run/alsa nrestore $attr{device/number}"

LABEL="alsa_restore_end"

I restarted, but I still have errors in /var/log/syslog:

xf86EnableIOPorts: failed to set IOPL for I/O (Operation not permitted)
failed to rescan: Failed to parse /usr/share/applications/nvidia-settings.desktop file: cannot process file of type application/x-desktop

Secure-boot is disabled at the bios level.

I don’t really know where to look …

I’m using Ubuntu 18, and I have a Predator Helios 300 laptop.

Thank you in advance for your help !