Installing 340.96 in Ubuntu 16.04 on a 8800GTS = Black Screen

I installed Ubuntu on a laptop with a Nvidia 8800GTS. It appeared to work with the Nouveau driver, except for Steam. Anyway, I installed the propriety stable release version 340.96 from the software update GUI. The system would restart and lock up to a black screen after about 55 seconds.

I reinstalled Ubuntu and reinstalled 340.96 from the command line using the package downloaded from Nvidia.

Same thing, boots up, Nvidia splash screen, then login prompt to the desktop.

Once to the desktop I have around 54 seconds (I timed it) until the black screen. It doesn’t matter what I’m doing, in a Program, Term, or just sitting at the desktop.

If I leave it at the login prompt I have around 40 seconds before it locks up to the black screen. I have been moving the mouse to avoid any inactivity timeout (although 50 seconds seems quick for that).

I also tried the Ctrl-Alt-F1 to the command prompt to try to avoid any unneeded graphics to see if that would change anything, with the same black screen results.

From the log files:

nvidia-installer.log

Had a pre-install script fail. Not sure what this is or how to troubleshoot it.

installer version: 340.96

PATH: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

nvidia-installer command line:
./nvidia-installer

Using: nvidia-installer ncurses user interface
-> License accepted.
-> Installing NVIDIA driver version 340.96.
-> Running distribution scripts
executing: ‘/usr/lib/nvidia/pre-install’…
-> done.
-> The distribution-provided pre-install script failed! Are you sure you want to continue? (Answer: Continue installation)
-> Would you like to register the kernel module sources with DKMS? This will allow DKMS to automatically build a new module, if you install a different kernel later. (Answer: Yes)
-> Installing both new and classic TLS OpenGL libraries.
-> Installing both new and classic TLS 32bit OpenGL libraries.
-> Install NVIDIA’s 32-bit compatibility libraries? (Answer: Yes)
-> Skipping installation of the libvdpau wrapper library.
-> Searching for conflicting X files:
-> done.
-> Searching for conflicting OpenGL files:
-> done.
-> Installing ‘NVIDIA Accelerated Graphics Driver for Linux-x86_64’ (340.96):
executing: ‘/sbin/ldconfig’…
-> done.
-> Driver file installation is complete.
-> Installing DKMS kernel module:
-> done.
-> Running post-install sanity check:
-> done.
-> Post-install sanity check passed.
-> Shared memory test passed.
-> Running runtime sanity check:
-> done.
-> Runtime sanity check passed.
-> Would you like to run the nvidia-xconfig utility to automatically update your X configuration file so that the NVIDIA X driver will be used when you restart X? Any pre-existing X configuration file will be backed up. (Answer: Yes)
-> Your X configuration file has been successfully updated. Installation of the NVIDIA Accelerated Graphics Driver for Linux-x86_64 (version: 340.96) is now complete.

From the nvidia-bug-report.log

*** /var/lib/dkms/nvidia/340.96/4.4.0-21-generic/x86_64/log/make.log
*** ls: -rw-r–r-- 1 root root 457639 2016-06-11 19:02:52.457972130 -0400 /var/lib/dkms/nvidia/340.96/4.4.0-21-generic/x86_64/log/make.log
DKMS make.log for nvidia-340.96 for kernel 4.4.0-21-generic (x86_64)
Sat Jun 11 19:02:05 EDT 2016
NVIDIA: calling KBUILD…
make[1]: Entering directory ‘/usr/src/linux-headers-4.4.0-21-generic’
test -e include/generated/autoconf.h -a -e include/config/auto.conf || (
echo >&2;
echo >&2 " ERROR: Kernel configuration is invalid.";
echo >&2 " include/generated/autoconf.h or include/config/auto.conf are missing.";
echo >&2 " Run ‘make oldconfig && make prepare’ on kernel src to fix it.";
echo >&2 ;
/bin/false)
mkdir -p /var/lib/dkms/nvidia/340.96/build/.tmp_versions ; rm -f /var/lib/dkms/nvidia/340.96/build/.tmp_versions/*
make -f ./scripts/Makefile.build obj=/var/lib/dkms/nvidia/340.96/build

The gpu-manager.log and Xorg.0.log both appeared ok from what I can tell.

I appreciate if you would point me where to start troubleshooting this or any help. I am new to Linux but not computers (DOS, OS/2, Windows).