CUDA Problem Ubuntu Linux

I have a problem running CUDA applications in Ubuntu 16.04. After booting, CUDA applications run fine. However, after some time, the CUDA device stops running with errors. A possible cause is running other programs that use the GPU, but what is triggering the problem is unclear. Rebooting solves the problem, but this is very inconvenient for a development machine.

I am using Cuda 9.2 and 396.44 drivers.

For example, deviceQuery prints the following error

cudaGetDeviceCount returned 30

Attempts to launch a program from Nsight return:

Coalescing of the CUDA commands output is off.
$1 = 0xff
The target endianness is set automatically (currently little endian)
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
fatal:  The CUDA driver initialization failed. (error code = CUDBG_ERROR_INITIALIZATION_FAILURE(0x14)

nvidia-smi returns the following information:

+----------------------------------------------------------------------------+
| NVIDIA-SMI 396.44                 Driver Version: 396.44                    |
|-------------------------------+----------------------+----------------------+
| 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 1060    Off  | 00000000:01:00.0 Off |                  N/A |
| N/A   48C    P0    24W /  N/A |    558MiB /  6078MiB |      1%   E. Process |
+-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+
| Processes:                                                       GPU Memory |
|  GPU       PID   Type   Process name                             Usage      |
|=============================================================================|
|    0      1037      G   /usr/lib/xorg/Xorg                           281MiB |
|    0      1990      G   compiz                                        49MiB |
|    0      2499      G   /usr/lib/firefox/firefox                       1MiB |
|    0      2525      G   /usr/lib/firefox/firefox                       2MiB |
|    0      2533      G   /usr/lib/firefox/firefox                     128MiB |
|    0     13537      G   ...quest-channel-token=4387757935089331580    89MiB |
+-----------------------------------------------------------------------------+