Nvidia AMD dual gpu laptop configuration

Hi there.
I have a laptop with dual graphics: intergrated AMD + Nvidia. After Unreal engine started crashing with a vukan_amd.so in the callstack, I started researching which gpu it’s actually using. None of the tools I tried prove that Nvidia is utilized. I tried nvtop (shows only AMD), nvidia-smi (returns an error of missing driver), xrandr --listproviders (only AMD).
I went on to reinstall the drivers. Cleaned the old one and let mhwd do it automatically. I got the driver, pacman nvidia packages. But nvidia-smi still fails. nvidia-settings does not have any configuration options that should be there.
Help me configure this properly please! I tried following this and this manuals.

Here’s the output of some commands:

$ nvidia-smi                                                                                                                                                                   9 ✘ 
NVIDIA-SMI has failed because it couldn't communicate with the NVIDIA driver. Make sure that the latest NVIDIA driver is installed and running.
$ nvidia-settings                                                                                                                                                      ✔ 

ERROR: NVIDIA driver is not loaded


(nvidia-settings:7260): GLib-GObject-CRITICAL **: 08:17:12.779: g_object_unref: assertion 'G_IS_OBJECT (object)' failed

** (nvidia-settings:7260): CRITICAL **: 08:17:12.780: ctk_powermode_new: assertion '(ctrl_target != NULL) && (ctrl_target->h != NULL)' failed

ERROR: nvidia-settings could not find the registry key file or the X server is not accessible. 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.
$ pacman -Q | grep nvid                                                                                                                                                          ✔ 
lib32-nvidia-utils 550.67-1
linux66-nvidia 550.67-5
mhwd-nvidia 550.67-1
mhwd-nvidia-390xx 390.157-9
mhwd-nvidia-470xx 470.239.06-1
nvidia-prime 1.0-4
nvidia-settings 550.67-1
nvidia-utils 550.67-1
$ mhwd -li                                                                                                                                                                       ✔ 
> Installed PCI configs:
--------------------------------------------------------------------------------
                  NAME               VERSION          FREEDRIVER           TYPE
--------------------------------------------------------------------------------
           video-linux            2018.05.04                true            PCI
video-hybrid-amd-nvidia-prime            2023.03.23               false            PCI
$ inxi --admin --verbosity=7 --filter --no-host --width                                                                                                                          ✔ 
System:
  Kernel: 6.6.25-1-MANJARO arch: x86_64 bits: 64 compiler: gcc v: 13.2.1
    clocksource: hpet avail: acpi_pm
    parameters: BOOT_IMAGE=/@/boot/vmlinuz-6.6-x86_64
    root=UUID=8e50babd-d978-452a-84f5-c19ce197176b rw rootflags=subvol=@
    random.trust_cpu=on quiet splash apparmor=1 security=apparmor
    udev.log_priority=3
  Desktop: GNOME v: 45.4 tk: GTK v: 3.24.41 wm: gnome-shell
    tools: gsd-screensaver-proxy dm: GDM v: 45.0.1 Distro: Manjaro
    base: Arch Linux
Machine:
  Type: Laptop System: LENOVO product: 82L5 v: IdeaPad 5 Pro 16ACH6
    serial: <superuser required> Chassis: type: 10 v: IdeaPad 5 Pro 16ACH6
    serial: <superuser required>
CPU:
  Info: model: AMD Ryzen 9 5900HX with Radeon Graphics bits: 64 type: MT MCP
    arch: Zen 3 gen: 4 level: v3 note: check built: 2021-22
    process: TSMC n7 (7nm) family: 0x19 (25) model-id: 0x50 (80) stepping: 0
    microcode: 0xA50000C
