Problem with onboard nvidia gpu refuse to work

Hello every one,

I am working on a dell xps 9560 on unbuntu 20.04.
the active gpu is always the intel one and not the nvidia card this is my actual problem.

I tried many internet trickery but no luck so far.
i eventually arrived on this forum.
Here is a little more detail on where i am at :

On bios side of things Secure Boot is disable.
Am booting from grub with a DEFAULT command line looking like this :

> GRUB_CMDLINE_LINUX_DEFAULT="quiet splash acpi_rev_override=1 pci=noaer acpi_enforce_resources=lax noveau.modeset=1"


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

ubuntu-drivers devices →

WARNING:root:_pkg_get_support nvidia-driver-390: package has invalid Support Legacyheader, cannot determine support level
== /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0 ==
modalias : pci:v000010DEd00001C8Dsv00001028sd000007BEbc03sc02i00
vendor   : NVIDIA Corporation
model    : GP107M [GeForce GTX 1050 Mobile]
driver   : nvidia-driver-460-server - distro non-free
driver   : nvidia-driver-470 - third-party non-free recommended
driver   : nvidia-driver-418-server - distro non-free
driver   : nvidia-driver-470-server - distro non-free
driver   : nvidia-driver-450-server - distro non-free
driver   : nvidia-driver-390 - distro non-free
driver   : nvidia-driver-460 - distro non-free
driver   : xserver-xorg-video-nouveau - distro free builtin

If also tried this :
glxinfo | egrep "(OpenGL vendor|OpenGL renderer|OpenGL version)"

here is the result

OpenGL vendor string: Intel
OpenGL renderer string: Mesa Intel(R) HD Graphics 630 (KBL GT2)
OpenGL version string: 4.6 (Compatibility Profile) Mesa 21.0.3

__NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia glxinfo | grep vendor

in order to force the nvidia to run here is the error i got :

X Error of failed request:  BadValue (integer parameter out of range for operation)
  Major opcode of failed request:  152 (GLX)
  Minor opcode of failed request:  24 (X_GLXCreateNewContext)
  Value in failed request:  0x0
  Serial number of failed request:  39
  Current serial number in output stream:  40

First off, the nouveau module needs to be blacklisted for the nvidia driver to work.
Second. Any particular reason you use “acpi_rev_override=1 pci=noaer acpi_enforce_resources=lax”?

So at least blacklist nouveau (check first with grep -r nouveau /etc/modprobe.d/ if not already there) first:

Remove the noveau.modeset=1 parameter. Run sudo update-initramfs -u. Reboot and then run as root and attach the resulting file here.

I am getting the same error after switching to nvidia from intel using prime-select. The glxgears works in Intel. When I reboot after switching to nvidia, I got blank screen. The graphics was working before with Nvidia 418.87. Please help me somebody, I am relatively new to Ubuntu/Nvidia. I am stuck here for more than a week.

nvidia-bug-report.log.gz (1.4 MB)

I am using Ubuntu16.04 and my GPU is NVIDIA GeForce Titan X

You don’t have an intel gpu at all, only two Titan X. Please connect your Monitor to the other Nvidia card.