Nvidia-prime or cuda is not properly working/broken and cannot find GPU device in the scene.

Hi I am having trouble with the NVIDIA GTX 1060 board installed with bumblebee.

Here is the output of the devicequery from samples of cuda compiler.

$optirun sudo ./deviceQuery

ERROR: ld.so: object ‘libdlfaker.so’ from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object ‘librrfaker.so’ from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
./deviceQuery Starting…

CUDA Device Query (Runtime API) version (CUDART static linking)

cudaGetDeviceCount returned 35
-> CUDA driver version is insufficient for CUDA runtime version
Result =

$optirun glxspheres64
Polygons in scene: 62464 (61 spheres * 1024 polys/spheres)
Visual ID of window: 0x21
Context is Direct
OpenGL Renderer: GeForce GTX 1060/PCIe/SSE2

as this problem persists tensorflow is using cpu to compile and takes a lot of time