364.19-nVidia M1000M - Doesn't recognize external monitor on Ubuntu 16.04

y Thinkpad P50 mobile workstation has an NVidia M1000M GPU to control the external monitor while using an integrated GPU to control the internal LCD, which could be similar to the NVidia 1000M GPU in some way. I have install nvidia-364 from terminal. My situation is that I have a touch screen with Active Wacom Pen enabled. The external monitor actually works in the Ubuntu Live. But with the nvidia driver installed on Ubuntu 16.04 with kernel 4.6.0-rc5, the external monitor was not recognized at all after reboot.

Once I open the NVidia setting, some error pops up in the system log:

May  2 14:42:21 qxd-QC5-Ubuntu nvidia-settings.desktop[5445]: ** Message: PRIME: No offloading required. Abort
May  2 14:42:21 qxd-QC5-Ubuntu nvidia-settings.desktop[5445]: ** Message: PRIME: is it supported? no
May  2 14:42:21 qxd-QC5-Ubuntu nvidia-settings.desktop[5445]: ERROR: nvidia-settings could not find the registry key file. This file
May  2 14:42:21 qxd-QC5-Ubuntu nvidia-settings.desktop[5445]:        should have been installed along with this driver at
May  2 14:42:21 qxd-QC5-Ubuntu nvidia-settings.desktop[5445]:        /usr/share/nvidia/nvidia-application-profiles-key-documentation. The
May  2 14:42:21 qxd-QC5-Ubuntu nvidia-settings.desktop[5445]:        application profiles will continue to work, but values cannot be
May  2 14:42:21 qxd-QC5-Ubuntu nvidia-settings.desktop[5445]:        prepopulated or validated, and will not be listed in the help text.
May  2 14:42:21 qxd-QC5-Ubuntu nvidia-settings.desktop[5445]:        Please see the README for possible values and descriptions.

Also, when the laptop got started, there is an error in the .xsession-errors file:

openConnection: connect: No such file or directory
cannot connect to brltty at :0

What may have caused this?

I think the error is due to the conflict between 364.19 and the kernel 4.6, and hence the driver was not built. See https://devtalk.nvidia.com/default/topic/926824/linux/364-1-2-5-won-t-compile-against-latest-kernel-git-tree-patches-for-4-6-0-rc3-included-/

Sorry for this branching out.

I have the same GPU and a similar issue under the 4.4 kernel - Ubuntu 16.04. The driver works just fine on the laptop screen, but as soon as I plug in an external monitor to the mini display port, unity crashes, the display application won’t even start.

I have to run the Intel Prime profile for my external monitor to work.

https://devtalk.nvidia.com/default/topic/946199/upgrade-to-ubuntu-16-04-dual-monitor-crashes-367-27-/