Cannot switch to Nvidia on Xorg/Wayland (Gnome)

Hello,
After 3 days of looking for info in forums finally i stuck.
I cannot understand what prevents to load nvidia drivers. Driver looks ok im my opinion but how to use it have no idea.

What to search for?
Here is something i know:

$ nvidia-smi  
Wed Mar 16 21:58:46 2022       
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 510.54       Driver Version: 510.54       CUDA Version: 11.6     |
|-------------------------------+----------------------+----------------------+
| 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:01:00.0 Off |                  N/A |
| N/A   37C    P8    N/A /  N/A |      1MiB /  2048MiB |      0%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+
                                                                               
+-----------------------------------------------------------------------------+
| Processes:                                                                  |
|  GPU   GI   CI        PID   Type   Process name                  GPU Memory |
|        ID   ID                                                   Usage      |
|=============================================================================|
|    0   N/A  N/A      1252      G   /usr/bin/gnome-shell                0MiB |
+-----------------------------------------------------------------------------+

$ inxi -G   
Graphics:
  Device-1: Intel WhiskeyLake-U GT2 [UHD Graphics 620] driver: i915 v: kernel
  Device-2: NVIDIA GP108M [GeForce MX250] driver: nvidia v: 510.54
  Display: wayland server: X.org v: 1.21.1.3 with: Xwayland v: 22.1.0
    compositor: gnome-shell v: 41.4 driver: X: loaded: modesetting,nvidia
    gpu: i915 resolution: 2160x1440~60Hz
  OpenGL: renderer: Mesa Intel UHD Graphics 620 (WHL GT2)
    v: 4.6 Mesa 21.3.7

I’m not sure if Xorg is configured correctly and what config files it is using.
Need some advice.

By default you can offload applications to the nvidia card:

__NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia command

or

prime-run command

What is the problem?

nvidia-smi shows you the loaded driver version and inxi as well, so you’re good to go.

Oh, i apologize i did not know this command. I look in Settings > About, X is loading on Mesa Intel® UHD Graphics. Two games on Steam failed so i thought there is a problem with nvidia drivers.

Thank you so much for your time.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.