NVIDIA-SMI has failed because it couldn't communicate with the NVIDIA driver (hybrid laptop)

Hey there. I just installed Manjaro and was setting it up for machine learning (since NVIDIA dropped cudnn support for windows). I chose the proprietary drivers in the installation process but if I run nvidia-smi or even prime-run nvidia-smi I get the fail message in the title.

> Installed PCI configs:
                  NAME               VERSION          FREEDRIVER           TYPE
     video-modesetting            2020.01.13                true            PCI
video-hybrid-intel-nvidia-prime            2023.03.23               false            PCI

Warning: No installed USB configs!
  Kernel: 6.6.10-1-MANJARO arch: x86_64 bits: 64 compiler: gcc v: 13.2.1
    clocksource: tsc available: acpi_pm
    parameters: BOOT_IMAGE=/boot/vmlinuz-6.6-x86_64
    root=UUID=d964add2-d3f2-4560-87c1-69ff1acb20bf rw quiet splash
    resume=UUID=102e9082-8ce9-4281-858a-e31bf7024c92 udev.log_priority=3
  Desktop: KDE Plasma v: 5.27.10 tk: Qt v: 5.15.12 wm: kwin_x11 vt: 2
    dm: SDDM Distro: Manjaro Linux base: Arch Linux
  Type: Laptop System: ASUSTeK product: ASUS TUF Gaming F15 FX506HC_FX506HC
    v: 1.0 serial: <superuser required>
  Mobo: ASUSTeK model: FX506HC v: 1.0 serial: <superuser required>
    UEFI: American Megatrends LLC. v: FX506HC.313 date: 03/03/2023

  Device-1: Intel TigerLake-H GT1 [UHD Graphics] vendor: ASUSTeK driver: i915
    v: kernel arch: Gen-12.1 process: Intel 10nm built: 2020-21 ports:
    active: eDP-1 empty: DP-1,HDMI-A-1,HDMI-A-2 bus-ID: 0000:00:02.0
    chip-ID: 8086:9a68 class-ID: 0300
  Device-2: NVIDIA GA107M [GeForce RTX 3050 Mobile] vendor: ASUSTeK
    driver: N/A alternate: nouveau non-free: 545.xx+ status: current (as of
    2023-11; EOL~2026-12-xx) arch: Ampere code: GAxxx process: TSMC n7 (7nm)
    built: 2020-2023 bus-ID: 0000:01:00.0 chip-ID: 10de:25a5 class-ID: 0300
  Device-3: IMC Networks USB2.0 HD UVC WebCam driver: uvcvideo type: USB
glxinfo | grep OpenGL                                                                                                                                                                                                    INT ✘ 
OpenGL vendor string: Intel
OpenGL renderer string: Mesa Intel(R) UHD Graphics (TGL GT1)
OpenGL core profile version string: 4.6 (Core Profile) Mesa 23.3.3-manjaro1.1
OpenGL core profile shading language version string: 4.60
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
OpenGL version string: 4.6 (Compatibility Profile) Mesa 23.3.3-manjaro1.1
OpenGL shading language version string: 4.60
OpenGL context flags: (none)
OpenGL profile mask: compatibility profile
OpenGL extensions:
OpenGL ES profile version string: OpenGL ES 3.2 Mesa 23.3.3-manjaro1.1
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20
OpenGL ES profile extensions:
nvidia-xconfig                                                                                                                                                                                                               ✔ 

WARNING: Unable to locate/open X configuration file.

WARNING: Unable to parse X.Org version string.

sh: line 1: pkg-config: command not found

ERROR: Unable to find any GPUs in the system.

ERROR: Unable to write to directory '/etc/X11'.

there is no nvidia-driver installed. check your search engine for “manjaro wiki nvidia” and install the nvidia driver as described.

Hello @Zanchet ,

You are using the PRIME (hybrid) profile.
Which means the nvidia is not engaged unless you use prime-run

glxinfo | grep 'renderer string'
prime-run glxinfo | grep 'renderer string'

For any other attempts or examples … please use prime-run.

Though, I dont think you actually want to be running nvidia-xconfig.

Why do you think you want to? What are you trying to achieve?

See the first part of this message.