nvidia-384 or nvidia-prime is broken after updates .

Here are the details

optirun nvidia-smi

[i]Mon Nov 27 18:10:01 2017
±----------------------------------------------------------------------------+
| NVIDIA-SMI 384.98 Driver Version: 384.98 |
|-------------------------------±---------------------±---------------------+
| 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 49C P0 26W / N/A | 6MiB / 6072MiB | 2% Default |
±------------------------------±---------------------±---------------------+

±----------------------------------------------------------------------------+
| Processes: GPU Memory |
| GPU PID Type Process name Usage |
|=============================================================================|
| 0 5915 G /usr/lib/xorg/Xorg 6MiB |
±----------------------------------------------------------------------------+
[/i]

optirun nvidia-settings

[i]ERROR: Error querying enabled displays on GPU 0 (Missing Extension).

ERROR: Error querying connected displays on GPU 0 (Missing Extension).

** Message: PRIME: Requires offloading
** Message: PRIME: is it supported? yes

ERROR: nvidia-settings could not find the registry key file. This file should
have been installed along with this driver at
/usr/share/nvidia/nvidia-application-profiles-key-documentation. The
application profiles will continue to work, but values cannot be
prepopulated or validated, and will not be listed in the help text.
Please see the README for possible values and descriptions.[/i]

this is the error

#optirun ./deviceQuery
[i]./deviceQuery Starting…

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

cudaGetDeviceCount returned 30
-> unknown error
Result = FAIL

[/i]

So the exact thing is driver is not loading properly. Also the bumblebee is all good I have checked it. Also the driver is loaded when I use it for something else like :

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

#optirun glxgears -info
GL_RENDERER = GeForce GTX 1060/PCIe/SSE2
GL_VERSION = 4.5.0 NVIDIA 384.98
GL_VENDOR = NVIDIA Corporation

initially, everything worked fine and after CUDA installation I have checked and confirmed the working devicequery and some other utilities.

Thanks !