Installed Nvidia driver 410 for TitanXP not running anymore (Ubuntu 18.04)

I have installed the nvidia driver 410 on Ubuntu 18.04 and it used to work previously. Now unfortunately when trying to run nvidia-smi I get the following output: NVIDIA-SMI has failed because it couldn’t communicate with the NVIDIA driver. Make sure that the latest NVIDIA driver is installed and running.

Running nvidia-settings I get this output:
ERROR: NVIDIA driver is not loaded
ERROR: Unable to load info from any available system
(nvidia-settings:3833): GLib-GObject-CRITICAL **: 11:41:32.039: g_object_unref: assertion ‘G_IS_OBJECT (object)’ failed
** Message: 11:41:32.043: PRIME: No offloading required. Abort
** Message: 11:41:32.043: PRIME: is it supported? no

I haven’t applied any changes, so I have no idea why the nvidia driver is not running anymore. I would highly appreciate your help! Thank you in advancenvidia-bug-report.log.gz (69.4 KB)

Since the driver 410 is quite old, I suspect you got a kernel update, so it broke.
Please run nvidia-bug-report.sh as root and attach the resulting nvidia-bug-report.log.gz file to your post.

You are now on kernel 5.4 which requires driver 440. Please upgrade using the graphics driver ppa.

Thank you. This worked for me.