NVIDIA-Linux-x86_64-340.106 for GeForce 8800 GT on ubuntu 16.04 installed only with --no-unified-memory

Hello Dears!
Could you please help me.

I am trying to make CUDA working on my 8800 GTS card. As far as I understand (there was a topic on this forum already) the Cuda 1.0 should be supported on my card.

The only way I could install the latest driver I get from the official site (the 340.106) is with the option --no-unified-memory, there was no other way to install it in normall way (this suggestion --no-unified-memory I got from the log-file, it says that I can still use the driver, but CUDA will not work)

So please tell me if I can do something to install it without this option --no-unified-memory

If the driver 340.106 is not really recommended for my card, please tell me which one compatible with CUDA and my GTS 8800 card should I use?

*I even tried to install a very old one, the 100.14.11, but it can not compile at all (ERROR: Unable to determine the version of the kernel sources located in ‘/lib/modules/4.13.0-26-generic/build’)

Thank you very much in advance for your support!

I would like to thank:
https://devtalk.nvidia.com/default/topic/1028812/linux/340-106-nvidia-uvm-ko-fails-to-build-under-kernel-4-14-13/post/5235463/#5235463

For posting the patch that helped me to install 340.106 driver on my system without the --no-unified-memory option!