Graphics:
  Device-1: NVIDIA GA107M [GeForce RTX 3050 Mobile] vendor: Lenovo driver: N/A
    alternate: nouveau non-free: 545.xx+ status: current (as of 2024-02;
    EOL~2026-12-xx) arch: Ampere code: GAxxx process: TSMC n7 (7nm)
    built: 2020-2023 pcie: gen: 3 speed: 8 GT/s lanes: 8 link-max: gen: 4
    speed: 16 GT/s lanes: 16 bus-ID: 01:00.0 chip-ID: 10de:25a2 class-ID: 0302
  Device-2: AMD Cezanne [Radeon Vega Series / Radeon Mobile Series]
    vendor: Lenovo driver: amdgpu v: kernel arch: GCN-5 code: Vega
    process: GF 14nm built: 2017-20 pcie: gen: 3 speed: 8 GT/s lanes: 16
    link-max: gen: 4 speed: 16 GT/s ports: active: eDP-1 empty: DP-1,HDMI-A-1
    bus-ID: 05:00.0 chip-ID: 1002:1638 class-ID: 0300 temp: 48.0 C
  Display: wayland server: X.org v: 1.21.1.12 with: Xwayland v: 23.2.5
    compositor: gnome-shell driver: X: loaded: amdgpu
    unloaded: modesetting,radeon alternate: fbdev,vesa dri: radeonsi
    gpu: amdgpu display-ID: 0
  API: EGL v: 1.5 hw: drv: amd radeonsi platforms: device: 0 drv: radeonsi
    device: 1 drv: swrast surfaceless: drv: radeonsi wayland: drv: radeonsi x11:
    drv: radeonsi inactive: gbm
  API: OpenGL v: 4.6 compat-v: 4.5 vendor: amd mesa v: 24.0.2-manjaro1.1
    glx-v: 1.4 direct-render: yes renderer: AMD Radeon Graphics (radeonsi renoir
    LLVM 16.0.6 DRM 3.54 6.6.25-1-MANJARO) device-ID: 1002:1638
    memory: 3.91 GiB unified: no display-ID: :0.0
  API: Vulkan v: 1.3.279 layers: 7 device: 0 type: integrated-gpu name: AMD
    Radeon Graphics (RADV RENOIR) driver: mesa radv v: 24.0.2-manjaro1.1
    device-ID: 1002:1638 surfaces: xcb,xlib,wayland

You could try to switch to the proprietary Nvidia driver instead of nouveau by:

sudo mhwd -a pci nonfree 0300

This gives me this. Already installed.

sudo mhwd -a pci nonfree 0300                                                                                                                                                  ✔ 
> Skipping already installed config 'video-hybrid-amd-nvidia-prime' for device: 0000:05:00.0 (0300:1002:1638) Display controller ATI Technologies Inc Cezanne

Probably the driver is not being loaded into the kernel?

Interestingly,

$ sudo modprobe nvidia                                                                                                                                                           ✔ 
modprobe: FATAL: Module nvidia not found in directory /lib/modules/6.6.25-1-MANJARO

but

$ find /lib/modules/6.6.26-1-MANJARO -iname "*nvidia*"                                                                                                                           ✔ 
/lib/modules/6.6.26-1-MANJARO/extramodules/nvidia-drm.ko.xz
/lib/modules/6.6.26-1-MANJARO/extramodules/nvidia.ko.xz
/lib/modules/6.6.26-1-MANJARO/extramodules/nvidia-modeset.ko.xz
/lib/modules/6.6.26-1-MANJARO/extramodules/nvidia-peermem.ko.xz
/lib/modules/6.6.26-1-MANJARO/extramodules/nvidia-uvm.ko.xz
$ uname -r                                                                                                                                                                       ✔ 
6.6.25-1-MANJARO
$ pacman -Q linux                                                                                                                                                                ✔ 
linux66 6.6.25-1

Could it be that the minor version difference causes the issue with nvidia driver?

Have you tried other kernels?

No, I haven’t. BUT I ran pacman -Syyu once more and it updated my kernel to 6.6.26 instead of 6.6.25. This fixed the problem, the driver is loaded.
Interesting, I haven’t done any partial updates. And I think I haven’t skipped any recent updates.
Anyway, thank you for your time and help!

Do you know how to use prime?

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

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