Nvidia Driver won't load/freezing/errors RTX 3070 under Ubuntu 20.04

Hello!
I’ve been struggling and researching my problem for three days already, including reading this forum. I wanted to say thank you first of all.
I wasn’t been able to resolve my problems with RTX 3070 gpu under Ubuntu 20.04, every time I’m facing different issues, but I believe the main one is that driver won’t load even though it’s installed.
I just reinstalled Ubuntu 20.04 with autodrivers and everything worked good for a moment, I was able to see my gpu under nvidia-smi command and Nvidia X Servers Settings, but after like few minutes it froze and after reboot I’m getting this:

ERROR: NVIDIA driver is not loaded

ERROR: Unable to load info from any available system

(nvidia-settings:3957): GLib-GObject-CRITICAL **: 13:14:09.194: g_object_unref: assertion ‘G_IS_OBJECT (object)’ failed
** Message: 13:14:09.196: PRIME: Requires offloading
** Message: 13:14:09.196: PRIME: is it supported? yes
** Message: 13:14:09.212: PRIME: Usage: /usr/bin/prime-select nvidia|intel|on-demand|query
** Message: 13:14:09.212: PRIME: on-demand mode: “1”
** Message: 13:14:09.212: PRIME: is “on-demand” mode supported? yes

What else can be done? Thank you.

Please run nvidia-bug-report.sh as root and attach the resulting nvidia-bug-report.log.gz file to your post.

nvidia-bug-report.log.gz (98.8 KB)
Attaching log file

The older Xorg.logs in the report show the card and driver behaving well.
Then the nvidia card seems to have disappeared. It does not even show up in the output of lspci.
As you are saying the system froze, I don’t think you disabled the discrete gpu in bios. But please check.
If that’s not the case, I’d suspect a hardware failure. But generix might have another idea…

Like Mart said, it vanished while running and is gone now completely.
Please try reseating the card in its slot, reseat/check power connectors, if it still doesn’t show up again, it’s broken.

sudo lspci -d 10de:*

will show any detected nvidia devices.

Yes, it was freezing when I picked prime-select intel and then prime-select nvidia after reboot.
Also I was able to to chech nvidia-smi

Wed Dec 8 13:37:17 2021
±----------------------------------------------------------------------------+
| NVIDIA-SMI 470.86 Driver Version: 470.86 CUDA Version: 11.4 |
|-------------------------------±---------------------±---------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|===============================+======================+======================|
| 0 NVIDIA GeForce … Off | 00000000:03:00.0 Off | N/A |
| 0% 44C P5 15W / 220W | 235MiB / 7982MiB | 23% Default |
| | | N/A |
±------------------------------±---------------------±---------------------+

±----------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=============================================================================|
| 0 N/A N/A 1980 G /usr/lib/xorg/Xorg 45MiB |
| 0 N/A N/A 2496 G /usr/lib/xorg/Xorg 76MiB |
| 0 N/A N/A 2666 G /usr/bin/gnome-shell 95MiB |
| 0 N/A N/A 3340 G /usr/bin/nvidia-settings 3MiB |
| 0 N/A N/A 3612 G nvidia-settings 0MiB |
±----------------------------------------------------------------------------

But I can see it in the system + fans are spinning. + everything was okay till it’s freezes. Very strange

If it’s back after powering down the system, it’s likely a psu issue, the gpu shutting down due to insufficient power.