nvidia Driver not loading. Ubuntu 18.04

my notebook is using both intel integrated and external GPU with two operating system ubuntu and win10.
On ubuntu system,it cannot switch to use nvidia Geforce GTX 960M,it block me from using cuda.
I have tried to reinstall nvidia drivers multiple times.I have tried installing from both command line and "Software & update"app.
Right now i have driver version 440.59.
I am just a student and hard to find many helps from my side.
sincerely expect your help.

NVIDIA-SMI has failed because it couldn't communicate with the NVIDIA driver. Make sure that the latest NVIDIA driver is installed and running.

ERROR: NVIDIA driver is not loaded
ERROR: Unable to load info from any available system

(nvidia-settings:3312): GLib-GObject-CRITICAL **: 12:42:57.633: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
** Message: 12:42:57.642: PRIME: Requires offloading
** Message: 12:42:57.642: PRIME: is it supported? yes
** Message: 12:42:57.701: PRIME: Usage: /usr/bin/prime-select nvidia|intel|query
** Message: 12:42:57.701: PRIME: on-demand mode: "0"
** Message: 12:42:57.701: PRIME: is "on-demand" mode supported? no<a target='_blank' rel='noopener noreferrer' href=''></a>

nvidia-bug-report.log.gz (75.1 KB)

nvidia-bug-report.log.gz (75.1 KB)