cudaGetDeviceCount is failing

CUDA error at /home/tom/NVIDIA_CUDA-10.1_Samples/common/inc/helper_cuda.h:744 code=35(cudaErrorInsufficientDriver) “cudaGetDeviceCount(&device_count)”

This error showed up spontaneously in my code which was running nicely yesterday. Even backed up versions of the code throw this same error now. I am not very skilled at this type of debugging.
I reinstalled the nvidia drivers to my Ubuntu system, but nothing changed.

tom@tom-X470-AORUS-GAMING-5-WIFI:~/code/GIT/ChesParticleMover3dNVCC$ dkms status
nvidia, 440.33.01, 5.3.0-40-generic, x86_64: installed
nvidia, 440.33.01, 5.3.0-42-generic, x86_64: installed

tom@tom-X470-AORUS-GAMING-5-WIFI:~/code/GIT/ChesParticleMover3dNVCC$ nvidia-smi
Wed Mar 18 17:52:13 2020
±----------------------------------------------------------------------------+
| NVIDIA-SMI 440.33.01 Driver Version: 440.33.01 CUDA Version: ERR! |
|-------------------------------±---------------------±---------------------+
| 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 RTX 2070 On | 00000000:0A:00.0 On | N/A |
| 0% 42C P8 12W / 175W | 390MiB / 7979MiB | 12% Default |
±------------------------------±---------------------±---------------------+

±----------------------------------------------------------------------------+
| Processes: GPU Memory |
| GPU PID Type Process name Usage |
|=============================================================================|
| 0 1322 G /usr/lib/xorg/Xorg 18MiB |
| 0 1381 G /usr/bin/gnome-shell 49MiB |
| 0 1755 G /usr/lib/xorg/Xorg 152MiB |
| 0 1900 G /usr/bin/gnome-shell 101MiB |
| 0 2512 G …AAAAAAAAAAAAAAgAAAAAAAAA --shared-files 54MiB |
| 0 3642 G FAHViewer 6MiB |
±----------------------------------------------------------------------------+
tom@tom-X470-AORUS-GAMING-5-WIFI:~/code/GIT/ChesParticleMover3dNVCC$ nvidia-settings
libEGL warning: DRI2: failed to authenticate

(nvidia-settings:3660): GLib-GObject-CRITICAL **: 17:52:45.470: g_object_unref: assertion ‘G_IS_OBJECT (object)’ failed
libEGL warning: DRI2: failed to authenticate