ASUS TUF FX505DT nvidia-settings opens blank and I cannot switch to NVIDIA card

Hello,
I have a ASUS FX505DT with Ryzen 7 3750H and GTX1650 graphics card. I did a fresh Ubuntu 19.10 install. I selected installation of graphics drivers during os installation. Currently nvidia-driver-435 is installed.

It seems I cannot switch to NVIDIA card. When I run nvidia-settings I get a small blank screen. Below you can find some relevant outputs.
nvidia-settings

ERROR: Unable to load info from any available system


(nvidia-settings:9469): GLib-GObject-CRITICAL **: 21:29:58.118: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
** Message: 21:29:58.121: PRIME: No offloading required. Abort
** Message: 21:29:58.121: PRIME: is it supported? no

uname -a

Linux asus 5.3.0-26-generic #28-Ubuntu SMP Wed Dec 18 05:37:46 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

xrandr --listproviders

Providers: number : 1
Provider 0: id: 0x54 cap: 0x9, Source Output, Sink Offload crtcs: 4 outputs: 1 associated providers: 0 name:Unknown AMD Radeon GPU @ pci:0000:05:00.0

nvidia-smi

Thu Jan 16 21:34:03 2020       
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 435.21       Driver Version: 435.21       CUDA Version: 10.1     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|===============================+======================+======================|
|   0  GeForce GTX 1650    Off  | 00000000:01:00.0 Off |                  N/A |
| N/A   39C    P0     3W /  N/A |      0MiB /  3911MiB |      0%      Default |
+-------------------------------+----------------------+----------------------+
                                                                               
+-----------------------------------------------------------------------------+
| Processes:                                                       GPU Memory |
|  GPU       PID   Type   Process name                             Usage      |
|=============================================================================|
|  No running processes found                                                 |
+-----------------------------------------------------------------------------+

prime-select query

nvidia

nvidia-bug-report.log
https://paste.ubuntu.com/p/yj9ByF9RDn/

Thank you in advance.

HEY so I have the FX505DT but with the Ryzen 5 chip and GTX 1650. This is the process that worked for me. Although I would recommend to start at step 4 on a fresh install where you have selected minimum installation and unticked install third party drivers.

Step 1: Purge existing Nvidia Drivers.

sudo apt-get purge *nvidia*

Step 2: Check that there are no remnants:

dpkg -l | grep nvidia

manually uninstall any remaining nvidia modules, and there will be e.g:

sudo apt-get remove libnvidia-common-440:i386

Step 3:

reboot

Step 4: add the graphics driver ppa:

sudo add-apt-repository ppa:graphics-drivers/ppa
sudo apt-get update
sudo apt-get upgrade

Step 5: Install the 435 Driver (Working on FX505DT):
First install the kernel module from the graphics PPA

sudo apt-get install nvidia-kernel-source-435

Then install propriety driver:

sudo apt-get install nvidia-driver-435

Step 6: Check for blacklist files

sudo rm /etc/modprobe.d/blacklist-nvidia.conf /lib/modprobe.d/blacklist-nvidia.conf

Step 7: From other forum post by @Generix:
Ok, the kernel driver is loaded but it’s not yet picked up by the Xserver.
Please delete /etc/X11/xorg.conf
and modify /usr/share/X11/xorg.conf.d/10-amdgpu.conf
replacing only

Driver "amdgpu"

with

Driver "modesetting"

Step 8: Please add

Option "PrimaryGPU" "Yes"

inside the OutputClass of /usr/share/X11/xorg.conf.d/10-nvidia.conf

Step 9:

reboot


Step 10:
Ensure everything is working alright!!!
Run Nvidia-settings and run

ndvidia-smi

and check that gnome shell comes up as a process.

Step 11: To Stop Flickering, proceed at own risk:
open /sys/class/drm/card0/device/power_dpm_force_performance_level and change the value in the file from auto to high.

Hey thanks for your reply.
Just to clarify, to run a program with NVIDIA GPU I should use the command below right?

__NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia <myCommandToRun>

Hi Sorry, I am unsure of how offloading works.