After doing prime-select nvidia, blank freeze screen after login

I have GTX1650 GPU on my hp laptop. When I initially dual-booted the laptop, both intel CPU, as well as Nvidia GPU, were working fine.

Now when I want to transfer onto Nvidia, I do prime-select Nvidia, then after reboot, it displays login page, I enter the password and the system FREEZES, the cursor remains visible with no movement. When I restart by the power button, and go to the terminal from the login page and select intel and reboot, it again works fine.

This is my bug-report: nvidia-bug-report.log (835.2 KB)

$ lspci -v | grep VGA
00:02.0 VGA compatible controller: Intel Corporation Device 3e9b (prog-if 00 [VGA controller])
01:00.0 VGA compatible controller: NVIDIA Corporation Device 1f91 (rev a1) (prog-if 00 [VGA controller])

nvidia-settings gives:

$ nvidia-settings
ERROR: NVIDIA driver is not loaded

ERROR: Error querying enabled displays on GPU 0 (Missing Extension).

ERROR: Error querying connected displays on GPU 0 (Missing Extension).

** Message: 18:44:08.409: PRIME: Requires offloading
** Message: 18:44:08.409: PRIME: is it supported? yes

ERROR: nvidia-settings could not find the registry key file. This file should
have been installed along with this driver at
/usr/share/nvidia/nvidia-application-profiles-key-documentation. The
application profiles will continue to work, but values cannot be
prepopulated or validated, and will not be listed in the help text.
Please see the README for possible values and descriptions.

lshw -C display:

$ lshw -C display
WARNING: you should run this program as super-user.
*-display UNCLAIMED
description: VGA compatible controller
product: NVIDIA Corporation
vendor: NVIDIA Corporation
physical id: 0
bus info: pci@0000:01:00.0
version: a1
width: 64 bits
clock: 33MHz
capabilities: vga_controller bus_master cap_list
configuration: latency=0
resources: memory:b3000000-b3ffffff memory:a0000000-afffffff memory:b0000000-b1ffffff ioport:4000(size=128) memory:b4080000-b40fffff

*-display
description: VGA compatible controller
product: Intel Corporation
vendor: Intel Corporation
physical id: 2
bus info: pci@0000:00:02.0
version: 00
width: 64 bits
clock: 33MHz
capabilities: vga_controller bus_master cap_list rom
configuration: driver=i915 latency=0
resources: irq:157 memory:b2000000-b2ffffff memory:80000000-9fffffff ioport:5000(size=64) memory:c0000-dffff

Also,

  1. I have secure boot disabled.
  2. I have no blacklist file.

You seem to have an xorg.conf in place but it wasn’t in the logs.
Please post the output of
ls /etc/X11 /etc/X11/xorg.conf.d
and attach the xorg.conf if you find it, or rather remove it.

Thanks a lot for such fast reply!
ls /etc/X11 /etc/X11/xorg.conf.d

$ ls /etc/X11 /etc/X11/xorg.conf.d
ls: cannot access '/etc/X11/xorg.conf.d': No such file or directory
/etc/X11:
app-defaults		 xkb				    Xsession
cursors			 xorg.conf			    Xsession.d
default-display-manager  xorg.conf.nvidia-xconfig-original  Xsession.options
fonts			 Xreset				    xsm
rgb.txt			 Xreset.d			    XvMCConfig
xinit			 Xresources			    Xw

This is xorg.conf file (just changed its extension so that it can be uploaded)
xorg.log (1.2 KB)

I deleted that xorg.conf file and now the GPU is working. Thanks a lot!!